/* ============================================================
   FONTS, self-hosted, subset to latin
   Figtree for the interface, Bricolage Grotesque for display lines.
   ============================================================ */
@font-face {
  font-family: 'Figtree';
  src: url('../fonts/figtree-latin-400-normal.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Figtree';
  src: url('../fonts/figtree-latin-500-normal.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Figtree';
  src: url('../fonts/figtree-latin-700-normal.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Bricolage Grotesque';
  src: url('../fonts/bricolage-grotesque-latin-600-normal.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
}

/* ============================================================
   TOKENS. The only place a raw colour value is allowed.
   Lagoon glass: frosted panes over two soft lights. Lagoon teal
   stands for the gadget you have, mango for the one you want;
   every screen sits where the two meet.
   ============================================================ */
:root {
  --font-sans:    'Figtree', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Bricolage Grotesque', 'Figtree', Georgia, sans-serif;
  --font-mono:    ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --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;

  --r-sm: 6px; --r-md: 10px; --r-lg: 16px; --r-xl: 24px; --r-full: 9999px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,.08), 0 2px 4px rgba(0,0,0,.04);
  --shadow-lg: 0 12px 32px rgba(0,0,0,.10), 0 4px 8px rgba(0,0,0,.04);

  --t-fast: 120ms ease;
  --t-base: 200ms ease;
  --t-slow: 360ms ease;

  --nav-h: 60px;
  --tabbar-h: 54px;
  --sidebar-w: 240px;
  --ease-out: cubic-bezier(.22,1,.36,1);

  /* Juzt-Tap credit strip, fixed in code */
  --jt-navy: #14213d;
  --jt-gold: #c9a063;
  --jt-gold-ring: rgba(201,160,99,.55);
  --jt-white: #ffffff;
  --jt-strip-overlay: rgba(0,0,0,.22);
  --slide-glass: rgba(255,255,255,.16);
  --slide-glass-line: rgba(255,255,255,.34);
  --slide-a: #0A7C80;
  --slide-b: #0B2530;
}

:root, [data-theme="light"] {
  --bg-page:    #E7F0F1;
  --bg-solid:   #F6FAFA;
  --bg-card:    rgba(255,255,255,.62);
  --bg-surface: rgba(255,255,255,.40);
  --bg-inset:   rgba(11,37,48,.06);
  --bg-hover:   rgba(255,255,255,.80);
  --bg-footer:  #0B2530;

  --glass-strong: rgba(246,250,250,.78);
  --glass-edge:   rgba(255,255,255,.85);
  --glass-line:   rgba(255,255,255,.55);
  --glass-shadow: 0 1px 0 rgba(255,255,255,.7) inset, 0 10px 30px -12px rgba(11,37,48,.22);
  --glow-have: rgba(20,184,166,.42);
  --glow-want: rgba(255,178,63,.40);
  --glow-sky:  rgba(125,200,240,.42);
  --glow-coral: rgba(255,122,107,.24);

  --text-primary:   #0B2530;
  --text-secondary: #35505A;
  --text-tertiary:  #56707A;
  --text-disabled:  #9DB1B6;
  --text-inverse:   #FFFFFF;
  --text-on-footer: #E3EFF0;
  --muted-on-footer: #9FB8BD;

  --border-subtle:  rgba(11,37,48,.08);
  --border-default: rgba(11,37,48,.14);
  --border-strong:  rgba(11,37,48,.24);
  --border-on-footer: rgba(255,255,255,.10);

  --accent:         #0B2530;
  --accent-hover:   #17394A;
  --accent-surface: rgba(11,37,48,.06);

  --brand:       #0A7C80;
  --brand-light: rgba(10,124,128,.12);
  --brand-hover: #08666A;
  --brand-ink:   #075457;
  --sun:         #FFB23F;
  --sun-ink:     #3A2300;

  --success: #15803D;  --success-bg: rgba(21,128,61,.10);
  --warning: #A44A06;  --warning-bg: rgba(255,178,63,.20);
  --danger:  #C81E1E;  --danger-bg:  rgba(200,30,30,.09);
  --info:    #1D5FA8;  --info-bg:    rgba(29,95,168,.10);

  --overlay: rgba(6,24,30,.42);
  --hero-ink: rgba(6,24,30,.58);
}

[data-theme="dark"] {
  --bg-page:    #04161B;
  --bg-solid:   #0A2026;
  --bg-card:    rgba(22,52,60,.48);
  --bg-surface: rgba(22,52,60,.32);
  --bg-inset:   rgba(255,255,255,.06);
  --bg-hover:   rgba(40,80,90,.55);
  --bg-footer:  #020D10;

  --glass-strong: rgba(8,28,34,.80);
  --glass-edge:   rgba(255,255,255,.16);
  --glass-line:   rgba(255,255,255,.09);
  --glass-shadow: 0 1px 0 rgba(255,255,255,.08) inset, 0 14px 34px -14px rgba(0,0,0,.7);
  --glow-have: rgba(13,148,136,.34);
  --glow-want: rgba(255,160,40,.16);
  --glow-sky:  rgba(40,130,180,.22);
  --glow-coral: rgba(255,100,90,.10);

  --text-primary:   #E4F2F2;
  --text-secondary: #A6C0C4;
  --text-tertiary:  #7E9CA1;
  --text-disabled:  #3F5A60;
  --text-inverse:   #04161B;

  --border-subtle:  rgba(255,255,255,.07);
  --border-default: rgba(255,255,255,.12);
  --border-strong:  rgba(255,255,255,.22);

  --accent:         #E4F2F2;
  --accent-hover:   #BFD9DB;
  --accent-surface: rgba(255,255,255,.06);

  --brand:       #3FD9CF;
  --brand-light: rgba(63,217,207,.14);
  --brand-hover: #79E8E0;
  --brand-ink:   #9AF0E9;
  --sun:         #FFB23F;
  --sun-ink:     #3A2300;

  --success: #34D399;  --success-bg: rgba(52,211,153,.12);
  --warning: #FBBF24;  --warning-bg: rgba(251,191,36,.12);
  --danger:  #F87171;  --danger-bg:  rgba(248,113,113,.12);
  --info:    #60A5FA;  --info-bg:    rgba(96,165,250,.12);

  --overlay: rgba(0,0,0,.55);

  --shadow-sm: 0 1px 3px rgba(0,0,0,.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,.4);
  --shadow-lg: 0 12px 32px rgba(0,0,0,.5);
}

/* ============================================================
   BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-page);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  display: flex; flex-direction: column;
  transition: background var(--t-base), color var(--t-base);
}
main { flex: 1 0 auto; }

a { color: inherit; text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--brand); }
img, video { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; color: inherit; }
input, textarea, select { font-family: inherit; color: inherit; }
ul, ol { list-style: none; }
.icon { flex-shrink: 0; }

h1 { font-size: clamp(1.75rem, 4vw, 2.5rem);     font-weight: 700; letter-spacing: -.03em;  line-height: 1.15; }
h2 { font-size: clamp(1.375rem, 3vw, 1.875rem);  font-weight: 700; letter-spacing: -.02em;  line-height: 1.2; }
h3 { font-size: clamp(1.125rem, 2vw, 1.375rem);  font-weight: 700; letter-spacing: -.015em; line-height: 1.3; }
h4 { font-size: 1.0625rem; font-weight: 700; letter-spacing: -.01em; }
h5 { font-size: .9375rem;  font-weight: 700; }
h6 { font-size: .875rem;   font-weight: 700; }

.display {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -.035em;
  line-height: 1.04;
}

p { color: var(--text-secondary); line-height: 1.7; }
.mono  { font-family: var(--font-mono); font-size: .875em; }
.muted { color: var(--text-tertiary); }
.small { font-size: .875rem; }
.tiny  { font-size: .78rem; }
.label {
  font-size: .75rem; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--text-tertiary);
}
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: var(--r-sm); }
.skip-link {
  position: absolute; left: var(--sp-4); top: -60px; z-index: 1000;
  background: var(--text-primary); color: var(--text-inverse);
  padding: var(--sp-2) var(--sp-4); border-radius: var(--r-md);
}
.skip-link:focus { top: var(--sp-3); color: var(--text-inverse); }

/* ============================================================
   LAYOUT HELPERS
   ============================================================ */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 var(--sp-6); }
.container--narrow { max-width: 720px; }
.container--wide   { max-width: 1440px; }

.grid    { display: grid; gap: var(--sp-6); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

.flex          { display: flex; }
.flex--center  { align-items: center; }
.flex--between { justify-content: space-between; align-items: center; }
.flex--gap-2   { gap: var(--sp-2); }
.flex--gap-3   { gap: var(--sp-3); }
.flex--gap-4   { gap: var(--sp-4); }

.stack > * + * { margin-top: var(--sp-4); }
.stack--sm > * + * { margin-top: var(--sp-2); }
.stack--lg > * + * { margin-top: var(--sp-8); }
.section { padding: var(--sp-12) 0; }
.section--tight { padding: var(--sp-8) 0; }
.section__head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: var(--sp-4); margin-bottom: var(--sp-6);
}
.section__head h2 { max-width: 22ch; }
.section__link { font-weight: 600; font-size: .9375rem; color: var(--brand); display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: sticky; top: 0; z-index: 90;
  height: var(--nav-h);
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-subtle);
}
.nav__inner { height: 100%; display: flex; align-items: center; gap: var(--sp-4); }
.nav__logo { display: inline-flex; align-items: center; gap: var(--sp-2); white-space: nowrap; flex-shrink: 0; font-family: var(--font-display); font-weight: 600; font-size: 1.35rem; letter-spacing: -.04em; color: var(--text-primary); }
.nav__logo:hover { color: var(--text-primary); }
.nav__logo-mark {
  width: 30px; height: 30px; border-radius: var(--r-md);
  background: var(--brand); color: var(--text-inverse);
  display: inline-flex; align-items: center; justify-content: center;
}
.nav__logo-mark svg { width: 18px; height: 18px; }
.nav__logo img { height: 30px; width: auto; }
.nav__links { display: none; align-items: center; gap: var(--sp-1); margin-left: var(--sp-4); }
.nav__link {
  padding: 8px 12px; border-radius: var(--r-md);
  font-size: .9375rem; font-weight: 500; color: var(--text-secondary);
  transition: background var(--t-fast), color var(--t-fast);
}
.nav__link:hover { background: var(--bg-hover); color: var(--text-primary); }
.nav__link.active { color: var(--text-primary); font-weight: 700; }
.nav__search { display: none; flex: 1; max-width: 360px; margin-left: auto; position: relative; }
.nav__search input {
  width: 100%; height: 40px; padding: 0 14px 0 38px;
  background: var(--bg-surface); border: 1px solid transparent; border-radius: var(--r-full);
  font-size: .9375rem; transition: border-color var(--t-fast), background var(--t-fast);
}
.nav__search input:focus { outline: none; border-color: var(--border-strong); background: var(--bg-card); }
.nav__search .icon { position: absolute; left: 13px; top: 10px; color: var(--text-tertiary); }
.nav__actions { display: flex; align-items: center; gap: var(--sp-2); margin-left: auto; }
.nav__search + .nav__actions { margin-left: var(--sp-2); }
.nav__icon-btn {
  position: relative; width: 40px; height: 40px; border-radius: var(--r-md);
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: none; color: var(--text-secondary);
  transition: background var(--t-fast), color var(--t-fast);
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.nav__icon-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
.nav__icon-btn:active { background: var(--bg-inset); }
.nav__badge {
  position: absolute; top: 5px; right: 5px; min-width: 16px; height: 16px; padding: 0 4px;
  background: var(--brand); color: var(--text-inverse); border-radius: var(--r-full);
  font-size: .62rem; font-weight: 700; display: none; align-items: center; justify-content: center;
  border: 1.5px solid var(--bg-card);
}
.nav__badge.is-on { display: inline-flex; }
.nav__actions .nav__cta { display: none; }
.nav__actions .nav__me { display: none; }

/* ============================================================
   HAMBURGER
   ============================================================ */
.nav__hamburger {
  display: none;
  width: 40px; height: 40px;
  background: transparent; border: none;
  border-radius: var(--r-md);
  cursor: pointer;
  flex-direction: column; align-items: center; justify-content: center;
  gap: 5px; padding: 8px;
  transition: background var(--t-fast);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none; -webkit-user-select: none;
}
.nav__hamburger:hover { background: var(--bg-hover); }
.nav__hamburger:active { background: var(--bg-inset); }
.nav__hamburger span {
  display: block; width: 20px; height: 2px;
  background: var(--text-primary); border-radius: 2px;
  transition: all .25s var(--ease-out);
  transform-origin: center;
}
.nav__hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav__hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   MOBILE DRAWER, built by JS, never in the HTML flow
   ============================================================ */
.jt-drawer-overlay {
  position: fixed; inset: 0; z-index: 998;
  background: var(--overlay);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  opacity: 0; transition: opacity .24s ease;
  pointer-events: none; cursor: pointer;
}
.jt-drawer-overlay.is-open { opacity: 1; pointer-events: auto; }

.jt-drawer {
  position: fixed; top: 0; left: 0; bottom: 0;
  width: min(320px, 85vw);
  z-index: 999;
  background: var(--bg-card);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  transform: translateX(-100%);
  transition: transform .28s var(--ease-out);
  box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  visibility: hidden; pointer-events: none;
}
.jt-drawer.is-open { transform: translateX(0); visibility: visible; pointer-events: auto; }

.jt-drawer__hdr {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-surface); flex-shrink: 0;
}
.jt-drawer__logo {
  font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; letter-spacing: -.04em;
  color: var(--text-primary); text-decoration: none;
}
.jt-drawer__logo span { color: var(--brand); }
.jt-drawer__close {
  width: 36px; height: 36px; border: none; background: var(--bg-inset);
  border-radius: var(--r-md); cursor: pointer; font-size: 20px; line-height: 1;
  color: var(--text-tertiary);
  display: flex; align-items: center; justify-content: center;
  transition: background var(--t-fast), color var(--t-fast);
}
.jt-drawer__close:hover { background: var(--bg-hover); color: var(--text-primary); }

.jt-drawer__profile {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 20px; background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle); flex-shrink: 0;
}
.jt-drawer__avatar {
  width: 42px; height: 42px; border-radius: 50%;
  object-fit: cover; flex-shrink: 0; border: 2px solid var(--border-subtle);
  background: var(--brand-light); color: var(--brand-ink);
  display: flex; align-items: center; justify-content: center; font-weight: 700;
}
.jt-drawer__uname  { font-weight: 700; font-size: .9rem; color: var(--text-primary); line-height: 1.3; }
.jt-drawer__uemail { font-size: .75rem; color: var(--text-tertiary); margin-top: 2px; word-break: break-all; }

.jt-drawer__nav { flex: 1; padding: 8px 0; }
.jt-drawer__link {
  display: flex; align-items: center; gap: 14px;
  padding: 13px 20px; color: var(--text-secondary);
  text-decoration: none; font-size: .9375rem; font-weight: 500;
  transition: background var(--t-fast), color var(--t-fast);
  min-height: 48px;
  border: none; background: none; width: 100%; text-align: left; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.jt-drawer__link:hover  { background: var(--bg-hover); color: var(--text-primary); }
.jt-drawer__link:active { background: var(--bg-inset); }
.jt-drawer__link.active { background: var(--brand-light); color: var(--brand-ink); font-weight: 700; }
.jt-drawer__link--danger { color: var(--danger); }
.jt-drawer__link--danger:hover { background: var(--danger-bg); color: var(--danger); }
.jt-drawer__link svg { width: 20px; height: 20px; flex-shrink: 0; opacity: .7; }
.jt-drawer__link.active svg, .jt-drawer__link:hover svg { opacity: 1; }
.jt-drawer__divider { height: 1px; background: var(--border-subtle); margin: 6px 0; }
.jt-drawer__group { padding: 12px 20px 4px; }

.jt-drawer__auth {
  padding: 16px 20px; display: flex; flex-direction: column; gap: 10px;
  border-top: 1px solid var(--border-subtle); flex-shrink: 0;
}
.jt-drawer__footer {
  padding: 14px 20px; border-top: 1px solid var(--border-subtle);
  display: flex; gap: 16px; flex-shrink: 0;
}

/* ============================================================
   BOTTOM NAV TAB BAR
   ============================================================ */
.bottom-nav {
  display: none; /* shown by the media query */
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
  background: var(--bg-card);
  border-top: 1px solid var(--border-subtle);
  padding-bottom: max(8px, env(safe-area-inset-bottom));
}
.bottom-nav__inner {
  display: flex; align-items: center; justify-content: space-around;
  height: var(--tabbar-h); max-width: 600px; margin: 0 auto;
}
.bottom-nav__item {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  flex: 1; padding: 6px 4px; position: relative; min-height: 44px;
  color: var(--text-tertiary); text-decoration: none;
  font-size: .6rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  transition: color var(--t-fast);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.bottom-nav__item svg { width: 22px; height: 22px; }
.bottom-nav__item.active { color: var(--brand); }
.bottom-nav__item:hover { color: var(--text-primary); }
.bottom-nav__item.active:hover { color: var(--brand); }
.bottom-nav__item:active { opacity: .6; }
.bottom-nav__item--add svg {
  width: 34px; height: 34px; padding: 7px; margin-top: -4px;
  background: var(--text-primary); color: var(--text-inverse); border-radius: var(--r-md);
}
.bottom-nav__badge {
  position: absolute; top: 2px; right: 50%; margin-right: -18px;
  min-width: 16px; height: 16px;
  background: var(--brand); color: var(--text-inverse);
  border-radius: var(--r-full);
  font-size: .6rem; font-weight: 700;
  display: none; align-items: center; justify-content: center;
  padding: 0 4px; border: 1.5px solid var(--bg-card);
}
.bottom-nav__badge.is-on { display: inline-flex; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 18px; border-radius: var(--r-md);
  border: 1px solid transparent; font-size: .9375rem; font-weight: 700; line-height: 1;
  white-space: nowrap; text-decoration: none; cursor: pointer;
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast), opacity var(--t-fast);
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--accent); color: var(--text-inverse); }
.btn--primary:hover { background: var(--accent-hover); color: var(--text-inverse); }
.btn--brand { background: var(--brand); color: var(--text-inverse); }
.btn--brand:hover { background: var(--brand-hover); color: var(--text-inverse); }
.btn--ghost { background: transparent; color: var(--text-primary); border-color: var(--border-default); }
.btn--ghost:hover { background: var(--bg-hover); color: var(--text-primary); }
.btn--soft { background: var(--bg-surface); color: var(--text-primary); }
.btn--soft:hover { background: var(--bg-inset); color: var(--text-primary); }
.btn--danger { background: transparent; color: var(--danger); border-color: var(--border-default); }
.btn--danger:hover { background: var(--danger-bg); color: var(--danger); }
.btn--sm { height: 34px; padding: 0 12px; font-size: .85rem; }
.btn--lg { height: 48px; padding: 0 22px; font-size: 1rem; }
.btn--block { width: 100%; }
.btn--icon { width: 40px; padding: 0; }
.btn[disabled], .btn.loading { opacity: .55; pointer-events: none; }
.btn.loading::after {
  content: ''; width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.link { color: var(--brand); font-weight: 600; }
.link:hover { color: var(--brand-hover); text-decoration: underline; }
.link-btn { background: none; border: none; padding: 0; font: inherit; color: var(--brand); font-weight: 600; cursor: pointer; }

/* ============================================================
   FORMS
   ============================================================ */
.form { display: grid; gap: var(--sp-5); }
.form__row { display: grid; gap: var(--sp-4); }
.field { display: grid; gap: 6px; }
.field__label { font-size: .875rem; font-weight: 700; color: var(--text-primary); }
.field__hint  { font-size: .8125rem; color: var(--text-tertiary); }
.field__error { font-size: .8125rem; color: var(--danger); font-weight: 600; }
.input, .select, .textarea {
  width: 100%; height: 44px; padding: 0 14px;
  background: var(--bg-card); color: var(--text-primary);
  border: 1px solid var(--border-default); border-radius: var(--r-md);
  font-size: 1rem;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.textarea { height: auto; min-height: 120px; padding: 12px 14px; resize: vertical; line-height: 1.55; }
.select {
  appearance: none; -webkit-appearance: none; padding-right: 36px;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-tertiary) 50%), linear-gradient(135deg, var(--text-tertiary) 50%, transparent 50%);
  background-position: calc(100% - 18px) 19px, calc(100% - 13px) 19px;
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
}
.input:hover, .select:hover, .textarea:hover { border-color: var(--border-strong); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-light); }
.input--sm { height: 36px; font-size: .9rem; }
.input-group { position: relative; }
.input-group .input { padding-left: 40px; }
.input-group .icon { position: absolute; left: 13px; top: 12px; color: var(--text-tertiary); pointer-events: none; }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: .9375rem; color: var(--text-secondary); cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--brand); flex-shrink: 0; }
.radio-cards { display: grid; gap: var(--sp-2); }
.radio-card {
  display: flex; align-items: flex-start; gap: 12px; padding: 14px;
  border: 1px solid var(--border-default); border-radius: var(--r-md); cursor: pointer;
  background: var(--bg-card); transition: border-color var(--t-fast), background var(--t-fast);
}
.radio-card:hover { border-color: var(--border-strong); }
.radio-card input { accent-color: var(--brand); width: 18px; height: 18px; margin-top: 2px; flex-shrink: 0; }
.radio-card:has(input:checked) { border-color: var(--brand); background: var(--brand-light); }
.radio-card strong { display: block; font-size: .9375rem; }
.radio-card span { font-size: .8125rem; color: var(--text-tertiary); }
.pw-meter { height: 4px; border-radius: var(--r-full); background: var(--bg-inset); overflow: hidden; }
.pw-meter span { display: block; height: 100%; width: 0; background: var(--danger); transition: width var(--t-base), background var(--t-base); }

.dropzone {
  border: 1.5px dashed var(--border-strong); border-radius: var(--r-lg);
  padding: var(--sp-8) var(--sp-4); text-align: center; background: var(--bg-surface);
  cursor: pointer; transition: border-color var(--t-fast), background var(--t-fast);
}
.dropzone:hover, .dropzone.is-over { border-color: var(--brand); background: var(--brand-light); }
.dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.dropzone__title { font-weight: 700; color: var(--text-primary); }
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-2); }
.photo-tile { position: relative; aspect-ratio: 1; border-radius: var(--r-md); overflow: hidden; background: var(--bg-inset); border: 1px solid var(--border-subtle); }
.photo-tile img { width: 100%; height: 100%; object-fit: cover; }
.photo-tile__bar { position: absolute; left: 0; right: 0; bottom: 0; display: flex; gap: 4px; padding: 6px; justify-content: flex-end; }
.photo-tile__bar form { display: inline; }
.photo-tile__btn { width: 30px; height: 30px; border-radius: var(--r-sm); border: none; background: var(--bg-card); color: var(--text-primary); display: inline-flex; align-items: center; justify-content: center; }
.photo-tile__btn:hover { color: var(--brand); }
.photo-tile__tag { position: absolute; top: 6px; left: 6px; background: var(--text-primary); color: var(--text-inverse); font-size: .65rem; font-weight: 700; padding: 2px 6px; border-radius: var(--r-sm); text-transform: uppercase; letter-spacing: .04em; }

/* ============================================================
   CARDS AND SURFACES
   ============================================================ */
.card {
  background: var(--bg-card); border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg); transition: box-shadow var(--t-base), border-color var(--t-base);
}
.card--padded { padding: var(--sp-6); }
.card--flush { overflow: hidden; }
.card__header { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); padding: var(--sp-4) var(--sp-5); border-bottom: 1px solid var(--border-subtle); }
.card__header h2, .card__header h3 { font-size: 1.0625rem; }
.card__body { padding: var(--sp-5); }
.card__footer { padding: var(--sp-4) var(--sp-5); border-top: 1px solid var(--border-subtle); }
.panel { background: var(--bg-surface); border-radius: var(--r-lg); padding: var(--sp-5); }

.badge {
  display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px;
  border-radius: var(--r-sm); font-size: .72rem; font-weight: 700; letter-spacing: .02em;
  background: var(--bg-inset); color: var(--text-secondary); white-space: nowrap;
}
.badge .icon { width: 12px; height: 12px; }
.badge--brand   { background: var(--brand-light); color: var(--brand-ink); }
.badge--success { background: var(--success-bg); color: var(--success); }
.badge--warning { background: var(--warning-bg); color: var(--warning); }
.badge--danger  { background: var(--danger-bg);  color: var(--danger); }
.badge--info    { background: var(--info-bg);    color: var(--info); }
.badge--dark    { background: var(--text-primary); color: var(--text-inverse); }

.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px;
  border-radius: var(--r-full); border: 1px solid var(--border-default);
  background: var(--bg-card); color: var(--text-secondary); font-size: .875rem; font-weight: 600;
  white-space: nowrap; transition: border-color var(--t-fast), background var(--t-fast), color var(--t-fast);
  -webkit-tap-highlight-color: transparent;
}
.chip:hover { border-color: var(--border-strong); color: var(--text-primary); }
.chip.active { background: var(--text-primary); border-color: var(--text-primary); color: var(--text-inverse); }
.chip .icon { width: 16px; height: 16px; }
.chip-row { display: flex; gap: var(--sp-2); overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; scrollbar-width: none; }
.chip-row::-webkit-scrollbar { display: none; }

.avatar {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  background: var(--brand-light); color: var(--brand-ink);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .85rem; overflow: hidden; border: 1px solid var(--border-subtle);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar--sm { width: 30px; height: 30px; font-size: .7rem; }
.avatar--lg { width: 72px; height: 72px; font-size: 1.4rem; }
.avatar--xl { width: 104px; height: 104px; font-size: 2rem; border-width: 3px; border-color: var(--bg-card); }

.alert {
  display: flex; gap: var(--sp-3); align-items: flex-start; padding: var(--sp-4);
  border-radius: var(--r-md); font-size: .9375rem; border: 1px solid transparent;
}
.alert p { color: inherit; }
.alert--info    { background: var(--info-bg); color: var(--info); }
.alert--success { background: var(--success-bg); color: var(--success); }
.alert--warning { background: var(--warning-bg); color: var(--warning); }
.alert--danger  { background: var(--danger-bg); color: var(--danger); }
.alert strong { color: inherit; }

.empty {
  text-align: center; padding: var(--sp-12) var(--sp-4);
  border: 1px dashed var(--border-default); border-radius: var(--r-lg); background: var(--bg-card);
}
.empty__icon { width: 52px; height: 52px; margin: 0 auto var(--sp-4); border-radius: var(--r-lg); background: var(--bg-surface); color: var(--text-tertiary); display: flex; align-items: center; justify-content: center; }
.empty h3 { font-size: 1.125rem; margin-bottom: 6px; }
.empty p { max-width: 42ch; margin: 0 auto var(--sp-5); font-size: .9375rem; }

.divider { height: 1px; background: var(--border-subtle); border: 0; margin: var(--sp-6) 0; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px var(--sp-4); font-size: .9375rem; }
.kv dt { color: var(--text-tertiary); }
.kv dd { color: var(--text-primary); font-weight: 600; text-align: right; word-break: break-word; }

/* ============================================================
   GADGET CARD. The price tag is cut like a swap ticket.
   ============================================================ */
.gcard { position: relative; display: flex; flex-direction: column; background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: var(--r-lg); overflow: hidden; transition: box-shadow var(--t-base), border-color var(--t-base); }
.gcard:hover { box-shadow: var(--shadow-md); border-color: var(--border-default); }
.gcard__media { position: relative; aspect-ratio: 4 / 3; background: var(--bg-inset); overflow: hidden; }
.gcard__media img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--t-slow); }
.gcard:hover .gcard__media img { transform: scale(1.03); }
.gcard__noimg { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: var(--text-disabled); }
.gcard__flags { position: absolute; top: 10px; left: 10px; display: flex; gap: 6px; flex-wrap: wrap; }
.gcard__heart {
  position: absolute; top: 8px; right: 8px; width: 36px; height: 36px; border-radius: 50%;
  border: none; background: var(--bg-card); color: var(--text-secondary);
  display: inline-flex; align-items: center; justify-content: center; box-shadow: var(--shadow-sm);
  transition: color var(--t-fast); -webkit-tap-highlight-color: transparent;
}
.gcard__heart:hover, .gcard__heart.active { color: var(--brand); }
.gcard__heart.active svg { fill: currentColor; }
.gcard__body { padding: var(--sp-3) var(--sp-4) var(--sp-4); display: flex; flex-direction: column; gap: 6px; flex: 1; }
.gcard__title { font-size: .9875rem; font-weight: 700; line-height: 1.35; color: var(--text-primary); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.gcard__title a::after { content: ''; position: absolute; inset: 0; }
.gcard__meta { font-size: .8125rem; color: var(--text-tertiary); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.gcard__foot { margin-top: auto; padding-top: 6px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ticket {
  position: relative; display: inline-flex; align-items: center; height: 28px; padding: 0 10px 0 12px;
  background: var(--brand-light); color: var(--brand-ink); font-weight: 700; font-size: .875rem;
  border-radius: var(--r-sm); font-variant-numeric: tabular-nums;
}
.ticket::before {
  content: ''; position: absolute; left: -5px; top: 50%; width: 10px; height: 10px; margin-top: -5px;
  border-radius: 50%; background: var(--bg-card);
}
.gcard__owner { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; color: var(--text-tertiary); position: relative; z-index: 1; max-width: 50%; overflow: hidden; }
.gcard__owner span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.gadget-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-3); }

/* Horizontal row of cards that scrolls on phones */
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 72%); gap: var(--sp-3); overflow-x: auto; -webkit-overflow-scrolling: touch; scroll-snap-type: x mandatory; padding-bottom: 6px; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: start; }

/* ============================================================
   HOME
   ============================================================ */
.slides { position: relative; border-radius: var(--r-xl); overflow: hidden; background: var(--bg-footer); color: var(--text-on-footer); min-height: 240px; }
.slide { position: absolute; inset: 0; display: flex; align-items: flex-end; padding: var(--sp-8) var(--sp-6); opacity: 0; transition: opacity .6s ease; background-size: cover; background-position: center; }
.slide.active { opacity: 1; position: relative; }
.slide__shade { position: absolute; inset: 0; background: var(--hero-ink); }
.slide__body { position: relative; max-width: 560px; }
.slide__body h2 { color: var(--text-inverse); font-family: var(--font-display); font-weight: 600; font-size: clamp(1.6rem, 5vw, 2.6rem); letter-spacing: -.03em; }
.slide__body p { color: var(--text-on-footer); margin-top: 8px; }
.slide__body .btn-row { margin-top: var(--sp-5); }
.slide--center { justify-content: center; text-align: center; }
.slide--center .btn-row { justify-content: center; }
.slide--right { justify-content: flex-end; text-align: right; }
.slides__dots { position: absolute; right: var(--sp-5); bottom: var(--sp-5); display: flex; gap: 6px; z-index: 2; }
.slides__dot { width: 8px; height: 8px; border-radius: 50%; border: none; background: var(--border-on-footer); padding: 0; }
.slides__dot.active { background: var(--text-inverse); width: 22px; border-radius: var(--r-full); }

.cat-rail { display: grid; grid-auto-flow: column; grid-auto-columns: 112px; gap: var(--sp-2); overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 6px; scrollbar-width: none; }
.cat-rail::-webkit-scrollbar { display: none; }
.cat-tile { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: var(--r-lg); background: var(--bg-card); border: 1px solid var(--border-subtle); font-size: .8125rem; font-weight: 700; line-height: 1.25; color: var(--text-primary); min-height: 104px; transition: border-color var(--t-fast); }
.cat-tile:hover { border-color: var(--brand); color: var(--text-primary); }
.cat-tile .icon { color: var(--brand); }
.cat-tile small { display: block; font-weight: 500; color: var(--text-tertiary); margin-top: 2px; }

.steps { display: grid; gap: var(--sp-3); counter-reset: step; }
.step { position: relative; padding: var(--sp-5); padding-left: 64px; background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: var(--r-lg); }
.step::before { counter-increment: step; content: counter(step); position: absolute; left: var(--sp-5); top: var(--sp-5); width: 30px; height: 30px; border-radius: var(--r-md); background: var(--text-primary); color: var(--text-inverse); font-weight: 700; font-size: .875rem; display: flex; align-items: center; justify-content: center; }
.step h3 { font-size: 1rem; }
.step p { font-size: .9375rem; margin-top: 4px; }

.split { display: grid; gap: var(--sp-6); }
.band { background: var(--text-primary); color: var(--text-inverse); border-radius: var(--r-xl); padding: var(--sp-8) var(--sp-6); }
.band h2 { color: var(--text-inverse); font-family: var(--font-display); font-weight: 600; }
.band p { color: var(--text-disabled); }
.band .btn--primary { background: var(--bg-card); color: var(--text-primary); }
.band .btn--primary:hover { background: var(--bg-surface); color: var(--text-primary); }

.spot { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-4); background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: var(--r-lg); position: relative; }
.spot:hover { border-color: var(--border-strong); color: inherit; }
.spot__name { font-weight: 700; color: var(--text-primary); }
.spot__sub { font-size: .8125rem; color: var(--text-tertiary); }

.quote { padding: var(--sp-5); background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: var(--r-lg); display: flex; flex-direction: column; gap: var(--sp-4); }
.quote__text { color: var(--text-primary); font-size: 1rem; line-height: 1.6; }
.quote__who { display: flex; align-items: center; gap: var(--sp-3); margin-top: auto; font-size: .875rem; }
.stars { display: inline-flex; gap: 2px; color: var(--warning); }
.stars .icon { width: 15px; height: 15px; }
.stars .on { fill: currentColor; }
.stars .off { color: var(--border-strong); }

/* ============================================================
   BROWSE
   ============================================================ */
.page-head { padding: var(--sp-8) 0 var(--sp-5); }
.page-head h1 { font-family: var(--font-display); font-weight: 600; letter-spacing: -.035em; }
.page-head p { margin-top: 6px; max-width: 60ch; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: .8125rem; color: var(--text-tertiary); margin-bottom: var(--sp-3); }
.crumbs a:hover { color: var(--brand); }
.browse { display: grid; gap: var(--sp-6); padding-bottom: var(--sp-12); }
.filters { display: none; }
.filters.is-open { display: block; position: fixed; inset: 0; z-index: 200; background: var(--bg-card); overflow-y: auto; padding: var(--sp-5) var(--sp-4) calc(var(--sp-20) + env(safe-area-inset-bottom, 0px)); }
.filters__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--sp-5); }
.filters__group + .filters__group { margin-top: var(--sp-5); padding-top: var(--sp-5); border-top: 1px solid var(--border-subtle); }
.filters__group h3 { font-size: .875rem; margin-bottom: var(--sp-3); }
.filters__list { display: grid; gap: 4px; max-height: 260px; overflow-y: auto; }
.filters__list a { display: flex; justify-content: space-between; padding: 8px 10px; border-radius: var(--r-sm); font-size: .9rem; color: var(--text-secondary); min-height: 40px; align-items: center; }
.filters__list a:hover { background: var(--bg-hover); color: var(--text-primary); }
.filters__list a.active { background: var(--brand-light); color: var(--brand-ink); font-weight: 700; }
.filters__apply { position: fixed; left: 0; right: 0; bottom: 0; padding: var(--sp-3) var(--sp-4) max(var(--sp-3), env(safe-area-inset-bottom)); background: var(--bg-card); border-top: 1px solid var(--border-subtle); display: flex; gap: var(--sp-2); }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); margin-bottom: var(--sp-4); flex-wrap: wrap; }
.toolbar__count { font-size: .9rem; color: var(--text-tertiary); }
.toolbar .select { width: auto; height: 38px; font-size: .9rem; }
.active-filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: var(--sp-4); }
.active-filters a { display: inline-flex; align-items: center; gap: 4px; height: 30px; padding: 0 10px; border-radius: var(--r-full); background: var(--bg-inset); font-size: .8125rem; font-weight: 600; color: var(--text-secondary); }
.active-filters a:hover { background: var(--danger-bg); color: var(--danger); }
.active-filters .icon { width: 14px; height: 14px; }

.pager { display: flex; justify-content: center; align-items: center; gap: var(--sp-2); margin-top: var(--sp-8); }
.pager a, .pager span { min-width: 40px; height: 40px; padding: 0 12px; border-radius: var(--r-md); display: inline-flex; align-items: center; justify-content: center; font-weight: 600; font-size: .9rem; border: 1px solid var(--border-default); }
.pager a:hover { background: var(--bg-hover); }
.pager .current { background: var(--text-primary); color: var(--text-inverse); border-color: var(--text-primary); }
.pager .gap { border: none; }

/* ============================================================
   GADGET DETAIL
   ============================================================ */
.detail { display: grid; gap: var(--sp-6); padding: var(--sp-5) 0 var(--sp-12); }
.gallery__main { position: relative; aspect-ratio: 4 / 3; border-radius: var(--r-lg); overflow: hidden; background: var(--bg-inset); border: 1px solid var(--border-subtle); }
.gallery__main img { width: 100%; height: 100%; object-fit: contain; }
.gallery__thumbs { display: flex; gap: var(--sp-2); margin-top: var(--sp-2); overflow-x: auto; -webkit-overflow-scrolling: touch; }
.gallery__thumb { width: 72px; height: 72px; flex-shrink: 0; border-radius: var(--r-md); overflow: hidden; border: 2px solid transparent; padding: 0; background: var(--bg-inset); }
.gallery__thumb.active { border-color: var(--brand); }
.gallery__thumb img { width: 100%; height: 100%; object-fit: cover; }
.detail__title { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.6rem, 4.5vw, 2.4rem); letter-spacing: -.035em; line-height: 1.1; }
.detail__price { display: flex; align-items: baseline; gap: var(--sp-3); flex-wrap: wrap; margin: var(--sp-4) 0; }
.detail__price strong { font-size: 1.75rem; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.detail__actions { display: grid; gap: var(--sp-2); }
.specs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--border-subtle); border: 1px solid var(--border-subtle); border-radius: var(--r-lg); overflow: hidden; }
.specs div { background: var(--bg-card); padding: var(--sp-3) var(--sp-4); }
.specs dt { font-size: .75rem; color: var(--text-tertiary); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.specs dd { font-weight: 700; margin-top: 2px; word-break: break-word; }
.owner-card { display: flex; align-items: center; gap: var(--sp-3); }
.prose p + p { margin-top: var(--sp-3); }
.prose h2 { font-size: 1.25rem; margin: var(--sp-8) 0 var(--sp-3); }
.prose h3 { font-size: 1.0625rem; margin: var(--sp-6) 0 var(--sp-2); }
.prose ul { list-style: disc; padding-left: 1.2em; color: var(--text-secondary); }
.prose li + li { margin-top: 6px; }
.prose a { color: var(--brand); font-weight: 600; }
.sticky-cta { position: fixed; left: 0; right: 0; bottom: calc(var(--tabbar-h) + max(8px, env(safe-area-inset-bottom))); z-index: 95; padding: var(--sp-3) var(--sp-4); background: var(--bg-card); border-top: 1px solid var(--border-subtle); display: flex; gap: var(--sp-2); align-items: center; }
.sticky-cta .btn { flex: 1; }

/* ============================================================
   PROFILE
   ============================================================ */
.cover { height: 160px; background: var(--bg-inset); background-size: cover; background-position: center; border-radius: 0 0 var(--r-xl) var(--r-xl); }
.profile-head { display: flex; flex-direction: column; gap: var(--sp-4); margin-top: -52px; padding-bottom: var(--sp-6); }
.profile-head h1 { font-family: var(--font-display); font-weight: 600; }
.profile-stats { display: flex; gap: var(--sp-6); flex-wrap: wrap; font-size: .875rem; color: var(--text-tertiary); }
.profile-stats strong { display: block; font-size: 1.125rem; color: var(--text-primary); }

/* ============================================================
   APP SHELL: member and admin areas
   ============================================================ */
.app-layout { display: flex; gap: var(--sp-6); align-items: flex-start; }
.sidebar { display: none; width: var(--sidebar-w); flex-shrink: 0; position: sticky; top: calc(var(--nav-h) + var(--sp-6)); }
.sidebar__group + .sidebar__group { margin-top: var(--sp-5); }
.sidebar__title { padding: 0 12px 6px; }
.sidebar__link { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: var(--r-md); font-size: .9375rem; font-weight: 500; color: var(--text-secondary); transition: background var(--t-fast), color var(--t-fast); }
.sidebar__link:hover { background: var(--bg-hover); color: var(--text-primary); }
.sidebar__link.active { background: var(--bg-card); color: var(--text-primary); font-weight: 700; box-shadow: inset 3px 0 0 var(--brand); }
.sidebar__link .icon { width: 18px; height: 18px; opacity: .75; }
.sidebar__count { margin-left: auto; font-size: .72rem; font-weight: 700; background: var(--brand); color: var(--text-inverse); border-radius: var(--r-full); padding: 1px 7px; }
.app-main { flex: 1; min-width: 0; padding: var(--sp-6) 0 var(--sp-12); }
.app-title { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--sp-4); flex-wrap: wrap; margin-bottom: var(--sp-6); }
.app-title h1 { font-size: clamp(1.5rem, 3.5vw, 2rem); font-family: var(--font-display); font-weight: 600; letter-spacing: -.035em; }
.app-title p { margin-top: 2px; font-size: .9375rem; }

.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-3); }
.stat { padding: var(--sp-4); background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: var(--r-lg); }
.stat__value { font-size: 1.75rem; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1.1; margin-top: 4px; }
.stat__hint { font-size: .78rem; color: var(--text-tertiary); margin-top: 2px; }
.stat--accent { background: var(--brand-light); border-color: transparent; }
.stat--accent .stat__value { color: var(--brand-ink); }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border-subtle); margin-bottom: var(--sp-5); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { padding: 10px 12px; font-size: .9375rem; font-weight: 600; color: var(--text-tertiary); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; min-height: 44px; display: inline-flex; align-items: center; gap: 6px; }
.tabs a:hover { color: var(--text-primary); }
.tabs a.active { color: var(--text-primary); border-bottom-color: var(--brand); }
.tabs .badge { height: 18px; padding: 0 6px; font-size: .68rem; }

.list { display: grid; }
.list__item { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-4) var(--sp-5); border-bottom: 1px solid var(--border-subtle); position: relative; transition: background var(--t-fast); }
.list__item:last-child { border-bottom: none; }
.list__item:hover { background: var(--bg-hover); }
.list__item.unread { background: var(--brand-light); }
.list__main { flex: 1; min-width: 0; }
.list__title { font-weight: 700; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list__title a::after { content: ''; position: absolute; inset: 0; }
.list__sub { font-size: .8125rem; color: var(--text-tertiary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list__end { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; font-size: .78rem; color: var(--text-tertiary); position: relative; z-index: 1; }
.list__thumb { width: 56px; height: 56px; border-radius: var(--r-md); overflow: hidden; background: var(--bg-inset); flex-shrink: 0; }
.list__thumb img { width: 100%; height: 100%; object-fit: cover; }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-tertiary); font-weight: 700; padding: 10px 14px; border-bottom: 1px solid var(--border-default); white-space: nowrap; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--border-subtle); vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: var(--bg-hover); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.who { display: flex; align-items: center; gap: 10px; min-width: 180px; }
.who strong { display: block; font-size: .9rem; }
.who span { display: block; font-size: .78rem; color: var(--text-tertiary); }

/* ============================================================
   SWAP AND CHAT
   ============================================================ */
.deal { display: grid; grid-template-columns: 1fr auto 1fr; gap: var(--sp-3); align-items: center; }
.deal__side { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.deal__img { aspect-ratio: 1; border-radius: var(--r-md); overflow: hidden; background: var(--bg-inset); }
.deal__img img { width: 100%; height: 100%; object-fit: cover; }
.deal__name { font-weight: 700; font-size: .875rem; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.deal__arrow { width: 40px; height: 40px; border-radius: 50%; background: var(--brand); color: var(--text-inverse); display: flex; align-items: center; justify-content: center; }
.deal__cash { aspect-ratio: 1; border-radius: var(--r-md); background: var(--success-bg); color: var(--success); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; font-weight: 700; }

.timeline { display: grid; gap: 0; }
.timeline__item { display: grid; grid-template-columns: 24px 1fr; gap: var(--sp-3); padding-bottom: var(--sp-4); position: relative; }
.timeline__item::before { content: ''; position: absolute; left: 11px; top: 22px; bottom: 0; width: 2px; background: var(--border-subtle); }
.timeline__item:last-child::before { display: none; }
.timeline__dot { width: 24px; height: 24px; border-radius: 50%; background: var(--bg-inset); color: var(--text-tertiary); display: flex; align-items: center; justify-content: center; }
.timeline__dot .icon { width: 13px; height: 13px; }
.timeline__item.done .timeline__dot { background: var(--success); color: var(--text-inverse); }
.timeline__item.now .timeline__dot { background: var(--brand); color: var(--text-inverse); }
.timeline__item strong { font-size: .9rem; display: block; }
.timeline__item span { font-size: .8125rem; color: var(--text-tertiary); }

.code-box { display: grid; gap: var(--sp-3); padding: var(--sp-5); border-radius: var(--r-lg); background: var(--bg-surface); border: 1px solid var(--border-subtle); }
.code-digits { font-family: var(--font-mono); font-size: 2rem; font-weight: 700; letter-spacing: .3em; color: var(--text-primary); }
.code-input { font-family: var(--font-mono); font-size: 1.5rem; letter-spacing: .4em; text-align: center; max-width: 160px; }

.inbox { display: grid; min-height: 60vh; }
.inbox__list { border-right: 1px solid var(--border-subtle); }
.chat { display: flex; flex-direction: column; min-height: 60vh; }
.chat__head { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-3) var(--sp-4); border-bottom: 1px solid var(--border-subtle); }
.chat__body { flex: 1; padding: var(--sp-4); display: flex; flex-direction: column; gap: 6px; overflow-y: auto; max-height: 62vh; background: var(--bg-surface); }
.chat__day { align-self: center; font-size: .72rem; font-weight: 700; color: var(--text-tertiary); padding: 4px 10px; margin: var(--sp-2) 0; }
.bubble { max-width: 80%; padding: 9px 13px; border-radius: 16px; font-size: .9375rem; line-height: 1.45; word-wrap: break-word; white-space: pre-wrap; background: var(--bg-card); border: 1px solid var(--border-subtle); color: var(--text-primary); align-self: flex-start; border-bottom-left-radius: 4px; }
.bubble--me { align-self: flex-end; background: var(--text-primary); border-color: var(--text-primary); color: var(--text-inverse); border-bottom-left-radius: 16px; border-bottom-right-radius: 4px; }
.bubble time { display: block; font-size: .68rem; margin-top: 3px; opacity: .6; }
.bubble--system { align-self: center; background: var(--brand-light); color: var(--brand-ink); border: none; font-size: .8125rem; font-weight: 600; text-align: center; border-radius: var(--r-md); }
.chat__form { display: flex; gap: var(--sp-2); padding: var(--sp-3); border-top: 1px solid var(--border-subtle); background: var(--bg-card); align-items: flex-end; }
.chat__form textarea { flex: 1; min-height: 44px; max-height: 140px; height: 44px; resize: none; padding: 11px 14px; border-radius: 22px; }
.chat__form .btn { border-radius: 50%; width: 44px; height: 44px; padding: 0; }

/* ============================================================
   TOAST AND MODAL
   ============================================================ */
.toasts { position: fixed; z-index: 1100; left: var(--sp-4); right: var(--sp-4); bottom: calc(var(--tabbar-h) + 20px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: var(--sp-2); align-items: center; pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: flex-start; gap: 10px; max-width: 420px; width: 100%; padding: 12px 14px; border-radius: var(--r-md); background: var(--text-primary); color: var(--text-inverse); font-size: .9rem; font-weight: 500; box-shadow: var(--shadow-lg); animation: toast-in .25s var(--ease-out); }
.toast--error .icon { color: var(--danger); }
.toast--success .icon { color: var(--success); }
.toast button { margin-left: auto; background: none; border: none; color: inherit; opacity: .6; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.modal { position: fixed; inset: 0; z-index: 1000; display: none; align-items: flex-end; justify-content: center; background: var(--overlay); padding: 0; }
.modal.is-open { display: flex; }
.modal__panel { width: 100%; max-width: 520px; max-height: 92vh; overflow-y: auto; background: var(--bg-card); border-radius: var(--r-xl) var(--r-xl) 0 0; padding: var(--sp-6) var(--sp-5) max(var(--sp-6), env(safe-area-inset-bottom)); animation: sheet-up .28s var(--ease-out); }
.modal__head { display: flex; justify-content: space-between; align-items: center; gap: var(--sp-3); margin-bottom: var(--sp-4); }
.modal__head h2 { font-size: 1.25rem; }
@keyframes sheet-up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }

.skeleton { background: linear-gradient(90deg, var(--bg-inset) 0%, var(--bg-surface) 50%, var(--bg-inset) 100%); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; border-radius: var(--r-md); }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ============================================================
   AUTH PAGES
   ============================================================ */
.auth { display: grid; min-height: calc(100vh - var(--nav-h)); }
.auth__panel { padding: var(--sp-8) 0 var(--sp-12); }
.auth__box { max-width: 420px; margin: 0 auto; }
.auth__box h1 { font-family: var(--font-display); font-weight: 600; letter-spacing: -.035em; margin-bottom: 6px; }
.auth__aside { display: none; background: var(--text-primary); color: var(--text-inverse); padding: var(--sp-12); flex-direction: column; justify-content: space-between; }
.auth__aside h2 { color: var(--text-inverse); font-family: var(--font-display); font-weight: 600; font-size: 2.4rem; letter-spacing: -.035em; max-width: 14ch; }
.auth__aside p { color: var(--text-disabled); }
.auth__list { display: grid; gap: var(--sp-4); margin-top: var(--sp-8); }
.auth__list li { display: flex; gap: var(--sp-3); color: var(--text-disabled); font-size: .9375rem; }
.auth__list .icon { color: var(--brand); margin-top: 3px; }

/* ============================================================
   FOOTER AND CREDIT STRIP
   ============================================================ */
.footer { margin-top: var(--sp-12); background: var(--bg-footer); color: var(--text-on-footer); }
.footer a { color: var(--muted-on-footer); }
.footer a:hover { color: var(--text-on-footer); }
.footer__top { padding: var(--sp-10) 0 var(--sp-8); }
.footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: var(--sp-8); }
.footer__about { max-width: 34ch; }
.footer__brand { font-family: var(--font-display); font-weight: 600; font-size: 1.5rem; letter-spacing: -.04em; color: var(--text-on-footer); display: inline-flex; align-items: center; gap: var(--sp-2); }
.footer__about p { color: var(--muted-on-footer); font-size: .9rem; margin-top: var(--sp-3); }
.footer h4 { color: var(--text-on-footer); font-size: .8125rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: var(--sp-3); }
.footer ul { display: grid; gap: 8px; font-size: .9rem; }
.footer__social { display: flex; gap: var(--sp-2); margin-top: var(--sp-5); }
.footer__social a { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--border-on-footer); display: inline-flex; align-items: center; justify-content: center; }
.footer__social a:hover { border-color: var(--muted-on-footer); }
.footer__social .jt-social { background: var(--jt-white); border-color: var(--jt-white); }
.footer__social .jt-social:hover { box-shadow: 0 0 0 3px var(--jt-gold-ring); }
.footer__social .jt-social img { height: 18px; width: auto; }
.footer__bottom { border-top: 1px solid var(--border-on-footer); padding: var(--sp-5) 0; display: flex; justify-content: space-between; gap: var(--sp-4); font-size: .8125rem; color: var(--muted-on-footer); }
.footer__bottom p { color: var(--muted-on-footer); }

.jt-credit { background: var(--jt-strip-overlay); border-top: 1px solid var(--border-on-footer); padding: 14px 16px calc(14px + env(safe-area-inset-bottom, 0px)); }
.jt-credit__row { max-width: 1200px; margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 14px; }
.jt-credit__label { font-size: .68rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted-on-footer); }
.jt-credit__pill { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px 0 10px; border-radius: var(--r-full); background: var(--jt-white); color: var(--jt-navy); font-weight: 700; font-size: .875rem; line-height: 1; box-shadow: 0 2px 8px rgba(0,0,0,.28); transition: transform var(--t-base), box-shadow var(--t-base); }
.jt-credit__pill:hover, .jt-credit__pill:focus-visible { color: var(--jt-navy); transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,.32), 0 0 0 3px var(--jt-gold-ring); }
.jt-credit__pill img { height: 24px; width: auto; }
.jt-credit__divider { width: 1px; height: 18px; background: var(--border-on-footer); }
.jt-credit__company { font-size: .8125rem; color: var(--muted-on-footer); }
.footer .jt-credit__link { color: var(--jt-white); font-weight: 600; background-image: linear-gradient(var(--jt-gold), var(--jt-gold)); background-repeat: no-repeat; background-position: 0 100%; background-size: 0 2px; padding-bottom: 2px; transition: background-size .25s ease; }
.footer .jt-credit__link:hover, .footer .jt-credit__link:focus-visible { color: var(--jt-white); background-size: 100% 2px; }
@media (max-width: 419.98px) {
  .jt-credit__divider { display: none; }
  .jt-credit__company { flex-basis: 100%; text-align: center; }
}

/* ============================================================
   MISC
   ============================================================ */
.error-page { text-align: left; padding: var(--sp-16) 0; max-width: 560px; }
.error-page__code { font-family: var(--font-display); font-weight: 600; font-size: clamp(4rem, 18vw, 8rem); letter-spacing: -.06em; line-height: 1; color: var(--brand); }
.verify-bar { background: var(--warning-bg); color: var(--warning); font-size: .875rem; padding: 10px 0; }
.verify-bar .container { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; }
.verify-bar form { margin-left: auto; }
.faq details { border-bottom: 1px solid var(--border-subtle); padding: var(--sp-4) 0; }
.faq summary { font-weight: 700; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: var(--sp-3); min-height: 32px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq details[open] summary .icon { transform: rotate(180deg); }
.faq summary .icon { transition: transform var(--t-base); color: var(--text-tertiary); }
.faq details p { margin-top: var(--sp-2); }
.inline-form { display: inline; }
.mt-2 { margin-top: var(--sp-2); } .mt-3 { margin-top: var(--sp-3); } .mt-4 { margin-top: var(--sp-4); } .mt-6 { margin-top: var(--sp-6); } .mt-8 { margin-top: var(--sp-8); }
.mb-2 { margin-bottom: var(--sp-2); } .mb-4 { margin-bottom: var(--sp-4); } .mb-6 { margin-bottom: var(--sp-6); }
.text-right { text-align: right; }
.nowrap { white-space: nowrap; }
.w-full { width: 100%; }
.hide-mobile { display: none; }

/* ============================================================
   RESPONSIVE, MOBILE FIRST
   Breakpoints:  mobile < 640px | tablet 640 to 1023px | desktop >= 1024px
   ============================================================ */

/* Tablet and up */
@media (min-width: 640px) {
  .gadget-grid { grid-template-columns: repeat(3, 1fr); gap: var(--sp-4); }
  .rail { grid-auto-columns: minmax(240px, 38%); }
  .stats { grid-template-columns: repeat(4, 1fr); }
  .form__row { grid-template-columns: 1fr 1fr; }
  .photo-grid { grid-template-columns: repeat(4, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .modal { align-items: center; padding: var(--sp-6); }
  .modal__panel { border-radius: var(--r-xl); }
  .toasts { left: auto; right: var(--sp-6); align-items: flex-end; }
  .profile-head { flex-direction: row; align-items: flex-end; }
  .cover { height: 220px; }
  .hide-mobile { display: initial; }
}

/* Desktop: sidebar shows, mobile chrome hidden */
@media (min-width: 1024px) {
  .sidebar            { display: block !important; }
  .nav__hamburger     { display: none  !important; }
  .nav__links         { display: flex  !important; }
  .nav__search        { display: flex  !important; }
  .nav__actions .nav__cta { display: inline-flex; }
  .nav__actions .nav__me  { display: inline-flex; }
  .bottom-nav         { display: none  !important; }
  body.has-bottom-nav { padding-bottom: 0 !important; }
  .sticky-cta         { display: none; }
  .toasts             { bottom: var(--sp-6); }

  .gadget-grid { grid-template-columns: repeat(4, 1fr); }
  .browse .gadget-grid { grid-template-columns: repeat(3, 1fr); }
  .rail { grid-auto-flow: row; grid-template-columns: repeat(4, 1fr); grid-auto-columns: auto; overflow: visible; }
  .split { grid-template-columns: 2fr 1fr; align-items: start; }
  .split--even { grid-template-columns: 1fr 1fr; }
  .browse { grid-template-columns: 250px 1fr; align-items: start; }
  .filters { display: block !important; position: sticky !important; top: calc(var(--nav-h) + var(--sp-4)); inset: auto !important; padding: 0 !important; background: none !important; max-height: calc(100vh - var(--nav-h) - 32px); overflow-y: auto; }
  .filters__head .btn, .filters__apply, .js-open-filters { display: none !important; }
  .detail { grid-template-columns: 1.15fr .85fr; align-items: start; gap: var(--sp-10); padding-top: var(--sp-8); }
  .detail__aside { position: sticky; top: calc(var(--nav-h) + var(--sp-6)); }
  .inbox { grid-template-columns: 320px 1fr; }
  .auth { grid-template-columns: 1fr 1fr; }
  .auth__aside { display: flex; }
  .auth__panel { display: flex; align-items: center; padding: var(--sp-12) var(--sp-8); }
  .auth__box { width: 100%; }
  .band { padding: var(--sp-12) var(--sp-10); display: flex; align-items: center; justify-content: space-between; gap: var(--sp-8); }
  .steps { grid-template-columns: repeat(4, 1fr); }
}

/* Tablet and mobile: hamburger replaces the desktop nav */
@media (max-width: 1023px) {
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }

  .nav__links     { display: none !important; }
  .nav__search    { display: none !important; }
  .nav__hamburger { display: flex !important; }

  .sidebar    { display: none !important; }
  .app-layout { flex-direction: column; }
  .app-main   { padding: var(--sp-4) 0 80px; width: 100%; }

  .bottom-nav { display: block; }
  body.has-bottom-nav {
    padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px));
  }
  body.has-sticky-cta { padding-bottom: calc(var(--tabbar-h) + 72px + env(safe-area-inset-bottom, 0px)); }

  .container    { padding-left: var(--sp-4); padding-right: var(--sp-4); }
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .footer__about { grid-column: 1 / -1; }
  .inbox__list.has-thread { display: none; }
  .inbox__list { border-right: none; }
}

/* Mobile only */
@media (max-width: 639px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .footer__grid   { grid-template-columns: 1fr 1fr; gap: 20px; }
  .footer__about  { max-width: 100%; }
  .footer__bottom { flex-direction: column; text-align: center; }
  .section { padding: var(--sp-8) 0; }
  .section__head { align-items: flex-start; flex-direction: column; gap: var(--sp-2); }
  .card--padded { padding: var(--sp-5); }
  .list__item { padding: var(--sp-3) var(--sp-4); }

  /* Stop iOS zooming the page when an input is focused */
  input, select, textarea { font-size: 16px !important; }

  /* Touch targets */
  .btn            { min-height: 44px; }
  .btn--sm        { min-height: 38px; }
  .dropdown__item { min-height: 44px; }
  .sidebar__link  { min-height: 44px; }
  .nav__icon-btn  { width: 40px; height: 40px; }

  /* Tables scroll rather than squash */
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .table-wrap table { min-width: 560px; }
}

/* Touch devices: hover effects are dead weight and cause stuck states */
@media (hover: none) and (pointer: coarse) {
  .card:hover    { box-shadow: none; }
  .gcard:hover   { box-shadow: none; border-color: var(--border-subtle); }
  .gcard:hover .gcard__media img { transform: none; }
  .jt-credit__pill:hover { transform: none; }
}

/* iPhone safe area */
@supports (padding: env(safe-area-inset-bottom)) {
  .bottom-nav { padding-bottom: env(safe-area-inset-bottom); }
}

/* Respect a user who has asked for less motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .jt-credit__pill:hover, .jt-credit__pill:focus-visible { transform: none; }
}

/* Admin section chips replace the sidebar below desktop width */
@media (min-width: 1024px) { .admin-mobile-nav { display: none; } }

/* Narrow phones: keep the header and admin chip rail inside the viewport */
.app-layout > .admin-mobile-nav { align-self: stretch; max-width: 100%; min-width: 0; }
@media (max-width: 359px) {
  .nav__inner   { gap: var(--sp-2); }
  .nav__actions { gap: 2px; }
  .nav__logo    { font-size: 1.2rem; }
}

/* Gadget page on phones: title, price and actions sit straight under the photos */
@media (max-width: 1023px) {
  .detail__main  { display: contents; }
  .detail__aside { order: 1; }
  .detail__about { order: 2; margin-top: 0; }
}

/* ============================================================
   GLASS LAYER
   Two soft lights sit behind every page: lagoon on the left for
   the gadget you have, mango on the right for the one you want.
   Panes frost what is behind them and catch light on the top edge.
   ============================================================ */
body { background: var(--bg-page); isolation: isolate; }
body::before {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(55% 45% at 6% 2%,   var(--glow-have), transparent 70%),
    radial-gradient(48% 40% at 100% 8%, var(--glow-want), transparent 70%),
    radial-gradient(50% 45% at 92% 96%, var(--glow-coral), transparent 70%),
    radial-gradient(60% 50% at 0% 100%, var(--glow-sky), transparent 70%),
    var(--bg-page);
}

:root { --blur: 18px; --blur-strong: 26px; }
@media (max-width: 767px) { :root { --blur: 12px; --blur-strong: 20px; } }

.card, .gcard, .stat, .step, .spot, .quote, .cat-tile, .chip, .panel,
.sidebar__group, .auth__panel, .owner-card, .empty, .table-wrap {
  -webkit-backdrop-filter: blur(var(--blur)) saturate(150%);
          backdrop-filter: blur(var(--blur)) saturate(150%);
}
.card, .gcard, .stat, .step, .spot, .quote, .cat-tile {
  border: 1px solid var(--glass-line);
  border-top-color: var(--glass-edge);
  box-shadow: var(--glass-shadow);
}
.card, .gcard, .spot, .quote, .step { border-radius: 20px; }
.panel { border: 1px solid var(--glass-line); border-radius: 20px; }

/* Bars and sheets: frosted harder, since content scrolls under them */
.nav, .bottom-nav, .modal__panel, .jt-drawer, .filters.is-open, .filters__apply, .sticky-cta, .chat__form {
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(var(--blur-strong)) saturate(170%);
          backdrop-filter: blur(var(--blur-strong)) saturate(170%);
}
.nav { border-bottom: 1px solid var(--glass-line); }
.bottom-nav { border-top: 1px solid var(--glass-edge); }
.modal { -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.modal__panel { border: 1px solid var(--glass-edge); }
.toast { -webkit-backdrop-filter: blur(var(--blur)); backdrop-filter: blur(var(--blur)); }

/* Fields read as recessed glass */
.input, .select, .textarea, .nav__search input { background: var(--bg-card); border-color: var(--glass-line); }
.input:focus, .select:focus, .textarea:focus, .nav__search input:focus { background: var(--bg-hover); }
.select option { background: var(--bg-solid); color: var(--text-primary); }

/* Buttons: brand is lagoon, primary is deep ink, soft is a glass pill */
.btn { border-radius: 14px; }
.btn--brand { box-shadow: 0 8px 20px -10px var(--brand); }
.btn--soft, .btn--ghost { background: var(--bg-card); border-color: var(--glass-line); }
.btn--soft:hover, .btn--ghost:hover { background: var(--bg-hover); }
.chip { background: var(--bg-card); border-color: var(--glass-line); }
.chip.active { background: var(--accent); border-color: var(--accent); }

/* Gadget card: the photo sits inside the pane like a screen in a bezel */
.gcard { overflow: hidden; padding: 6px; }
.gcard__media { border-radius: 15px; background: var(--bg-inset); }
.gcard__body { padding: var(--sp-3) var(--sp-2) var(--sp-2); }
.gcard__heart { background: var(--glass-strong); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: none; }
.gcard:hover { box-shadow: var(--glass-shadow), 0 18px 40px -18px rgba(11,37,48,.35); }
.ticket { background: var(--brand-light); border-radius: 10px; padding: 0 10px; }
.ticket::before { display: none; }

.cat-tile { border-radius: 18px; }
.cat-tile:hover { border-color: var(--brand); }
.stat--accent { background: var(--brand-light); }
.sidebar__group { background: var(--bg-surface); border: 1px solid var(--glass-line); border-radius: 18px; padding: var(--sp-2); }
.sidebar__link { border-radius: 12px; }
.sidebar__link.active { background: var(--bg-hover); box-shadow: none; color: var(--brand-ink); }
.list__item.unread { background: var(--brand-light); }
.specs { border-radius: 16px; overflow: hidden; }
.specs div { background: var(--bg-card); }

.slides { border-radius: 24px; border: 1px solid var(--glass-line); }
.band {
  background: linear-gradient(120deg, var(--brand) 0%, var(--brand-hover) 55%, var(--accent) 140%);
  color: var(--text-inverse); border-radius: 28px; position: relative; overflow: hidden;
}
.band h2, .band p { color: var(--text-inverse); }
.band p { opacity: .82; }
.band .btn--primary { background: var(--sun); color: var(--sun-ink); }
.band .btn--primary:hover { background: var(--sun); filter: brightness(1.05); color: var(--sun-ink); }

/* ============================================================
   HOME HERO: the swap tray. Say what you have, say what you want.
   ============================================================ */
.hero { position: relative; padding: var(--sp-10) 0 var(--sp-6); }
.hero__title {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(2.3rem, 9vw, 5.2rem); line-height: .98; letter-spacing: -.045em;
  max-width: 14ch; color: var(--text-primary);
}
.hero__lede { font-size: 1.0625rem; max-width: 44ch; margin-top: var(--sp-4); color: var(--text-secondary); }

.swapbar {
  position: relative; margin-top: var(--sp-8); max-width: 920px;
  display: grid; gap: 6px; padding: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--glass-line); border-top-color: var(--glass-edge);
  border-radius: 28px; box-shadow: var(--glass-shadow);
  -webkit-backdrop-filter: blur(var(--blur-strong)) saturate(160%);
          backdrop-filter: blur(var(--blur-strong)) saturate(160%);
}
.swapbar__slot {
  display: grid; gap: 2px; padding: 14px 18px 12px; border-radius: 21px;
  background: var(--bg-card); border: 1px solid var(--glass-line); cursor: text;
  transition: background var(--t-fast), border-color var(--t-fast);
}
.swapbar__slot:focus-within { background: var(--bg-hover); border-color: var(--brand); }
.swapbar__slot--have { box-shadow: inset 4px 0 0 var(--glow-have); }
.swapbar__slot--want { box-shadow: inset 4px 0 0 var(--glow-want); }
.swapbar__label { font-size: .8125rem; font-weight: 700; color: var(--text-tertiary); }
.swapbar__slot input {
  width: 100%; border: none; background: none; outline: none; padding: 0;
  font-size: 1.125rem; font-weight: 600; color: var(--text-primary); min-width: 0;
}
.swapbar__slot input::placeholder { color: var(--text-disabled); font-weight: 500; }
.swapbar__knob {
  justify-self: center; margin: -25px 0; position: relative; z-index: 2;
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--sun); color: var(--sun-ink);
  border: 4px solid var(--bg-solid); box-shadow: 0 6px 18px -6px rgba(255,140,0,.6);
}
.swapbar__knob .icon { transform: rotate(90deg); }
.swapbar__go { height: 56px; border-radius: 21px; font-size: 1rem; }
.hero__note { margin-top: var(--sp-4); font-size: .9375rem; color: var(--text-tertiary); }
.hero__note a { color: var(--brand); font-weight: 700; }

@media (min-width: 768px) {
  .hero { padding: var(--sp-16) 0 var(--sp-10); }
  .swapbar { grid-template-columns: 1fr 0 1fr auto; align-items: center; gap: 8px; }
  .swapbar__slot { align-self: stretch; }
  .swapbar__slot--want { padding-left: 30px; }
  .swapbar__knob { margin: 0 -22px; }
  .swapbar__knob .icon { transform: none; }
  .swapbar__go { align-self: stretch; height: auto; min-width: 162px; padding: 0 26px; }
}

.matchnote { display: flex; align-items: center; gap: 10px; padding: 12px 16px; margin-bottom: var(--sp-4); border-radius: 16px; background: var(--warning-bg); color: var(--text-primary); font-size: .9375rem; border: 1px solid var(--glass-line); }
.matchnote .icon { color: var(--warning); }
.gcard__match { position: absolute; left: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 9px; border-radius: 999px; background: var(--sun); color: var(--sun-ink); font-size: .72rem; font-weight: 700; }

/* Visitors who ask for less transparency get solid panes */
@media (prefers-reduced-transparency: reduce) {
  :root, [data-theme] { --bg-card: var(--bg-solid); --bg-surface: var(--bg-solid); --glass-strong: var(--bg-solid); }
  body::before { display: none; }
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  :root, [data-theme] { --bg-card: var(--bg-solid); --glass-strong: var(--bg-solid); }
}

/* Home rhythm: the hero hands straight over to the listings */
.hero + .section--tight { padding-top: var(--sp-2); }
@media (max-width: 767px) { .section--tight { padding: var(--sp-6) 0; } .hero { padding-bottom: var(--sp-4); } }

/* A swap is a sequence, so the steps share one pane and one rail */
.steps {
  gap: 0; padding: var(--sp-2) var(--sp-5); border-radius: 22px;
  background: var(--bg-card); border: 1px solid var(--glass-line); border-top-color: var(--glass-edge);
  box-shadow: var(--glass-shadow);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(150%); backdrop-filter: blur(var(--blur)) saturate(150%);
}
.step {
  background: none; border: none; box-shadow: none; border-radius: 0;
  -webkit-backdrop-filter: none; backdrop-filter: none;
  padding: var(--sp-4) 0 var(--sp-4) 52px;
}
.step + .step { border-top: 1px solid var(--border-subtle); }
.step::before { left: 0; top: var(--sp-4); width: 32px; height: 32px; border-radius: 50%; background: var(--brand-light); color: var(--brand-ink); }
.step:last-child::before { background: var(--sun); color: var(--sun-ink); }
.step:not(:last-child)::after {
  content: ''; position: absolute; left: 15.5px; top: calc(var(--sp-4) + 36px); bottom: calc(-1 * var(--sp-4) + 4px);
  width: 1px; background: var(--border-default);
}

/* Slides without a photo sit on lagoon glass, not a black slab */
.slides { background: linear-gradient(135deg, var(--slide-a), var(--slide-b)); }
.slide__body h2 { color: var(--jt-white); }
.slide__body p { color: var(--jt-white); opacity: .85; }
.slides .btn--soft { background: var(--slide-glass); border-color: var(--slide-glass-line); color: var(--jt-white); }
.slides .btn--soft:hover { background: var(--slide-glass-line); color: var(--jt-white); }

/* Hero board: what owners say they would take, read like a wanted wall */
.board { display: none; }
@media (min-width: 1024px) {
  .hero--board .hero__grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, .8fr); gap: var(--sp-10); align-items: end; }
  .board {
    display: block; padding: var(--sp-5); border-radius: 26px;
    background: var(--bg-card); border: 1px solid var(--glass-line); border-top-color: var(--glass-edge);
    box-shadow: var(--glass-shadow);
    -webkit-backdrop-filter: blur(var(--blur-strong)) saturate(160%); backdrop-filter: blur(var(--blur-strong)) saturate(160%);
  }
  .board__title { font-size: 1rem; font-weight: 700; letter-spacing: 0; margin-bottom: var(--sp-3); color: var(--text-secondary); }
  .board__list { display: grid; gap: 4px; }
  .board__item a { display: flex; align-items: center; gap: var(--sp-3); padding: 8px; border-radius: 16px; transition: background var(--t-fast); }
  .board__item a:hover { background: var(--bg-hover); color: inherit; }
  .board__thumb { width: 52px; height: 52px; border-radius: 12px; overflow: hidden; flex-shrink: 0; background: var(--bg-inset); display: flex; align-items: center; justify-content: center; color: var(--text-disabled); }
  .board__thumb img { width: 100%; height: 100%; object-fit: cover; }
  .board__text { display: grid; min-width: 0; line-height: 1.3; }
  .board__text strong { font-size: .9875rem; color: var(--text-primary); }
  .board__text span { font-size: .8125rem; color: var(--text-tertiary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

/* Quiet labels: sentence case reads calmer on glass than tracked capitals */
.label, .specs dt, .table th, .footer h4 { text-transform: none; letter-spacing: 0; }
.label { font-size: .8125rem; }
.specs dt { font-size: .8125rem; }
.table th { font-size: .8125rem; }
.footer h4 { font-size: .9375rem; }
.app-layout > .sidebar { margin-top: var(--sp-6); }

/* Language switch: a plain two-letter code, shown in the header from tablet up */
.nav__lang { display: none; font-size: .8125rem; font-weight: 700; letter-spacing: .02em; text-decoration: none; }
@media (min-width: 768px) { .nav__lang { display: inline-flex; } }
.footer__lang { display: inline-flex; gap: 4px; align-items: center; }
.footer__lang a[aria-current] { color: var(--text-on-footer); font-weight: 700; }

/* French versions of admin-written text fold away under the English fields */
.fr-fields { border: 1px dashed var(--border-default); border-radius: 14px; padding: 10px 14px; }
.fr-fields[open] { display: grid; gap: var(--sp-4); padding-bottom: 14px; }
.fr-fields summary { display: flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 700; font-size: .9375rem; color: var(--text-secondary); }
