/* RepRadar: dark, quiet, one accent colour (purple) used only where it matters */
:root {
  color-scheme: dark;
  --bg: #121117;
  --surface: #1a1920;
  --sunken: #222129;
  --raised: #27262f;
  --line: #2d2b35;
  --line-strong: #403d4a;
  --ink: #ecebf0;
  --ink-2: #b6b3bf;
  --mute: #97939f;            /* 4.98:1 or better on every background */
  --purple: #7b57e4;          /* buttons, active states (white text on it) */
  --purple-hover: #8a69ea;
  --purple-text: #b69cf7;     /* purple text on dark backgrounds */
  --purple-tint: rgba(150, 115, 240, .14);
  --purple-line: rgba(150, 115, 240, .45);
  --red: #f07167;
  --red-tint: rgba(240, 113, 103, .12);
  --green: #5cc58a;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px rgba(0, 0, 0, .35);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; } /* no scroll-behavior: Lenis does the smooth scrolling */
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.55 var(--font); overflow-x: clip; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 2px solid var(--purple-text); outline-offset: 2px; }
::selection { background: var(--purple); color: #fff; }

/* ---------- header */
.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 0 28px; min-height: 52px; background: rgba(18, 17, 23, .96); border-bottom: 1px solid rgba(255, 255, 255, .06); }
.logo { display: flex; align-items: center; gap: 9px; text-decoration: none; font-weight: 700; font-size: 18px; letter-spacing: -.02em; }
.logo .word { display: block; height: 38px; width: auto; }
nav { display: flex; gap: 4px; align-self: stretch; margin: 0 auto; }
nav a { display: flex; align-items: center; gap: 6px; padding: 0 12px; font-size: 13px; color: var(--mute); text-decoration: none; transition: color .2s; }
nav a:hover { color: var(--ink); }
nav a.on { color: var(--ink); }
.pill { min-width: 20px; padding: 0 6px; border-radius: 10px; background: var(--raised); color: var(--ink-2); font-size: 12px; font-weight: 600; text-align: center; line-height: 20px; }
nav a.on .pill { background: var(--purple-tint); color: var(--purple-text); }

.gear, .menu { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-size: 13px; font-weight: 500; color: var(--ink-2); }
.gear:hover, .menu:hover { border-color: var(--line-strong); color: var(--ink); }
.set-wrap { position: relative; }
.settings { position: absolute; right: 0; top: 100%; margin-top: 8px; width: 290px; padding: 18px; display: none; gap: 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.set-wrap:hover .settings, .set-wrap:focus-within .settings { display: grid; }
.set-wrap.shut .settings { display: none; }
.settings::before { content: ''; position: absolute; left: 0; right: 0; top: -10px; height: 10px; }
.settings label { display: grid; gap: 6px; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.settings select, .settings .goog-te-combo { width: 100%; height: 38px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--sunken); color: var(--ink); font: 14px var(--font); }
.settings .goog-te-gadget { color: transparent; font-size: 0; }
.settings .goog-te-gadget > span { display: none; }
.goog-te-banner-frame, iframe.skiptranslate, #goog-gt-tt, .goog-te-balloon-frame { display: none !important; }
body { top: 0 !important; }
.account { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account.in { color: var(--purple-text); border-color: var(--purple-line); background: var(--purple-tint); }
.menu { display: none; padding: 0 9px; }

/* ---------- layout */
main { max-width: 1320px; margin: 0 auto; padding: 0 32px; }
.hero { padding: 128px 0 40px; text-align: center; }
.eyebrow { margin: 0 0 16px; font-size: 17px; font-weight: 600; color: var(--purple-text); letter-spacing: -.01em; }
h1 { margin: 0 auto 22px; max-width: 980px; font-size: clamp(44px, 7.6vw, 96px); line-height: 1.02; letter-spacing: -.045em; font-weight: 700; }
.grad { background: linear-gradient(100deg, #efe9ff 0%, #b69cf7 45%, #7b57e4 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lede { margin: 0 auto 36px; max-width: 620px; font-size: clamp(18px, 2vw, 21px); line-height: 1.45; color: var(--ink-2); letter-spacing: -.01em; }
#scanForm { display: flex; gap: 8px; padding: 6px; margin: 0 auto; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; box-shadow: var(--shadow); max-width: 640px; text-align: left; }
#scanForm:focus-within { border-color: var(--purple-line); outline: 2px solid var(--purple-text); outline-offset: 2px; }
#q { flex: 1; min-width: 0; border: 0; background: none; padding: 0 18px; height: 48px; font-size: 16px; outline: none; }
#q::placeholder { color: var(--mute); }
#scanBtn { height: 48px; padding: 0 28px; border: 0; border-radius: 999px; background: var(--purple); color: #fff; font-weight: 600; font-size: 15px; cursor: pointer; }
#scanBtn:hover { background: var(--purple-hover); }
#scanBtn:disabled { opacity: .6; cursor: progress; }

/* scan progress */
.progress { margin: 32px auto 0; text-align: left; max-width: 720px; display: grid; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.src { display: flex; gap: 12px; align-items: center; padding: 12px 16px; font-size: 14px; }
.src + .src { border-top: 1px solid var(--line); }
.src .name { width: 90px; font-weight: 600; }
.src .msg { flex: 1; color: var(--mute); }
.src .st { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line-strong); flex: none; }
/* loading: a spinning flower pillow instead of a ring */
.src.running .st { width: 24px; height: 24px; margin: -5px; border: 0; border-radius: 0; background: url(/img/flower.svg) center / contain no-repeat; animation: spin 1.6s linear infinite; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .35)); }
@media (prefers-reduced-motion: reduce) { .src.running .st { animation-duration: 6s; } }
.src.done .st { border-color: var(--green); background: radial-gradient(var(--green) 0 3px, transparent 3.5px); }
.src.error .st { border-color: var(--red); background: var(--red); }
.src.error .msg { color: var(--red); }
@keyframes spin { to { transform: rotate(360deg); } }

/* scan result */
#results { margin: 32px auto 0; max-width: 980px; text-align: left; }
.best { display: grid; grid-template-columns: 240px 1fr; gap: 28px; max-width: 980px; padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.best > img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; background: var(--sunken); }
.best .tag { display: inline-block; padding: 3px 9px; border-radius: 6px; background: var(--purple-tint); color: var(--purple-text); font-size: 12px; font-weight: 600; }
.best h3 { margin: 10px 0 2px; font-size: 26px; letter-spacing: -.02em; }
.meta { color: var(--ink-2); font-size: 14px; }
.btns { display: flex; gap: 8px; flex-wrap: wrap; margin: 18px 0; }
.btn { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 15px; border-radius: 8px; border: 1px solid var(--line); background: var(--sunken); text-decoration: none; cursor: pointer; font-size: 14px; font-weight: 500; white-space: nowrap; }
.btn:hover { border-color: var(--line-strong); background: var(--raised); }
.btn.primary { background: var(--purple); border-color: var(--purple); color: #fff; font-weight: 600; }
.btn.primary:hover { background: var(--purple-hover); border-color: var(--purple-hover); }
.btn:disabled { opacity: .6; cursor: default; }
.srcs { display: flex; gap: 6px; flex-wrap: wrap; }
.srcs span { padding: 3px 9px; border-radius: 6px; background: var(--raised); font-size: 12px; color: var(--ink-2); }
.ev { margin: 16px 0 0; padding: 14px 0 0; border-top: 1px solid var(--line); list-style: none; font-size: 13px; display: grid; gap: 7px; }
.ev a { color: var(--ink-2); text-decoration: none; }
.ev a:hover { color: var(--purple-text); text-decoration: underline; }
.ev b { display: inline-block; min-width: 64px; color: var(--mute); font-weight: 500; }
.ranked { margin-top: 28px; max-width: 980px; }
.ranked h4 { margin: 0 0 6px; font-size: 15px; }
.row { display: grid; grid-template-columns: 26px 1fr auto auto; gap: 14px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.row .n { color: var(--mute); font-size: 13px; }
.row .s { font-weight: 600; }
.row .s small { display: block; font-weight: 400; color: var(--mute); }
.row .sc { font: 13px var(--mono); color: var(--ink-2); }
.empty { color: var(--ink-2); padding: 22px; background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--radius); max-width: 720px; }

/* ---------- finds */
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 36px 0 14px; }
.toolbar h2 { margin: 0 auto 0 0; font-size: 26px; letter-spacing: -.02em; }
.toolbar input, .toolbar select { height: 38px; padding: 0 11px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); font-size: 14px; max-width: 200px; }
.toolbar input { width: 200px; }
.toolbar input:focus, .toolbar select:focus { border-color: var(--purple-line); }
.count { margin: 0 0 18px; font-size: 13px; color: var(--mute); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 28px 20px; padding-bottom: 64px; }
.card { position: relative; display: flex; flex-direction: column; content-visibility: auto; contain-intrinsic-size: auto 380px; }
.card .img { position: relative; aspect-ratio: 4 / 5; background: var(--sunken); border-radius: var(--radius); overflow: hidden; cursor: pointer; }
.card .img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.card:hover .img img:not(.logo-fallback) { transform: scale(1.03); }
.card .body { padding: 12px 2px 0; display: flex; flex-direction: column; gap: 3px; flex: 1; }
.card .bc { font-size: 12px; color: var(--mute); }
.card .t { font-size: 14px; font-weight: 600; line-height: 1.35; cursor: pointer; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .t:hover { text-decoration: underline; text-underline-offset: 2px; }
.card .p { font-size: 15px; font-weight: 600; margin-top: 2px; }
.card .sl { font-size: 12px; color: var(--mute); }
.card .buy { margin-top: auto; padding-top: 10px; }
.card .buy a { display: flex; justify-content: center; align-items: center; height: 36px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); text-decoration: none; font-size: 13px; font-weight: 600; }
.card .buy a:hover { border-color: var(--purple); background: var(--purple); color: #fff; }
.fav { position: absolute; top: 10px; right: 10px; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; border: 0; background: rgba(18, 17, 23, .78); color: #e4e2ea; cursor: pointer; }
.fav:hover { color: #fff; }
.fav.on { color: var(--purple-text); }
.fav.on svg { fill: currentColor; }
.fav svg { pointer-events: none; }
.badge { position: absolute; top: 10px; left: 10px; padding: 3px 8px; border-radius: 6px; font-size: 11px; font-weight: 600; background: var(--purple); color: #fff; }
.badge.hot { background: rgba(18, 17, 23, .82); }
img.logo-fallback { object-fit: contain !important; padding: 0 22%; background: var(--sunken); opacity: .85; }

.sellers { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; padding-bottom: 64px; }
.sellers button { text-align: left; padding: 14px 16px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); cursor: pointer; }
.sellers button:hover { border-color: var(--purple-line); }
.sellers b { display: block; font-weight: 600; }
.sellers small { color: var(--mute); font-size: 13px; }

/* ---------- dialogs */
dialog { width: calc(100% - 32px); max-width: 760px; padding: 0; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); box-shadow: 0 24px 60px rgba(0, 0, 0, .55); }
dialog::backdrop { background: rgba(6, 5, 9, .7); }
.dlg { display: grid; grid-template-columns: 320px 1fr; }
.dlg > img { width: 100%; height: 100%; min-height: 320px; object-fit: cover; background: var(--sunken); }
.dlg .in { padding: 26px 26px 22px; }
.dlg h3 { margin: 4px 0 6px; font-size: 21px; letter-spacing: -.01em; line-height: 1.25; }
.dlg .bc { font-size: 12px; color: var(--mute); }
.x { position: absolute; top: 10px; right: 10px; z-index: 1; display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 50%; background: rgba(18, 17, 23, .7); cursor: pointer; color: var(--ink-2); }
.x:hover { background: var(--raised); color: var(--ink); }

#authDlg { max-width: 420px; }
.auth { padding: 30px 28px 26px; }
.auth h3 { margin: 18px 0 4px; font-size: 21px; letter-spacing: -.01em; }
.auth .hint { margin: 0 0 18px; color: var(--mute); font-size: 14px; }
.auth form { display: grid; gap: 14px; }
.auth label { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.auth input { height: 42px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--sunken); font-size: 15px; }
.auth input:focus { border-color: var(--purple); box-shadow: 0 0 0 3px var(--purple-tint); }
.auth .btn { justify-content: center; height: 42px; }
.auth .err { margin: 0; padding: 9px 12px; border-radius: 8px; background: var(--red-tint); color: var(--red); font-size: 13px; }
.tabs { display: inline-flex; padding: 3px; border-radius: 9px; background: var(--sunken); }
.tabs button { border: 0; background: none; padding: 6px 16px; border-radius: 7px; cursor: pointer; font-size: 14px; font-weight: 500; color: var(--mute); }
.tabs button[aria-selected="true"] { background: var(--raised); color: var(--ink); }

/* ---------- footer, toast, 404 */
footer { margin-top: 24px; border-top: 1px solid var(--line); }
footer .in { max-width: 1320px; margin: 0 auto; padding: 28px 32px; display: flex; gap: 24px; justify-content: space-between; align-items: center; flex-wrap: wrap; font-size: 13px; color: var(--mute); }
footer p { margin: 0; }
footer a { color: var(--ink-2); font-weight: 500; }
footer a:hover { color: var(--purple-text); }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 50; max-width: calc(100vw - 32px); padding: 11px 16px; border-radius: 9px; background: var(--ink); color: var(--bg); font-size: 14px; font-weight: 500; box-shadow: var(--shadow); }
.toast.bad { background: var(--red); color: #1a0705; }
.notfound { min-height: 80vh; display: grid; align-content: center; justify-items: start; gap: 6px; }
.notfound h1 { margin: 0; }
.notfound p { color: var(--ink-2); margin: 0 0 8px; }

/* ---------- phones */
@media (max-width: 760px) {
  .top { padding: 10px 16px; gap: 8px; min-height: 0; }
  .menu { display: inline-flex; margin-left: auto; }
  .set-wrap { margin-left: 0; }
  .settings { right: -60px; width: min(290px, calc(100vw - 32px)); }
  .gear .lbl { display: none; }
  .account { max-width: 96px; padding: 0 10px; }
  nav { display: none; order: 9; width: 100%; flex-direction: column; gap: 0; padding: 4px 0 6px; border-top: 1px solid var(--line); }
  nav.open { display: flex; }
  nav a { padding: 12px 4px; border-bottom: 0; font-size: 15px; }
  nav a.on { color: var(--purple-text); }
  main { padding: 0 16px; }
  .hero { padding: 40px 0 32px; }
  .lede { font-size: 16px; }
  #scanForm { flex-direction: column; }
  #scanBtn { width: 100%; }
  .toolbar { padding-top: 24px; }
  .toolbar h2 { width: 100%; font-size: 22px; }
  .toolbar input, .toolbar select { flex: 1 1 140px; max-width: none; width: auto; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 12px; }
  .best, .dlg { grid-template-columns: 1fr; }
  .dlg > img { min-height: 0; aspect-ratio: 1; }
  .row { grid-template-columns: 22px 1fr; }
  .row .sc { display: none; }
  .row .btns { grid-column: 2; }
  footer .in { padding: 24px 16px; }
}

/* trending strip on the home page */
.home-finds { margin-top: 64px; padding-top: 8px; border-top: 1px solid var(--line); }
.home-finds .toolbar { padding-top: 28px; }
.home-finds .toolbar a { font-size: 14px; font-weight: 500; color: var(--purple-text); text-decoration: none; }
.home-finds .toolbar a:hover { text-decoration: underline; }
.home-finds .grid { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 1100px) { .home-finds .grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 760px) { .home-finds .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.home-finds .badge.hot { display: none; } /* the heading already says these are trending */

/* ---------- Apple-inspired home sections */
.more { display: inline-flex; align-items: center; gap: 2px; margin-top: 22px; font-size: 17px; color: var(--purple-text); text-decoration: none; }
.more:hover { text-decoration: underline; text-underline-offset: 3px; }
.chev { width: 16px; height: 16px; stroke-width: 2.2; }

.statement { padding: 160px 0 140px; }
.statement p { max-width: 1000px; margin: 0 auto; text-align: center; font-size: clamp(28px, 4.2vw, 52px); line-height: 1.14; font-weight: 600; letter-spacing: -.03em; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stats > div { padding: 56px 24px; text-align: center; }
.stats > div + div { border-left: 1px solid var(--line); }
.stats strong { display: block; font-size: clamp(48px, 7vw, 88px); line-height: 1; font-weight: 700; letter-spacing: -.045em; font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, #fff 30%, #9d86e0); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stats span { display: block; margin-top: 14px; color: var(--mute); font-size: 15px; }

.how { padding: 150px 0 40px; text-align: center; }
.big { margin: 0 auto 56px; font-size: clamp(36px, 5.4vw, 64px); line-height: 1.05; letter-spacing: -.04em; font-weight: 700; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; text-align: left; }
.spot { position: relative; isolation: isolate; overflow: hidden; padding: 34px 30px 36px; border-radius: 22px; background: var(--surface); border: 1px solid rgba(255, 255, 255, .06); }
.spot::before, .spot::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: var(--o, 0); transition: opacity .35s ease; }
.spot::before { z-index: -1; background: radial-gradient(260px circle at var(--x, 50%) var(--y, 50%), rgba(150, 115, 240, .16), transparent 70%); }
.spot::after { padding: 1px; background: radial-gradient(180px circle at var(--x, 50%) var(--y, 50%), rgba(190, 165, 250, .75), transparent 70%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); }
.spot .num { font: 600 13px var(--mono); color: var(--purple-text); }
.spot h3 { margin: 40px 0 10px; font-size: 24px; letter-spacing: -.02em; }
.spot p { margin: 0; color: var(--ink-2); font-size: 16px; line-height: 1.5; }

.home-finds { margin-top: 110px; padding-top: 0; border-top: 0; }
.home-finds .toolbar { padding-top: 0; }
.home-finds .toolbar h2 { font-size: clamp(28px, 3.6vw, 40px); letter-spacing: -.035em; }
.home-finds .toolbar a { display: inline-flex; align-items: center; font-size: 17px; }

/* finds grid: cards fade in as they're added */
.grid .card { animation: card-in .6s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes card-in { from { opacity: 0; transform: translateY(16px); } }
@media (prefers-reduced-motion: reduce) { .grid .card { animation: none; } .card .img img { transition: none; } }

@media (max-width: 900px) {
  .steps { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  nav { margin: 0; }
  .hero { padding: 64px 0 24px; }
  h1 br { display: none; } /* let the headline wrap naturally on phones */
  #scanForm { border-radius: 18px; }
  #scanBtn { border-radius: 12px; }
  .statement { padding: 96px 0 88px; }
  .stats { grid-template-columns: 1fr; }
  .stats > div { padding: 36px 16px; }
  .stats > div + div { border-left: 0; border-top: 1px solid var(--line); }
  .how { padding: 96px 0 20px; }
  .big { margin-bottom: 36px; }
  .home-finds { margin-top: 72px; }
}

/* logo intro (built by motion.js, removed when done) */
.splash { position: fixed; inset: 0; z-index: 100; display: grid; place-content: center; justify-items: center; gap: 18px; background: var(--bg); }
.splash-logo { position: relative; width: min(560px, 78vw); }
.splash-logo img { display: block; width: 100%; height: auto; }
/* ShinyText sheen, cut to the logo shape */
.splash-shine { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(120deg, transparent 40%, rgba(255, 255, 255, .95) 50%, rgba(214, 196, 255, .9) 53%, transparent 62%) 150% 0 / 250% 100% no-repeat; -webkit-mask: url(/logo.svg) center / 100% 100% no-repeat; mask: url(/logo.svg) center / 100% 100% no-repeat; }

/* big spinning flower pillow while a scan runs */
.scan-loader { display: grid; justify-items: center; gap: 14px; margin: 44px auto 0; }
.scan-loader img { width: 132px; height: 132px; animation: spin 2.4s linear infinite; filter: drop-shadow(0 14px 26px rgba(0, 0, 0, .45)); }
.scan-loader p { margin: 0; color: var(--ink-2); font-size: 16px; }
@media (prefers-reduced-motion: reduce) { .scan-loader img { animation-duration: 10s; } }
@media (max-width: 760px) { .scan-loader img { width: 104px; height: 104px; } }

/* My links: add-your-own-link panel */
.add-link { margin: 4px 0 26px; padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.add-link h3 { margin: 0 0 4px; font-size: 18px; letter-spacing: -.01em; }
.add-link-login { display: flex; gap: 18px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.add-link-login p { margin: 0; color: var(--ink-2); font-size: 14px; }
#addLinkForm { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
#addLinkForm h3, #addLinkForm .wide { grid-column: 1 / -1; }
#addLinkForm label { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
#addLinkForm .opt { font-weight: 400; color: var(--mute); }
#addLinkForm input, #addLinkForm select { height: 40px; padding: 0 11px; border-radius: 8px; border: 1px solid var(--line); background: var(--sunken); font-size: 14px; color: var(--ink); min-width: 0; }
#addLinkForm input:focus, #addLinkForm select:focus { border-color: var(--purple); box-shadow: 0 0 0 3px var(--purple-tint); }
#addLinkForm .err { margin: 0; padding: 9px 12px; border-radius: 8px; background: var(--red-tint); color: var(--red); font-size: 13px; }
.add-link-foot { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.add-link-foot .hint { color: var(--mute); font-size: 13px; }
@media (max-width: 900px) { #addLinkForm { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { #addLinkForm { grid-template-columns: 1fr; } }

/* ---------- 3D model page */
.model-page .toolbar { display: block; }
.model-sub { margin: 6px 0 0; color: var(--ink-2); }
.model-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 20px; padding-bottom: 64px; }
.model-stage { position: relative; height: min(78vh, 760px); border-radius: 18px; border: 1px solid var(--line); overflow: hidden; cursor: grab;
  background: radial-gradient(120% 80% at 50% 10%, #26233a 0%, #16151c 55%, #121117 100%); touch-action: none; }
.model-stage:active { cursor: grabbing; }
.model-stage canvas { display: block; width: 100% !important; height: 100% !important; }
.model-msg { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; padding: 24px; text-align: center; color: var(--ink-2); }
.model-panel { display: grid; gap: 14px; align-content: start; max-height: min(78vh, 760px); overflow: auto; }
.model-panel > section { padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; display: grid; gap: 12px; }
.model-panel h3 { margin: 0; font-size: 16px; }
.range { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; font-size: 14px; color: var(--ink-2); }
.range output { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.range input { grid-column: 1 / -1; width: 100%; accent-color: var(--purple); }
.rec { margin: 0; font-size: 14px; color: var(--ink-2); }
.rec b { color: var(--purple-text); }
#mSearch { height: 40px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--sunken); font-size: 14px; }
#mSearch:focus { border-color: var(--purple); }
.m-results { display: grid; gap: 6px; }
.m-results:empty { display: none; }
.hit { display: grid; grid-template-columns: 44px 1fr auto; gap: 10px; align-items: center; padding: 6px; text-align: left; border: 1px solid var(--line); border-radius: 10px; background: var(--sunken); cursor: pointer; }
.hit:hover { border-color: var(--purple-line); }
.hit b, .worn b { display: block; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hit small, .worn small { color: var(--mute); font-size: 12px; }
.hit .wear { font-size: 13px; font-weight: 600; color: var(--purple-text); padding: 0 6px; }
.thumb { width: 44px; height: 44px; border-radius: 8px; overflow: hidden; background: var(--raised); display: block; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb i { display: block; width: 100%; height: 100%; }
.or { margin: 0; font-size: 12px; color: var(--mute); }
.chips-row { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--sunken); font-size: 13px; cursor: pointer; }
.chip:hover { border-color: var(--purple-line); color: var(--purple-text); }
.worn-head { display: flex; justify-content: space-between; align-items: center; }
.link-btn { border: 0; background: none; color: var(--mute); font-size: 13px; cursor: pointer; }
.link-btn:hover { color: var(--ink); text-decoration: underline; }
.worn { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.worn li { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 10px; align-items: center; }
.worn li.none { display: block; color: var(--mute); font-size: 13px; }
.worn .info { min-width: 0; }
.worn .ctrl { grid-column: 2; display: flex; gap: 6px; align-items: center; }
.worn select { height: 32px; padding: 0 6px; border-radius: 7px; border: 1px solid var(--line); background: var(--sunken); font-size: 13px; }
.worn input[type=color] { width: 36px; height: 32px; padding: 2px; border-radius: 7px; border: 1px solid var(--line); background: var(--sunken); cursor: pointer; }
.x-small { width: 32px; height: 32px; border-radius: 7px; border: 1px solid var(--line); background: var(--sunken); cursor: pointer; font-size: 16px; color: var(--ink-2); }
.fit { display: inline-block; margin-top: 3px; padding: 1px 8px; border-radius: 6px; font-size: 11px; font-weight: 600; }
.fit-ok { background: rgba(92, 197, 138, .14); color: var(--green); }
.fit-tight { background: var(--red-tint); color: var(--red); }
.fit-big { background: var(--purple-tint); color: var(--purple-text); }
.model-note { margin: 0; font-size: 12px; color: var(--mute); }
@media (max-width: 900px) {
  .model-layout { grid-template-columns: 1fr; }
  .model-stage { height: 62vh; }
  .model-panel { max-height: none; overflow: visible; }
}
.view-reset { position: absolute; right: 12px; bottom: 12px; height: 32px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line); background: rgba(18, 17, 23, .85); color: var(--ink-2); font-size: 12px; cursor: pointer; }
.view-reset:hover { color: var(--ink); border-color: var(--line-strong); }
.look { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.look label { display: grid; gap: 6px; font-size: 13px; color: var(--ink-2); }
.look select { height: 36px; padding: 0 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--sunken); font-size: 13px; color: var(--ink); }
.view-more { display: flex; justify-content: center; margin: 36px 0 8px; }
.view-more .btn { height: 44px; padding: 0 28px; }
/* no hover effects while scrolling: cards passing under the cursor would zoom and repaint their photos mid-scroll */
.lenis-scrolling .card, .lenis-scrolling .spot { pointer-events: none; }

/* privacy + terms pages */
.legal { max-width: 760px; margin: 0 auto; padding: 56px 24px 80px; }
.legal h1 { margin: 6px 0 4px; font-size: 34px; }
.legal h2 { margin: 34px 0 8px; font-size: 19px; }
.legal p, .legal li { color: var(--ink-2); }
.legal a { color: var(--purple-text); }
.legal .updated { color: var(--mute); font-size: 13px; }
.legal mark { background: var(--purple-tint); color: var(--purple-text); border-radius: 4px; padding: 0 4px; }
.legal table { width: 100%; border-collapse: collapse; font-size: 14px; }
.legal th, .legal td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); color: var(--ink-2); vertical-align: top; }
.legal th { color: var(--ink); }
.consent a, .del-acc { color: var(--ink-2); }
.del-acc { margin-top: 18px; font-size: 13px; }
.del-acc .link-btn { color: var(--red); padding: 0; text-decoration: underline; }
.foot-links { margin: 0; }
.foot-links a, footer p a { color: var(--ink-2); }

/* accessibility: screen-reader-only text and the skip link (visible when focused) */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 1000; padding: 10px 16px; border-radius: 8px; background: var(--purple); color: #fff; font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }
main:focus { outline: none; }

/* browse-only copy (Cloudflare Pages): no scanning, accounts or private links */
.static-note { display: none; }
.static .static-note { display: block; max-width: 520px; margin: 18px auto 0; color: var(--ink-2); }
.static .static-note a { color: var(--purple-text); }
.static .hero .lede, .static #accountBtn, .static #nav a[data-view="scanned"], .static #nav a[data-view="links"], .static #addLinkLogin { display: none; }
