@import url("https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:wght@400;500;600;700;800&family=Inter:wght@400;500;600;700&display=swap");

/* ============================================================================
   GEMBY — MINIMAL & REFINED REDESIGN
   Quiet premium. Generous whitespace, restrained colour (one blue accent),
   hairline borders, subtle elevation, precise typography. Apple / Linear /
   Stripe calm — decoration minimal, type and space do the work.
   ========================================================================== */

/* ---------- 1. TOKENS ---------- */
:root {
  /* One accent, used sparingly */
  --blue: #1f3df0;
  --blue-700: #1730c4;
  --blue-tint: #eef1fe;

  /* Neutral foundation (the real palette) */
  --ink: #16181d;
  --ink-2: #3c4049;
  --muted: #80868f;
  --faint: #a8acb3;
  --line: #ecebe7;
  --line-2: #f2f1ed;
  --surface: #ffffff;
  --paper: #fafaf8;

  /* Accents reserved for rare emphasis only */
  --lime: #c8f000;
  --success: #1a9d54;
  --danger: #d83a3a;

  --display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --font-text: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;

  /* Type scale — calm, not screaming */
  --t-mono: 0.75rem;
  --t-sm: 0.875rem;
  --t-base: 1rem;
  --t-lg: 1.0625rem;
  --t-xl: 1.25rem;
  --t-2xl: 1.625rem;
  --t-3xl: 2.25rem;
  --t-4xl: clamp(2.25rem, 4vw, 3.25rem);
  --t-hero: clamp(2.75rem, 5.5vw, 4.25rem);

  /* Space — generous */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 20px;
  --sp-6: 24px; --sp-8: 32px; --sp-10: 40px; --sp-12: 48px; --sp-16: 64px;
  --sp-20: 80px; --sp-24: 96px; --sp-32: 128px;

  --r-sm: 8px; --r-md: 12px; --r-lg: 18px; --r-xl: 24px; --r-pill: 999px;

  /* Whisper-soft elevation */
  --sh-sm: 0 1px 2px rgba(22, 24, 29, 0.04);
  --sh-md: 0 6px 24px rgba(22, 24, 29, 0.06);
  --sh-lg: 0 20px 48px rgba(22, 24, 29, 0.10);

  --container: 1140px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur: 0.22s;
  color-scheme: light;
}

/* ---------- 2. BASE ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-text);
  font-size: var(--t-base);
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: none; }
a { color: inherit; text-decoration: none; }
input, select, textarea { font: inherit; color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.eyebrow, .logo-eyebrow, .kicker, .premium-kicker {
  display: inline-block;
  font-family: var(--font-text);
  font-weight: 500;
  font-size: var(--t-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.muted { color: var(--muted); }
.accent { color: var(--blue); }
.lead { font-size: var(--t-lg); line-height: 1.6; color: var(--ink-2); max-width: 56ch; }
::selection { background: var(--blue); color: #fff; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ---------- 3. SHELL ---------- */
body.modal-open { overflow: hidden; }
.app-shell { display: flex; flex-direction: column; min-height: 100dvh; max-width: 100%; }
.main { width: min(var(--container), calc(100% - 48px)); margin: 0 auto; padding: var(--sp-10) 0 var(--sp-24); flex: 1 0 auto; }

.sidebar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: var(--sp-6);
  width: 100%; padding: var(--sp-5) max(24px, calc((100vw - var(--container)) / 2));
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
}
.brand { display: inline-flex; align-items: flex-start; gap: 6px; }
.brand img { height: 28px; width: auto; }
.brand-beta {
  margin-top: -1px;
  font-family: var(--display);
  font-size: 7.5px;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1;
  padding: 2px 4px;
  border-radius: 4px;
  background: var(--line);
  color: var(--blue);
  text-transform: uppercase;
}
/* In dark mode var(--line) is a dark border tint, so blue-on-dark was nearly invisible.
   Use a solid blue chip with white text — readable on the dark nav. */
html[data-theme="dark"] .brand-beta { background: var(--blue); color: #fff; }

.nav { display: flex; align-items: center; gap: var(--sp-1); overflow-x: auto; scrollbar-width: none; position: absolute; left: 50%; transform: translateX(-50%); }
.nav::-webkit-scrollbar { display: none; }
.sidebar .nav-toggle { display: none; }
@media (max-width: 820px) {
  .sidebar .nav-toggle { display: inline-flex; flex: none; margin-right: var(--sp-1); }
  /* Center the logo in the mobile bar: hamburger left · logo centered · avatar right */
  .sidebar .brand { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0; margin: 0; transform: translateY(-8px);
    flex-direction: column; align-items: stretch; gap: 4px; overflow: visible;
    padding: var(--sp-3); background: var(--surface);
    border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); box-shadow: var(--sh-lg);
    opacity: 0; visibility: hidden; pointer-events: none;
    transition: opacity 0.2s var(--ease), transform 0.2s var(--ease), visibility 0.2s var(--ease);
  }
  .sidebar.nav-open .nav { opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0); }
  .nav-link { height: 46px; justify-content: flex-start; padding: 0 var(--sp-4); font-size: var(--t-base); }
}
.nav-link {
  display: inline-flex; align-items: center; height: 38px; padding: 0 var(--sp-4);
  border-radius: var(--r-pill); font-size: var(--t-sm); font-weight: 500;
  color: var(--muted); white-space: nowrap;
  transition: color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.nav-link:hover { color: var(--ink); }
.nav-link.active { color: var(--ink); background: color-mix(in srgb, var(--ink) 6%, transparent); font-weight: 600; }
.sidebar-footer { display: none; }

.quick-actions {
  margin-left: auto; z-index: 60; display: flex; align-items: center; gap: var(--sp-2);
}
.quick-icon {
  display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px;
  border-radius: var(--r-pill); background: var(--surface); border: 1px solid var(--line); color: var(--ink-2);
}
.quick-icon:hover { border-color: var(--ink-2); }
.quick-icon svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.god-mode-entry {
  height: 40px; padding: 0 var(--sp-5); border-radius: var(--r-pill);
  font-family: var(--font-text); font-weight: 700; font-size: var(--t-mono);
  text-transform: uppercase; letter-spacing: 0.08em; background: #d9ff00; color: var(--ink);
}
.profile-menu { position: relative; }
.profile-menu-popover {
  position: absolute; right: 0; top: calc(100% + 8px); display: flex; flex-direction: column;
  min-width: 200px; padding: var(--sp-2); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--sh-lg);
}
.profile-menu-popover button { text-align: left; padding: 10px var(--sp-3); border-radius: var(--r-sm); font-size: var(--t-sm); }
.profile-menu-popover button:hover { background: var(--paper); }

.topbar { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--sp-6); flex-wrap: wrap; margin-bottom: var(--sp-10); }
.topbar h1 { font-size: var(--t-3xl); margin-top: var(--sp-2); }
.topbar-actions { display: flex; gap: var(--sp-3); flex-wrap: wrap; }

.sponsor-strip { margin-bottom: var(--sp-12); border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); }
.sponsor-strip img { width: 100%; height: auto; }

/* Home: let the hero be the top of the page — no page-title row, no banner. */
body[data-view="dashboard"] .topbar,
body[data-view="dashboard"] .sponsor-strip { display: none; }

/* ---------- 4. BUTTONS ---------- */
.primary-button, .hero-cta, .ghost-button, .text-button {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  font-weight: 600; border-radius: var(--r-pill); white-space: nowrap;
  transition: transform var(--dur) var(--ease), background var(--dur) var(--ease), border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.primary-button, .hero-cta {
  min-height: 48px; padding: 0 var(--sp-6); font-size: var(--t-base);
  color: #fff;
}
.primary-button { background: var(--blue); }
.primary-button:hover { background: var(--blue-700); }
.hero-cta { background: var(--ink); }
.hero-cta:hover { background: #000; }
.primary-button span, .hero-cta span { color: inherit; }
.ghost-button {
  min-height: 48px; padding: 0 var(--sp-6); font-size: var(--t-base);
  background: var(--surface); color: var(--ink); border: 1px solid var(--line);
}
.ghost-button:hover { border-color: var(--ink); }
.text-button { min-height: 36px; padding: 0 var(--sp-2); font-size: var(--t-sm); color: var(--blue); }
.text-button:hover { color: var(--blue-700); }

/* ---------- 5. BADGES ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: var(--r-pill);
  font-family: var(--font-text); font-weight: 500; font-size: 0.625rem; text-transform: uppercase; letter-spacing: 0.07em;
  background: var(--line-2); color: var(--muted); white-space: nowrap; flex: none;
}
.feedback-requirements { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-4); margin-top: var(--sp-4); padding-top: var(--sp-4); border-top: 1px solid var(--line); }
.feedback-requirements > div { display: grid; gap: 3px; }
.feedback-requirements strong { font-family: var(--display); font-weight: 800; font-size: var(--t-2xl); color: var(--blue); line-height: 1; }
.feedback-requirements span { font-size: var(--t-sm); color: var(--muted); }

/* ---------- 6. HERO — crisp headline over a living, drifting card-wall ---------- */
.gem-hero {
  position: relative; overflow: hidden;
  display: grid; place-items: center; text-align: center;
  padding: clamp(76px, 11vw, 156px) 0;
  margin-bottom: var(--sp-16);
}
.gem-hero-bg {
  position: absolute; inset: -8% -3%; z-index: 1; pointer-events: none;
  display: flex; flex-direction: column; justify-content: center; gap: clamp(10px, 1.4vw, 18px);
}
.gem-hero-bg::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: radial-gradient(60% 66% at 50% 50%, var(--paper) 0%, var(--paper) 32%, color-mix(in srgb, var(--paper) 40%, transparent) 70%, transparent 100%);
}
.hero-bg-row { display: flex; overflow: hidden; }
.hero-bg-track { display: flex; gap: clamp(10px, 1.4vw, 18px); width: max-content; padding-right: clamp(10px, 1.4vw, 18px); animation: hero-drift 64s linear infinite; }
.hero-bg-row.reverse .hero-bg-track { animation-direction: reverse; animation-duration: 82s; }
@keyframes hero-drift { to { transform: translateX(-50%); } }
.hero-bg-chip { flex: none; width: clamp(66px, 8vw, 108px); aspect-ratio: 5 / 7; border-radius: 8px; overflow: hidden; opacity: 0.55; }
.hero-bg-chip img { width: 100%; height: 100%; object-fit: cover; }

.gem-hero-head { position: relative; z-index: 2; display: grid; justify-items: center; max-width: 760px; padding: 0 var(--sp-4); }
.gem-hero-head .eyebrow { margin-bottom: var(--sp-6); }
.gem-hero-head h1 {
  font-size: var(--t-hero); letter-spacing: -0.045em; line-height: 0.96; margin-bottom: var(--sp-5); font-weight: 700;
}
.gem-hero-head h1 .accent { color: var(--blue); }
.gem-hero-head .lead { margin-bottom: var(--sp-12); max-width: 50ch; }
.gem-hero-actions { display: flex; gap: var(--sp-4); flex-wrap: wrap; align-items: center; justify-content: center; }
.hero-cta { background: var(--blue); color: #fff; gap: 10px; padding: 0 28px; }
.hero-cta:hover { background: var(--blue-700); }
.hero-cta-arrow { display: inline-flex; transition: transform var(--dur) var(--ease); }
.hero-cta:hover .hero-cta-arrow { transform: translateX(3px); }
.gem-hero-status {
  display: inline-flex; align-items: center; gap: 8px; margin-top: var(--sp-6);
  font-family: var(--font-text); font-size: var(--t-mono); color: var(--muted); letter-spacing: 0.02em;
}
.gem-hero-status .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 0 rgba(26,157,84,.4); animation: pulse 2.2s var(--ease) infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 7px rgba(26,157,84,0); } 100% { box-shadow: 0 0 0 0 rgba(26,157,84,0); } }

.ebay-wordmark { font-weight: 700; font-style: italic; }
.ebay-red { color: #e53238; } .ebay-blue { color: #0064d2; } .ebay-yellow { color: #f5af02; } .ebay-green { color: #86b817; }
/* On the blue hero the eBay blue letter blends in → render the wordmark in white */
.brand-hero .ebay-wordmark span { color: #fff; }

/* Fanned grails — a hand of real cards that deals out on load, then drifts on scroll */
.gem-fan { position: relative; width: 100%; display: flex; justify-content: center; will-change: transform; }
.gem-fan-stack { position: relative; width: min(680px, 96%); height: clamp(280px, 32vw, 400px); }
.gem-fan-card {
  position: absolute; left: 50%; top: 50%;
  width: clamp(150px, 17vw, 208px); aspect-ratio: 5 / 7;
  border-radius: 11px; overflow: hidden;
  background: var(--line-2); border: 3px solid #fff;
  box-shadow: 0 20px 48px rgba(22,24,29,.24);
  transform-origin: bottom center; will-change: transform;
  cursor: pointer; opacity: 0;
  transform: translate(-50%, -50%) translateY(48px) rotate(0deg) scale(0.92);
  transition: transform 0.34s var(--ease), opacity 0.6s var(--ease), box-shadow 0.34s var(--ease);
}
.gem-fan-card img { width: 100%; height: 100%; object-fit: cover; }
.gem-fan-card-3 { box-shadow: 0 28px 60px rgba(22,24,29,.30); }
.gem-fan.ready .gem-fan-card { opacity: 1; }
.gem-fan.ready .gem-fan-card-1 { transform: translate(-50%, -50%) translate(-258px, 36px) rotate(-15deg); z-index: 1; transition-delay: 0.04s; }
.gem-fan.ready .gem-fan-card-2 { transform: translate(-50%, -50%) translate(-132px, 4px) rotate(-7.5deg); z-index: 2; transition-delay: 0.12s; }
.gem-fan.ready .gem-fan-card-3 { transform: translate(-50%, -50%) translate(0, -16px) rotate(0deg) scale(1.07); z-index: 3; transition-delay: 0.2s; }
.gem-fan.ready .gem-fan-card-4 { transform: translate(-50%, -50%) translate(132px, 4px) rotate(7.5deg); z-index: 2; transition-delay: 0.12s; }
.gem-fan.ready .gem-fan-card-5 { transform: translate(-50%, -50%) translate(258px, 36px) rotate(15deg); z-index: 1; transition-delay: 0.04s; }
/* Per-card hover: the hovered card stays in its place + stacking order, just
   nudges up a little and grows slightly (no z-index change, no rotation change) */
.gem-fan.ready .gem-fan-card-1:hover { transform: translate(-50%, -50%) translate(-258px, 18px) rotate(-15deg) scale(1.06); box-shadow: 0 30px 58px rgba(22,24,29,.30); }
.gem-fan.ready .gem-fan-card-2:hover { transform: translate(-50%, -50%) translate(-132px, -14px) rotate(-7.5deg) scale(1.06); box-shadow: 0 30px 58px rgba(22,24,29,.30); }
.gem-fan.ready .gem-fan-card-3:hover { transform: translate(-50%, -50%) translate(0, -34px) rotate(0deg) scale(1.12); box-shadow: 0 36px 70px rgba(22,24,29,.32); }
.gem-fan.ready .gem-fan-card-4:hover { transform: translate(-50%, -50%) translate(132px, -14px) rotate(7.5deg) scale(1.06); box-shadow: 0 30px 58px rgba(22,24,29,.30); }
.gem-fan.ready .gem-fan-card-5:hover { transform: translate(-50%, -50%) translate(258px, 18px) rotate(15deg) scale(1.06); box-shadow: 0 30px 58px rgba(22,24,29,.30); }

/* Trending Grails fan — three large collectible cards, arced, with name plates */
.premium-fan { margin-top: var(--sp-6); }
.premium-fan .gem-fan-stack { width: min(720px, 96%); height: clamp(320px, 36vw, 460px); }
.premium-fan .gem-fan-card { width: clamp(184px, 22vw, 264px); }
.premium-fan.ready .gem-fan-card-1 { transform: translate(-50%, -50%) translate(-204px, 18px) rotate(-9deg); z-index: 1; transition-delay: 0.04s; }
.premium-fan.ready .gem-fan-card-2 { transform: translate(-50%, -50%) translate(0, -14px) rotate(0deg) scale(1.06); z-index: 3; transition-delay: 0.14s; }
.premium-fan.ready .gem-fan-card-3 { transform: translate(-50%, -50%) translate(204px, 18px) rotate(9deg); z-index: 1; transition-delay: 0.04s; }
.premium-fan.ready .gem-fan-card-1:hover { transform: translate(-50%, -50%) translate(-204px, -2px) rotate(-9deg) scale(1.06); box-shadow: 0 32px 62px rgba(22,24,29,.32); }
.premium-fan.ready .gem-fan-card-2:hover { transform: translate(-50%, -50%) translate(0, -34px) rotate(0deg) scale(1.12); box-shadow: 0 38px 74px rgba(22,24,29,.34); }
.premium-fan.ready .gem-fan-card-3:hover { transform: translate(-50%, -50%) translate(204px, -2px) rotate(9deg) scale(1.06); box-shadow: 0 32px 62px rgba(22,24,29,.32); }
.grail-tag {
  position: absolute; top: 11px; left: 11px; z-index: 2;
  padding: 4px 8px; border-radius: 6px;
  font-family: var(--font-text); font-weight: 500; font-size: 0.5rem; text-transform: uppercase; letter-spacing: 0.08em;
  background: rgba(255,255,255,0.9); color: var(--muted);
}
.grail-label {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  display: grid; gap: 2px; padding: 30px 13px 13px; text-align: left;
  background: linear-gradient(to top, rgba(10,11,15,0.86) 0%, rgba(10,11,15,0.5) 55%, transparent 100%);
  color: #fff;
}
.grail-label strong { font-size: 0.8125rem; font-weight: 600; line-height: 1.25; letter-spacing: -0.01em; }
.grail-label em { font-style: normal; font-size: 0.625rem; letter-spacing: 0.01em; color: rgba(255,255,255,0.72); }
@media (max-width: 980px) { .premium-fan .gem-fan-stack { transform: scale(0.84); } }
@media (max-width: 600px) { .premium-fan .gem-fan-stack { transform: scale(0.6); height: 340px; } }

/* ---------- MOTION SYSTEM — scroll-choreographed reveals (Apple-style calm dynamism) ---------- */
[data-reveal] { opacity: 0; transform: translateY(30px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
[data-reveal].in-view { opacity: 1; transform: none; }
[data-reveal-stagger] > * { opacity: 0; transform: translateY(26px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
[data-reveal-stagger].in-view > * { opacity: 1; transform: none; }
[data-reveal-stagger].in-view > *:nth-child(2) { transition-delay: 0.08s; }
[data-reveal-stagger].in-view > *:nth-child(3) { transition-delay: 0.16s; }
[data-reveal-stagger].in-view > *:nth-child(4) { transition-delay: 0.24s; }
.gem-hero-head > * { opacity: 0; transform: translateY(22px); animation: hero-rise 0.9s var(--ease) forwards; }
.gem-hero-head .eyebrow { animation-delay: 0.05s; }
.gem-hero-head h1 { animation-delay: 0.12s; }
.gem-hero-head .lead { animation-delay: 0.22s; }
.gem-hero-head .gem-hero-actions { animation-delay: 0.32s; }
.gem-hero-head .gem-hero-status { animation-delay: 0.42s; }
@keyframes hero-rise { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  [data-reveal], [data-reveal-stagger] > *, .gem-hero-head > *, .gem-fan-card { opacity: 1 !important; transform: none !important; animation: none !important; }
  .gem-fan.ready .gem-fan-card-1 { transform: translate(-50%, -50%) translate(-258px, 36px) rotate(-15deg) !important; }
  .gem-fan.ready .gem-fan-card-2 { transform: translate(-50%, -50%) translate(-132px, 4px) rotate(-7.5deg) !important; }
  .gem-fan.ready .gem-fan-card-3 { transform: translate(-50%, -50%) translate(0, -16px) rotate(0deg) scale(1.07) !important; }
  .gem-fan.ready .gem-fan-card-4 { transform: translate(-50%, -50%) translate(132px, 4px) rotate(7.5deg) !important; }
  .gem-fan.ready .gem-fan-card-5 { transform: translate(-50%, -50%) translate(258px, 36px) rotate(15deg) !important; }
}

/* Live scan band — slim ambient "what Gemby is watching now" proof strip */
.gem-scan-band {
  position: relative; display: flex; align-items: center; gap: var(--sp-6);
  margin-bottom: var(--sp-24); padding: var(--sp-4) 0;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); overflow: hidden;
}
.gem-scan-band-label {
  flex: none; z-index: 2; display: inline-flex; align-items: center; gap: 8px; padding-right: var(--sp-5);
  font-family: var(--font-text); font-size: var(--t-mono); color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em;
  background: var(--paper);
}
.gem-scan-band-label .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 0 rgba(26,157,84,.4); animation: pulse 2.2s var(--ease) infinite; }
.gem-scan-viewport {
  flex: 1; overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 6%, #000 94%, transparent 100%);
          mask-image: linear-gradient(to right, transparent 0, #000 6%, #000 94%, transparent 100%);
}
.gem-scan-track { display: flex; gap: var(--sp-3); width: max-content; animation: scan-marquee 42s linear infinite; }
@keyframes scan-marquee { to { transform: translateX(-50%); } }
.scan-chip { flex: none; width: 58px; aspect-ratio: 3 / 4; border-radius: 7px; overflow: hidden; border: 1px solid var(--line); background: var(--line-2); opacity: 0.92; }
.scan-chip img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- 7. STAT BAND — light, divided, minimal ---------- */
.gem-stat-band { margin-bottom: var(--sp-24); padding: var(--sp-12) 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.gem-stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-8); }
.gem-stat { text-align: left; padding-left: var(--sp-6); border-left: 1px solid var(--line); }
.gem-stat:first-child { border-left: none; padding-left: 0; }
.gem-stat strong, .gem-stat-stars { display: block; font-family: var(--display); font-weight: 700; font-size: var(--t-2xl); letter-spacing: -0.03em; color: var(--ink); margin-bottom: var(--sp-2); }
.gem-stat-stars { color: var(--blue); }
.gem-stat span { font-family: var(--font-text); font-size: var(--t-mono); color: var(--muted); }

/* ---------- 8. RAILS + CARDS ---------- */
.home-rail { margin-bottom: var(--sp-24); }
.section-head, .rail-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-4); margin-bottom: var(--sp-6); }
.section-head h2, .rail-head h2 { font-size: var(--t-2xl); letter-spacing: -0.025em; font-weight: 600; }

.card-rail {
  display: grid; grid-auto-flow: column; grid-auto-columns: clamp(218px, 62vw, 250px); gap: var(--sp-4);
  overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: var(--sp-4); scroll-padding-left: 2px;
  scrollbar-width: thin; scrollbar-color: var(--line) transparent;
}
.card-rail::-webkit-scrollbar { height: 8px; }
.card-rail::-webkit-scrollbar-thumb { background: var(--line); border-radius: var(--r-pill); }
.card-rail::-webkit-scrollbar-thumb:hover { background: var(--line-2); }

.mcard {
  scroll-snap-align: start; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease); cursor: pointer;
}
.mcard:hover { border-color: var(--line); box-shadow: var(--sh-md); transform: translateY(-3px); }
.mcard-art { position: relative; aspect-ratio: 4 / 5; overflow: hidden; display: grid; place-items: center; padding: var(--sp-3); background: linear-gradient(180deg, #ffffff 0%, var(--paper) 100%); }
.mcard-art img { width: auto; height: auto; max-width: 90%; max-height: 100%; object-fit: contain; border-radius: 6px; box-shadow: 0 8px 22px rgba(22, 24, 29, 0.16); }
.deal-pill {
  position: absolute; top: 10px; left: 10px; z-index: 2; padding: 4px 9px; border-radius: var(--r-pill);
  font-family: var(--font-text); font-weight: 500; font-size: 0.625rem; text-transform: uppercase; letter-spacing: 0.05em;
  background: rgba(255,255,255,0.92); color: var(--ink-2); backdrop-filter: blur(4px);
}
.deal-pill.good { background: var(--ink); color: var(--surface); }
.mcard-body { display: flex; flex-direction: column; gap: var(--sp-3); padding: var(--sp-4); flex: 1; }
.mcard-body h3 { font-size: var(--t-base); font-weight: 600; line-height: 1.3; letter-spacing: -0.01em; }
.traits { display: flex; flex-wrap: wrap; gap: 6px; }
.traits span { padding: 3px 8px; border-radius: var(--r-sm); font-family: var(--font-text); font-size: 0.625rem; background: var(--line-2); color: var(--muted); }
.mcard-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--sp-3); margin-top: auto; }
.mcard-price { display: flex; flex-direction: column; }
.mcard-price b { font-weight: 700; font-size: var(--t-lg); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.mcard-price small { font-size: var(--t-sm); color: var(--muted); }
.score .stars { font-family: var(--display); font-weight: 700; font-size: var(--t-base); letter-spacing: 1px; }
.score .stars span { color: var(--blue); }
.score .stars span.off { color: var(--line); }
.seller-row { display: flex; align-items: center; gap: 7px; padding-top: var(--sp-3); border-top: 1px solid var(--line-2); font-family: var(--font-text); font-size: var(--t-sm); color: var(--ink-2); overflow: hidden; }
.seller-name { flex: 1 1 auto; font-weight: 500; color: var(--ink-2); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seller-feedback { flex: 0 0 auto; margin-left: 8px; font-weight: 600; color: var(--success); font-variant-numeric: tabular-nums; white-space: nowrap; }
.seller-glyph { width: 18px; height: 18px; flex: none; }
.seller-glyph circle, .seller-glyph path { fill: none; stroke: var(--muted); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.verified-seller-icon .vs-disc { fill: var(--blue); stroke: none; }
.verified-seller-icon .vs-check { fill: none; stroke: #fff; stroke-width: 2.7; stroke-linecap: round; stroke-linejoin: round; }
.verified-seller-icon { color: var(--blue); }

/* ---------- 9. TRENDING GRAILS — refined collectible "display-case" cards ---------- */
.premium-showcase { margin-bottom: var(--sp-24); padding-top: var(--sp-8); }
.premium-head { margin-bottom: var(--sp-10); align-items: flex-end; }
.premium-kicker { color: var(--muted); }
.premium-head h2 { font-size: var(--t-3xl); margin-top: var(--sp-3); font-weight: 600; letter-spacing: -0.025em; }
.premium-head .badge { background: var(--line-2); color: var(--muted); }
.premium-card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 3vw, 40px); }
.premium-card {
  position: relative; display: flex; flex-direction: column; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--sh-sm);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.premium-card:hover { box-shadow: 0 30px 70px rgba(5,12,50,0.22); border-color: color-mix(in srgb, var(--blue) 40%, var(--line)); }
/* Interactive 3D tilt + light glare that follow the cursor */
.premium-card[data-premium-tilt] { transform: perspective(1100px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transform-style: preserve-3d; transition: transform 0.16s var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease); will-change: transform; }
.premium-card-glare { position: absolute; inset: 0; z-index: 3; pointer-events: none; opacity: 0; mix-blend-mode: screen; transition: opacity 0.3s var(--ease); background: radial-gradient(220px circle at var(--mx, 50%) var(--my, 50%), rgba(255,255,255,0.55), transparent 60%); }
.premium-card:hover .premium-card-glare { opacity: 1; }
/* Spotlight stage: a bigger card floating on a blue-lit pedestal (sets grails apart) */
.premium-card-frame {
  position: relative; aspect-ratio: 4 / 5; display: grid; place-items: center;
  padding: clamp(20px, 2.6vw, 34px) clamp(18px, 2.4vw, 30px) clamp(28px, 3.4vw, 44px);
  background: radial-gradient(125% 88% at 50% -8%, #ffffff 0%, color-mix(in srgb, var(--blue-tint) 50%, #fff) 100%); border-bottom: 1px solid var(--line);
}
.premium-card-frame::before {
  content: ""; position: absolute; z-index: 0; width: 70%; height: 52%; top: 41%; left: 50%; transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(31,61,240,0.12) 0%, transparent 70%); filter: blur(20px);
}
.premium-card-frame::after {
  content: ""; position: absolute; left: 50%; bottom: 11%; z-index: 0;
  width: 58%; height: 18px; transform: translateX(-50%);
  background: radial-gradient(50% 50% at 50% 50%, rgba(5,12,50,0.26) 0%, transparent 72%);
}
.premium-card-frame img {
  position: relative; z-index: 1; max-height: 100%; width: auto; max-width: 88%; object-fit: contain; border-radius: 6px;
  box-shadow: 0 22px 48px rgba(5,12,50,0.32); transition: transform 0.4s var(--ease);
}
.premium-card:hover .premium-card-frame img { transform: translateY(-10px) scale(1.03); }
.premium-card-tag {
  position: absolute; top: 14px; left: 14px; z-index: 2;
  padding: 5px 12px; border-radius: var(--r-pill);
  font-family: var(--font-text); font-weight: 700; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.07em;
  background: var(--blue); color: #fff; border: none; box-shadow: 0 4px 14px rgba(31,61,240,0.32);
}
/* Engraved placard plate */
.premium-card-info { display: grid; gap: var(--sp-3); padding: var(--sp-5) var(--sp-5) var(--sp-6); background: var(--surface); }
.premium-card-info h3 { font-size: var(--t-xl); font-weight: 700; line-height: 1.24; letter-spacing: -0.02em; }
.premium-card-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.premium-card-chips span { padding: 5px 11px; border-radius: var(--r-pill); font-family: var(--font-text); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.01em; background: var(--blue-tint); color: var(--blue); }

/* Premium card surface (used inside the card modal) — clean framed image */
.premium-card-stage { position: relative; }
.premium-card-face {
  display: grid; place-items: center; padding: var(--sp-6);
  background: radial-gradient(120% 90% at 50% 0%, #ffffff 0%, var(--paper) 100%);
  border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden;
}
.premium-card-face img { max-width: 70%; height: auto; object-fit: contain; border-radius: 6px; box-shadow: 0 16px 40px rgba(22,24,29,.22); }

/* ---------- 10. STEPS ---------- */
.gem-how { margin-bottom: var(--sp-24); }
.gem-sec-head { max-width: 52ch; margin: 0 auto var(--sp-12); text-align: center; }
.gem-sec-head h2 { font-size: var(--t-3xl); margin-top: var(--sp-3); font-weight: 700; letter-spacing: -0.025em; }
.gem-sec-head .kicker { color: var(--blue); }
.gem-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-6); }
.gem-step {
  display: grid; gap: var(--sp-4); align-content: start;
  padding: var(--sp-8); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-sm);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}
.gem-step:hover { transform: translateY(-4px); box-shadow: var(--sh-md); border-color: color-mix(in srgb, var(--blue) 22%, var(--line)); }
.gem-step-no {
  display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px;
  border-radius: var(--r-md); background: var(--blue-tint); color: var(--blue);
  font-family: var(--display); font-weight: 800; font-size: var(--t-lg); margin-bottom: var(--sp-2);
}
.gem-step h3 { font-size: var(--t-xl); font-weight: 600; }
.gem-step p { color: var(--muted); }

/* ---------- 11. FEATURES ---------- */
.gem-why { margin-bottom: var(--sp-24); }
.gem-feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-4); }
.gem-feature {
  padding: var(--sp-8); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-sm);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}
.gem-feature:hover { transform: translateY(-4px); box-shadow: var(--sh-md); border-color: color-mix(in srgb, var(--blue) 22%, var(--line)); }
.gem-why .kicker { color: var(--blue); }
.gem-feature-icon { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: var(--r-md); background: var(--blue-tint); color: var(--blue); margin-bottom: var(--sp-5); }
.gem-feature h3 { font-size: var(--t-lg); font-weight: 600; margin-bottom: var(--sp-2); }
.gem-feature p { color: var(--muted); font-size: var(--t-sm); }

/* ---------- 12. CTA — calm, confident ---------- */
.gem-cta { margin-bottom: var(--sp-12); }
.gem-cta-box {
  position: relative; overflow: hidden;
  display: grid; gap: var(--sp-5); justify-items: center; text-align: center;
  padding: clamp(56px, 8vw, 104px) var(--sp-8); background: var(--blue); border-radius: var(--r-xl); color: #fff;
}
.gem-cta-box::before {
  content: "*"; position: absolute; z-index: 0; right: -3%; bottom: -34%;
  font-family: var(--display); font-weight: 800; font-size: clamp(240px, 30vw, 420px); line-height: 1; color: #fff; opacity: 0.08; pointer-events: none;
}
.gem-cta-box > * { position: relative; z-index: 1; }
.gem-cta-box h2 { font-size: var(--t-4xl); color: #fff; font-weight: 800; letter-spacing: -0.03em; }
.gem-cta-box p { color: rgba(255,255,255,0.82); max-width: 48ch; }
.gem-cta-box .hero-cta { background: var(--lime); color: #16240a; }
.gem-cta-box .hero-cta:hover { background: #fff; color: var(--ink); }

/* ---------- 13. FOOTER ---------- */
.site-footer { width: min(var(--container), calc(100% - 48px)); margin: 0 auto; padding: var(--sp-16) 0 var(--sp-12); border-top: 1px solid var(--line); display: grid; gap: var(--sp-10); }
.footer-links { display: flex; flex-wrap: wrap; gap: var(--sp-6); }
.footer-links a { font-size: var(--t-sm); font-weight: 500; color: var(--muted); transition: color var(--dur) var(--ease); display: inline-flex; align-items: center; padding: 8px 4px; }
.footer-links a:hover { color: var(--ink); }
.footer-actions { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-6); flex-wrap: wrap; }
.footer-brand-row { display: flex; align-items: center; gap: var(--sp-5); flex-wrap: wrap; }
.footer-logo { font-family: var(--display); font-weight: 700; font-size: var(--t-lg); color: var(--ink); }
.footer-logo img { height: 22px; }
.footer-select { display: inline-flex; flex-direction: column; gap: 4px; font-size: var(--t-sm); color: var(--muted); }
.footer-select select { padding: 7px 10px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface); }
.footer-social { display: flex; gap: var(--sp-2); }
.footer-social a { display: inline-flex; width: 38px; height: 38px; align-items: center; justify-content: center; border-radius: var(--r-pill); border: 1px solid var(--line); color: var(--muted); transition: all var(--dur) var(--ease); }
.footer-social a:hover { color: var(--ink); border-color: var(--ink); }
.footer-social svg { width: 17px; height: 17px; fill: currentColor; }
.footer-legal { display: grid; gap: var(--sp-2); font-size: var(--t-sm); color: var(--faint); max-width: 80ch; }

/* ---------- 14. PANELS / FORMS ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(20px, 3vw, 32px); }
.grid { display: grid; gap: var(--sp-6); }
.grid.cols-2 { grid-template-columns: 1fr 1fr; }
.field { display: grid; gap: var(--sp-2); }
.field > label, .field-label-row { font-weight: 600; font-size: var(--t-sm); }
.field-hint { font-size: var(--t-sm); color: var(--muted); }
input[type="text"], input[type="email"], input[type="password"], input[type="number"], select, textarea {
  width: 100%; min-height: 46px; padding: 0 var(--sp-4); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-md); font-size: var(--t-base);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
textarea { padding: var(--sp-3) var(--sp-4); min-height: 104px; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-tint); }
/* Visible keyboard focus for interactive controls that don't define their own.
   Uses :focus-visible so mouse/touch clicks stay clean — only keyboard focus shows a ring. */
a:focus-visible, button:focus-visible, summary:focus-visible, [role="button"]:focus-visible,
.tab-item:focus-visible, .nav-link:focus-visible, .ah-chip:focus-visible, .st-btn:focus-visible,
.ag-card:focus-visible, .footer-links a:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}
input::placeholder, textarea::placeholder { color: var(--faint); }

/* ---------- 15. TOAST / MODALS / LOADER ---------- */
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 200; padding: 13px 20px; border-radius: var(--r-pill); background: var(--ink); color: var(--surface); font-size: var(--t-sm); font-weight: 500; box-shadow: var(--sh-lg); opacity: 0; pointer-events: none; transition: opacity var(--dur) var(--ease); }
.toast.show { opacity: 1; }
.card-modal, .auth-modal { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: var(--sp-4); }
.card-modal[aria-hidden="true"], .auth-modal[aria-hidden="true"] { display: none; }
.card-modal-backdrop, .auth-modal-backdrop { position: absolute; inset: 0; background: rgba(22,24,29,0.4); backdrop-filter: blur(3px); }
.card-modal-panel, .auth-modal-panel { position: relative; z-index: 1; width: min(560px, calc(100vw - 32px)); max-height: 90dvh; overflow-y: auto; background: var(--surface); border-radius: var(--r-xl); padding: clamp(24px, 4vw, 40px); box-shadow: var(--sh-lg); }
.card-modal-close, .auth-modal-close { position: absolute; top: 16px; right: 16px; width: 44px; height: 44px; border-radius: var(--r-pill); display: inline-flex; align-items: center; justify-content: center; background: var(--paper); color: var(--ink); font-size: 20px; }
.card-modal-close:hover, .auth-modal-close:hover { background: var(--line); }
.scan-loading { position: fixed; inset: 0; z-index: 250; display: grid; place-items: center; background: color-mix(in srgb, var(--paper) 92%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); padding: var(--sp-6); }
.scan-loading[aria-hidden="true"] { display: none; }
/* No white card — the brand mark + text sit directly on the blurred backdrop. */
.scan-loading-panel { display: grid; gap: 14px; justify-items: center; text-align: center; padding: 0; background: none; border: 0; box-shadow: none; max-width: 300px; }
.scan-loading-panel strong { font-family: var(--display); font-weight: 800; font-size: var(--t-xl); color: var(--ink); letter-spacing: -0.01em; }
.scan-loading-panel span { font-size: var(--t-sm); color: var(--muted); line-height: 1.5; }
.asterisk-loader { font-family: var(--display); font-weight: 800; font-size: 64px; line-height: 1; color: var(--blue); animation: spin 1.6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Gemby-styled confirm dialog (replaces native window.confirm) */
.gem-confirm { position: fixed; inset: 0; z-index: 400; display: grid; place-items: center; padding: var(--sp-4); opacity: 0; pointer-events: none; transition: opacity var(--dur) var(--ease); }
.gem-confirm.visible { opacity: 1; pointer-events: auto; }
.gem-confirm-backdrop { position: absolute; inset: 0; background: rgba(22,24,29,0.45); backdrop-filter: blur(4px); }
.gem-confirm-panel { position: relative; z-index: 1; width: min(440px, calc(100vw - 32px)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); padding: clamp(24px, 4vw, 36px); box-shadow: var(--sh-lg); text-align: left; transform: translateY(8px) scale(0.98); transition: transform var(--dur) var(--ease); }
.gem-confirm.visible .gem-confirm-panel { transform: translateY(0) scale(1); }
.gem-confirm-title { font-family: var(--display); font-size: var(--t-xl); font-weight: 800; letter-spacing: -0.02em; color: var(--ink); margin-bottom: var(--sp-3); }
.gem-confirm-body { display: grid; gap: var(--sp-2); color: var(--muted); font-size: var(--t-sm); line-height: 1.55; }
.gem-confirm-body p { margin: 0; }
.gem-confirm-actions { display: flex; justify-content: flex-end; gap: var(--sp-2); margin-top: var(--sp-6); flex-wrap: wrap; }
.gem-confirm-actions button { min-width: 116px; }

.view { display: none; }
.view.active { display: block; }

/* ---------- 16. RESPONSIVE ---------- */
@media (max-width: 980px) {
  .gem-stat-grid { grid-template-columns: repeat(2, 1fr); gap: var(--sp-8); }
  .gem-stat { border-left: none; padding-left: 0; }
  .premium-card-grid { grid-template-columns: repeat(2, 1fr); }
  .gem-steps { grid-template-columns: 1fr; }
  .gem-feature-grid { grid-template-columns: repeat(2, 1fr); }
  .grid.cols-2 { grid-template-columns: 1fr; }
  .gem-fan-stack { transform: scale(0.82); }
}
@media (max-width: 600px) {
  .main, .site-footer { width: calc(100% - 32px); }
  .gem-feature-grid { grid-template-columns: 1fr; }
  .premium-card-grid { grid-template-columns: 1fr; }
  .topbar h1 { font-size: var(--t-2xl); }
  /* Tighten the fan so outer cards stay on-screen */
  .gem-fan-stack { transform: scale(0.62); height: 300px; }
  .gem-hero { padding-top: var(--sp-6); }
}

/* ============================================================================
   SEARCH GEMS (alerts) — premium form, controls, result cards
   ========================================================================== */
/* Clean page focus: page gets its own header, no topbar/ads */
body[data-view="alerts"] .topbar,
body[data-view="alerts"] .sponsor-strip,
body[data-view="matches"] .sponsor-strip,
.search-side-ad { display: none; }

.search-gem-page { display: grid; gap: var(--sp-6); }
.sg-header { display: grid; gap: var(--sp-2); max-width: 720px; }
.sg-header .eyebrow { color: var(--blue); }
.sg-header h1 { font-size: var(--t-3xl); font-weight: 800; letter-spacing: -0.035em; }
.sg-sub { font-size: var(--t-base); color: var(--muted); max-width: 64ch; }
.sg-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 0.9fr); align-items: start; gap: var(--sp-5); }
.sg-builder { padding: clamp(18px, 2.2vw, 28px); }
.sg-aside { position: sticky; top: 84px; display: grid; gap: var(--sp-5); }
.sg-active { padding: clamp(16px, 2vw, 24px); }
.sg-empty { display: grid; justify-items: center; text-align: center; gap: var(--sp-3); padding: var(--sp-16) var(--sp-6); }
.sg-empty-icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: var(--r-pill); background: var(--blue-tint); color: var(--blue); }
.sg-empty-icon svg { width: 26px; height: 26px; }
.sg-empty strong { font-size: var(--t-base); font-weight: 600; }
.sg-empty p { font-size: var(--t-sm); color: var(--muted); max-width: 38ch; line-height: 1.6; }
.sg-empty-cta { margin-top: var(--sp-3); }
@media (max-width: 980px) { .sg-layout { grid-template-columns: 1fr; } .sg-aside { position: static; } }

/* Visual-search "coming soon" → an intentional horizontal feature teaser */
.visual-search-panel { display: flex; align-items: center; gap: var(--sp-4); padding: var(--sp-4) var(--sp-6); }
.vs-icon { flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: var(--r-md); background: var(--blue-tint); color: var(--blue); }
.vs-icon svg { width: 24px; height: 24px; }
.vs-copy { flex: 1; display: grid; gap: 4px; }
.vs-head { display: flex; align-items: center; gap: var(--sp-3); }
.vs-head h2 { font-size: var(--t-lg); font-weight: 600; letter-spacing: -0.02em; }
.vs-copy .muted { font-size: var(--t-sm); max-width: 62ch; }
.vs-notify { flex: none; }
.vs-notify[disabled] { opacity: 0.5; cursor: not-allowed; }
@media (max-width: 720px) { .visual-search-panel { flex-wrap: wrap; } .vs-notify { width: 100%; } }

/* Section heads inside panels */
.panel .section-head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); margin-bottom: var(--sp-5); }
.panel .section-head h2 { font-size: var(--t-lg); font-weight: 700; letter-spacing: -0.02em; }
.badge.blue { background: var(--blue-tint); color: var(--blue); }
.badge.good { background: var(--success-tint, #e7f8ee); color: var(--success); }

/* Form scaffold — compact */
.alert-form { display: grid; gap: var(--sp-6); }
.form-grid { display: grid; gap: var(--sp-8); }
.form-section { display: grid; gap: var(--sp-4); }
.form-section-label { font-family: var(--font-text); font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--blue); padding-bottom: var(--sp-2); border-bottom: 1px solid var(--line); }
.field { display: grid; gap: var(--sp-2); }
.field > label { font-weight: 600; font-size: var(--t-sm); }
.field-label-row { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-3); }
.field-label-row label { font-weight: 600; font-size: var(--t-sm); }
.field-label-row span { font-family: var(--font-text); font-size: 0.72rem; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--muted); }
.field-label-row .req { color: var(--blue); }
.field-label-row .opt { color: var(--muted); }
.field-hint, .field .muted { font-size: var(--t-sm); color: var(--muted); }

/* Search pickers */
.team-search-box { position: relative; }
.team-search-box input[type="search"] { width: 100%; min-height: 42px; padding: 0 var(--sp-4); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); font-size: var(--t-base); }
.team-search-box input[type="search"]:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-tint); }
.team-suggestions { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 30; max-height: 260px; overflow-y: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--sh-lg); padding: 6px; }
.team-suggestions[hidden] { display: none; }
.team-suggestions button { display: block; width: 100%; text-align: left; padding: 9px 12px; border-radius: var(--r-sm); font-size: var(--t-sm); }
.team-suggestions button:hover, .team-suggestions button[aria-selected="true"] { background: var(--blue-tint-2); color: var(--blue); }
.team-suggestions button.picker-suggestion-custom { color: var(--blue); font-weight: 700; border-top: 1px solid var(--line); margin-top: 4px; }
/* Required-field error highlight on the search builder */
.alert-form .field.is-invalid { outline: 2px solid var(--danger); outline-offset: 8px; border-radius: 12px; }
.alert-form .field.is-invalid label { color: var(--danger); }
.alert-form .field.is-invalid .req { background: var(--danger); color: #fff; }
/* First-run welcome gate (installed app only) */
body.welcome-open { overflow: hidden; }
#gemby-welcome { position: fixed; inset: 0; z-index: 4000; background: var(--blue); color: #fff; display: flex; opacity: 0; transition: opacity .3s ease; padding: max(28px, env(safe-area-inset-top)) 24px max(24px, env(safe-area-inset-bottom)); }
#gemby-welcome.visible { opacity: 1; }
#gemby-welcome.gone { opacity: 0; }
#gemby-welcome .gw-inner { display: flex; flex-direction: column; justify-content: space-between; width: 100%; max-width: 440px; margin: 0 auto; }
#gemby-welcome .gw-top { margin-top: 9vh; }
#gemby-welcome .gw-gem { width: 88px; height: 88px; margin-bottom: 22px; }
#gemby-welcome .gw-title { font-size: 30px; line-height: 1.08; font-weight: 800; margin: 0 0 12px; letter-spacing: -0.01em; }
#gemby-welcome .gw-sub { font-size: 16px; line-height: 1.5; color: rgba(255,255,255,.82); max-width: 32ch; margin: 0; }
#gemby-welcome .gw-actions { display: flex; flex-direction: column; gap: 12px; margin-top: 36px; }
#gemby-welcome .gw-btn { width: 100%; min-height: 52px; border: none; border-radius: 14px; font-size: 16px; font-weight: 700; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: transform .12s ease, opacity .15s ease; }
#gemby-welcome .gw-btn:active { transform: scale(.98); }
#gemby-welcome .gw-primary { background: #d9ff00; color: #0a1a4a; }
#gemby-welcome .gw-secondary { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,.55); }
#gemby-welcome .gw-ghost { background: transparent; color: rgba(255,255,255,.85); min-height: 44px; text-decoration: underline; font-weight: 600; }
@media (prefers-reduced-motion: reduce) { #gemby-welcome { transition: none; } #gemby-welcome .gw-btn { transition: none; } }
/* Paused search card */
.alert-card.is-paused { opacity: 0.72; }
.alert-card.is-paused h3 { color: var(--muted); }
/* Profile account-management additions */
.profile-action-row { display: flex; flex-wrap: wrap; gap: 8px; }
.profile-action-row .ghost-button { flex: 1 1 auto; }
.danger-zone { border-color: color-mix(in srgb, var(--danger) 30%, var(--line)); }
.danger-zone h2 { color: var(--danger); }
.danger-button { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 45%, transparent); }
.danger-button:hover { background: color-mix(in srgb, var(--danger) 10%, transparent); }
.ebay-disclaimer { margin-top: 14px; font-size: var(--t-mono); line-height: 1.5; color: var(--faint); }
/* Bottom-nav unread badge (Found gems) */
.tab-icon-wrap { position: relative; display: inline-flex; }
.tab-badge { position: absolute; top: -5px; right: -9px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: var(--danger); color: #fff; font-size: 10px; font-weight: 800; line-height: 16px; text-align: center; box-shadow: 0 0 0 2px var(--surface); }
.tab-badge[hidden] { display: none; }
/* Dark mode — token overrides (the palette is token-driven; card photo areas
   stay light on purpose so trading-card images read well). */
html[data-theme="dark"] {
  --ink: #eef1f6;
  --ink-2: #c3c9d4;
  --muted: #98a0ad;
  --faint: #6b7280;
  --line: #2b303a;
  --line-2: #20242c;
  --surface: #171b21;
  --paper: #0f1217;
  --blue-tint: #1a2342;
  --blue-tint-2: #1f2a4d;
  --sh-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --sh-md: 0 6px 24px rgba(0, 0, 0, 0.45);
  --sh-lg: 0 20px 48px rgba(0, 0, 0, 0.55);
}
html[data-theme="dark"] body { background: var(--paper); }
html[data-theme="dark"] body.is-app .tab-bar { background: color-mix(in srgb, #0f1217 90%, transparent); border-top-color: var(--line); }
html[data-theme="dark"] .sidebar { background: color-mix(in srgb, #0f1217 92%, transparent); }
/* Keep brand blue surfaces (hero, welcome gate) readable; they already use white text. */
html[data-theme="dark"] .tab-badge { box-shadow: 0 0 0 2px var(--surface); }
/* Theme toggle control */
.theme-seg { display: inline-flex; gap: 4px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-pill); padding: 4px; }
.theme-seg button { border: none; background: transparent; color: var(--muted); font-weight: 600; font-size: var(--t-sm); padding: 7px 14px; border-radius: var(--r-pill); cursor: pointer; min-height: 36px; }
.theme-seg button.on { background: var(--blue); color: #fff; }
/* Search builder — collapsible refinement rows as soft cards (brand card language) */
.sg-filter-list { display: flex; flex-direction: column; gap: 8px; }
.sg-filter { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); overflow: hidden; transition: border-color .18s var(--ease), box-shadow .18s var(--ease); }
.sg-filter[open] { border-color: color-mix(in srgb, var(--blue) 35%, var(--line)); box-shadow: var(--sh-sm); }
.sg-filter > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 12px 14px; font-weight: 600; color: var(--ink); -webkit-tap-highlight-color: transparent; }
.sg-filter > summary::-webkit-details-marker { display: none; }
.sg-filter > summary:active { background: var(--paper); }
.sgf-name { font-size: var(--t-base); }
.sgf-chev { width: 18px; height: 18px; color: var(--muted); transition: transform .2s ease; flex: none; }
.sg-filter[open] > summary .sgf-chev { transform: rotate(180deg); color: var(--blue); }
.sg-filter[open] > summary { border-bottom: 1px solid var(--line-2); }
.sgf-body { padding: 14px; display: flex; flex-direction: column; gap: 14px; }
.sgf-value { margin-left: auto; font-size: var(--t-sm); font-weight: 700; color: var(--blue); }

/* Search page brand identity: blue hero, numbered step sections, lime CTA */
.sg-hero { position: relative; overflow: hidden; background: var(--blue); border-radius: var(--r-xl); padding: 22px 18px 16px; margin-bottom: var(--sp-4); color: #fff; box-shadow: 0 16px 40px color-mix(in srgb, var(--blue) 30%, transparent); }
.sg-hero-mark { position: absolute; top: -38px; right: -16px; font-family: var(--display); font-weight: 800; font-size: 180px; line-height: 1; color: rgba(255, 255, 255, 0.1); pointer-events: none; user-select: none; }
.sg-hero-head { position: relative; }
.sg-hero-head h1 { margin: 0; font-family: var(--display); font-size: var(--t-3xl); font-weight: 800; letter-spacing: -0.03em; line-height: 1.04; color: #fff; }
.sg-hero-head p { margin: 8px 0 0; font-size: var(--t-sm); line-height: 1.5; color: rgba(255, 255, 255, 0.78); max-width: 46ch; }
/* The scan shortcut flips to lime inside the blue hero — the loudest action on the page */
.sg-hero .vs-entry { margin: 16px 0 0; background: var(--lime); color: #10250b; box-shadow: 0 12px 26px rgba(0, 0, 0, 0.22); }
.sg-hero .vs-entry-ic { background: var(--blue); color: #fff; }
.sg-hero .vs-entry-tx strong { color: #10250b; }
.sg-hero .vs-entry-tx small { color: rgba(16, 37, 11, 0.66); }
.sg-hero .vs-entry-chev { color: var(--blue); }
/* Glassy tab toggle on the hero */
.sg-hero .search-toggle { margin: 12px 0 0; background: rgba(255, 255, 255, 0.14); border-color: transparent; }
.sg-hero .st-btn { color: rgba(255, 255, 255, 0.78); }
.sg-hero .st-btn.on { background: #fff; color: var(--blue); }
/* While the Active tab is showing, the create-flow scan shortcut steps aside */
.search-gem-page:has(.sg-layout.show-active) .sg-hero .vs-entry { display: none; }
/* Numbered step sections as tinted header strips */
.sgs-head { display: flex; align-items: center; gap: 10px; background: var(--blue-tint); border-radius: 12px; padding: 9px 12px; }
.sgs-no { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 9px; background: var(--blue); color: #fff; font-family: var(--display); font-weight: 800; font-size: var(--t-sm); }
.sgs-title { margin: 0; font-family: var(--display); font-size: var(--t-lg); font-weight: 800; letter-spacing: -0.02em; color: var(--ink); }
/* Apple-Store-calm flow: one quiet scroll, every section always visible, and a fixed
   opaque action bar above the tab bar (product-page "Add to Bag" pattern) — content gets
   bottom padding so nothing ever hides behind it. */
#alert-form .form-section { display: grid; }
.sg-progress, .sg-back, .sg-continue { display: none !important; }
.search-gem-page .form-actions { margin-top: var(--sp-4); }
.search-gem-page .form-actions .ghost-button { flex: none; min-height: 48px; border-radius: 12px; padding: 0 18px; }
.search-gem-page .form-actions .primary-button { flex: 1; background: var(--blue); color: #fff; border-radius: 12px; font-weight: 700; font-size: var(--t-lg); padding: 14px 22px; box-shadow: none; }
.search-gem-page .form-actions .primary-button:hover { background: var(--blue-700); }
body.is-app .search-gem-page .form-actions { position: sticky; bottom: calc(76px + env(safe-area-inset-bottom, 0px)); z-index: 60; margin-top: var(--sp-4); padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--sh-md); flex-direction: row; flex-wrap: nowrap; align-items: stretch; gap: 10px; }
body.is-app .search-gem-page .form-actions .primary-button { width: auto; }
body.is-app .search-gem-page { padding-bottom: 40px; }

/* ── Search page fields, professional pass ─────────────────────────────────
   Player / Brand / Series / Teams pickers + the price range control. */
/* Search inputs: leading search glyph, taller, calm paper fill that wakes on focus */
.search-gem-page .team-search-box input[type="search"] {
  min-height: 50px; padding-left: 42px; border-radius: 14px; background: var(--paper);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2380868f' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: 14px center; background-size: 18px;
  transition: background-color .16s var(--ease), border-color .16s var(--ease), box-shadow .16s var(--ease);
}
.search-gem-page .team-search-box input[type="search"]:focus { background-color: var(--surface); }
/* Selected value = solid brand chip with a soft remove target */
.search-gem-page .team-chip, .search-gem-page .team-chip-row button {
  background: var(--blue); color: #fff; font-weight: 600; cursor: pointer;
}
.search-gem-page .team-chip span, body.is-app .search-gem-page .team-chip span { background: rgba(255, 255, 255, 0.22); color: #fff; }
/* Empty pickers stay clean: the placeholder + hint already say what's needed */
.search-gem-page .team-empty { display: none; }

/* ── SGX2: Apple-Store-calm Search page ─────────────────────────────────────
   White canvas, large left-aligned title, hairline inset cards, one quiet blue
   CTA — imagery and content carry the page, not color blocks. */
.sgx2-head { margin: 4px 0 14px; }
.sgx2-head h1 { margin: 0; font-family: var(--display); font-size: var(--t-3xl); font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; color: var(--ink); }
.sgx2-head p { margin: 8px 0 0; font-size: var(--t-sm); line-height: 1.5; color: var(--muted); max-width: 52ch; }
.search-gem-page > .search-toggle { margin-bottom: 0; }
/* Scan a card: a clean tappable row — leading icon tile, title + sub, chevron */
.search-gem-page > .vs-entry { width: 100%; display: flex; align-items: center; gap: 12px; margin: 14px 0 0; padding: 14px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); color: var(--ink); cursor: pointer; box-shadow: none; transition: background .15s var(--ease); }
.search-gem-page > .vs-entry:active { background: var(--paper); }
.search-gem-page > .vs-entry .vs-entry-ic { width: 40px; height: 40px; border-radius: 10px; background: var(--blue); color: #fff; }
.search-gem-page > .vs-entry .vs-entry-tx strong { font-size: var(--t-base); font-family: var(--font-text); font-weight: 600; color: var(--ink); letter-spacing: 0; }
.search-gem-page > .vs-entry .vs-entry-tx small { color: var(--muted); }
.search-gem-page > .vs-entry .vs-entry-chev { display: block; color: var(--faint); }
.sgx:has(.sg-layout.show-active) > .vs-entry { display: none; }
/* Sections: inset grouped cards with plain bold headers — airy, no color bands */
.sgx-sheet { position: static; margin-top: 16px; background: transparent; border: none; border-radius: 0; padding: 0; box-shadow: none; }
.sgx .sg-layout { gap: var(--sp-4); }
#alert-form .form-grid { display: grid; gap: var(--sp-4); }
.sgx .form-section, body.is-app .sgx .form-section { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px 14px; box-shadow: none; }
body:not(.is-app) .sgx .sg-builder.panel { background: transparent; border: none; box-shadow: none; padding: 0; }
.sgx .sgs-head { display: flex; background: transparent; border: none; border-radius: 0; padding: 0 0 2px; }
.sgx .sgs-no { display: none; }
.sgx .sgs-title { font-family: var(--display); font-size: 1.2rem; font-weight: 800; letter-spacing: -0.02em; color: var(--ink); }
/* Selected choices: white with a confident blue border (Apple configurator language) */
.search-gem-page .check span { border-radius: var(--r-md); border-width: 1.5px; }
.search-gem-page .check input:checked + span,
body.is-app .search-gem-page .check input:checked + span { background: var(--surface); color: var(--blue); border: 2px solid var(--blue); font-weight: 700; box-shadow: none; }
/* Non-segmented pills (grade companies/values) speak the same outline language — the v205
   global solid-blue checked state otherwise leaks through and clashes on the same page. */
.search-gem-page .radio-pill:not(.segmented-control *) input:checked + span { background: var(--surface); color: var(--blue); border: 2px solid var(--blue); font-weight: 700; }
/* Selected picker values: quiet tinted chips */
.search-gem-page .team-chip, .search-gem-page .team-chip-row button { background: var(--blue-tint); color: var(--blue); font-weight: 600; cursor: pointer; }
.search-gem-page .team-chip span, body.is-app .search-gem-page .team-chip span { background: color-mix(in srgb, var(--blue) 14%, transparent); color: var(--blue); }
/* "No price limit" toggle + price value align with the calm language */
.search-gem-page #no-price-limit.active { background: var(--blue-tint); border-color: var(--blue); color: var(--blue); }
.search-gem-page #price-label { color: var(--ink); }

/* ── Found Gems: the same Apple-Store-calm pass as the Search page ──────────
   Big ink title, hairline everything, configurator-style selected states. */
#matches .ap-title { font-size: var(--t-3xl); letter-spacing: -0.03em; line-height: 1.05; }
#matches .found-search { min-height: 50px; border-radius: 14px; background: var(--paper); box-shadow: none; border: 1px solid var(--line); transition: background .16s var(--ease), border-color .16s var(--ease), box-shadow .16s var(--ease); }
#matches .found-search:focus-within { background: var(--surface); border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-tint); }
/* Filter chips: quiet hairline pills; selected = white with a 2px blue border */
#matches .ah-chip { background: var(--surface); border: 1.5px solid var(--line); color: var(--ink-2); padding: 8px 14px; }
#matches .ah-chip.on { background: var(--surface); border: 2px solid var(--blue); color: var(--blue); font-weight: 700; }
/* Sort / by-search selects as pill controls */
#matches .found-sort select { appearance: none; -webkit-appearance: none; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--surface); min-height: 36px; padding: 0 26px 0 12px; font: inherit; font-size: var(--t-sm); font-weight: 600; color: var(--ink); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2380868f' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 9px center; background-size: 13px; }
/* Gem cards: hairline inset cards — imagery carries the color, not shadows */
#matches .ag-card, body.is-app #matches .ag-card { border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: none; }
#matches .ag-card:active { transform: scale(0.985); }
/* Pager: pill numbers; current page in the same blue-border language */
#matches .fav-page { border-radius: var(--r-pill); }
#matches .fav-page.on { background: var(--surface); border: 2px solid var(--blue); color: var(--blue); }

/* ── Account page (Apple pass): identity leads, destructive actions sink ── */
.acct-eyebrow { display: block; font-size: 11px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--blue); margin-bottom: 3px; }
.acct-hero-text h1 { overflow-wrap: anywhere; }
.acct-signout .ghost-button { width: 100%; min-height: 50px; border-radius: 12px; font-weight: 700; }

/* ── Home quick actions: the two core actions as Apple list-row tiles ── */
.ah-quick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: var(--sp-4); }
.ah-qa { display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); text-align: left; cursor: pointer; transition: background .15s var(--ease), transform .12s var(--ease); }
.ah-qa:active { transform: scale(0.985); background: var(--paper); }
.ah-qa-ic { flex: none; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; background: var(--blue); color: #fff; }
.ah-qa-ic svg { width: 19px; height: 19px; }
.ah-qa-tx { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.ah-qa-tx strong { font-size: 13.5px; font-weight: 700; color: var(--ink); line-height: 1.25; }
.ah-qa-tx small { font-size: 11.5px; color: var(--muted); line-height: 1.3; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; }
.ah-empty .primary-button { margin-top: var(--sp-3); }
/* Field labels carry more authority */
.search-gem-page .field-label-row label { font-size: 0.95rem; font-weight: 700; letter-spacing: -0.01em; }
.search-gem-page .field-label-row .req { background: var(--blue-tint); color: var(--blue); border-radius: var(--r-pill); padding: 3px 10px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; font-size: 0.66rem; }
.search-gem-page .field-label-row .opt { background: var(--paper); color: var(--muted); border-radius: var(--r-pill); padding: 3px 10px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; font-size: 0.66rem; }
.search-gem-page .field-hint { line-height: 1.5; max-width: 60ch; }
/* Brand tiles: friendlier pills (no hover tint — taps on touch screens leave hover stuck) */
.search-gem-page .check span { min-height: 46px; border-radius: var(--r-pill); font-weight: 600; }
.search-gem-page .check:hover span { border-color: var(--line); background: var(--surface); color: var(--ink-2); }
.search-gem-page .check input:checked + span { border-color: var(--blue); background: var(--blue); color: #fff; }
/* Price: the live range value is the hero of its section */
.search-gem-page #price-label { display: block; font-family: var(--display); font-size: var(--t-lg); font-weight: 800; letter-spacing: -0.02em; color: var(--blue); white-space: nowrap; }
.search-gem-page .range-field .field-head { align-items: center; }
.search-gem-page .range-field .field-head > label { display: grid; gap: 2px; }
/* "No price limit" becomes a real toggle chip */
.search-gem-page #no-price-limit { border: 1px solid var(--line); border-radius: var(--r-pill); padding: 0 14px; min-height: 38px; background: var(--surface); color: var(--ink-2); font-weight: 600; transition: background .16s var(--ease), color .16s var(--ease), border-color .16s var(--ease); }
.search-gem-page #no-price-limit.active { background: var(--blue); border-color: var(--blue); color: #fff; }
.search-gem-page .inline-select { border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--surface); min-height: 38px; padding: 0 12px; font-weight: 600; color: var(--ink); }
.search-gem-page .price-input { border-radius: 14px; background: var(--paper); }
.search-gem-page .price-input:focus-within { background: var(--surface); }
/* Visual Search (scan a card → AI) — the hero action of the Search page, so it wears the
   full brand treatment: deep Gemby blue with a lime icon chip, like the marketing hero. */
.vs-entry { width: 100%; display: flex; align-items: center; gap: 12px; padding: 16px 14px; margin-bottom: 16px; border: none; border-radius: var(--r-xl); background: var(--blue); color: #fff; cursor: pointer; text-align: left; box-shadow: 0 10px 26px color-mix(in srgb, var(--blue) 28%, transparent); transition: transform .14s var(--ease), box-shadow .18s var(--ease); }
.vs-entry:hover { box-shadow: 0 14px 32px color-mix(in srgb, var(--blue) 36%, transparent); }
.vs-entry:active { transform: scale(.985); }
.vs-entry-ic { flex: none; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; background: var(--lime); color: var(--blue-700); }
.vs-entry-ic svg { width: 22px; height: 22px; }
.vs-entry-tx { flex: 1; display: flex; flex-direction: column; gap: 1px; }
.vs-entry-tx strong { font-size: var(--t-base); font-family: var(--display); font-weight: 700; letter-spacing: -0.01em; }
.vs-entry-tx small { color: rgba(255, 255, 255, 0.72); font-size: var(--t-sm); }
.vs-entry-chev { width: 18px; height: 18px; color: var(--lime); flex: none; }
.vs-page .ap-head { margin-bottom: 10px; }
.vs-drop { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 34px 20px; border: 2px dashed color-mix(in srgb, var(--blue) 35%, var(--line)); border-radius: var(--r-lg); background: var(--surface); cursor: pointer; }
.vs-drop.is-loading { opacity: 0.6; pointer-events: none; }
.vs-drop-icon { width: 56px; height: 56px; display: grid; place-items: center; border-radius: 16px; background: var(--blue-tint); color: var(--blue); margin-bottom: 4px; }
.vs-drop-icon svg { width: 30px; height: 30px; }
.vs-drop strong { font-size: var(--t-lg); }
.vs-scan { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 24px; margin-top: 14px; text-align: center; }
.vs-errbox { margin-top: 14px; padding: 16px; color: var(--danger); line-height: 1.5; }
.vs-result { margin-top: 14px; }
.vs-facts { display: grid; gap: 0; margin: 12px 0 16px; }
.vs-facts > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line-2); }
.vs-facts > div:last-child { border-bottom: none; }
.vs-facts span { color: var(--muted); font-size: var(--t-sm); }
.vs-facts strong { font-weight: 700; }
.vs-result .primary-button { width: 100%; }
.vs-result-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.vs-result-actions .ghost-button, .vs-result-actions .primary-button { width: 100%; }
.vs-found-head { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.vs-found-thumb { width: 62px; height: 82px; object-fit: cover; border-radius: 8px; background: #f2f2f2; flex: none; box-shadow: var(--sh-sm); }
.vs-found-meta { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; min-width: 0; }
.vs-found-kicker { font-size: var(--t-mono); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; color: var(--muted); }
.vs-found-title { font-size: var(--t-lg); font-weight: 800; line-height: 1.15; }
.vs-rescan { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--surface); color: var(--ink-2); font-weight: 600; font-size: var(--t-sm); cursor: pointer; margin-bottom: 14px; }
.vs-rescan svg { width: 18px; height: 18px; }
.vs-settings-label { margin: 18px 0 8px; font-size: var(--t-mono); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; color: var(--muted); }
.vs-settings { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.vs-set-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line-2); margin: 0; }
.vs-settings .vs-set-row:last-child { border-bottom: none; }
.vs-set-label { font-weight: 600; font-size: var(--t-sm); }
.vs-check { display: inline-flex; align-items: center; gap: 6px; font-size: var(--t-sm); cursor: pointer; }
.vs-set-row select { min-height: 36px; border: 1px solid var(--line); border-radius: 8px; padding: 0 10px; background: var(--surface); color: var(--ink); font-weight: 600; }
.vs-price-max { display: flex; align-items: center; gap: 8px; padding: 0 14px 12px; }
.vs-price-max[hidden] { display: none; }
.vs-price-max em { color: var(--muted); font-style: normal; font-size: var(--t-sm); }
.vs-price-max input { flex: 1; min-height: 40px; border: 1px solid var(--line); border-radius: 8px; padding: 0 12px; background: var(--surface); color: var(--ink); }
.vs-priority { margin-bottom: 16px; }
#create-image-alert { width: 100%; }
/* Holographic gyroscope tilt — refractor sheen that shifts as the phone tilts */
.grail-holo { position: absolute; inset: 0; z-index: 2; pointer-events: none; border-radius: 9px; opacity: 0; mix-blend-mode: color-dodge; transition: opacity 0.3s var(--ease); background: linear-gradient(115deg, transparent 25%, rgba(255,40,160,0.45) 38%, rgba(60,230,255,0.5) 50%, rgba(150,90,255,0.45) 62%, transparent 75%); background-size: 300% 300%; background-position: var(--mx, 50%) var(--my, 50%); }
.grail-cinema-card-wrap:hover .grail-holo, .grail-cinema-card-wrap.gyro-live .grail-holo { opacity: 0.6; }
.grail-hero .grail-holo { border-radius: inherit; }
/* Fullscreen holographic card */
.grail-fs { position: fixed; inset: 0; z-index: 4000; background: rgba(8,12,30,0.92); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.25s ease; }
.grail-fs.visible { opacity: 1; }
.grail-fs-stage { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.grail-fs .grail-cinema-card-wrap { display: inline-block; }
.grail-fs .grail-cinema-card { width: min(78vw, 360px); height: auto; border-radius: 12px; box-shadow: 0 30px 70px rgba(0,0,0,0.6); display: block; }
.grail-fs .grail-holo, .grail-fs .grail-cinema-glare { border-radius: 12px; }
.grail-fs-close { position: fixed; top: max(16px, env(safe-area-inset-top)); right: 16px; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 999px; background: rgba(255,255,255,0.14); color: #fff; border: none; cursor: pointer; }
.grail-fs-close svg { width: 22px; height: 22px; }
.grail-fs .grail-tilt-hint { color: rgba(255,255,255,0.75); }
.grail-hero:hover .grail-holo, .grail-hero.gyro-live .grail-holo { opacity: 0.6; }
.grail-cinema-card-wrap.gyro-live .grail-cinema-glare { opacity: 1; }
.premium-card.gyro-live .premium-card-glare { opacity: 1; }
.grail-tilt-hint { margin: 14px 0 0; text-align: center; font-size: var(--t-sm); color: rgba(255,255,255,0.7); }
@media (prefers-reduced-motion: reduce) { .grail-holo { display: none; } }
.gem-page-actions .gp-share-btn { color: var(--blue); border-color: color-mix(in srgb, var(--blue) 40%, var(--line)); }
.gem-page-actions .gp-share-btn:hover { background: var(--blue-tint); }
.year-select { width: 100%; min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); color: var(--ink); font-size: var(--t-base); font-weight: 600; -webkit-appearance: none; appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2380868f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='m6 9 6 6 6-6'/></svg>"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }
@media (prefers-reduced-motion: reduce) { .sgf-chev { transition: none; } }
/* Priority: three options side-by-side, compact + centered so they fit on mobile */
.priority-grid.priority-grid-3 { grid-template-columns: repeat(3, 1fr); gap: 8px; }
.priority-grid-3 .priority-card > span { padding: 12px 8px; text-align: center; gap: 4px; height: 100%; align-content: start; }
.priority-grid-3 .priority-card strong { font-size: var(--t-sm); }
.priority-grid-3 .priority-card small { font-size: 10.5px; line-height: 1.3; }
/* "No price limit" reads as a real toggle button, not a text link */
#no-price-limit { min-height: 32px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--surface); color: var(--ink-2); font-size: var(--t-sm); font-weight: 600; }
#no-price-limit:hover { border-color: var(--ink-2); }
#no-price-limit.active, #no-price-limit[aria-pressed="true"] { background: var(--blue-tint); border-color: var(--blue); color: var(--blue); }
/* Tidy, list-like rhythm inside each builder section (consistent dividers + spacing) */
body.is-app .search-gem-page .form-section > .field + .field { margin-top: 2px; padding-top: 16px; border-top: 1px solid var(--line-2); }
body.is-app .search-gem-page .field-hint { font-size: 12px; line-height: 1.45; color: var(--muted); margin: 0; }
.team-chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.team-chip-row:empty { display: none; }
.team-chip-row .chip, .team-chip-row button { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: var(--r-pill); background: var(--blue-tint); color: var(--blue); font-size: var(--t-sm); font-weight: 500; border: none; }

/* Choice pills — .check / .radio-pill / .trait-toggle (hidden input + span) */
.check-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; }
.check-grid.compact { grid-template-columns: repeat(auto-fit, minmax(116px, 1fr)); }
.check, .radio-pill, .trait-toggle { position: relative; display: block; cursor: pointer; }
.check input, .radio-pill input, .trait-toggle input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.check span, .radio-pill span, .trait-toggle span {
  display: flex; align-items: center; justify-content: center; gap: 8px; text-align: center;
  min-height: 40px; padding: 0 var(--sp-3); border-radius: var(--r-md);
  border: 1px solid var(--line); background: var(--surface);
  font-size: var(--t-sm); font-weight: 500; color: var(--ink-2);
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.check:hover span, .radio-pill:hover span, .trait-toggle:hover span { border-color: var(--ink-2); }
.check input:checked + span, .radio-pill input:checked + span, .trait-toggle input:checked + span {
  border-color: var(--blue); background: var(--blue); color: #fff; font-weight: 600;
}
.check input:focus-visible + span, .radio-pill input:focus-visible + span, .trait-toggle input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 2px; }
.check input:disabled + span, .radio-pill input:disabled + span { opacity: 0.45; cursor: not-allowed; }

.trait-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; }

/* Segmented control (connected pills) */
.segmented-control { display: inline-flex; padding: 4px; gap: 4px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-pill); }
.segmented-control .radio-pill span { min-height: 38px; border: none; background: transparent; border-radius: var(--r-pill); padding: 0 var(--sp-5); }
.segmented-control .radio-pill input:checked + span { background: var(--surface); color: var(--ink); box-shadow: var(--sh-sm); }

/* Toggle switch */
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); }
.toggle-row label[for] { font-weight: 600; font-size: var(--t-sm); }
.switch { position: relative; flex: none; width: 46px; height: 28px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; }
.switch span { position: absolute; inset: 0; border-radius: var(--r-pill); background: var(--line); transition: background var(--dur) var(--ease); }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform var(--dur) var(--ease); }
.switch input:checked + span { background: var(--blue); }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 2px; }

/* Range sliders */
.range-field { gap: var(--sp-4); }
.field-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--sp-3); }
.field-head label { font-weight: 600; font-size: var(--t-sm); }
.field-head-actions { display: flex; align-items: center; gap: var(--sp-3); }
#price-label, #limit-label { font-variant-numeric: tabular-nums; color: var(--blue); }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 4px; border-radius: 2px; background: var(--line); margin: 14px 0; }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 2px solid var(--blue); box-shadow: 0 1px 4px rgba(0,0,0,.2); cursor: pointer; }
input[type="range"]::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 2px solid var(--blue); cursor: pointer; }
/* Price range → precise min/max number inputs (works across the full range) */
.price-inputs { display: flex; align-items: flex-end; gap: var(--sp-3); }
/* min-width:0 lets both fields shrink so the full min–max range fits on one row */
.price-field { display: grid; gap: 7px; flex: 1; min-width: 0; }
.price-field > span { font-family: var(--font-text); font-size: var(--t-mono); text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.price-input { display: flex; align-items: center; gap: 7px; min-height: 44px; padding: 0 var(--sp-4); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.price-input:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-tint); }
.price-input em { font-style: normal; font-size: var(--t-sm); color: var(--muted); }
.price-input input[type="number"] { border: none; padding: 0; min-height: auto; min-width: 0; background: none; width: 100%; align-self: stretch; font-size: var(--t-base); font-variant-numeric: tabular-nums; color: var(--ink); -webkit-text-fill-color: var(--ink); }
.price-input input[type="number"]:focus { outline: none; box-shadow: none; }
.price-input input[type="number"]::-webkit-inner-spin-button, .price-input input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.price-sep { padding-bottom: 14px; color: var(--faint); }
.price-inputs.no-limit .price-field:last-child { opacity: 0.5; }
.dual-range input[type="range"] { position: absolute; left: 0; width: 100%; margin: 0; background: none; pointer-events: none; }
.dual-range input[type="range"]::-webkit-slider-thumb { pointer-events: auto; }
.dual-range input[type="range"]::-moz-range-thumb { pointer-events: auto; }
.limited-controls { display: grid; gap: var(--sp-3); margin-top: var(--sp-4); }
.limited-controls.disabled { display: none; }
.inline-select { width: auto; min-width: 0; min-height: 40px; padding: 0 32px 0 12px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); font-size: var(--t-sm); }

/* Gemby score filter */
.gemby-score-filter { display: inline-flex; gap: 6px; }
.score-asterisk-button { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface); font-family: var(--display); font-weight: 800; font-size: var(--t-xl); color: var(--line); transition: all var(--dur) var(--ease); }
.score-asterisk-button:hover { border-color: var(--blue); }
.score-asterisk-button.filled { color: var(--blue); border-color: var(--blue); background: var(--blue-tint); }

/* Grade selector */
.grade-selector { display: grid; gap: var(--sp-4); padding: var(--sp-5); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--paper); margin-top: var(--sp-3); }
.grade-selector.disabled { display: none; }
.grade-selector-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--sp-4); flex-wrap: wrap; }
.grade-selector-head strong { display: block; font-size: var(--t-sm); }
.grade-selector-head span { font-size: var(--t-sm); color: var(--muted); }
.grade-actions { display: flex; gap: var(--sp-2); }
.grade-actions button { padding: 6px 12px; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--surface); font-size: var(--t-mono); font-family: var(--font-text); text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.grade-actions button:hover { border-color: var(--blue); color: var(--blue); }
.grade-columns { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-5); }
.grade-columns > div > label { display: block; font-weight: 600; font-size: var(--t-sm); margin-bottom: 6px; }
.grade-chip-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.grade-chip-grid .radio-pill span { min-height: 38px; padding: 0 var(--sp-3); }
.grade-values-panel.is-hidden { display: none; }

/* Priority cards */
.priority-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.priority-card { position: relative; display: block; cursor: pointer; }
.priority-card input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.priority-card > span { display: grid; gap: 3px; padding: var(--sp-4); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease); }
.priority-card strong { font-size: var(--t-sm); font-weight: 600; }
.priority-card small { font-size: var(--t-sm); color: var(--muted); }
.priority-card:hover > span { border-color: var(--ink-2); }
.priority-card input:checked + span { border-color: var(--blue); background: var(--blue-tint); box-shadow: 0 0 0 1px var(--blue) inset; }
.priority-card input:checked + span strong { color: var(--blue); }
.priority-card input:checked + span small { color: var(--blue); }
.priority-card input:disabled + span { opacity: 0.45; cursor: not-allowed; }

/* Collapse */
.collapse { border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.collapse summary { display: flex; align-items: center; justify-content: space-between; padding: var(--sp-4); cursor: pointer; font-weight: 600; font-size: var(--t-sm); list-style: none; }
.collapse summary::-webkit-details-marker { display: none; }
.collapse summary strong { transition: transform var(--dur) var(--ease); }
.collapse[open] summary strong { transform: rotate(180deg); }
.collapse .check-grid { padding: 0 var(--sp-4) var(--sp-4); }

.form-actions { display: flex; gap: var(--sp-3); flex-wrap: wrap; padding-top: var(--sp-2); }

/* Active searches list + cards */
.alert-list { display: grid; gap: var(--sp-4); }
.alert-card { display: grid; gap: var(--sp-3); padding: var(--sp-5); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.alert-card:hover { border-color: color-mix(in srgb, var(--blue) 20%, var(--line)); box-shadow: var(--sh-sm); }
.alert-card .section-head { margin: 0; }
.alert-card h3 { font-size: var(--t-base); font-weight: 600; letter-spacing: -0.01em; }
.alert-actions { display: flex; align-items: center; gap: var(--sp-3); }
.badge-row { display: flex; flex-wrap: wrap; gap: 6px; }
.action-menu { position: relative; }
.action-menu summary { display: inline-flex; flex-direction: column; gap: 3px; width: 32px; height: 32px; align-items: center; justify-content: center; border-radius: var(--r-sm); cursor: pointer; list-style: none; }
.action-menu summary::-webkit-details-marker { display: none; }
.action-menu summary span { width: 4px; height: 4px; border-radius: 50%; background: var(--muted); }
.action-menu summary:hover { background: var(--paper); }
.action-menu-popover { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; display: flex; flex-direction: column; min-width: 140px; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--sh-lg); }
.action-menu-popover button { text-align: left; padding: 9px 12px; border-radius: var(--r-sm); font-size: var(--t-sm); }
.action-menu-popover button:hover { background: var(--paper); }
.action-menu-popover button.danger { color: var(--danger); }
.action-menu-popover button.danger:hover { background: color-mix(in srgb, var(--danger) 10%, transparent); }

/* Empty state */
.empty { display: grid; gap: 6px; justify-items: center; text-align: center; padding: var(--sp-12) var(--sp-6); border: 1px dashed var(--line); border-radius: var(--r-lg); color: var(--muted); font-size: var(--t-sm); }

@media (max-width: 900px) {
  .search-gem-page .grid.cols-2 { grid-template-columns: 1fr; }
  .grade-columns { grid-template-columns: 1fr; }
  .visual-search-panel { flex-direction: column; align-items: flex-start; }
}

/* ============================================================================
   SEARCH GEMS — control semantics: multi-select traits vs single-select choices
   ========================================================================== */
/* Card traits = multi-select → checkbox chips with an explicit check box */
.trait-grid { grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); }
.trait-toggle span { justify-content: flex-start; gap: 10px; padding-left: var(--sp-4); text-align: left; }
.trait-toggle span::before {
  content: ""; flex: none; width: 19px; height: 19px; border-radius: 6px;
  border: 1.6px solid var(--line); background: var(--surface);
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.trait-toggle input:checked + span { background: var(--blue-tint); color: var(--blue); border-color: var(--blue); }
.trait-toggle input:checked + span::before {
  border-color: var(--blue);
  background: var(--blue) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l4.5 4.5L19 7'/%3E%3C/svg%3E") center / 12px no-repeat;
}

/* Single-select brand choices read as a deliberate "pick one" grid */
.check-grid.compact { grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); gap: 10px; }
.check span { font-weight: 500; }

/* Segmented controls (print run, listing type) fill their row evenly */
.segmented-control { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; width: 100%; }
.segmented-control .radio-pill span { min-height: 40px; }

/* ============================================================================
   TRENDING GRAIL — cinematic, Gemby-branded detail modal with dynamic open
   ========================================================================== */
.card-modal.cinema .card-modal-backdrop { background: rgba(22,24,29,0.42); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: cinema-fade 0.4s var(--ease); }
.card-modal.cinema { perspective: 2200px; }
.card-modal.cinema .card-modal-panel {
  width: min(1080px, calc(100vw - 32px)); max-width: 1080px; max-height: 92dvh;
  padding: 0; background: #fff; border-radius: var(--r-xl); overflow: hidden; color: var(--ink);
  box-shadow: 0 50px 130px rgba(22,24,29,0.32);
  transform-origin: 50% 50%; animation: cinema-flip 0.58s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.card-modal.cinema .card-modal-close { top: 18px; right: 18px; z-index: 6; background: var(--paper); color: var(--ink); border: 1px solid var(--line); }
.card-modal.cinema .card-modal-close:hover { background: var(--line); }
@keyframes cinema-fade { from { opacity: 0; } }
@keyframes cinema-flip { from { opacity: 0; transform: scale(0.92); } to { opacity: 1; transform: scale(1); } }

/* Light "Gemby display case" — brand identity, the clicked card turns + grows in */
.grail-cinema { position: relative; min-height: 480px; display: flex; overflow: hidden; background: #fff; }
.grail-cinema-bg { display: none; }
.grail-cinema-inner { position: relative; z-index: 2; display: grid; grid-template-columns: 1.12fr 1fr; gap: 0; align-items: stretch; width: 100%; }
.grail-cinema-stage {
  position: relative; display: grid; place-items: center; padding: clamp(28px, 3.6vw, 56px); overflow: hidden;
  background: linear-gradient(180deg, #f4f3f0 0%, #e8e7e2 100%); border-right: 1px solid var(--line);
}
.grail-cinema-stage::before {
  content: "*"; position: absolute; z-index: 0; top: 50%; left: 50%; transform: translate(-50%, -50%);
  font-family: var(--display); font-weight: 800; font-size: clamp(340px, 44vw, 580px); line-height: 1; color: #16181d; opacity: 0.045; pointer-events: none;
}
.grail-cinema-stage::after {
  content: ""; position: absolute; z-index: 0; left: 50%; bottom: 11%; width: 58%; height: 22px; transform: translateX(-50%);
  background: radial-gradient(50% 50% at 50% 50%, rgba(22,24,29,0.2) 0%, transparent 72%);
}
.grail-cinema-card-wrap { position: relative; display: inline-block; transform: perspective(1100px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform 0.16s var(--ease); will-change: transform; }
.grail-cinema-card {
  display: block; position: relative; z-index: 1; max-height: min(66vh, 520px); width: auto; border-radius: 9px; border: 5px solid #fff;
  box-shadow: 0 24px 54px rgba(22,24,29,0.26); transform-origin: 50% 50%;
  animation: cinema-card 0.72s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.grail-cinema-glare { position: absolute; inset: 0; z-index: 2; pointer-events: none; border-radius: 9px; opacity: 0; mix-blend-mode: screen; transition: opacity 0.3s var(--ease); background: radial-gradient(200px circle at var(--mx, 50%) var(--my, 50%), rgba(255,255,255,0.5), transparent 60%); }
.grail-cinema-card-wrap:hover .grail-cinema-glare { opacity: 1; }
@keyframes cinema-card { from { opacity: 0; transform: perspective(1400px) rotateY(-88deg) scale(0.62); } to { opacity: 1; transform: perspective(1400px) rotateY(0deg) scale(1); } }
.grail-cinema-copy { display: grid; gap: var(--sp-4); align-content: center; padding: clamp(32px, 4vw, 56px); }
.grail-cinema-copy > * { opacity: 0; transform: translateY(16px); animation: cinema-rise 0.55s var(--ease) forwards; }
.grail-cinema-copy > *:nth-child(1) { animation-delay: 0.24s; }
.grail-cinema-copy > *:nth-child(2) { animation-delay: 0.3s; }
.grail-cinema-copy > *:nth-child(3) { animation-delay: 0.36s; }
.grail-cinema-copy > *:nth-child(4) { animation-delay: 0.42s; }
.grail-cinema-copy > *:nth-child(5) { animation-delay: 0.48s; }
@keyframes cinema-rise { to { opacity: 1; transform: none; } }
.grail-cinema-tag { justify-self: start; padding: 6px 13px; border-radius: var(--r-pill); background: var(--blue); color: #fff; font-family: var(--font-text); font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; }
.grail-cinema-title { font-family: var(--display); font-weight: 800; font-size: clamp(2.2rem, 4.6vw, 3.6rem); line-height: 0.98; letter-spacing: -0.035em; color: var(--ink); }
.grail-cinema-sub { font-size: var(--t-lg); color: var(--muted); max-width: 44ch; }
.grail-cinema-facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-4) var(--sp-6); padding: var(--sp-2) 0; }
.grail-cinema-facts > div { display: grid; gap: 3px; }
.grail-cinema-facts span { font-family: var(--font-text); font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--faint); font-weight: 600; }
.grail-cinema-facts strong { font-size: var(--t-base); font-weight: 600; color: var(--ink); }
.grail-cinema-note { font-size: var(--t-sm); line-height: 1.6; color: var(--ink-2); border-left: 2px solid var(--blue); padding-left: var(--sp-4); max-width: 54ch; }
.grail-cinema-actions { display: flex; gap: var(--sp-3); flex-wrap: wrap; align-items: center; margin-top: var(--sp-2); }
.grail-cinema-actions .primary-button { background: var(--blue); }
.grail-cinema-actions .primary-button:hover { background: var(--blue-700); }
.grail-cinema-ghost { display: inline-flex; align-items: center; min-height: 48px; padding: 0 var(--sp-5); border-radius: var(--r-pill); border: 1px solid var(--line); color: var(--ink); font-weight: 600; font-size: var(--t-base); transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease); }
.grail-cinema-ghost:hover { border-color: var(--blue); background: var(--blue-tint); }
@media (max-width: 760px) {
  .card-modal.cinema .card-modal-panel { max-height: 90dvh; overflow-y: auto; -webkit-overflow-scrolling: touch; }
  .grail-cinema { min-height: 0; display: block; }
  .grail-cinema-inner { grid-template-columns: 1fr; text-align: center; }
  .grail-cinema-stage { padding: clamp(28px, 9vw, 48px) var(--sp-5) var(--sp-4); }
  .grail-cinema-tag { justify-self: center; }
  .grail-cinema-facts { justify-items: center; max-width: 320px; margin: 0 auto; }
  .grail-cinema-note { border-left: none; padding-left: 0; }
  .grail-cinema-actions { justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .card-modal.cinema .card-modal-panel, .grail-cinema-card, .grail-cinema-copy > *, .card-modal.gem .card-modal-panel, .card-modal.gem .feedback-badge-card { animation: none !important; opacity: 1 !important; transform: none !important; }
}

/* ============================================================================
   FOUND GEMS (matches) — premium "valuable discovery" listings
   ========================================================================== */
body[data-view="matches"] .topbar { display: none; }
.found-gem-page { display: grid; gap: var(--sp-6); }
.fg-header { margin-bottom: 0; }
.fg-panel { padding: clamp(18px, 2.2vw, 28px); }
.fg-panel .section-actions { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; }
.sort-label { font-size: var(--t-sm); color: var(--muted); }

/* Founding-feedback incentive → calm highlight banner with a blue accent edge */
.feedback-incentive {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--sp-6); align-items: center;
  padding: var(--sp-5); margin-bottom: var(--sp-5); border-radius: var(--r-lg); overflow: hidden;
  background: var(--blue-tint);
  border: 1px solid color-mix(in srgb, var(--blue) 18%, var(--line));
}
.fi-dismiss { position: absolute; top: 6px; right: 6px; width: 38px; height: 38px; display: grid; place-items: center; border-radius: var(--r-pill); background: rgba(255,255,255,0.7); color: var(--muted); font-size: 18px; line-height: 1; transition: background var(--dur) var(--ease), color var(--dur) var(--ease); }
.fi-dismiss:hover { background: #fff; color: var(--ink); }
.fi-main { display: grid; gap: 3px; min-width: 0; padding-right: var(--sp-5); }
.fi-kicker { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--blue); }
.fi-main strong { font-family: var(--display); font-weight: 800; font-size: var(--t-lg); letter-spacing: -0.01em; }
.fi-main p { font-size: var(--t-sm); color: var(--muted); margin-top: 2px; }
.fi-rewards { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.fi-rewards span { padding: 4px 10px; border-radius: var(--r-pill); background: var(--surface); border: 1px solid color-mix(in srgb, var(--blue) 16%, var(--line)); color: var(--blue); font-size: 0.72rem; font-weight: 600; }
.fi-progress { display: grid; gap: var(--sp-3); flex: none; min-width: 156px; }
.fi-track { display: grid; gap: 6px; }
.fi-track-top { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-4); }
.fi-track-top span { font-size: var(--t-sm); color: var(--ink-2); font-weight: 500; }
.fi-track-top strong { font-size: var(--t-sm); font-weight: 700; color: var(--blue); font-variant-numeric: tabular-nums; }
.fi-dots { display: flex; gap: 5px; }
.fi-dot { flex: 1; height: 6px; border-radius: 3px; background: color-mix(in srgb, var(--blue) 14%, var(--line)); }
.fi-dot.on { background: var(--blue); }

/* Found Gems toolbar — filters (left) + sort (right) */
.fg-toolbar { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); flex-wrap: wrap; margin-bottom: var(--sp-5); }
.fg-filters { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }
.fg-sort { display: flex; align-items: center; gap: var(--sp-2); flex: none; }
#clear-filters { color: var(--blue); font-weight: 600; padding: 0 var(--sp-2); }

/* ============================================================================
   FOUND GEM — listing card
   3 columns: media · body · side rail. Feedback strip spans full width.
   ========================================================================== */
.listing-list { display: grid; gap: var(--sp-4); }

.listing-card {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr) clamp(156px, 17vw, 196px);
  gap: var(--sp-5);
  align-items: start;
  padding: var(--sp-5);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  cursor: pointer;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.listing-card:hover { border-color: color-mix(in srgb, var(--blue) 26%, var(--line)); box-shadow: var(--sh-md); transform: translateY(-1px); }
.listing-card:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

/* Media */
.lc-media { position: relative; width: 108px; }
.lc-media img {
  width: 108px; aspect-ratio: 5 / 7; object-fit: cover; display: block;
  border-radius: var(--r-md); border: 1px solid var(--line); background: var(--line-2);
}
.sold-flag {
  position: absolute; left: 7px; bottom: 7px; top: auto; padding: 3px 9px; border-radius: var(--r-pill);
  background: var(--danger); color: #fff; font-size: 0.58rem; font-weight: 700;
  letter-spacing: 0.07em; text-transform: uppercase; box-shadow: var(--sh-sm);
}
.sold-flag[hidden] { display: none; }

/* Gemby score + listing type on one line */
.lc-scoreline { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; }
.lc-type { display: inline-flex; align-items: center; font-size: var(--t-sm); font-weight: 600; color: var(--muted); }
.lc-type::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--line); margin-right: var(--sp-3); }

/* Body */
.lc-body { min-width: 0; display: grid; gap: var(--sp-3); align-content: start; }
.lc-body-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--sp-2); }
.lc-body-head-text { min-width: 0; }
.listing-title { font-size: var(--t-lg); font-weight: 700; line-height: 1.3; letter-spacing: -0.02em; color: var(--ink); }
.lc-body .meta { font-size: var(--t-sm); color: var(--muted); margin-top: 4px; line-height: 1.45; }
.badge-row { display: flex; flex-wrap: wrap; gap: 6px; }
.badge.good { background: #e7f8ee; color: var(--success); }
.badge.warn { background: #fdf1e3; color: #b7791f; }

/* Stats strip */
.lc-stats {
  display: flex; flex-wrap: wrap; gap: var(--sp-3) var(--sp-6);
  padding: var(--sp-3) 0; border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2);
}
.lc-stat { display: grid; gap: 3px; }
.lc-stat span { font-size: 0.6rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--faint); }
.lc-stat strong { font-size: var(--t-sm); font-weight: 700; color: var(--ink-2); font-variant-numeric: tabular-nums; }

/* Timestamps */
.time-meta-row { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.time-badge { font-size: var(--t-mono); color: var(--muted); background: var(--paper); border: 1px solid var(--line-2); border-radius: var(--r-pill); padding: 3px 10px; white-space: nowrap; }
.time-badge.live-badge { color: var(--success); border-color: color-mix(in srgb, var(--success) 35%, var(--line-2)); margin-left: 6px; }
.live-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--success); margin-right: 5px; vertical-align: middle; animation: live-pulse 1.8s ease-in-out infinite; }
@keyframes live-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

/* Recent sales */
.recent-sales { padding-top: var(--sp-1); }
.recent-sales > strong { display: block; font-size: var(--t-mono); text-transform: uppercase; letter-spacing: 0.06em; color: var(--faint); margin-bottom: 8px; font-weight: 700; }
.recent-sales > div { display: flex; flex-wrap: wrap; gap: var(--sp-5); }
.recent-sales span { display: grid; gap: 2px; font-weight: 700; font-variant-numeric: tabular-nums; font-size: var(--t-sm); }
.recent-sales small { font-weight: 400; color: var(--muted); font-size: var(--t-mono); }

/* Side rail — menu pinned top-right, price/score/CTA anchored to the bottom */
.lc-side { align-self: stretch; display: flex; flex-direction: column; align-items: flex-end; gap: var(--sp-4); text-align: right; min-width: 0; }
.lc-menu { align-self: flex-end; }
.lc-side-bottom { margin-top: auto; display: grid; justify-items: end; gap: var(--sp-3); }
.lc-price { display: grid; gap: 3px; justify-items: end; }
.lc-price-label { font-size: 0.62rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--faint); }
.lc-price strong { font-family: var(--display); font-size: var(--t-3xl); font-weight: 800; letter-spacing: -0.03em; color: var(--ink); line-height: 1; font-variant-numeric: tabular-nums; }
.lc-deal {
  display: inline-flex; align-items: center; gap: 6px; height: 42px; padding: 0 var(--sp-5);
  border-radius: var(--r-pill); background: var(--blue); color: #fff; font-weight: 600; font-size: var(--t-sm);
  transition: background var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.lc-deal:hover { background: var(--blue-700); transform: translateY(-1px); }
.lc-deal svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.match-menu summary { width: 30px; height: 30px; }

/* Gemby Score widget */
.gemby-score, .listing-score, .modal-score { display: inline-flex; align-items: center; gap: 7px; line-height: 1; }
.score-label { font-size: 0.6rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); white-space: nowrap; }
.score-asterisks { display: inline-flex; align-items: center; gap: 2px; line-height: 1; }
.score-asterisk { font-family: var(--display); font-weight: 800; font-size: 1rem; line-height: 1; color: color-mix(in srgb, var(--ink) 14%, transparent); border: 0; background: none; padding: 0; }
.score-asterisk.filled { color: var(--blue); }

.listing-score { flex-direction: row; align-items: center; justify-content: flex-start; gap: 8px; }
.listing-score .score-label { color: var(--muted); }
.listing-score .score-asterisk { font-size: 1.35rem; }

.modal-score { gap: 8px; }
.modal-score .score-label { font-size: 0.7rem; }
.modal-score .score-asterisk { font-size: 1.3rem; }

/* Found-gem feedback strip (under card) */
.found-feedback-compact {
  grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4); background: var(--paper); border-radius: var(--r-md);
  border: 1px solid var(--line-2); font-size: var(--t-sm); color: var(--muted);
}
.found-feedback-compact.submitted { color: var(--success); background: #e7f8ee; border-color: color-mix(in srgb, var(--success) 22%, var(--line)); }
.found-feedback-compact strong { font-weight: 700; }
.found-feedback-compact .ghost-button { flex: none; font-size: var(--t-sm); padding: 6px 14px; min-height: 34px; }

/* Found-gem feedback form (modal) — focused, uncluttered */
.found-feedback-modal { display: grid; gap: var(--sp-6); }
.ffm-head { display: grid; gap: 5px; }
.ffm-kicker { font-size: 0.6rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--blue); }
.ffm-head h2 { font-size: var(--t-2xl); font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.ffm-ref { font-size: var(--t-sm); color: var(--muted); line-height: 1.45; }
.found-feedback-box { display: grid; gap: var(--sp-5); padding: 0; background: none; border: 0; }
.feedback-field { display: grid; gap: var(--sp-3); padding: 0; border: 0; margin: 0; min-width: 0; }
.feedback-field legend { padding: 0; font-size: var(--t-base); font-weight: 700; color: var(--ink); }
.feedback-choice-row { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.feedback-choice-row label { position: relative; display: inline-flex; }
.feedback-choice-row input { position: absolute; opacity: 0; pointer-events: none; }
.feedback-choice-row span { display: inline-flex; padding: 9px 16px; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--surface); font-size: var(--t-sm); font-weight: 500; color: var(--ink-2); cursor: pointer; transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease), color var(--dur) var(--ease); }
.feedback-choice-row label:hover span { border-color: var(--blue); color: var(--ink); }
.feedback-choice-row input:checked + span { background: var(--blue); border-color: var(--blue); color: #fff; font-weight: 600; }
.feedback-choice-row input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 2px; }
.feedback-note-label { font-size: var(--t-sm); font-weight: 600; color: var(--ink); }
.feedback-note-label em { color: var(--faint); font-style: normal; font-weight: 400; }
.found-feedback-box textarea { width: 100%; min-height: 92px; padding: var(--sp-3) var(--sp-4); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); font: inherit; font-size: var(--t-sm); line-height: 1.5; resize: vertical; transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.found-feedback-box textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-tint); }
.feedback-actions { display: flex; align-items: center; gap: var(--sp-4); flex-wrap: wrap; }
.feedback-actions .primary-button { flex: none; }
.feedback-hint { font-size: var(--t-mono); color: var(--faint); line-height: 1.4; }

/* Found-gems empty state + pagination */
.fg-empty .primary-button { margin-top: var(--sp-2); }
.found-gems-pagination, [class*="pagination"] { display: flex; justify-content: center; gap: var(--sp-2); margin-top: var(--sp-8); }
.found-gems-pagination button, [data-found-gems-page] { min-width: 40px; height: 40px; padding: 0 var(--sp-3); border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface); font-size: var(--t-sm); font-weight: 500; }
[data-found-gems-page]:hover { border-color: var(--blue); color: var(--blue); }
[data-found-gems-page][aria-current="true"], [data-found-gems-page].active { background: var(--blue); color: #fff; border-color: var(--blue); }

/* Responsive */
@media (max-width: 720px) {
  /* Compact mobile gem card — essentials only; full detail lives in the modal on tap */
  .listing-card { position: relative; grid-template-columns: 84px minmax(0, 1fr); gap: var(--sp-4); padding: var(--sp-4); }
  .lc-media, .lc-media img { width: 84px; }
  .lc-body { gap: var(--sp-2); }
  .listing-title { font-size: var(--t-base); line-height: 1.3; padding-right: 28px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .lc-body .meta { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  /* Hide the dense secondary blocks on phones — they're in the detail modal */
  .lc-stats, .recent-sales, .time-meta-row { display: none; }
  .badge-row .badge:not(.blue):not(.good):not(.warn) { display: none; }
  .lc-menu { position: absolute; top: var(--sp-3); right: var(--sp-3); z-index: 4; }
  .lc-side {
    grid-column: 1 / -1; align-self: auto; flex-direction: row; align-items: center; justify-content: space-between;
    text-align: left; gap: var(--sp-3); padding-top: var(--sp-3); border-top: 1px solid var(--line-2);
  }
  .lc-side-bottom { margin-top: 0; flex: 1; display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: var(--sp-3); }
  .lc-price { display: flex; flex-direction: row; align-items: baseline; gap: 6px; text-align: left; }
  .lc-price strong { font-size: var(--t-2xl); white-space: nowrap; }
  .lc-deal { flex: none; margin-left: 0; }
  .feedback-incentive { grid-template-columns: 1fr; gap: var(--sp-4); }
  .fi-main { padding-right: var(--sp-5); }
  .fi-progress { min-width: 0; }
}

/* ============================================================================
   PRICING — premium plan cards with featured (Pro Collector) emphasis
   ========================================================================== */
body[data-view="pricing"] .topbar, body[data-view="pricing"] .sponsor-strip { display: none; }
.pricing-hero { text-align: center; max-width: 700px; margin: var(--sp-4) auto var(--sp-12); display: grid; gap: var(--sp-3); }
.pricing-hero .eyebrow { color: var(--blue); justify-self: center; }
.pricing-hero h1 { font-size: clamp(2.2rem, 4.6vw, 3.4rem); font-weight: 800; letter-spacing: -0.035em; line-height: 1.02; }
.pricing-hero p { font-size: var(--t-base); color: var(--muted); line-height: 1.6; max-width: 60ch; justify-self: center; }
.pricing-trust { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--sp-2) var(--sp-5); list-style: none; padding: 0; margin: var(--sp-2) 0 0; }
.pricing-trust li { display: inline-flex; align-items: center; gap: 7px; font-size: var(--t-sm); color: var(--ink-2); font-weight: 500; }
.pricing-trust li::before { content: ""; flex: none; width: 16px; height: 16px; border-radius: 50%; background: #d9ff00 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2316181d' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l4.5 4.5L19 7'/%3E%3C/svg%3E") center / 10px no-repeat; }

.pricing-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--sp-5); align-items: stretch; }
@media (max-width: 1080px) { .pricing-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .pricing-grid { grid-template-columns: 1fr; } }

.pricing-card {
  position: relative; display: flex; flex-direction: column; gap: var(--sp-4);
  padding: var(--sp-6); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  transition: box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.pricing-card:hover { box-shadow: var(--sh-md); transform: translateY(-3px); }
.pricing-card.featured { border-color: var(--blue); background: var(--blue); color: #fff; box-shadow: 0 22px 50px rgba(31,61,240,0.30); }
.pricing-card.featured:hover { box-shadow: 0 26px 56px rgba(31,61,240,0.34); }
.pricing-card.featured h3 { color: #fff; }
.pricing-card.featured .plan-price strong { color: #fff; }
.pricing-card.featured .plan-price span { color: rgba(255,255,255,0.7); }
.pricing-card.featured .plan-quota-grid > div { border-bottom-color: rgba(255,255,255,0.2); }
.pricing-card.featured .plan-quota-grid > div span { color: rgba(255,255,255,0.66); }
.pricing-card.featured .plan-quota-grid > div strong { color: #fff; }
.pricing-card.featured .plan-quota-grid > div small { color: rgba(255,255,255,0.6); }
.pricing-card.featured .plan-divider { background: rgba(255,255,255,0.2); }
.pricing-card.featured .plan-features li span { color: #fff; }
.pricing-card.featured .plan-features li p { color: rgba(255,255,255,0.86); }
.pricing-card.featured .plan-ribbon { background: #d9ff00; color: #16181d; }
/* Featured CTA → #d9ff00 lime, our 3rd brand colour (dark text for contrast) */
.pricing-card.featured > button.primary-button { background: #d9ff00; color: #16181d; box-shadow: 0 8px 18px rgba(217,255,0,0.45); }
.pricing-card.featured > button.primary-button:hover { background: #c6e800; }
.pricing-card.featured > button.ghost-button { background: rgba(255,255,255,0.14); color: #fff; border-color: rgba(255,255,255,0.4); }
.pricing-card.featured > button.ghost-button:hover { background: rgba(255,255,255,0.22); border-color: rgba(255,255,255,0.6); }
.plan-ribbon {
  position: absolute; top: -11px; left: var(--sp-6); padding: 4px 12px; border-radius: var(--r-pill);
  background: var(--blue); color: #fff; font-family: var(--font-text); font-size: 0.625rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.08em;
}
.pricing-card.beta-locked { opacity: 0.72; filter: saturate(0.55); }
.pricing-card.beta-locked:hover { box-shadow: none; transform: none; }
.plan-beta-tag {
  position: absolute; top: -11px; left: var(--sp-6); padding: 4px 12px; border-radius: var(--r-pill);
  background: var(--ink); color: var(--surface); font-family: var(--font-text); font-size: 0.625rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.08em;
}
.pricing-card.beta-locked > button[disabled] {
  cursor: not-allowed; opacity: 1; background: var(--paper); color: var(--muted);
  border-color: var(--line); box-shadow: none;
}
.pricing-card h3 { font-size: var(--t-lg); font-weight: 600; margin-top: var(--sp-1); }
.plan-price { display: flex; align-items: baseline; gap: 6px; }
.plan-price strong { font-family: var(--display); font-size: var(--t-3xl); font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.plan-price span { font-size: var(--t-sm); color: var(--muted); }
.pricing-card > button { width: 100%; min-height: 46px; }
.plan-quota-grid { display: grid; gap: 2px; }
.plan-quota-grid > div { display: grid; grid-template-columns: 1fr auto; gap: 2px var(--sp-3); padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.plan-quota-grid > div span { grid-column: 1; grid-row: 1; font-family: var(--font-text); font-size: 0.625rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.plan-quota-grid > div strong { grid-column: 2; grid-row: 1; font-weight: 700; font-variant-numeric: tabular-nums; }
.plan-quota-grid > div small { grid-column: 1 / -1; grid-row: 2; font-size: var(--t-mono); color: var(--faint); }
.plan-divider { height: 1px; background: var(--line); margin: var(--sp-1) 0; }
.plan-features { list-style: none; display: grid; gap: 10px; margin: 0; padding: 0; }
.plan-features li { display: flex; gap: 10px; align-items: flex-start; font-size: var(--t-sm); }
.plan-features li span { flex: none; color: var(--blue); font-family: var(--display); font-weight: 800; line-height: 1.4; }
.plan-features li p { color: var(--ink-2); line-height: 1.5; }

/* Pricing FAQ — clean accordion */
.pricing-faq { max-width: 760px; margin: var(--sp-20) auto 0; }
.faq-list { display: grid; gap: var(--sp-3); }
.faq-item { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); overflow: hidden; transition: border-color var(--dur) var(--ease); }
.faq-item[open] { border-color: color-mix(in srgb, var(--blue) 24%, var(--line)); }
.faq-item summary { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); padding: var(--sp-4) var(--sp-5); cursor: pointer; font-weight: 600; font-size: var(--t-base); list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-chevron { flex: none; font-family: var(--display); font-weight: 800; color: var(--blue); font-size: 1.4rem; line-height: 1; transition: transform var(--dur) var(--ease); }
.faq-item[open] .faq-chevron { transform: rotate(45deg); }
.faq-item p { padding: 0 var(--sp-5) var(--sp-5); margin: 0; color: var(--muted); font-size: var(--t-sm); line-height: 1.6; }

/* ============================================================================
   AUTH MODAL — tabs, OAuth, divider, form
   ========================================================================== */
.auth-modal-panel h2 { font-size: var(--t-2xl); margin-top: var(--sp-2); }
.auth-modal-panel > .muted, .auth-modal-panel .auth-form ~ .muted { font-size: var(--t-sm); }
#auth-modal-content > .muted { font-size: var(--t-sm); color: var(--muted); margin-bottom: var(--sp-5); }
.auth-tabs { display: inline-flex; gap: 4px; padding: 4px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-pill); margin-bottom: var(--sp-5); }
.auth-tabs button { padding: 7px 18px; border-radius: var(--r-pill); font-size: var(--t-sm); font-weight: 500; color: var(--muted); }
.auth-tabs button.active { background: var(--surface); color: var(--ink); box-shadow: var(--sh-sm); }
.auth-oauth-row { margin-bottom: var(--sp-4); }
.auth-oauth-row button { width: 100%; min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: 1px solid var(--line); border-radius: var(--r-pill); font-weight: 600; font-size: var(--t-base); transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease); }
.auth-oauth-row button:hover { border-color: var(--ink); background: var(--paper); }
.auth-oauth-row button span { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--blue); color: #fff; font-family: var(--display); font-weight: 700; font-size: 12px; }
.auth-divider { display: flex; align-items: center; gap: var(--sp-3); margin: var(--sp-4) 0; color: var(--faint); font-size: var(--t-sm); }
.auth-divider span { flex: none; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-form { display: grid; gap: var(--sp-4); }
.auth-form label { display: grid; gap: 6px; }
.auth-form label span { font-size: var(--t-sm); font-weight: 500; }
.auth-form .primary-button { width: 100%; margin-top: var(--sp-1); }
.auth-text-button { background: none; color: var(--blue); font-size: var(--t-sm); font-weight: 500; justify-self: start; padding: var(--sp-1) 0; }
.auth-inline-error { color: var(--danger); font-size: var(--t-sm); }
.auth-inline-error[hidden] { display: none; }

/* ============================================================================
   SETTINGS / NOTIFICATIONS + global cleanups
   ========================================================================== */
/* The partner carousel never reads premium — retire it site-wide */
.sponsor-strip { display: none; }
body[data-view="notifications"] .topbar, body[data-view="profile"] .topbar { display: none; }
body[data-view="about"] .topbar, body[data-view="legal"] .topbar, body[data-view="report"] .topbar,
body[data-view="affiliates"] .topbar, body[data-view="contact"] .topbar, body[data-view="image-search"] .topbar, body[data-view="admin-feedback"] .topbar, body[data-view="grails"] .topbar, body[data-view="gem"] .topbar, body[data-view="favorites"] .topbar { display: none; }

/* Content / info pages (About, Legal, Affiliates, Report) — branded header + card grid */
.info-page { display: grid; gap: var(--sp-6); }
.info-page + .info-page { margin-top: var(--sp-10); }
.info-page-head { max-width: 680px; }
.info-page-head h1, .info-page-head h2 { font-size: var(--t-3xl); font-weight: 800; letter-spacing: -0.035em; line-height: 1.02; }
.info-page-sub { font-size: var(--t-base); color: var(--muted); margin-top: var(--sp-2); line-height: 1.6; }
.info-page-action { justify-self: start; margin-top: var(--sp-5); }
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(258px, 1fr)); gap: var(--sp-4); }
.info-card { display: grid; gap: var(--sp-2); align-content: start; }
.info-card h3 { font-size: var(--t-lg); font-weight: 700; letter-spacing: -0.01em; }
.info-card p { color: var(--muted); line-height: 1.6; font-size: var(--t-sm); }
/* Report — feedback form */
.general-feedback-form { display: grid; gap: var(--sp-4); max-width: 620px; margin-top: var(--sp-5); }
.general-feedback-form > div, .general-feedback-form > label { display: grid; gap: 8px; }
.general-feedback-form label > span, .general-feedback-form > div > label:first-child { font-weight: 600; font-size: var(--t-sm); }
.feedback-rating-row { display: flex; gap: 8px; }
.feedback-rating-row label { position: relative; cursor: pointer; }
.feedback-rating-row input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.feedback-rating-row span { display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface); font-weight: 700; font-variant-numeric: tabular-nums; transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease), color var(--dur) var(--ease); }
.feedback-rating-row label:hover span { border-color: var(--ink-2); }
.feedback-rating-row input:checked + span { border-color: var(--blue); background: var(--blue-tint); color: var(--blue); }
.feedback-rating-row input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 2px; }
.general-feedback-form textarea { resize: vertical; line-height: 1.5; padding: var(--sp-3) var(--sp-4); }
.general-feedback-form .primary-button { justify-self: start; min-width: 180px; }

.settings-profile-form { display: grid; gap: var(--sp-5); margin-top: var(--sp-4); }
.settings-profile-form .form-grid { display: grid; gap: var(--sp-5); }
.settings-stack { display: grid; gap: var(--sp-5); }

/* Account pages (My account / Settings) — branded header + identity card */
.account-page { display: grid; gap: var(--sp-6); }
.account-header { max-width: 640px; }
.account-header h1 { font-size: var(--t-3xl); font-weight: 800; letter-spacing: -0.035em; line-height: 1.02; }
.account-sub { font-size: var(--t-base); color: var(--muted); margin-top: var(--sp-2); }
.account-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--sp-5); align-items: start; }
@media (max-width: 860px) { .account-grid { grid-template-columns: 1fr; } }
.identity-card { display: grid; gap: var(--sp-5); }
.identity-top { display: flex; align-items: center; gap: var(--sp-4); }
.identity-avatar { flex: none; position: relative; display: grid; place-items: center; width: 54px; height: 54px; border-radius: var(--r-md); background: var(--blue); background-size: cover; background-position: center; color: #fff; font-family: var(--display); font-weight: 800; font-size: 1.5rem; line-height: 1; cursor: pointer; overflow: hidden; }
.identity-avatar.has-image { color: transparent; }
.identity-avatar-edit { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(22,24,29,0.45); color: #fff; opacity: 0; transition: opacity var(--dur) var(--ease); }
.identity-avatar-edit svg { width: 20px; height: 20px; }
.identity-avatar:hover .identity-avatar-edit, .identity-avatar:focus-within .identity-avatar-edit { opacity: 1; }
.security-rows { display: grid; margin-top: var(--sp-2); }
.security-row { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); padding: var(--sp-4) 0; border-top: 1px solid var(--line); }
.security-row:first-child { border-top: none; padding-top: 0; }
.security-row > div { display: grid; gap: 2px; min-width: 0; }
.security-row strong { font-size: var(--t-sm); font-weight: 600; }
.security-row span { font-size: var(--t-sm); color: var(--muted); }
.security-row > button { flex: none; }
.identity-meta { display: grid; gap: 2px; min-width: 0; }
.identity-meta strong { font-size: var(--t-lg); font-weight: 700; letter-spacing: -0.01em; }
.identity-meta span { font-size: var(--t-sm); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.identity-top .badge { margin-left: auto; flex: none; }
.identity-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-3); padding: var(--sp-4) 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.identity-stats > div { display: grid; gap: 3px; }
.identity-stats span { font-size: 0.64rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--faint); }
.identity-stats strong { font-size: var(--t-base); font-weight: 700; }
.identity-actions { display: flex; gap: var(--sp-3); flex-wrap: wrap; }
.identity-actions > button { flex: 1; min-width: 140px; }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-4); margin-bottom: var(--sp-5); }
@media (max-width: 540px) { .settings-grid { grid-template-columns: 1fr; } }
.plan-usage-panel .section-head { align-items: flex-start; }
.usage-card { display: grid; gap: var(--sp-4); margin-top: var(--sp-2); }
.usage-row { display: grid; gap: var(--sp-2); }
.usage-row-top { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--sp-3); }
.usage-row-top > div { display: grid; gap: 2px; }
.usage-row-top span { font-size: var(--t-sm); font-weight: 500; }
.usage-row-top small { font-size: var(--t-mono); color: var(--muted); }
.usage-row-top strong { font-variant-numeric: tabular-nums; font-weight: 700; }
.usage-meter { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.usage-meter span { display: block; height: 100%; width: var(--usage, 0%); background: var(--blue); border-radius: 3px; transition: width var(--dur) var(--ease); }
.settings-plan-facts { display: grid; gap: var(--sp-2); padding-top: var(--sp-4); border-top: 1px solid var(--line-2); margin-top: var(--sp-2); }
.kv { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-3); font-size: var(--t-sm); }
.kv strong { font-weight: 400; color: var(--muted); }
.kv span { font-weight: 500; text-align: right; }
.usage-upgrade { width: 100%; min-height: 46px; margin-top: var(--sp-3); border-radius: var(--r-pill); background: var(--blue); color: #fff; font-weight: 600; transition: background var(--dur) var(--ease); }
.usage-upgrade:hover { background: var(--blue-700); }
.analysis-result { display: grid; gap: var(--sp-3); }
.analysis-result .ghost-button { margin-top: var(--sp-2); justify-self: start; }


/* ============================================================================
   HOME RAIL CARDS — clean single-row grid + refined premium hover
   ========================================================================== */
.mcard { transition: transform 0.32s var(--ease), box-shadow 0.32s var(--ease), border-color 0.32s var(--ease); }
.mcard:hover { transform: translateY(-6px); box-shadow: var(--sh-lg); border-color: color-mix(in srgb, var(--blue) 26%, var(--line)); }
.mcard-art img { transition: transform 0.55s var(--ease); }
.mcard:hover .mcard-art img { transform: scale(1.06); }
.mcard-art::after {
  content: "View \2192"; position: absolute; left: 12px; bottom: 12px; z-index: 3;
  padding: 7px 13px; border-radius: var(--r-pill);
  background: var(--blue); color: #fff; font-size: var(--t-sm); font-weight: 600;
  opacity: 0; transform: translateY(8px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease); pointer-events: none;
}
.mcard:hover .mcard-art::after { opacity: 1; transform: none; }

/* Seller avatar/verified icon → subtle outline glyph (was a solid black fill) */
.seller-row .seller-glyph { width: 18px; height: 18px; }

/* ============================================================================
   HOME CARDS — graded-slab design (Gemby Graded). Mono kept to a minimum.
   ========================================================================== */
.mcard.slab {
  position: relative;
  display: flex; flex-direction: column; gap: 0; padding: 0; cursor: pointer;
  background: var(--surface);
  border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--sh-sm); overflow: hidden;
}
/* One cohesive card: image hero on top, then a clean title band (no detached cert box). */
.slab-label { order: 1; display: flex; align-items: flex-start; justify-content: space-between; gap: 11px; padding: 11px 13px 4px; background: transparent; border: 0; }
.slab-id { display: grid; align-content: center; min-width: 0; }
.slab-title { font-size: 0.86rem; font-weight: 600; line-height: 1.32; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.slab-grade { flex: none; display: grid; justify-items: center; align-content: center; gap: 2px; padding-left: 10px; border-left: 1px solid var(--line); }
.slab-grade-desc { font-size: 0.54rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.slab-grade .score .stars { font-size: 1.02rem; line-height: 1; letter-spacing: 2px; }
/* Card window — photo fills the whole frame */
.slab-window { order: 0; position: relative; aspect-ratio: 4 / 5; border-radius: 0; padding: 0; overflow: hidden; background: radial-gradient(120% 90% at 50% 0%, #ffffff 0%, #eceae3 100%); border: 0; border-bottom: 1px solid var(--line); }
.slab-window img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }
.lt-badge { position: absolute; top: 8px; left: 8px; z-index: 2; padding: 3px 8px; border-radius: var(--r-pill); font-size: 10px; font-weight: 700; line-height: 1; letter-spacing: 0.03em; text-transform: uppercase; color: #fff; box-shadow: 0 2px 6px rgba(22,24,29,0.2); }
.lt-badge.bin { background: var(--blue); }
.lt-badge.auction { background: var(--ink); color: var(--surface); }
.mcard.slab:hover .slab-window img { transform: scale(1.04); }
.slab .deal-pill { top: 14px; left: 14px; font-family: var(--font-text); font-size: 0.7rem; }
/* Footer */
.slab-foot { order: 2; display: grid; gap: 6px; padding: 4px 13px 13px; }
.slab .mcard-price { flex-direction: row; align-items: baseline; gap: 8px; }
.slab .mcard-price b { font-size: var(--t-lg); }
.slab .mcard-price small { font-size: var(--t-sm); }
.slab .seller-row { padding: 0; border-top: none; font-family: var(--font-text); font-size: var(--t-sm); }

/* ============================================================================
   CARD MODAL — graded-slab style (matches the home cards)
   ========================================================================== */
.card-modal.product .card-modal-panel {
  width: min(1060px, calc(100vw - 32px)); max-width: 1060px; max-height: 92dvh;
  padding: 0; overflow-y: auto;
}
.card-modal.product .card-modal-close { top: 16px; right: 16px; z-index: 6; background: rgba(255,255,255,0.9); }
.card-modal-grid.slab-modal { display: grid; grid-template-columns: 0.92fr 1fr; gap: 0; }

/* Left: the card as a large graded slab */
.slab-modal-slab { display: flex; flex-direction: column; gap: var(--sp-3); padding: clamp(20px, 3vw, 32px); background: linear-gradient(180deg, #fdfdfb 0%, #eeede7 100%); border-right: 1px solid var(--line); min-width: 0; }
.slab-modal-label { flex: none; display: flex; align-items: stretch; justify-content: space-between; gap: var(--sp-4); padding: var(--sp-4); background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); }
.slab-modal-label .slab-title { font-size: 0.95rem; -webkit-line-clamp: 3; }
.slab-modal-label .slab-grade { padding-left: var(--sp-4); }
.slab-modal-label .slab-grade-desc { font-size: 0.58rem; }
.slab-modal-label .slab-grade .score .stars { font-size: 1.5rem; letter-spacing: 2px; }
.slab-modal-window { position: relative; display: flex; align-items: center; justify-content: center; padding: var(--sp-4); background: radial-gradient(120% 90% at 50% 0%, #ffffff 0%, #ebeae3 100%); border: 1px solid var(--line); border-radius: var(--r-md); }
.slab-modal-window img { display: block; max-width: 100%; max-height: clamp(260px, 48vh, 460px); width: auto; height: auto; border-radius: 6px; box-shadow: 0 16px 40px rgba(22, 24, 29, 0.24); transition: transform 0.2s var(--ease); transform-origin: center center; cursor: zoom-in; }
.modal-zoom { position: absolute; right: 10px; bottom: 10px; z-index: 2; display: inline-flex; gap: 2px; padding: 3px; background: rgba(255,255,255,0.94); border: 1px solid var(--line); border-radius: var(--r-pill); box-shadow: var(--sh-sm); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.modal-zoom button { width: 32px; height: 32px; border-radius: var(--r-pill); display: grid; place-items: center; font-size: 19px; font-weight: 600; color: var(--ink); background: transparent; cursor: pointer; line-height: 1; transition: background var(--dur) var(--ease); }
.modal-zoom button:hover:not(:disabled) { background: var(--paper); }
.modal-zoom button:disabled { opacity: 0.3; cursor: default; }
.slab-modal .modal-photo-strip { flex: none; display: flex; gap: 8px; flex-wrap: wrap; }
.slab-modal .modal-photo-strip button { width: 46px; height: 56px; border-radius: 7px; overflow: hidden; border: 1px solid var(--line); padding: 0; background: #fff; cursor: pointer; }
.slab-modal .modal-photo-strip button.active { border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue); }
.slab-modal .modal-photo-strip img { width: 100%; height: 100%; object-fit: cover; }

/* Right: refined details */
.card-modal-grid.slab-modal .card-modal-info { display: grid; gap: var(--sp-4); align-content: start; padding: clamp(24px, 3.5vw, 40px); }
.modal-deal-badge { justify-self: start; }
.card-modal-grid.slab-modal .card-modal-info h2 { font-size: var(--t-2xl); line-height: 1.12; letter-spacing: -0.025em; }
.modal-meta { font-size: var(--t-sm); color: var(--muted); }
.modal-price-score-row { display: flex; align-items: center; gap: var(--sp-4); }
.modal-price { font-family: var(--display); font-weight: 800; font-size: var(--t-3xl); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.modal-seller { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-3) var(--sp-4); border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface); }
.modal-seller-icon { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: var(--r-pill); }
.modal-seller-icon svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.modal-seller-text { display: grid; gap: 1px; min-width: 0; }
.modal-seller strong { font-size: var(--t-sm); font-weight: 700; color: var(--ink); letter-spacing: -0.01em; }
.modal-seller span { font-size: var(--t-sm); color: var(--muted); line-height: 1.45; }
.modal-seller.trusted { border-color: color-mix(in srgb, var(--success) 28%, var(--line)); background: color-mix(in srgb, var(--success) 5%, var(--surface)); }
.modal-seller.trusted .modal-seller-icon { background: color-mix(in srgb, var(--success) 14%, transparent); color: var(--success); }
.modal-seller.warn { border-color: color-mix(in srgb, #d99a2b 34%, var(--line)); background: color-mix(in srgb, #d99a2b 7%, var(--surface)); }
.modal-seller.warn .modal-seller-icon { background: color-mix(in srgb, #d99a2b 18%, transparent); color: #b7791f; }
.modal-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-4) var(--sp-5); }
.modal-detail-grid > div { display: grid; gap: 3px; }
.modal-detail-grid span { font-size: var(--t-mono); text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.modal-detail-grid strong { font-size: var(--t-sm); font-weight: 600; }
.modal-comps { display: grid; gap: var(--sp-3); }
.section-head.mini { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); margin: 0; }
.section-head.mini h3 { font-size: var(--t-base); font-weight: 600; }
.modal-sales { display: flex; gap: var(--sp-3); flex-wrap: wrap; }
.modal-sales a { display: grid; gap: 2px; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--r-md); font-weight: 700; font-variant-numeric: tabular-nums; transition: border-color var(--dur) var(--ease); }
.modal-sales a:hover { border-color: var(--blue); color: var(--blue); }
.modal-sales small { font-weight: 400; color: var(--muted); font-size: var(--t-sm); }
.modal-actions { display: flex; gap: var(--sp-3); flex-wrap: wrap; margin-top: var(--sp-2); }
.modal-actions .primary-button { background: var(--blue); }
.modal-actions .primary-button:hover { background: var(--blue-700); }
.ebay-cta { display: inline-flex; align-items: center; gap: 7px; }

/* Standard, content-independent modal size on desktop (>=761px): the panel is a
   fixed box. Long/short text only changes the internal scroll, never the window. */
@media (min-width: 761px) {
  .card-modal.product .card-modal-panel { height: min(700px, 92dvh); overflow: hidden; }
  .card-modal.product #card-modal-content, .card-modal.cinema #card-modal-content { height: 100%; }
  .card-modal-grid.slab-modal { height: 100%; grid-template-rows: minmax(0, 1fr); }
  .slab-modal-slab { height: 100%; min-height: 0; overflow-y: auto; justify-content: flex-start; }
  .slab-modal-window { flex: none; height: clamp(300px, 44vh, 420px); }
  .slab-modal-window img { max-height: 100%; }
  .card-modal-grid.slab-modal .card-modal-info { height: 100%; min-height: 0; overflow-y: auto; }

  .card-modal.cinema .card-modal-panel { height: min(620px, 92dvh); }
  .grail-cinema { min-height: 0; height: 100%; }
  .grail-cinema-inner { height: 100%; grid-template-rows: minmax(0, 1fr); }
  .grail-cinema-stage { height: 100%; min-height: 0; }
  .grail-cinema-copy { min-height: 0; overflow-y: auto; align-content: safe center; }
}
@media (max-width: 760px) {
  .card-modal-grid.slab-modal { grid-template-columns: 1fr; }
  .slab-modal-slab { border-right: none; border-bottom: 1px solid var(--line); }
  .modal-detail-grid { grid-template-columns: 1fr; }
}

/* ============================================================================
   HERO — "The Vault": cinematic dark stage with a spotlit graded slab
   ========================================================================== */
.gem-hero.vault-hero {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: 1.04fr 0.96fr; align-items: center; text-align: left;
  gap: clamp(28px, 5vw, 72px);
  padding: clamp(40px, 5vw, 76px) clamp(28px, 5vw, 64px);
  margin: 0 0 var(--sp-24);
  border-radius: var(--r-xl);
  background: radial-gradient(125% 135% at 82% 6%, #182455 0%, #0c1020 42%, #070910 100%);
  color: #fff; box-shadow: 0 40px 100px rgba(8, 10, 20, 0.32);
}
.vault-aura { position: absolute; top: -22%; right: -8%; width: 60%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(74,104,255,0.5) 0%, transparent 62%); filter: blur(40px); pointer-events: none; z-index: 0; }
.vault-grid { position: absolute; inset: 0; z-index: 0; pointer-events: none; background-image: linear-gradient(rgba(255,255,255,0.045) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.045) 1px, transparent 1px); background-size: 46px 46px; -webkit-mask-image: radial-gradient(110% 90% at 80% 18%, #000 0%, transparent 70%); mask-image: radial-gradient(110% 90% at 80% 18%, #000 0%, transparent 70%); }

.vault-hero .gem-hero-head { position: relative; z-index: 2; display: grid; justify-items: start; max-width: 560px; padding: 0; text-align: left; }
.vault-hero .eyebrow { color: #9fb2ff; }
.vault-hero h1 { color: #fff; font-size: var(--t-hero); letter-spacing: -0.04em; line-height: 0.98; margin-bottom: var(--sp-6); }
.vault-hero h1 .accent { color: #7d97ff; }
.vault-hero .lead { color: rgba(255,255,255,0.64); margin-bottom: var(--sp-8); }
.vault-hero .gem-hero-actions { justify-content: flex-start; }
.vault-hero .hero-cta { background: var(--blue); color: #fff; }
.vault-hero .hero-cta:hover { background: var(--blue-700); }
.vault-hero .ghost-button { background: rgba(255,255,255,0.06); color: #fff; border-color: rgba(255,255,255,0.22); }
.vault-hero .ghost-button:hover { border-color: rgba(255,255,255,0.6); background: rgba(255,255,255,0.1); }

.vault-stage { position: relative; z-index: 2; display: grid; place-items: center; cursor: pointer; min-height: 380px; animation: vault-enter 0.9s var(--ease) both; }
@keyframes vault-enter { from { opacity: 0; transform: translateY(20px) scale(0.96); } }
.vault-spot { position: absolute; width: 86%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(96,124,255,0.48) 0%, rgba(96,124,255,0.12) 40%, transparent 66%); filter: blur(26px); z-index: 0; }
.vault-slab {
  position: relative; z-index: 2; width: min(306px, 86%); display: grid; gap: 7px; padding: 7px;
  background: linear-gradient(180deg, #ffffff 0%, #ecebe4 100%);
  border: 1px solid rgba(255,255,255,0.6); border-radius: 16px;
  box-shadow: 0 50px 92px rgba(0,0,0,0.55), 0 0 0 1px rgba(0,0,0,0.04);
  transform: rotate(-3.5deg); animation: vault-float 6.5s ease-in-out infinite;
}
.vault-stage:hover .vault-slab { animation-play-state: paused; transform: rotate(0deg) translateY(-8px) scale(1.025); box-shadow: 0 60px 110px rgba(0,0,0,0.6); }
@keyframes vault-float { 0%, 100% { transform: rotate(-3.5deg) translateY(0); } 50% { transform: rotate(-3.5deg) translateY(-12px); } }
.vault-slab-label { display: flex; align-items: stretch; justify-content: space-between; gap: 10px; padding: 9px 11px; background: #fff; border: 1px solid var(--line); border-radius: 9px; }
.vault-slab-label .slab-brand { font-size: 0.52rem; }
.vault-slab-label .slab-title { font-size: 0.72rem; }
.vault-slab-label .slab-grade { padding-left: 11px; border-left: 1px solid var(--line); display: grid; justify-items: center; gap: 2px; }
.vault-slab-label .slab-grade-desc { font-size: 0.5rem; }
.vault-slab-label .slab-grade-num { font-size: 1.55rem; }
.vault-slab-label .slab-grade .score .stars { font-size: 0.62rem; }
.vault-window { aspect-ratio: 5 / 6; display: grid; place-items: center; padding: 12px; border-radius: 9px; background: radial-gradient(120% 90% at 50% 0%, #fff, #eceae3); border: 1px solid var(--line); }
.vault-window img { max-width: 86%; max-height: 100%; width: auto; object-fit: contain; border-radius: 4px; box-shadow: 0 10px 26px rgba(22,24,29,0.22); }
.vault-slab-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 2px 6px 4px; }
.vault-slab-foot .mcard-price { flex-direction: row; align-items: baseline; gap: 6px; }
.vault-slab-foot .mcard-price b { font-size: var(--t-lg); color: var(--ink); }
.vault-slab-foot .mcard-price small { font-size: var(--t-sm); color: var(--muted); }
.vault-live { display: inline-flex; align-items: center; gap: 6px; font-size: var(--t-mono); color: var(--muted); }
.vault-live .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 0 rgba(26,157,84,0.4); animation: pulse 2.2s var(--ease) infinite; }

@media (max-width: 900px) {
  .gem-hero.vault-hero { grid-template-columns: 1fr; text-align: center; }
  .vault-hero .gem-hero-head { justify-items: center; max-width: none; }
  .vault-hero .gem-hero-actions { justify-content: center; }
  .vault-stage { min-height: 320px; }
}
@media (prefers-reduced-motion: reduce) { .vault-slab, .vault-stage { animation: none; } }

/* ============================================================================
   HERO — Editorial white + kinetic typography
   ========================================================================== */
.gem-hero.edito-hero {
  position: relative; overflow: hidden;
  display: grid; place-items: center; text-align: center;
  padding: clamp(76px, 12vw, 168px) var(--sp-4) clamp(56px, 8vw, 116px);
  margin: 0 0 var(--sp-16); background: var(--paper);
}
.edito-asterisk {
  position: absolute; z-index: 0; pointer-events: none; user-select: none;
  top: 50%; left: 50%; transform: translate(-50%, -52%);
  font-family: var(--display); font-weight: 800; line-height: 1;
  font-size: clamp(340px, 48vw, 780px); color: var(--blue); opacity: 0.05;
  animation: edito-spin 70s linear infinite;
}
@keyframes edito-spin { to { transform: translate(-50%, -52%) rotate(360deg); } }
.edito-hero .gem-hero-head { position: relative; z-index: 2; display: grid; justify-items: center; max-width: 940px; padding: 0; }
.edito-hero .eyebrow { color: var(--muted); margin-bottom: var(--sp-6); }
.edito-title { font-size: clamp(2.8rem, 7vw, 5.4rem); font-weight: 800; letter-spacing: -0.04em; line-height: 0.98; margin-bottom: var(--sp-6); }
.kinetic-word { display: inline-block; color: var(--blue); transition: transform 0.36s var(--ease), opacity 0.36s var(--ease); }
.kinetic-word.out { transform: translateY(-0.5em); opacity: 0; }
.kinetic-word.reset { transition: none; transform: translateY(0.5em); opacity: 0; }
.edito-hero .lead { max-width: 52ch; margin-bottom: var(--sp-8); }
.edito-hero .gem-hero-actions { justify-content: center; }
@media (max-width: 600px) { .edito-asterisk { font-size: 440px; } }

/* ============================================================================
   HERO — "Brand block": full-bleed Gemby blue, left-aligned kinetic copy,
   3D chrome asterisk with a holographic/refractor shimmer (card-market touch)
   ========================================================================== */
/* White top bar everywhere (consistent chrome); the blue hero is a bold block
   that sits flush beneath it on the home page. */
body[data-view="dashboard"] .main { padding-top: 0; }

.gem-hero.brand-hero {
  position: relative; overflow: hidden;
  width: 100vw; margin-left: calc(50% - 50vw); margin-bottom: var(--sp-16);
  background: var(--blue); color: #fff;
  display: flex; align-items: center; justify-content: flex-end;
  min-height: clamp(460px, 50vw, 600px);
  padding-block: clamp(40px, 5vw, 76px);
  padding-inline: max(24px, calc((100vw - var(--container)) / 2));
}

/* Scattered 3D chrome asterisks (decorative, never touch the copy) */
.brand-asterisks { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.brand-asterisk { position: absolute; font-family: var(--display); font-weight: 800; line-height: 1; user-select: none; will-change: translate; }
.brand-asterisk.a1, .brand-asterisk.a2, .brand-asterisk.a5 {
  background: linear-gradient(140deg, #ffffff 0%, #e7defc 16%, #d8ecff 32%, #ffffff 48%, #ffe6da 64%, #dafff0 80%, #ffffff 100%);
  background-size: 220% 220%; -webkit-background-clip: text; background-clip: text; color: transparent;
}
.brand-asterisk.a3, .brand-asterisk.a4 { color: rgba(255,255,255,0.13); }
.a1 { font-size: clamp(280px, 32vw, 480px); left: -2%; top: 50%; transform: rotate(-7deg);
  text-shadow: 1px 1px 0 #c2cbe0,2px 2px 0 #b6c0d8,3px 3px 0 #abb5d0,4px 4px 0 #a0abc8,5px 5px 0 #95a0bf,6px 6px 0 #8a96b7,7px 7px 0 #8090ad,8px 9px 0 #75859f,9px 10px 0 #6b7b95,10px 11px 0 #61728c,18px 22px 36px rgba(5,12,50,0.45);
  animation: chrome-sweep 5.5s ease-in-out infinite, floatY-c 7.5s ease-in-out infinite; }
.a2 { font-size: clamp(120px, 13vw, 190px); left: 24%; top: 6%; transform: rotate(10deg);
  text-shadow: 1px 1px 0 #b6c0d8,2px 2px 0 #a0abc8,3px 3px 0 #8a96b7,4px 4px 0 #7c889f,7px 9px 16px rgba(5,12,50,0.4);
  animation: chrome-sweep 6.2s ease-in-out infinite, floatY 6.5s ease-in-out infinite; }
.a3 { font-size: clamp(78px, 9vw, 124px); left: 14%; top: 13%; transform: rotate(-12deg); animation: floatY 8s ease-in-out infinite; }
.a4 { font-size: clamp(58px, 6vw, 92px); left: 6%; top: 5%; transform: rotate(6deg); animation: floatY 7s ease-in-out infinite; }
.a5 { font-size: clamp(560px, 84vw, 1080px); left: 30%; bottom: -82%; transform: translateX(-50%) rotate(6deg);
  text-shadow: 1px 1px 0 #c2cbe0,2px 2px 0 #b6c0d8,3px 3px 0 #abb5d0,4px 4px 0 #a0abc8,5px 5px 0 #95a0bf,6px 6px 0 #8a96b7,7px 7px 0 #8090ad,8px 9px 0 #75859f,9px 10px 0 #6b7b95,10px 11px 0 #61728c,18px 22px 36px rgba(5,12,50,0.45);
  animation: chrome-sweep 6.8s ease-in-out infinite, floatY 8.5s ease-in-out infinite; }
@keyframes chrome-sweep { 0%, 100% { background-position: 8% 50%; } 50% { background-position: 92% 50%; } }
@keyframes floatY { 0%, 100% { translate: 0 0; } 50% { translate: 0 -14px; } }
@keyframes floatY-c { 0%, 100% { translate: 0 -50%; } 50% { translate: 0 calc(-50% - 16px); } }

/* Right-side, left-aligned copy. Title is a fixed 3 lines → hero height never shifts */
.brand-hero .gem-hero-head { position: relative; z-index: 2; width: min(560px, 50%); display: grid; justify-items: start; text-align: left; max-width: none; }
.brand-hero .eyebrow { color: rgba(255,255,255,0.72); margin-bottom: var(--sp-6); }
.brand-hero .edito-title { color: #fff; font-size: clamp(2.4rem, 4.6vw, 4.2rem); font-weight: 800; letter-spacing: -0.04em; line-height: 1.0; margin-bottom: var(--sp-6); }
.brand-hero .kinetic-word { color: var(--lime); }
.brand-hero .lead { color: rgba(255,255,255,0.78); max-width: 46ch; margin-bottom: var(--sp-8); }
.brand-hero .gem-hero-actions { justify-content: flex-start; }
.brand-hero .hero-cta { background: var(--lime); color: #16240a; }
.brand-hero .hero-cta:hover { background: #fff; color: var(--ink); }
.brand-hero .ghost-button { background: transparent; color: #fff; border-color: rgba(255,255,255,0.42); }
.brand-hero .ghost-button:hover { border-color: #fff; background: rgba(255,255,255,0.08); }

@media (max-width: 860px) {
  .gem-hero.brand-hero { flex-direction: column; align-items: flex-start; justify-content: center; min-height: 0; padding-top: clamp(120px, 32vw, 220px); }
  .brand-hero .gem-hero-head { width: 100%; max-width: 560px; }
  .a1 { font-size: clamp(150px, 40vw, 230px); left: auto; right: -8%; top: -4%; transform: rotate(10deg); animation: chrome-sweep 5.5s ease-in-out infinite, floatY 7.5s ease-in-out infinite; }
  .a2 { left: 6%; top: 4%; }
  .a3, .a4, .a5 { display: none; }
}
@media (prefers-reduced-motion: reduce) { .brand-asterisk { animation: none !important; translate: none; } .a1 { translate: 0 -50%; } }

/* --- Profile: founding feedback & review status --- */
.review-status-copy { display: grid; gap: 4px; margin-top: var(--sp-4); padding: var(--sp-4); background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md); }
.review-status-copy strong { font-size: var(--t-sm); font-weight: 700; }
.review-status-copy span { font-size: var(--t-sm); color: var(--muted); }
.review-status-copy p { font-size: var(--t-sm); color: var(--muted); margin-top: var(--sp-2); }

/* ============================================================================
   GOD MODE — internal testing panel (hello@gemby.co). Lime-accented to match
   the God Mode entry chip, otherwise on-brand with the rest of the account UI.
   ========================================================================== */
.god-mode-panel { grid-column: 1 / -1; position: relative; overflow: hidden; border-color: color-mix(in srgb, #d9ff00 50%, var(--line)); background: linear-gradient(180deg, color-mix(in srgb, #d9ff00 9%, var(--surface)) 0%, var(--surface) 140px); }
.god-mode-panel::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: #d9ff00; }
.god-mode-panel > p.muted { margin-bottom: var(--sp-5); font-size: var(--t-sm); line-height: 1.5; }
.god-mode-waitlist { margin-top: var(--sp-5); display: grid; gap: 8px; }
.gm-waitlist-list { display: grid; gap: 8px; }
.gm-wl-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.gm-wl-email { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--t-sm); font-family: var(--font-text); }
.gm-wl-approve { flex: none; padding: 6px 14px; font-size: 13px; }
.god-mode-panel .section-head .badge.blue { background: #d9ff00; color: var(--ink); }

.god-mode-actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.god-mode-actions .primary-button, .god-mode-actions .ghost-button { min-height: 40px; }

.god-mode-email-tests { margin-top: var(--sp-5); padding-top: var(--sp-5); border-top: 1px solid var(--line); display: grid; gap: var(--sp-3); }
.god-mode-email-tests > strong { font-size: var(--t-sm); font-weight: 700; color: var(--ink); }

.god-mode-panel .review-status-copy { margin-top: var(--sp-5); }

.god-mode-badge-preview { margin-top: var(--sp-5); padding-top: var(--sp-5); border-top: 1px solid var(--line); display: grid; gap: var(--sp-3); }
.god-mode-badge-preview .section-head { margin-bottom: 0; }
.god-mode-badge-preview .section-head h3 { font-size: var(--t-base); font-weight: 700; letter-spacing: -0.01em; }
.god-mode-badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--sp-4); }

/* ============================================================================
   FOUNDING FEEDBACK GEM — collectible FUT-style card with holographic 3D tilt.
   The tilt JS sets --badge-rx/ry (rotation), --badge-mx/my (cursor %), and
   --badge-light (0→1 on hover). One of Gemby's signature reward objects.
   ========================================================================== */
.feedback-badge-card {
  --fc-blue: #1f3df0; --fc-blue-soft: #5b78ff;
  container-type: inline-size;
  position: relative; aspect-ratio: 5 / 7; border: 0; padding: 0; cursor: pointer; background: #0a0d1c;
  border-radius: 20px; overflow: hidden; isolation: isolate; color: #fff;
  transform: perspective(900px) rotateX(var(--badge-rx, 0deg)) rotateY(var(--badge-ry, 0deg));
  transform-style: preserve-3d; will-change: transform;
  box-shadow: 0 16px 42px -16px rgba(4,6,14,0.7), 0 0 26px -6px rgba(31,61,242,0.55);
  /* Smooth the transform so rapid gyro samples ease in (matches the grail hero) instead of snapping/jittering. */
  transition: transform 0.12s var(--ease), box-shadow 0.25s var(--ease);
}
.feedback-badge-card:hover { box-shadow: 0 24px 56px -16px rgba(31,61,242,0.6), 0 0 40px -4px rgba(31,61,242,0.75); }
.feedback-badge-card:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; }

/* Full-bleed illustration */
.fc-art { position: absolute; inset: 0; z-index: 0; }
.fc-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fc-veil { position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, rgba(6,9,18,0.55) 0%, rgba(6,9,18,0) 24%, rgba(6,9,18,0) 50%, rgba(6,9,18,0.74) 82%, rgba(6,9,18,0.96) 100%); }

/* Limit chip — top left, prominent */
.fc-limit { position: absolute; top: 5cqw; left: 5cqw; z-index: 4; padding: 2cqw 4cqw; border-radius: 10px; background: rgba(6,9,18,0.8); border: 1.5px solid #ffffff; box-shadow: 0 0 14px -2px rgba(31,61,242,0.85), inset 0 0 8px rgba(31,61,242,0.4); color: #fff; font-family: var(--display); font-weight: 800; font-size: clamp(11px, 5.4cqw, 18px); line-height: 1; letter-spacing: 0.01em; font-variant-numeric: tabular-nums; -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }

/* Name plate — bottom (title larger, lifted) */
.fc-nameplate { position: absolute; left: 0; right: 0; bottom: 0; z-index: 4; display: grid; gap: 1cqw; padding: 5cqw 5cqw 9cqw; text-align: center; }
.fc-title { font-family: var(--display); font-weight: 800; font-size: clamp(14px, 11cqw, 26px); line-height: 0.98; letter-spacing: -0.015em; text-transform: uppercase; color: #fff; text-shadow: 0 2px 12px rgba(0,0,0,0.85); width: 100%; text-align: center; overflow-wrap: break-word; }
.fc-desc { width: 100%; text-align: center; }
.fc-desc { font-size: clamp(7px, 3.2cqw, 10px); font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: rgba(255,255,255,0.72); }

/* Holographic foil + cursor glare across the whole card */
.fc-holo {
  position: absolute; inset: 0; z-index: 5; pointer-events: none; mix-blend-mode: color-dodge;
  background-image: repeating-linear-gradient(110deg, rgba(255,0,128,0.5) 0%, rgba(255,214,0,0.5) 9%, rgba(0,255,170,0.5) 18%, rgba(0,196,255,0.5) 27%, rgba(176,0,255,0.5) 36%, rgba(255,0,128,0.5) 45%);
  background-size: 300% 300%;
  background-position: calc(var(--badge-mx, 50%) * 1.4) calc(var(--badge-my, 50%) * 1.4);
  filter: saturate(1.4) brightness(1.05);
  opacity: calc(0.05 + var(--badge-light, 0) * 0.35);
  transition: opacity 0.2s var(--ease);
}
.fc-glare {
  position: absolute; inset: 0; z-index: 6; pointer-events: none; mix-blend-mode: overlay;
  background: radial-gradient(circle at var(--badge-mx, 50%) var(--badge-my, 50%), rgba(255,255,255,0.5), transparent 44%);
  opacity: calc(0.12 + var(--badge-light, 0) * 0.5); transition: opacity 0.2s var(--ease);
}
/* Gemby blue + white double-line frame — equal, thick bands */
.fc-rim {
  position: absolute; inset: 0; z-index: 7; pointer-events: none; border-radius: inherit;
  border: 4px solid #ffffff;
  box-shadow:
    inset 0 0 0 4px var(--fc-blue),
    inset 0 0 22px rgba(31,61,242,0.4),
    0 0 22px -3px rgba(31,61,242,0.75);
}

@media (prefers-reduced-motion: reduce) { .feedback-badge-card { transform: none; } }

/* Earned badge inside the profile founding-feedback panel */
.feedback-status-panel .feedback-badge-card { max-width: 190px; margin-top: var(--sp-4); }

/* Founding Feedback Gem — preview modal */
.card-modal.gem .card-modal-panel { width: min(720px, calc(100vw - 32px)); padding: clamp(24px, 4vw, 40px); transform-origin: 50% 50%; animation: cinema-flip 0.5s cubic-bezier(0.2, 0.8, 0.2, 1); }
.card-modal.gem .card-modal-backdrop { animation: cinema-fade 0.4s var(--ease); }
.card-modal.gem .fbm-stage .feedback-badge-card { animation: cinema-card 0.72s cubic-bezier(0.2, 0.8, 0.2, 1); }
.feedback-badge-modal { --fc-accent: var(--blue); display: grid; grid-template-columns: minmax(190px, 244px) 1fr; gap: clamp(22px, 4vw, 40px); align-items: center; }
.fbm-stage { width: 100%; display: grid; place-items: center; }
.fbm-stage .feedback-badge-card { width: 100%; }
.fbm-info { display: grid; gap: var(--sp-3); align-content: center; }
.fbm-kicker { display: inline-flex; align-self: start; align-items: center; padding: 5px 12px; border-radius: var(--r-pill); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: color-mix(in srgb, var(--fc-accent) 72%, var(--ink)); background: color-mix(in srgb, var(--fc-accent) 16%, var(--surface)); border: 1px solid color-mix(in srgb, var(--fc-accent) 40%, var(--line)); }
.fbm-info h2 { font-size: var(--t-2xl); font-weight: 800; letter-spacing: -0.025em; line-height: 1.05; }
.fbm-lead { font-size: var(--t-sm); color: var(--muted); line-height: 1.55; max-width: 42ch; }
.fbm-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-2); margin-top: var(--sp-1); }
.fbm-stat { display: grid; gap: 2px; padding: var(--sp-3); background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md); }
.fbm-stat:last-child { grid-column: 1 / -1; }
.fbm-stat span { font-size: 0.6rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--faint); }
.fbm-stat strong { font-family: var(--display); font-size: var(--t-base); font-weight: 800; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.fbm-perks { margin-top: var(--sp-1); }
.fbm-perks h3 { font-size: var(--t-sm); font-weight: 700; color: var(--ink); margin-bottom: var(--sp-2); }
.fbm-perks ul { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.fbm-perks li { position: relative; padding-left: 24px; font-size: var(--t-sm); color: var(--ink-2); line-height: 1.4; }
.fbm-perks li::before { content: ""; position: absolute; left: 0; top: 2px; width: 16px; height: 16px; border-radius: 50%; background: color-mix(in srgb, var(--fc-accent) 18%, var(--surface)) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l4.5 4.5L19 7'/%3E%3C/svg%3E") center / 10px no-repeat; }
@media (max-width: 600px) { .feedback-badge-modal { grid-template-columns: 1fr; gap: var(--sp-5); } .fbm-stage { max-width: 220px; margin: 0 auto; } .fbm-info { text-align: left; } }

/* ============================================================================
   Accessibility, 404 page, and cookie consent
   ========================================================================== */
.skip-link { position: absolute; left: 12px; top: -48px; z-index: 500; padding: 10px 16px; border-radius: var(--r-md); background: var(--blue); color: #fff; font-weight: 600; font-size: var(--t-sm); transition: top 0.18s var(--ease); }
.skip-link:focus { top: 12px; outline: 2px solid #fff; outline-offset: 2px; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
#main-content:focus { outline: none; }

.not-found-page { display: grid; justify-items: center; text-align: center; gap: var(--sp-3); padding: clamp(48px, 12vw, 120px) var(--sp-6); }
.not-found-mark { font-size: clamp(48px, 12vw, 88px); line-height: 1; color: var(--blue); }
.not-found-page h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); font-weight: 800; letter-spacing: -0.03em; }
.not-found-page p { font-size: var(--t-base); color: var(--muted); max-width: 46ch; line-height: 1.6; }
.not-found-actions { display: flex; gap: var(--sp-3); flex-wrap: wrap; justify-content: center; margin-top: var(--sp-3); }

.cookie-consent { position: fixed; left: 50%; bottom: 16px; transform: translate(-50%, 24px); z-index: 400; width: min(680px, calc(100vw - 24px)); opacity: 0; pointer-events: none; transition: opacity 0.26s var(--ease), transform 0.26s var(--ease); }
/* Offline state banner (top of the viewport, above everything incl. the app header) */
.offline-banner { position: fixed; top: 0; left: 0; right: 0; z-index: 5000; padding: calc(8px + env(safe-area-inset-top, 0px)) 16px 8px; background: var(--ink); color: var(--surface); font-size: 13px; font-weight: 600; text-align: center; line-height: 1.4; transform: translateY(-100%); transition: transform 0.26s var(--ease); }
.offline-banner.visible { transform: translateY(0); }
/* New-version prompt for resumed PWA sessions */
.update-banner { position: fixed; left: 50%; bottom: calc(84px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 16px); z-index: 5000; padding: 12px 20px; border: none; border-radius: var(--r-pill); background: var(--blue); color: #fff; font: inherit; font-size: var(--t-sm); font-weight: 700; box-shadow: var(--sh-lg); cursor: pointer; opacity: 0; transition: opacity .25s var(--ease), transform .25s var(--ease); }
.update-banner.visible { opacity: 1; transform: translate(-50%, 0); }
.cookie-consent.visible { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.cookie-consent-inner { display: flex; align-items: center; gap: var(--sp-4); flex-wrap: wrap; justify-content: space-between; padding: var(--sp-4) var(--sp-5); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-lg); }
.cookie-consent-inner p { font-size: var(--t-sm); color: var(--ink-2); line-height: 1.5; flex: 1 1 320px; margin: 0; }
.cookie-consent-actions { display: flex; align-items: center; gap: var(--sp-3); flex: none; }
.cookie-consent-link { font-size: var(--t-sm); font-weight: 600; color: var(--blue); }
.cookie-consent-actions .primary-button { min-height: 40px; }
@media (max-width: 560px) {
  .cookie-consent { left: 8px; right: 8px; bottom: 8px; width: auto; transform: translateY(20px); }
  .cookie-consent.visible { transform: translateY(0); }
  .cookie-consent-inner { flex-direction: row; align-items: center; gap: var(--sp-3); padding: var(--sp-3) var(--sp-4); }
  .cookie-consent-inner p { font-size: 0.78rem; line-height: 1.4; flex: 1 1 auto; }
  .cookie-consent-actions { flex: none; gap: var(--sp-2); }
  .cookie-consent-link { display: none; }
  .cookie-consent-actions .primary-button { min-height: 36px; padding: 0 var(--sp-4); }
}

/* ============================================================================
   Home FAQ — trust / objection handling
   ========================================================================== */
.gem-faq { margin: 0 0 clamp(42px, 7vw, 74px); }
.gem-faq-head { text-align: center; display: grid; gap: var(--sp-2); margin-bottom: var(--sp-8); }
.gem-faq-head .kicker { justify-self: center; }
.gem-faq-head h2 { font-family: var(--display); font-size: clamp(1.6rem, 3.2vw, 2.4rem); font-weight: 800; letter-spacing: -0.03em; }
.gem-faq-list { max-width: 760px; margin: 0 auto; display: grid; gap: var(--sp-3); }
.gem-faq-item { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); transition: border-color var(--dur) var(--ease); }
.gem-faq-item[open] { border-color: color-mix(in srgb, var(--blue) 30%, var(--line)); }
.gem-faq-item summary { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); padding: var(--sp-5); cursor: pointer; font-weight: 600; font-size: var(--t-base); list-style: none; }
.gem-faq-item summary::-webkit-details-marker { display: none; }
.gem-faq-mark { position: relative; flex: none; width: 18px; height: 18px; }
.gem-faq-mark::before, .gem-faq-mark::after { content: ""; position: absolute; background: var(--blue); border-radius: 2px; transition: transform var(--dur) var(--ease); }
.gem-faq-mark::before { left: 0; right: 0; top: 8px; height: 2px; }
.gem-faq-mark::after { top: 0; bottom: 0; left: 8px; width: 2px; }
.gem-faq-item[open] .gem-faq-mark::after { transform: scaleY(0); }
.gem-faq-item p { padding: 0 var(--sp-5) var(--sp-5); margin: 0; color: var(--muted); line-height: 1.6; font-size: var(--t-sm); }

/* ============================================================================
   Founding Feedback Gem — full-screen examine view (tap card in preview)
   ========================================================================== */
.gem-fullscreen { position: fixed; inset: 0; z-index: 600; display: grid; place-items: center; padding: clamp(16px, 4vh, 48px); background: rgba(5,6,13,0.86); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); opacity: 0; transition: opacity 0.24s var(--ease); }
.gem-fullscreen.visible { opacity: 1; }
.gem-fullscreen-stage { width: min(80vw, calc(82dvh * 5 / 7), 560px); height: auto; aspect-ratio: 5 / 7; }
.gem-fullscreen-stage .feedback-badge-card { width: 100%; height: 100%; cursor: default; animation: cinema-flip 0.42s cubic-bezier(0.2, 0.8, 0.2, 1); }
.gem-fullscreen-close { position: fixed; top: 16px; right: 16px; z-index: 10; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,0.18); border: 1px solid rgba(255,255,255,0.4); color: #fff; font-size: 26px; line-height: 1; cursor: pointer; -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); transition: background 0.18s var(--ease); }
.gem-fullscreen-close:hover { background: rgba(255,255,255,0.26); }
@media (prefers-reduced-motion: reduce) { .gem-fullscreen-stage .feedback-badge-card { animation: none; } }

/* ============================================================================
   Feedback Admin (God Mode) — consistent with account/panel styling
   ========================================================================== */
.admin-feedback-page { display: grid; gap: var(--sp-5); }
.admin-header { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--sp-4); flex-wrap: wrap; max-width: none; }
.admin-header .ghost-button { flex: none; }
.admin-user-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: var(--sp-4); }
.admin-user-card { display: grid; gap: var(--sp-4); align-content: start; }
.admin-user-head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); }
.admin-user-id { display: grid; gap: 2px; min-width: 0; }
.admin-user-id strong { font-size: var(--t-base); font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-user-id span { font-size: var(--t-sm); color: var(--muted); }
.admin-fb-list, .admin-general-list { display: grid; gap: var(--sp-2); }
.admin-fb-item { display: grid; gap: 4px; padding: var(--sp-3) var(--sp-4); background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md); }
.admin-fb-top { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-3); }
.admin-fb-top strong { font-size: var(--t-sm); font-weight: 700; text-transform: capitalize; }
.admin-fb-top span { font-size: var(--t-mono); color: var(--faint); white-space: nowrap; }
.admin-fb-item p { font-size: var(--t-sm); color: var(--ink-2); line-height: 1.5; margin: 0; }
.admin-fb-meta { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); font-size: var(--t-mono); color: var(--muted); }
.admin-fb-meta a { color: var(--blue); font-weight: 600; }
.admin-actions { display: flex; gap: var(--sp-2); flex-wrap: wrap; }
.admin-actions .primary-button, .admin-actions .ghost-button { min-height: 40px; }

/* ============================================================================
   Mobile app shell — bottom tab bar, app top bar, safe areas (PWA)
   Desktop (>820px) keeps the existing top navigation; the tab bar is hidden.
   ========================================================================== */
.tab-bar { display: none; }

/* Portrait-only guard: inside the installed app, a phone held in landscape gets a
   full-screen "rotate to portrait" cover so the layout (and the fixed footer) never
   renders sideways. max-height keeps this off tablets/desktop in landscape. */
.rotate-guard { display: none; }
@media (orientation: landscape) and (max-height: 600px) {
  body.is-app .rotate-guard {
    display: flex; position: fixed; inset: 0; z-index: 9500;
    align-items: center; justify-content: center; text-align: center;
    padding: 24px; background: var(--paper); color: var(--ink);
  }
  body.is-app .rotate-guard-card { display: grid; justify-items: center; gap: 10px; max-width: 320px; }
  body.is-app .rotate-guard-icon { width: 52px; height: 52px; color: var(--blue); }
  body.is-app .rotate-guard strong { font-family: var(--display, inherit); font-size: 1.15rem; font-weight: 800; }
  body.is-app .rotate-guard span { color: var(--muted); font-size: 0.9rem; }
}

/* App chrome (bottom tabs, hidden website chrome) applies ONLY inside the
   installed PWA (body.is-app). Plain browser tabs keep the website design. */
@media (max-width: 820px) {
  body.is-app .tab-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
    background: color-mix(in srgb, #ffffff 90%, transparent);
    -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
    border-top: 1px solid var(--line);
    padding: 11px 6px calc(22px + env(safe-area-inset-bottom));
    box-shadow: 0 -8px 28px rgba(22, 24, 29, 0.07);
  }
  body.is-app .tab-item {
    appearance: none; -webkit-appearance: none; background: none; border: 0; cursor: pointer;
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    padding: 6px 2px; min-height: 48px; border-radius: var(--r-md);
    color: var(--muted); font: inherit;
    transition: color 0.18s var(--ease), transform 0.14s var(--ease);
  }
  body.is-app .tab-item svg {
    width: 24px; height: 24px; fill: none; stroke: currentColor;
    stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
  }
  body.is-app .tab-label { font-size: 11px; font-weight: 600; letter-spacing: 0.005em; }
  body.is-app .tab-item:active { transform: scale(0.93); }
  body.is-app .tab-item.active { color: var(--blue); }
  body.is-app .tab-item.active svg { stroke-width: 2.1; }

  /* Top app bar: brand left, account right. Tabs replace the hamburger menu. */
  body.is-app .sidebar { padding-top: calc(var(--sp-5) + env(safe-area-inset-top)); }
  body.is-app .sidebar .nav-toggle { display: none !important; }
  body.is-app .sidebar .nav { display: none !important; }
  body.is-app .sidebar .brand { position: static !important; transform: none !important; left: auto; top: auto; }

  /* App context: drop website chrome */
  body.is-app .sponsor-strip, body.is-app .partner-banner-slot { display: none !important; }
  body.is-app .site-footer { display: none !important; }

  /* Clear the fixed tab bar at the bottom of every page */
  body.is-app .main { padding-bottom: calc(90px + env(safe-area-inset-bottom)) !important; }
  body.is-app[data-view="dashboard"] .main { padding-top: var(--sp-4); }
}
.tab-item svg { width: 27px; height: 27px; }

/* ============================================================================
   App home — compact, photo-forward, app-native (≤820px)
   Tightens the marketing-heavy home into a focused app surface.
   ========================================================================== */
@media (max-width: 820px) {
  body.is-app .tab-item.active svg { stroke-width: 2.2; }
  body.is-app .tab-label { font-size: 11.5px; }

  /* Compact hero — was a full marketing hero; now a tight app intro */
  body.is-app[data-view="dashboard"] .gem-hero.brand-hero { padding: var(--sp-7) var(--sp-5) var(--sp-8); border-radius: var(--r-xl); margin-bottom: var(--sp-10); }
  body.is-app .brand-hero .edito-title { font-size: clamp(1.9rem, 8.4vw, 2.5rem) !important; line-height: 1.02; margin-bottom: var(--sp-4); }
  body.is-app[data-view="dashboard"] .gem-hero .lead { font-size: var(--t-base); line-height: 1.5; margin-bottom: var(--sp-5); }
  body.is-app[data-view="dashboard"] .logo-eyebrow { font-size: 0.62rem; margin-bottom: var(--sp-3); }
  body.is-app .gem-hero-actions { gap: var(--sp-3); }
  body.is-app .gem-hero-actions .hero-cta, body.is-app .gem-hero-actions .ghost-button { width: 100%; justify-content: center; }

  /* Tighter rhythm between sections */
  body.is-app .home-rail, body.is-app .gem-how, body.is-app .gem-why, body.is-app .premium-showcase, body.is-app .gem-cta { margin-bottom: var(--sp-12) !important; }
  body.is-app .section-head, body.is-app .rail-head, body.is-app .premium-head { margin-bottom: var(--sp-4); }
  body.is-app .section-head h2, body.is-app .rail-head h2, body.is-app .premium-head h2 { font-size: var(--t-lg); }

  /* Cards: smaller footprint, photo-forward */
  body.is-app .card-rail { grid-auto-columns: clamp(150px, 45vw, 172px); gap: var(--sp-3); }
  body.is-app .mcard.slab { gap: 5px; padding: 5px; border-radius: 13px; }
  body.is-app .slab-window { aspect-ratio: 3 / 4; border-radius: 9px; }
  body.is-app .slab-label { padding: 6px 9px; gap: 8px; border-width: 1.25px; border-radius: 8px; }
  body.is-app .slab-title { font-size: 0.74rem; -webkit-line-clamp: 1; line-height: 1.2; }
  body.is-app .slab-grade { padding-left: 7px; }
  body.is-app .slab-grade-desc { font-size: 0.48rem; }
  body.is-app .slab-grade .score .stars { font-size: 0.82rem; letter-spacing: 1px; }
  body.is-app .slab-foot { padding: 2px 6px 4px; gap: 3px; }
  body.is-app .slab .mcard-price b { font-size: var(--t-base); }
  body.is-app .slab .seller-row { font-size: 0.72rem; }
  body.is-app .lt-badge { font-size: 9px; padding: 2px 6px; }

  /* Trending Grails — 3 across, compact */
  body.is-app .premium-card-grid { grid-template-columns: repeat(3, 1fr) !important; gap: 8px; }
  body.is-app .premium-card { border-radius: var(--r-lg); }
  body.is-app .premium-card-frame { padding: 12px 8px 16px; }
  body.is-app .premium-card-frame img { max-width: 92%; box-shadow: 0 10px 22px rgba(5,12,50,0.28); }
  body.is-app .premium-card-frame::before, body.is-app .premium-card-frame::after { display: none; }
  body.is-app .premium-card-tag { top: 6px; left: 6px; padding: 3px 7px; font-size: 0.5rem; }
  body.is-app .premium-card-info { padding: 8px 8px 10px; gap: 5px; }
  body.is-app .premium-card-info h3 { font-size: 0.72rem; line-height: 1.2; -webkit-line-clamp: 2; display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
  body.is-app .premium-card-chips { display: none; }

  /* How it works — compact */
  body.is-app .gem-sec-head { margin-bottom: var(--sp-6); }
  body.is-app .gem-sec-head h2 { font-size: var(--t-xl); }
  body.is-app .gem-steps { gap: var(--sp-3); }
  body.is-app .gem-step { padding: var(--sp-4) !important; }
  body.is-app .gem-step h3 { font-size: var(--t-base); }
  body.is-app .gem-step p { font-size: var(--t-sm); line-height: 1.5; }

  /* Why Gemby — compact 2-up */
  body.is-app .gem-feature-grid { grid-template-columns: repeat(2, 1fr) !important; gap: var(--sp-3); }
  body.is-app .gem-feature-grid .gem-feature { padding: var(--sp-4) !important; }

  /* Final CTA — compact */
  body.is-app .gem-cta-box { padding: var(--sp-8) var(--sp-5) !important; }
  body.is-app .gem-cta-box h2 { font-size: var(--t-2xl) !important; }
  body.is-app .gem-cta-box p { font-size: var(--t-sm); }
}

/* FAQ relocated into the Profile/Settings page — compact accordion */
.faq-panel .gem-faq-list.compact { display: grid; gap: 2px; }
.faq-panel .gem-faq-item { border-bottom: 1px solid var(--line); }
.faq-panel .gem-faq-item summary { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); padding: var(--sp-3) 0; cursor: pointer; font-weight: 600; font-size: var(--t-sm); list-style: none; }
.faq-panel .gem-faq-item summary::-webkit-details-marker { display: none; }
.faq-panel .gem-faq-item .gem-faq-mark { flex: none; width: 16px; height: 16px; position: relative; }
.faq-panel .gem-faq-item .gem-faq-mark::before, .faq-panel .gem-faq-item .gem-faq-mark::after { content: ""; position: absolute; background: var(--blue); border-radius: 2px; transition: transform 0.2s var(--ease); }
.faq-panel .gem-faq-item .gem-faq-mark::before { top: 7px; left: 2px; right: 2px; height: 2px; }
.faq-panel .gem-faq-item .gem-faq-mark::after { left: 7px; top: 2px; bottom: 2px; width: 2px; }
.faq-panel .gem-faq-item[open] .gem-faq-mark::after { transform: scaleY(0); }
.faq-panel .gem-faq-item p { padding: 0 0 var(--sp-3); margin: 0; font-size: var(--t-sm); color: var(--ink-2); line-height: 1.55; }

/* ============================================================================
   Signed-in app dashboard ("Your gem desk") — data-forward, compact, app-native
   ========================================================================== */
.app-home { display: grid; gap: var(--sp-7); max-width: 760px; margin: 0 auto; }
.ah-head { display: grid; gap: 2px; }
.ah-greeting { font-family: var(--font-text); font-size: var(--t-sm); font-weight: 500; color: var(--muted); }
.ah-title { font-family: var(--display); font-size: var(--t-3xl); font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; }

/* Status stats */
.ah-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-3); }
.ah-stat { display: grid; gap: 2px; justify-items: center; text-align: center; padding: var(--sp-4) var(--sp-2); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.ah-stat-num { font-family: var(--display); font-size: var(--t-2xl); font-weight: 800; color: var(--blue); line-height: 1; font-variant-numeric: tabular-nums; }
.ah-stat-label { font-family: var(--font-text); font-size: 0.7rem; font-weight: 600; color: var(--muted); letter-spacing: 0.01em; }

/* Primary action */
.ah-cta { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); width: 100%; text-align: left; cursor: pointer; padding: var(--sp-4) var(--sp-5); border: 0; border-radius: var(--r-lg); background: linear-gradient(135deg, var(--blue) 0%, var(--blue-700) 100%); color: #fff; box-shadow: 0 10px 26px rgba(31,61,240,0.28); transition: transform 0.14s var(--ease), box-shadow 0.2s var(--ease); }
.ah-cta:active { transform: scale(0.985); }
.ah-cta-text { display: grid; gap: 1px; }
.ah-cta-text strong { font-family: var(--display); font-size: var(--t-lg); font-weight: 700; }
.ah-cta-text small { font-family: var(--font-text); font-size: var(--t-sm); color: rgba(255,255,255,0.82); }
.ah-cta-icon { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,0.18); }
.ah-cta-icon svg { width: 22px; height: 22px; }

/* Sections */
.ah-section { display: grid; gap: var(--sp-3); }
.ah-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-3); }
.ah-section-head h2 { font-family: var(--display); font-size: var(--t-lg); font-weight: 700; letter-spacing: -0.02em; }
.ah-link { appearance: none; background: none; border: 0; cursor: pointer; font-family: var(--font-text); font-size: var(--t-sm); font-weight: 600; color: var(--blue); padding: 4px; }

/* Gem rows */
.ah-gem-list { display: grid; gap: var(--sp-2); }
.ah-gem { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-2); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); cursor: pointer; transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease), transform 0.14s var(--ease); }
.ah-gem:active { transform: scale(0.99); }
.ah-gem:hover { border-color: color-mix(in srgb, var(--blue) 32%, var(--line)); box-shadow: var(--sh-sm); }
.ah-gem-media { position: relative; flex: none; width: 58px; aspect-ratio: 3 / 4; border-radius: 8px; overflow: hidden; background: radial-gradient(120% 90% at 50% 0%, #fff 0%, #eceae3 100%); border: 1px solid var(--line); }
.ah-gem-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ah-gem-lt { position: absolute; top: 3px; left: 3px; padding: 1px 5px; border-radius: var(--r-pill); font-family: var(--font-text); font-size: 8px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; color: #fff; }
.ah-gem-lt.bin { background: var(--blue); }
.ah-gem-lt.auction { background: var(--ink); color: var(--surface); }
.ah-gem-body { flex: 1 1 auto; min-width: 0; display: grid; gap: 4px; }
.ah-gem-title { font-family: var(--font-text); font-size: var(--t-sm); font-weight: 600; line-height: 1.3; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ah-gem-sub { display: flex; align-items: center; gap: var(--sp-2); min-width: 0; }
.ah-gem-sub .score .stars { font-size: 0.82rem; letter-spacing: 1px; }
.ah-gem-from { font-family: var(--font-text); font-size: 0.72rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ah-gem-end { flex: none; display: flex; align-items: center; gap: 4px; padding-right: 2px; }
.ah-gem-price { font-family: var(--display); font-size: var(--t-base); font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.ah-gem-go { display: grid; place-items: center; color: var(--faint, var(--muted)); }
.ah-gem-go svg { width: 18px; height: 18px; }

/* Search rows */
.ah-search-list { display: grid; gap: var(--sp-2); }
.ah-search { display: flex; align-items: center; gap: var(--sp-3); width: 100%; text-align: left; cursor: pointer; padding: var(--sp-3) var(--sp-4); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); transition: border-color 0.18s var(--ease), transform 0.14s var(--ease); }
.ah-search:active { transform: scale(0.99); }
.ah-search:hover { border-color: color-mix(in srgb, var(--blue) 32%, var(--line)); }
.ah-search-dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--muted); }
.ah-search-dot.high { background: var(--blue); }
.ah-search-dot.medium { background: #e0a106; }
.ah-search-dot.low { background: var(--line); border: 1px solid var(--muted); }
.ah-search-text { flex: 1 1 auto; min-width: 0; display: grid; gap: 1px; }
.ah-search-name { font-family: var(--font-text); font-size: var(--t-sm); font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ah-search-meta { font-family: var(--font-text); font-size: 0.72rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ah-search-go { flex: none; color: var(--muted); display: grid; place-items: center; }
.ah-search-go svg { width: 18px; height: 18px; }

/* Empty states */
.ah-empty { display: grid; justify-items: center; text-align: center; gap: var(--sp-3); padding: var(--sp-8) var(--sp-5); background: var(--surface); border: 1px dashed var(--line); border-radius: var(--r-xl); }
.ah-empty.compact { padding: var(--sp-5); }
.ah-empty-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--blue-tint); color: var(--blue); }
.ah-empty-icon svg { width: 24px; height: 24px; }
.ah-empty strong { font-family: var(--display); font-size: var(--t-lg); font-weight: 700; }
.ah-empty p { font-family: var(--font-text); font-size: var(--t-sm); color: var(--ink-2); max-width: 42ch; line-height: 1.5; margin: 0; }
.ah-empty .primary-button { margin-top: var(--sp-1); }

/* ============================================================================
   App home v2 (signed-in) + Trending Grails gallery — final redesign
   ========================================================================== */
.app-home { display: grid; gap: var(--sp-5); max-width: 560px; margin: 0 auto; }
.ah-top { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); }
.ah-greeting { font-size: var(--t-sm); font-weight: 500; color: var(--muted); }
.app-home .ah-title { font-family: var(--display); font-size: var(--t-2xl); font-weight: 800; letter-spacing: -0.025em; line-height: 1.05; }
.ah-avatar { flex: none; width: 42px; height: 42px; border-radius: 50%; background: var(--blue-tint); color: var(--blue); display: grid; place-items: center; font-weight: 700; box-shadow: var(--sh-sm); }

.ah-live { position: relative; display: flex; align-items: center; gap: var(--sp-2); padding: 10px 13px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.ah-live-dot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--blue); animation: gm-pulse 1.9s ease-out infinite; }
.ah-live-text { font-size: var(--t-sm); color: var(--muted); }
.ah-live-text b { color: var(--ink); font-weight: 700; }
.ah-live-track { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: color-mix(in srgb, var(--blue) 12%, transparent); overflow: hidden; }
.ah-live-track::after { content: ""; position: absolute; top: 0; left: -40%; width: 40%; height: 100%; background: linear-gradient(90deg, transparent, var(--blue), transparent); animation: gm-scan 2.4s linear infinite; }

.ah-chips { display: flex; gap: 7px; overflow-x: auto; scrollbar-width: none; }
.ah-chips::-webkit-scrollbar { display: none; }
.ah-chip { flex: none; appearance: none; cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--muted); background: var(--surface); border: 1px solid var(--line); padding: 7px 13px; border-radius: var(--r-pill); transition: background .18s var(--ease), color .18s var(--ease); }
.ah-chip.on { background: var(--ink); color: var(--surface); border-color: var(--ink); }

.ah-grails { position: relative; display: flex; align-items: center; gap: var(--sp-3); width: 100%; text-align: left; cursor: pointer; padding: 13px 14px; border: 0; border-radius: var(--r-lg); overflow: hidden; background: #1f3df0; color: #fff; box-shadow: 0 10px 26px rgba(31,61,240,.30); transition: transform .14s var(--ease); }
.ah-grails:active { transform: scale(.99); }
.ah-grails-glow { position: absolute; right: -30px; top: -42px; width: 150px; height: 150px; border-radius: 50%; background: radial-gradient(circle, rgba(91,123,255,.5), transparent 70%); pointer-events: none; }
.ah-grails-img { width: 52px; height: 70px; border-radius: 9px; object-fit: cover; flex: none; box-shadow: 0 8px 20px rgba(0,0,0,.4); animation: gm-float 5.5s ease-in-out infinite; }
.ah-grails-text { position: relative; z-index: 1; display: grid; gap: 2px; }
.ah-grails-kicker { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #d9ff00; }
.ah-grails-copy { font-family: var(--display); font-size: var(--t-base); font-weight: 700; line-height: 1.2; }
.ah-grails-cta { display: inline-flex; align-items: center; gap: 5px; margin-top: 5px; font-size: 11.5px; font-weight: 700; color: #fff; }
.ah-grails-cta svg { width: 14px; height: 14px; }

.ah-newhead { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-3); margin-top: var(--sp-1); }
/* The favorites head + its cards live in one grid cell (#ah-fav-section), so add explicit
   breathing room between the "View all" row and the cards below it. */
#ah-fav-section .ah-newhead { margin-bottom: var(--sp-3); }
.ah-newhead h2 { font-family: var(--display); font-size: var(--t-lg); font-weight: 700; letter-spacing: -0.02em; }
.ah-link { appearance: none; background: none; border: 0; cursor: pointer; font-size: var(--t-sm); font-weight: 600; color: var(--blue); padding: 4px; }

.ag-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 11px; }
.ag-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; cursor: pointer; box-shadow: var(--sh-sm); opacity: 0; animation: ag-rise .5s both; transition: transform .14s var(--ease), border-color .18s var(--ease), box-shadow .18s var(--ease); }
.ag-card:active { transform: scale(.99); }
.ag-card:hover { border-color: color-mix(in srgb, var(--blue) 30%, var(--line)); box-shadow: var(--sh-md); }
.ag-grid .ag-card:nth-child(1){animation-delay:.06s}.ag-grid .ag-card:nth-child(2){animation-delay:.12s}.ag-grid .ag-card:nth-child(3){animation-delay:.18s}.ag-grid .ag-card:nth-child(4){animation-delay:.24s}.ag-grid .ag-card:nth-child(5){animation-delay:.30s}.ag-grid .ag-card:nth-child(6){animation-delay:.36s}.ag-grid .ag-card:nth-child(7){animation-delay:.42s}.ag-grid .ag-card:nth-child(8){animation-delay:.48s}
.ag-media { position: relative; height: 116px; background: linear-gradient(180deg,#fff,var(--paper)); display: grid; place-items: center; overflow: hidden; }
.ag-media img { height: 90%; width: auto; max-width: 92%; object-fit: contain; }
/* Found Gems on the web: a compact square photo area with the FULL photo visible (contain),
   like eBay's listing thumbnails. */
body:not(.is-app) #matches .ag-media { height: auto; aspect-ratio: 1 / 1; background: #f3f4f6; padding: 8px; }
body:not(.is-app) #matches .ag-media img { box-sizing: border-box; width: 100%; height: 100%; max-width: 100%; object-fit: contain; padding: 0; }
.ag-lt { position: absolute; top: 7px; left: 7px; font-size: 8px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: #fff; padding: 2px 6px; border-radius: var(--r-pill); }
.ag-lt.bin { background: var(--blue); }
.ag-lt.auction { background: var(--ink); color: var(--surface); }
.ag-body { padding: 9px 10px 10px; }
.ag-label { font-size: 9.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--blue); }
.ag-title { font-size: 12.5px; line-height: 1.28; font-weight: 600; color: var(--ink); margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; min-height: 32px; }
.ag-stars { display: inline-flex; margin: 5px 0 6px; }
.ag-stars b { font-family: var(--display); font-weight: 700; color: var(--blue); letter-spacing: 1px; line-height: 1; display: inline-block; }
.ag-stars b.o { color: #d3d7de; }
.ag-stars.anim b { opacity: 0; animation: ag-pop .42s both; }
.ag-stars.anim b:nth-child(1){animation-delay:.30s}.ag-stars.anim b:nth-child(2){animation-delay:.36s}.ag-stars.anim b:nth-child(3){animation-delay:.42s}.ag-stars.anim b:nth-child(4){animation-delay:.48s}.ag-stars.anim b:nth-child(5){animation-delay:.54s}
.ag-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.ag-price { font-family: var(--display); font-size: 15.5px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.ag-deal { font-size: 10px; font-weight: 700; color: #0f7a4d; background: #e8f6ee; padding: 2px 6px; border-radius: var(--r-pill); }

/* Trending Grails gallery — Gemby-blue immersive page */
#grails .grails-page { background: var(--blue); color: #fff; border-radius: var(--r-xl); margin: 0 0 var(--sp-4); padding: var(--sp-3) 0 var(--sp-8); min-height: 76dvh; position: relative; overflow: hidden; }
.grails-head { display: flex; align-items: center; justify-content: space-between; padding: var(--sp-2) var(--sp-4) var(--sp-1); position: relative; z-index: 2; }
.grails-back { appearance: none; background: rgba(255,255,255,.14); border: 0; color: #fff; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; }
.grails-back svg { width: 20px; height: 20px; }
.grails-htitle { font-family: var(--display); font-weight: 700; font-size: var(--t-base); }
.grails-flame { color: #ff6a1a; display: grid; place-items: center; }
.grails-flame svg { width: 20px; height: 20px; }
.grails-stage { position: relative; display: flex; flex-direction: column; align-items: center; padding: var(--sp-4) 0 0; }
.grails-spot { position: absolute; top: 0; width: 240px; height: 240px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.34), transparent 62%); pointer-events: none; }
.grail-hero { position: relative; width: 168px; height: 228px; border-radius: var(--r-lg); overflow: hidden; z-index: 1; box-shadow: 0 26px 55px rgba(7,18,80,.5), 0 0 0 1px rgba(255,255,255,.25); animation: gm-wob 6.5s ease-in-out infinite; }
.grail-hero img { width: 100%; height: 100%; object-fit: cover; }
.grail-glare { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(115deg, transparent 36%, rgba(255,255,255,.55) 50%, transparent 62%); transform: translateX(-130%); animation: gm-sweep 3.6s ease-in-out infinite; }
.grail-reflect { width: 168px; height: 52px; margin-top: 3px; border-radius: var(--r-lg); overflow: hidden; opacity: .3; transform: scaleY(-1); -webkit-mask-image: linear-gradient(rgba(0,0,0,.85), transparent); mask-image: linear-gradient(rgba(0,0,0,.85), transparent); }
.grail-reflect img { width: 168px; height: 228px; object-fit: cover; }
.grail-info { text-align: center; padding: var(--sp-3) var(--sp-6) 0; position: relative; z-index: 1; }
.grail-kicker { font-size: 9px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.72); }
.grail-name { font-family: var(--display); font-size: var(--t-lg); font-weight: 700; line-height: 1.2; margin-top: 5px; }
.grail-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 9px; }
.grail-chips span { font-size: 10.5px; font-weight: 600; color: #fff; background: rgba(255,255,255,.14); padding: 3px 9px; border-radius: var(--r-pill); }
.grail-explore { display: inline-flex; align-items: center; gap: 7px; margin-top: 13px; cursor: pointer; background: #fff; color: var(--blue); font-weight: 700; font-size: var(--t-sm); border: 0; border-radius: var(--r-pill); padding: 11px 20px; }
.grail-explore svg { width: 15px; height: 15px; }
.grail-upnext-head { font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.7); padding: var(--sp-5) var(--sp-4) var(--sp-2); position: relative; z-index: 1; }
.grail-upnext { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; padding: 0 var(--sp-4) var(--sp-1); position: relative; z-index: 1; }
.grail-upnext::-webkit-scrollbar { display: none; }
.grail-mini { flex: none; width: 92px; border-radius: var(--r-md); overflow: hidden; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.22); cursor: pointer; }
.grail-mini-media { height: 104px; overflow: hidden; }
.grail-mini-media img { width: 100%; height: 100%; object-fit: cover; }
.grail-mini-name { font-size: 10px; font-weight: 600; color: #fff; padding: 6px 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

@keyframes ag-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes ag-pop { 0% { opacity: 0; transform: scale(.2); } 60% { opacity: 1; transform: scale(1.18); } 100% { opacity: 1; transform: scale(1); } }
@keyframes gm-scan { 0% { left: -40%; } 100% { left: 100%; } }
@keyframes gm-pulse { 0% { box-shadow: 0 0 0 0 rgba(31,61,240,.5); } 70% { box-shadow: 0 0 0 7px rgba(31,61,240,0); } 100% { box-shadow: 0 0 0 0 rgba(31,61,240,0); } }
@keyframes gm-float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes gm-sweep { 0% { transform: translateX(-130%); } 55%,100% { transform: translateX(130%); } }
@keyframes gm-wob { 0%,100% { transform: perspective(820px) rotateY(-7deg) translateY(0); } 50% { transform: perspective(820px) rotateY(7deg) translateY(-8px); } }
@media (prefers-reduced-motion: reduce) {
  .ag-card { opacity: 1 !important; animation: none !important; }
  .ag-stars.anim b { opacity: 1 !important; animation: none !important; }
  .ah-live-track::after, .ah-grails-img, .grail-hero, .grail-glare, .ah-live-dot { animation: none !important; }
}

/* ============================================================================
   Field direction — friendly header, search, vibrant featured banner, heart
   ========================================================================== */
.app-home.field { gap: var(--sp-4); }
.app-home.field .ah-greeting { font-size: var(--t-sm); }
.app-home.field .ah-title { font-size: var(--t-xl); }
.ah-avatar { overflow: hidden; }

/* Search bar */
.ah-srch { display: flex; align-items: center; gap: 10px; width: 100%; cursor: pointer; text-align: left; padding: 13px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 15px; box-shadow: var(--sh-sm); color: var(--faint); font: inherit; }
.ah-srch svg { width: 19px; height: 19px; flex: none; }
.ah-srch-ph { flex: 1; font-size: var(--t-sm); }
.ah-srch-filter { color: var(--blue); }

/* Vibrant featured "Top gem today" banner */
.ah-feat { position: relative; display: flex; align-items: center; gap: 15px; width: 100%; text-align: left; cursor: pointer; padding: 20px 18px; border: 0; border-radius: 18px; overflow: hidden; background: var(--blue); color: #fff; box-shadow: 0 14px 32px rgba(31,61,240,.30); transition: transform .14s var(--ease); }
.ah-feat:active { transform: scale(.99); }
.ah-feat::before { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 36%, rgba(255,255,255,.4) 50%, transparent 62%); transform: translateX(-130%); animation: gm-sweep 4s ease-in-out infinite; z-index: 1; }
.ah-feat-img { width: 74px; height: 100px; border-radius: 12px; object-fit: cover; flex: none; box-shadow: 0 8px 20px rgba(0,0,0,.3); position: relative; z-index: 2; animation: gm-kenburns 9s ease-in-out infinite alternate; }
.ah-feat-text { position: relative; z-index: 2; display: grid; gap: 4px; min-width: 0; }
.ah-feat-kicker { display: inline-flex; align-items: center; gap: 5px; font-size: 9px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #cdd9ff; }
.ah-feat-kicker svg { width: 11px; height: 11px; }
.ah-feat-title { font-family: var(--display); font-size: var(--t-base); font-weight: 700; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ah-feat-row { display: flex; align-items: center; gap: 8px; margin-top: 2px; }
.ah-feat-price { font-family: var(--display); font-size: var(--t-lg); font-weight: 800; }
.ah-feat-deal { font-size: 10px; font-weight: 700; color: #7ff0ad; background: rgba(127,233,180,.18); padding: 2px 7px; border-radius: var(--r-pill); }
.ah-feat-scan { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: rgba(255,255,255,.25); overflow: hidden; z-index: 2; }
.ah-feat-scan::after { content: ""; position: absolute; top: 0; left: -40%; width: 40%; height: 100%; background: linear-gradient(90deg, transparent, #fff, transparent); animation: gm-scan 2.4s linear infinite; }

/* Field cards: friendly rounding, heart, flat image backdrop */
.ag-card { border-radius: 16px; box-shadow: var(--sh); }
.ag-media { background: var(--soft) !important; height: 122px; }
.ag-heart { position: absolute; top: 7px; right: 7px; z-index: 2; width: 28px; height: 28px; border-radius: 50%; border: 0; cursor: pointer; background: rgba(255,255,255,.92); color: var(--faint); display: grid; place-items: center; box-shadow: var(--sh-sm); transition: transform .14s var(--ease), color .18s var(--ease); }
.ag-heart svg { width: 15px; height: 15px; }
.ag-heart.on { color: #e2495f; }
.ag-heart:active { transform: scale(.85); }
.ag-remove { position: absolute; top: 7px; right: 7px; z-index: 4; width: 28px; height: 28px; border-radius: 50%; border: 0; cursor: pointer; background: rgba(17, 19, 24, 0.55); color: #fff; display: grid; place-items: center; box-shadow: var(--sh-sm); transition: transform .14s var(--ease), color .18s var(--ease); }
.ag-remove svg { width: 14px; height: 14px; }
.ag-remove:hover { background: rgba(179, 38, 30, 0.85); color: #fff; }
.ag-media:has(.ag-remove) .ag-heart { right: 41px; }
.ag-remove:active { transform: scale(.85); }
:root { --sh: 0 4px 16px rgba(20,22,27,.06); }

@keyframes gm-kenburns { from { transform: scale(1); } to { transform: scale(1.06); } }

/* Execution fix: on mobile, signed-in app views use their own headers — drop the
   redundant brand top bar so there's no double header. */
@media (max-width: 820px) {
  /* In the installed app, hide all website chrome from the first paint so there
     is no boot flash of the footer/nav before the app hydrates. */
  body.is-app .sidebar { display: none; }
  body.is-app .site-footer,
  body.is-app .sponsor-strip,
  body.is-app .partner-banner-slot { display: none !important; }
  body.is-app .main { padding-top: calc(env(safe-area-inset-top) + var(--sp-3)); }
  body.is-app[data-view="grails"] .main { padding-top: 0; }
}

/* ============================================================================
   Home segmented control, Gem detail page, Grails drag-tilt + info modal
   ========================================================================== */
.ah-seg { display: flex; gap: 6px; background: var(--soft); border: 1px solid var(--line); border-radius: var(--r-pill); padding: 4px; }
.ah-seg-btn { flex: 1; appearance: none; border: 0; cursor: pointer; font: inherit; font-size: 13px; font-weight: 700; color: var(--muted); background: transparent; padding: 9px 10px; border-radius: var(--r-pill); transition: background .18s var(--ease), color .18s var(--ease); }
.ah-seg-btn.on { background: var(--surface); color: var(--ink); box-shadow: var(--sh-sm); }

.gem-page { display: grid; gap: var(--sp-4); max-width: 560px; margin: 0 auto; }
/* Polished entrance whenever the gem-detail page opens (card tap or push deep link):
   page rises/fades, the card image scales in, and the details lift in just behind it. */
.gem-page { animation: gemPageIn 0.42s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
@keyframes gemPageIn { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.gem-page .gem-page-media { animation: gemMediaIn 0.55s cubic-bezier(0.2, 0.7, 0.2, 1) both; transform-origin: center; }
@keyframes gemMediaIn { from { opacity: 0; transform: scale(0.94); } to { opacity: 1; transform: none; } }
.gem-page .gem-page-body { animation: gemBodyIn 0.5s var(--ease) both; animation-delay: 0.1s; }
@keyframes gemBodyIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .gem-page, .gem-page .gem-page-media, .gem-page .gem-page-body { animation: none; }
}
/* Desktop web: gem detail becomes two columns — sticky photo/gallery left, details right. */
@media (min-width: 821px) {
  body:not(.is-app) .gem-page {
    max-width: 960px;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: var(--sp-8);
    align-items: start;
  }
  body:not(.is-app) .gem-page-head { grid-column: 1 / -1; }
  body:not(.is-app) .gem-page-media { grid-column: 1; grid-row: 2; position: sticky; top: 96px; }
  body:not(.is-app) .gp-thumbs { grid-column: 1; grid-row: 3; }
  body:not(.is-app) .gem-page-body { grid-column: 2; grid-row: 2 / span 2; }
}
.gem-page-head { display: flex; align-items: center; justify-content: space-between; }
.gp-icon { width: 36px; height: 36px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line); display: grid; place-items: center; cursor: pointer; box-shadow: var(--sh-sm); color: var(--ink); }
.gp-head-actions { display: flex; align-items: center; gap: 6px; }
.gp-fav.on { color: #e2495f; border-color: color-mix(in srgb, #e2495f 40%, var(--line)); }
.gp-fav svg { width: 20px; height: 20px; }
.gp-icon svg { width: 20px; height: 20px; }
.gp-htitle { font-size: var(--t-sm); font-weight: 600; color: var(--muted); }
.gem-page-media { height: 248px; border-radius: 18px; background: #f2f2f2; display: flex; align-items: center; justify-content: center; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--sh-sm); padding: 14px; }
.gem-page-media img { width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; }
.gem-page-body { display: grid; gap: var(--sp-2); }
.gp-scoreline { display: flex; align-items: center; gap: 8px; }
.gp-scoreline .ag-stars b { font-size: 15px; }
.gp-scorelabel { font-size: var(--t-sm); color: var(--muted); }
.gp-title { font-family: var(--display); font-size: var(--t-xl); font-weight: 700; line-height: 1.22; letter-spacing: -.02em; }
.gp-meta { font-size: var(--t-sm); color: var(--faint); }
.gp-price { font-family: var(--display); font-size: var(--t-3xl); font-weight: 800; color: var(--blue); margin: 2px 0 var(--sp-2); }
.gp-info { display: grid; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--surface); }
.gp-row { display: flex; justify-content: space-between; gap: 14px; padding: 11px 14px; font-size: var(--t-sm); }
.gp-row:not(:last-child) { border-bottom: 1px solid var(--line); }
.gp-row span { color: var(--muted); } .gp-row b { font-weight: 600; text-align: right; }
.gp-seller { display: flex; align-items: center; gap: 8px; font-size: var(--t-sm); font-weight: 600; margin-top: var(--sp-1); }
.gp-seller-dot { width: 8px; height: 8px; border-radius: 50%; } .gp-seller-dot.ok { background: #0f7a4d; } .gp-seller-dot.warn { background: #e0a106; }
.gp-warn { font-size: var(--t-sm); color: #8a3322; background: #fbeee9; padding: 10px 12px; border-radius: var(--r-md); }
.gem-page-actions { margin-top: var(--sp-2); }
.gp-cta { display: flex; align-items: center; justify-content: center; gap: 8px; background: var(--blue); color: #fff; font-weight: 700; font-size: 15px; border-radius: 14px; padding: 15px; box-shadow: 0 10px 24px rgba(31,61,240,.3); }
.gp-cta svg { width: 16px; height: 16px; }

/* Grails hero finger-drag tilt (override the idle wobble) */
.grail-hero { animation: none !important; transform: perspective(900px) rotateX(var(--grx,0deg)) rotateY(var(--gry,0deg)); transition: transform .12s ease; touch-action: none; cursor: grab; }
.grail-hero:active { cursor: grabbing; }
.grail-actions { display: flex; gap: 10px; justify-content: center; margin-top: 13px; }
.grail-explore, .grail-more { display: inline-flex; align-items: center; justify-content: center; gap: 7px; cursor: pointer; font-weight: 700; font-size: var(--t-sm); border-radius: var(--r-pill); padding: 11px 18px; }
.grail-explore { background: #fff; color: var(--blue); border: 0; }
.grail-explore svg { width: 15px; height: 15px; }
.grail-more { background: rgba(255,255,255,.16); color: #fff; border: 1px solid rgba(255,255,255,.32); }

/* Grail "More details" sheet */
.grail-info-modal { position: fixed; inset: 0; z-index: 120; display: flex; align-items: flex-end; justify-content: center; opacity: 0; transition: opacity .2s ease; }
.grail-info-modal.visible { opacity: 1; }
.gim-backdrop { position: absolute; inset: 0; background: rgba(10,14,40,.55); }
.gim-panel { position: relative; z-index: 1; width: 100%; max-width: 520px; max-height: 88vh; overflow: auto; background: var(--surface); border-radius: 22px 22px 0 0; padding: var(--sp-6) var(--sp-5) calc(var(--sp-6) + env(safe-area-inset-bottom)); display: grid; gap: var(--sp-3); transform: translateY(14px); transition: transform .22s var(--ease); }
.grail-info-modal.visible .gim-panel { transform: none; }
.gim-close { position: absolute; top: 12px; right: 14px; width: 32px; height: 32px; border-radius: 50%; border: 0; background: var(--soft); font-size: 20px; line-height: 1; cursor: pointer; color: var(--ink); }
.gim-media { height: 170px; border-radius: 14px; overflow: hidden; background: var(--soft); display: grid; place-items: center; }
.gim-media img { height: 90%; object-fit: contain; }
.gim-title { font-family: var(--display); font-size: var(--t-xl); font-weight: 700; }
.gim-text p { font-size: var(--t-sm); line-height: 1.6; color: var(--ink-2); margin: 0 0 var(--sp-2); }
@media (min-width: 600px) { .grail-info-modal { align-items: center; } .gim-panel { border-radius: 22px; } }

/* ============================================================================
   Refinements: bigger gem photo + thumbnails, larger Grails hero, header air
   ========================================================================== */
/* Gem detail — show the card large, with up to 3 eBay photos */
.gem-page-media { height: clamp(300px, 52vh, 430px); }
.gp-thumbs { display: flex; gap: 8px; }
.gp-thumb { width: 56px; height: 74px; border-radius: 10px; overflow: hidden; padding: 0; cursor: pointer; background: var(--soft); border: 1px solid var(--line); }
.gp-thumb.on { border: 2px solid var(--blue); }
.gp-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Finger-synced photo carousel: the track holds every photo side by side and is moved with a
   single transform that tracks the finger, then snaps. Padding moves to each slide so photos
   swipe edge-to-edge inside the rounded frame. */
/* display:block (overriding the base flex) so the track gets a definite height from the
   fixed-height media; otherwise a centered flex child collapses and tall card scans overflow
   and get clipped. */
.gem-page-media { padding: 0; position: relative; display: block; }
.gp-track { display: flex; height: 100%; width: 100%; will-change: transform; touch-action: pan-y; }
.gp-slide { flex: 0 0 100%; height: 100%; min-width: 0; display: flex; align-items: center; justify-content: center; padding: 14px; box-sizing: border-box; }
.gp-slide img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; -webkit-user-drag: none; user-select: none; }
/* Stay invisible until fully decoded (bindImageFadeIn) so a slow/partial download never
   flashes as a cut-off or broken-looking photo — it just fades in once ready. */
.img-fadein { opacity: 0; transition: opacity .25s ease; }
.img-fadein.loaded { opacity: 1; }

/* Trending Grails — larger hero, no glow / reflection behind or below */
.grails-spot, .grail-reflect { display: none !important; }
.grails-stage { padding: var(--sp-5) 0 var(--sp-2); }
.grail-hero { width: clamp(200px, 60vw, 244px); height: clamp(272px, 81vw, 332px); box-shadow: 0 22px 44px rgba(7,18,80,0.34), 0 0 0 1px rgba(255,255,255,0.22); }

/* Home header — more breathing room around greeting + avatar */
.app-home.field { padding-top: var(--sp-1); gap: var(--sp-4); }
.ah-top { padding: 0; }
.app-home.field .ah-greeting { margin-bottom: 2px; }

/* ============================================================================
   Full-screen photo viewer + Grails button/row tweaks
   ========================================================================== */
.photo-viewer { position: fixed; inset: 0; z-index: 200; background: rgba(8,10,20,0.95); display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity .2s ease; }
.photo-viewer.visible { opacity: 1; }
.pv-stage { width: 100%; height: 100%; overflow: hidden; padding: calc(env(safe-area-inset-top) + 16px) 0 calc(env(safe-area-inset-bottom) + 16px); touch-action: none; }
/* Finger-synced photo track (same pattern as the gem-detail gallery): all photos sit side by
   side and the whole track is moved with one transform that tracks the finger, then snaps. */
.pv-track { display: flex; width: 100%; height: 100%; will-change: transform; }
.pv-slide { flex: 0 0 100%; min-width: 0; height: 100%; display: flex; align-items: center; justify-content: center; padding: 0 16px; box-sizing: border-box; }
.pv-img { max-width: 100%; max-height: 82vh; object-fit: contain; border-radius: 10px; box-shadow: 0 24px 60px rgba(0,0,0,0.5); transform-origin: center center; will-change: transform; }
.pv-close { position: absolute; top: calc(env(safe-area-inset-top) + 12px); right: 16px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255,255,255,0.16); color: #fff; font-size: 22px; line-height: 1; cursor: pointer; z-index: 2; display: flex; align-items: center; justify-content: center; padding: 0; }
.pv-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 42px; height: 42px; border-radius: 50%; border: 0; background: rgba(255,255,255,0.14); color: #fff; font-size: 26px; line-height: 1; cursor: pointer; }
.pv-prev { left: 10px; } .pv-next { right: 10px; }
.pv-dots { position: absolute; bottom: calc(env(safe-area-inset-bottom) + 20px); left: 0; right: 0; display: flex; gap: 7px; justify-content: center; }
.pv-dot { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,0.35); transition: width .2s ease, background .2s ease; }
.pv-dot.on { width: 20px; border-radius: 999px; background: #fff; }

/* Grails: equal-size buttons (More details left, Explore right); centered up-next */
.grail-actions { display: flex; gap: 10px; justify-content: center; }
.grail-explore, .grail-more { flex: 1 1 0; min-width: 0; }
.grail-upnext { justify-content: center; }
.grail-upnext-head { text-align: center; }

/* Grails action buttons: equal height, vertically aligned, single line */
.grail-actions { align-items: center; }
.grail-explore, .grail-more { flex: 0 0 auto; white-space: nowrap; min-height: 46px; padding: 0 20px; }

/* App page shell (Found / Search / Profile) */
.app-page { display: grid; gap: var(--sp-4); max-width: 560px; margin: 0 auto; }
/* Desktop web (not the installed app): the app's Found/Search pages widen into a rich,
   multi-column layout. Scoped to body:not(.is-app) so the PWA shell is never affected. */
@media (min-width: 821px) {
  body:not(.is-app) .app-page { max-width: var(--container); }
  /* Desktop Found controls: a tidy left-aligned control strip, not stretched mobile bars. */
  body:not(.is-app) #matches .found-toggle { display: inline-flex; width: auto; min-width: 300px; margin: 0 0 4px; }
  body:not(.is-app) #matches .found-search { max-width: 380px; margin: 0; }
  body:not(.is-app) #matches .found-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; max-width: none; margin: 0; }
  body:not(.is-app) #matches .found-toolbar .ah-chips { flex-wrap: wrap; }
  body:not(.is-app) #matches .found-controls { margin-left: auto; flex: none; }
  /* The gem grid spans the full width as a 3–4 column grid. */
  body:not(.is-app) #matches .ag-grid { grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 18px; }
}
.ap-head { display: grid; gap: 3px; }
/* Closed-beta waitlist screen (shown on Search for waitlisted users). */
.waitlist-gate { max-width: 460px; margin: clamp(24px, 8vh, 80px) auto; text-align: center; display: grid; gap: 14px; justify-items: center; padding: 0 16px; }
.waitlist-gate .wg-mark { width: 56px; height: 56px; display: grid; place-items: center; border-radius: 18px; background: var(--blue); color: #fff; font-family: var(--display); font-size: 30px; font-weight: 800; line-height: 1; }
.waitlist-gate h1 { font-family: var(--display); font-size: var(--t-3xl); font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; }
.waitlist-gate p { color: var(--muted); font-size: var(--t-base); line-height: 1.55; }
.waitlist-gate .primary-button { margin-top: 6px; }
.ap-title { font-family: var(--display); font-size: var(--t-2xl); font-weight: 800; letter-spacing: -0.025em; line-height: 1.06; }
.ap-sub { font-size: var(--t-sm); color: var(--muted); }

/* ============================================================================
   App Search (create-search) — Field-style cards over the existing form
   ========================================================================== */
@media (max-width: 820px) {
  body.is-app .search-gem-page { display: grid; gap: var(--sp-4); max-width: 560px; margin: 0 auto; }
  body.is-app .sg-layout { display: grid; grid-template-columns: 1fr; gap: var(--sp-4); }
  body.is-app .sg-builder.panel { background: transparent; border: 0; box-shadow: none; padding: 0; }
  body.is-app .alert-form .form-grid { display: grid; gap: var(--sp-4); }
  body.is-app .form-section { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh); padding: var(--sp-4) var(--sp-4) var(--sp-5); display: grid; gap: var(--sp-4); }
  body.is-app .form-section-label { font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--blue); margin: 0 0 2px; }
  body.is-app .search-gem-page input[type="text"],
  body.is-app .search-gem-page input[type="search"],
  body.is-app .search-gem-page input[type="number"],
  body.is-app .search-gem-page select { min-height: 46px; border-radius: 12px; }
  body.is-app .sg-aside .panel { border-radius: var(--r-lg); box-shadow: var(--sh); }
  body.is-app .form-actions .primary-button { width: 100%; min-height: 52px; border-radius: 14px; }
  body.is-app .search-gem-page .form-actions .primary-button { border-radius: 12px; }
}

/* Home: horizontal-scroll rails, bigger asterisks, prominent toggle, favorites pager */
.ag-hscroll { display: flex; gap: 11px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.ag-hscroll::-webkit-scrollbar { display: none; }
.ag-hscroll .ag-card { flex: 0 0 182px; }
.ag-stars b { font-size: 14px; }
.ah-seg { padding: 5px; }
.ah-seg-btn { display: flex; align-items: center; justify-content: center; gap: 7px; font-size: 13.5px; padding: 11px 10px; }
.ah-seg-btn svg { width: 16px; height: 16px; }
.ah-seg-btn.on { color: var(--blue); }
.fav-pager { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: var(--sp-3); }
.fav-page { min-width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); font-weight: 700; font-size: var(--t-sm); color: var(--ink); cursor: pointer; }
.fav-page.on { background: var(--blue); color: #fff; border-color: var(--blue); }
.fav-gap { min-width: 20px; height: 38px; display: grid; place-items: center; color: var(--faint); font-weight: 700; }

/* Found Gems: search bar + filter/sort toolbar */
.found-search { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 13px; padding: 11px 13px; box-shadow: var(--sh-sm); }
.found-search svg { width: 18px; height: 18px; color: var(--faint); flex: none; }
.found-search input { flex: 1; min-width: 0; border: 0; background: none; font: inherit; font-size: var(--t-sm); color: var(--ink); outline: none; }
.found-toolbar { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); flex-wrap: wrap; }
.found-toolbar .ah-chips { flex: 1 1 auto; }
.found-sort { display: flex; align-items: center; gap: 8px; font-size: var(--t-sm); color: var(--muted); flex: none; }
.found-sort select { min-height: 40px; border-radius: 10px; }

/* App pricing page polish */
.ap-backhead { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--sp-3); }
.ap-backhead .gp-htitle { font-size: var(--t-sm); font-weight: 600; color: var(--muted); }
@media (max-width: 820px) {
  body.is-app #pricing { max-width: 560px; margin: 0 auto; }
  body.is-app .pricing-hero { text-align: left; padding: var(--sp-1) 0 var(--sp-4); }
  body.is-app .pricing-hero h1 { font-family: var(--display); font-size: var(--t-2xl); letter-spacing: -0.025em; }
  body.is-app .pricing-hero p { font-size: var(--t-sm); }
  body.is-app .pricing-trust { gap: var(--sp-2); flex-wrap: wrap; }
  body.is-app .pricing-grid { grid-template-columns: 1fr !important; gap: var(--sp-3); }
  body.is-app .pricing-faq { margin-top: var(--sp-4); }
}

/* Search: create / active sliding toggle */
.search-toggle { display: flex; gap: 6px; background: var(--soft); border: 1px solid var(--line); border-radius: var(--r-pill); padding: 5px; margin-bottom: var(--sp-4); }
.st-btn { flex: 1; appearance: none; border: 0; cursor: pointer; font: inherit; font-size: 13.5px; font-weight: 700; color: var(--muted); background: transparent; padding: 11px 10px; border-radius: var(--r-pill); display: flex; align-items: center; justify-content: center; gap: 7px; transition: background .18s var(--ease), color .18s var(--ease); }
.st-btn.on { background: var(--surface); color: var(--blue); box-shadow: var(--sh-sm); }
.st-count { font-size: 11px; background: var(--blue-tint); color: var(--blue); padding: 1px 7px; border-radius: 999px; }
@media (max-width: 820px) {
  body.is-app .sg-layout.show-create .sg-aside { display: none; }
  body.is-app .sg-layout.show-active .sg-builder { display: none; }
  /* Mobile WEB mirrors the app: single column + New/Active tabs (the two-column side-by-side
     would be cramped on a phone). */
  body:not(.is-app) .search-gem-page { max-width: 560px; margin: 0 auto; }
  body:not(.is-app) .sg-layout { grid-template-columns: 1fr; gap: var(--sp-4); }
  body:not(.is-app) .sg-builder.panel { background: transparent; border: 0; box-shadow: none; padding: 0; }
  body:not(.is-app) .sg-layout.show-create .sg-aside { display: none; }
  body:not(.is-app) .sg-layout.show-active .sg-builder { display: none; }
}
/* Desktop WEB shows the builder + active-searches aside side by side, so the New/Active
   tabs are redundant there — hide them (they drive the single-column mobile/app view). */
@media (min-width: 821px) {
  body:not(.is-app) .search-gem-page .search-toggle { display: none; }
}
/* Found: search-source + sort controls */
.found-controls { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; }
/* Gem detail: feedback button under View on eBay */
.gp-feedback { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin-top: var(--sp-2); background: var(--surface); color: var(--ink); border: 1px solid var(--line); font-weight: 700; font-size: 15px; border-radius: 14px; padding: 14px; cursor: pointer; }
.gp-feedback svg { width: 16px; height: 16px; }

/* ============================================================================
   App polish pass: price wrap fix, view transitions, press feedback
   ========================================================================== */
/* Prices never split across lines; the deal pill wraps below if tight */
.ag-price, .ag-deal, .ah-feat-price, .ah-feat-deal, .gp-price, .ag-row .ag-price { white-space: nowrap; }
.ag-row { flex-wrap: wrap; row-gap: 4px; }

/* Dynamic view transition when switching tabs/pages (app only) */
@media (prefers-reduced-motion: no-preference) {
  body.is-app .view.active { animation: gm-viewin 0.28s var(--ease); }
}
@keyframes gm-viewin { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }

/* Consistent tactile press feedback on tappable controls */
.gp-cta:active, .gp-feedback:active, .grail-mini:active, .grail-explore:active, .grail-more:active,
.ah-link:active, .fav-page:active, .ah-seg-btn:active, .st-btn:active, .ah-chip:active, .ag-heart:active { transform: scale(0.97); }
.gp-cta, .gp-feedback, .grail-mini, .grail-explore, .grail-more, .ah-link, .fav-page, .ah-seg-btn, .st-btn, .ah-chip { transition: transform 0.12s var(--ease), background 0.18s var(--ease), color 0.18s var(--ease); }
.grail-mini { will-change: transform; }

/* Profile "More" links + app info pages */
.profile-links { display: grid; }
.profile-link { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; background: none; border: 0; cursor: pointer; font: inherit; font-size: var(--t-sm); font-weight: 600; color: var(--ink); padding: 13px 2px; text-align: left; transition: opacity .15s var(--ease); }
.profile-link:not(:last-child) { border-bottom: 1px solid var(--line); }
.profile-link svg { width: 18px; height: 18px; color: var(--faint); flex: none; }
.profile-link:active { opacity: .6; }
@media (max-width: 820px) {
  body.is-app .info-page { max-width: 560px; margin: 0 auto var(--sp-4); }
  body.is-app .info-page-head { text-align: left; padding: 0 0 var(--sp-2); }
  body.is-app .info-page-head h1, body.is-app .info-page-head h2 { font-family: var(--display); font-size: var(--t-2xl); letter-spacing: -0.025em; }
  body.is-app .info-grid { grid-template-columns: 1fr; gap: var(--sp-3); }
  body.is-app .info-card { border-radius: var(--r-lg); box-shadow: var(--sh); }
}

/* Notification preference toggles */
.notif-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; }
.notif-row + .notif-row { border-top: 1px solid var(--line); }
.notif-label { display: grid; gap: 1px; min-width: 0; }
.notif-label strong { font-size: var(--t-sm); font-weight: 600; color: var(--ink); }
.notif-label small { font-size: 12px; color: var(--muted); }
.switch { position: relative; flex: none; width: 46px; height: 28px; }
.switch input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch-track { position: absolute; inset: 0; background: var(--line); border-radius: 999px; transition: background .2s var(--ease); pointer-events: none; }
.switch-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(0,0,0,.2); transition: transform .2s var(--ease); }
.switch input:checked + .switch-track { background: var(--blue); }
.switch input:checked + .switch-track::after { transform: translateX(18px); }
.switch input:disabled + .switch-track { opacity: .5; }

/* Signup notification opt-in modal */
.optin-panel { text-align: center; }
.optin-icon { width: 56px; height: 56px; border-radius: 50%; background: var(--blue-tint); color: var(--blue); display: grid; place-items: center; margin: 0 auto var(--sp-1); }
.optin-icon svg { width: 28px; height: 28px; }
.optin-panel .gp-cta { margin-top: var(--sp-1); }
.optin-later { width: 100%; }

/* Pull-to-refresh indicator (app only) */
.ptr-indicator { position: fixed; top: -46px; left: 50%; transform: translateX(-50%) translateY(0); z-index: 1200; width: 38px; height: 38px; border-radius: 50%; background: #fff; box-shadow: 0 6px 18px rgba(15,23,42,.16); display: grid; place-items: center; opacity: 0; transition: opacity .15s var(--ease); pointer-events: none; }
.ptr-indicator.show { opacity: 1; }
.ptr-spinner { font-family: var(--display); font-size: 22px; font-weight: 800; color: var(--faint); line-height: 1; transition: color .15s var(--ease); }
.ptr-indicator.ready .ptr-spinner { color: var(--blue); }
.ptr-indicator.loading { transition: transform .2s var(--ease), opacity .15s var(--ease); }
.ptr-indicator.loading .ptr-spinner { color: var(--blue); animation: ptr-spin .7s linear infinite; }
@keyframes ptr-spin { to { transform: rotate(360deg); } }

/* "NEW" badge on freshly-found gems (Found page) */
.ag-new { position: absolute; top: 7px; left: 7px; z-index: 3; font-size: 8px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #0a0a0a; background: #d9ff00; padding: 2px 7px; border-radius: var(--r-pill); box-shadow: 0 1px 5px rgba(0,0,0,.16); }
.ag-new + .ag-lt { top: 28px; }

/* Square photo area on app cards (cover-fit, crop top/bottom like eBay) */
body.is-app .ag-media { aspect-ratio: 1 / 1; height: auto !important; background: #f2f2f2 !important; }
/* contain so no important part of the card is cropped out of the preview */
body.is-app .ag-media img { width: 100%; height: 100%; max-width: none; object-fit: contain; }
/* App home discovery (Popular / Picks): force a compact 2-column grid with a bounded,
   square photo so cards never render oversized/zoomed — independent of device aspect-ratio
   support. (Belt-and-suspenders against a stale-cache or fallback render.) */
body.is-app #ah-discovery .ag-grid { display: grid !important; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important; gap: 11px; max-width: 100%; overflow: hidden; }
body.is-app #ah-discovery .ag-card { width: auto !important; min-width: 0 !important; flex: initial !important; }
body.is-app #ah-discovery .ag-media { aspect-ratio: 1 / 1; height: auto !important; max-height: 190px; }
/* Belt-and-suspenders: the app home must never scroll sideways. Let its single column shrink
   below child min-content (minmax 0) and clip any residual horizontal overflow. */
body.is-app .app-home { grid-template-columns: minmax(0, 1fr); min-width: 0; max-width: 100%; overflow-x: clip; }
body.is-app .app-home > * { min-width: 0; max-width: 100%; }
/* Hard guarantee: the app itself can never scroll horizontally, whatever a child does.
   overflow-x:clip clips the x-axis without creating a scroll container or breaking the fixed
   tab bar / vertical scroll. */
body.is-app, body.is-app #dashboard { max-width: 100vw; overflow-x: clip; }
/* swipeable photo track when a listing has multiple images */
body.is-app .ag-media .ag-shots { display: flex; width: 100%; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
body.is-app .ag-media .ag-shots::-webkit-scrollbar { display: none; }
body.is-app .ag-media .ag-shots img { flex: 0 0 100%; width: 100%; height: 100%; object-fit: contain; scroll-snap-align: center; scroll-snap-stop: always; }
.ag-shots-dots { position: absolute; bottom: 6px; left: 0; right: 0; display: flex; justify-content: center; gap: 4px; z-index: 2; pointer-events: none; }
.ag-shots-dots i { width: 5px; height: 5px; border-radius: 50%; background: rgba(0,0,0,.22); transition: background .15s var(--ease); }
.ag-shots-dots i.on { background: var(--blue); }

/* ── Search: tri-state card-trait controls ── */
.trait-tri-list { display: grid; gap: 14px; }
.trait-tri { display: grid; gap: 8px; }
.trait-tri-label { font-size: var(--t-sm); font-weight: 600; color: var(--ink-2); }
.trait-tri-seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.trait-tri-seg .radio-pill span { padding: 0 8px; min-height: 44px; font-size: 13px; }

/* Trending Grails teaser: crossfading rotating thumbnail */
.ah-grails-thumb { position: relative; width: 52px; height: 70px; flex: none; border-radius: 9px; box-shadow: 0 8px 20px rgba(0,0,0,.4); animation: gm-float 5.5s ease-in-out infinite; }
.ah-grails-thumb .ah-grails-img { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 9px; object-fit: cover; opacity: 0; transition: opacity .8s var(--ease); animation: none; box-shadow: none; }
.ah-grails-thumb .ah-grails-img.on { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .ah-grails-thumb { animation: none !important; } }

/* ── App card / detail polish pass ── */
/* Found card: NEW + listing-type badge side by side (top-left row) */
.ag-badges { position: absolute; top: 7px; left: 7px; z-index: 3; display: flex; align-items: center; gap: 5px; }
.ag-badges .ag-new, .ag-badges .ag-lt { position: static; top: auto; left: auto; }
/* SOLD badge on found/favorite cards whose listing has ended/sold. */
.ag-sold { position: absolute; top: 7px; left: 7px; z-index: 4; font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #fff; background: var(--danger); padding: 3px 9px; border-radius: var(--r-pill); box-shadow: 0 1px 5px rgba(0,0,0,.2); }
.ag-sold.ended { background: #6b7280; }
.ag-sold[hidden] { display: none; }
.sold-flag.ended { background: #6b7280; }
.ag-media:has(.ag-sold:not([hidden])) .ag-badges { display: none; }
.ag-media:has(.ag-sold:not([hidden])) img, .ag-media:has(.ag-sold:not([hidden])) .ag-shots { opacity: .55; }

/* Gem detail: bigger asterisk score, glyph centered with the label text */
.gp-scoreline { gap: 9px; }
.gp-scoreline .ag-stars b { font-size: 24px; letter-spacing: 2px; transform: translateY(0.16em); }
.gp-scorelabel { font-size: var(--t-base); }

/* Found page: keep the "From search" label on one line */
.found-sort span { white-space: nowrap; }

/* Home avatar is now a button → Profile */
button.ah-avatar { border: 0; cursor: pointer; font-family: var(--display); font-size: var(--t-base); padding: 0; }
button.ah-avatar:active { transform: scale(.94); }

/* Trending Grails: align the two action buttons on the same horizontal line */
.grail-actions .grail-explore, .grail-actions .grail-more { margin-top: 0; }

/* ── App Search page: clearer Field identity ── */
body.is-app .search-gem-page .form-section { padding: 16px 16px 18px; gap: 15px; border-radius: var(--r-lg); }
body.is-app .form-section-label { display: flex; align-items: center; gap: 8px; font-size: 11px; letter-spacing: .08em; color: var(--blue); padding-bottom: 12px; margin: 0; border-bottom: 1px solid var(--line); }
body.is-app .form-section-label::before { content: "*"; font-family: var(--display); font-size: 17px; line-height: 1; color: var(--blue); }
body.is-app .field-label-row label, body.is-app .field > label { font-family: var(--display); font-weight: 700; font-size: var(--t-base); }
body.is-app .field-label-row .req, body.is-app .field-label-row .opt { padding: 3px 9px; border-radius: var(--r-pill); font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
body.is-app .field-label-row .req { background: var(--blue-tint); color: var(--blue); }
body.is-app .field-label-row .opt { background: var(--soft); color: var(--muted); }
body.is-app .search-gem-page .field-hint { font-size: 12px; line-height: 1.45; }

/* ── App Profile: grouped categories (headers hidden on website) ── */
.acct-cat { display: none; }
body.is-app .acct-cat { display: block; font-family: var(--display); font-size: 12px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); margin: 16px 2px 2px; }
body.is-app .account-grid { display: flex; flex-direction: column; gap: 12px; align-items: stretch; }
body.is-app .settings-stack { display: flex; flex-direction: column; gap: 12px; align-items: stretch; }
body.is-app .account-grid > .acct-cat:first-child { margin-top: 2px; }

/* ── Card gem-score asterisks: bigger on home/found/favorites cards ── */
body.is-app .ag-card .ag-stars b { font-size: 18px; letter-spacing: 2px; }

/* ── Profile FAQ: clean divider rows (reset inherited box border/radius) ── */
.faq-panel .gem-faq-item { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; }
.faq-panel .gem-faq-item:last-child { border-bottom: 0; }
.faq-panel .gem-faq-list.compact { gap: 0; }

/* ── App Profile hero with avatar upload ── */
.account-header.acct-hero { display: flex; align-items: center; gap: 14px; }
.acct-hero-text { display: grid; gap: 2px; min-width: 0; }
.acct-hero-text h1 { margin: 0; }
.acct-avatar { position: relative; flex: none; width: 62px; height: 62px; border-radius: 50%; background: var(--blue-tint) center/cover no-repeat; color: var(--blue); display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: 24px; cursor: pointer; box-shadow: var(--sh-sm); overflow: visible; }
.acct-avatar.has-image { color: transparent; }
.acct-avatar-edit { position: absolute; right: -2px; bottom: -2px; width: 24px; height: 24px; border-radius: 50%; background: var(--blue); color: #fff; display: grid; place-items: center; box-shadow: 0 2px 6px rgba(0,0,0,.2); }
.acct-avatar-edit svg { width: 13px; height: 13px; }
.acct-avatar:active { transform: scale(.96); }

/* ── Gem feedback modal: star rating ── */
.gemfb-stars { display: flex; gap: 6px; }
.gemfb-star { appearance: none; border: 0; background: none; cursor: pointer; font-family: var(--display); font-weight: 800; font-size: 30px; line-height: 1; color: #d3d7de; padding: 0 2px; transition: color .14s var(--ease), transform .14s var(--ease); }
.gemfb-star.on { color: var(--blue); }
.gemfb-star:active { transform: scale(.9); }

/* ── App Search: selection spacing, alignment & touch targets ── */
body.is-app .search-gem-page .field { display: grid; gap: 10px; }
body.is-app .search-gem-page .field-label-row { margin: 0; }
body.is-app .team-search-box input[type="search"] { min-height: 48px; border-radius: 12px; }
body.is-app .check-grid.compact { gap: 10px; }
body.is-app .check span, body.is-app .radio-pill span, body.is-app .trait-toggle span { min-height: 48px; padding: 0 16px; border-radius: 12px; font-size: 14px; }
body.is-app .check input:checked + span { background: var(--blue); border-color: var(--blue); color: #fff; font-weight: 700; box-shadow: none; }
/* Segmented controls (print run, listing type, trait tri): container radius must nestle the 12px option radius (12 + 4px padding) so the selected pill matches the track shape. */
body.is-app .segmented-control { border-radius: 16px; }
body.is-app .segmented-control .radio-pill span { border-radius: 12px; }
/* selection chips: larger, clearer remove control, comfortable gap */
body.is-app .team-chip-row { gap: 8px; margin-top: 2px; }
body.is-app .team-chip { padding: 8px 8px 8px 14px; font-size: 13px; font-weight: 600; min-height: 38px; gap: 9px; }
body.is-app .team-chip span { display: inline-grid; place-items: center; width: 19px; height: 19px; border-radius: 50%; background: color-mix(in srgb, var(--blue) 16%, transparent); font-size: 14px; line-height: 1; }
body.is-app .team-empty { font-size: 13px; color: var(--muted); }
/* suggestions dropdown: comfortable tap targets */
body.is-app .team-suggestions { padding: 8px; }
body.is-app .team-suggestions button { padding: 12px; font-size: 14px; border-radius: 10px; }

/* ── God Mode panel: collapsible ── */
.god-mode-panel > summary.god-summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; }
.god-mode-panel > summary::-webkit-details-marker { display: none; }
.god-summary-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.god-summary-head h2 { margin: 0; }
.god-chevron { flex: none; color: var(--muted); transition: transform .2s var(--ease); }
.god-chevron svg { width: 20px; height: 20px; display: block; }
.god-mode-panel[open] .god-chevron { transform: rotate(180deg); }
.god-mode-panel > *:not(summary) { margin-top: 14px; }

/* ── Profile title (app): smaller + breathing room from the top ── */
body.is-app .account-page { padding-top: 6px; }
body.is-app .acct-hero h1 { font-size: 22px; }

/* ── Featured "Top gem today": less-frequent light sweep ── */
@keyframes gm-feat-sweep { 0% { transform: translateX(-130%); } 22%, 100% { transform: translateX(130%); } }
.ah-feat::before { animation: gm-feat-sweep 8s ease-in-out infinite; }
.ah-feat-scan::after { animation-duration: 4.6s; }

/* ── Gem detail header: bigger back button + overflow (share / help) menu ── */
body.is-app .gem-page-head .gp-icon { width: 44px; height: 44px; }
body.is-app .gem-page-head .gp-icon svg { width: 24px; height: 24px; }
.gp-menu { position: relative; }
.gp-menu > summary { list-style: none; }
.gp-menu > summary::-webkit-details-marker { display: none; }
.gp-menu-pop { position: absolute; right: 0; top: calc(100% + 8px); z-index: 40; min-width: 196px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--sh-lg); padding: 6px; display: grid; gap: 2px; }
.gp-menu-pop button { display: flex; align-items: center; gap: 11px; width: 100%; text-align: left; padding: 12px; border: 0; background: none; cursor: pointer; border-radius: 10px; font: inherit; font-size: 14px; font-weight: 600; color: var(--ink); }
.gp-menu-pop button:hover { background: var(--soft); }
.gp-menu-pop button:active { transform: scale(.98); }
.gp-menu-pop svg { width: 18px; height: 18px; flex: none; color: var(--muted); }
/* Auction-end reminder bell (gem detail page) */
.gp-remind-menu > summary.on { color: var(--blue); border-color: color-mix(in srgb, var(--blue) 40%, var(--line)); }
.gp-remind-pop { min-width: 220px; padding: 12px; gap: 10px; }
.gp-remind-hint { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.4; }
.gp-remind-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.gp-remind-grid button { padding: 9px 4px; border: 1px solid var(--line); border-radius: 10px; background: var(--soft); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; text-align: center; color: var(--ink); }
.gp-remind-grid button:hover { background: var(--surface); border-color: var(--blue); }
.gp-remind-chip.on { background: var(--blue); border-color: var(--blue); color: #fff; }
.gp-remind-chip.on:hover { background: var(--blue); }
.gp-remind-custom { display: flex; gap: 6px; }
.gp-remind-custom input { flex: 1; min-width: 0; padding: 9px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--soft); font: inherit; font-size: 13px; color: var(--ink); }
.gp-remind-custom input:focus { outline: none; border-color: var(--blue); background: var(--surface); }
.gp-remind-custom button { padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--soft); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; color: var(--ink); white-space: nowrap; }
.gp-remind-custom button:hover { border-color: var(--blue); }
.gp-remind-actions { display: flex; gap: 6px; }
.gp-remind-save { flex: 1; padding: 10px; border: none; border-radius: 10px; background: var(--blue); color: #fff; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.gp-remind-save:hover { filter: brightness(1.05); }
.gp-remind-remove { flex: 1; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: none; color: #b3261e; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.gp-remind-remove:hover { background: #fbeee9; }
.gp-remind-loading { display: block; padding: 8px; text-align: center; color: var(--muted); font-size: 13px; }

/* ── Profile header: tighter title↔name gap + lower from the top ── */
body.is-app #notifications .account-page { padding-top: 14px; }
body.is-app .acct-hero { align-items: center; }
body.is-app .acct-hero-text { gap: 1px; }
body.is-app .acct-hero h1 { font-size: 22px; line-height: 1.14; margin: 0; }
body.is-app .acct-hero .account-sub { margin-top: 1px; line-height: 1.3; }

/* ── App Search: "Cancel edit" is destructive + aligned under the submit ── */
body.is-app .alert-form .form-actions { flex-direction: column; align-items: stretch; gap: 10px; }
/* Search page's sticky bar keeps both actions on one row so it stays compact */
body.is-app .search-gem-page .alert-form .form-actions { flex-direction: row; gap: 8px; }
body.is-app #cancel-edit { width: 100%; min-height: 48px; border-radius: 14px; color: #e2495f; border: 1px solid color-mix(in srgb, #e2495f 45%, var(--line)); background: color-mix(in srgb, #e2495f 7%, var(--surface)); font-weight: 700; }
body.is-app #cancel-edit:hover { border-color: #e2495f; background: color-mix(in srgb, #e2495f 12%, var(--surface)); }

/* ── Consistent 44px back buttons across app sub-pages ── */
body.is-app .ap-backhead .gp-icon, body.is-app .grails-back { width: 44px; height: 44px; }
body.is-app .ap-backhead .gp-icon svg, body.is-app .grails-back svg { width: 24px; height: 24px; }

/* ── Sticky back header: hide on scroll-down, reveal on scroll-up ── */
body.is-app .ap-backhead {
  position: sticky; top: 0; z-index: 30; padding: 8px 0; margin-bottom: var(--sp-3);
  background: color-mix(in srgb, var(--paper, #f7f8fb) 92%, transparent);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  transition: transform .26s var(--ease), opacity .26s var(--ease);
}
body.is-app .ap-backhead.hide { transform: translateY(-115%); opacity: 0; pointer-events: none; }

/* ── Profile Plans & pricing: separate the CTA from the copy above it ── */
body.is-app .panel .muted + .primary-button,
body.is-app .panel .muted + .ghost-button { margin-top: 14px; }

/* Clearer Trending Grails flame */
.grails-flame svg { width: 22px; height: 22px; }

/* ── Home: Gemby logo above the greeting (with breathing room) ── */
body.is-app .ah-brandbar { display: flex; align-items: center; justify-content: space-between; margin: 0 0 4px; }
body.is-app .ah-brandlogo { height: 23px; width: auto; display: block; }

/* Signed-out app home: avatar becomes a sign-in affordance */
body.is-app .ah-avatar-signin svg { width: 22px; height: 22px; }

/* ── Found page: keep filter controls within the viewport (no h-scroll) ── */
/* App toolbar: chips scroll on one line; the two selects share a row with tiny captions */
body.is-app .found-controls { flex-direction: row; align-items: stretch; gap: 8px; width: 100%; }
body.is-app .found-controls .found-sort { flex: 1; min-width: 0; flex-direction: column; align-items: stretch; gap: 5px; }
body.is-app .found-controls .found-sort span { font-size: 10.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); }
body.is-app .found-controls .found-sort select { min-width: 0; max-width: none; width: 100%; }
body.is-app #matches .ah-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding: 2px; margin: -2px; }
body.is-app #matches .ah-chips::-webkit-scrollbar { display: none; }
#matches .ah-chip { white-space: nowrap; min-height: 38px; }
