/* Snipe web. Tokens mirror ios/Snipe/Design/Tokens.swift (docs/ios-plan.md). Dark only, like the app. */
@font-face { font-family: "Instrument Sans"; src: url(/fonts/InstrumentSans-Regular.ttf) format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url(/fonts/InstrumentSans-Medium.ttf) format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url(/fonts/InstrumentSans-SemiBold.ttf) format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url(/fonts/InstrumentSans-Bold.ttf) format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Big Shoulders Display"; src: url(/fonts/BigShouldersDisplay-ExtraBold.ttf) format("truetype"); font-weight: 800; font-display: swap; }

:root {
  color-scheme: dark;
  --bg: #0e0f11; --card: #17181b; --card-border: #23252a; --elevated: #1e2024; --hairline: #1c1e22;
  --chip-border: #2a2c31; --text: #f5f5f2; --secondary: #a3a7ae; --muted: #8a8f98; --icon-muted: #4a4f58;
  --accent: #ff5a2e; --on-accent: #0e0f11; --radio-off: #3a3d44; --danger: #ff6b6b;
  --r-card: 14px; --r-thumb: 10px; --r-control: 10px; --r-field: 12px; --r-badge: 6px;
  --inset: 20px; --max: 1080px; --side: 264px;
  --ui: "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --display: "Big Shoulders Display", "Instrument Sans", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 400 15px/1.45 var(--ui); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.price { font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.muted { color: var(--muted); } .secondary { color: var(--secondary); } .accent { color: var(--accent); }

.boot { min-height: 100vh; display: grid; place-items: center; }
.mark { width: 28px; height: 28px; border-radius: 8px; background: var(--accent) url(/icon.svg) center/100% no-repeat; display: inline-block; flex: none; }

/* Shell */
.shell { min-height: 100vh; }
.content { min-width: 0; min-height: 100vh; display: flex; flex-direction: column; }
.side { display: none; }
.topbar { position: sticky; top: 0; z-index: 10; background: rgba(14,15,17,.92); backdrop-filter: blur(12px); border-bottom: 1px solid var(--hairline); }
.topbar-in { max-width: var(--max); margin: 0 auto; padding: 0 var(--inset); height: 60px; display: flex; align-items: center; gap: 24px; }
.wordmark { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 20px; letter-spacing: -0.03em; }
.nav { display: flex; gap: 4px; flex: 1; }
.nav a { padding: 8px 12px; border-radius: var(--r-control); color: var(--secondary); font-weight: 500; }
.nav a[aria-current="page"] { color: var(--text); background: var(--elevated); }
.nav a:hover { color: var(--text); }
main { flex: 1; width: 100%; max-width: var(--max); margin: 0 auto; padding: 24px var(--inset) 120px; }
.tabbar { display: none; }
@media (max-width: 760px) {
  .nav { display: none; }
  .topbar-in { height: 56px; }
  main { padding-top: 16px; }
  .tabbar { display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
    background: rgba(14,15,17,.96); backdrop-filter: blur(12px); border-top: 1px solid var(--hairline); padding: 6px 0 calc(6px + env(safe-area-inset-bottom)); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11.5px; color: var(--muted); padding: 4px 0; }
  .tabbar a[aria-current="page"] { color: var(--text); }
  .tabbar svg { width: 24px; height: 24px; }
}
.topbar .spacer { flex: 1; }
.icon-btn { width: 40px; height: 40px; display: inline-grid; place-items: center; border-radius: 50%; border: 0; background: transparent; color: var(--text); }
.icon-btn:hover { background: var(--elevated); }
.plus-btn { width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: var(--on-accent); display: inline-grid; place-items: center; border: 0; }
.plus-btn svg, .icon-btn svg { width: 22px; height: 22px; }

/* Type */
h1 { font-size: 28px; line-height: 1.12; letter-spacing: -0.03em; margin: 0 0 6px; font-weight: 700; }
h2 { font-size: 19px; letter-spacing: -0.02em; margin: 0; font-weight: 700; }
.sub { color: var(--secondary); font-size: 14px; margin: 0; }
.status-line { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; margin: 2px 0 4px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex: none; }
.dot.off { background: var(--icon-muted); }
.dot.live { animation: live 2.4s infinite; }
@keyframes live { 0% { box-shadow: 0 0 0 0 rgba(255,90,46,.55); } 70%, 100% { box-shadow: 0 0 0 7px rgba(255,90,46,0); } }
@media (prefers-reduced-motion: reduce) { .dot.live { animation: none; } }
.section-head { display: flex; align-items: baseline; gap: 8px; margin: 28px 0 12px; }
.section-head .count { color: var(--muted); font-size: 17px; font-weight: 500; }
.section-head .more { margin-left: auto; color: var(--secondary); font-size: 14px; }
.page-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head > div:first-child { flex: 1; min-width: 220px; }
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--secondary); font-size: 14px; margin-bottom: 12px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: var(--r-control);
  border: 1px solid var(--chip-border); background: var(--card); color: var(--text); font-weight: 600; font-size: 14.5px; white-space: nowrap; }
.btn:hover { background: var(--elevated); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.big { height: 54px; width: 100%; font-size: 16px; border-radius: 12px; }
.btn.small { height: 34px; padding: 0 12px; font-size: 13px; }
.btn.danger { color: var(--danger); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.text-btn { background: none; border: 0; color: var(--secondary); padding: 10px; font-weight: 500; }
.text-btn:hover { color: var(--text); }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Cards */
.card { background: var(--card); border: 1px solid var(--card-border); border-radius: var(--r-card); }
.hits { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.hit { display: flex; gap: 14px; padding: 10px; align-items: stretch; transition: border-color .15s, background .15s, transform .15s; }
.hit:hover { border-color: var(--chip-border); background: #1a1b1f; }
.thumb { width: 84px; height: 84px; border-radius: var(--r-thumb); background: var(--elevated); flex: none; overflow: hidden; display: grid; place-items: center; color: var(--icon-muted); position: relative; }
.thumb .badge { display: none; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb svg { width: 26px; height: 26px; }
.hit-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.hit-title { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hit-meta { color: var(--secondary); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hit-foot { margin-top: auto; display: flex; align-items: flex-end; gap: 8px; }
.hit-price { font-size: 22px; font-weight: 700; }
.struck { text-decoration: line-through; color: var(--muted); font-size: 13px; }
.badge { display: inline-flex; align-items: center; height: 24px; padding: 0 8px; border-radius: var(--r-badge); font-weight: 700; font-size: 13px;
  background: var(--accent); color: var(--on-accent); font-variant-numeric: tabular-nums; }
.badge.soft { background: var(--elevated); color: var(--secondary); font-weight: 600; }
.hit-foot .badge { margin-left: auto; }
.unseen { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); display: inline-block; margin-right: 6px; vertical-align: middle; }

.list { border-top: 1px solid var(--hairline); }
.hunt-row { display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 10px 0; border-bottom: 1px solid var(--hairline); }
.hunt-row .thumb { width: 44px; height: 44px; }
.hunt-row .thumb svg { width: 20px; height: 20px; }
.hunt-row .name { font-weight: 500; font-size: 15px; }
.hunt-row .meta { color: var(--muted); font-size: 13px; }
.hunt-row .chev { margin-left: auto; color: var(--icon-muted); }
.hunt-row:hover .name { color: #fff; }
.pill { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 11px; font-size: 12px; font-weight: 600; background: var(--elevated); color: var(--secondary); }
.pill.accent { background: rgba(255,90,46,.14); color: var(--accent); }

/* Grid of listings on a hunt */
.chips { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 4px 0 14px; }
.chip { height: 34px; padding: 0 14px; border-radius: 17px; border: 1px solid var(--chip-border); background: transparent; color: var(--text); font-size: 13.5px; font-weight: 500; }
.chip[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.chips select { height: 34px; border-radius: 17px; border: 1px solid var(--chip-border); background: var(--bg); padding: 0 12px; font-size: 13.5px; margin-left: auto; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
@media (max-width: 760px) { .grid { grid-template-columns: 1fr 1fr; gap: 10px; } .tile .p { font-size: 16px; } }
.tile { overflow: hidden; display: flex; flex-direction: column; position: relative; transition: border-color .15s, transform .15s; }
.tile:hover { border-color: var(--chip-border); }
.tile.is-hit:hover { border-color: var(--accent); }
.tile.is-hit { border-color: var(--accent); }
.tile .img { aspect-ratio: 4 / 3.4; background: var(--elevated); display: grid; place-items: center; color: var(--icon-muted); position: relative; }
.tile .img img { width: 100%; height: 100%; object-fit: cover; }
.tile .img .badge { position: absolute; top: 8px; left: 8px; }
.tile .body { padding: 10px 12px 12px; }
.tile .p { font-size: 18px; font-weight: 700; }
.tile .t { font-size: 13px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: 2px 0 4px; }
.tile .s { font-size: 12px; color: var(--muted); }
.tile .vote { position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; border-radius: 50%; border: 0; background: rgba(14,15,17,.72); color: var(--text); display: grid; place-items: center; opacity: 0; transition: opacity .15s; }
.tile:hover .vote, .tile .vote:focus-visible { opacity: 1; }
@media (hover: none) { .tile .vote { opacity: 1; } }
.tile .vote svg { width: 16px; height: 16px; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 8px 0 20px; }
.home-stats { grid-template-columns: repeat(2, 1fr); margin: 18px 0 8px; }
.home-stats .stat .n { font-size: 20px; }
.home-stats .stat .l + .n { margin-top: 2px; }
.stat { padding: 14px; }
.stat .n { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat .l { font-size: 12.5px; color: var(--muted); }
.search-status { color: var(--muted); font-size: 13px; margin: 6px 0 14px; }

/* Listing */
.listing { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 28px; align-items: start; }
@media (max-width: 760px) { .listing { grid-template-columns: 1fr; gap: 18px; } }
.gallery .hero { aspect-ratio: 1; border-radius: var(--r-card); overflow: hidden; background: var(--elevated); display: grid; place-items: center; color: var(--icon-muted); }
.gallery .hero img { width: 100%; height: 100%; object-fit: contain; background: #000; }
.gallery .strip { display: flex; gap: 8px; margin-top: 8px; overflow-x: auto; }
.gallery .strip button { width: 60px; height: 60px; flex: none; border-radius: 8px; overflow: hidden; border: 2px solid transparent; padding: 0; background: var(--elevated); }
.gallery .strip button[aria-current="true"] { border-color: var(--accent); }
.gallery .strip img { width: 100%; height: 100%; object-fit: cover; }
.big-price { font-family: var(--display); font-weight: 800; font-size: 64px; line-height: .95; letter-spacing: -0.01em; }
.price-row { display: flex; align-items: flex-end; gap: 14px; margin: 10px 0 12px; }
.price-row .lines { font-size: 13.5px; color: var(--secondary); padding-bottom: 6px; }
.l-title { font-size: 20px; line-height: 1.25; font-weight: 600; margin: 12px 0 2px; }
.facts-list { margin: 14px 0; padding: 2px 16px; }
.facts-list > div { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--hairline); }
.facts-list > div:last-child { border-bottom: 0; }
.facts-list dt { color: var(--muted); font-size: 13.5px; flex: none; }
.facts-list dd { margin: 0; font-weight: 500; font-size: 14px; text-align: right; min-width: 0; display: flex; align-items: center; gap: 10px; justify-content: flex-end; }
.facts-list dd .avatar { width: 30px; height: 30px; font-size: 11.5px; }
.desc-box summary { cursor: pointer; color: var(--secondary); font-weight: 600; margin-bottom: 8px; }
.why { padding: 14px 16px; margin: 14px 0; border-color: rgba(255,90,46,.35); }
.why h3 { margin: 0 0 4px; font-size: 14px; }
.why p { margin: 0; color: var(--secondary); font-size: 14px; }
.desc { white-space: pre-wrap; color: var(--secondary); font-size: 14px; max-height: 320px; overflow: auto; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--elevated); display: grid; place-items: center; font-weight: 700; font-size: 13px; color: var(--secondary); flex: none; }
.cta-col { display: flex; flex-direction: column; gap: 8px; margin: 18px 0; }
.cta-col .two { gap: 8px; }

/* Forms */
.form { max-width: 640px; }
.field { margin-bottom: 18px; }
.field > label, .field > .label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.help { color: var(--muted); font-size: 12.5px; margin-top: 6px; }
.input { width: 100%; height: 52px; border-radius: var(--r-field); border: 1px solid var(--chip-border); background: var(--card); padding: 0 14px; font-size: 16px; }
textarea.input { height: auto; min-height: 52px; padding: 14px; resize: vertical; }
.input:focus { outline: none; border-color: var(--accent); }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
.money { position: relative; } .money span { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.money .input { padding-left: 28px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--card); border: 1px solid var(--card-border); border-radius: var(--r-control); padding: 3px; }
.seg button { height: 38px; border: 0; background: transparent; border-radius: 8px; color: var(--secondary); font-weight: 600; }
.seg button[aria-pressed="true"] { background: var(--elevated); color: var(--text); }
.radio { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-bottom: 1px solid var(--hairline); cursor: pointer; }
.radio:last-child { border-bottom: 0; }
.radio input { appearance: none; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--radio-off); margin: 1px 0 0; flex: none; }
.radio input:checked { border: 6px solid var(--accent); }
.radio .t { font-weight: 600; font-size: 14.5px; } .radio .h { color: var(--muted); font-size: 12.5px; }
.radio .hint { margin-left: auto; color: var(--secondary); font-size: 13px; white-space: nowrap; }
.parsed { padding: 14px 16px; margin: 4px 0 18px; }
.parsed .k { color: var(--muted); font-size: 12.5px; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.examples { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 18px; }
.ex-label { margin: -8px 0 8px; }
.preview-empty { display: none; }
.examples a { width: 120px; flex: none; }
.examples .img { aspect-ratio: 1; border-radius: var(--r-thumb); overflow: hidden; background: var(--elevated); }
.examples .img img { width: 100%; height: 100%; object-fit: cover; }
.examples .p { font-weight: 700; font-size: 14px; margin-top: 4px; } .examples .t { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
details.more summary { cursor: pointer; color: var(--secondary); font-weight: 600; margin-bottom: 14px; }
.sticky-cta { position: sticky; bottom: 0; padding: 16px 0 calc(8px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, var(--bg) 30%); }
@media (max-width: 760px) { .sticky-cta { bottom: 64px; } }
.error { color: var(--danger); font-size: 13.5px; margin: 8px 0; }
.notice { padding: 14px 16px; margin: 0 0 18px; color: var(--secondary); font-size: 14px; }
.notice strong { color: var(--text); }

/* Sources */
.group-title { text-transform: uppercase; font-size: 12px; font-weight: 600; letter-spacing: .04em; color: var(--muted); margin: 22px 0 6px; }
.source-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--hairline); }
.source-row .avatar { width: 34px; height: 34px; }
.source-row .n { font-weight: 500; } .source-row .st { font-size: 12.5px; color: var(--muted); }
.source-row .st.blocked { color: var(--accent); }
.toggle { margin-left: auto; width: 48px; height: 28px; border-radius: 14px; border: 0; background: var(--radio-off); position: relative; flex: none; }
.toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--text); transition: transform .15s; }
.toggle[aria-checked="true"] { background: var(--accent); }
.toggle[aria-checked="true"]::after { transform: translateX(20px); }
.toggle[disabled] { opacity: .4; }

/* Activity */
.act-row { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--hairline); align-items: flex-start; }
.act-row .time { width: 46px; color: var(--muted); font-size: 12.5px; padding-top: 2px; flex: none; font-variant-numeric: tabular-nums; }
.act-row .avatar { width: 32px; height: 32px; font-size: 12px; }
.act-row .t { font-weight: 500; font-size: 14.5px; } .act-row .s { font-size: 12.5px; color: var(--muted); }
.act-row .s.hit, .act-row .s.blocked { color: var(--accent); }

/* Plans */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin: 18px 0; }
.plan { padding: 18px; }
.plan.current { border-color: var(--accent); }
.plan .top { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.plan .name { font-weight: 700; font-size: 17px; }
.plan .pr { font-weight: 700; font-size: 20px; margin-bottom: 10px; }
.plan ul { margin: 0; padding: 0 0 0 18px; color: var(--secondary); font-size: 14px; }
.plan li { margin: 4px 0; }

/* Account */
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--hairline); align-items: center; }
.kv .k { color: var(--secondary); }

/* Welcome and sign in */
.welcome { max-width: 1080px; margin: 0 auto; padding: 32px 24px 64px; display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: center; min-height: 100vh; }
@media (max-width: 860px) { .welcome { grid-template-columns: 1fr; gap: 32px; padding-top: 24px; min-height: 0; } }
.welcome h1 { font-size: clamp(36px, 5.4vw, 60px); line-height: 1.02; margin: 28px 0 16px; letter-spacing: -0.035em; }
.welcome .lede { color: var(--secondary); font-size: 17px; max-width: 34em; }
.steps { list-style: none; padding: 0; margin: 28px 0; display: grid; gap: 16px; }
.steps li { display: flex; gap: 14px; align-items: flex-start; color: var(--secondary); }
.steps .n { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--chip-border); display: grid; place-items: center; font-weight: 700; color: var(--text); flex: none; }
.steps b { color: var(--text); font-weight: 600; }
.welcome .actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.welcome .actions .btn { height: 54px; padding: 0 26px; font-size: 16px; }
.example-frame { background: var(--card); border: 1px solid var(--card-border); border-radius: 20px; padding: 16px; box-shadow: 0 40px 90px rgba(0,0,0,.5); }
.example-head { display: flex; align-items: center; gap: 8px; font-weight: 600; margin: 2px 2px 14px; }
.example-head .muted { font-weight: 400; font-size: 13px; }
.example .hits { grid-template-columns: 1fr; gap: 10px; }
.example .hit { background: var(--bg); }
.ph1 { background: linear-gradient(135deg, #f0eee6, #9aa3ad); } .ph2 { background: linear-gradient(135deg, #8d8a5c, #3e3d27); } .ph3 { background: linear-gradient(135deg, #e9edf2, #5b6470); }
.auth { max-width: 420px; margin: 0 auto; padding: 48px 24px; }
.auth .wordmark { margin-bottom: 36px; }
.code-input { letter-spacing: .5em; font-size: 24px; text-align: center; font-variant-numeric: tabular-nums; }
.legal { color: var(--muted); font-size: 12.5px; margin-top: 18px; }
.legal a { color: var(--secondary); text-decoration: underline; }
footer.site { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--inset) 32px; color: var(--muted); font-size: 12.5px; display: flex; gap: 16px; flex-wrap: wrap; }
@media (max-width: 760px) { footer.site { padding-bottom: 96px; } }
footer.site a:hover { color: var(--text); }

.empty { text-align: center; padding: 40px 16px; color: var(--secondary); }
.empty h3 { color: var(--text); margin: 0 0 6px; font-size: 17px; }
.empty .btn { margin-top: 14px; }
.skeleton { background: linear-gradient(90deg, var(--card), var(--elevated), var(--card)); background-size: 200% 100%; animation: sk 1.2s infinite linear; border-radius: var(--r-card); }
@keyframes sk { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .skeleton { animation: none; } }
#toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; transition: .2s; z-index: 50;
  background: var(--elevated); border: 1px solid var(--chip-border); padding: 10px 16px; border-radius: 10px; font-size: 14px; max-width: calc(100% - 32px); }
#toast.on { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 760px) { #toast { bottom: 90px; } }

/* Sign in with Apple (web): Apple's white-on-dark style on our dark canvas. */
.btn.apple { background: #fff; border-color: #fff; color: #000; font-weight: 600; text-decoration: none; }
.btn.apple:hover { filter: brightness(0.94); }
.or { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: var(--muted); font-size: 13px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--card-border); }

/* Plans: subscribe buttons and the current plan. */
.plan-actions { margin-top: 16px; display: flex; gap: 8px; flex-wrap: wrap; }
.plan-current { display: inline-block; margin-top: 16px; color: var(--accent); font-weight: 600; font-size: 14px; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }

/* Grouped settings, narrow pages, side-by-side pages */
.narrow { max-width: 720px; }
.card.group { padding: 0 16px; }
.card.group > .kv:last-child, .card.group > .source-row:last-child { border-bottom: 0; }
.card.group > .help { margin: 0; padding: 12px 0; border-bottom: 1px solid var(--hairline); }
.card.group > .help:last-child { border-bottom: 0; }
.account-plan { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 18px 0 8px; }
.account-plan .row-actions { margin: 0; }
.split { display: grid; gap: 4px; }
.split-side { margin: 8px 0 12px; }
.hunt-page { display: grid; gap: 8px; }
.hunt-side h1 { margin-bottom: 4px; }
.search-status { display: flex; align-items: center; gap: 8px; }
.hunt-actions { margin: 0 0 16px; }
.filter-block { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; }
.filter-block .chips { margin: 0; }
.side-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sort { height: 34px; border-radius: 17px; border: 1px solid var(--chip-border); background: var(--bg); padding: 0 12px; font-size: 13.5px; margin-left: auto; }
.results-head { display: flex; align-items: baseline; gap: 8px; margin: 6px 0 12px; }
.results-head .count { color: var(--muted); font-size: 16px; font-weight: 500; }
.results-head .pill { align-self: center; }
kbd { font: 600 11px/1 var(--ui); padding: 3px 6px; border-radius: 5px; border: 1px solid rgba(14,15,17,.25); color: inherit; opacity: .7; }

/* Tablet and up: image-led hit cards, card lists. */
@media (min-width: 761px) {
  h1 { font-size: 30px; }
  .home-stats { grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 22px 0 6px; }
  .home-stats .stat { padding: 16px 18px; }
  .home-stats .stat .n { font-size: 24px; }
  main .hits { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
  main .hit { flex-direction: column; padding: 0; gap: 0; overflow: hidden; }
  main .hit:hover { transform: translateY(-2px); }
  main .hit .thumb { width: 100%; height: auto; aspect-ratio: 4 / 3; border-radius: 0; }
  main .hit .thumb svg { width: 34px; height: 34px; }
  main .hit .thumb .badge { display: inline-flex; position: absolute; top: 10px; left: 10px; }
  main .hit-body { padding: 12px 14px 14px; }
  main .hit-foot { order: -1; margin: 0 0 4px; align-items: baseline; }
  main .hit-foot .badge { display: none; }
  main .hit-title { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-weight: 500; font-size: 14px; line-height: 1.35; min-height: 2.7em; margin-bottom: 4px; }
  main .hit-price { font-size: 24px; }
  main .hit > .pill { margin: 0 14px 14px; align-self: flex-start !important; }
  .tile:hover { transform: translateY(-2px); }
  .hunt-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; border-top: 0; }
  .hunt-cards .hunt-row { background: var(--card); border: 1px solid var(--card-border); border-radius: var(--r-card); padding: 12px 16px; transition: border-color .15s; }
  .hunt-cards .hunt-row:hover { border-color: var(--chip-border); }
  .hunt-cards .hunt-row .thumb { width: 56px; height: 56px; }
  .feed { background: var(--card); border: 1px solid var(--card-border); border-radius: var(--r-card); padding: 2px 20px 8px; }
  .feed .act-row:last-child { border-bottom: 0; }
  .feed .group-title { margin-top: 16px; }
  .auth { margin: 9vh auto 48px; background: var(--card); border: 1px solid var(--card-border); border-radius: 20px; padding: 40px; max-width: 460px; }
  .auth .wordmark { margin-bottom: 28px; }
}

/* Desktop: a sidebar replaces the top bar; pages use the width. */
@media (min-width: 1024px) {
  .shell { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); }
  .topbar { display: none; }
  main { max-width: 1240px; padding: 36px 44px 72px; }
  footer.site { max-width: 1240px; padding: 0 44px 28px; }
  h1 { font-size: 32px; }
  .page-head { margin-bottom: 8px; align-items: flex-end; }
  .back { margin-bottom: 16px; }

  .side { display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; padding: 20px 14px 14px; border-right: 1px solid var(--hairline); background: #0b0c0e; }
  .side .wordmark { padding: 4px 10px 20px; font-size: 21px; }
  .side-new { justify-content: flex-start; padding: 0 12px; height: 42px; margin-bottom: 14px; }
  .side-new svg { width: 18px; height: 18px; }
  .side-new kbd { margin-left: auto; }
  .side-nav { display: flex; flex-direction: column; gap: 2px; }
  .side-nav a { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: var(--r-control); color: var(--secondary); font-weight: 500; font-size: 14.5px; }
  .side-nav a svg { width: 20px; height: 20px; flex: none; }
  .side-nav a:hover { color: var(--text); background: #15161a; }
  .side-nav a[aria-current="page"] { color: var(--text); background: var(--elevated); }
  .side-head { display: flex; justify-content: space-between; margin: 26px 10px 8px; font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
  .side-hunts { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; margin: 0 -4px; padding: 0 4px; }
  .side-hunt { display: flex; align-items: center; gap: 10px; padding: 6px 10px 6px 6px; border-radius: var(--r-control); color: var(--secondary); font-size: 14px; }
  .side-hunt .thumb { width: 30px; height: 30px; border-radius: 8px; }
  .side-hunt .thumb svg { width: 14px; height: 14px; }
  .side-hunt:hover { background: #15161a; color: var(--text); }
  .side-hunt[aria-current="page"] { background: var(--elevated); color: var(--text); }
  .side-hunt.paused .sh-name, .side-hunt.paused .thumb { opacity: .55; }
  .sh-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .sh-count { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--accent); color: var(--on-accent); font-size: 11.5px; font-weight: 700; display: grid; place-items: center; font-variant-numeric: tabular-nums; }
  .sh-paused { font-size: 11.5px; color: var(--muted); }
  .side-empty { color: var(--muted); font-size: 13px; padding: 2px 10px; margin: 0; }
  .side-account { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 12px 8px 4px; border-top: 1px solid var(--hairline); border-radius: 0; }
  .side-account:hover .sa-email, .side-account[aria-current="page"] .sa-email { color: var(--text); }
  .side-account .avatar { width: 34px; height: 34px; }
  .sa-text { display: flex; flex-direction: column; min-width: 0; }
  .sa-email { font-size: 13.5px; color: var(--secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .sa-plan { font-size: 12px; color: var(--muted); }

  .home-hunts { display: none; }
  .section-head { margin-top: 36px; }
  main .hits { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }

  .hunt-page { grid-template-columns: 300px minmax(0, 1fr); gap: 40px; align-items: start; }
  .hunt-side { position: sticky; top: 32px; }
  .hunt-side h1 { font-size: 28px; }
  .hunt-side .search-status { margin: 4px 0 0; }
  .hunt-actions .btn { flex: 1; }
  .filter-block { display: block; }
  .side-label { position: static; width: auto; height: auto; overflow: visible; clip: auto; display: block; font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 18px 0 8px; }
  .filter-block .chips { gap: 6px; }
  .sort { width: 100%; height: 42px; border-radius: var(--r-control); background-color: var(--card); margin: 0; }
  .results-head { margin: 4px 0 16px; }
  .results-head h2 { font-size: 22px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }

  .listing { grid-template-columns: minmax(0, 1.15fr) minmax(360px, 1fr); gap: 44px; }
  .buy-col { position: sticky; top: 32px; }
  .gallery .hero { aspect-ratio: 4 / 3.3; }
  .gallery .strip button { width: 72px; height: 72px; }
  .l-title { font-size: 24px; letter-spacing: -0.02em; }
  .big-price { font-size: 76px; }

  .split { grid-template-columns: minmax(0, 1fr) 280px; gap: 32px; align-items: start; }
  .split-side { grid-column: 2; grid-row: 1; grid-template-columns: 1fr; position: sticky; top: 32px; margin: 0; }
  .split-main { grid-column: 1; grid-row: 1; }
  .split-side .stat { padding: 18px 20px; }
  .split-side .stat .n { font-size: 28px; }

  .plans { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .plan { padding: 22px; }
  .sticky-cta { bottom: 0; }
}

/* Wide desktop: New hunt shows its live preview beside the form. */
@media (min-width: 1200px) {
  .form-layout { position: relative; max-width: 1080px; min-height: 720px; }
  .form-layout .form { max-width: none; margin-right: 420px; }
  .preview-col { position: absolute; top: 0; bottom: 0; right: 0; width: 380px; }
  .preview-in { position: sticky; top: 32px; }
  .preview-empty { display: block; border: 1px dashed var(--chip-border); border-radius: var(--r-card); padding: 22px; color: var(--secondary); font-size: 14px; }
  .preview-empty h3 { margin: 0 0 6px; color: var(--text); font-size: 16px; }
  .preview-empty p { margin: 0; }
  .preview-col:has(#parsed:not(:empty)) .preview-empty, .preview-col:has(#examples:not(:empty)) .preview-empty { display: none; }
  .preview-col .parsed { margin-top: 0; }
  .preview-col .ex-label { margin: 18px 0 8px; }
  .preview-col .examples { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: visible; }
  .preview-col .examples a { width: auto; }
}
