/* Saved page v2 (sg_saved_v2_enabled). Content sits on the .wrap edge (98px at 1280, 20px at 390). */
.sv-page { padding-top: 24px; padding-bottom: 64px; }
.sv-loading { margin: 8px 0 0; color: var(--slate); font-size: 15px; line-height: 24px; }
.sv-page > * + * { margin-top: 16px; }

/* Sign-in banner: signed-out visitors with at least one save, or none. */
.sv-sync { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 4px 16px; align-items: center; padding: 16px 52px 16px 20px; }
.sv-sync-ic { grid-row: 1 / span 2; width: 44px; height: 44px; border-radius: 50%; background: #fff; color: var(--navy); display: inline-flex; align-items: center; justify-content: center; }
.sv-sync h2 { margin: 0; font-size: 17px; line-height: 24px; color: var(--navy); }
.sv-sync p { margin: 0; color: var(--ink); font-size: 14px; line-height: 21px; }
.sv-sync-act { grid-column: 3; grid-row: 1 / span 2; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.sv-sync-act .btn { min-height: 44px; box-sizing: border-box; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.sv-sync-act small { color: var(--slate); font-size: 12px; }
.sv-sync ul { grid-column: 2; margin: 6px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 13px; color: var(--slate); }
.sv-sync li { display: inline-flex; align-items: center; gap: 6px; }
.sv-sync li svg { color: var(--verified); flex: none; }
.sv-sync-hide { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.sv-sync { position: relative; }
.sv-sync .sv-sync-x { position: absolute; top: 6px; right: 6px; width: 32px; height: 32px; border: 0; background: none; color: var(--slate); font-size: 20px; line-height: 1; cursor: pointer; border-radius: 6px; }
.sv-sync .sv-sync-x:hover { background: #fff; }
.sv-sync.is-small { grid-template-columns: minmax(0, 1fr) auto; padding: 10px 16px; border-left-width: 4px; }
.sv-sync.is-small .sv-sync-ic, .sv-sync.is-small ul, .sv-sync.is-small .sv-sync-x, .sv-sync.is-small .sv-sync-act small, .sv-sync.is-small p { display: none; }
.sv-sync.is-small h2 { font-size: 14px; font-weight: 600; }
.sv-sync.is-small .sv-sync-act { grid-column: 2; grid-row: 1; }
.sv-sync.is-small .sv-sync-act .btn { min-height: 36px; padding: 6px 14px; }

/* Merge confirmation after first sign-in on this device. */
.sv-moved { display: flex; align-items: center; gap: 12px; background: var(--verified-fill); border: 1px solid #b9dcc6; border-radius: 12px; padding: 12px 8px 12px 16px; color: var(--verified-text); font-weight: 600; }
.sv-moved svg { flex: none; }
.sv-moved .sv-moved-msg { flex: 1; }
.sv-moved button { width: 36px; height: 36px; border: 0; background: none; color: var(--verified-text); font-size: 20px; cursor: pointer; border-radius: 6px; }

/* Toolbar */
.sv-tools { display: flex; flex-direction: column; gap: 12px; border-bottom: 1px solid var(--line, #e2ddd0); padding-bottom: 16px; }
.sv-row1 { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.sv-count { margin: 0; font-size: 20px; line-height: 28px; color: var(--navy); }
.sv-synced { margin: 2px 0 0; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--verified-text); }
.sv-controls { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.sv-ctl { display: flex; flex-direction: column; gap: 4px; }
.sv-ctl > span, .sv-f > span { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--slate); }
.sv-ctl select, .sv-f select { height: 40px; min-width: 0; border: 1px solid #c9ccc4; border-radius: 8px; background: #fff; padding: 0 32px 0 10px; font: inherit; font-size: 14px; color: var(--ink); }
.sv-tools .seg { height: 40px; }
.sv-filters { display: flex; align-items: flex-end; gap: 10px 12px; flex-wrap: wrap; margin: 0; padding: 0; border: 0; }
.sv-filters legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.sv-f { display: flex; flex-direction: column; gap: 4px; flex: 1 1 160px; max-width: 220px; }
.sv-f select { width: 100%; }
.sv-chip { height: 40px; display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--brass); border-radius: 999px; background: #fff; color: var(--navy); font: inherit; font-size: 14px; font-weight: 600; padding: 0 14px; cursor: pointer; }
.sv-chip .n { color: var(--slate); font-weight: 400; }
.sv-chip[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.sv-chip[aria-pressed="true"] .n { color: #d6dde6; }
.sv-chip .tick { display: none; }
.sv-chip[aria-pressed="true"] .tick { display: inline; }
.sv-clear { height: 40px; display: inline-flex; align-items: center; font-size: 14px; font-weight: 600; color: var(--harbor); }
.sv-cmp { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.sv-cmp .btn { min-height: 40px; padding: 0 16px; display: inline-flex; align-items: center; gap: 4px; box-sizing: border-box; }
.sv-cmp .btn.is-off { background: #c9ccc4; color: #fff; pointer-events: none; }
.sv-cmp small { font-size: 13px; color: var(--slate); }

/* Results */
.sv-out .guide-grid { margin-top: 4px; }
.sv-gnote { margin: 0 0 4px; font-size: 13px; color: var(--slate); }
.sv-group { border-top: 1px solid var(--line, #e2ddd0); padding: 4px 0 16px; }
.sv-group + .sv-group { margin-top: 4px; }
.sv-group .sv-list { margin-bottom: 4px; }
.sv-group > summary { list-style: none; display: flex; align-items: center; gap: 10px; min-height: 48px; cursor: pointer; font-size: 18px; font-weight: 700; color: var(--navy); }
.sv-group > summary::-webkit-details-marker { display: none; }
.sv-group > summary::before { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--navy); border-bottom: 2px solid var(--navy); transform: rotate(-45deg); transition: transform .15s; margin-right: 4px; }
.sv-group[open] > summary::before { transform: rotate(45deg); }
.sv-gn { font-size: 13px; font-weight: 600; color: var(--slate); background: var(--mist); border-radius: 999px; padding: 2px 10px; }

/* List rows (B) */
.sv-list { display: flex; flex-direction: column; border: 1px solid var(--brass); border-radius: 12px; background: #fff; overflow: hidden; }
.sv-row { display: grid; grid-template-columns: 120px minmax(0, 1.1fr) minmax(0, 0.8fr) minmax(72px, 92px) max-content; grid-template-areas: "th main sp price act"; gap: 4px 16px; align-items: center; padding: 12px 16px 12px 12px; }
.sv-row + .sv-row { border-top: 1px solid #ece6d8; }
.sv-th { grid-area: th; width: 120px; height: auto; aspect-ratio: 4 / 3; border-radius: 8px; object-fit: cover; object-position: center; display: block; background: var(--mist); }
.sv-main { grid-area: main; min-width: 0; }
.sv-main h3 { margin: 0; font-size: 16px; line-height: 22px; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
.sv-main h3 a { color: var(--navy); text-decoration: none; }
.sv-main h3 a:hover { text-decoration: underline; }
.sv-reg { font-size: 13px; line-height: 18px; color: var(--slate); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; }
.sv-lic { display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; font-size: 12px; font-weight: 600; color: var(--slate); }
.sv-lic.is-ver { color: var(--verified-text); }
.sv-sp { grid-area: sp; font-size: 13px; color: var(--ink); line-height: 18px; }
.sv-price { grid-area: price; font-size: 13px; color: var(--slate); line-height: 18px; }
.sv-price b { display: block; font-size: 15px; color: var(--ink); }
.sv-act { grid-area: act; display: flex; align-items: center; gap: 6px; justify-content: flex-start; flex-wrap: nowrap; min-width: 0; max-width: 100%; }
.sv-act-links, .sv-act-tail { display: flex; align-items: center; gap: 6px; flex-wrap: nowrap; min-width: 0; }
.sv-act-tail { flex: none; }
.sv-act .compare-toggle { margin-left: 0; }
.sv-page .guide-card .name-row { align-items: flex-start; }
.sv-page .guide-card .z-name { flex: 1 1 auto; min-width: 0; white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
.sv-a { min-height: 36px; display: inline-flex; align-items: center; padding: 0 12px; border: 1px solid #c9d6dd; border-radius: 8px; font-size: 13px; font-weight: 700; color: var(--navy); text-decoration: none; white-space: nowrap; background: #fff; }
.sv-a:hover { background: var(--mist); }
.sv-a.is-inq { background: var(--navy); border-color: var(--navy); color: #fff; }
.sv-a.is-fb { background: var(--sg-fb-blue, #0071c7); border-color: var(--sg-fb-blue, #0071c7); color: var(--sg-fb-text, #fff); }
.sv-a.is-fb:hover { background: var(--sg-fb-blue-hover, #005a9f); border-color: var(--sg-fb-blue-hover, #005a9f); }
.sv-row .compare-toggle { font-size: 13px; white-space: nowrap; }
.sv-row .save-heart { position: static; }

/* Empty and no-match states */
.sv-empty { text-align: center; padding: 40px 24px; background: #fff; border: 1px dashed var(--brass); border-radius: 12px; }
.sv-empty-ic { width: 56px; height: 56px; margin: 0 auto 12px; border-radius: 50%; background: #fbf1ef; color: #b2453a; display: flex; align-items: center; justify-content: center; }
.sv-empty h2 { margin: 0 0 8px; color: var(--navy); }
.sv-empty p { margin: 0 auto 16px; max-width: 520px; color: var(--slate); }
.sv-empty .sv-fish { margin: 20px 0 0; }
.sv-empty .sv-fish b { display: block; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--slate); margin-bottom: 8px; }
.sv-none { padding: 28px 24px; text-align: center; background: var(--paper); border: 1px solid #e3d6bb; border-radius: 12px; }
.sv-none h2 { margin: 0 0 6px; font-size: 18px; color: var(--navy); }
.sv-none p { margin: 0 0 14px; color: var(--slate); }

/* Toast (shared). Lives in the footer so the live region exists before it speaks. */
.sg-toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 16px); z-index: 60; display: flex; align-items: center; gap: 16px; max-width: min(560px, calc(100vw - 40px)); box-sizing: border-box; background: var(--navy); color: #fff; border-radius: 10px; padding: 12px 12px 12px 18px; box-shadow: 0 8px 24px rgba(20, 38, 61, .28); font-size: 14px; line-height: 20px; opacity: 0; pointer-events: none; transition: opacity .18s, transform .18s; }
.sg-toast.is-on { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.sg-toast:empty { display: none; }
.sg-toast a { color: var(--brass-light); font-weight: 700; }
.sg-toast-act { min-height: 36px; border: 1px solid var(--brass-light); background: none; color: var(--brass-light); border-radius: 8px; padding: 0 14px; font: inherit; font-weight: 700; cursor: pointer; }
body.sv-on #compare-tray { display: none !important; }

@media (max-width: 1279px) {
  .sv-row { grid-template-columns: 120px minmax(0, 1fr) minmax(0, 1fr) auto; grid-template-areas: "th main sp price" "act act act act"; }
  .sv-act { flex-wrap: wrap; row-gap: 8px; }
  .sv-act-links, .sv-act-tail { flex: 1 1 100%; }
}
@media (max-width: 980px) {
  .sv-row { grid-template-columns: 96px minmax(0, 1fr) auto; grid-template-areas: "th main price" "sp sp sp" "act act act"; padding: 12px; }
  .sv-th { width: 96px; }
  .sv-price { text-align: right; }
  .sv-act { justify-content: flex-start; flex-wrap: wrap; }
  .sv-row .compare-toggle { margin-left: 0; }
}
@media (max-width: 720px) {
  .sv-sync { grid-template-columns: 1fr; padding: 16px 16px 14px; }
  .sv-sync-ic { display: none; }
  .sv-sync h2 { padding-right: 28px; }
  .sv-sync ul, .sv-sync-act { grid-column: 1; grid-row: auto; }
  .sv-sync ul { flex-direction: column; gap: 4px; }
  .sv-sync-act { align-items: stretch; margin-top: 8px; }
  .sv-sync-act .btn { justify-content: center; }
  .sv-sync-act small { text-align: center; }
  .sv-sync.is-small { grid-template-columns: minmax(0, 1fr) auto; }
  .sv-sync.is-small .sv-sync-act { margin-top: 0; }
  .sv-row1 { align-items: stretch; flex-direction: column; }
  .sv-controls { display: grid; grid-template-columns: minmax(0, 1fr); }
  .sv-controls select { width: 100%; }
  .sv-tools .seg { display: flex; width: 100%; box-sizing: border-box; }
  .sv-tools .seg button { flex: 1; justify-content: center; }
  #sv-group-wrap { grid-column: 1 / -1; }
  #sv-group-wrap select { width: 100%; }
  .sv-tools .seg button { padding: 0 10px; }
  .sv-filters { display: grid; grid-template-columns: 1fr 1fr; }
  .sv-f { max-width: none; }
  .sv-chip { justify-self: start; }
  .sv-cmp { grid-column: 1 / -1; margin-left: 0; }
  .sv-cmp .btn { flex: none; }
  .sg-toast { bottom: 16px; width: calc(100vw - 40px); justify-content: space-between; }
}
.sv-page [hidden], .sg-toast[hidden] { display: none !important; }
.sv-if-none { display: none; }
#sv-root[data-count="0"] .sv-if-none { display: inline; }
#sv-root[data-count="0"] .sv-if-some { display: none; }
