/* ==========================================================================
   Leather Hunt — design system
   Tokens → base → layout → components → views → responsive → motion
   ========================================================================== */

/* ---------- tokens ---------- */
:root {
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --r-sm: 8px; --r: 12px; --r-lg: 18px; --r-xl: 24px; --pill: 999px;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --sidebar: 236px;
  --gold: #c9a45c; --gold-2: #e8cf98; --gold-3: #8e6a2c;
  --approve: #3f9b67; --reject: #c4534a; --warn: #c98a2b;
}
:root, [data-theme="dark"] {
  --bg: #0f0e0c; --bg-2: #13110f;
  --surface: #181614; --surface-2: #1f1c19; --surface-3: #2a2622;
  --line: #2c2823; --line-2: #3a342d;
  --text: #efe9df; --text-2: #c9c0b3; --muted: #948a7d;
  --gold-text: #d9b874;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.28);
  --shadow-lg: 0 24px 60px rgba(0,0,0,.55);
  --glass: rgba(20,18,16,.78);
  --skel: #23201c; --skel-2: #2d2924;
  --chart: var(--gold); --chart-2: #8a6f45;
  --seg-0: #c9a45c; --seg-1: #7d9a85; --seg-2: #a6705a; --seg-3: #6f86a8; --seg-4: #b49ac2; --seg-5: #8f8a80;
  color-scheme: dark;
}
[data-theme="light"] {
  --bg: #f6f2ea; --bg-2: #efe9de;
  --surface: #fffdf9; --surface-2: #f7f2ea; --surface-3: #ece4d6;
  --line: #e4dccd; --line-2: #d3c8b5;
  --text: #1d1915; --text-2: #4a4239; --muted: #7c7265;
  --gold: #a9823a; --gold-text: #8a6526; --gold-2: #c9a45c;
  --shadow: 0 1px 2px rgba(60,40,10,.06), 0 8px 24px rgba(60,40,10,.08);
  --shadow-lg: 0 24px 60px rgba(60,40,10,.18);
  --glass: rgba(255,253,249,.85);
  --skel: #ece5d8; --skel-2: #f5f0e7;
  --chart-2: #d8c39b;
  color-scheme: light;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.55 var(--sans); -webkit-font-smoothing: antialiased; min-height: calc(100dvh / var(--z, 1)); overflow-x: hidden; }
body.locked { overflow: hidden; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
button:disabled, [aria-disabled="true"] { opacity: .45; cursor: not-allowed; pointer-events: none; }
h1, h2, h3 { margin: 0; line-height: 1.2; font-weight: 600; }
h1 { font-family: var(--serif); font-size: clamp(30px, 4vw, 42px); font-weight: 600; letter-spacing: -.01em; }
h2 { font-size: 17px; }
h3 { font-size: 14px; }
p { margin: 0; }
kbd { font: 600 11px/1 var(--sans); padding: 3px 6px; border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 5px; background: var(--surface-2); color: var(--text-2); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 6px; }
::selection { background: color-mix(in srgb, var(--gold) 35%, transparent); }
.ico { flex-shrink: 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.grow { flex: 1; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); }
.row-center { display: flex; gap: var(--s3); justify-content: center; flex-wrap: wrap; }
.eyebrow { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-text); font-weight: 600; margin-bottom: 6px; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 100; background: var(--gold); color: #1a140b; padding: 10px 16px; border-radius: var(--r); font-weight: 600; }
.skip:focus { top: 12px; }
.spinner { width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; display: inline-block; animation: spin .7s linear infinite; vertical-align: -3px; }
.boot { min-height: calc(100dvh / var(--z, 1)); display: grid; place-items: center; align-content: center; gap: 18px; color: var(--gold); }
.swatch { width: 11px; height: 11px; border-radius: 50%; display: inline-block; border: 1px solid rgba(128,128,128,.4); flex-shrink: 0; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 40px; padding: 0 18px; border-radius: var(--pill); border: 1px solid var(--line-2); background: var(--surface); color: var(--text); font-weight: 500; white-space: nowrap; transition: background .18s, border-color .18s, transform .12s, box-shadow .18s; }
.btn:hover { border-color: var(--gold); }
.btn:active { transform: scale(.97); }
.btn.sm { min-height: 34px; padding: 0 13px; font-size: 13.5px; }
.btn.lg { min-height: 50px; padding: 0 22px; font-size: 15.5px; }
.btn.block { width: 100%; }
.btn.ghost { background: transparent; }
.btn.gold { background: linear-gradient(135deg, var(--gold-2), var(--gold)); color: #1b140a; border-color: transparent; font-weight: 600; box-shadow: 0 6px 18px color-mix(in srgb, var(--gold) 25%, transparent); }
.btn.gold:hover { filter: brightness(1.06); }
.btn.approve { border-color: color-mix(in srgb, var(--approve) 55%, var(--line-2)); color: var(--approve); }
.btn.approve:hover, .btn.approve.active { background: var(--approve); color: #fff; border-color: var(--approve); }
.btn.reject { border-color: color-mix(in srgb, var(--reject) 55%, var(--line-2)); color: var(--reject); }
.btn.reject:hover, .btn.reject.active { background: var(--reject); color: #fff; border-color: var(--reject); }
.btn.danger { background: var(--reject); color: #fff; border-color: var(--reject); }
.btn kbd { background: transparent; border-color: currentColor; color: inherit; opacity: .6; }
.icon-btn { width: 40px; height: 40px; display: inline-grid; place-items: center; border-radius: var(--pill); color: var(--text-2); transition: background .15s, color .15s; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn.sm { width: 30px; height: 30px; }
.icon-btn.disabled { opacity: .3; pointer-events: none; }
.link-btn { color: var(--gold-text); font-weight: 500; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; }
.link-btn:hover { text-decoration: underline; }
.link-btn.center { display: flex; margin: 10px auto 0; }
.danger-text { color: var(--reject) !important; }

/* ---------- chips, pills, badges ---------- */
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: var(--pill); background: var(--surface-2); border: 1px solid var(--line); font-size: 12px; font-weight: 500; color: var(--text-2); }
.pill.gold, .chip.gold { color: var(--gold-text); border-color: color-mix(in srgb, var(--gold) 45%, transparent); }
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: var(--pill); border: 1px solid var(--line); background: var(--surface); font-size: 13px; color: var(--text-2); }
.status-pill { padding: 4px 11px; border-radius: var(--pill); font-size: 12px; font-weight: 600; background: var(--surface-2); color: var(--text-2); }
.status-pill.approved, .status-pill.finished { background: color-mix(in srgb, var(--approve) 18%, transparent); color: var(--approve); }
.status-pill.rejected, .status-pill.failed { background: color-mix(in srgb, var(--reject) 18%, transparent); color: var(--reject); }
.status-pill.started { background: color-mix(in srgb, var(--gold) 20%, transparent); color: var(--gold-text); }
.status-pill.stalled { background: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--warn); }
.hint { color: var(--muted); font-size: 13px; }
.hint-warn { display: inline-flex; align-items: center; gap: 5px; font: 500 12.5px var(--sans); color: var(--warn); }
.pulse { width: 9px; height: 9px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 0 var(--gold); animation: pulse 1.6s infinite; display: inline-block; }

/* ---------- forms ---------- */
.field { display: grid; gap: 6px; font-size: 13px; color: var(--text-2); font-weight: 500; }
input[type=text], input[type=search], input[type=number], input[type=url], input[type=password], input:not([type]), select, textarea {
  width: 100%; min-height: 42px; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r); padding: 9px 13px; color: var(--text); transition: border-color .15s, box-shadow .15s; }
textarea { resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 20%, transparent); }
select { appearance: none; padding-right: 34px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.check { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text); cursor: pointer; min-height: 32px; }
.check input { width: 18px; height: 18px; accent-color: var(--gold); }
.checks { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 6px 0 12px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); align-items: end; }
.segmented { display: inline-flex; padding: 3px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--pill); gap: 2px; }
.segmented button { display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px; border-radius: var(--pill); font-size: 13.5px; font-weight: 500; color: var(--text-2); transition: background .15s, color .15s; }
.segmented button small { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.segmented button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.segmented button.on small { color: var(--gold-text); }
.segmented.wide { display: flex; } .segmented.wide button { flex: 1; justify-content: center; }

/* ---------- layout ---------- */
#root { min-height: calc(100dvh / var(--z, 1)); }
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar); padding: 22px 14px; display: flex; flex-direction: column; gap: 26px; border-right: 1px solid var(--line); background: var(--bg-2); z-index: 20; }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 8px; }
.brand img { border-radius: 11px; }
.brand b { font-family: var(--serif); font-size: 22px; font-weight: 700; display: block; line-height: 1; }
.brand small { font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.home-hunts { display: none; }
.side-nav { display: grid; gap: 3px; }
.side-nav a, .side-btn { position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r); color: var(--text-2); font-weight: 500; transition: background .15s, color .15s; width: 100%; text-align: left; }
.side-nav a:hover, .side-btn:hover { background: var(--surface-2); color: var(--text); }
.side-nav a.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.side-nav a.on::before { content: ''; position: absolute; left: -14px; top: 10px; bottom: 10px; width: 3px; border-radius: 3px; background: var(--gold); }
.side-nav a.on .ico { color: var(--gold-text); }
.nav-badge { margin-left: auto; min-width: 22px; padding: 1px 7px; border-radius: var(--pill); background: var(--gold); color: #1b140a; font: 700 11.5px/1.6 var(--sans); text-align: center; font-style: normal; }
.live-dot { margin-left: auto; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); animation: pulse 1.6s infinite; }
.side-foot { margin-top: auto; display: grid; gap: 2px; }
.side-btn { font-size: 14px; }
.only-install { display: none !important; }
body.can-install .only-install { display: flex !important; }
body.no-auth [data-auth] { display: none !important; }
.main-col { margin-left: var(--sidebar); min-height: calc(100dvh / var(--z, 1)); display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 15; display: flex; align-items: center; gap: 10px; padding: 12px clamp(16px, 3vw, 36px); background: var(--glass); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line); }
.live-pill { display: inline-flex; align-items: center; gap: 9px; padding: 6px 13px; border-radius: var(--pill); border: 1px solid color-mix(in srgb, var(--gold) 45%, transparent); color: var(--gold-text); font-size: 13.5px; font-weight: 500; }
.live-pill b { color: var(--text); }
#app { flex: 1; width: 100%; max-width: 1440px; margin: 0 auto; padding: clamp(18px, 3vw, 36px) clamp(16px, 3vw, 36px) 120px; outline: none; }
.mobile-only { display: none !important; }
.bottomnav { display: none; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s4); flex-wrap: wrap; margin-bottom: var(--s5); }
.page-head.compact { margin-bottom: var(--s4); }
.page-head .count { font: 500 18px var(--sans); color: var(--muted); vertical-align: middle; margin-left: 6px; }
.head-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.block { margin-top: var(--s6); }
.block-title { font-family: var(--serif); font-size: 26px; margin-bottom: var(--s4); display: flex; align-items: center; gap: 12px; }
.two-col { display: grid; grid-template-columns: 1.2fr 1fr; gap: var(--s4); }
.card-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s5); display: grid; gap: var(--s3); align-content: start; }
.card-box h2 { font-family: var(--serif); font-size: 22px; }
.card-box h3 { display: flex; align-items: center; gap: 7px; }
.empty { text-align: center; padding: 70px 20px; color: var(--muted); display: grid; justify-items: center; gap: 12px; grid-column: 1 / -1; }
.empty .ico { color: var(--gold-text); opacity: .8; }
.empty h2 { font-family: var(--serif); font-size: 28px; color: var(--text); }
.empty.small { padding: 30px; }
.end-note { text-align: center; color: var(--muted); font-size: 13px; padding: 26px 0 0; }
.sentinel { height: 1px; }

/* ---------- skeletons ---------- */
.skel, .skel-block, .kpi.skel { position: relative; overflow: hidden; background: var(--skel) !important; border-color: transparent !important; }
.skel::after, .skel-block::after, .kpi.skel::after { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 20%, var(--skel-2) 50%, transparent 80%); animation: shimmer 1.3s infinite; }
.skel-block { height: 160px; border-radius: var(--r-lg); margin-bottom: 16px; }
.skel-block.tall { height: 420px; }
.card.skel .card-media { aspect-ratio: 4/5; background: transparent; }
.card.skel .card-body i { display: block; height: 12px; border-radius: 6px; background: var(--skel-2); margin: 8px 0; }
.card.skel .card-body i.short { width: 50%; }
.kpi.skel { height: 118px; }
.skel-detail { display: grid; grid-template-columns: 1.3fr 1fr; gap: 24px; }

/* ---------- toolbar + filters ---------- */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.search { flex: 1 1 260px; position: relative; display: flex; align-items: center; }
.search .ico { position: absolute; left: 13px; color: var(--muted); pointer-events: none; }
.search input { padding-left: 40px; padding-right: 40px; border-radius: var(--pill); }
.search kbd { position: absolute; right: 12px; pointer-events: none; }
.search input:focus + kbd, .search input:not(:placeholder-shown) + kbd { display: none; }
.toolbar select { width: auto; min-width: 170px; border-radius: var(--pill); }
.badge-n { min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--pill); background: var(--gold); color: #1b140a; font-size: 11px; font-weight: 700; display: inline-grid; place-items: center; }
.filters-toggle { display: none; }
.filters { display: grid; gap: 10px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); margin-bottom: 10px; }
.filters:empty { display: none; }
.fgroup { display: grid; grid-template-columns: 110px 1fr; gap: 10px; align-items: start; }
.flabel { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; padding-top: 7px; }
.fchips { display: flex; flex-wrap: wrap; gap: 6px; }
.fchip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: var(--pill); border: 1px solid var(--line); font-size: 13px; color: var(--text-2); transition: all .15s; background: var(--bg-2); }
.fchip small { color: var(--muted); font-size: 11.5px; }
.fchip:hover { border-color: var(--gold); color: var(--text); }
.fchip.on { background: color-mix(in srgb, var(--gold) 16%, var(--surface)); border-color: var(--gold); color: var(--text); }
.fchip.on small { color: var(--gold-text); }
.price-range { display: flex; align-items: center; gap: 8px; max-width: 280px; }
.price-range input { min-height: 36px; }
.active-filters { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 14px; }
.active-filters:empty { display: none; }
.achip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px 5px 12px; border-radius: var(--pill); background: var(--surface-2); font-size: 13px; color: var(--text); border: 1px solid var(--line); }
.achip:hover { border-color: var(--reject); }
.new-banner { display: flex; margin: 0 auto 14px; align-items: center; gap: 8px; padding: 9px 18px; border-radius: var(--pill); background: var(--gold); color: #1b140a; font-weight: 600; box-shadow: var(--shadow); position: sticky; top: 76px; z-index: 5; animation: drop .35s var(--ease); }
.menu-wrap { position: relative; }
.menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 260px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-lg); padding: 6px; animation: pop .16s var(--ease); }
.menu-item { display: flex; align-items: center; gap: 8px; justify-content: space-between; width: 100%; padding: 8px 10px; border-radius: var(--r-sm); font-size: 14px; }
.menu-item a { display: flex; gap: 8px; align-items: center; flex: 1; }
.menu-item:hover { background: var(--surface-2); }
.menu-sep { height: 1px; background: var(--line); margin: 5px 0; }

/* ---------- jacket grid + cards ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 18px; }
.group-h { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; font-family: var(--serif); font-size: 24px; padding-top: 14px; border-top: 1px solid var(--line); margin-top: 6px; }
.group-h:first-child { border: 0; padding-top: 0; margin-top: 0; }
.group-h small { font: 500 13px var(--sans); color: var(--muted); }
.card { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; transition: transform .22s var(--ease), box-shadow .22s, border-color .2s, opacity .24s; outline: none; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--line-2); }
.card:focus-visible { box-shadow: 0 0 0 2px var(--gold), var(--shadow-lg); }
.card.selected { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold); }
.card.leaving { opacity: 0; transform: scale(.94); }
.card.gone { display: none; }
.card-media { position: relative; aspect-ratio: 4/5; background: var(--surface-2); overflow: hidden; display: block; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease), opacity .35s; }
.card-media .hover-img { position: absolute; inset: 0; opacity: 0; }
.card:hover .card-media .hover-img { opacity: 1; }
.card:hover .card-media img:first-child { transform: scale(1.03); }
.badge { position: absolute; left: 10px; font-size: 11.5px; font-weight: 600; padding: 4px 9px; border-radius: var(--pill); background: var(--glass); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); color: var(--text); display: inline-flex; gap: 4px; align-items: center; }
.badge.src { bottom: 10px; }
.badge.best { top: 10px; left: auto; right: 10px; color: var(--gold-text); }
.ribbon { position: absolute; left: 0; right: 0; top: 0; padding: 6px; text-align: center; font-size: 12px; font-weight: 600; display: flex; gap: 5px; justify-content: center; align-items: center; color: #fff; }
.ribbon.approved { background: color-mix(in srgb, var(--approve) 88%, transparent); }
.ribbon.rejected { background: color-mix(in srgb, var(--reject) 88%, transparent); }
.select-box { position: absolute; top: 10px; left: 10px; z-index: 2; opacity: 0; transition: opacity .15s; }
.select-box input { position: absolute; opacity: 0; width: 26px; height: 26px; margin: 0; cursor: pointer; }
.select-box span { width: 26px; height: 26px; border-radius: 8px; border: 2px solid #fff; background: rgba(0,0,0,.35); display: grid; place-items: center; color: transparent; pointer-events: none; }
.select-box input:checked + span { background: var(--gold); border-color: var(--gold); color: #1b140a; }
.select-box input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }
.card:hover .select-box, .card.selected .select-box, body.selecting .select-box, .card:focus-within .select-box { opacity: 1; }
.card-tools { position: absolute; right: 10px; top: 46px; display: grid; gap: 6px; opacity: 0; transform: translateX(6px); transition: all .18s; z-index: 2; }
.card:hover .card-tools, .card:focus-within .card-tools { opacity: 1; transform: none; }
.tool { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--glass); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); color: var(--text); box-shadow: var(--shadow); }
.tool:hover, .tool.on { background: var(--gold); color: #1b140a; }
.card-body { padding: 13px 14px 14px; display: grid; gap: 8px; flex: 1; align-content: start; }
.card-title { font-weight: 500; font-size: 14.5px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.8em; }
.card-title:hover { color: var(--gold-text); }
.card-meta { display: flex; justify-content: space-between; align-items: baseline; }
.price { font-family: var(--serif); font-size: 23px; font-weight: 700; color: var(--text); }
.score { font-weight: 700; color: var(--gold-text); font-size: 14px; }
.score small { color: var(--muted); font-weight: 500; font-size: 11px; }
.card-chips { display: flex; flex-wrap: wrap; gap: 5px; min-height: 22px; }
.mini { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--text-2); padding: 2px 8px; border-radius: var(--pill); background: var(--surface-2); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini.topic { color: var(--gold-text); }
.mini .swatch { width: 9px; height: 9px; }
.card-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: auto; padding-top: 4px; }
.card-actions .btn { width: 100%; }

/* bulk bar + compare tray */
.bulkbar { position: fixed; left: 50%; bottom: 24px; transform: translateX(calc(-50% + var(--sidebar) / 2)); z-index: 40; display: flex; align-items: center; gap: 8px; padding: 9px 10px 9px 18px; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--pill); box-shadow: var(--shadow-lg); animation: rise .25s var(--ease); flex-wrap: wrap; max-width: calc(100vw - var(--sidebar) - 32px); }
.bulkbar b { margin-right: 6px; white-space: nowrap; }
.tray { position: fixed; right: 24px; bottom: 24px; z-index: 35; display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 16px; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); animation: rise .25s var(--ease); }
body.selecting .tray { bottom: 92px; }
.tray-label { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.tray-items { display: flex; gap: 6px; align-items: center; }
.tray-slot { position: relative; width: 42px; height: 50px; border-radius: 8px; overflow: hidden; background: var(--surface-2); }
.tray-slot.empty { border: 1px dashed var(--line-2); background: transparent; }
.tray-slot img { width: 100%; height: 100%; object-fit: cover; }
.tray-slot button { position: absolute; top: 2px; right: 2px; width: 18px; height: 18px; border-radius: 50%; background: rgba(0,0,0,.6); color: #fff; display: grid; place-items: center; }

/* ---------- toasts + dialogs ---------- */
.toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 90; display: grid; gap: 8px; width: min(440px, calc(100vw - 24px)); pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; padding: 11px 10px 11px 16px; border-radius: var(--r); background: var(--text); color: var(--bg); box-shadow: var(--shadow-lg); font-size: 14px; animation: rise .25s var(--ease); }
.toast span { flex: 1; }
.toast.error { background: var(--reject); color: #fff; }
.toast.out { opacity: 0; transform: translateY(8px); transition: all .2s; }
.toast-act { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; color: var(--gold-2); padding: 4px 8px; border-radius: 8px; }
[data-theme="light"] .toast-act { color: var(--gold-2); }
.toast-x { opacity: .6; padding: 4px; display: grid; }
body.selecting .toasts { bottom: 96px; }
.modal-back { position: fixed; inset: 0; z-index: 80; background: rgba(8,7,6,.62); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); display: grid; place-items: center; padding: 20px; animation: fade .18s; }
.modal { width: min(460px, 100%); max-height: calc(100dvh / var(--z, 1) - 40px); overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 24px; box-shadow: var(--shadow-lg); animation: pop .22s var(--ease); outline: none; }
.modal.wide { width: min(980px, 100%); }
.modal-title { font-family: var(--serif); font-size: 26px; margin-bottom: 8px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.modal .field { margin-top: 14px; }
.sheet-list { display: grid; gap: 10px; margin-top: 12px; }
.keys { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 18px; margin-top: 12px; }
.keys table { border-collapse: collapse; width: 100%; font-size: 13.5px; }
.keys caption { text-align: left; font-weight: 600; color: var(--gold-text); padding-bottom: 6px; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }
.keys td { padding: 5px 0; border-bottom: 1px solid var(--line); }
.keys td:first-child { white-space: nowrap; padding-right: 12px; }

/* quick view */
.qv { display: grid; grid-template-columns: 1.1fr 1fr; gap: 24px; }
.qv-main { width: 100%; aspect-ratio: 4/5; border-radius: var(--r-lg); overflow: hidden; background: var(--surface-2); cursor: zoom-in; }
.qv-main img { width: 100%; height: 100%; object-fit: contain; }
.qv-thumbs { display: flex; gap: 6px; margin-top: 8px; overflow-x: auto; }
.qv-thumbs button { width: 56px; height: 66px; flex-shrink: 0; border-radius: 8px; overflow: hidden; border: 2px solid transparent; opacity: .6; }
.qv-thumbs button.on { border-color: var(--gold); opacity: 1; }
.qv-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.qv-info { display: grid; gap: 14px; align-content: start; }
.qv-title { font-family: var(--serif); font-size: 26px; }
.qv-price { font-family: var(--serif); font-size: 32px; font-weight: 700; }
.qv-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.qv-links { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; color: var(--gold-text); }
.qv-links a { display: inline-flex; align-items: center; gap: 4px; }
.why { list-style: none; padding: 0; margin: 0; display: grid; gap: 7px; font-size: 14px; }
.why li { display: flex; gap: 8px; align-items: flex-start; }
.why .ico { color: var(--approve); margin-top: 3px; }
.why.tight { font-size: 12.5px; gap: 3px; }

/* lightbox */
.modal.lb-modal { width: calc(100vw / var(--z, 1)); max-width: none; height: calc(100dvh / var(--z, 1)); max-height: none; border-radius: 0; padding: 0; background: #000; border: 0; overflow: hidden; }
.modal-back:has(.lb-modal) { padding: 0; background: #000; }
.lightbox { height: 100%; display: grid; grid-template-rows: auto 1fr auto; color: #fff; position: relative; }
.lb-top { display: flex; align-items: center; gap: 12px; padding: 10px 14px; }
.lb-top .icon-btn { color: #fff; }
.lb-top .icon-btn:hover { background: rgba(255,255,255,.12); }
.lb-title { flex: 1; font-size: 14px; opacity: .75; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-count { font-size: 14px; font-weight: 600; }
.lb-stage { overflow: hidden; display: grid; place-items: center; touch-action: none; }
.lb-stage img { max-width: 100%; max-height: calc(100dvh / var(--z, 1) - 150px); object-fit: contain; transition: transform .15s; user-select: none; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 52px; height: 52px; border-radius: 50%; background: rgba(255,255,255,.12); color: #fff; display: grid; place-items: center; }
.lb-nav:hover { background: rgba(255,255,255,.22); }
.lb-nav.prev { left: 16px; } .lb-nav.next { right: 16px; }
.lb-strip { display: flex; gap: 6px; padding: 10px; overflow-x: auto; justify-content: center; }
.lb-strip button { width: 52px; height: 62px; flex-shrink: 0; border-radius: 6px; overflow: hidden; opacity: .5; border: 2px solid transparent; }
.lb-strip button.on { opacity: 1; border-color: var(--gold); }
.lb-strip img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- product page ---------- */
.crumbs { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; font-size: 14px; }
.crumbs > a { display: inline-flex; align-items: center; gap: 4px; color: var(--text-2); font-weight: 500; }
.crumbs > a:hover { color: var(--gold-text); }
.crumb-nav { margin-left: auto; display: flex; gap: 4px; }
.detail { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(320px, 1fr); gap: clamp(18px, 3vw, 40px); align-items: start; }
.gallery { display: grid; grid-template-columns: 76px 1fr; gap: 12px; position: sticky; top: 84px; }
.g-thumbs { display: grid; gap: 8px; align-content: start; max-height: 76vh; overflow-y: auto; scrollbar-width: thin; }
.g-thumbs button { aspect-ratio: 4/5; border-radius: 10px; overflow: hidden; border: 2px solid transparent; opacity: .6; transition: all .15s; }
.g-thumbs button.on, .g-thumbs button:hover { opacity: 1; }
.g-thumbs button.on { border-color: var(--gold); }
.g-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.g-stage { position: relative; border-radius: var(--r-xl); overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); }
.g-main { display: block; width: 100%; aspect-ratio: 4/5; cursor: zoom-in; }
.g-main img { width: 100%; height: 100%; object-fit: contain; }
.g-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; background: var(--glass); backdrop-filter: blur(8px); display: grid; place-items: center; box-shadow: var(--shadow); opacity: 0; transition: opacity .2s; }
.g-stage:hover .g-nav { opacity: 1; }
.g-nav.prev { left: 12px; } .g-nav.next { right: 12px; }
.g-count, .g-zoom { position: absolute; bottom: 12px; padding: 4px 10px; border-radius: var(--pill); background: var(--glass); backdrop-filter: blur(8px); font-size: 12.5px; font-weight: 600; }
.g-count { right: 12px; } .g-zoom { left: 12px; display: inline-flex; gap: 5px; align-items: center; opacity: 0; transition: opacity .2s; }
.g-stage:hover .g-zoom { opacity: 1; }
.buy { display: grid; gap: 16px; }
.p-title { font-size: clamp(28px, 3vw, 36px); }
.p-price { font-family: var(--serif); font-size: 40px; font-weight: 700; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.decide { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.quick-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.qa { display: grid; justify-items: center; gap: 6px; padding: 12px 6px; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); font-size: 12.5px; color: var(--text-2); text-align: center; transition: all .15s; }
.qa:hover, .qa.on { border-color: var(--gold); color: var(--text); }
.qa.on { background: color-mix(in srgb, var(--gold) 14%, var(--surface)); }
.score-ring { --v: 0; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--gold) calc(var(--v) * 1%), var(--surface-3) 0); position: relative; }
.score-ring::before { content: ''; position: absolute; inset: 5px; border-radius: 50%; background: var(--surface); }
.score-ring b { position: relative; font-size: 15px; }
.note-label { display: flex; justify-content: space-between; align-items: center; cursor: text; }
.spark { color: var(--gold); }
.spark-line { fill: none; stroke: var(--gold); stroke-width: 2; }
.spark-dot { fill: var(--gold); }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.kv span:first-child { color: var(--muted); }
.kv:last-of-type { border-bottom: 0; }
.desc { white-space: pre-line; color: var(--text-2); font-size: 14.5px; }
.similar { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.sim { display: grid; grid-template-columns: 74px 1fr; gap: 12px; padding: 10px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); transition: all .15s; }
.sim:hover { border-color: var(--gold); transform: translateY(-2px); }
.sim.cheaper { border-color: color-mix(in srgb, var(--warn) 50%, var(--line)); }
.sim img { width: 74px; height: 88px; object-fit: cover; border-radius: 9px; }
.sim-body { display: grid; gap: 2px; align-content: start; min-width: 0; }
.sim-body b { font-family: var(--serif); font-size: 21px; }
.sim-body small.up { color: var(--warn); font-weight: 600; } .sim-body small.down { color: var(--muted); }
.sim-title { font-size: 12.5px; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- review mode ---------- */
.review-progress { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--muted); }
.review-progress .bar { width: 160px; height: 6px; border-radius: 6px; background: var(--surface-3); overflow: hidden; }
.review-progress .bar i { display: block; height: 100%; background: var(--gold); transition: width .3s; }
.review { position: relative; height: min(68vh, 680px); max-width: 460px; margin: 0 auto; }
.rv-card { position: absolute; inset: 0; border-radius: var(--r-xl); overflow: hidden; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; touch-action: pan-y; user-select: none; cursor: grab; }
.rv-card.dragging { cursor: grabbing; transition: none; }
.rv-card:not(.dragging) { transition: transform .25s var(--ease); }
.rv-card.behind { transform: scale(.95) translateY(14px); opacity: .55; pointer-events: none; }
.rv-card.behind img { width: 100%; height: 100%; object-fit: cover; }
.rv-photo { position: relative; flex: 1; min-height: 0; background: var(--surface-2); }
.rv-photo img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.rv-zone { position: absolute; top: 0; bottom: 0; width: 30%; }
.rv-zone.left { left: 0; } .rv-zone.right { right: 0; }
.rv-dots { position: absolute; top: 10px; left: 12px; right: 12px; display: flex; gap: 4px; }
.rv-dots i { flex: 1; height: 3px; border-radius: 3px; background: rgba(255,255,255,.4); }
.rv-dots i.on { background: #fff; }
.stamp { position: absolute; top: 34px; padding: 6px 14px; border: 3px solid; border-radius: 10px; font: 800 26px var(--sans); text-transform: uppercase; letter-spacing: .06em; opacity: 0; transition: opacity .15s; }
.stamp.approve { left: 20px; color: var(--approve); transform: rotate(-12deg); }
.stamp.reject { right: 20px; color: var(--reject); transform: rotate(12deg); }
.rv-card.to-approve .stamp.approve, .rv-card.to-reject .stamp.reject { opacity: 1; }
.rv-info { padding: 16px 18px 18px; display: grid; gap: 8px; }
.rv-info h2 { font-size: 17px; font-weight: 500; }
.rv-price { font-family: var(--serif); font-size: 28px; font-weight: 700; }
.rv-controls { display: flex; justify-content: center; align-items: center; gap: 16px; margin: 22px 0 10px; transition: opacity .2s; }
.rv-controls.dim { opacity: .3; pointer-events: none; }
.rv-btn { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line-2); box-shadow: var(--shadow); color: var(--text-2); transition: transform .12s, background .15s; }
.rv-btn:hover { transform: scale(1.06); }
.rv-btn:active { transform: scale(.94); }
.rv-btn.approve, .rv-btn.reject { width: 72px; height: 72px; }
.rv-btn.approve { color: var(--approve); border-color: color-mix(in srgb, var(--approve) 50%, transparent); }
.rv-btn.approve:hover { background: var(--approve); color: #fff; }
.rv-btn.reject { color: var(--reject); border-color: color-mix(in srgb, var(--reject) 50%, transparent); }
.rv-btn.reject:hover { background: var(--reject); color: #fff; }
.rv-hint { text-align: center; }
.rv-done { padding-top: 120px; }

/* ---------- hunts ---------- */
.hunt-start { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.hunt-card { display: flex; align-items: center; gap: 16px; padding: 20px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface); text-align: left; transition: all .2s; width: 100%; }
.hunt-card:hover:not(:disabled) { border-color: var(--gold); transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.hunt-card b { display: block; font-size: 17px; }
.hunt-card small { color: var(--muted); font-size: 13px; }
.hunt-card > span:nth-child(2) { flex: 1; }
.hc-icon { width: 52px; height: 52px; border-radius: 15px; display: grid; place-items: center; background: color-mix(in srgb, var(--gold) 15%, var(--surface-2)); color: var(--gold-text); flex-shrink: 0; }
.hunt-card.trend .hc-icon { background: color-mix(in srgb, var(--seg-1) 20%, var(--surface-2)); color: var(--seg-1); }
.hc-go { color: var(--muted); }
.live-card { margin-top: 18px; padding: 20px; border-radius: var(--r-lg); border: 1px solid color-mix(in srgb, var(--gold) 50%, var(--line)); background: linear-gradient(135deg, color-mix(in srgb, var(--gold) 9%, var(--surface)), var(--surface)); display: grid; gap: 12px; animation: drop .3s var(--ease); }
.live-card > .btn { justify-self: start; }
.live-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.live-found { margin-left: auto; color: var(--text-2); }
.live-found b { font-family: var(--serif); font-size: 26px; color: var(--text); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.steps li { display: flex; align-items: flex-start; gap: 12px; padding: 7px 0; font-size: 14px; }
.steps li > span:nth-child(2) { flex: 1; display: grid; }
.steps small { color: var(--muted); font-size: 12.5px; }
.steps li.error small { color: var(--reject); }
.steps em { font-style: normal; font-weight: 700; color: var(--gold-text); }
.st { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; font-size: 13px; }
.st.done { background: color-mix(in srgb, var(--approve) 20%, transparent); color: var(--approve); }
.st.error { background: color-mix(in srgb, var(--reject) 20%, transparent); color: var(--reject); }
.st.running { color: var(--gold); }
.st.running .spinner { width: 14px; height: 14px; }
.st.skipped { background: var(--surface-3); color: var(--muted); }
.runs { display: grid; gap: 10px; }
.run { padding: 16px 18px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); display: grid; gap: 10px; }
.run-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.run-mode { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.run-mode.trend { color: var(--seg-1); }
.run-found { margin-left: auto; color: var(--muted); }
.run-found b { color: var(--text); font-family: var(--serif); font-size: 22px; }
.run-error { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: var(--r); background: color-mix(in srgb, var(--reject) 10%, transparent); color: var(--text); font-size: 14px; }
.run-error .ico { color: var(--reject); margin-top: 2px; }
.run-error.soft { background: color-mix(in srgb, var(--warn) 10%, transparent); }
.run-error.soft .ico { color: var(--warn); }
.run details summary { cursor: pointer; font-size: 13px; color: var(--muted); list-style: none; display: inline-flex; gap: 6px; }
.run details summary::before { content: '▸'; transition: transform .15s; }
.run details[open] summary::before { transform: rotate(90deg); }
.run-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- overview ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 16px; }
.kpi { padding: 18px 20px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); display: grid; gap: 4px; transition: all .2s; }
a.kpi:hover { border-color: var(--gold); transform: translateY(-2px); box-shadow: var(--shadow); }
.kpi span { font-size: 13px; color: var(--muted); font-weight: 500; }
.kpi b { font-family: var(--serif); font-size: 42px; line-height: 1.05; font-weight: 700; }
.kpi small { color: var(--muted); font-size: 12.5px; }
.kpi.accent { background: linear-gradient(135deg, color-mix(in srgb, var(--gold) 16%, var(--surface)), var(--surface)); border-color: color-mix(in srgb, var(--gold) 40%, var(--line)); }
.kpi.accent small { color: var(--gold-text); font-weight: 600; }
.last-run { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); margin-bottom: 16px; transition: border-color .2s; }
.last-run:hover { border-color: var(--gold); }
.last-run > span:nth-child(2) { flex: 1; display: grid; }
.last-run small { color: var(--muted); }
.last-run.failed small { color: var(--reject); }
.lr-icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); color: var(--gold-text); }
.panels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.panel { padding: 18px 20px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); min-width: 0; }
.panel.span2 { grid-column: span 2; }
.panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; gap: 10px; }
.panel-head h2 { font-size: 15px; font-weight: 600; }
.chart-svg { width: 100%; display: block; }
.grid-line { stroke: var(--line); stroke-width: 1; }
.bar { fill: var(--chart); opacity: .85; transition: opacity .15s; }
.bar:hover { opacity: 1; }
.chart-x { display: flex; margin-top: 6px; }
.chart-x span { font-size: 10.5px; color: var(--muted); white-space: nowrap; overflow: visible; }
.hbars { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.hbars li { display: grid; grid-template-columns: minmax(80px, 120px) 1fr auto; gap: 10px; align-items: center; font-size: 13.5px; }
.hbars li small { grid-column: 2 / -1; margin-top: -6px; font-size: 11.5px; }
.hb-label { display: flex; align-items: center; gap: 7px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb-track { height: 8px; border-radius: 8px; background: var(--surface-3); overflow: hidden; }
.hb-track i { display: block; height: 100%; border-radius: 8px; background: linear-gradient(90deg, var(--chart-2), var(--chart)); }
.donut-wrap { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.seg-bg { stroke: var(--surface-3); }
.seg-0 { stroke: var(--seg-0); } .seg-1 { stroke: var(--seg-1); } .seg-2 { stroke: var(--seg-2); } .seg-3 { stroke: var(--seg-3); } .seg-4 { stroke: var(--seg-4); } .seg-5 { stroke: var(--seg-5); }
.donut-total { font: 700 8px var(--serif); fill: var(--text); }
.legend { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-size: 13px; }
.legend li { display: flex; align-items: center; gap: 8px; }
.legend b { margin-left: auto; padding-left: 10px; }
.seg-dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.seg-dot.seg-0 { background: var(--seg-0); } .seg-dot.seg-1 { background: var(--seg-1); } .seg-dot.seg-2 { background: var(--seg-2); } .seg-dot.seg-3 { background: var(--seg-3); } .seg-dot.seg-4 { background: var(--seg-4); } .seg-dot.seg-5 { background: var(--seg-5); }
.topics { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; }
.topics li { display: grid; grid-template-columns: 1fr auto auto; gap: 14px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.topics li a { display: inline-flex; align-items: center; gap: 7px; }
.topics li a:hover { color: var(--gold-text); }
.topics b { color: var(--approve); font-size: 13px; }

/* ---------- compare ---------- */
.compare-wrap { overflow-x: auto; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface); }
.compare { border-collapse: collapse; width: 100%; min-width: 640px; font-size: 14px; }
.compare th, .compare td { padding: 12px 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.compare thead th { vertical-align: bottom; }
.compare tbody th { color: var(--muted); font-weight: 500; width: 130px; white-space: nowrap; }
.compare td { min-width: 180px; }
.cmp-img { display: block; width: 100%; max-width: 200px; aspect-ratio: 4/5; border-radius: var(--r); overflow: hidden; background: var(--surface-2); margin-bottom: 10px; cursor: zoom-in; }
.cmp-img img { width: 100%; height: 100%; object-fit: cover; }
.cmp-title { font-weight: 500; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.cmp-title:hover { color: var(--gold-text); }
.compare b.best { color: var(--approve); }
.tag-best { font-size: 11px; font-weight: 700; color: var(--approve); background: color-mix(in srgb, var(--approve) 15%, transparent); padding: 2px 7px; border-radius: var(--pill); }
.cmp-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.actions-row td { border-bottom: 0; }

/* ---------- settings ---------- */
.settings-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.settings-grid .span2 { grid-column: span 2; }
.save-state { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; color: var(--approve); font-weight: 500; }
.save-state.saving { color: var(--muted); }
.save-state.error { color: var(--reject); }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 0; border-top: 1px solid var(--line); }
.setting-row > span { display: grid; }
.setting-row small { color: var(--muted); font-size: 12.5px; }

/* ---------- login ---------- */
body.logged-out { background: var(--bg); }
.login { min-height: calc(100dvh / var(--z, 1)); display: grid; grid-template-columns: 1.1fr 1fr; }
.login-art { background: radial-gradient(circle at 30% 30%, color-mix(in srgb, var(--gold) 22%, #14110e), #0b0a09 70%); display: grid; place-items: center; align-content: center; gap: 18px; color: var(--gold-2); }
.login-art img { width: 140px; height: 140px; filter: drop-shadow(0 20px 40px rgba(0,0,0,.5)); }
.login-art p { font-family: var(--serif); font-size: 26px; letter-spacing: .08em; }
.login-card { align-self: center; justify-self: center; width: min(400px, calc(100% - 40px)); display: grid; gap: 14px; }
.login-card h1 { font-size: 40px; }
.login-logo { display: none; width: 60px; height: 60px; border-radius: 16px; }
.pw { position: relative; display: block; }
.pw input { padding-right: 46px; }
.pw .icon-btn { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); }
.login-error { color: var(--reject); font-size: 14px; font-weight: 500; }
.shake { animation: shake .4s; }

/* ---------- pull to refresh ---------- */
.ptr { position: fixed; top: 0; left: 50%; transform: translate(-50%, -60px); z-index: 50; width: 40px; height: 40px; border-radius: 50%; background: var(--surface); box-shadow: var(--shadow); display: grid; place-items: center; color: var(--muted); transition: color .15s; pointer-events: none; }
.ptr.ready { color: var(--gold); }
.ptr.spin { transform: translate(-50%, 24px) !important; animation: spin .8s linear infinite; color: var(--gold); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1180px) {
  html:not(.fit) .panels { grid-template-columns: 1fr 1fr; }
  html:not(.fit) .panel.span2 { grid-column: span 2; }
  html:not(.fit) .kpis { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 1000px) {
  html:not(.fit) .detail { grid-template-columns: 1fr; }
  html:not(.fit) .gallery { position: static; }
  html:not(.fit) .two-col { grid-template-columns: 1fr; }
  html:not(.fit) .qv { grid-template-columns: 1fr; }
  html:not(.fit) .skel-detail { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  :root { --sidebar: 0px; }
  .sidebar { display: none; }
  .main-col { margin-left: 0; }
  .mobile-only { display: inline-flex !important; }
  .desktop-only { display: none !important; }
  .topbar { padding: 10px 14px; padding-top: max(10px, env(safe-area-inset-top)); }
  .topbar .brand b { font-size: 19px; }
  #app { padding: 18px 16px calc(110px + env(safe-area-inset-bottom)); }
  .bottomnav { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--glass); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
  .bottomnav a { position: relative; display: grid; justify-items: center; gap: 3px; padding: 9px 0 8px; font-size: 11px; color: var(--muted); font-weight: 500; }
  .bottomnav a.on { color: var(--gold-text); }
  .bottomnav .nav-badge { position: absolute; top: 4px; left: calc(50% + 6px); margin: 0; min-width: 18px; font-size: 10px; padding: 0 5px; }
  .bottomnav .live-dot { position: absolute; top: 8px; left: calc(50% + 10px); margin: 0; }
  .topbar { gap: 6px; }
  .topbar .brand b { display: none; }
  .live-pill { padding: 5px 11px; font-size: 13px; }
  .live-pill .lp-word { display: none; }
  .search { flex-basis: 100%; order: 2; }
  .toolbar .segmented { order: 1; scrollbar-width: none; }
  .toolbar .segmented::-webkit-scrollbar { display: none; }
  .toolbar select { order: 3; }
  .filters-toggle { order: 4; }
  .filters-toggle { display: inline-flex; }
  .filters { display: none; }
  .filters.open { display: grid; }
  .fgroup { grid-template-columns: 1fr; gap: 6px; }
  .flabel { padding-top: 0; }
  .fchips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
  .toolbar .segmented { width: 100%; overflow-x: auto; }
  .toolbar .segmented button { flex: 1; justify-content: center; }
  .toolbar select { flex: 1; min-width: 0; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .card:hover { transform: none; box-shadow: none; }
  .card-body { padding: 10px; gap: 6px; }
  .card-title { font-size: 13.5px; }
  .price { font-size: 19px; }
  .card-actions .btn span { display: none; }
  .card-tools { opacity: 1; transform: none; top: 8px; right: 8px; display: grid; }
  .card-tools .tool { width: 32px; height: 32px; }
  .badge.best { right: auto; left: 8px; top: auto; bottom: 8px; padding: 3px 7px; font-size: 10.5px; }
  .select-box { opacity: 0; }
  body.selecting .select-box { opacity: 1; }
  .badge.src { display: none; }
  .bulkbar { left: 8px; right: 8px; bottom: calc(70px + env(safe-area-inset-bottom)); transform: none; max-width: none; border-radius: var(--r-lg); justify-content: center; }
  .tray { left: 8px; right: 8px; bottom: calc(70px + env(safe-area-inset-bottom)); }
  body.selecting .tray { bottom: calc(150px + env(safe-area-inset-bottom)); }
  .toasts { bottom: calc(76px + env(safe-area-inset-bottom)); }
  body.selecting .toasts { bottom: calc(160px + env(safe-area-inset-bottom)); }
  .new-banner { top: 64px; }
  .gallery { grid-template-columns: 1fr; }
  .g-thumbs { order: 2; display: flex; overflow-x: auto; max-height: none; }
  .g-thumbs button { width: 58px; flex-shrink: 0; }
  .g-nav { opacity: 1; width: 38px; height: 38px; }
  .g-zoom { display: none; }
  .quick-actions { grid-template-columns: repeat(2, 1fr); }
  .kv { grid-template-columns: 120px 1fr; }
  .hunt-start { grid-template-columns: 1fr; }
  .kpis { gap: 10px; }
  .kpi { padding: 14px; }
  .kpi b { font-size: 34px; }
  .panels { grid-template-columns: 1fr; }
  .panel.span2 { grid-column: auto; }
  .settings-grid { grid-template-columns: 1fr; }
  .settings-grid .span2 { grid-column: auto; }
  .row2 { grid-template-columns: 1fr; }
  .review { height: calc(100dvh / var(--z, 1) - 330px); min-height: 380px; }
  .rv-hint { display: none; }
  .page-head .head-actions .btn { flex: 1; }
  .home-hunts { display: flex; width: 100%; }
  .login { grid-template-columns: 1fr; }
  .login-art { display: none; }
  .login-logo { display: block; }
  .modal { padding: 20px; border-radius: var(--r-lg); }
  .modal.sheet { align-self: end; width: 100%; border-radius: var(--r-xl) var(--r-xl) 0 0; padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
  .modal-back:has(.sheet) { padding: 0; align-items: end; }
  .crumbs .muted { display: none; }
}
@media (max-width: 400px) {
  .grid { gap: 8px; }
  .card-chips .mini:nth-child(n+3) { display: none; }
}
@media (hover: none) {
  .card-tools { opacity: 1; transform: none; }
  .g-nav { opacity: 1; }
}

/* ==========================================================================
   Motion
   ========================================================================== */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--gold) 60%, transparent); } 70% { box-shadow: 0 0 0 9px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }
@keyframes drop { from { opacity: 0; transform: translateY(-10px); } }
@keyframes pop { from { opacity: 0; transform: scale(.96); } }
@keyframes fade { from { opacity: 0; } }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.bulkbar { animation-name: rise; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .18s; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
@media (forced-colors: active) {
  .btn, .card, .fchip { border: 1px solid CanvasText; }
}

/* ==========================================================================
   v2 — team, boards, insights, palette, split view, profit, comments
   ========================================================================== */
body.viewer [data-edit] { display: none !important; }
.center { text-align: center; }
.ok-text { color: var(--approve); }
.btn.on { border-color: var(--gold); color: var(--gold-text); background: color-mix(in srgb, var(--gold) 12%, var(--surface)); }
.chip.sm { padding: 3px 9px; font-size: 12px; }
.link-btn.sm { font-size: 12px; margin-left: 8px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: inline-grid; place-items: center; background: linear-gradient(135deg, var(--gold-2), var(--gold)); color: #1b140a; font-weight: 700; flex-shrink: 0; }
.avatar.sm { width: 28px; height: 28px; font-size: 13px; }
.avatar.lg { width: 52px; height: 52px; font-size: 22px; }

/* sidebar extras */
.side-search { display: flex; align-items: center; gap: 9px; padding: 9px 12px; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: 13.5px; width: 100%; }
.side-search span { flex: 1; text-align: left; }
.side-search:hover { border-color: var(--gold); color: var(--text); }
.side-user { display: flex; align-items: center; gap: 10px; padding: 10px; margin-top: 8px; border-top: 1px solid var(--line); width: 100%; text-align: left; border-radius: var(--r); }
.side-user:hover { background: var(--surface-2); }
.side-user > span:nth-child(2) { flex: 1; display: grid; line-height: 1.25; }
.side-user small { color: var(--muted); text-transform: capitalize; font-size: 12px; }
.sidebar { gap: 18px; overflow-y: auto; }

/* bell + notifications */
.bell { position: relative; }
.bell-n { position: absolute; top: 4px; right: 4px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--reject); color: #fff; font: 700 10px/17px var(--sans); font-style: normal; text-align: center; }
.notif-menu { width: min(380px, calc(100vw - 24px)); max-height: 70vh; overflow-y: auto; right: 0; }
.notif-head { padding: 8px 10px; }
.notif { display: grid; gap: 2px; padding: 10px 12px; border-radius: var(--r-sm); font-size: 13.5px; border-left: 3px solid transparent; }
.notif:hover { background: var(--surface-2); }
.notif.unread { border-left-color: var(--gold); background: color-mix(in srgb, var(--gold) 7%, transparent); }
.user-card { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.user-card > div { display: grid; }
.menu-list { display: grid; gap: 2px; }
.menu-list a, .menu-list button { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: var(--r-sm); width: 100%; text-align: left; font-size: 14.5px; }
.menu-list a:hover, .menu-list button:hover { background: var(--surface-2); }
.more-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0 14px; }
.more-item { display: grid; justify-items: center; gap: 6px; padding: 14px 6px; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); font-size: 13px; color: var(--text-2); }
.more-item:hover { border-color: var(--gold); color: var(--text); }
.bottomnav button { display: grid; justify-items: center; gap: 3px; padding: 9px 0 8px; font-size: 11px; color: var(--muted); font-weight: 500; }

/* command palette */
.modal.pal-modal { width: min(680px, 100%); padding: 0; align-self: start; margin-top: 10vh; overflow: hidden; }
.modal-back:has(.pal-modal) { align-items: start; }
.palette { display: grid; }
.pal-input { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); color: var(--muted); }
.pal-input input { border: 0; background: transparent; box-shadow: none !important; font-size: 17px; padding: 6px 0; min-height: 0; }
.pal-list { max-height: 55vh; overflow-y: auto; padding: 6px; }
.pal-group { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding: 10px 12px 4px; font-weight: 600; }
.pal-item { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: var(--r-sm); cursor: pointer; }
.pal-item.on { background: color-mix(in srgb, var(--gold) 14%, var(--surface)); }
.pal-item img { width: 34px; height: 40px; object-fit: cover; border-radius: 6px; }
.pal-ic { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-2); color: var(--gold-text); }
.pal-text { flex: 1; display: grid; min-width: 0; }
.pal-text b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pal-text small { color: var(--muted); font-size: 12px; }
.pal-foot { display: flex; gap: 16px; padding: 10px 18px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.pal-foot kbd { margin-right: 3px; }
.pal-empty { padding: 20px; text-align: center; }
.nl-hint { position: absolute; left: 14px; top: calc(100% + 6px); z-index: 6; padding: 6px 12px; border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--gold); font-size: 12.5px; box-shadow: var(--shadow); white-space: nowrap; max-width: 92vw; overflow: hidden; text-overflow: ellipsis; }
.nl-hint b { color: var(--gold-text); margin-left: 4px; }

/* photo search */
.drop { display: grid; justify-items: center; gap: 6px; padding: 30px; border: 2px dashed var(--line-2); border-radius: var(--r-lg); color: var(--muted); cursor: pointer; text-align: center; margin: 14px 0; transition: all .15s; }
.drop:hover, .drop.over, .drop:focus-visible { border-color: var(--gold); color: var(--text); background: color-mix(in srgb, var(--gold) 6%, transparent); }
.photo-results { margin-top: 14px; }
.pr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.pr-item { display: grid; gap: 6px; padding: 6px; border-radius: var(--r); border: 1px solid var(--line); }
.pr-item:hover { border-color: var(--gold); }
.pr-item img { width: 100%; aspect-ratio: 4/5; object-fit: cover; border-radius: 8px; }
.pr-item span { display: grid; font-size: 12.5px; }
.pr-item b { color: var(--gold-text); }
.pr-item small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }

/* jackets: signals, hover zoom, split view */
.card-signals { display: flex; flex-wrap: wrap; gap: 4px; min-height: 20px; }
.card-signals:empty { display: none; }
.sig { display: inline-flex; align-items: center; gap: 3px; padding: 2px 7px; border-radius: var(--pill); font-size: 11.5px; font-weight: 600; background: var(--surface-2); color: var(--text-2); }
.sig.pos { color: var(--approve); background: color-mix(in srgb, var(--approve) 12%, transparent); }
.sig.neg { color: var(--reject); background: color-mix(in srgb, var(--reject) 12%, transparent); }
.sig.taste { color: var(--gold-text); background: color-mix(in srgb, var(--gold) 14%, transparent); }
@media (hover: hover) { .card .zoomable:hover img:first-child { transform: scale(1.7); transition: transform .25s ease; } .card .zoomable:hover .hover-img { opacity: 0; } }
.card.open { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold); }
.jk-layout.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(520px, 46%); gap: 20px; align-items: start; }
.jk-layout.split .grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.jk-side { display: none; }
.jk-layout.split .jk-side { display: block; position: sticky; top: 76px; max-height: calc(100dvh / var(--z, 1) - 92px); overflow-y: auto; padding: 18px; border-radius: var(--r-xl); border: 1px solid var(--line); background: var(--bg-2); scrollbar-width: thin; }
.detail.embedded { grid-template-columns: 1fr; }
.detail.embedded .gallery { position: static; grid-template-columns: 60px 1fr; }
.jk-side .two-col { grid-template-columns: 1fr; }
.profit { font-weight: 600; color: var(--approve); font-size: 13px; }
.profit.neg { color: var(--reject); }

/* product: profit, comments, history */
.profit-box .big-profit { font-family: var(--serif); font-size: 30px; color: var(--approve); display: inline-flex; align-items: baseline; gap: 6px; }
.profit-box .big-profit small { font: 600 13px var(--sans); color: var(--muted); }
.big-profit.neg { color: var(--reject); }
.profit-line { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.money-in { display: inline-flex; align-items: center; gap: 4px; }
.money-in b { color: var(--muted); font-weight: 500; }
.money-in.sm input { width: 92px; min-height: 34px; padding: 5px 9px; text-align: right; }
.quick-actions { grid-template-columns: repeat(4, 1fr); }
.comments { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.comments li { display: flex; gap: 10px; }
.comments p { margin: 2px 0 0; white-space: pre-wrap; font-size: 14px; }
.mention { color: var(--gold-text); }
.comment-form { display: grid; gap: 8px; margin-top: 10px; }
.comment-form .btn { justify-self: end; }
.mention-wrap { position: relative; }
.mention-list { position: absolute; left: 0; bottom: calc(100% + 4px); z-index: 10; list-style: none; margin: 0; padding: 4px; min-width: 220px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); box-shadow: var(--shadow-lg); }
.mention-list li { padding: 7px 10px; border-radius: 6px; cursor: pointer; font-size: 13.5px; }
.mention-list li.on, .mention-list li:hover { background: color-mix(in srgb, var(--gold) 14%, var(--surface)); }
.activity { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; font-size: 13.5px; }
.activity li { display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; padding: 7px 0; border-bottom: 1px solid var(--line); }
.activity li small { margin-left: auto; }
.activity a { color: var(--gold-text); }

/* boards */
.boards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.board-card { display: grid; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface); overflow: hidden; transition: all .2s; }
.board-card:hover { border-color: var(--gold); transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.bc-covers { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; aspect-ratio: 4/3; gap: 2px; background: var(--surface-2); }
.bc-covers img, .bc-covers i { width: 100%; height: 100%; object-fit: cover; background: var(--surface-3); display: block; }
.bc-body { display: grid; gap: 4px; padding: 12px 14px; }
.bc-body b { font-family: var(--serif); font-size: 21px; }
.bc-body small { color: var(--muted); }
.bc-body .pill { justify-self: start; }
.board-pick { display: grid; gap: 6px; margin: 12px 0; max-height: 50vh; overflow-y: auto; }
.bp-item { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: var(--r); border: 1px solid var(--line); text-align: left; width: 100%; }
.bp-item:hover { border-color: var(--gold); }
.bp-item > span:nth-child(2) { flex: 1; display: grid; }
.bp-item small { color: var(--muted); }
.bp-covers { display: flex; width: 64px; height: 44px; border-radius: 8px; overflow: hidden; background: var(--surface-2); align-items: center; justify-content: center; color: var(--muted); }
.bp-covers img { flex: 1; min-width: 0; height: 100%; object-fit: cover; }
.new-board { grid-template-columns: 1fr auto; }
.share-box { display: grid; grid-template-columns: minmax(220px, 1fr) 2fr; gap: 10px 20px; align-items: center; padding: 16px 18px; border-radius: var(--r-lg); border: 1px solid color-mix(in srgb, var(--gold) 40%, var(--line)); background: color-mix(in srgb, var(--gold) 6%, var(--surface)); margin-bottom: 18px; }
.share-box > div:nth-child(odd) { display: grid; gap: 2px; }
.share-box b { display: inline-flex; gap: 6px; align-items: center; }
.copy-row { display: flex; gap: 6px; }
.copy-row input { min-height: 34px; font-size: 13px; }
#bTitle[contenteditable]:hover, #bTitle[contenteditable]:focus { outline: 1px dashed var(--gold); outline-offset: 4px; border-radius: 6px; }

/* insights */
.tabs-line { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; scrollbar-width: none; }
.tabs-line a { display: inline-flex; align-items: center; gap: 7px; padding: 10px 14px; color: var(--muted); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs-line a:hover { color: var(--text); }
.tabs-line a.on { color: var(--text); border-bottom-color: var(--gold); }
.trend-rows { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.trend-rows li { display: grid; grid-template-columns: minmax(90px, 1fr) auto auto auto; gap: 12px; align-items: center; padding: 6px 0; font-size: 14px; border-bottom: 1px solid var(--line); }
.trend-rows li:last-child { border-bottom: 0; }
.tr-name { display: flex; align-items: center; gap: 7px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trend-rows .hb-track { width: 110px; }
.chg { font-size: 12px; font-weight: 700; min-width: 56px; text-align: right; color: var(--muted); }
.chg.up { color: var(--approve); } .chg.down { color: var(--reject); }
.topic-days { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.topic-days li { display: grid; grid-template-columns: 86px 1fr; gap: 10px; align-items: start; }
.topic-days li > span:last-child { display: flex; flex-wrap: wrap; gap: 5px; }
.comp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.comp { padding: 16px 18px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); display: grid; gap: 10px; align-content: start; }
.comp-name { font-family: var(--serif); font-size: 22px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.comp-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.comp-stats span { display: grid; }
.comp-stats b { font-family: var(--serif); font-size: 21px; }
.comp-stats small { color: var(--muted); font-size: 11px; }
.comp-latest { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.comp-latest a { display: grid; gap: 2px; font-size: 11.5px; color: var(--muted); }
.comp-latest img { width: 100%; aspect-ratio: 4/5; object-fit: cover; border-radius: 8px; background: var(--surface-2); }
.bands { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.bands li { display: grid; grid-template-columns: minmax(110px, 160px) 1fr auto; gap: 14px; align-items: center; font-size: 13.5px; }
.band { position: relative; height: 16px; }
.band .whisker { position: absolute; top: 7px; height: 2px; background: var(--line-2); }
.band .box { position: absolute; top: 2px; height: 12px; border-radius: 4px; background: linear-gradient(90deg, var(--chart-2), var(--chart)); }
.band .med { position: absolute; top: 0; width: 2px; height: 16px; background: var(--text); }
.band-nums { color: var(--muted); white-space: nowrap; }
.band-nums b { color: var(--text); }
.rep-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.rep-item { display: flex; gap: 10px; align-items: center; padding: 6px; border-radius: var(--r); border: 1px solid var(--line); }
.rep-item:hover { border-color: var(--gold); }
.rep-item img { width: 52px; height: 62px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.rep-item span { display: grid; min-width: 0; font-size: 13px; }
.rep-item b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rep-item small { color: var(--muted); }

/* health */
.health { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.hc { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.hc > span:last-child { display: grid; gap: 2px; }
.hc small { color: var(--muted); font-size: 12.5px; }
.hc-dot { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; background: var(--surface-3); color: var(--muted); }
.hc.ok .hc-dot { background: color-mix(in srgb, var(--approve) 20%, transparent); color: var(--approve); }
.hc.bad { border-color: color-mix(in srgb, var(--reject) 45%, var(--line)); }
.hc.bad .hc-dot { background: color-mix(in srgb, var(--reject) 20%, transparent); color: var(--reject); }

/* settings v2 */
.cost-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.cost-grid .money-in input { width: 100%; }
.switch { position: relative; display: inline-block; width: 42px; height: 24px; flex-shrink: 0; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch i { position: absolute; inset: 0; border-radius: 24px; background: var(--surface-3); transition: background .2s; }
.switch i::after { content: ''; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.switch input:checked + i { background: var(--gold); }
.switch input:checked + i::after { transform: translateX(18px); }
.switch input:focus-visible + i { outline: 2px solid var(--gold); outline-offset: 2px; }
.sched { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 0; border-bottom: 1px solid var(--line); }
.sched select, .sched input[type=time] { width: auto; min-height: 36px; }
.days { display: inline-flex; gap: 3px; }
.day { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); font-size: 12px; font-weight: 600; color: var(--muted); }
.day.on { background: var(--gold); border-color: var(--gold); color: #1b140a; }
.people { display: grid; gap: 4px; margin-top: 8px; }
.person { display: grid; grid-template-columns: auto 1fr auto auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.person.off { opacity: .55; }
.person .who { display: grid; min-width: 0; }
.person .who small { color: var(--muted); font-size: 12.5px; }
.person select { width: auto; min-height: 34px; }
.person-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.backups { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.backups li { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.backups li > span { flex: 1; display: grid; min-width: 0; }
.backups b { font-weight: 500; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; }

/* tech pack + print */
.tp-bar { margin-bottom: 16px; }
.techpack { background: #fff; color: #1a1612; border-radius: var(--r-lg); padding: 36px; max-width: 1000px; margin: 0 auto; box-shadow: var(--shadow-lg); }
.tp-head { display: flex; gap: 14px; align-items: center; border-bottom: 2px solid #c9a45c; padding-bottom: 14px; margin-bottom: 18px; }
.tp-head h1 { font-size: 30px; color: #1a1612; }
.tp-head small { color: #7c7265; text-transform: uppercase; letter-spacing: .12em; font-size: 11px; }
.tp-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 18px; }
.tp-photos img { width: 100%; aspect-ratio: 4/5; object-fit: cover; border-radius: 8px; border: 1px solid #e4dccd; }
.tp-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.tp-table, .tp-measure { width: 100%; border-collapse: collapse; font-size: 13px; }
.tp-table th, .tp-table td, .tp-measure th, .tp-measure td { border: 1px solid #e4dccd; padding: 7px 9px; text-align: left; vertical-align: top; }
.tp-table th { width: 38%; background: #f7f2ea; font-weight: 600; }
.tp-measure td { height: 26px; }
.tp-notes h3 { margin: 14px 0 6px; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: #8a6526; }
.tp-notes p, .tp-notes li { font-size: 13px; }
.tp-desc { white-space: pre-line; color: #4a4239; }
@media print {
  @page { margin: 12mm; }
  body { background: #fff !important; }
  .sidebar, .topbar, .bottomnav, .tray, .toasts, .no-print, .ptr, .bulkbar { display: none !important; }
  .main-col { margin: 0 !important; }
  #app { padding: 0 !important; max-width: none; }
  .techpack { box-shadow: none; padding: 0; border-radius: 0; }
  .kpi, .panel, .card-box { break-inside: avoid; }
}

/* v2 responsive */
@media (max-width: 1100px) { html:not(.fit) .tp-cols { grid-template-columns: 1fr; } html:not(.fit) .share-box { grid-template-columns: 1fr; } }
@media (max-width: 860px) {
  .bottomnav { grid-template-columns: repeat(5, 1fr); }
  .qa { padding: 10px 2px; font-size: 11px; }
  .person { grid-template-columns: auto 1fr; }
  .person select, .person-actions { grid-column: 2; justify-content: flex-start; }
  .comp-stats b { font-size: 18px; }
  .trend-rows li { grid-template-columns: minmax(80px, 1fr) auto auto; }
  .trend-rows li .spark, .trend-rows .hb-track { display: none; }
  .bands li { grid-template-columns: 1fr; gap: 4px; }
  .techpack { padding: 16px; }
  .tp-photos { grid-template-columns: repeat(2, 1fr); }
  .nl-hint { left: 0; }
  #photoBtn { flex: 1; }
}

/* ==========================================================================
   Containment: nothing may spill out of its box, at any screen size
   ========================================================================== */
.panels, .kpis, .settings-grid, .two-col, .detail, .hunt-start, .health, .comp-grid, .boards, .rep-list, .similar, .cost-grid { min-width: 0; }
.panels > *, .kpis > *, .settings-grid > *, .two-col > *, .detail > *, .grid > *, .boards > *, .comp-grid > *, .health > *, .card-box, .panel, .kpi, .comp, .hc, .run, .board-card { min-width: 0; }
.panels { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.settings-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.boards { grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); }
.comp-grid { grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); }
.health { grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); }
.similar { grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); }
.rep-list { grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); }
/* long words / links wrap instead of pushing the box wider */
.kv span:last-child, .desc, .card-box p, .hint, .run-error, .steps small, .hc small, .notif span, .comments p, .activity li, .tp-table td, .p-title, .qv-title, .cmp-title, .bc-body b, .comp-name { overflow-wrap: anywhere; }
.btn { max-width: 100%; }
.btn > span { overflow: hidden; text-overflow: ellipsis; }

/* insights rows: name shrinks, numbers stay */
.trend-rows li { grid-template-columns: minmax(0, 1fr) auto auto auto; gap: 10px; }
.trend-rows .spark { width: 84px; }
.trend-rows .hb-track { width: 90px; }
.tr-name { min-width: 0; }
@media (max-width: 1280px) { html:not(.fit) .trend-rows .spark { width: 64px; } html:not(.fit) .chg { min-width: 48px; } }

/* sidebar search never wraps */
.side-search span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* compare tray fits on phones */
.tray { max-width: calc(100vw - 16px); }
.tray > * { min-width: 0; flex-shrink: 0; }
.tray-items { flex-shrink: 1; overflow: hidden; }

/* tech pack table on small screens */
.tp-table { table-layout: fixed; }
.tp-cols > * { min-width: 0; }

@media (max-width: 1180px) {
  html:not(.fit) .panels { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  html:not(.fit) .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .panels, .settings-grid { grid-template-columns: minmax(0, 1fr); }
  .tray-label { display: none; }
  .tray-slot { width: 36px; height: 44px; }
}

/* ---------- simpler, clearer ---------- */
.lead-line { color: var(--text-2); margin-top: 8px; font-size: 15px; }
.lead-line b { color: var(--gold-text); }
.card-meta { align-items: center; gap: 8px; flex-wrap: wrap; }
.card-profit { font-size: 13px; font-weight: 700; color: var(--approve); white-space: nowrap; }
.card-profit.neg { color: var(--reject); }
.card-line { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-2); min-height: 20px; min-width: 0; }
.card-line > span:first-of-type { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.card-extra { margin-left: auto; display: inline-flex; gap: 8px; color: var(--muted); flex-shrink: 0; }
.card-extra span { display: inline-flex; align-items: center; gap: 3px; }
.qa-more { position: relative; }
.qa-more summary { list-style: none; cursor: pointer; height: 100%; }
.qa-more summary::-webkit-details-marker { display: none; }
.qa-more[open] summary { border-color: var(--gold); color: var(--text); }
.qa-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; min-width: 250px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-lg); padding: 6px; display: grid; animation: pop .15s var(--ease); }
.qa-menu a, .qa-menu button { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r-sm); font-size: 14px; text-align: left; width: 100%; color: var(--text); }
.qa-menu a:hover, .qa-menu button:hover { background: var(--surface-2); }
.qa-menu .on { color: var(--gold-text); }
.setup { padding: 20px 22px; border-radius: var(--r-lg); border: 1px solid color-mix(in srgb, var(--gold) 45%, var(--line)); background: linear-gradient(135deg, color-mix(in srgb, var(--gold) 10%, var(--surface)), var(--surface)); margin-bottom: 16px; }
.setup-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.setup-head h2 { font-family: var(--serif); font-size: 26px; }
.setup-head > div { flex: 1; min-width: 200px; }
.setup-bar { width: 160px; height: 8px; border-radius: 8px; background: var(--surface-3); overflow: hidden; }
.setup-bar i { display: block; height: 100%; background: var(--gold); }
.setup-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.setup-list li { display: flex; align-items: center; gap: 14px; padding: 10px 0; border-top: 1px solid var(--line); }
.setup-list li.done { opacity: .55; }
.setup-n { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; border: 1px solid var(--gold); color: var(--gold-text); font-weight: 700; font-size: 13px; }
.setup-list li.done .setup-n { background: var(--approve); border-color: var(--approve); color: #fff; }
.setup-text { flex: 1; display: grid; min-width: 0; }
.setup-text small { color: var(--muted); }
.setup-text .how { color: var(--text-2); margin-top: 2px; }
@media (max-width: 860px) {
  .setup-list li { flex-wrap: wrap; }
  .setup-list li .btn { margin-left: 42px; }
  .setup-bar { width: 100%; order: 3; }
  .lead-line { font-size: 14px; }
  .card-extra { display: none; }
  .qa-menu { right: auto; left: 0; }
}
/* board covers: photos never stretch the card */
.board-card { grid-template-columns: minmax(0, 1fr); }
.bc-covers { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); }
.bc-covers img, .bc-covers i { min-width: 0; min-height: 0; }
.bp-covers img { min-width: 0; }
@media (max-width: 860px) { .copy-row { flex-wrap: wrap; } .copy-row input { flex-basis: 100%; } }
/* the top bar already has the hunt buttons on wide screens */
.head-actions.home-hunts { display: none; }
@media (max-width: 860px) { .head-actions.home-hunts { display: flex; width: 100%; } }
/* filters live behind the Filters button on every screen size */
.filters-toggle { display: inline-flex; }
.filters { display: none; }
.filters.open { display: grid; }


/* ==========================================================================
   Nocturne theme — look based on the HorizonX "Nocturne Studio" dashboard
   (near-black, grey borders, white primary button, Inter, calm and clean)
   ========================================================================== */
:root {
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --serif: var(--sans);
  --r-sm: 6px; --r: 8px; --r-lg: 12px; --r-xl: 14px;
  --approve: #4ade80; --reject: #f87171; --warn: #fbbf24;
}
:root, [data-theme="dark"] {
  --bg: #0a0a0a; --bg-2: #0e0e0e;
  --surface: #121212; --surface-2: #1a1a1a; --surface-3: #242424;
  --line: #222222; --line-2: #2e2e2e;
  --text: #f5f5f5; --text-2: #d4d4d4; --muted: #8f8f8f;
  --gold: #f5f5f5; --gold-2: #e5e5e5; --gold-3: #a3a3a3; --gold-text: #f5f5f5;
  --on-gold: #0a0a0a;
  --shadow: none; --shadow-lg: 0 24px 60px rgba(0,0,0,.6);
  --glass: rgba(10,10,10,.82);
  --skel: #161616; --skel-2: #1f1f1f;
  --chart: #e5e5e5; --chart-2: #737373;
  --seg-0: #f5f5f5; --seg-1: #a3a3a3; --seg-2: #737373; --seg-3: #525252; --seg-4: #3a3a3a; --seg-5: #2a2a2a;
  --tile: #1c1c1c; --tile-2: #161616;
  --hatch: rgba(255,255,255,.07);
}
[data-theme="light"] {
  --bg: #fafafa; --bg-2: #f4f4f4;
  --surface: #ffffff; --surface-2: #f4f4f5; --surface-3: #e9e9eb;
  --line: #e7e7e7; --line-2: #dadada;
  --text: #0a0a0a; --text-2: #3f3f46; --muted: #71717a;
  --gold: #0a0a0a; --gold-2: #27272a; --gold-3: #52525b; --gold-text: #0a0a0a;
  --on-gold: #ffffff;
  --shadow: 0 1px 2px rgba(0,0,0,.04); --shadow-lg: 0 20px 50px rgba(0,0,0,.12);
  --glass: rgba(250,250,250,.85);
  --skel: #efefef; --skel-2: #f7f7f7;
  --chart: #0a0a0a; --chart-2: #a1a1aa;
  --seg-0: #0a0a0a; --seg-1: #52525b; --seg-2: #8e8e96; --seg-3: #b4b4bb; --seg-4: #d4d4d8; --seg-5: #e9e9eb;
  --tile: #f4f4f5; --tile-2: #fafafa;
  --hatch: rgba(0,0,0,.06);
}

/* type */
body { font: 14.5px/1.55 var(--sans); letter-spacing: -.006em; }
h1 { font-size: clamp(26px, 2.6vw, 32px); font-weight: 500; letter-spacing: -.025em; }
h1, h2, h3, .block-title, .card-box h2, .modal-title, .empty h2, .setup-head h2, .group-h { font-weight: 500; letter-spacing: -.015em; }
.block-title { font-size: 20px; margin-top: 28px; }
.card-box h2, .setup-head h2, .panel-head h2 { font-size: 17px; }
.modal-title, .qv-title { font-size: 21px; }
.eyebrow { text-transform: none; letter-spacing: 0; font-size: 13px; font-weight: 500; color: var(--muted); }
.lead-line { color: var(--text-2); margin-top: 6px; }
.price, .p-price, .qv-price, .rv-price, .kpi b, .big-profit, .live-found b, .run-found b, .sim-body b, .bc-body b, .comp-stats b { font-weight: 500; letter-spacing: -.02em; }
.price { font-size: 19px; }
.p-price { font-size: 32px; }

/* surfaces: thin grey borders, 12px corners, no glow */
.card-box, .panel, .kpi, .card, .last-run, .filters, .compare-wrap, .setup, .live-card, .run, .hunt-card, .tray, .bulkbar {
  background: var(--surface) !important; background-image: none !important; border: 1px solid var(--line) !important; box-shadow: var(--shadow); border-radius: var(--r-lg);
}
.modal, .menu { background: var(--surface); border: 1px solid var(--line-2); }
.card:hover { transform: none; border-color: var(--line-2) !important; box-shadow: var(--shadow-lg); }
.card-media { border-radius: 8px; margin: 8px 8px 0; }
.card.skel .card-media { margin: 0; }
.panel { padding: 22px 24px; }
.panel-head { align-items: flex-start; }

/* buttons: white primary, dark ghost, 8px corners */
.btn { border-radius: var(--r); min-height: 38px; padding: 0 14px; font-weight: 500; background: var(--surface); border: 1px solid var(--line-2); color: var(--text); }
.btn:hover { border-color: color-mix(in srgb, var(--text) 35%, var(--line-2)); background: var(--surface-2); }
.btn.static { pointer-events: none; color: var(--text-2); }
.btn.gold { background: var(--text); color: var(--on-gold); border-color: var(--text); box-shadow: none; font-weight: 500; }
.btn.gold:hover { background: color-mix(in srgb, var(--text) 86%, var(--bg)); filter: none; }
.btn.ghost { background: var(--surface); }
.btn.approve:hover, .btn.approve.active { color: #052e12; }
.btn.on { border-color: var(--text); color: var(--text); background: var(--surface-2); }
.icon-btn { border-radius: var(--r); border: 1px solid transparent; }
.icon-btn:hover { background: var(--surface-2); border-color: var(--line); }
.link-btn { color: var(--text-2); font-size: 13.5px; }
.link-btn:hover { color: var(--text); text-decoration: none; }

/* things that sat on gold now sit on white/black */
.nav-badge, .badge-n, .new-banner, .skip, .tool:hover, .tool.on, .select-box input:checked + span { color: var(--on-gold) !important; }
.avatar { background: var(--surface-3); color: var(--text); font-weight: 600; font-size: 13px; border: 1px solid var(--line-2); }
.toast { background: var(--surface-2); color: var(--text); border: 1px solid var(--line-2); }
.toast-act, [data-theme="light"] .toast-act { color: var(--text); text-decoration: underline; }

/* forms */
input[type=text], input[type=search], input[type=number], input[type=url], input[type=password], input:not([type]), select, textarea {
  border-radius: var(--r); background: var(--surface); border-color: var(--line-2); min-height: 40px; }
input:focus, select:focus, textarea:focus { border-color: var(--text-2); box-shadow: 0 0 0 3px color-mix(in srgb, var(--text) 10%, transparent); }
.search input, .toolbar select { border-radius: var(--r); }
.segmented { border-radius: 10px; background: var(--surface); border-color: var(--line); padding: 3px; }
.segmented button { border-radius: 7px; }
.segmented button.on { background: var(--surface-3); color: var(--text); box-shadow: none; }
.segmented button.on small { color: var(--text-2); }
.fchip, .chip { background: var(--surface); border-color: var(--line-2); border-radius: var(--r); }
.fchip.on { background: var(--text); border-color: var(--text); color: var(--on-gold); }
.fchip.on small { color: inherit; opacity: .7; }
.flabel { letter-spacing: .1em; font-size: 11px; }
.check input { accent-color: var(--text); }
.chip.sm { padding: 2px 8px; font-size: 12px; color: var(--text-2); }
.pill, .mini { background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; color: var(--text-2); }
.mini.topic, .pill.gold, .chip.gold, .score, .card-title:hover, .topics li a:hover, .cmp-title:hover { color: var(--text); }
.badge { border-radius: 6px; }
.badge.best { color: var(--text); }
.status-pill { border-radius: 6px; }
.status-pill.started { background: var(--surface-3); color: var(--text); }
:focus-visible { outline-color: var(--text-2); }
::selection { background: color-mix(in srgb, var(--text) 25%, transparent); }
.pulse, .live-dot { background: var(--approve); }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--approve) 60%, transparent); } 70% { box-shadow: 0 0 0 9px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

/* sidebar: workspace box, search, menu, boards, user */
.sidebar { width: var(--sidebar); background: var(--bg-2); border-right: 1px solid var(--line); padding: 16px 14px 14px; gap: 6px; }
.brand.ws { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: var(--r-lg); background: var(--surface); margin-bottom: 10px; }
.brand.ws img { border-radius: 10px; }
.brand.ws > span { flex: 1; min-width: 0; }
.brand.ws b { font-size: 18px; font-weight: 500; letter-spacing: -.02em; }
.brand.ws small { display: block; font-size: 10px; letter-spacing: .14em; color: var(--muted); margin-top: 3px; }
.brand.ws .ico { color: var(--muted); }
.side-search { border: 0; background: none; padding: 9px 12px; border-radius: var(--r); color: var(--text-2); font-size: 14.5px; gap: 12px; margin: 0; width: 100%; }
.side-search:hover { background: var(--surface-2); color: var(--text); border: 0; }
.side-search kbd { background: var(--surface); }
.side-nav { gap: 2px; padding: 8px 0 10px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-top: 4px; }
.side-nav a, .side-btn { padding: 9px 12px; border-radius: var(--r); color: var(--text-2); font-weight: 400; font-size: 14.5px; border: 1px solid transparent; gap: 12px; }
.side-nav a .ico, .side-btn .ico { color: var(--muted); }
.side-nav a:hover, .side-btn:hover { background: var(--surface-2); color: var(--text); }
.side-nav a.on { background: var(--surface-2); border-color: var(--line-2); color: var(--text); box-shadow: none; font-weight: 500; }
.side-nav a.on::before { display: none; }
.side-nav a.on .ico { color: var(--text); }
.nav-badge { background: var(--surface-3); color: var(--text) !important; border: 1px solid var(--line-2); border-radius: 6px; font-weight: 600; }
.side-sec { display: grid; gap: 1px; padding-top: 8px; }
.side-label { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px 6px; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.side-label em { font-style: normal; letter-spacing: 0; }
.side-board { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: var(--r); font-size: 14px; color: var(--text-2); }
.side-board > span:nth-child(2) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-board > .ico:last-child { color: var(--muted); opacity: 0; transition: opacity .15s; }
.side-board:hover { background: var(--surface-2); color: var(--text); }
.side-board:hover > .ico:last-child { opacity: 1; }
.side-board.add > .ico { opacity: 1; }
.side-board.add { color: var(--muted); }
.side-foot { border-top: 1px solid var(--line); padding-top: 8px; }
.side-user { border-top: 0; margin-top: 6px; padding: 10px; border: 1px solid var(--line); background: var(--surface); }
.side-user small { text-transform: none; }
.side-user .ico { color: var(--muted); }

/* main area */
.main-col { background: var(--bg); }
.topbar { background: var(--glass); border-bottom: 1px solid var(--line); }
body[data-route="home"] .topbar [data-hunt] { display: none; }
.live-pill { border: 1px solid var(--line-2); background: var(--surface); color: var(--text-2); border-radius: var(--r); }
#app { max-width: 1520px; }
.page-head { align-items: flex-start; }

/* KPI: words on the left, a stacked icon tile on the right behind a divider */
.kpis { gap: 16px; }
.kpi { display: grid; grid-template-columns: 1fr auto; padding: 0; gap: 0; overflow: hidden; }
a.kpi:hover { transform: none; border-color: var(--line-2) !important; background: var(--surface-2) !important; }
.kpi-main { display: grid; gap: 6px; padding: 20px 22px; min-width: 0; }
.kpi-label { font-size: 14.5px; color: var(--text-2); }
.kpi b { font-size: 32px; line-height: 1.1; color: var(--text); font-weight: 500; }
.kpi small { color: var(--muted); font-size: 13px; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.kpi small em { font-style: normal; color: var(--text-2); }
.kpi-art { display: grid; place-items: center; width: 104px; border-left: 1px solid var(--line); }
.kpi-tile { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 14px; background: var(--tile); border: 1px solid var(--line-2); color: var(--text-2);
  box-shadow: 5px 5px 0 -1px var(--tile-2), 5px 5px 0 0 var(--line-2); font-style: normal; transform: translate(-3px, -3px); }
.kpi.skel { height: 120px; }

/* home: chart + coming up */
.home-row { display: grid; grid-template-columns: minmax(0, 2.6fr) minmax(300px, 1fr); gap: 16px; margin: 16px 0; }
.lc-legend { display: flex; align-items: center; gap: 16px; font-size: 13px; color: var(--text-2); flex-wrap: wrap; }
.lc-legend span { display: inline-flex; align-items: center; gap: 7px; }
.lc-legend i { width: 16px; height: 0; border-top: 2px solid var(--text); display: inline-block; }
.lc-legend i.lg-dash { border-top: 2px dashed var(--muted); }
.big-line { margin: 4px 0 14px; color: var(--text-2); font-size: 14px; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.big-line b { font-size: 26px; font-weight: 500; color: var(--text); letter-spacing: -.02em; }
.big-line .up { display: inline-flex; align-items: center; gap: 3px; }
.lchart { display: grid; grid-template-columns: 34px 1fr; gap: 6px; }
.lc-y { display: flex; flex-direction: column; justify-content: space-between; font-size: 12px; color: var(--muted); padding-bottom: 22px; }
.lc-y span { line-height: 1; transform: translateY(-2px); }
.lc-plot { position: relative; min-width: 0; padding-bottom: 22px; }
.lc-plot svg { width: 100%; display: block; overflow: visible; }
.lc-line { fill: none; stroke: var(--text); stroke-width: 2.2; }
.lc-line2 { fill: none; stroke: var(--muted); stroke-width: 1.6; stroke-dasharray: 5 5; }
.lc-hatch { stroke: var(--hatch); stroke-width: 3; }
.lc-x { position: absolute; left: 0; right: 0; bottom: 0; height: 18px; }
.lc-x span { position: absolute; transform: translateX(-50%); font-size: 12px; color: var(--muted); white-space: nowrap; }
.lc-x span:first-child { transform: none; }
.lc-x span:last-child { transform: translateX(-100%); }
.coming { display: flex; flex-direction: column; }
.cu-day { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 10px 0 4px; display: flex; align-items: center; gap: 10px; }
.cu-day::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.cu-item { display: grid; grid-template-columns: 38px 1fr auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.cu-item:last-of-type { border-bottom: 0; }
.cu-item b { display: block; font-weight: 500; font-size: 14px; }
.cu-item small { color: var(--muted); font-size: 12.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cu-item em { font-style: normal; color: var(--text-2); font-size: 12.5px; white-space: nowrap; }
.cu-ic { width: 38px; height: 38px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--surface-2); display: grid; place-items: center; color: var(--text-2); }
a.cu-item:hover b { text-decoration: underline; text-underline-offset: 3px; }
.cu-foot { margin-top: auto; padding-top: 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12.5px; color: var(--muted); }
.cu-foot > span { display: inline-flex; align-items: center; gap: 7px; }
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; background: var(--muted); }
.dot.ok { background: var(--approve); } .dot.bad { background: var(--reject); }

/* home: jacket cards like Nocturne's project cards */
.block-panel { margin-bottom: 16px; }
.row-title { display: flex; align-items: center; gap: 10px; }
.pcards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.pcard { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 14px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--bg); min-width: 0; }
.pcard-img { display: block; aspect-ratio: 16/11; border-radius: 8px; overflow: hidden; background: var(--surface-2); margin-bottom: 8px; }
.pcard-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease); }
.pcard:hover .pcard-img img { transform: scale(1.03); }
.pcard-top { position: absolute; top: 22px; right: 22px; display: flex; gap: 6px; }
.pcard-top .pill { background: var(--glass); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.pcard-title { font-size: 17px; font-weight: 500; letter-spacing: -.015em; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pcard-title:hover { text-decoration: underline; text-underline-offset: 3px; }
.pcard-sub { color: var(--muted); font-size: 13.5px; }
.pcard-meta { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.pcard-meta b { font-size: 16px; font-weight: 500; color: var(--text); }
.pcard-bar { height: 3px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.pcard-bar i { display: block; height: 100%; background: var(--text); border-radius: 3px; }
.pcard-actions { display: flex; gap: 8px; margin-top: 12px; align-items: center; }
.pcard-actions .btn.block { margin: 0; }
.pcard-actions .btn { flex: 1; }
.pcard-actions .icon-btn { border-color: var(--line-2); width: 38px; height: 38px; }

/* setup checklist */
.setup-bar { background: var(--surface-3); }
.setup-bar i { background: var(--text); }
.setup-n { border-color: var(--line-2); }
.setup-list li.done .setup-n { background: var(--surface-3); color: var(--approve); }

/* charts */
.bar { fill: var(--chart); opacity: .9; }
.hb-track { background: var(--surface-2); height: 6px; }
.hb-track i, .band .box { background: var(--chart); }
.donut-total { font-weight: 500; }

/* login */
.login-art { background: radial-gradient(ellipse at 50% 0%, #3a3a3a 0%, #0d0d0d 55%, #050505 100%); color: #f5f5f5; }
.login-art p { letter-spacing: .02em; font-weight: 500; }

/* modals */
.modal { border-radius: var(--r-xl); }
.modal-back { background: rgba(0,0,0,.6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.empty .ico { color: var(--muted); }

@media (max-width: 1180px) {
  html:not(.fit) .home-row { grid-template-columns: 1fr; }
  html:not(.fit) .pcards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  html:not(.fit) .kpi-art { width: 84px; }
}
@media (max-width: 860px) {
  .kpi-main { padding: 14px; }
  .kpi b { font-size: 24px; }
  .kpi-art { width: 64px; }
  .kpi-tile { width: 40px; height: 40px; border-radius: 10px; }
  .pcards { grid-template-columns: 1fr; }
  .panel { padding: 16px; }
  .lc-legend { width: 100%; }
  .bottomnav a.on { color: var(--text); }
  body[data-route="home"] .topbar [data-hunt] { display: inline-flex; }
  .home-head .head-actions { display: none; }
  .card-media { margin: 5px 5px 0; }
}
@media (min-width: 861px) { :root { --sidebar: 268px; } }
@media (min-width: 861px) and (max-width: 1500px) {
  html:not(.fit) .kpi-art { width: 72px; }
  html:not(.fit) .kpi-tile { width: 42px; height: 42px; border-radius: 11px; }
  html:not(.fit) .kpi-main { padding: 18px; }
  html:not(.fit) .kpi b { font-size: clamp(22px, 2vw, 30px); }
}
@media (max-width: 560px) { .kpi { grid-template-columns: 1fr; } .kpi-art { display: none; } .kpi b { font-size: 24px; } }

/* calmer spacing: fewer things per row, more room around them */
#app { padding-top: clamp(24px, 3.4vw, 44px); }
.page-head { margin-bottom: 28px; }
.kpis { gap: 20px; margin-bottom: 24px; }
.home-row { gap: 20px; margin: 0 0 24px; }
.panel { padding: 26px 28px; }
.panel-head { margin-bottom: 18px; }
.block-panel { margin-bottom: 24px; }
.pcards { gap: 20px; }
.panels { gap: 20px; }
.panels.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.setup { padding: 20px 26px; margin-bottom: 24px; }
.setup-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.setup-head > div { flex: 1; min-width: 220px; }
.setup-list { margin-top: 16px; }
.more-link { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 14px; padding: 4px 0 8px; }
.more-link:hover { color: var(--text); }
.chart-x span { font-size: 11px; overflow: hidden; text-overflow: ellipsis; padding: 0 2px; text-align: center; }
.hbars { gap: 14px; }
.hbars li { grid-template-columns: minmax(90px, 140px) 1fr auto; }
.legend { gap: 9px; }
.donut-wrap { gap: 28px; }
@media (max-width: 1000px) { html:not(.fit) .panels.two { grid-template-columns: 1fr; } }
@media (max-width: 860px) { .panel { padding: 18px; } .kpis { gap: 12px; } }
@media (max-width: 1400px) { html:not(.fit) .kpi { grid-template-columns: 1fr; } html:not(.fit) .kpi-art { display: none; } html:not(.fit) .kpi-main { padding: 20px 22px; } }
@media (min-width: 861px) and (max-height: 860px) {
  html:not(.fit) .sidebar { padding-top: 12px; gap: 2px; }
  html:not(.fit) .brand.ws { padding: 8px 10px; margin-bottom: 6px; }
  html:not(.fit) .side-nav { padding: 4px 0 6px; }
  html:not(.fit) .side-nav a, html:not(.fit) .side-btn, html:not(.fit) .side-search { padding-top: 7px; padding-bottom: 7px; }
  html:not(.fit) .side-board { padding-top: 6px; padding-bottom: 6px; }
  html:not(.fit) .side-sec .side-board:nth-of-type(n+4):not(.add) { display: none; }
  html:not(.fit) .side-user { padding: 7px 10px; }
}

/* team: per-person permissions */
.person .access { display: grid; justify-items: end; gap: 2px; text-align: right; }
.person .access small { color: var(--muted); font-size: 12px; }
.role-tag { font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line-2); color: var(--text-2); }
.role-tag.owner { background: var(--text); color: var(--on-gold); border-color: var(--text); }
.modal.wide:has(.perm-grid) { width: min(1040px, 100%); }
.row3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 6px; }
.perm-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 16px; }
.perm-top .chips .chip { cursor: pointer; }
.perm-top .chip.on { background: var(--text); color: var(--on-gold); border-color: var(--text); }
.perm-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 10px; }
.perm-box { margin: 0; border: 1px solid var(--line-2); border-radius: var(--r-lg); padding: 14px 18px 12px; background: var(--surface); display: grid; gap: 2px; align-content: start; min-width: 0; }
.perm-box legend { float: left; width: 100%; font-weight: 600; font-size: 14.5px; padding: 0 0 8px; }
.perm-box .check { font-size: 14px; min-height: 30px; }
.perm-box .check.locked { opacity: .45; }
@media (max-width: 860px) { .perm-grid, .row3 { grid-template-columns: 1fr; } .person .access { justify-items: start; text-align: left; grid-column: 2; } }
@media (min-width: 861px) and (max-width: 1100px) { html:not(.fit) .perm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Morrow brand header (same style as Morrow Commerce) */
:root { --morrow: #3a57f7; }
[data-theme="dark"] { --morrow: #7088ff; }
.brand.ws { border: 0; background: none; padding: 6px 8px 14px; gap: 12px; margin-bottom: 4px; }
.brand.ws img { border-radius: 0; width: 42px; height: 42px; object-fit: contain; }
.brand.ws b { font-size: 21px; font-weight: 800; letter-spacing: -.01em; line-height: 1; }
.brand.ws small { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: .2em; color: var(--morrow); margin-top: 4px; }
.topbar .brand b { font-weight: 800; letter-spacing: -.01em; }
.topbar .brand img { border-radius: 0; object-fit: contain; }
.boot img { object-fit: contain; }
.login-art { background: radial-gradient(ellipse at 50% 20%, #24306b 0%, #0e1230 55%, #070914 100%); }
.login-art img { object-fit: contain; filter: drop-shadow(0 20px 40px rgba(20, 40, 160, .45)); }
.login-art p { font-weight: 800; letter-spacing: .04em; color: #fff; }
.login-art p span { color: #7088ff; letter-spacing: .2em; font-size: .7em; font-weight: 700; margin-left: 4px; }
.login-logo { object-fit: contain; border-radius: 0; }
.tp-head img { object-fit: contain; }

/* Fonts: Outfit (bold, geometric) for headings + numbers, Plus Jakarta Sans for text */
:root { --sans: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; --display: 'Outfit', 'Plus Jakarta Sans', system-ui, sans-serif; --serif: var(--display); }
body { font-family: var(--sans); font-size: 14.5px; letter-spacing: -.003em; }
h1, h2, h3, .block-title, .modal-title, .empty h2, .setup-head h2, .group-h, .panel-head h2, .card-box h2, .brand b, .brand.ws b,
.kpi b, .big-line b, .price, .p-price, .qv-price, .rv-price, .pcard-meta b, .pcard-title, .live-found b, .run-found b, .big-profit, .donut-total, .sim-body b, .bc-body b, .comp-stats b, .comp-name, .login-card h1, .login-art p { font-family: var(--display); }
h1 { font-weight: 700; letter-spacing: -.02em; }
.page-head h1 { font-size: clamp(28px, 2.8vw, 36px); }
h2, .panel-head h2, .card-box h2, .block-title, .modal-title, .setup-head h2 { font-weight: 700; letter-spacing: -.01em; }
.panel-head h2, .card-box h2 { font-size: 18px; }
h3 { font-weight: 700; }
.kpi b { font-weight: 700; letter-spacing: -.02em; }
.kpi-label { font-weight: 600; color: var(--text-2); }
.price, .p-price, .qv-price, .rv-price, .pcard-meta b, .big-line b { font-weight: 700; }
.pcard-title, .card-title { font-weight: 600; }
.brand.ws b { font-weight: 800; font-size: 22px; letter-spacing: 0; }
.side-nav a { font-weight: 500; }
.side-nav a.on { font-weight: 700; }
.side-label { font-weight: 700; }
.btn { font-weight: 600; }
.btn.gold { font-weight: 700; }
.segmented button.on, .tabs-line a.on { font-weight: 700; }
.lead-line { font-weight: 500; }
.eyebrow { font-weight: 600; }
.status-pill, .role-tag, .nav-badge { font-weight: 700; }
th { font-weight: 700; }
.cu-item b, .find b, .person .who b, .setup-text b { font-weight: 700; }
.also-at { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 6px; max-width: 520px; }
.also-at li { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.also-at a { display: inline-flex; gap: 6px; align-items: center; font-weight: 600; }

/* ---------- interactive charts: tooltip, hover highlight, click-through ---------- */
.ctip { position: fixed; z-index: 200; pointer-events: none; display: grid; gap: 2px; max-width: 260px; padding: 9px 12px; border-radius: 10px; background: var(--text); color: var(--bg); font: 500 12.5px/1.4 var(--sans); box-shadow: 0 12px 30px rgba(0,0,0,.25); }
.ctip b { font: 700 13px/1.3 var(--display); }
.ctip small { opacity: .65; font-size: 11px; margin-top: 4px; }
[data-tip] { cursor: default; outline: none; }
a [data-tip], [data-href] { cursor: pointer; }
.tr-link, .hb-row, .lg-row, .hbars li > a, .legend li > a { display: contents; color: inherit; }
/* bars */
.bar-hit { fill: transparent; }
.bar { transition: opacity .15s; }
.chart:has(.bar-col.hot) .bar { opacity: .3; }
.chart:has(.bar-col.hot) .bar-col.hot .bar { opacity: 1; }
.bar-col.hot .bar-hit { fill: color-mix(in srgb, var(--text) 6%, transparent); }
/* line chart: dashed guide + dot on the hovered day */
.lc-zone { fill: transparent; }
.lc-guide { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; opacity: 0; }
.lc-dot { stroke: var(--text); stroke-width: 9; stroke-linecap: round; opacity: 0; }
.lc-hit.hot .lc-guide, .lc-hit.hot .lc-dot, .lc-hit:focus .lc-guide, .lc-hit:focus .lc-dot { opacity: 1; }
/* rows: horizontal bars, trends, approvals, price bands, legend */
.hbars li, .trend-rows li, .bands li { border-radius: 8px; transition: background .15s; }
.hbars li { padding: 4px 8px; margin: 0 -8px; }
.trend-rows li { padding-left: 8px; padding-right: 8px; margin: 0 -8px; }
.bands li { padding: 6px 8px; margin: 0 -8px; }
.hbars li:has(.hot), .trend-rows li:has(.hot), .bands li.hot, .bands li:focus-visible { background: var(--surface-2); }
.hbars li:has(a .hot) .hb-label, .trend-rows li:has(.hot) .tr-name { text-decoration: underline; text-underline-offset: 3px; }
.hbars li:has(.hot) .hb-track i { filter: brightness(1.15); }
.legend li { border-radius: 6px; padding: 2px 6px; margin: 0 -6px; }
.legend li:has(.hot) { background: var(--surface-2); }
/* donut */
.donut .seg { transition: stroke-width .15s, opacity .15s; cursor: pointer; }
.donut:has(.seg.hot) .seg:not(.hot) { opacity: .35; }
.donut .seg.hot, .donut .seg:focus { stroke-width: 7.5; }
/* price history line */
.spark-hit { fill: transparent; }
.spark:has(.spark-hit.hot) .spark-dot { opacity: .3; }

/* ---------- charts resize with their box ---------- */
.chart, .lchart, .donut-wrap, .hbars, .trend-rows, .bands { container-type: inline-size; }
@container (max-width: 520px) {
  .chart-x span:nth-child(even) { visibility: hidden; }
  .lc-x span:nth-child(even) { display: none; }
}
@container (max-width: 420px) {
  .hbars li { grid-template-columns: minmax(70px, 110px) 1fr auto; gap: 8px; }
  .trend-rows li { grid-template-columns: minmax(0, 1fr) auto auto; }
  .trend-rows li .spark { display: none; }
  .bands li { grid-template-columns: 1fr; gap: 4px; }
}
@container (max-width: 360px) {
  .donut-wrap .legend { flex: 1 1 100%; }
}
@media (max-width: 560px) { .donut-wrap { justify-content: center; } .lc-y { font-size: 11px; } }
.status-pill.stopped { background: var(--surface-3); color: var(--text-2); }
.live-head .btn[data-stop] { margin-left: 8px; }
