/* Salevation components. Values come from the inline styles in design/*.dc.html. */

/* ---------- buttons ---------- */
.sv-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 18px; border: var(--border); border-radius: var(--radius-md);
  font: inherit; font-size: 15px; font-weight: 700; color: var(--ink); text-decoration: none;
  background: var(--surface); cursor: pointer; white-space: nowrap;
  transition: transform 0.08s ease, box-shadow 0.08s ease, background 0.15s;
}
.sv-btn:hover { color: var(--ink); }
.sv-btn:disabled, .sv-btn[aria-disabled='true'] { opacity: 0.55; cursor: not-allowed; }
.sv-btn .icon { width: 20px; height: 20px; flex: none; }
.sv-btn--sm { min-height: 44px; padding: 0 14px; font-size: 14px; border-radius: var(--radius-sm); }
.sv-btn--lg {
  min-height: 60px; padding: 0 22px; border-radius: 18px;
  font-family: var(--font-display); font-weight: 800; font-size: 20px; letter-spacing: -0.01em;
}
.sv-btn--lg .icon { width: 22px; height: 22px; }
.sv-btn--accent { background: var(--accent); box-shadow: var(--shadow-md); }
.sv-btn--accent:hover { background: #FF6A49; }
.sv-btn--accent:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }
.sv-btn--ink { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.sv-btn--ink:hover { background: var(--ink-raised); color: var(--bg); }
.sv-btn--pop { background: var(--pop); }
.sv-btn--outline:hover { background: var(--bg); }
.sv-btn--ghost { border-color: transparent; background: transparent; }
.sv-btn--ghost:hover { background: rgba(26, 21, 48, 0.06); }
.sv-btn--block { width: 100%; }

.sv-iconbtn {
  position: relative; flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; padding: 0; border: var(--border); border-radius: var(--radius-md);
  background: var(--surface); color: var(--ink); cursor: pointer; text-decoration: none;
}
.sv-iconbtn:hover { background: var(--bg); color: var(--ink); }
.sv-iconbtn.has-shadow { box-shadow: var(--shadow-sm); }
.sv-iconbtn--ink { background: var(--ink); color: var(--bg); }
.sv-iconbtn--onink { background: transparent; color: var(--bg); border-color: var(--bg); }
.sv-iconbtn--onink:hover { background: var(--ink-raised); color: var(--bg); }
.sv-iconbtn--sm { width: 44px; height: 44px; border-radius: 12px; }
.sv-count {
  position: absolute; top: -8px; right: -8px; min-width: 22px; height: 22px; padding: 0 5px;
  border: var(--border); border-radius: 11px; background: var(--accent); color: var(--ink);
  font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center;
}

/* ---------- badges, stickers, dots ---------- */
.sv-badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px; border: var(--border);
  border-radius: var(--radius-pill); font-size: 13px; font-weight: 700; line-height: 1.4; white-space: nowrap; color: var(--ink);
}
.sv-badge--pop { background: var(--pop); }
.sv-badge--ink { background: var(--ink); color: var(--bg); border-color: var(--ink); font-size: 12px; padding: 4px 10px; }
.sv-badge--outline { background: var(--surface); }
.sv-badge--accent { background: var(--accent); }
.sv-badge--tint { background: var(--tint); font-weight: 600; }
.sv-badge--tag { border-radius: 6px; padding: 0 6px; font-size: 11px; font-weight: 800; background: var(--pop); }

.sv-sticker {
  position: absolute; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center;
  border: var(--border); border-radius: 50%; background: var(--accent); color: var(--ink);
  transform: rotate(-12deg); line-height: 1; pointer-events: none;
}
.sv-sticker-main { font-family: var(--font-display); font-weight: 800; letter-spacing: -0.02em; }
.sv-sticker-sub { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.sv-sticker--sm { width: 58px; height: 58px; top: -12px; right: -8px; }
.sv-sticker--sm .sv-sticker-main { font-size: 17px; }
.sv-sticker--md { width: 66px; height: 66px; top: -14px; right: -10px; }
.sv-sticker--md .sv-sticker-main { font-size: 19px; }
.sv-sticker--lg { width: 88px; height: 88px; right: 22px; bottom: -36px; box-shadow: var(--shadow-sm); }
.sv-sticker--lg .sv-sticker-main { font-size: 26px; }

.sv-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); border: var(--border); }
.sv-dot--inline { flex: none; margin-top: 4px; }

/* ---------- cards ---------- */
.sv-card {
  position: relative; display: block; padding: 14px; border: var(--border); border-radius: var(--radius-lg);
  background: var(--surface); color: var(--ink); text-decoration: none;
}
a.sv-card:hover { color: var(--ink); }
.sv-card.is-highlight { box-shadow: var(--shadow-md); }
a.sv-card.is-highlight:hover { transform: translate(-1px, -1px); box-shadow: var(--shadow-lg); }
.sv-card--dark { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.sv-card--dashed { border-style: dashed; background: transparent; }

/* ---------- product image ---------- */
.sv-img {
  position: relative; flex: none; display: inline-flex; align-items: center; justify-content: center; overflow: hidden;
  border: var(--border); border-radius: 14px; background: var(--tint, var(--tint-blue)); color: var(--ink);
}
.sv-img > .icon { width: 40%; height: 40%; max-width: 56px; max-height: 56px; }
.sv-img-src { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #fff; padding: 4px; }
.sv-img--xs { width: 40px; height: 40px; border-radius: 10px; }
.sv-img--sm { width: 52px; height: 52px; border-radius: 12px; }
.sv-img--md { width: 76px; height: 76px; }
.sv-img--lg { width: 96px; height: 96px; border-radius: 16px; }
.sv-img--hero { width: 100%; height: 300px; border: 0; border-bottom: var(--border); border-radius: 0; }
.sv-img--hero .sv-img-src { padding: 24px; }
.sv-img--card { width: 100%; height: 150px; border: 0; border-bottom: var(--border); border-radius: 20px 20px 0 0; }
.sv-img--card .sv-img-src { padding: 12px; }

/* ---------- chips & segmented ---------- */
.sv-chips { display: flex; gap: 8px; overflow-x: auto; margin: 0 -20px; padding: 0 20px 4px; scrollbar-width: none; }
.sv-chips::-webkit-scrollbar { display: none; }
.sv-chips.is-wrapping { flex-wrap: wrap; overflow: visible; margin: 0; padding: 0; }
.sv-chip {
  flex: none; display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 16px;
  border: var(--border); border-radius: var(--radius-pill); background: var(--surface); color: var(--ink);
  font: inherit; font-size: 14px; font-weight: 700; text-decoration: none; cursor: pointer; white-space: nowrap;
}
.sv-chip:hover { color: var(--ink); background: var(--bg); }
.sv-chip.is-pressed, .sv-chip[aria-current='page'] { background: var(--ink); color: var(--bg); }
.sv-chip.has-tint.is-pressed { background: var(--tint); color: var(--ink); font-weight: 800; }
.sv-chip.is-dashed { border-style: dashed; background: transparent; font-weight: 600; }
.sv-chip-count { font-weight: 700; }
.sv-chip .icon { width: 16px; height: 16px; }

.sv-seg {
  display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr));
  border: var(--border); border-radius: var(--radius-md); overflow: hidden; background: var(--surface);
}
.sv-seg-opt { position: relative; display: block; cursor: pointer; }
.sv-seg-opt + .sv-seg-opt { border-left: var(--border); }
.sv-seg-opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.sv-seg-opt span { display: flex; align-items: center; justify-content: center; height: 48px; padding: 0 6px; font-size: 14px; font-weight: 600; text-align: center; }
.sv-seg-opt input:checked + span { background: var(--accent); font-weight: 800; }
.sv-seg-opt input:focus-visible + span { outline: 3px solid var(--ink); outline-offset: -5px; }
/* compact variant (chart range) */
.sv-seg--sm { display: inline-flex; gap: 4px; padding: 3px; border-radius: var(--radius-sm); }
.sv-seg--sm .sv-seg-opt + .sv-seg-opt { border-left: 0; }
.sv-seg--sm .sv-seg-opt span { height: 32px; min-width: 44px; padding: 0 10px; border-radius: 8px; font-size: 13px; }
.sv-seg--sm .sv-seg-opt input:checked + span { background: var(--ink); color: var(--bg); font-weight: 700; }

/* ---------- toggle ---------- */
.sv-toggle {
  appearance: none; -webkit-appearance: none; flex: none; position: relative; width: 52px; height: 30px; margin: 0; padding: 0;
  border: var(--border); border-radius: 15px; background: var(--bg); cursor: pointer;
}
.sv-toggle::after {
  content: ''; position: absolute; top: 2px; left: 2px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--ink); transition: transform 0.15s ease;
}
.sv-toggle:checked { background: var(--pop); }
.sv-toggle:checked::after { transform: translateX(22px); }
.sv-toggle-row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 56px; padding: 8px 16px; font-size: 15px; font-weight: 600; cursor: pointer;
}
.sv-toggle-row + .sv-toggle-row { border-top: var(--border); }
.sv-toggle-label { display: block; }
.sv-toggle-hint { display: block; font-size: 13px; font-weight: 500; color: var(--ink-muted); }
.sv-toggle-group { border: var(--border); border-radius: var(--radius-lg); background: var(--surface); }

/* ---------- distance-to-target bar ---------- */
.sv-progress { display: flex; align-items: center; gap: 10px; }
.sv-progress-track { flex: 1; height: 10px; border-radius: 5px; border: var(--border); background: var(--bg); overflow: hidden; box-sizing: content-box; }
.sv-progress-fill { height: 100%; background: var(--ink); }
.sv-progress.is-done .sv-progress-fill { background: var(--pop); }
.sv-progress-label { font-size: 13px; font-weight: 700; white-space: nowrap; }

/* ---------- headings, stats, empty ---------- */
.sv-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.sv-section-head a, .sv-link { color: var(--ink); font-size: 14px; font-weight: 600; }
.sv-link-btn { background: none; border: 0; padding: 0; min-height: 44px; font: inherit; font-size: 14px; font-weight: 600; color: var(--ink); text-decoration: underline; cursor: pointer; }
.sv-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.sv-stat { display: flex; flex-direction: column; gap: 2px; }
.sv-stat-k { font-size: 12px; color: var(--ink-muted); }
.sv-stat-v { font-size: 17px; font-weight: 700; }
.sv-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 32px 20px; text-align: center; border: 2px dashed var(--ink); border-radius: var(--radius-lg); }
.sv-empty h3 { margin: 0; font-size: 20px; }
.sv-empty p { margin: 0 0 8px; color: var(--ink-muted); font-size: 15px; max-width: 360px; }
.sv-empty-icon { width: 52px; height: 52px; display: flex; align-items: center; justify-content: center; border: var(--border); border-radius: var(--radius-md); background: var(--surface); }

/* ---------- price chart ---------- */
.sv-chart { position: relative; margin: 0; }
.sv-chart svg { display: block; overflow: visible; touch-action: pan-y; }
.sv-chart-target { position: absolute; left: 0; font-size: 12px; font-weight: 700; background: var(--surface); padding-right: 6px; }
.sv-chart-tip {
  position: absolute; z-index: 3; transform: translate(-50%, calc(-100% - 14px)); pointer-events: none; white-space: nowrap;
  padding: 6px 10px; border-radius: 10px; background: var(--ink); color: var(--bg); font-size: 13px; line-height: 1.35;
}
.sv-chart-tip span { color: var(--ink-soft); font-size: 12px; }
.sv-chart-empty { padding: 36px 8px; text-align: center; color: var(--ink-muted); font-size: 14px; }

/* ---------- folder tile ---------- */
.sv-folder {
  position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 18px;
  height: 168px; margin-top: 12px; padding: 16px; border: var(--border); border-radius: 4px 20px 20px 20px;
  background: var(--tint); box-shadow: var(--shadow-md); color: var(--ink); text-decoration: none;
}
.sv-folder:hover { color: var(--ink); transform: translate(-1px, -1px); box-shadow: var(--shadow-lg); }
.sv-folder-tab { position: absolute; left: -2px; top: -14px; width: 64px; height: 14px; border: var(--border); border-bottom: 0; border-radius: 10px 10px 0 0; background: var(--tint); }
.sv-folder-text { display: flex; flex-direction: column; gap: 4px; }
.sv-folder-name { font-family: var(--font-display); font-weight: 800; font-size: 22px; line-height: 1.05; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.sv-folder-count { font-size: 14px; font-weight: 600; }
.sv-folder-empty { font-size: 12px; font-weight: 600; }

/* ---------- alert cards ---------- */
.sv-alert {
  display: flex; gap: 14px; align-items: flex-start; padding: 16px; border: var(--border); border-radius: var(--radius-lg);
  background: var(--surface); color: var(--ink); text-decoration: none;
}
.sv-alert:hover { color: var(--ink); background: #FFFDF8; }
.sv-alert-icon { width: 44px; height: 44px; flex: none; display: flex; align-items: center; justify-content: center; border: var(--border); border-radius: 14px; }
.sv-alert-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.sv-alert-meta { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-muted); }
.sv-alert-meta .sv-alert-time, .sv-alert-time { text-transform: none; letter-spacing: 0; font-weight: 500; white-space: nowrap; }
.sv-alert-title { font-size: 16px; font-weight: 600; line-height: 1.3; }
.sv-alert-sub { font-size: 14px; color: var(--ink-muted); }
.sv-alert.is-featured { flex-direction: column; gap: 14px; background: var(--accent); box-shadow: var(--shadow-md); }
.sv-alert.is-featured:hover { background: #FF6A49; }
.sv-alert-top { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.sv-alert-kind { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; }
.sv-alert.is-featured .sv-alert-time { font-size: 13px; font-weight: 600; }
.sv-alert-headline { font-family: var(--font-display); font-weight: 800; font-size: 24px; line-height: 1.1; letter-spacing: -0.02em; }
.sv-alert-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; font-size: 14px; font-weight: 500; }
.sv-alert-cta { flex: none; height: 40px; padding: 0 14px; border-radius: 12px; background: var(--ink); color: var(--bg); font-weight: 700; display: flex; align-items: center; }

/* ---------- app chrome ---------- */
.sv-topbar { display: flex; align-items: center; justify-content: space-between; }
.sv-topbar .brand { min-height: 44px; }

.sv-bottomnav {
  position: fixed; z-index: 40; left: 16px; right: 16px; bottom: calc(20px + env(safe-area-inset-bottom));
  max-width: 520px; margin: 0 auto; height: 68px; padding: 0 8px; border-radius: 26px; background: var(--ink);
  display: flex; align-items: center; justify-content: space-around;
}
.sv-bottomnav-item {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  min-width: 52px; min-height: 52px; font-size: 11px; font-weight: 600; color: var(--bg); text-decoration: none;
}
.sv-bottomnav-item:hover { color: var(--pop); }
.sv-bottomnav-item[aria-current='page'] { color: var(--pop); }
.sv-bottomnav-item .sv-dot { position: absolute; top: 4px; right: 12px; width: 10px; height: 10px; border-color: var(--ink); }
.sv-bottomnav-add {
  width: 58px; height: 58px; margin-top: -30px; border: var(--border); border-radius: 20px; background: var(--accent);
  box-shadow: var(--shadow-sm); display: flex; align-items: center; justify-content: center; color: var(--ink);
}
.sv-bottomnav-add:hover { color: var(--ink); background: #FF6A49; }

.sv-actionbar {
  position: fixed; z-index: 35; left: 0; right: 0; bottom: 0; padding: 16px 20px calc(28px + env(safe-area-inset-bottom));
  background: var(--bg); border-top: var(--border);
}
.sv-actionbar-inner { max-width: 720px; margin: 0 auto; display: flex; gap: 10px; }
.sv-actionbar-inner > .sv-btn--lg { flex: 1; }
.sv-actionbar .sv-iconbtn { width: 60px; height: 60px; border-radius: 18px; }

.sv-sidebar {
  display: flex; flex-direction: column; gap: 28px; padding: 28px 20px; background: var(--ink); color: var(--bg);
}
.sv-sidebar .brand { color: var(--bg); padding: 0 8px; }
.wordmark--side { font-size: 30px; letter-spacing: -0.035em; }
.sv-side-nav { display: flex; flex-direction: column; gap: 4px; }
.sv-side-item {
  display: flex; align-items: center; gap: 12px; height: 46px; padding: 0 12px; border-radius: 14px;
  color: var(--bg); font-weight: 600; font-size: 15px; text-decoration: none;
}
.sv-side-item:hover { background: var(--ink-raised); color: var(--bg); }
.sv-side-item.is-active { background: var(--pop); color: var(--ink); font-weight: 700; }
.sv-side-count { margin-left: auto; font-size: 13px; color: inherit; opacity: 0.85; }
.sv-side-badge { margin-left: auto; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 11px; background: var(--accent); color: var(--ink); font-size: 12px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.sv-side-folders { display: flex; flex-direction: column; gap: 6px; }
.sv-side-folders-head { display: flex; align-items: center; justify-content: space-between; padding: 0 12px; }
.sv-side-folders-head h2 { margin: 0; font-family: var(--font-body); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-soft); }
.sv-side-folder { display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 12px; border-radius: 12px; color: var(--bg); font-size: 15px; font-weight: 500; text-decoration: none; }
.sv-side-folder:hover, .sv-side-folder.is-active { background: var(--ink-raised); color: var(--bg); }
.sv-side-folder .sv-side-count { color: var(--ink-soft); }
.sv-swatch { width: 14px; height: 14px; flex: none; border-radius: 4px; }

/* ---------- forms in the new style ---------- */
.sv-field { display: flex; flex-direction: column; gap: 8px; }
.sv-field > label, .sv-field-label { font-size: 14px; font-weight: 700; }
.sv-input {
  display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 16px; border: var(--border);
  border-radius: var(--radius-md); background: var(--surface); color: var(--ink-muted);
}
.sv-input.has-shadow { box-shadow: var(--shadow-sm); }
.sv-input input, .sv-input select {
  flex: 1; min-width: 0; width: auto; border: 0; outline: none; padding: 0; background: transparent; box-shadow: none;
  font: inherit; font-size: 16px; color: var(--ink);
}
.sv-input:focus-within { outline: 3px solid var(--accent); outline-offset: 2px; }
.sv-input .icon { width: 20px; height: 20px; flex: none; }

/* Keep older global input styles from leaking into the new controls */
.sv-toggle:focus { border-color: var(--ink); box-shadow: none; }
.sv-toggle:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ---------- styleguide page (#/styleguide) ---------- */
.sg { display: flex; flex-direction: column; gap: 36px; padding: 24px 0 64px; }
.sg-head { display: flex; flex-direction: column; gap: 10px; }
.sg-note { margin: 0; color: var(--ink-muted); font-size: 14px; max-width: 640px; }
.sg-example { display: inline-block; padding: 0 6px; border: 2px dashed var(--ink-muted); border-radius: 6px; font-size: 12px; font-weight: 700; color: var(--ink-muted); }
.sg-section { display: flex; flex-direction: column; gap: 12px; }
.sg-body { display: flex; flex-direction: column; gap: 16px; }
.sg-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.sg-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 20px; }
.sg-swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.sg-swatch { display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.sg-swatch span { height: 56px; border: var(--border); border-radius: var(--radius-sm); margin-bottom: 4px; }
.sg-swatch small { color: var(--ink-muted); }
.sg-dark { display: inline-flex; padding: 8px; border-radius: 14px; background: var(--ink); }
.sg-stickers { gap: 40px; padding: 24px 8px 48px; }
.sg-sticker-host { position: relative; display: block; width: 120px; height: 70px; border: var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.sg-sticker-host--lg { width: 200px; height: 90px; }
.sg-folders { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; max-width: 560px; }
.sg-static { display: grid; align-items: start; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr)); }
.sg-phone { position: relative; padding: 16px 20px; border: 2px dashed var(--ink-muted); border-radius: var(--radius-lg); }
.sg-phone--nav { padding-top: 40px; }
.sg-static .sv-bottomnav, .sg-static .sv-actionbar { position: relative; left: auto; right: auto; bottom: auto; }
.sg-static .sv-actionbar { margin: -16px -20px; border-radius: 0 0 18px 18px; }
.sg-side { border-radius: var(--radius-lg); overflow: hidden; max-width: 280px; }

/* ===================== App shell ===================== */
/* Phones/tablets: the floating bottom nav replaces the old top header. Desktop keeps the header until the
   sidebar layout lands (step h). */
#bottomnav:empty { display: none; }
@media (max-width: 1023px) {
  .topbar { display: none; }
  body { padding-bottom: calc(120px + env(safe-area-inset-bottom)); }
  main.wrap { padding: 0 20px; }
}
@media (min-width: 1024px) {
  #bottomnav { display: none; }
  .basket-topbar { display: none; }
}

/* ===================== Basket (Main.dc.html) ===================== */
.basket { display: flex; flex-direction: column; gap: 20px; padding: 20px 0 32px; max-width: 760px; }
.basket-title { display: flex; flex-direction: column; gap: 6px; }
.basket-meta { display: flex; flex-direction: column; gap: 2px; font-size: 15px; color: var(--ink-muted); }
.basket-meta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.basket-meta-checked { font-size: 13px; }
.basket-meta-wide { display: none; }
@media (min-width: 1024px) {
  .basket-meta { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
  .basket-meta-wide { display: inline; }
  .basket-meta-checked { font-size: 15px; }
}
.basket-refresh { display: inline-flex; align-items: center; gap: 4px; min-height: 32px; color: var(--ink-muted); }
.basket-refresh .icon { width: 16px; height: 16px; }
.basket-search { color: var(--ink-muted); }
.basket-folder-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin-top: 6px; font-size: 14px; font-weight: 600; }
.basket-folder-actions > span { display: inline-flex; align-items: center; gap: 6px; }
.basket-lists { display: flex; flex-direction: column; gap: 24px; }
.basket-section { display: flex; flex-direction: column; gap: 12px; }
.basket-drops, .basket-watching { display: flex; flex-direction: column; gap: 12px; }

.basket-drop { display: flex; gap: 14px; align-items: center; padding: 14px; padding-right: 56px; }
.basket-drop-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.basket-drop-name { font-size: 16px; font-weight: 600; line-height: 1.25; }
.basket-drop-price { display: flex; align-items: baseline; gap: 8px; }
.basket-drop-price .t-price { font-size: 24px; }
.basket-drop-price s { font-size: 14px; color: var(--ink-muted); }

.basket-watch { display: flex; flex-direction: column; gap: 12px; padding: 14px; }
.basket-watch:hover { background: #FFFDF8; }
.basket-watch-top { display: flex; gap: 14px; align-items: center; }
.basket-watch-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.basket-watch-name { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.basket-watch-sub { display: flex; align-items: center; gap: 4px; font-size: 13px; color: var(--ink-muted); }
.basket-watch-price { font-size: 20px; flex: none; }

.basket-sale { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px; }
.basket-sale-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: -4px -6px -2px 0; }
.basket-sale-kicker { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--pop); }
.basket-sale-name { font-family: var(--font-display); font-weight: 800; font-size: 22px; line-height: 1.1; letter-spacing: -0.02em; }
.basket-sale-when { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-soft); }
.basket-sale-est { font-size: 12px; border: 2px dashed var(--ink-soft); border-radius: var(--radius-pill); padding: 0 8px; }
.basket-sale p { margin: 0; font-size: 14px; line-height: 1.45; color: var(--ink-soft); }
.basket-sale .basket-sale-more { font-size: 13px; }

/* ===================== Track an item (Mobile-Add.dc.html) ===================== */
.add { display: flex; flex-direction: column; gap: 22px; padding: 20px 0 140px; max-width: 640px; }
.add-kicker { font-size: 13px; letter-spacing: 0.08em; }
.add-spacer { width: 48px; flex: none; }
.add-title { font-size: 40px; }
.add-input { min-height: 56px; padding: 0 8px 0 16px; }
.add-input .sv-btn { min-height: 40px; height: 40px; border-radius: 12px; padding: 0 14px; border: 0; }
.add-help { margin: 0; font-size: 13px; color: var(--ink-muted); line-height: 1.45; }
.add-error {
  margin: 0; padding: 10px 14px; border: var(--border); border-radius: var(--radius-sm); background: #FFE1D8;
  font-size: 14px; font-weight: 600; line-height: 1.45;
}
.add-error .sv-link-btn { min-height: 0; font-weight: 700; }
.add-try { display: flex; flex-direction: column; gap: 10px; }

.add-product { display: flex; gap: 14px; align-items: center; }
.add-product .sv-img--md { width: 72px; height: 72px; }
.add-product-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.add-found { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; }
.add-found-check { width: 18px; height: 18px; flex: none; border-radius: 50%; border: var(--border); background: var(--pop); display: flex; align-items: center; justify-content: center; }
.add-found-check .icon { width: 10px; height: 10px; }
.add-product-name { font-size: 16px; font-weight: 600; line-height: 1.3; }
.add-product-price .t-price { font-size: 22px; }
.add-product-price > span:last-child { font-size: 13px; font-weight: 500; color: var(--ink-muted); }

.add-group { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; border: 0; min-width: 0; }
.add-group legend { padding: 0; margin-bottom: 10px; }

.add-panel { display: flex; flex-direction: column; gap: 12px; padding: 18px; border: var(--border); border-radius: var(--radius-lg); background: var(--ink); color: var(--bg); }
.add-panel-label { font-size: 14px; font-weight: 600; }
.add-panel-row { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; }
.add-big { display: inline-flex; align-items: baseline; font-family: var(--font-display); font-weight: 800; font-size: 56px; line-height: 1; letter-spacing: -0.03em; color: var(--pop); }
.add-big input {
  width: 4.2ch; min-width: 2ch; padding: 0; margin: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none;
  font: inherit; letter-spacing: inherit; color: inherit;
}
.add-big input:focus { outline: none; box-shadow: none; border-bottom: 3px dashed var(--pop); }
.add-big-affix { user-select: none; }
.add-under { font-size: 14px; color: var(--ink-soft); }
.add-range {
  --fill: 70%;
  appearance: none; -webkit-appearance: none; width: 100%; height: 10px; margin: 8px 0; padding: 0; border: 0; border-radius: 5px; box-shadow: none;
  background: linear-gradient(to right, var(--pop) var(--fill), var(--ink-raised) var(--fill)); cursor: pointer;
}
.add-range:focus { box-shadow: none; }
.add-range:focus-visible { outline: 3px solid var(--accent); outline-offset: 6px; }
.add-range::-webkit-slider-thumb { appearance: none; -webkit-appearance: none; width: 26px; height: 26px; border-radius: 50%; background: var(--bg); border: 3px solid var(--pop); }
.add-range::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: var(--bg); border: 3px solid var(--pop); }
.add-presets { display: flex; gap: 8px; }
.add-preset {
  flex: 1; height: 44px; border-radius: 12px; border: 2px solid var(--bg); background: transparent; color: var(--bg);
  font: inherit; font-size: 14px; font-weight: 700; cursor: pointer;
}
.add-preset:hover { background: var(--ink-raised); }
.add-preset[aria-pressed='true'] { background: var(--pop); border-color: var(--pop); color: var(--ink); }
.add-note { display: flex; gap: 10px; align-items: flex-start; margin: 0; padding: 16px; border: 2px dashed var(--ink); border-radius: var(--radius-lg); font-size: 14px; line-height: 1.45; }
.add-note .icon { flex: none; margin-top: 1px; }

.add-more { border: var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.add-more summary { display: flex; align-items: center; gap: 8px; min-height: 52px; padding: 0 16px; font-size: 15px; font-weight: 600; cursor: pointer; list-style: none; }
.add-more summary::-webkit-details-marker { display: none; }
.add-more summary::after { content: ''; margin-left: auto; width: 8px; height: 8px; border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: rotate(45deg); transition: transform 0.15s; }
.add-more[open] summary::after { transform: rotate(-135deg); }
.add-more-body { display: flex; flex-direction: column; gap: 14px; padding: 4px 16px 16px; }
.add-more .sv-field > label { font-size: 13px; }

/* ===================== Search results (part of the Track flow) ===================== */
.results { display: flex; flex-direction: column; gap: 18px; padding: 20px 0 32px; max-width: 860px; }
.results-search { min-height: 56px; padding: 0 8px 0 16px; }
.results-search .sv-btn { min-height: 40px; height: 40px; border-radius: 12px; border: 0; }
.results-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.results-head h1 { margin-right: auto; }
.results-cta { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; padding: 14px; }
.results-cta-text { flex: 1 1 200px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.results-cta-title { font-family: var(--font-display); font-weight: 800; font-size: 20px; line-height: 1.15; letter-spacing: -0.02em; }
.results-cta-sub { font-size: 14px; color: var(--ink-muted); }
.results-cta-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.results-list { display: flex; flex-direction: column; gap: 12px; }
.results-skel { height: 150px; border-radius: var(--radius-lg); }
.results-other-head { display: flex; flex-direction: column; gap: 4px; margin-top: 12px; }
.results-other-head p { margin: 0; font-size: 14px; color: var(--ink-muted); }

.result { display: flex; flex-direction: column; gap: 12px; padding: 14px; }
.result.is-dim { background: transparent; border-style: dashed; }
.result-main { display: flex; gap: 14px; align-items: flex-start; }
.result-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.result-title { margin: 0; font-family: var(--font-body); font-size: 16px; font-weight: 600; line-height: 1.3; letter-spacing: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.result-meta { font-size: 13px; color: var(--ink-muted); }
.result-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin-top: 2px; }
.result-price .t-price { font-size: 22px; }
.result-price s { font-size: 14px; color: var(--ink-muted); }
.result-actions { display: flex; flex-wrap: wrap; gap: 8px; }
@media (min-width: 640px) {
  .result { flex-direction: row; align-items: center; }
  .result-main { flex: 1; min-width: 0; align-items: center; }
  .result-actions { flex: none; }
}

/* Filter bar (filters.js) and folder menus in the new style */
.filter-bar { border: var(--border); border-radius: var(--radius-lg); background: var(--surface); box-shadow: none; padding: 14px; }
.filter-bar .fsort { color: var(--ink); font-weight: 700; }
.filter-bar select, .filter-bar .price-range input, .filter-bar .ftext { min-height: 44px; border: var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); font-size: 14px; }
.filter-bar .dropdown > summary.btn { min-height: 44px; border: var(--border); border-radius: var(--radius-pill); background: var(--surface); font-weight: 700; color: var(--ink); }
.filter-bar .ftoggle, .filter-bar .fchip { min-height: 44px; border: var(--border); border-radius: var(--radius-pill); font-weight: 700; color: var(--ink); background: var(--surface); }
.filter-bar .ftoggle:has(input:checked), .filter-bar .fchip.active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.filter-bar .fchip.active .n, .filter-bar .ftoggle:has(input:checked) { color: var(--bg); }
.filter-bar .ftoggle input { accent-color: var(--pop); }
.filter-bar .flabel { color: var(--ink-muted); text-transform: uppercase; letter-spacing: 0.06em; font-size: 12px; }
.filter-bar .btn.ghost { min-height: 44px; color: var(--ink); font-weight: 700; text-decoration: underline; }
.fcount { background: var(--accent); color: var(--ink); }
.result-count { color: var(--ink-muted); font-size: 14px; }
.linkish { color: var(--ink); font-weight: 700; }
.dropdown .menu { border: var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-md); background: var(--surface); padding: 8px; }
.dropdown .menu-item { min-height: 44px; border-radius: 10px; font-size: 15px; }
.dropdown .menu-item.checked { color: var(--ink); background: var(--pop); }
.dropdown .menu-item .check { color: var(--ink); }
.menu-title { color: var(--ink-muted); }
.menu-new input { min-height: 44px; border: var(--border); border-radius: var(--radius-sm); }
.dropdown > summary.sv-btn { list-style: none; }

/* results: spacing + phone layout */
#results { display: flex; flex-direction: column; gap: 16px; }
.atl-short { display: none; }
@media (max-width: 639px) {
  .filter-bar .price-range { flex: 1 1 100%; }
  .filter-bar .price-range input { flex: 1; width: auto; }
  .result-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .result-actions > *, .result-actions .dropdown > summary { width: 100%; }
  .result-actions .sv-btn { padding: 0 8px; }
  .result-actions .atl-long { display: none; }
  .result-actions .atl-short { display: inline; }
}
.filter-bar input, .filter-bar select { min-width: 0; }
.filter-bar .price-range { min-width: 0; }
@media (max-width: 639px) {
  .filter-bar .ftext { flex: 1 1 100%; width: auto; }
}
.dropdown:not([open]) > .menu { display: none; }
.dropdown .menu { max-width: calc(100vw - 40px); }
.filter-bar { grid-template-columns: minmax(0, 1fr); }

/* ===================== Item detail (Mobile-Item.dc.html) ===================== */
.item { display: flex; flex-direction: column; padding-bottom: 140px; max-width: 720px; margin: 0 auto; }
.item--missing { gap: 20px; padding-top: 20px; }
.item-hero { position: relative; margin: 0 -20px; }
.item-hero .sv-img--hero { display: flex; }
.item-hero-bar { position: absolute; top: 20px; left: 20px; right: 20px; display: flex; justify-content: space-between; z-index: 3; }
.item-body { display: flex; flex-direction: column; gap: 18px; padding-top: 22px; }
.item-heading { display: flex; flex-direction: column; gap: 6px; }
.item-heading.has-sticker { padding-right: 90px; }
.item-title { margin: 0; font-size: 30px; line-height: 1.05; letter-spacing: -0.03em; overflow-wrap: anywhere; }
.item-price { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; }
.item-price-now { font-size: 48px; }
.item-price s { font-size: 18px; color: var(--ink-muted); }
.item-price .sv-badge { padding: 4px 10px; }
.item-status { display: flex; flex-wrap: wrap; align-items: center; gap: 0 6px; margin-top: -8px; font-size: 13px; color: var(--ink-muted); }
.item-status .sv-link-btn { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--ink-muted); }
.item-notice { display: flex; gap: 8px; align-items: flex-start; margin: 0; padding: 12px 14px; border: var(--border); border-radius: var(--radius-sm); background: var(--tint-yellow); font-size: 14px; font-weight: 600; }
.item-notice .icon { flex: none; margin-top: 1px; }

.item-history { display: flex; flex-direction: column; gap: 14px; padding: 16px; }
.item-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.item-card-title { margin: 0; font-family: var(--font-body); font-size: 16px; font-weight: 700; letter-spacing: 0; }

.item-stores { padding: 0; display: flex; flex-direction: column; }
.item-stores .item-card-title { padding: 14px 16px 6px; }
.item-store-list { list-style: none; margin: 0; padding: 0; }
.item-store { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 0 16px; color: var(--ink); text-decoration: none; font-size: 15px; }
.item-store:hover { background: var(--bg); color: var(--ink); }
.item-store-list li + li .item-store { border-top: 2px dashed var(--ink-soft); }
.item-store-name { display: flex; align-items: center; gap: 8px; font-weight: 600; min-width: 0; }
.item-store-price { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.item-stores-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 16px; padding: 2px 16px 6px; border-top: 2px dashed var(--ink-soft); }
.item-empty { margin: 0; padding: 4px 16px 14px; font-size: 14px; color: var(--ink-muted); }
.sv-badge--sm { font-size: 11px; padding: 0 6px; }

@media (min-width: 768px) {
  .item { padding-top: 20px; }
  .item-hero { margin: 0; }
  .item-hero .sv-img--hero { border: var(--border); border-radius: var(--radius-lg); }
}

/* ===================== Bottom sheets ===================== */
.sv-sheet {
  width: 100%; max-width: 600px; max-height: 88vh; margin: auto auto 0; padding: 0; overflow: auto;
  border: var(--border); border-bottom: 0; border-radius: 24px 24px 0 0; background: var(--bg); color: var(--ink);
  overscroll-behavior: contain;
}
.sv-sheet::backdrop { background: rgba(26, 21, 48, 0.5); }
.sv-sheet[open] { animation: sheet-up 0.2s ease-out; }
@keyframes sheet-up { from { transform: translateY(24px); opacity: 0; } }
@media (min-width: 640px) {
  .sv-sheet { margin: auto; border-bottom: var(--border); border-radius: 24px; box-shadow: var(--shadow-lg); }
}
.sv-sheet-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px 12px; background: var(--bg); border-bottom: 2px dashed var(--ink-soft); }
.sv-sheet-title { margin: 0; font-size: 24px; }
.sv-sheet-body { display: flex; flex-direction: column; gap: 16px; padding: 16px 20px calc(28px + env(safe-area-inset-bottom)); }
.sheet-form { display: flex; flex-direction: column; gap: 16px; }
.sheet-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 12px; }
@media (max-width: 400px) { .sheet-grid { grid-template-columns: 1fr; } }
.sheet-textarea { width: 100%; padding: 12px 14px; border: var(--border); border-radius: var(--radius-md); background: var(--surface); font: inherit; font-size: 16px; color: var(--ink); resize: vertical; }
.sheet-textarea:focus { outline: 3px solid var(--accent); outline-offset: 2px; border-color: var(--ink); box-shadow: none; }
.sheet-presets { display: flex; flex-wrap: wrap; gap: 8px; }
.sheet-inline { display: flex; gap: 8px; }
.sheet-inline .sv-input { flex: 1; min-width: 0; }
.sheet-list { list-style: none; margin: 0; padding: 0; }
.sheet-list-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; }
.sheet-list-row + .sheet-list-row { border-top: 2px dashed var(--ink-soft); }
.sheet-list-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 15px; }
.sheet-list-text a { color: var(--ink); font-weight: 700; }
.sheet-list-text .add-help { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sheet-list-price { font-weight: 800; white-space: nowrap; }
.sheet-excluded summary { min-height: 44px; display: flex; align-items: center; font-weight: 700; cursor: pointer; }
.sheet-list-row .sv-iconbtn--sm { width: 44px; height: 44px; }

.sv-menu { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.sv-menu-row {
  display: flex; align-items: center; gap: 14px; width: 100%; min-height: 56px; padding: 0 16px;
  border: var(--border); border-radius: var(--radius-md); background: var(--surface); color: var(--ink);
  font: inherit; font-size: 15px; font-weight: 600; text-align: left; cursor: pointer;
}
.sv-menu-row:hover { background: #FFFDF8; }
.sv-menu-chev { margin-left: auto; color: var(--ink-muted); }
.sv-menu-row.is-danger { color: var(--danger); }
.sv-sheet .sv-input select { cursor: pointer; }
/* Big product photos sit on the tint like the mockups: white photo backgrounds take on the tint colour. */
.sv-img--hero .sv-img-src, .sv-img--card .sv-img-src { background: transparent; mix-blend-mode: multiply; }
/* The tag icon is only a placeholder: hide it while a photo is present (it returns if the photo fails and is removed). */
.sv-img:has(> .sv-img-src) > .icon { visibility: hidden; }

/* ===================== Alerts (Mobile-Alerts.dc.html) ===================== */
.alerts, .folders, .settings { display: flex; flex-direction: column; gap: 20px; padding: 28px 0 32px; max-width: 720px; }
.alerts-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.alerts-group { display: flex; flex-direction: column; gap: 12px; }
.alerts-day { margin: 0; font-family: var(--font-body); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-muted); }
.alerts-channels { display: flex; align-items: center; gap: 14px; padding: 16px; border: 2px dashed var(--ink); border-radius: var(--radius-lg); font-size: 14px; line-height: 1.4; }
.alerts-channels .icon { flex: none; }
.alerts-channels span { flex: 1; }
.alerts-channels a { font-weight: 700; min-height: 44px; display: inline-flex; align-items: center; }
.sv-alert .sv-alert-icon .icon { width: 20px; height: 20px; }

/* ===================== Folders (Mobile-Folders.dc.html) ===================== */
.folders-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (min-width: 640px) { .folders-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); } }
.folders-new {
  height: 168px; margin-top: 12px; border: 2px dashed var(--ink); border-radius: var(--radius-lg); background: transparent;
  font: inherit; font-size: 15px; font-weight: 700; color: var(--ink); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; cursor: pointer;
}
.folders-new:hover { background: var(--surface); }
.sv-folder.is-editing { box-shadow: none; }
.sv-folder.is-editing:hover { transform: none; }
.folder-edit-actions { display: flex; gap: 6px; align-items: center; }
.folder-edit-actions .sv-btn { flex: 1; min-width: 0; padding: 0 8px; background: var(--surface); }
.folder-edit-actions .sv-iconbtn { background: var(--surface); }

/* ===================== Settings ("Me") ===================== */
.settings-card { display: flex; flex-direction: column; gap: 16px; padding: 18px; }
.settings-card .add-help { margin-top: 4px; }
.settings-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.settings-usage { margin: 0; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--bg); border: 2px dashed var(--ink-soft); font-size: 14px; color: var(--ink-muted); }
.settings-choices { display: flex; flex-direction: column; gap: 8px; }
.sv-choice { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: var(--border); border-radius: var(--radius-md); background: var(--surface); cursor: pointer; }
.sv-choice:has(input:checked) { background: var(--pop); }
.sv-choice input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; accent-color: var(--ink); }
.sv-choice b { display: block; font-size: 15px; }
.sv-choice span span { font-size: 14px; color: var(--ink-muted); }
.sv-choice:has(input:checked) span span { color: var(--ink); }
.sv-field > label .icon { vertical-align: -3px; margin-right: 2px; }
.sv-field .add-help a { color: var(--ink); font-weight: 600; }
.settings-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.settings-actions .sv-btn--lg { flex: 1 1 220px; }

/* ===================== App shell + desktop dashboard (Desktop-Dashboard.dc.html) ===================== */
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 14px; border: var(--border); border-radius: 12px; background: var(--pop); color: var(--ink); font-weight: 700; }
.skip-link:focus { top: 12px; }
main#app:focus { outline: none; }
.shell-side { display: none; }
.sv-side-empty { margin: 0; padding: 0 12px; font-size: 14px; color: var(--ink-soft); }
.sv-side-region { display: flex; flex-direction: column; gap: 6px; margin-top: auto; padding: 0 12px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-soft); }
.sv-side-region select {
  min-height: 44px; padding: 0 12px; border: 2px solid var(--bg); border-radius: 12px; background: transparent; color: var(--bg);
  font: inherit; font-size: 15px; font-weight: 600; text-transform: none; letter-spacing: 0;
}
.sv-side-region select option { color: var(--ink); }
.sv-side-region select:focus-visible { outline: 3px solid var(--pop); outline-offset: 2px; }
.sv-sidebar .brand { min-height: 44px; }

@media (min-width: 1024px) {
  .shell { display: grid; grid-template-columns: 264px minmax(0, 1fr); min-height: 100vh; }
  .shell-side { display: block; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
  .shell-side .sv-sidebar { min-height: 100%; }
  .shell-main { min-width: 0; }
  main.wrap { max-width: 1180px; margin: 0; padding: 0 clamp(20px, 4vw, 48px); }
  .demo-banner .wrap { max-width: none; padding: 0 clamp(20px, 4vw, 48px); }
  .sv-actionbar { left: 264px; }
}

.basket--desk { max-width: none; gap: 32px; padding: 28px 0 56px; }
.basket-desk-top { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.basket-desk-top .basket-search { flex: 1 1 280px; }
.basket-track { min-height: 52px; padding: 0 22px; font-family: var(--font-display); font-weight: 800; font-size: 18px; }
.basket-desk-title { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.basket-desk-title .basket-title { gap: 10px; }
.basket--desk .basket-section { gap: 16px; }
.basket--desk .t-section { font-size: 26px; }
.basket--desk .basket-meta { flex-direction: row; flex-wrap: wrap; gap: 4px 10px; }

.basket-dgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 20px; }
.basket-dcard { display: flex; flex-direction: column; padding: 0; border-radius: 22px; box-shadow: var(--shadow-lg); }
.basket-dcard:hover { transform: translate(-1px, -1px); box-shadow: 6px 6px 0 var(--ink); }
.basket-dcard .sv-img--card { border-radius: 20px 20px 0 0; }
.basket-dcard-body { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px 18px; }
.basket-dcard-name { font-size: 17px; font-weight: 600; line-height: 1.3; }
.basket-dcard-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; flex-wrap: wrap; }
.basket-dcard .basket-drop-price .t-price { font-size: 30px; }
.basket-dcard .basket-drop-price s { font-size: 15px; }
.basket-dcard .sv-badge { font-size: 12px; padding: 3px 10px; }
.basket-paste {
  min-height: 260px; padding: 24px; border: 2px dashed var(--ink); border-radius: 22px; color: var(--ink); text-decoration: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center;
}
.basket-paste:hover { color: var(--ink); background: var(--surface); }
.basket-paste-title { font-family: var(--font-display); font-weight: 800; font-size: 20px; }
.basket-paste-sub { font-size: 14px; color: var(--ink-muted); }

.basket-table-wrap { position: relative; overflow-x: auto; border: var(--border); border-radius: 22px; background: var(--surface); }
.basket-table { width: 100%; min-width: 760px; border-collapse: collapse; font-size: 15px; }
.basket-table th { padding: 14px 12px; border-bottom: var(--border); text-align: left; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-muted); }
.basket-table th:first-child, .basket-table td:first-child { padding-left: 18px; }
.basket-table th:last-child, .basket-table td:last-child { padding-right: 18px; }
.basket-table td { padding: 12px; vertical-align: middle; }
.basket-table tbody tr + tr { border-top: 2px dashed var(--ink-soft); }
.basket-table .num { text-align: right; }
.basket-col-dist { width: 220px; }
.basket-table-item { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; min-height: 44px; }
.basket-table-item:hover .basket-table-name { text-decoration: underline; }
.basket-table-text { display: flex; flex-direction: column; min-width: 0; }
.basket-table-name { font-weight: 600; }
.basket-table-store { font-size: 13px; color: var(--ink-muted); }
.basket-table-price { font-size: 19px; white-space: nowrap; }
.basket-table-target { font-weight: 600; white-space: nowrap; }
.basket-table-none { font-size: 13px; color: var(--ink-muted); }
.basket-table .sv-badge--tint { font-size: 13px; }

/* ===================== Toasts ===================== */
.toasts { bottom: calc(104px + env(safe-area-inset-bottom)); }
@media (min-width: 1024px) { .toasts { bottom: 24px; } }
.toast { border: var(--border); border-radius: var(--radius-md); background: var(--ink); color: var(--bg); box-shadow: var(--shadow-md); font-size: 15px; }
.toast.deal { background: var(--pop); color: var(--ink); }
.toast.error { background: var(--accent); color: var(--ink); }
.toast a { color: inherit; text-decoration: underline; }
@media (min-width: 1024px) { .toasts { top: 24px; bottom: auto; } }

/* ===================== Home: search-first landing (#/) ===================== */
.home { display: flex; flex-direction: column; gap: 28px; padding: 20px 0 32px; max-width: 760px; }
.home-hero { display: flex; flex-direction: column; gap: 16px; }
.home-title { margin-top: 4px; }
.home-sub { margin: -4px 0 4px; font-size: 16px; line-height: 1.5; color: var(--ink-muted); max-width: 540px; }
.home-input { min-height: 64px; }
.home-input input { font-size: 18px; }
.home-extras { display: flex; flex-direction: column; gap: 24px; }
.home-extras:empty { display: none; }
.home-how { display: flex; flex-direction: column; gap: 12px; }
.home-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.home-step { display: flex; align-items: center; gap: 14px; padding: 16px; }
.home-step-n { font-family: var(--font-display); font-weight: 800; font-size: 28px; width: 22px; flex: none; text-align: center; }
.home-step b { display: block; font-size: 15px; }
.home-step span span { font-size: 14px; color: var(--ink-muted); }
@media (min-width: 640px) { .home-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); } .home-step { flex-direction: column; align-items: flex-start; } }
@media (min-width: 1024px) {
  .home { margin: 0 auto; padding-top: 48px; gap: 36px; }
  .home-top { display: none; }
  .home-title { font-size: 64px; }
}
.settings-usage .icon { vertical-align: -3px; margin-right: 4px; }

/* ===================== Sign in / account ===================== */
body.signed-out .shell { display: block; }
body.signed-out .shell-side, body.signed-out #bottomnav { display: none; }
body.signed-out { padding-bottom: 0; }
body.signed-out main.wrap { max-width: none; margin: 0; padding: 0 20px; }

.auth { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 32px 0 48px; }
.auth-card { width: 100%; max-width: 440px; display: flex; flex-direction: column; gap: 16px; }
.auth-brand { align-self: flex-start; min-height: 44px; margin-bottom: 4px; }
.auth-title { font-size: 40px; }
.auth-sub { margin: -6px 0 4px; font-size: 16px; line-height: 1.5; color: var(--ink-muted); }
.auth-form { display: flex; flex-direction: column; gap: 16px; }
.auth-google { gap: 12px; font-family: var(--font-body); font-weight: 700; font-size: 16px; box-shadow: var(--shadow-sm); }
.auth-or { display: flex; align-items: center; gap: 12px; color: var(--ink-muted); font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; }
.auth-or::before, .auth-or::after { content: ''; flex: 1; border-top: 2px dashed var(--ink-soft); }
.auth-forgot { align-self: flex-start; margin-top: -6px; font-size: 14px; font-weight: 600; color: var(--ink); min-height: 32px; display: inline-flex; align-items: center; }
.auth-switch { margin: 4px 0 0; text-align: center; font-size: 15px; }
.auth-switch a { color: var(--ink); font-weight: 700; }
.auth-foot { max-width: 440px; margin: 0; text-align: center; font-size: 13px; color: var(--ink-muted); }
.auth-eye { flex: none; width: 44px; height: 44px; margin-right: -10px; display: inline-flex; align-items: center; justify-content: center; border: 0; background: none; color: var(--ink-muted); cursor: pointer; border-radius: 12px; }
.auth-eye:hover { color: var(--ink); background: var(--bg); }
.auth-done { display: flex; gap: 12px; align-items: flex-start; padding: 16px; border: var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.auth-done p { margin: 0; font-size: 15px; line-height: 1.5; }
.auth-done .icon { flex: none; margin-top: 2px; }
@media (min-width: 640px) {
  .auth-card { padding: 32px; border: var(--border); border-radius: 24px; background: var(--surface); box-shadow: var(--shadow-lg); }
  .auth-card .sv-input { background: var(--bg); }
}

.verify-banner { background: var(--tint-blue); border-bottom: var(--border); font-size: 14px; }
.verify-banner .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding-top: 8px; padding-bottom: 8px; }
.verify-banner .sv-link-btn { min-height: 32px; font-weight: 700; }
@media (min-width: 1024px) { .verify-banner .wrap { max-width: none; padding-left: clamp(20px, 4vw, 48px); padding-right: clamp(20px, 4vw, 48px); } }

.settings-form { display: flex; flex-direction: column; gap: 20px; }
.account-head { display: flex; align-items: center; gap: 14px; }
.account-avatar { flex: none; width: 52px; height: 52px; display: flex; align-items: center; justify-content: center; border: var(--border); border-radius: 16px; background: var(--pop); font-family: var(--font-display); font-weight: 800; font-size: 24px; color: var(--ink); }
.account-avatar--sm { width: 36px; height: 36px; border-radius: 12px; font-size: 16px; border-color: var(--bg); }
.account-inline { display: flex; align-items: flex-end; gap: 10px; }
.account-inline .sv-field { flex: 1; min-width: 0; }
.account-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.account-email { font-size: 16px; font-weight: 600; overflow-wrap: anywhere; }
.account-method-icon { flex: none; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border: var(--border); border-radius: 12px; background: var(--bg); }
.account-danger { border-style: dashed; }
.account-danger .add-more { border-color: var(--danger); }

.sv-side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 14px; }
.sv-side-foot .sv-side-region { margin-top: 0; }
.sv-side-user { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 6px 12px; border-radius: 14px; color: var(--bg); text-decoration: none; }
.sv-side-user:hover { background: var(--ink-raised); color: var(--bg); }
.sv-side-user > span:last-child { display: flex; flex-direction: column; min-width: 0; font-size: 13px; }
.sv-side-user b { font-size: 14px; }
.sv-side-user > span:last-child span { color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ===================== Affiliate: disclosure, admin ===================== */
.sv-actionbar-note { max-width: 720px; margin: 10px auto 0; font-size: 12px; line-height: 1.45; color: var(--ink-muted); text-align: center; }
.sv-actionbar-note a { color: var(--ink); font-weight: 600; }
.item { padding-bottom: 190px; }
.item-affiliate, .results-affiliate a { color: var(--ink-muted); font-size: 13px; display: inline-flex; align-items: center; min-height: 44px; }
.results-affiliate { margin: 8px 0 0; font-size: 13px; color: var(--ink-muted); }
.results-affiliate a { min-height: 0; color: var(--ink); font-weight: 600; }

.disclosure { display: flex; flex-direction: column; gap: 16px; max-width: 680px; padding: 28px 0 48px; font-size: 16px; line-height: 1.6; }
.disclosure p, .disclosure ul { margin: 0; }
.disclosure li + li { margin-top: 8px; }
.disclosure-quote { padding: 16px 18px; border: var(--border); border-radius: var(--radius-lg); background: var(--pop); font-weight: 600; }
.disclosure .brand { align-self: flex-start; }
body.signed-out .disclosure { margin: 0 auto; }

.admin { display: flex; flex-direction: column; gap: 22px; padding: 28px 0 48px; }
.admin-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 12px; }
.admin-stat { display: flex; flex-direction: column; gap: 4px; }
.admin-stat-v { font-size: 32px; }
.admin-section { display: flex; flex-direction: column; gap: 12px; }
.admin-table { min-width: 720px; }

/* ===================== Phone notifications ===================== */
.push-control { border: var(--border); border-radius: var(--radius-lg); background: var(--surface); padding: 6px 16px; }
.push-row { display: flex; align-items: center; gap: 12px; min-height: 64px; flex-wrap: wrap; }
.push-row .sheet-list-text { flex: 1 1 200px; }
.push-row .add-help .icon { vertical-align: -2px; }
.push-prompt { display: flex; flex-direction: column; gap: 10px; padding: 16px 18px; }
.push-prompt p { margin: 0; font-size: 15px; line-height: 1.45; color: var(--ink-soft); }
.push-prompt p b { color: var(--bg); }
.push-prompt .sv-btn { align-self: flex-start; }
/* iPhone home-screen app: keep clear of the notch and home bar */
@supports (padding: env(safe-area-inset-top)) {
  body { padding-top: env(safe-area-inset-top); }
}

/* ===================== Legal pages (/privacy, /terms) ===================== */
.legal-body { padding-bottom: 0; }
.legal { display: flex; flex-direction: column; gap: 14px; max-width: 720px; padding: 28px 20px 64px; font-size: 16px; line-height: 1.65; }
.legal .brand { align-self: flex-start; min-height: 44px; }
.legal h2 { margin-top: 14px; }
.legal p, .legal ul { margin: 0; }
.legal li + li { margin-top: 8px; }
.legal a { color: var(--ink); font-weight: 600; }
.legal-meta { color: var(--ink-muted); font-size: 14px; }
.legal-foot { margin-top: 24px !important; padding-top: 16px; border-top: 2px dashed var(--ink-soft); font-size: 14px; }
.auth-legal a { color: var(--ink); font-weight: 600; }
.auth-foot a { color: var(--ink-muted); }
.push-row .add-help { display: block; -webkit-line-clamp: unset; overflow: visible; }
.settings .add-help a, .account-danger a { color: var(--ink); font-weight: 600; }

/* ===================== Admin dashboard ===================== */
.sv-btn--danger { background: var(--surface); color: var(--danger); border-color: var(--danger); }
.sv-btn--danger:hover { background: var(--danger-soft); }
.dash-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; }
.dash-head-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.dash-section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; }
.dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 16px; }
.dash-list { margin: 0; display: flex; flex-direction: column; }
.dash-row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.dash-row:last-child { border-bottom: 0; }
.dash-row dt { color: var(--ink-muted); }
.dash-row dd { margin: 0; font-weight: 600; text-align: right; }
.dash-status { display: inline-flex; align-items: center; gap: 4px; }
.dash-status.is-ok { color: var(--good); }
.dash-status.is-warn { color: var(--warn); }
.dash-fail { display: block; font-size: 12px; font-weight: 600; color: var(--danger); }
.dash-usage { min-width: 0; }
.dash-usage tbody th { font-weight: 600; text-align: left; text-transform: none; letter-spacing: 0; font-size: 15px; color: var(--ink); border-bottom: 0; padding: 12px; }
.dash-usage td, .dash-usage tbody th { border-top: 1px solid var(--line); }

/* Sign-ups bar chart: thin ink bars on recessive grid; each column is a hover/focus target with a tooltip. */
.dash-chart { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.dash-chart-plot { position: relative; height: 160px; padding-left: 28px; border-bottom: 2px solid var(--ink); }
.dash-chart-plot::before { content: ''; position: absolute; left: 28px; right: 0; top: 0; border-top: 1px dashed var(--chart-grid); }
.dash-axis-top { position: absolute; left: 0; top: -8px; font-size: 12px; color: var(--ink-muted); }
.dash-bars { display: flex; align-items: flex-end; gap: 2px; height: 100%; }
.dash-bar-col { position: relative; flex: 1; height: 100%; display: flex; align-items: flex-end; justify-content: center; border-radius: 4px; outline-offset: 2px; }
.dash-bar { width: min(100%, 14px); min-height: 0; background: var(--ink); border-radius: 4px 4px 0 0; }
.dash-bar-col:hover .dash-bar, .dash-bar-col:focus-visible .dash-bar { background: var(--accent); }
.dash-tip { position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); white-space: nowrap; padding: 6px 10px; border: var(--border); border-radius: var(--radius-sm); background: var(--surface); box-shadow: var(--shadow-sm); font-size: 13px; font-weight: 600; pointer-events: none; opacity: 0; z-index: 2; }
.dash-bar-col:first-child .dash-tip, .dash-bar-col:nth-child(2) .dash-tip, .dash-bar-col:nth-child(3) .dash-tip { left: 0; transform: none; }
.dash-bar-col:nth-last-child(-n+3) .dash-tip { left: auto; right: 0; transform: none; }
.dash-bar-col:hover .dash-tip, .dash-bar-col:focus-visible .dash-tip { opacity: 1; }
.dash-chart-x { display: flex; justify-content: space-between; padding-left: 28px; font-size: 12px; color: var(--ink-muted); }
.dash-table-toggle summary { cursor: pointer; font-size: 14px; font-weight: 600; padding: 6px 0; }
.dash-mini-table { width: 100%; max-width: 320px; border-collapse: collapse; font-size: 14px; }
.dash-mini-table th, .dash-mini-table td { padding: 4px 8px; border-bottom: 1px solid var(--line); text-align: left; }
.dash-mini-table .num { text-align: right; }

.dash-search { display: flex; gap: 8px; max-width: 520px; }
.dash-search .sv-input { flex: 1; display: flex; align-items: center; gap: 8px; }
.dash-users td .sv-badge { margin-top: 4px; }
.dash-pager { display: flex; align-items: center; justify-content: center; gap: 12px; }
.dash-audit { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.dash-audit li { padding: 10px 14px; border: var(--border); border-radius: var(--radius-md); background: var(--surface); overflow-wrap: anywhere; }
.dash-delete { margin-top: 18px; padding-top: 16px; border-top: 2px dashed var(--line); }

/* Search results: the cheapest listing on its own, then the rest with "Show more". */
.results-best { display: flex; flex-direction: column; gap: 10px; }
.results-best .result { box-shadow: var(--shadow-md); border-color: var(--ink); }
.results-more-section { display: flex; flex-direction: column; gap: 12px; }
.results-more-section .result-count { margin: 0; }
.results-show-more { align-self: center; }
