/* =============================================================================
   premium.css — PremiumFreelancers design system  (mono + blue)
   ---------------------------------------------------------------------------
   Language : CLAY / CLAYMORPHISM. Soft, PUFFY surfaces. Depth comes from soft
              DUAL shadows (outer drop + inner top-light) on large radii — never
              borders. Shadows are extra-soft/plush so surfaces read as fluffy.
   Colour   : BLACK & WHITE base (neutral greys), with a tiny touch of ONE
              accent — classic social BLUE. Used sparingly: primary buttons,
              active nav, links/tags, key CTAs. Full light + dark via [data-theme].
   Texture  : faint dotted-grid on the body (never bare); no coloured wash.
   Nav      : floating soft capsule (mobile) + matching side rail (desktop),
              with a standalone round Create FAB.
   Shared by every page; pages add only tiny page-specific CSS on top.
   ========================================================================== */

/* ─────────────────────── NATIVE-APP PAGE TRANSITIONS ───────────────────────
   The app is multi-page (separate .html files). Cross-document View Transitions
   let the browser hold the OUTGOING page on screen until the incoming one has
   painted, then animate between them — so tapping a link no longer flashes a
   white "cold start". Supported in Chromium/Android (our main audience); older
   browsers simply navigate as before (graceful no-op). The persistent chrome
   (mobile dock + desktop side rail) is given stable transition names so it stays
   pinned and doesn't cross-fade with the body. */
@view-transition { navigation: auto; }

::view-transition-old(root),
::view-transition-new(root){ animation-duration:.22s; }

/* The shell chrome is identical on every page — keep it anchored across the
   navigation instead of fading it out and back in. */
.navdock { view-transition-name: ep-navdock; }
.siderail{ view-transition-name: ep-siderail; }

@media (prefers-reduced-motion: reduce){
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*){ animation: none !important; }
}

/* ───────────────────────── FONTS (item 31) ─────────────────────────
   DEFAULT font = Patrick Hand (the founder's choice — a warm handwritten face).
   Users can switch to any of 20+ curated fonts from the menu's "Reading font"
   picker — readable sans, rounded/playful, elegant serif and fancy handwriting,
   so Patrick Hand alone is never a hard requirement. The choice applies
   app-wide via <html data-font>. font-display:swap so text paints instantly and
   swaps in when the webfont lands (all non-default families are loaded lazily
   by App.ensureFontLoaded, not linked here). Patrick Hand ships a single 400
   weight, so heavier weights render at the browser's synthesized bold. */
:root{
  --font-patrick:'Patrick Hand','Comic Sans MS',system-ui,-apple-system,sans-serif;
  --font-system:system-ui,-apple-system,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;
  --font-inter:'Inter',system-ui,-apple-system,sans-serif;
  --font-lexend:'Lexend',system-ui,-apple-system,sans-serif;
  --font-worksans:'Work Sans',system-ui,-apple-system,sans-serif;
  --font-poppins:'Poppins',system-ui,-apple-system,sans-serif;
  --font-nunito:'Nunito',system-ui,-apple-system,sans-serif;
  --font-quicksand:'Quicksand',system-ui,-apple-system,sans-serif;
  --font-comfortaa:'Comfortaa',system-ui,-apple-system,sans-serif;
  --font-baloo:'Baloo 2',system-ui,-apple-system,sans-serif;
  --font-fredoka:'Fredoka',system-ui,-apple-system,sans-serif;
  --font-outfit:'Outfit',system-ui,-apple-system,sans-serif;
  --font-manrope:'Manrope',system-ui,-apple-system,sans-serif;
  --font-rubik:'Rubik',system-ui,-apple-system,sans-serif;
  --font-karla:'Karla',system-ui,-apple-system,sans-serif;
  --font-dmsans:'DM Sans',system-ui,-apple-system,sans-serif;
  --font-josefin:'Josefin Sans',system-ui,-apple-system,sans-serif;
  --font-raleway:'Raleway',system-ui,-apple-system,sans-serif;
  --font-playfair:'Playfair Display',Georgia,serif;
  --font-merriweather:'Merriweather',Georgia,serif;
  --font-lora:'Lora',Georgia,serif;
  --font-cormorant:'Cormorant Garamond',Georgia,serif;
  --font-caveat:'Caveat','Patrick Hand',cursive;
  --font-dancing:'Dancing Script',cursive;
  --font-pacifico:'Pacifico',cursive;
  --font-shadows:'Shadows Into Light',cursive;
  /* Active app font — Patrick Hand by default unless data-font switches it. */
  --font-app:var(--font-patrick);
}
html[data-font="patrick"]     { --font-app:var(--font-patrick); }
html[data-font="system"]      { --font-app:var(--font-system); }
html[data-font="inter"]       { --font-app:var(--font-inter); }
html[data-font="lexend"]      { --font-app:var(--font-lexend); }
html[data-font="worksans"]    { --font-app:var(--font-worksans); }
html[data-font="poppins"]     { --font-app:var(--font-poppins); }
html[data-font="nunito"]      { --font-app:var(--font-nunito); }
html[data-font="quicksand"]   { --font-app:var(--font-quicksand); }
html[data-font="comfortaa"]   { --font-app:var(--font-comfortaa); }
html[data-font="baloo"]       { --font-app:var(--font-baloo); }
html[data-font="fredoka"]     { --font-app:var(--font-fredoka); }
html[data-font="outfit"]      { --font-app:var(--font-outfit); }
html[data-font="manrope"]     { --font-app:var(--font-manrope); }
html[data-font="rubik"]       { --font-app:var(--font-rubik); }
html[data-font="karla"]       { --font-app:var(--font-karla); }
html[data-font="dmsans"]      { --font-app:var(--font-dmsans); }
html[data-font="josefin"]     { --font-app:var(--font-josefin); }
html[data-font="raleway"]     { --font-app:var(--font-raleway); }
html[data-font="playfair"]    { --font-app:var(--font-playfair); }
html[data-font="merriweather"]{ --font-app:var(--font-merriweather); }
html[data-font="lora"]        { --font-app:var(--font-lora); }
html[data-font="cormorant"]   { --font-app:var(--font-cormorant); }
html[data-font="caveat"]      { --font-app:var(--font-caveat); }
html[data-font="dancing"]     { --font-app:var(--font-dancing); }
html[data-font="pacifico"]    { --font-app:var(--font-pacifico); }
html[data-font="shadows"]     { --font-app:var(--font-shadows); }

/* ───────────────────────────── TOKENS ───────────────────────────── */
:root{
  /* light — crisp BLACK & WHITE: pure-white puffy cards on a soft light canvas */
  --bg:#e7e9ee; --bg-2:#e0e3ea;
  --surface:#ffffff; --surface-2:#f1f3f7; --surface-3:#e4e7ee; --surface-sunk:#eceef4;
  --line:rgba(0,0,0,.09); --dot:rgba(0,0,0,.05);
  --amb-1:rgba(29,111,224,.06); --amb-2:rgba(29,111,224,.035);  /* whisper-faint blue ambient */
  --text:#000000; --text-2:#23282e; --muted:#5d646d;

  /* ONE blue. --primary-2 is deliberately the SAME value as --primary: the accent
     is a flat colour everywhere, never a gradient. The alias only survives so the
     two decorative pulse outlines below keep resolving. */
  --primary:#1d6fe0; --primary-hover:#1558b8; --primary-2:#1d6fe0; --primary-ink:#ffffff;
  --primary-soft:rgba(29,111,224,.13); --primary-softer:rgba(29,111,224,.07);
  --accent:#1d6fe0; --accent-soft:rgba(29,111,224,.14);   /* accent folds into the blue */
  --gold:#f6a821; --success:#16a34a; --success-soft:rgba(22,163,74,.14); --warning:#f59e0b; --warning-soft:rgba(245,158,11,.15);
  --danger:#e23b54; --danger-soft:rgba(226,59,84,.13);

  --glass:rgba(255,255,255,.8); --glass-line:rgba(255,255,255,.75);

  /* radii — clay is generous + chunky (bumped for a puffier feel) */
  --r-xs:12px; --r-sm:16px; --r-md:22px; --r-lg:28px; --r-xl:34px; --r-2xl:44px; --r-full:999px;

  /* CLAY shadows — PUFFY/inflated: wide soft outer drop + bright inner top-light
     + inner BOTTOM shadow (the pillow effect that makes surfaces look inflated). */
  --sh-1:0 4px 11px rgba(20,24,31,.07), inset 0 2px 3px rgba(255,255,255,.95), inset 0 -4px 9px rgba(20,24,31,.05);
  --sh-2:0 10px 26px rgba(20,24,31,.10), 0 3px 8px rgba(20,24,31,.05), inset 0 3px 4px rgba(255,255,255,1), inset 0 -7px 13px rgba(20,24,31,.06);
  --sh-3:0 22px 48px rgba(20,24,31,.14), 0 8px 16px rgba(20,24,31,.07), inset 0 3px 4px rgba(255,255,255,1), inset 0 -8px 15px rgba(20,24,31,.06);
  --sh-4:0 36px 78px rgba(20,24,31,.20), 0 13px 30px rgba(20,24,31,.10), inset 0 3px 4px rgba(255,255,255,1), inset 0 -9px 17px rgba(20,24,31,.06);
  --sunk:inset 0 3px 9px rgba(20,24,31,.13), inset 0 1px 3px rgba(20,24,31,.08);
  --glow:0 10px 24px rgba(20,24,31,.13), inset 0 2px 3px rgba(255,255,255,.45);   /* neutral, no coloured halo */
  --glow-sm:0 4px 12px rgba(20,24,31,.11);

  /* type */
  --t-xs:12px; --t-sm:13.5px; --t-base:15px; --t-md:16px; --t-lg:18px;
  --t-xl:22px; --t-2xl:27px; --t-3xl:33px; --t-4xl:42px;

  --maxw:620px;
  --ease:.2s cubic-bezier(.34,1.2,.4,1);   /* gentle clay overshoot */
  --ease-1:.18s cubic-bezier(.4,0,.2,1);
  --safe-top:env(safe-area-inset-top,0px);
  --safe-bottom:env(safe-area-inset-bottom,0px);
  --nav-h:52px;
}
/* DARK — a layered NEUTRAL dark, not true black. Claymorphism needs a canvas
   that sits above pure #000: the puff comes from a lit top edge and a shadowed
   bottom edge, and on #000 neither has anywhere to go, so every surface flattens
   into the background and the whole app reads dead. Each step here is a real,
   visible tone apart (canvas → card → raised → sunk) so the depth survives, and
   a whisper of blue in the greys keeps it from looking like washed-out charcoal. */
[data-theme=dark]{
  --bg:#0c0e13; --bg-2:#090b0f;
  --surface:#161a22; --surface-2:#1e232d; --surface-3:#272d39; --surface-sunk:#0e1116;
  --line:rgba(255,255,255,.10); --dot:rgba(255,255,255,.05);
  --amb-1:rgba(61,132,255,.10); --amb-2:rgba(61,132,255,.05);   /* faint blue ambient, so the canvas isn't inert */
  --text:#f3f6fb; --text-2:#c4ccd9; --muted:#8b95a6;

  --primary:#3d84ff; --primary-hover:#5b98ff; --primary-2:#3d84ff; --primary-ink:#ffffff;
  --primary-soft:rgba(61,132,255,.20); --primary-softer:rgba(61,132,255,.10);
  --accent:#3d84ff; --accent-soft:rgba(61,132,255,.20);
  --danger:#ff5f78; --danger-soft:rgba(255,95,120,.18);
  --success:#33d68d; --success-soft:rgba(51,214,141,.16);
  --warning:#fbbf3c; --warning-soft:rgba(251,191,60,.18);
  --gold:#fbbf3c;

  --glass:rgba(14,17,22,.84); --glass-line:rgba(255,255,255,.10);

  /* dark clay: real outer drop (it registers now that the canvas isn't #000)
     + a brighter inner top-light and inner bottom shade for the pillow effect. */
  --sh-1:0 3px 9px rgba(0,0,0,.45), inset 0 1px 1px rgba(255,255,255,.07), inset 0 -3px 7px rgba(0,0,0,.35);
  --sh-2:0 10px 26px rgba(0,0,0,.52), 0 3px 8px rgba(0,0,0,.35), inset 0 1px 1px rgba(255,255,255,.09), inset 0 -5px 11px rgba(0,0,0,.38);
  --sh-3:0 20px 44px rgba(0,0,0,.58), 0 7px 16px rgba(0,0,0,.38), inset 0 1px 1px rgba(255,255,255,.10), inset 0 -6px 13px rgba(0,0,0,.40);
  --sh-4:0 34px 72px rgba(0,0,0,.66), 0 12px 28px rgba(0,0,0,.44), inset 0 1px 1px rgba(255,255,255,.12), inset 0 -7px 15px rgba(0,0,0,.40);
  --sunk:inset 0 3px 9px rgba(0,0,0,.60), inset 0 1px 3px rgba(0,0,0,.45);
  --glow:0 10px 26px rgba(0,0,0,.5), 0 0 0 1px rgba(61,132,255,.22), inset 0 1px 1px rgba(255,255,255,.16);
  --glow-sm:0 5px 14px rgba(0,0,0,.45), 0 0 0 1px rgba(61,132,255,.18);
}

/* ───────────────────────────── RESET ───────────────────────────── */
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html{-webkit-text-size-adjust:100%;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}
/* App background (a personal wallpaper photo, set via the menu's "App background"
   picker — App.applyBackground sets --app-bg-image on <html>). It's the BOTTOM
   layer of the body's background stack, shown at FULL fidelity (no tint/scrim —
   a wash over the photo just muddies it, and almost every surface in the app is
   already an opaque clay card, so legibility never actually depended on one).
   The dot texture + ambient glow still sit on top, but both are barely-there
   (very low alpha) so they don't visibly discolour the photo either.
   `cover`+`center`+`fixed` fits any screen (mobile first) without tiling or
   distortion. Falls back to `none` (fully transparent) when no wallpaper is
   set — zero visual change. */
body{margin:0;font-family:var(--font-app);color:var(--text);
  font-size:var(--t-base);line-height:1.5;overflow-x:hidden;min-height:100dvh;letter-spacing:-.005em;
  background-color:var(--bg);
  background-image:
    radial-gradient(115% 60% at 50% -12%, var(--amb-1), transparent 60%),
    radial-gradient(80% 50% at 100% 0%, var(--amb-2), transparent 55%),
    radial-gradient(var(--dot) 1.1px, transparent 1.2px),
    var(--app-bg-image, none);
  background-repeat:no-repeat,no-repeat,repeat,no-repeat;
  background-size:auto,auto,24px 24px,cover;
  background-position:center top,right top,-12px -12px,center;
  background-attachment:fixed,fixed,fixed,fixed;
  padding-bottom:calc(var(--nav-h) + 26px + var(--safe-bottom));
  transition:background-color .3s ease,color .3s ease;}
h1,h2,h3,h4{line-height:1.18;margin:0 0 .45em;letter-spacing:-.02em;font-weight:700}
p{margin:0 0 .8em}
a{color:var(--primary);text-decoration:none}
img,video{max-width:100%;display:block}
button{font-family:inherit;color:inherit}
input,textarea,select{font-family:inherit}
::selection{background:var(--primary-soft)}
::-webkit-scrollbar{width:0;height:0}
*{scrollbar-width:none}
@media (prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}
:focus-visible{outline:2.5px solid var(--primary);outline-offset:2px}

/* ───────────────────────────── LAYOUT ───────────────────────────── */
.app{max-width:var(--maxw);margin:0 auto;padding:0 15px}
.sectitle{font-size:var(--t-xl);font-weight:700;margin:18px 0 12px}
.row-between{display:flex;align-items:center;justify-content:space-between;gap:10px}
.muted{color:var(--muted)}
.hint{color:var(--muted);font-size:var(--t-xs);margin:6px 0 0;line-height:1.5}

/* topbar — transparent clay header. Stays see-through (never a box); the icons +
   avatar each ride their own clay chip so they read clearly over the canvas. */
.topbar{position:sticky;top:0;z-index:40;display:flex;align-items:center;gap:8px;
  padding:calc(11px + var(--safe-top)) 15px 11px;max-width:var(--maxw);margin:0 auto;
  background:none}
.topbar__logo{display:flex;align-items:center;gap:10px;font-weight:800;font-size:var(--t-lg);color:var(--text);letter-spacing:-.03em}
.topbar__spacer{flex:1}
/* brand wordmark — "e.archive", the "e." in green. No icon, no bolt. */
.brand{font-weight:800;letter-spacing:-.04em;color:var(--text);white-space:nowrap}
.brand b{color:var(--primary);font-weight:800}
/* ── raised clay logo: the wordmark sits on a layered claymorphism chip,
      with a soft emerald gradient on the "e." (topbar + side rail only) ── */
.topbar__logo .brand,
.siderail__brand .brand{
  display:inline-flex;align-items:center;padding:8px 16px;border-radius:var(--r-full);
  background:linear-gradient(150deg,var(--surface),var(--surface-2));
  box-shadow:var(--sh-2);transition:var(--ease)}
.topbar__logo .brand:hover,
.siderail__brand .brand:hover{box-shadow:var(--sh-3);transform:translateY(-1px)}
.topbar__logo .brand:active,
.siderail__brand .brand:active{transform:scale(.97)}
.topbar__logo .brand b,
.siderail__brand .brand b{ color:var(--primary) }
/* legacy mark kept for pages not yet rebuilt (clean square, no bolt) */
.logo-dot{width:28px;height:28px;border-radius:9px;flex:0 0 auto;
  background:var(--primary);
  display:grid;place-items:center;color:var(--primary-ink);font-size:13px;font-weight:800}
.logo-dot::after{content:'e'}

/* icon button — puffy clay circle */
.icon-btn{position:relative;width:44px;height:44px;border-radius:var(--r-full);border:none;background:var(--surface);
  color:var(--text);display:grid;place-items:center;cursor:pointer;font-size:16px;box-shadow:var(--sh-1);transition:var(--ease)}
.icon-btn:hover{background:var(--surface-2)}
.icon-btn:active{transform:scale(.88)}
.icon-btn .dot{position:absolute;top:2px;right:2px;min-width:17px;height:17px;padding:0 4px;
  background:var(--accent);color:#fff;border-radius:var(--r-full);font-size:9px;font-weight:800;display:grid;place-items:center;
  box-shadow:0 2px 6px rgba(0,0,0,.25);border:2px solid var(--bg)}

/* AI ASSISTANT — the glowing wand in the header (still a squishy clay chip, just
   alive with a breathing emerald glow so it reads as "ask me anything"). */
.icon-btn--ai{color:var(--primary);animation:aiGlow 2.6s ease-in-out infinite}
.icon-btn--ai i{position:relative;z-index:1}
.icon-btn--ai::after{content:'';position:absolute;inset:-3px;border-radius:inherit;
  background:radial-gradient(circle at 50% 50%,var(--primary-soft),transparent 70%);
  opacity:.7;z-index:0;pointer-events:none;animation:aiPulse 2.6s ease-in-out infinite}
@keyframes aiGlow{0%,100%{box-shadow:var(--sh-1),0 0 0 0 var(--primary-soft)}
  50%{box-shadow:var(--sh-1),0 0 16px 2px var(--primary-soft)}}
@keyframes aiPulse{0%,100%{transform:scale(.92);opacity:.45}50%{transform:scale(1.12);opacity:.85}}
@media(prefers-reduced-motion:reduce){.icon-btn--ai,.icon-btn--ai::after{animation:none}}

/* assistant modal — a small chat surface with a live mic */
.ai{display:flex;flex-direction:column;height:min(72dvh,560px);max-height:72dvh}
.ai__head{display:flex;align-items:center;gap:11px;padding-bottom:12px;border-bottom:1px solid var(--line,rgba(128,128,128,.18))}
.ai__orb{width:40px;height:40px;flex:0 0 auto;border-radius:var(--r-full);display:grid;place-items:center;
  background:var(--primary-soft);color:var(--primary);font-size:17px}
.ai__head h3{margin:0;font-size:var(--t-md)}
.ai__head p{margin:1px 0 0;font-size:11px;color:var(--muted)}
.ai__log{flex:1;overflow-y:auto;padding:14px 2px;display:flex;flex-direction:column;gap:11px}
.ai-msg{max-width:84%;padding:10px 13px;border-radius:16px;font-size:var(--t-sm);line-height:1.5;white-space:pre-wrap;word-wrap:break-word}
.ai-msg--bot{align-self:flex-start;background:var(--surface-2);color:var(--text);border-bottom-left-radius:5px}
.ai-msg--me{align-self:flex-end;background:var(--primary);color:#fff;border-bottom-right-radius:5px}
.ai-msg--typing{display:inline-flex;gap:4px;align-items:center}
.ai-msg--typing i{width:6px;height:6px;border-radius:50%;background:var(--muted);animation:aiDot 1s infinite}
.ai-msg--typing i:nth-child(2){animation-delay:.15s}.ai-msg--typing i:nth-child(3){animation-delay:.3s}
@keyframes aiDot{0%,60%,100%{opacity:.3;transform:translateY(0)}30%{opacity:1;transform:translateY(-3px)}}
.ai__hint{align-self:center;font-size:11px;color:var(--muted);text-align:center;padding:2px 8px}
.ai__bar{display:flex;align-items:flex-end;gap:9px;padding-top:11px;border-top:1px solid var(--line,rgba(128,128,128,.18))}
.ai__ta{flex:1;border:none;background:var(--surface-2);border-radius:var(--r-lg);resize:none;outline:none;
  color:var(--text);font:inherit;font-size:var(--t-sm);line-height:1.45;padding:11px 14px;max-height:110px}
.ai__mic{flex:0 0 auto;width:46px;height:46px;border:none;border-radius:var(--r-full);cursor:pointer;
  display:grid;place-items:center;font-size:17px;background:var(--surface-2);color:var(--text);transition:var(--ease)}
.ai__mic:active{transform:scale(.9)}
.ai__mic--live{background:var(--primary);color:#fff;animation:aiMic 1.4s ease-in-out infinite}
@keyframes aiMic{0%,100%{box-shadow:0 0 0 0 var(--primary-soft)}50%{box-shadow:0 0 0 8px transparent}}
.ai__send{flex:0 0 auto;width:46px;height:46px;border:none;border-radius:var(--r-full);cursor:pointer;
  display:grid;place-items:center;font-size:16px;background:var(--primary);color:#fff;transition:var(--ease)}
.ai__send:active{transform:scale(.9)}.ai__send:disabled{opacity:.45;cursor:default}
/* "Show me on screen" CTA appended to an answer — launches the live walkthrough */
.ai__showme{align-self:flex-start;margin-top:-3px}

/* ── Archie SPOTLIGHT / guided walkthrough (item 8 — AI guide replaces the tour).
   A dim veil (via the ring's huge box-shadow) with the real target punched out,
   a green ring + soft pulse, and an interactive coach bubble. The overlay itself
   is click-through so the highlighted control stays fully tappable. ── */
.spot{position:fixed;inset:0;z-index:250;pointer-events:none}
.spot__ring{position:absolute;border-radius:14px;box-shadow:0 0 0 9999px rgba(0,0,0,.55);
  outline:3px solid var(--primary);outline-offset:2px;transition:top .2s ease,left .2s ease,width .2s ease,height .2s ease;pointer-events:none}
.spot__pulse{position:absolute;border-radius:16px;outline:3px solid var(--primary-2);opacity:.55;
  animation:spotPulse 1.6s ease-out infinite;pointer-events:none}
@keyframes spotPulse{0%{transform:scale(1);opacity:.55}100%{transform:scale(1.14);opacity:0}}
.spot__coach{position:absolute;pointer-events:auto;max-width:300px;width:calc(100vw - 32px);
  background:var(--surface);color:var(--text);border-radius:var(--r-lg);box-shadow:var(--sh-4);padding:15px 16px}
.spot__coach h4{margin:0 0 6px;font-size:var(--t-md);display:flex;align-items:center;gap:8px}
.spot__coach h4 i{color:var(--primary)}
.spot__txt{margin:0;font-size:var(--t-sm);line-height:1.5;color:var(--text)}
.spot__row{display:flex;align-items:center;gap:8px;margin-top:14px}
.spot__step{font-size:11px;color:var(--muted);margin-right:auto}
.spot__btn{border:none;border-radius:var(--r-full);cursor:pointer;font:inherit;font-weight:700;font-size:var(--t-sm);padding:9px 16px;transition:var(--ease)}
.spot__btn--next{background:var(--primary);color:var(--primary-ink)}
.spot__btn--skip{background:var(--surface-2);color:var(--muted)}
.spot__btn:active{transform:scale(.93)}
@media(prefers-reduced-motion:reduce){.spot__pulse{animation:none;opacity:.4}.spot__ring{transition:none}}

/* surface tabs (Archive | Memes | Games | Apps) */
.surfaces{display:flex;gap:9px;max-width:var(--maxw);margin:0 auto;padding:6px 15px 6px;overflow-x:auto}
.surface-tab{flex:0 0 auto;display:inline-flex;align-items:center;gap:8px;padding:10px 18px;border-radius:var(--r-full);
  background:var(--surface);color:var(--muted);font-weight:700;font-size:var(--t-sm);box-shadow:var(--sh-1);transition:var(--ease)}
.surface-tab:active{transform:scale(.95)}
.surface-tab--active{background:var(--primary);color:var(--primary-ink);box-shadow:var(--glow-sm)}

/* segmented tabs (sunken track + raised active) */
.tabs{display:flex;gap:5px;background:var(--surface-sunk);border-radius:var(--r-full);padding:5px;margin:14px 0;box-shadow:var(--sunk)}
.tab{flex:1;padding:10px;border:none;background:none;color:var(--muted);font-weight:700;border-radius:var(--r-full);cursor:pointer;font-size:var(--t-sm);transition:var(--ease-1)}
.tab--active{background:var(--surface);color:var(--text);box-shadow:var(--sh-2)}

/* ───────────────────────────── CARDS ───────────────────────────── */
.card{background:var(--surface);border:none;border-radius:var(--r-lg);padding:18px;box-shadow:var(--sh-2)}
.card--glow{background:var(--primary-softer)}

/* ─────────────────────── POST / FEED ITEM ─────────────────────── */
.post{background:var(--surface);border:none;border-radius:var(--r-lg);padding:17px 18px;margin-bottom:14px;
  box-shadow:var(--sh-2);transition:box-shadow .2s,transform .2s}
.post:hover{box-shadow:var(--sh-3)}
/* Brief "just posted" flash so the author sees their new post land at the top of the feed. */
.post--justposted{animation:postFlash 2.2s ease-out}
@keyframes postFlash{0%{box-shadow:0 0 0 2px var(--primary) inset,var(--sh-3)}70%{box-shadow:0 0 0 2px var(--primary) inset,var(--sh-3)}100%{box-shadow:var(--sh-2)}}
@media (prefers-reduced-motion:reduce){.post--justposted{animation:none}}
.post__head{display:flex;align-items:center;gap:11px;margin-bottom:10px}
.post__meta{display:flex;flex-direction:column;line-height:1.25;min-width:0}
/* Shared "long name" guard: a flex item that shrinks and ellipsizes instead of
   wrapping or bleeding past its box. Any name/handle/community label sitting next
   to a badge or icon uses this on the TEXT SPAN ONLY, keeping badges un-clipped. */
.name-trunc{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
.post__name{font-weight:700;display:flex;align-items:center;gap:5px;min-width:0}
.post__handle{color:var(--muted);font-size:var(--t-xs)}
.post__from{display:inline-flex;align-items:center;gap:4px;color:var(--primary);font-weight:700;cursor:pointer;max-width:150px;vertical-align:bottom}
.post__from i{font-size:.85em;flex-shrink:0}
.post__from:hover{text-decoration:underline}
.post__approved{display:inline-flex;align-items:center;gap:4px;color:var(--success);font-weight:700}
.post__approved i{font-size:.9em}
.post__more{margin-left:auto}
.post__approve-btn{color:var(--muted)}
.post__approve-btn--on{color:var(--success)}
/* Inline Follow pill on a post card — sits between the author meta and the ⋯ menu.
   Clay, no borders (depth via shadows): green gradient when Follow, plain clay
   surface when Following. */
.post__follow{margin-left:auto;display:inline-flex;align-items:center;gap:6px;font-weight:800;
  font-size:var(--t-xs);line-height:1;padding:8px 15px;border:0;border-radius:var(--r-full);flex:none;
  -webkit-appearance:none;appearance:none;cursor:pointer;white-space:nowrap;
  color:var(--primary-ink);background:var(--primary);
  box-shadow:var(--glow-sm);transition:var(--ease)}
.post__follow:active{transform:scale(.93)}
.post__follow.is-following{background:var(--surface);color:var(--muted);box-shadow:var(--sh-1)}
.post__follow + .post__more{margin-left:8px}
.post__body{white-space:pre-wrap;word-break:break-word;line-height:1.55}
/* Reshare: a quoted card of the ORIGINAL post nested inside the reshare. Depth via
   inset shadow (no border), same clay language, one step sunk from the host card. */
.post__reshare{margin-top:11px;padding:12px 14px;border-radius:var(--r-md);
  background:var(--surface-2);box-shadow:inset 0 0 0 1px var(--line)}
.post__reshare-head{display:flex;align-items:center;gap:8px;min-width:0}
.post__reshare-name{font-weight:700;font-size:var(--t-sm);display:inline-flex;align-items:center;gap:4px;min-width:0;max-width:100%}
.post__reshare-handle{color:var(--muted);font-size:var(--t-xs);white-space:nowrap}
.post__reshare-body{margin-top:6px;white-space:pre-wrap;word-break:break-word;line-height:1.5;font-size:var(--t-sm)}
.reshare__vid{margin-top:8px;display:inline-flex;align-items:center;gap:7px;font-size:var(--t-xs);
  font-weight:700;color:var(--muted);background:var(--surface-sunk);padding:6px 11px;border-radius:var(--r-full)}
/* Accent (app-colour) picker grid — item 25 */
.accent-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(52px,1fr));gap:12px}
.accent-cell{width:100%;aspect-ratio:1;border:none;border-radius:var(--r-md);cursor:pointer;
  box-shadow:var(--sh-2);transition:transform var(--ease)}
.accent-cell:active{transform:scale(.9)}
.accent-cell--on{box-shadow:var(--sh-2),inset 0 0 0 3px #fff,inset 0 0 0 6px rgba(0,0,0,.35)}
/* Reading-font picker (item 31) */
.font-list{display:flex;flex-direction:column;gap:10px}
.font-opt{display:flex;flex-direction:column;gap:2px;text-align:left;width:100%;
  padding:12px 14px;border-radius:var(--r-md);background:var(--surface-sunk);color:var(--text);
  box-shadow:var(--sh-1);cursor:pointer;transition:var(--ease)}
.font-opt:hover{transform:translateY(-1px);box-shadow:var(--sh-2)}
.font-opt:active{transform:translateY(1px)}
.font-opt--on{box-shadow:var(--sh-2),inset 0 0 0 2px var(--primary)}
.font-opt__name{font-size:var(--t-lg);font-weight:800}
.font-opt__desc{font-size:var(--t-xs);color:var(--muted)}
.font-opt__sample{font-size:var(--t-md);color:var(--text-2);margin-top:4px}
/* App-background picker preview — same sunk clay well as .edit-cover */
.bg-preview{position:relative;width:100%;height:140px;border-radius:var(--r-md);overflow:hidden;
  background:var(--surface-sunk);background-size:cover;background-position:center;box-shadow:var(--sunk);
  display:grid;place-items:center;color:var(--muted);font-size:26px}
/* Mandatory install wall — item 10 */
#ep-wall{position:fixed;inset:0;z-index:9000;background:var(--bg);display:flex;align-items:center;
  justify-content:center;padding:22px;overflow:auto}
#ep-wall .wall__card{max-width:440px;width:100%;background:var(--surface);border-radius:var(--r-2xl);
  padding:26px 22px;box-shadow:var(--sh-3);text-align:center}
#ep-wall .wall__brand{font-size:var(--t-lg);margin-bottom:14px}
#ep-wall .wall__h{font-size:var(--t-2xl);font-weight:800;margin:0 0 8px}
#ep-wall .wall__p{color:var(--muted);margin:0 0 16px;line-height:1.5}
#ep-wall .wall__benefits{list-style:none;margin:0 0 18px;padding:0;text-align:left;display:flex;flex-direction:column;gap:9px}
#ep-wall .wall__benefits li{display:flex;align-items:center;gap:11px;font-weight:600;font-size:var(--t-sm)}
#ep-wall .wall__benefits i{width:34px;height:34px;flex:none;display:grid;place-items:center;border-radius:var(--r-md);
  background:var(--primary-soft);color:var(--primary);box-shadow:var(--sh-1)}
#ep-wall .wall__steps{display:flex;flex-direction:column;gap:10px;margin-bottom:14px}
#ep-wall .wall__step{display:flex;align-items:center;gap:12px;text-align:left;background:var(--surface-2);
  border-radius:var(--r-lg);padding:12px 14px;box-shadow:var(--sh-1)}
#ep-wall .wall__step.is-done{opacity:.75}
#ep-wall .wall__num{width:30px;height:30px;flex:none;display:grid;place-items:center;border-radius:var(--r-full);
  background:var(--primary);color:var(--primary-ink);font-weight:800;font-size:14px}
#ep-wall .wall__stxt{flex:1;min-width:0}
#ep-wall .wall__stxt b{display:block;font-size:var(--t-sm)}
#ep-wall .wall__stxt span{color:var(--muted);font-size:var(--t-xs)}
#ep-wall .wall__ios{background:var(--primary-soft);color:var(--primary);border-radius:var(--r-md);padding:11px 13px;
  font-size:var(--t-sm);font-weight:600;margin-bottom:14px}
#ep-wall .wall__prog{height:8px;background:var(--surface-sunk);border-radius:var(--r-full);overflow:hidden;margin:6px 0 12px}
#ep-wall .wall__prog>span{display:block;height:100%;background:var(--primary);
  border-radius:var(--r-full);transition:width .4s var(--ease)}
#ep-wall .wall__foot{color:var(--muted);font-size:var(--t-xs);margin:0}
#ep-wall .wall__big-ic{width:64px;height:64px;margin:0 auto 12px;display:grid;place-items:center;
  font-size:28px;border-radius:var(--r-lg);background:var(--primary-soft);color:var(--primary);box-shadow:var(--sh-1)}
#ep-wall .wall__prog--anim{position:relative}
#ep-wall .wall__prog--anim>span{position:absolute;left:0;width:40%;animation:wallprog 1.1s var(--ease-1) infinite}
@keyframes wallprog{0%{left:-40%;width:40%}50%{width:55%}100%{left:100%;width:40%}}
/* External links in body text (item 30) — short, secure, tidy */
.ext-link{display:inline-flex;align-items:center;gap:4px;color:var(--primary);font-weight:600;
  text-decoration:none;background:var(--primary-soft);padding:1px 8px;border-radius:var(--r-full);
  max-width:100%;vertical-align:baseline}
.ext-link i{font-size:.85em}
.ext-link:hover{text-decoration:underline}
/* Rich link preview card (item 30) — clay, no border, secure. Image is optional. */
.lnk-prev-slot:empty{display:none}
.lnk-prev{display:flex;flex-direction:column;margin-top:10px;border-radius:var(--r-lg);overflow:hidden;
  background:var(--surface-2);box-shadow:var(--sh-2);text-decoration:none;color:inherit;max-width:520px;
  transition:box-shadow .2s,transform .2s}
.lnk-prev:hover{box-shadow:var(--sh-3)}
.lnk-prev:active{transform:scale(.994)}
.lnk-prev__img{width:100%;aspect-ratio:1.91/1;background:var(--surface-sunk);overflow:hidden;box-shadow:var(--sunk)}
.lnk-prev__img img{width:100%;height:100%;object-fit:cover;display:block}
.lnk-prev__body{display:flex;flex-direction:column;gap:3px;padding:11px 13px}
.lnk-prev__site{display:inline-flex;align-items:center;gap:6px;font-size:var(--t-xs);font-weight:700;
  color:var(--primary);text-transform:lowercase;letter-spacing:.01em}
.lnk-prev__title{font-size:var(--t-sm);font-weight:800;color:var(--text);line-height:1.35;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.lnk-prev__desc{font-size:var(--t-xs);color:var(--muted);line-height:1.45;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
/* Discussion composer attachment preview (item 30, mirrors the comment sheet). */
.disc__attach{margin-bottom:8px}
/* Reel comment sheet reuses .cmt-sheet; give the board a touch more breathing room. */
.reel-cmt-sheet .disc__list{max-height:52vh;overflow-y:auto}
/* Media reserves its space BEFORE the image loads (fixed 4/5 tile, IG-style) so a
   loading image never shoves the rest of the feed down — zero layout shift. The
   image is already cover-cropped, so a fixed ratio costs nothing it didn't already
   crop. Ads keep their natural ratio (creatives vary) — see .post--ad below. */
.post__media{margin-top:11px;border-radius:var(--r-md);overflow:hidden;box-shadow:var(--sh-2);
  aspect-ratio:4/5;background:var(--surface-2);position:relative;transition:box-shadow .2s,transform .2s}
.post__media:hover{box-shadow:var(--sh-3);transform:translateY(-1px)}
.post__media img,.post__media video{width:100%;height:100%;object-fit:cover;display:block}

/* sponsored card — blends into any feed/grid as a normal post, with a subtle tint */
.post--ad{background:var(--primary-softer)}
/* the media on an ad is an <a> (anchor) — force block + clip + round so the image
   has the same soft corners as the rest of the card (anchors won't clip otherwise) */
.post--ad .post__media{display:block;margin-top:11px;border-radius:var(--r-md);overflow:hidden;aspect-ratio:auto;box-shadow:var(--sh-2)}
.post--ad .post__media img{display:block;width:100%;height:auto;object-fit:contain;border-radius:var(--r-md)}
.ad-avatar{width:42px;height:42px;flex:0 0 auto;border-radius:var(--r-full);display:grid;place-items:center;
  background:var(--primary);color:var(--primary-ink);font-size:15px;box-shadow:var(--sh-1)}
/* CTA spans the full post width (same as the image) and is centred, with breathing room above */
.ad-cta{margin-top:14px;width:100%;display:flex;align-items:center;justify-content:center;gap:8px}
/* in a card grid (games/apps) a sponsored card spans the full row */
.grid>.post--ad{grid-column:1/-1;margin-bottom:0}

/* custom in-feed video player (no native controls / no autoplay) */
.vplayer{position:relative;cursor:pointer;background:#000}
/* fills the reserved 4/5 media box; contain (not cover) so video is never cropped. */
.vplayer video{display:block;width:100%;height:100%;object-fit:contain;background:#000}
.vplayer__btn{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:62px;height:62px;border-radius:var(--r-full);
  border:none;background:rgba(0,0,0,.5);color:#fff;font-size:22px;padding-left:4px;display:grid;place-items:center;cursor:pointer;
  -webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);transition:opacity .2s,transform .15s}
.vplayer__btn:active{transform:translate(-50%,-50%) scale(.9)}
.vplayer--playing .vplayer__btn{opacity:0;pointer-events:none}
.vplayer__bar{position:absolute;left:0;right:0;bottom:0;height:4px;background:rgba(255,255,255,.22)}
.vplayer__bar>i{display:block;height:100%;width:0;background:var(--primary);transition:width .15s linear}

/* action bar shared by feed / post / community — icon-only (no text labels),
   counts shown as a compact chip next to the icon (e.g. 12.3k). */
.actbar{display:flex;justify-content:space-between;align-items:center;margin-top:20px}
.actbar__grp{display:flex;align-items:center;gap:2px}
.act{display:inline-flex;align-items:center;gap:6px;min-width:40px;height:40px;padding:0 11px;border:none;background:none;
  color:var(--muted);border-radius:var(--r-full);cursor:pointer;font-size:var(--t-sm);font-weight:700;transition:var(--ease-1)}
.act:hover{color:var(--text)}
.act:active{transform:scale(.88)}
.act--grow{flex:1}
.act--liked{color:var(--accent)}
.act--saved{color:var(--primary)}
.act .ic{font-size:18px;line-height:1}
.act__n{font-size:var(--t-sm);font-weight:700;font-variant-numeric:tabular-nums;line-height:1}

/* ───────────────────── CUSTOM EMOJI (Noto images) ───────────────────── */
/* inline emoji in text/labels — sized to the line, never a tofu box */
.emo{display:inline-block;width:1.25em;height:1.25em;vertical-align:-.22em;margin:0 .02em;object-fit:contain}
.emo--18{width:19px;height:19px;vertical-align:middle;margin:0}
.emo--28{width:30px;height:30px;vertical-align:middle;margin:0}
@keyframes emo-pop{0%{transform:scale(.4);opacity:.3}60%{transform:scale(1.35)}100%{transform:scale(1)}}
.emo--burst{animation:emo-pop .45s cubic-bezier(.34,1.5,.4,1)}

/* ═══════════════════════════════════════════════════════════════════════════
   NEW POST ACTION BUTTONS - Complete clay/puffy redesign for ALL action buttons
   (react, comment, share, bookmark) - All use same new design system
   ═══════════════════════════════════════════════════════════════════════════ */

/* Container for all action buttons */
.post-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  gap: 6px;
}

.post-actions__left {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Individual action button - clay puffy circle design */
.post-action-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  transition: transform 0.15s cubic-bezier(0.34, 1.2, 0.4, 1);
}

.post-action-btn:hover {
  transform: translateY(-1px);
}

.post-action-btn:active {
  transform: scale(0.92);
}

/* The puffy clay circle that contains the icon. Depth comes from the shared
   --sh-* tokens so it stays correct in BOTH themes — the hand-rolled rgba
   shadows this replaced were tuned for dark only and went invisible on light. */
.post-action-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface-2);
  box-shadow: var(--sh-1);
  transition: all 0.2s cubic-bezier(0.34, 1.2, 0.4, 1);
}

.post-action-btn:hover .post-action-icon {
  background: var(--surface-3);
  box-shadow: var(--sh-2);
}

/* Icon inside the circle */
.post-action-icon i {
  font-size: 16px;
  color: var(--muted);
  transition: color 0.2s ease;
}

/* Emoji inside the circle (for reactions) */
.post-action-icon .post-action-emoji {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

/* Active state — when the button is "on" (liked, bookmarked). */
.post-action-btn--active .post-action-icon {
  background: var(--primary-soft);
  box-shadow: var(--sh-1), 0 0 0 1.5px var(--primary);
}

.post-action-btn--active .post-action-icon i {
  color: var(--primary);
}

/* Count badge next to icon */
.post-action-count {
  font-size: var(--t-xs);
  font-weight: 700;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
  line-height: 1;
  padding: 0 2px;
}

.post-action-btn--active .post-action-count {
  color: var(--primary);
}

/* Special styling for bookmark button on the right */
.post-action-btn--bookmark .post-action-icon i {
  font-size: 15px;
}

/* Reaction picker popup - updated for new design */
.post-reaction-picker {
  position: fixed;
  display: flex;
  gap: 6px;
  padding: 10px 12px;
  background: var(--surface);
  border-radius: var(--r-full);
  box-shadow: var(--sh-4);
  z-index: 9999;
  opacity: 0;
  transition: all 0.22s cubic-bezier(0.34, 1.3, 0.4, 1);
  pointer-events: none;
  white-space: nowrap; /* Prevent wrapping */
  max-width: calc(100vw - 20px); /* Don't exceed viewport */
  transform: scale(0.8);
}

.post-reaction-picker--visible {
  opacity: 1;
  pointer-events: auto;
}

/* Mobile adjustments */
@media (max-width: 480px) {
  .post-reaction-picker {
    gap: 4px;
    padding: 8px 10px;
    bottom: calc(100% + 10px);
  }
  
  .post-reaction-picker button {
    width: 34px;
    height: 34px;
  }
  
  .post-reaction-picker .post-action-emoji {
    width: 26px;
    height: 26px;
  }
}

.post-reaction-picker button {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  border-radius: 50%;
  line-height: 0;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s cubic-bezier(0.34, 1.4, 0.4, 1);
}

.post-reaction-picker button:hover {
  transform: scale(1.3) translateY(-3px);
}

.post-reaction-picker button:active {
  transform: scale(1.1);
}

.post-reaction-picker .post-action-emoji {
  width: 30px;
  height: 30px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   END NEW POST ACTION BUTTONS
   ═══════════════════════════════════════════════════════════════════════════ */

/* ───────────────────── OLD REACTIONS (keeping for backward compatibility) ───────────────────── */
.rxn{position:relative}
.rxn__face{display:inline-flex;align-items:center;line-height:1}

/* New reaction button design with always-visible circle */
.act-react {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  cursor: pointer;
  padding: 6px;
  border-radius: var(--r-full);
  transition: var(--ease);
}
.act-react:hover {
  background: var(--surface-2);
}
.act-react__circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--r-full);
  background: var(--surface-2);
  transition: var(--ease);
}
.act-react__circle i {
  font-size: 16px;
  color: var(--muted);
}
.act-react__circle .emo {
  width: 20px;
  height: 20px;
}
.act-react--active .act-react__circle {
  background: var(--primary-soft);
}
.act-react--active .act-react__circle i {
  color: var(--primary);
}

.rxn-pop{position:absolute;bottom:calc(100% + 10px);left:0;display:flex;gap:4px;padding:8px 11px;
  background:var(--surface);border-radius:var(--r-full);box-shadow:var(--sh-4);z-index:30;
  transform:scale(.7) translateY(8px);opacity:0;transform-origin:bottom left;transition:var(--ease)}
.rxn-pop--in{transform:none;opacity:1}
.rxn-pop button{background:none;border:none;line-height:0;cursor:pointer;padding:4px;border-radius:var(--r-full);transition:transform .14s cubic-bezier(.34,1.4,.4,1)}
.rxn-pop button:hover{transform:scale(1.4) translateY(-4px)}
.rxn__lbl{font-weight:700}
.act--liked .rxn__lbl{color:var(--accent)}

/* public reaction summary (stacked faces + total) — visible to everyone */
.rxn-sum-slot:empty{display:none}
.rxn-sum-slot{margin:11px 0 2px}
.rxn-sum{display:inline-flex;align-items:center;gap:7px;padding:3px 4px;border:none;background:none;cursor:pointer;
  color:var(--muted);font-weight:700;font-size:var(--t-sm);border-radius:var(--r-full);transition:var(--ease-1)}
.rxn-sum:hover{background:var(--surface-2);color:var(--text)}
.rxn-sum__faces{display:inline-flex;align-items:center}
.rxn-sum__face{display:inline-grid;place-items:center;width:24px;height:24px;border-radius:var(--r-full);
  background:var(--surface);box-shadow:0 0 0 2px var(--bg);margin-left:-7px}
.rxn-sum__face:first-child{margin-left:0}
.rxn-sum__face .emo{width:16px;height:16px}
.rxn-sum__count{line-height:1}

/* "who reacted" sheet */
.rxn-tabs{display:flex;gap:7px;overflow-x:auto;padding:4px 0 12px;border-bottom:1px solid var(--line);margin-bottom:8px}
.rxn-tab{flex:0 0 auto;display:inline-flex;align-items:center;gap:6px;padding:7px 13px;border:none;cursor:pointer;
  background:var(--surface-sunk);color:var(--muted);border-radius:var(--r-full);font-weight:700;font-size:var(--t-sm);box-shadow:var(--sunk)}
.rxn-tab b{color:var(--text)}
.rxn-tab--active{background:var(--primary);color:var(--primary-ink)}
.rxn-tab--active b{color:var(--primary-ink)}
.rxn-people{max-height:50vh;overflow-y:auto}
.rxn-person{display:flex;align-items:center;gap:11px;padding:9px 6px;border-radius:var(--r-md);color:inherit;text-decoration:none}
.rxn-person:hover{background:var(--surface-2)}
.rxn-person__meta{flex:1;min-width:0;display:flex;flex-direction:column;line-height:1.3}
.rxn-person__meta b{font-size:var(--t-sm);display:inline-flex;align-items:center;gap:4px;min-width:0;max-width:100%}
.rxn-person__emo{flex:0 0 auto}
.emo--22{width:22px;height:22px;vertical-align:middle;margin:0}
.emo--16{width:16px;height:16px;vertical-align:middle;margin:0}

/* ── content reactions (item 5): compact react bar for comments/replies/stories ── */
.cr-bar{display:inline-flex;align-items:center;gap:9px;position:relative}
.cr-react{display:inline-flex;align-items:center;gap:5px;background:none;border:none;cursor:pointer;padding:2px 2px;
  color:var(--muted);font-weight:700;font-size:var(--t-xs);line-height:1;border-radius:var(--r-full);transition:var(--ease-1)}
.cr-react .cr-face{width:16px;height:16px;vertical-align:middle}
/* When the face is a FontAwesome <i> (the "React" prompt), the width/height above
   only sizes the box — the glyph rides on font-size. Pin it so the icon actually
   fills the button instead of showing a faint, near-empty blob (most visible in the
   community chat, where the react button has a surface pill background). */
i.cr-face{font-size:15px;line-height:1;display:inline-grid;place-items:center;color:var(--muted)}
.cr-react.is-on i.cr-face,.cr-react:hover i.cr-face{color:inherit}
.cr-react:hover{color:var(--text)}
.cr-react.is-on{color:var(--primary)}
.cr-sum:empty{display:none}
.cr-faces{display:inline-flex;align-items:center;gap:5px;background:none;border:none;cursor:pointer;padding:2px 3px;
  color:var(--muted);font-weight:700;font-size:var(--t-xs);border-radius:var(--r-full);transition:var(--ease-1)}
.cr-faces:hover{background:var(--surface-2);color:var(--text)}
.cr-face-chip{display:inline-grid;place-items:center;width:20px;height:20px;border-radius:var(--r-full);
  background:var(--surface);box-shadow:0 0 0 2px var(--bg);margin-left:-6px}
.cr-face-chip:first-child{margin-left:0}
.cr-pop{transform-origin:bottom left}

/* ───────────────────────── AVATAR + BADGES ───────────────────────── */
.avatar{border-radius:var(--r-full);object-fit:cover;background:var(--surface-2);flex:0 0 auto;box-shadow:var(--sh-1)}
.avatar--24{width:24px;height:24px}.avatar--28{width:28px;height:28px}.avatar--32{width:32px;height:32px}.avatar--40{width:42px;height:42px}
.avatar--56{width:58px;height:58px}.avatar--88{width:90px;height:90px;box-shadow:var(--sh-3)}
.badge-icon{font-size:12px;position:relative;cursor:help;-webkit-tap-highlight-color:transparent;flex-shrink:0}
.badge-icon--admin,.badge-icon--mod,.badge-icon--plus{color:var(--primary)}
.badge-icon--creator{color:var(--gold)}
/* Show badge tooltip on hover/focus for better accessibility */
.badge-icon:hover::after,.badge-icon:focus::after,.badge-icon:active::after{
  content:attr(title);
  position:absolute;
  bottom:calc(100% + 4px);
  left:50%;
  transform:translateX(-50%);
  background:var(--surface);
  color:var(--text);
  padding:4px 8px;
  border-radius:6px;
  font-size:11px;
  white-space:nowrap;
  box-shadow:var(--sh-3);
  z-index:100;
  pointer-events:none;
  font-family:var(--font);
  font-weight:600;
}
/* Mobile: show on touch */
@media (hover: none) and (pointer: coarse) {
  .badge-icon:active::after{
    display:block;
  }
}

/* Upload progress bar — clay track + green fill, used by every media upload */
.upbar{position:relative;height:26px;border-radius:var(--r-full);background:var(--surface-sunk);
  box-shadow:var(--sunk);overflow:hidden;margin:12px 0}
.upbar__fill{height:100%;width:0;border-radius:var(--r-full);
  background:var(--primary);transition:width .2s linear}
.upbar__pct{position:absolute;inset:0;display:grid;place-items:center;font-size:var(--t-xs);
  font-weight:800;color:var(--text);letter-spacing:.01em}
@media (prefers-reduced-motion: reduce){ .upbar__fill{transition:none} }

/* Badge explainer modal — one clay row per badge, tapped one highlighted */
.badge-guide{display:flex;flex-direction:column;gap:10px}
.badge-guide__row{display:flex;gap:13px;align-items:flex-start;padding:13px 15px;border-radius:var(--r-lg);
  background:var(--surface-sunk);box-shadow:var(--sunk)}
.badge-guide__row--on{background:var(--primary-softer);box-shadow:var(--sh-1),inset 0 0 0 2px var(--primary)}
.badge-guide__ic{flex:0 0 auto;width:40px;height:40px;display:grid;place-items:center;border-radius:var(--r-md);
  background:var(--surface);box-shadow:var(--sh-1);font-size:17px}
.badge-guide__txt{min-width:0}
.badge-guide__txt b{display:block;font-size:var(--t-md);margin-bottom:2px}
.badge-guide__txt span{color:var(--text-2);font-size:var(--t-sm);line-height:1.45}

/* ───────────────────────────── BUTTONS ───────────────────────────── */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:9px;padding:12px 22px;border-radius:var(--r-full);
  border:none;background:var(--surface);color:var(--text);font-weight:700;font-size:var(--t-sm);min-height:46px;
  cursor:pointer;box-shadow:var(--sh-1);transition:var(--ease);white-space:nowrap}
.btn:hover{background:var(--surface-2)}
.btn:active{transform:scale(.95)}
.btn:disabled{opacity:.55;cursor:not-allowed;transform:none}
/* NOTE: variant :hover rules must re-assert their own background — `.btn:hover`
   (0,2,0) outranks the plain `.btn--primary` (0,1,0), so without this a hovered
   primary button would fall back to --surface-2 (white-on-white / grey). */
.btn--primary{background:var(--primary);color:var(--primary-ink);box-shadow:var(--glow)}
.btn--primary:hover{background:var(--primary-hover);color:var(--primary-ink);filter:brightness(1.04)}
.btn--ghost{background:var(--surface-2);color:var(--text);box-shadow:none}
.btn--ghost:hover{background:var(--surface-3);color:var(--text)}
.btn--danger{background:var(--danger);color:#fff;box-shadow:var(--sh-2)}
.btn--danger:hover{background:var(--danger);color:#fff;filter:brightness(1.06)}
.btn--full{width:100%}
.btn--sm{padding:9px 16px;font-size:var(--t-xs);min-height:38px}
.btn--lg{padding:15px 26px;font-size:var(--t-md);min-height:54px}
.btn-link{background:none;border:none;color:var(--primary);cursor:pointer;font-size:var(--t-sm);font-weight:700;padding:0;box-shadow:none;min-height:0}
.btn-link:hover{text-decoration:underline}

/* ───────────────────────────── FORMS ───────────────────────────── */
.field{display:block;margin-bottom:15px}
.field>span{display:block;font-size:var(--t-sm);font-weight:700;margin-bottom:7px;color:var(--text)}
.input,textarea.input{width:100%;padding:13px 16px;border:none;border-radius:var(--r-md);min-height:48px;
  background:var(--surface-sunk);color:var(--text);font-size:var(--t-base);box-shadow:var(--sunk);transition:box-shadow .16s}
.input::placeholder{color:var(--muted)}
.input:focus{outline:none;box-shadow:var(--sunk),0 0 0 3px var(--primary-soft)}
.input--invalid{box-shadow:var(--sunk),0 0 0 2px var(--danger)}
textarea.input{min-height:auto;resize:vertical;line-height:1.55}

/* ── Custom dropdown (App.enhanceSelects) — replaces native <select> chrome so
   every picker in the app matches the app's own look, never the OS's. The
   native <select> stays in the DOM (invisible) as the single source of truth for
   value + change events, so page code keeps working unchanged.
   The option list is PORTALLED to <body> at `position:fixed`: a dropdown opened
   inside a modal would otherwise be clipped/scrolled by .modal__panel's
   `overflow:auto`, which is exactly where most of the app's pickers live. ── */
.xsel{position:relative;display:block}
.xsel select.xsel__native{position:absolute;left:0;top:0;width:100%;height:100%;
  opacity:0;pointer-events:none;-webkit-appearance:none;appearance:none}
.xsel__trigger{display:flex;align-items:center;gap:11px;width:100%;padding:13px 16px;min-height:48px;
  border:none;border-radius:var(--r-md);background:var(--surface-sunk);color:var(--text);
  font:inherit;font-size:var(--t-base);text-align:left;-webkit-appearance:none;appearance:none;
  cursor:pointer;box-shadow:var(--sunk);transition:box-shadow .16s}
.xsel__trigger:hover{box-shadow:var(--sunk),0 0 0 3px var(--primary-softer)}
.xsel__trigger:focus{outline:none}
.xsel__trigger:focus-visible,.xsel--open>.xsel__trigger{box-shadow:var(--sunk),0 0 0 3px var(--primary-soft)}
.xsel__trigger--empty .xsel__label{color:var(--muted);font-weight:400}
.xsel__trigger--disabled{opacity:.55;cursor:not-allowed}
.xsel__label{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:700}
.xsel__chev{flex:0 0 auto;font-size:11px;color:var(--muted);transition:transform var(--ease)}
.xsel--open>.xsel__trigger .xsel__chev{transform:rotate(180deg)}
/* portalled list — z-index clears .modal (150) and .spinner-overlay (300) */
.xsel__list{position:fixed;z-index:500;max-height:min(300px,46vh);overflow-y:auto;overscroll-behavior:contain;
  background:var(--surface);border-radius:var(--r-md);box-shadow:var(--sh-3);padding:7px;
  display:flex;flex-direction:column;gap:3px;transform-origin:top center;
  animation:xselIn .17s cubic-bezier(.34,1.1,.4,1)}
.xsel__list--up{transform-origin:bottom center}
@keyframes xselIn{from{opacity:0;transform:translateY(-7px) scale(.97)}to{opacity:1;transform:none}}
.xsel__opt{display:flex;align-items:center;gap:10px;width:100%;text-align:left;padding:11px 13px;border:none;
  border-radius:var(--r-sm);background:transparent;color:var(--text);font:inherit;font-size:var(--t-sm);
  font-weight:700;cursor:pointer;transition:background .12s}
.xsel__opt:hover,.xsel__opt:focus{background:var(--surface-2);outline:none}
.xsel__opt--sel{color:var(--primary)}
.xsel__opt__t{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.xsel__opt__k{flex:0 0 auto;font-size:11px;opacity:0;color:var(--primary)}
.xsel__opt--sel .xsel__opt__k{opacity:1}
.xsel__opt:disabled{opacity:.45;cursor:not-allowed}
.xsel__grp{padding:10px 13px 4px;font-size:var(--t-xs);font-weight:800;color:var(--muted);
  text-transform:uppercase;letter-spacing:.05em}

/* ── Native control resets — nothing in the app should render OS chrome ── */
/* number spinners: replaced by the .amtbox stepper wherever stepping matters */
input[type=number]{-moz-appearance:textfield;appearance:textfield}
input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}
/* search field's OS clear button */
input[type=search]::-webkit-search-cancel-button,
input[type=search]::-webkit-search-decoration{-webkit-appearance:none;appearance:none}
/* date/time: flat field + a tinted picker glyph that follows the theme */
input[type=date],input[type=time],input[type=datetime-local],input[type=month]{
  -webkit-appearance:none;appearance:none}
input::-webkit-calendar-picker-indicator{opacity:.6;cursor:pointer;padding:2px;border-radius:6px;transition:var(--ease-1)}
input::-webkit-calendar-picker-indicator:hover{opacity:1;background:var(--surface-2)}
[data-theme=dark] input::-webkit-calendar-picker-indicator{filter:invert(1) brightness(1.6)}
/* checkbox + radio — clay boxes, never the OS tick */
input[type=checkbox],input[type=radio]{-webkit-appearance:none;appearance:none;flex:0 0 auto;margin:0;
  width:22px;height:22px;display:grid;place-content:center;cursor:pointer;position:relative;
  border:none;border-radius:7px;background:var(--surface-sunk);box-shadow:var(--sunk);
  transition:var(--ease-1);color:var(--primary-ink)}
input[type=radio]{border-radius:var(--r-full)}
input[type=checkbox]:hover,input[type=radio]:hover{box-shadow:var(--sunk),0 0 0 3px var(--primary-softer)}
input[type=checkbox]:focus-visible,input[type=radio]:focus-visible{outline:none;box-shadow:var(--sunk),0 0 0 3px var(--primary-soft)}
input[type=checkbox]:checked,input[type=radio]:checked{background:var(--primary);box-shadow:var(--glow-sm)}
input[type=checkbox]::after{content:'';width:6px;height:11px;margin:-3px 0 0;border:solid currentColor;
  border-width:0 2.6px 2.6px 0;transform:rotate(43deg) scale(0);transition:transform .16s cubic-bezier(.34,1.4,.4,1)}
input[type=checkbox]:checked::after{transform:rotate(43deg) scale(1)}
input[type=radio]::after{content:'';width:9px;height:9px;border-radius:var(--r-full);background:currentColor;
  transform:scale(0);transition:transform .16s cubic-bezier(.34,1.4,.4,1)}
input[type=radio]:checked::after{transform:scale(1)}
input[type=checkbox]:disabled,input[type=radio]:disabled{opacity:.45;cursor:not-allowed}
/* Chrome paints autofilled fields its own yellow/blue and ignores background —
   the inset shadow trick is the only way to hold our own surface colour. */
.input:-webkit-autofill,.input:-webkit-autofill:hover,
.input:-webkit-autofill:focus,.input:-webkit-autofill:active{
  -webkit-text-fill-color:var(--text);caret-color:var(--text);
  -webkit-box-shadow:0 0 0 1000px var(--surface-sunk) inset,var(--sunk);
  transition:background-color 9999s ease-in-out 0s}
/* the OS-drawn resize grip in the corner of a textarea */
textarea::-webkit-resizer{background-color:transparent}
/* keyboard focus ring — the app's blue, not the browser's default outline.
   Controls that already answer focus with their own ring opt out. */
a:focus-visible,button:focus-visible,input:focus-visible,
textarea:focus-visible,[tabindex]:focus-visible{outline:2px solid var(--primary);outline-offset:2px}
.input:focus-visible,.xsel__trigger:focus-visible,.amtbox__in:focus-visible,
input[type=checkbox]:focus-visible,input[type=radio]:focus-visible{outline:none}

/* ── Segmented control (rail switch: Card/Bank vs Crypto, …) ──────────────
   Same job as .pkgtabs but built for 2–3 icon+label options, and it never
   disables a segment: an unavailable rail still opens and explains itself
   inside its own pane, because a dead button tells the user nothing. */
.seg{display:flex;gap:6px;padding:6px;margin-bottom:18px;background:var(--surface-sunk);
  border-radius:var(--r-full);box-shadow:var(--sunk)}
.seg__b{flex:1;min-width:0;display:inline-flex;align-items:center;justify-content:center;gap:8px;
  padding:11px 10px;border:none;background:none;color:var(--muted);font:inherit;font-weight:800;
  font-size:var(--t-sm);border-radius:var(--r-full);cursor:pointer;white-space:nowrap;transition:var(--ease-1)}
.seg__b i{font-size:13px}
.seg__b:hover{color:var(--text);background:var(--surface-2)}
.seg__b--on,.seg__b--on:hover{background:var(--primary);color:var(--primary-ink);box-shadow:var(--glow-sm)}
.seg__b:active{transform:scale(.97)}

/* ── Amount box — big figure with a currency prefix and clay steppers.
   The <input> is type=text + inputmode=decimal on purpose: type=number drags
   in OS spinners, locale quirks and a scroll-wheel that silently edits money. */
.amtbox{display:flex;align-items:center;gap:3px;min-height:62px;padding:7px 8px 7px 17px;
  background:var(--surface-sunk);border-radius:var(--r-md);box-shadow:var(--sunk);transition:box-shadow .16s}
.amtbox--on{box-shadow:var(--sunk),0 0 0 3px var(--primary-soft)}
.amtbox__cur{flex:0 0 auto;font-size:var(--t-xl);font-weight:800;color:var(--muted);letter-spacing:-.02em}
.amtbox__in{flex:1;min-width:0;width:100%;padding:0 9px;border:none;outline:none;background:none;box-shadow:none;
  color:var(--text);font:inherit;font-size:var(--t-2xl);font-weight:800;letter-spacing:-.03em}
.amtbox__in::placeholder{color:var(--muted);opacity:.45}
.amtbox__b{flex:0 0 auto;width:40px;height:40px;display:grid;place-items:center;border:none;
  border-radius:var(--r-full);background:var(--surface);color:var(--text);font-size:13px;
  box-shadow:var(--sh-1);cursor:pointer;transition:var(--ease)}
.amtbox__b:hover{background:var(--surface-2)}
.amtbox__b:active{transform:scale(.9)}
.amtbox__b--wide{width:auto;padding:0 15px;font-size:var(--t-xs);font-weight:800;color:var(--primary)}
/* quick-amount chips under the box */
.qamt{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}
.qamt button{flex:1 1 auto;padding:9px 12px;border:none;border-radius:var(--r-full);background:var(--surface-sunk);
  color:var(--text-2);font:inherit;font-size:var(--t-xs);font-weight:800;cursor:pointer;
  box-shadow:var(--sunk);transition:var(--ease-1)}
.qamt button:hover{color:var(--primary);box-shadow:var(--sunk),0 0 0 2px var(--primary-soft)}
.qamt button:active{transform:scale(.95)}

/* ── Option cards — a picker that shows what each choice IS (payout method,
   delivery rail). Replaces a <select> wherever there are only 2–3 options and
   each one needs a sentence of explanation. */
.optcards{display:grid;gap:10px;grid-template-columns:repeat(auto-fit,minmax(150px,1fr))}
.optcard{display:flex;flex-direction:column;align-items:flex-start;gap:3px;padding:14px 15px;border:none;
  border-radius:var(--r-lg);background:var(--surface-sunk);box-shadow:var(--sunk);
  color:var(--text);font:inherit;text-align:left;cursor:pointer;transition:var(--ease)}
.optcard__ic{width:38px;height:38px;margin-bottom:7px;display:grid;place-items:center;font-size:15px;
  border-radius:var(--r-md);background:var(--surface);color:var(--muted);box-shadow:var(--sh-1);transition:var(--ease)}
.optcard b{font-size:var(--t-sm);font-weight:800}
.optcard span{font-size:var(--t-xs);color:var(--muted);line-height:1.4}
.optcard:hover{box-shadow:var(--sunk),0 0 0 2px var(--primary-softer)}
.optcard--on,.optcard--on:hover{background:var(--surface);box-shadow:var(--sh-2),0 0 0 2.5px var(--primary)}
.optcard--on .optcard__ic{background:var(--primary);color:var(--primary-ink)}
.optcard:active{transform:scale(.985)}

/* ── FX / conversion read-out under an amount field ── */
.fxline{display:flex;align-items:center;gap:12px;padding:13px 16px;margin:14px 0 16px;border-radius:var(--r-md);
  background:var(--primary-softer);font-size:var(--t-sm);line-height:1.45}
.fxline__ic{flex:0 0 auto;width:32px;height:32px;display:grid;place-items:center;font-size:12px;
  border-radius:var(--r-full);background:var(--surface);color:var(--primary);box-shadow:var(--sh-1)}
.fxline__t{min-width:0}
.fxline b{font-weight:800}
.fxline small{display:block;margin-top:2px;font-size:var(--t-xs);color:var(--muted);font-weight:700}
.fxline--idle{background:var(--surface-sunk);box-shadow:var(--sunk)}
.fxline--idle .fxline__ic{color:var(--muted)}

/* password field with show/hide eye */
.pw-wrap{position:relative;display:block}
.pw-wrap .input{padding-right:50px}
.pw-eye{position:absolute;top:0;right:0;height:100%;width:46px;display:grid;place-items:center;
  background:none;border:none;box-shadow:none;color:var(--muted);cursor:pointer;font-size:16px;min-height:0}
.pw-eye:hover{color:var(--text)}
/* "Don't have an account? Join" footer under auth forms */
.auth-switch{text-align:center;margin-top:16px;font-size:var(--t-sm);color:var(--muted)}
.auth-switch .btn-link{font-size:var(--t-sm)}
/* Sign in with Google: official GIS button + an "or" divider above the email form. */
.gsi-wrap .gsi-host{display:flex;justify-content:center}
.auth-or{display:flex;align-items:center;text-align:center;gap:12px;margin:16px 0;color:var(--muted);font-size:var(--t-sm)}
.auth-or::before,.auth-or::after{content:"";flex:1;height:1px;background:var(--line,#e2e4ea)}
select.input{-webkit-appearance:none;appearance:none;cursor:pointer;padding-right:40px;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239aa0aa' stroke-width='2.6'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 15px center}

/* custom file picker — replaces the ugly native "Choose file" control.
   Hide the native input, label is the clay drop-zone; a delegated change
   listener in config.js fills in the chosen filename + lights up the icon. */
.filepick{display:flex;align-items:center;gap:14px;width:100%;padding:13px 15px;border-radius:var(--r-md);
  background:var(--surface-sunk);box-shadow:var(--sunk);cursor:pointer;text-align:left;transition:box-shadow .16s,transform .12s}
.filepick:hover{box-shadow:var(--sunk),0 0 0 3px var(--primary-soft)}
.filepick:active{transform:scale(.99)}
.filepick input[type=file]{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}
.filepick__ic{flex:0 0 auto;width:46px;height:46px;border-radius:var(--r-sm);display:grid;place-items:center;font-size:19px;
  color:var(--primary);background:var(--primary-soft);box-shadow:var(--sh-1);transition:var(--ease)}
.filepick--has .filepick__ic{background:var(--primary);color:var(--primary-ink)}
.filepick__txt{display:flex;flex-direction:column;min-width:0;line-height:1.4}
.filepick__txt b{font-size:var(--t-sm);font-weight:700;color:var(--text)}
.filepick__name{font-size:var(--t-xs);color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
.filepick--has .filepick__name{color:var(--primary);font-weight:700}

/* ── EDIT-PROFILE media block: round avatar on top, cover below ── */
.edit-media{display:flex;flex-direction:column;align-items:center;gap:14px;margin-bottom:18px}
.edit-avatar{position:relative;width:108px;height:108px;border-radius:50%;cursor:pointer;flex:0 0 auto;
  display:flex;align-items:flex-end;justify-content:center;text-align:center}
.edit-avatar input[type=file]{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}
.edit-avatar img{width:108px;height:108px;border-radius:50%;object-fit:cover;
  box-shadow:var(--sh-2),0 0 0 4px var(--surface),0 0 0 7px var(--primary-soft);transition:box-shadow .16s}
.edit-avatar:hover img{box-shadow:var(--sh-2),0 0 0 4px var(--surface),0 0 0 7px var(--primary)}
.edit-avatar__cam{position:absolute;right:2px;bottom:2px;width:34px;height:34px;border-radius:50%;
  display:grid;place-items:center;font-size:14px;color:var(--primary-ink);
  background:var(--primary);box-shadow:var(--sh-2),0 0 0 3px var(--surface)}
.edit-cover{position:relative;width:100%;height:120px;border-radius:var(--r-md);cursor:pointer;overflow:hidden;
  background:var(--surface-sunk);background-size:cover;background-position:center;box-shadow:var(--sunk);
  display:grid;place-items:center;text-align:center;transition:box-shadow .16s}
.edit-cover input[type=file]{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}
.edit-cover:hover{box-shadow:var(--sunk),0 0 0 3px var(--primary-soft)}
.edit-cover__hint{display:inline-flex;align-items:center;gap:8px;padding:8px 14px;border-radius:var(--r-full);
  font-size:var(--t-xs);font-weight:700;color:var(--text);background:var(--surface);box-shadow:var(--sh-1)}
.edit-cover--has .edit-cover__hint{background:rgba(0,0,0,.55);color:#fff;backdrop-filter:blur(4px)}
.edit-cover .filepick__name{position:absolute;left:10px;bottom:8px;color:#fff;text-shadow:0 1px 3px rgba(0,0,0,.7);max-width:80%}

/* ───────────────────────────── SEARCH BOX ───────────────────────────── */
.search-box{display:flex;align-items:center;gap:12px;background:var(--surface-sunk);border-radius:var(--r-full);
  padding:13px 18px;box-shadow:var(--sunk);transition:box-shadow .16s}
.search-box:focus-within{box-shadow:var(--sunk),0 0 0 3px var(--primary-soft)}
.search-box>i{font-size:16px;color:var(--muted);flex:0 0 auto}
.search-box input{flex:1;min-width:0;border:none;background:none;outline:none;color:var(--text);font-size:var(--t-base)}
.search-box input::placeholder{color:var(--muted)}

/* ───────────────────────────── CHIPS ───────────────────────────── */
.chip{display:inline-flex;align-items:center;gap:7px;padding:8px 15px;border-radius:var(--r-full);background:var(--surface);
  color:var(--muted);font-size:var(--t-xs);font-weight:700;border:none;box-shadow:var(--sh-1);cursor:pointer;transition:var(--ease)}
.chip:active{transform:scale(.94)}
.chip--on{background:var(--primary);color:var(--primary-ink);box-shadow:var(--glow-sm)}

/* ═══════════ COMPACT FLOATING NAV — capsule + inline Create (mobile) ═══════════ */
/* dock = the slim pill and the round + button sitting on ONE row, centered */
.navdock{position:fixed;left:50%;transform:translateX(-50%);bottom:calc(15px + var(--safe-bottom));z-index:60;
  display:flex;align-items:center;gap:8px}
.navbar{display:flex;align-items:center;gap:1px;padding:4px;
  background:var(--glass);backdrop-filter:blur(24px) saturate(180%);-webkit-backdrop-filter:blur(24px) saturate(180%);
  border-radius:var(--r-full);box-shadow:var(--sh-3)}
.navbar__item{position:relative;width:40px;height:40px;border-radius:var(--r-full);border:none;background:none;
  color:var(--muted);font-size:17px;display:grid;place-items:center;cursor:pointer;transition:var(--ease)}
.navbar__item:active{transform:scale(.84)}
.navbar__item--active{background:var(--primary);color:var(--primary-ink)}
.navbar__item .dot{position:absolute;top:1px;right:3px;min-width:14px;height:14px;padding:0 3px;background:var(--accent);
  color:#fff;border-radius:var(--r-full);font-size:8px;font-weight:800;display:grid;place-items:center}
/* numeric unread badge for the bottom-bar Messages icon */
.navbar__item .nav-count{position:absolute;top:-2px;right:0;min-width:16px;height:16px;padding:0 4px;
  background:var(--primary);color:var(--primary-ink);border:2px solid var(--glass);
  border-radius:var(--r-full);font-size:9px;font-weight:800;line-height:1;display:flex;align-items:center;justify-content:center}
/* desktop side-rail unread count (rows are horizontal flex with the icon first) */
.srail .srail-count{margin-left:auto;min-width:20px;height:20px;padding:0 6px;background:var(--primary);
  color:var(--primary-ink);border-radius:var(--r-full);font-size:var(--t-xs);font-weight:800;display:inline-flex;align-items:center;justify-content:center}

/* inline round Create button — same height as the pill, Doppl-style */
.fab{flex:0 0 auto;width:48px;height:48px;border-radius:var(--r-full);border:none;cursor:pointer;
  background:var(--primary);color:var(--primary-ink);font-size:20px;
  display:grid;place-items:center;box-shadow:var(--sh-3);transition:var(--ease)}
.fab:hover{filter:brightness(1.06)}
.fab:active{transform:scale(.9) rotate(90deg)}

/* ═════════════════ DESKTOP SIDE RAIL (≥1024) ═════════════════ */
.siderail{display:none}
.siderail__brand{display:flex;align-items:center;gap:11px;font-weight:800;font-size:var(--t-2xl);letter-spacing:-.03em;padding:8px 14px 22px}
.siderail__list{display:flex;flex-direction:column;gap:8px}
.srail{display:flex;align-items:center;gap:15px;padding:13px 17px;border-radius:var(--r-full);color:var(--text-2);
  font-weight:700;font-size:var(--t-md);cursor:pointer;background:var(--surface);border:none;text-align:left;width:100%;
  box-shadow:var(--sh-1);transition:var(--ease)}
.srail i{width:24px;text-align:center;font-size:19px}
.srail:hover{background:var(--surface-2);color:var(--text);box-shadow:var(--sh-2);transform:translateY(-1px)}
.srail--active{background:var(--primary);color:var(--primary-ink);box-shadow:var(--glow-sm)}
.srail--active:hover{filter:brightness(1.04);background:var(--primary);color:var(--primary-ink)}
.srail:active{transform:scale(.97)}
.srail .dot{margin-left:auto;min-width:20px;height:20px;padding:0 6px;background:var(--accent);color:#fff;border-radius:var(--r-full);font-size:10px;font-weight:800;display:grid;place-items:center}
.srail-create{margin:14px 0 6px;justify-content:center;background:var(--primary);color:var(--primary-ink);box-shadow:var(--glow);font-size:var(--t-md)}
.srail-create:hover{filter:brightness(1.05);background:var(--primary);color:var(--primary-ink)}

/* ═════════════════ SUGGESTIONS BOARD (modal) ═════════════════ */
.sug-form{display:flex;flex-direction:column;gap:9px;background:var(--surface-2);padding:13px;border-radius:var(--r-md)}
.sug-form .input{background:var(--surface)}
.sug-signin{display:flex;align-items:center;gap:12px;justify-content:space-between;flex-wrap:wrap;
  background:var(--surface-2);padding:14px;border-radius:var(--r-md);color:var(--muted);font-size:var(--t-sm)}
#sug-list{display:flex;flex-direction:column;gap:10px;max-height:min(52vh,520px);overflow:auto;margin:0 -4px;padding:0 4px}
.sug-card{display:flex;gap:12px;padding:13px;background:var(--surface);border-radius:var(--r-md);box-shadow:var(--sh-1)}
.sug-vote{flex:0 0 auto;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;min-width:52px;
  padding:7px 6px;border:1.5px solid var(--surface-3);background:var(--surface-2);border-radius:var(--r-sm);color:var(--text-2);
  font-weight:800;cursor:pointer;transition:var(--ease)}
.sug-vote i{font-size:16px;line-height:1}
.sug-vote b{font-size:var(--t-md)}
.sug-vote:hover{border-color:var(--primary);color:var(--primary)}
.sug-vote.is-voted{background:var(--primary);border-color:transparent;color:var(--primary-ink)}
.sug-vote:active{transform:scale(.92)}
.sug-main{flex:1;min-width:0}
.sug-top{display:flex;align-items:center;gap:8px;margin-bottom:5px;flex-wrap:wrap}
.sug-title{font-weight:800;font-size:var(--t-md);line-height:1.3}
.sug-body{color:var(--text-2);font-size:var(--t-sm);margin-top:3px;line-height:1.5;white-space:pre-wrap;overflow-wrap:anywhere}
.sug-note{margin-top:7px;font-size:var(--t-xs);color:var(--text-2);background:var(--surface-2);padding:6px 9px;border-radius:var(--r-sm)}
.sug-meta{margin-top:7px;font-size:var(--t-xs);color:var(--muted)}
.sug-meta a{color:var(--muted);text-decoration:underline}
.sug-chip{font-size:10px;font-weight:800;padding:2px 8px;border-radius:var(--r-full);text-transform:uppercase;letter-spacing:.03em}
.sug-chip--open{background:var(--surface-3);color:var(--text-2)}
.sug-chip--planned{background:rgba(80,140,255,.16);color:#5a8cff}
.sug-chip--prog{background:rgba(240,180,40,.18);color:var(--gold)}
.sug-chip--done{background:var(--primary-soft);color:var(--primary)}
.sug-chip--declined{background:rgba(255,90,90,.14);color:#ff6a6a}
.sug-staff{margin-left:auto;font-size:var(--t-xs);padding:3px 6px;border-radius:var(--r-sm);border:1px solid var(--surface-3);background:var(--surface-2);color:var(--text)}
.sug-empty{text-align:center;padding:34px 10px}
.sug-empty i{font-size:30px;opacity:.4;display:block;margin-bottom:10px}

/* ═════════════════ CUSTOMIZE BOTTOM BAR (modal) ═════════════════ */
.navcfg{display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:9px}
.navcfg__it{display:flex;align-items:center;gap:9px;padding:11px 12px;border-radius:var(--r-sm);cursor:pointer;
  background:var(--surface-2);border:1.5px solid transparent;color:var(--text);font-weight:700;font-size:var(--t-sm);
  text-align:left;transition:var(--ease)}
.navcfg__it > i:first-child{width:20px;text-align:center;font-size:16px;color:var(--muted);flex:0 0 auto}
.navcfg__it span{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.navcfg__tick{font-size:17px;color:var(--surface-3);flex:0 0 auto}
.navcfg__it:hover{border-color:var(--surface-3)}
.navcfg__it.is-on{background:var(--primary-soft);border-color:var(--primary)}
.navcfg__it.is-on > i:first-child{color:var(--primary)}
.navcfg__it.is-on .navcfg__tick{color:var(--primary)}
.navcfg__it:disabled{opacity:.42;cursor:not-allowed}
.navcfg__it:active{transform:scale(.97)}

/* ───────────────────────────── MODALS ───────────────────────────── */
/* z-index above the full-screen chat overlay (.dm-screen = 120) so menus/dialogs
   opened from inside a conversation (the ⋯ Report/Block menu) aren't hidden behind it.
   Stays below toasts (200) and the spinner (300). */
.modal{position:fixed;inset:0;z-index:150;display:flex;align-items:flex-end;justify-content:center}
@media(min-width:560px){.modal{align-items:center}}
.modal__backdrop{position:absolute;inset:0;background:rgba(6,18,12,.5);backdrop-filter:blur(5px);-webkit-backdrop-filter:blur(5px);animation:fade .2s}
.modal__panel{position:relative;z-index:1;background:var(--surface);width:100%;max-width:500px;
  border-radius:var(--r-2xl) var(--r-2xl) 0 0;padding:28px 24px calc(26px + var(--safe-bottom));
  box-shadow:var(--sh-4);max-height:92vh;overflow:auto;animation:sheet .3s cubic-bezier(.34,1.1,.4,1)}
@media(min-width:560px){.modal__panel{border-radius:var(--r-2xl);padding-bottom:28px}}
.modal__panel--sm{max-width:400px}
.verified-tick{color:var(--primary);font-size:.85em;vertical-align:baseline;flex-shrink:0}
.modal__panel::before{content:'';display:block;width:42px;height:5px;border-radius:var(--r-full);background:var(--surface-3);margin:-12px auto 16px}
@media(min-width:560px){.modal__panel::before{display:none}}
.modal__panel--auth{max-width:430px}
.modal__panel--menu{max-width:460px}
.modal__panel--wide{max-width:640px}
/* Comment sheet — scrolling list with a pinned composer, opened from any post's
   comment icon so users can read + reply without leaving the feed. */
.modal__panel--sheet{max-width:560px;height:82vh;max-height:82vh;display:flex;flex-direction:column;padding:24px 16px calc(12px + var(--safe-bottom));overflow:hidden}
.cmt-sheet{display:flex;flex-direction:column;min-height:0;flex:1}
.cmt-sheet__head{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px;padding-right:44px}
.cmt-sheet__head h3{margin:0}
.cmt-sheet__head .btn-link{font-weight:700;cursor:pointer}
.cmt-sheet__list{flex:1;min-height:0;overflow-y:auto;display:flex;flex-direction:column;gap:13px;padding:2px 2px 10px}
/* Avatar sits INSIDE the bubble (top-left of the card), not floating outside it. */
.cmt-row{display:flex}
.cmt-row__b{flex:1;min-width:0;display:flex;gap:10px;background:var(--surface-2);border-radius:var(--r-lg);padding:10px 13px}
.cmt-row__ava{flex:0 0 auto}
.cmt-row__content{flex:1;min-width:0}
.cmt-row__meta{display:flex;align-items:center;gap:7px;flex-wrap:wrap;margin-bottom:3px}
.cmt-row__meta b{font-weight:700;display:inline-flex;align-items:center;gap:4px;min-width:0;max-width:100%}
.cmt-row__time{color:var(--muted);font-size:var(--t-xs);font-weight:600}
.cmt-row__text{line-height:1.5;word-break:break-word;white-space:pre-wrap}
.cmt-row__tools{display:flex;align-items:center;gap:12px;margin-top:6px}
.cmt-sheet__more,.disc__more{text-align:center}
.cmt-sheet__more:empty,.disc__more:empty{display:none}
.cmt-sheet__more .btn,.disc__more .btn{margin-top:4px}
.cmt-sheet__compose{display:flex;gap:7px;align-items:flex-end;padding-top:11px;border-top:1px solid var(--surface-3)}
.cmt-sheet__compose .input{flex:1;min-height:44px;max-height:130px;resize:none}
.cmt-sheet__compose .btn{flex:0 0 auto}
/* ---- RICH COMMENTS + STICKERS (item 28) ------------------------------------ */
.spinner--sm{width:16px;height:16px;border-width:2.5px;display:inline-block;vertical-align:-3px}
/* photo/sticker attached to a comment or reply */
.cmt-media{display:inline-block;margin-top:7px;max-width:100%}
.cmt-media img{max-width:230px;max-height:280px;border-radius:var(--r-md);display:block;object-fit:cover}
.cmt-media--sticker img{width:118px;height:118px;object-fit:contain;border-radius:0}
/* "Add to my stickers" affordance shown on a displayed sticker (item 30). */
.cmt-media--sticker{position:relative;display:inline-block}
.cmt-media__save{position:absolute;top:2px;right:2px;width:26px;height:26px;border:0;border-radius:50%;
  background:var(--surface);box-shadow:var(--sh-1);color:var(--primary);font-size:12px;cursor:pointer;
  display:grid;place-items:center;opacity:.9}
.cmt-media__save:active{transform:scale(.9)}
.cmt-media__save.is-saved{color:var(--success,#2ecf82)}
/* compose attach buttons + pending-attachment preview */
.cmt-attbtn{flex:0 0 auto;width:40px;height:40px;border:0;background:var(--surface);box-shadow:var(--sh-1);border-radius:50%;color:var(--text);font-size:16px;cursor:pointer;display:grid;place-items:center}
.cmt-attbtn:active{transform:scale(.94)}
.cmt-sheet__attach{padding:8px 0 2px}
.cmt-att{position:relative;display:inline-block}
.cmt-att img{max-width:96px;max-height:96px;border-radius:var(--r-md);display:block;object-fit:cover;box-shadow:var(--sh-1)}
.cmt-att--sticker img{width:80px;height:80px;object-fit:contain;box-shadow:none}
.cmt-att__x{position:absolute;top:-7px;right:-7px;width:24px;height:24px;border:0;border-radius:50%;background:var(--text);color:var(--bg);font-size:12px;cursor:pointer;display:grid;place-items:center;box-shadow:var(--sh-2)}
/* sticker picker */
.stk-pick{display:flex;flex-direction:column;height:100%;min-height:0}
.stk-pick__head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px}
.stk-pick__head h3{margin:0}
.stk-grid{flex:1;overflow-y:auto;display:grid;grid-template-columns:repeat(auto-fill,minmax(84px,1fr));gap:10px;align-content:start}
.stk-cell{position:relative;aspect-ratio:1;border-radius:var(--r-md);background:var(--surface);box-shadow:var(--sh-1);overflow:hidden}
.stk-btn{width:100%;height:100%;border:0;background:none;cursor:pointer;padding:8px;display:grid;place-items:center}
.stk-btn img{max-width:100%;max-height:100%;object-fit:contain}
.stk-del{position:absolute;top:4px;right:4px;width:22px;height:22px;border:0;border-radius:50%;background:rgba(0,0,0,.55);color:#fff;font-size:11px;cursor:pointer;display:grid;place-items:center;opacity:0;transition:opacity .15s}
.stk-cell:hover .stk-del,.stk-del:focus{opacity:1}
/* sticker maker */
.stk-make{text-align:center}
.stk-canvas-wrap{display:grid;place-items:center;background:var(--surface-2);border-radius:var(--r-lg);padding:12px}
#stk-canvas{width:100%;max-width:280px;aspect-ratio:1;height:auto;border-radius:var(--r-md);box-shadow:var(--sh-1);background:#fff}
/* Item 24 — inline engagement discussion board (games/apps/daily arena). Reuses .cmt-row.
   Grouped on a raised surface card so the whole lounge reads as one area AND the sunken
   input inside it stays visible on any page (no card = the field blends into the page). */
.disc{background:var(--surface);border-radius:var(--r-xl);padding:16px 15px 15px;box-shadow:var(--sh-1);margin:2px 0}
.disc__list{display:flex;flex-direction:column;gap:12px;margin-bottom:14px}
.disc__compose+.disc__list{margin-top:14px}
.disc__list .cmt-row{transition:opacity var(--ease-1)}
.disc__list .cmt-row__b{background:var(--surface-2)}
.disc__compose{display:flex;gap:9px;align-items:flex-end}
/* Clear tap target: filled sunken field + an always-on hairline edge (app's no-border
   affordance) so users can see exactly where to type. */
.disc__compose .input{flex:1;min-height:46px;max-height:130px;resize:none;background:var(--surface-sunk);
  box-shadow:var(--sunk),inset 0 0 0 1.5px var(--line)}
.disc__compose .input:focus{box-shadow:var(--sunk),inset 0 0 0 2px var(--primary),0 0 0 3px var(--primary-soft)}
.disc__compose .btn{flex:0 0 auto;min-height:46px}
.cr-del{background:none;border:none;color:var(--muted);cursor:pointer;padding:2px 4px;font-size:var(--t-sm);line-height:1;transition:var(--ease-1)}
.cr-del:hover{color:var(--danger)}
.modal__close{position:absolute;top:16px;right:16px;width:38px;height:38px;border-radius:var(--r-full);border:none;
  background:var(--surface-2);color:var(--text);font-size:21px;cursor:pointer;line-height:1;box-shadow:var(--sh-1);transition:var(--ease);z-index:2}
.modal__close:active{transform:scale(.88)}
@keyframes sheet{from{transform:translateY(40px);opacity:.4}to{transform:none;opacity:1}}
@keyframes fade{from{opacity:0}to{opacity:1}}
.auth-brand{display:flex;align-items:center;gap:9px;font-weight:800;font-size:var(--t-xl);margin-bottom:18px}
.auth-tabs{display:flex;gap:5px;margin-bottom:20px;background:var(--surface-sunk);padding:5px;border-radius:var(--r-full);box-shadow:var(--sunk)}
.auth-tab{flex:1;padding:11px;font-weight:700;cursor:pointer;background:none;border:none;color:var(--muted);font-size:var(--t-sm);border-radius:var(--r-full);transition:var(--ease-1)}
.auth-tab--active{color:var(--text);background:var(--surface);box-shadow:var(--sh-2)}
.auth-tabs--method{margin-bottom:14px;padding:4px}
.auth-tabs--method .auth-tab{padding:8px;font-size:var(--t-xs)}

/* menu sheet grid */
.menu-grid{display:grid;grid-template-columns:1fr 1fr;gap:11px}
.menu-item{display:flex;align-items:center;gap:13px;padding:16px 15px;border:none;border-radius:var(--r-md);
  background:var(--surface-2);color:var(--text);font-weight:700;font-size:var(--t-sm);cursor:pointer;text-align:left;box-shadow:var(--sh-1);transition:var(--ease)}
.menu-item:hover{background:var(--primary-soft);color:var(--primary)}
.menu-item:active{transform:scale(.95)}
.menu-item i{width:22px;text-align:center;font-size:17px}
.menu-item--danger{grid-column:1/-1;color:var(--danger)}
.menu-item--danger:hover{background:var(--danger);color:#fff}

/* share sheet */
.share-grid{display:grid;grid-template-columns:1fr 1fr;gap:11px}
.share-cell{display:flex;align-items:center;gap:13px;padding:14px;border:none;border-radius:var(--r-md);
  background:var(--surface-2);color:var(--text);font-weight:700;font-size:var(--t-sm);cursor:pointer;text-align:left;box-shadow:var(--sh-1);transition:var(--ease)}
.share-cell:hover{background:var(--primary-soft);color:var(--primary)}
.share-cell:active{transform:scale(.95)}
.share-ic{flex:0 0 auto;width:40px;height:40px;border-radius:var(--r-full);display:grid;place-items:center;font-size:18px;background:var(--surface);box-shadow:var(--sh-1)}

/* dialogs */
.dlg-actions{display:flex;gap:11px;margin-top:22px}
.dlg-actions .btn{flex:1}
.reason-grid{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-top:14px}
.reason-grid .chip{justify-content:center;padding:14px;cursor:pointer;font-size:var(--t-sm)}
.reason-grid .chip:hover,.reason-grid .chip:active{background:var(--primary-soft);color:var(--primary)}

/* ---- new-user onboarding ---- */
.modal__panel--onb{max-width:480px}
.onb__head{text-align:center;margin-bottom:18px}
.onb .auth-brand{justify-content:center}
.onb .auth-brand b{color:var(--primary)}
.onb__title{font-size:var(--t-2xl);font-weight:800;letter-spacing:-.03em;margin:6px 0 4px}
.onb__sub{color:var(--muted);font-size:var(--t-sm);line-height:1.5}
.onb__chips{display:flex;flex-wrap:wrap;gap:10px;justify-content:center;max-height:46vh;overflow:auto;padding:2px}
.onb-chip{display:inline-flex;align-items:center;gap:8px;padding:11px 16px;border:none;border-radius:var(--r-full);
  background:var(--surface-2);color:var(--text);font-weight:700;font-size:var(--t-sm);cursor:pointer;box-shadow:var(--sh-1);transition:var(--ease-1)}
.onb-chip i{color:var(--muted);transition:var(--ease-1)}
.onb-chip:active{transform:scale(.94)}
.onb-chip--on{background:var(--primary);color:var(--primary-ink);box-shadow:var(--sh-2)}
.onb-chip--on i{color:var(--primary-ink)}
.onb__foot{display:flex;gap:11px;margin-top:22px}
.onb__foot .btn{flex:1}
.onb__people{display:flex;flex-direction:column;gap:10px;max-height:52vh;overflow:auto;padding:2px}
.onb-person{display:flex;align-items:center;gap:12px;padding:11px 13px;border-radius:var(--r-md);background:var(--surface-2);box-shadow:var(--sh-1)}
.onb-person__meta{flex:1;min-width:0;display:flex;flex-direction:column;line-height:1.3}
.onb-person__meta b{font-size:var(--t-sm);font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.onb-person__meta span{font-size:var(--t-xs)}

/* ───────────────────────────── TOASTS ───────────────────────────── */
#ep-toasts{position:fixed;top:calc(14px + var(--safe-top));left:50%;transform:translateX(-50%);z-index:200;display:flex;flex-direction:column;gap:9px;width:max-content;max-width:92vw}
.toast{display:flex;align-items:center;gap:11px;padding:14px 20px;border-radius:var(--r-full);background:var(--surface);color:var(--text);
  font-size:var(--t-sm);font-weight:700;box-shadow:var(--sh-4);opacity:0;transform:translateY(-14px) scale(.96);transition:var(--ease);touch-action:pan-y;cursor:grab}
.toast:active{cursor:grabbing}
.toast--in{opacity:1;transform:none}
.toast i{font-size:16px}
.toast--success{background:var(--primary);color:var(--primary-ink)}
.toast--error{background:var(--danger);color:#fff}
.toast--warn{background:var(--warning);color:#1a1206}
.toast--info{background:var(--surface)}
.toast__cta{margin-left:4px;padding:6px 14px;border:0;border-radius:var(--r-full);cursor:pointer;
  font-weight:800;font-size:var(--t-xs);white-space:nowrap;background:var(--primary);color:var(--primary-ink)}
.toast__cta:active{transform:scale(.96)}

/* live "+N XP" floaters — rise from the bottom-centre above the nav dock */
#ep-xpfloats{position:fixed;left:50%;bottom:calc(96px + var(--safe-bottom));transform:translateX(-50%);z-index:199;
  display:flex;flex-direction:column-reverse;align-items:center;gap:6px;pointer-events:none}
.xpfloat{display:inline-flex;align-items:center;gap:7px;padding:8px 16px;border-radius:var(--r-full);font-weight:800;font-size:var(--t-sm);
  background:linear-gradient(140deg,var(--gold,#f6c453),#ffb020);color:#3a2600;box-shadow:var(--sh-3);
  opacity:0;transform:translateY(10px) scale(.9);transition:opacity .3s ease,transform .4s cubic-bezier(.2,.9,.3,1.3)}
.xpfloat--in{opacity:1;transform:translateY(0) scale(1)}
.xpfloat i{font-size:13px}

/* ─────────────────────── SKELETON / SPINNER / EMPTY ─────────────────────── */
.skeleton{background:linear-gradient(90deg,var(--surface-2) 25%,var(--surface-3) 37%,var(--surface-2) 63%);
  background-size:400% 100%;animation:shimmer 1.3s linear infinite;border-radius:var(--r-md)}
@keyframes shimmer{from{background-position:100% 0}to{background-position:-100% 0}}
/* one-shot fade for media images once they decode (added by JS on load; images
   are visible by default so this is purely additive, never hides anything). */
@keyframes imgIn{from{opacity:0}to{opacity:1}}
.img-in{animation:imgIn .3s ease}
.spinner-overlay{position:fixed;inset:0;z-index:300;display:grid;place-items:center;background:var(--bg)}
.spinner{width:40px;height:40px;border:3.5px solid var(--surface-2);border-top-color:var(--primary);border-radius:50%;animation:spin .8s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}
.empty{text-align:center;padding:52px 24px;color:var(--muted)}
.empty .empty__ic{width:84px;height:84px;border-radius:var(--r-2xl);margin:0 auto 16px;display:grid;place-items:center;
  font-size:34px;color:var(--primary);background:var(--primary-soft);box-shadow:var(--sh-1)}
.empty h3{color:var(--text);margin-bottom:6px;font-size:var(--t-lg)}
.empty p{margin:0}

/* ───────────────────────────── GRID ───────────────────────────── */
.grid{display:grid;gap:14px;grid-template-columns:repeat(auto-fill,minmax(155px,1fr))}

/* ───────────────────── COMMON LIST ROWS (comm / notif) ───────────────────── */
.lrow{display:flex;gap:13px;align-items:center;padding:14px 15px;background:var(--surface);border:none;border-radius:var(--r-lg);
  margin-bottom:11px;box-shadow:var(--sh-2);color:var(--text);transition:box-shadow .2s,transform .12s}
.lrow:hover{box-shadow:var(--sh-3)}
.lrow:active{transform:scale(.99)}
.lrow__b{flex:1;min-width:0}
.lrow__b>b{display:inline-flex;max-width:100%;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;vertical-align:bottom}
.lrow__b .sub{color:var(--muted);font-size:var(--t-xs);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.notif{display:flex;gap:13px;align-items:flex-start;padding:15px;background:var(--surface);border:none;border-radius:var(--r-md);margin-bottom:9px;box-shadow:var(--sh-1)}
.notif--unread{background:var(--primary-soft)}
.notif__ic{flex:0 0 auto;width:40px;height:40px;border-radius:var(--r-full);display:grid;place-items:center;font-size:16px;
  color:var(--primary-ink);background:var(--primary);box-shadow:var(--sh-1)}

/* @mention autocomplete dropdown */
.mention-box{position:fixed;z-index:9999;width:258px;max-height:264px;overflow-y:auto;padding:6px;
  background:var(--surface);border-radius:var(--r-lg);box-shadow:var(--sh-4)}
.mention-opt{display:flex;align-items:center;gap:10px;width:100%;padding:8px 9px;border:none;background:none;cursor:pointer;
  border-radius:var(--r-md);text-align:left;color:var(--text)}
.mention-opt--active,.mention-opt:hover{background:var(--surface-2)}
.mention-opt__m{display:flex;flex-direction:column;min-width:0;line-height:1.25}
.mention-opt__m b{font-size:var(--t-sm);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mention-opt__m small{font-size:var(--t-xs);color:var(--muted)}
.mention-all-ic{display:inline-flex;align-items:center;justify-content:center;background:var(--accent);color:#000;font-size:13px}

/* ───────────────────── STORIES (shared) ───────────────────── */
.stories{display:flex;gap:15px;overflow-x:auto;padding:6px 2px 18px}
.story-cell{flex:0 0 auto;display:flex;flex-direction:column;align-items:center;gap:7px;background:none;border:none;cursor:pointer;width:72px}
.story-cell small{font-size:11px;color:var(--muted);max-width:68px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:700}
.story-ring{width:64px;height:64px;border-radius:50%;padding:3px;box-sizing:border-box;overflow:hidden;flex:0 0 auto;
  background:var(--primary);box-shadow:var(--sh-2)}
.story-ring--seen{background:var(--surface-3);box-shadow:none}
.story-ring img{width:100%;height:100%;border-radius:50%;object-fit:cover;object-position:center;
  border:2.5px solid var(--surface);box-sizing:border-box;display:block;aspect-ratio:1/1}
/* "+ add" ring holds an icon, not an image — keep it centred */
.story-ring--add{display:grid;place-items:center;overflow:visible;background:var(--surface-2);color:var(--primary);font-size:22px;box-shadow:var(--sunk)}

/* ───────────────────── COMPOSER (shared) ───────────────────── */
.composer{display:flex;gap:13px;padding:15px 17px;background:var(--surface);border:none;border-radius:var(--r-lg);
  margin-bottom:16px;box-shadow:var(--sh-2);cursor:pointer;transition:box-shadow .2s}
.composer:hover{box-shadow:var(--sh-3)}
.composer textarea{border:none;background:none;resize:none;width:100%;color:var(--text);font-size:var(--t-md);min-height:56px;outline:none;line-height:1.55}
/* contenteditable emoji input — looks like a clay textarea, renders custom emoji inline */
.emoji-field{min-height:92px;max-height:240px;overflow-y:auto;white-space:pre-wrap;word-break:break-word;line-height:1.55;cursor:text}
.emoji-field:empty:before{content:attr(data-ph);color:var(--muted);pointer-events:none}
.emoji-field .emo{width:1.3em;height:1.3em;vertical-align:-.28em}
.emoji-field:focus{outline:none;box-shadow:var(--sunk),0 0 0 3px var(--primary-soft)}
.composer__row{display:flex;align-items:center;justify-content:space-between;margin-top:12px;gap:8px}
.composer__tools{display:flex;gap:7px}
.composer__tools .icon-btn{width:42px;height:42px;color:var(--primary);background:var(--surface-2);box-shadow:none}
.composer__tools .icon-btn:hover{background:var(--primary-soft)}
.preview{position:relative;margin-top:12px;border-radius:var(--r-md);overflow:hidden;box-shadow:var(--sh-1)}
.preview img,.preview video{width:100%;max-height:320px;object-fit:cover}
.preview__x{position:absolute;top:9px;right:9px;width:34px;height:34px;border-radius:50%;border:none;background:rgba(0,0,0,.6);color:#fff;cursor:pointer;font-size:16px}

/* ───────────────────── POLLS (shared) ───────────────────── */
.poll{margin:10px 0 4px;display:flex;flex-direction:column;gap:9px}
.poll-opt{position:relative;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:13px 16px;
  border:none;border-radius:var(--r-md);background:var(--surface-sunk);color:var(--text);font-weight:700;
  font-size:var(--t-sm);cursor:pointer;overflow:hidden;text-align:left;width:100%;box-shadow:var(--sh-1);transition:var(--ease-1)}
.poll-opt:not(.poll-opt--res):hover{background:var(--primary-soft);color:var(--primary)}
.poll-opt:active{transform:scale(.99)}
.poll-opt--res{cursor:default}
.poll-fill{position:absolute;left:0;top:0;bottom:0;background:var(--primary-soft);z-index:0;transition:width .6s cubic-bezier(.4,0,.2,1)}
.poll-opt--mine{box-shadow:inset 0 0 0 2px var(--primary)}
.poll-lbl,.poll-pct{position:relative;z-index:1}
.poll-pct{font-weight:800;color:var(--primary)}
.poll-total{color:var(--muted);font-size:var(--t-xs);padding-left:3px}
.poll-edit{display:flex;flex-direction:column;gap:9px;margin:11px 0;padding:15px;background:var(--surface-sunk);border-radius:var(--r-md);box-shadow:var(--sunk)}
.poll-edit .input{background:var(--surface)}

/* sticker tray */
.sticker-tray{display:flex;flex-wrap:wrap;gap:5px;margin:11px 0;max-height:150px;overflow-y:auto;background:var(--surface-sunk);border-radius:var(--r-md);padding:9px;box-shadow:var(--sunk)}
.sticker-tray button{background:none;border:none;cursor:pointer;padding:5px;border-radius:11px;line-height:0;transition:transform .12s}
.sticker-tray button:hover{background:var(--surface-3);transform:scale(1.18)}
.sticker-tray button img{width:28px;height:28px;display:block}

/* Combined "Photo or Sticker" attachment picker (one icon → this modal). */
.mediapick__title{margin:0 0 14px;text-align:center}
.mediapick__row{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.mediapick__opt{display:flex;flex-direction:column;align-items:center;gap:10px;padding:20px 10px;background:var(--surface-sunk);
  border:none;border-radius:var(--r-lg);box-shadow:var(--sunk);cursor:pointer;font-weight:700;color:var(--text);transition:transform .12s,box-shadow .12s}
.mediapick__opt:hover{transform:translateY(-2px);box-shadow:var(--sh-2)}
.mediapick__ic{width:52px;height:52px;border-radius:var(--r-full);display:grid;place-items:center;font-size:22px;
  background:var(--primary-soft);color:var(--primary)}

/* clickable hashtag / mention */
a.tag,a.mention{color:var(--primary);font-weight:700;cursor:pointer}
/* @all / @everyone staff broadcast tag — a pill, not a person link */
.mention--all{display:inline-block;padding:0 6px;border-radius:6px;background:var(--accent);color:#000;font-weight:800}

/* ───────────────────── GAMIFICATION ───────────────────── */
.xpbar{height:9px;border-radius:var(--r-full);background:var(--surface-sunk);overflow:hidden;margin:6px 0;box-shadow:var(--sunk)}
.xpbar>i{display:block;height:100%;border-radius:var(--r-full);background:var(--primary);transition:width .6s ease}
.rw-head{display:flex;gap:15px;align-items:center}
.rw-lvl{flex:0 0 auto;width:58px;height:58px;border-radius:var(--r-full);display:grid;place-items:center;font-weight:800;font-size:21px;
  color:var(--primary-ink);background:var(--primary);box-shadow:var(--glow)}
.rw-stats{display:flex;gap:15px;margin-top:6px;font-size:var(--t-sm);font-weight:700;color:var(--muted)}
.rw-quest{display:flex;gap:13px;align-items:center;padding:14px;background:var(--surface-2);border:none;border-radius:var(--r-md);margin-bottom:10px;box-shadow:var(--sh-1)}
.rw-quest>i{width:38px;height:38px;border-radius:var(--r-full);display:grid;place-items:center;background:var(--primary-soft);color:var(--primary);flex:0 0 auto}
.rw-quest--done{opacity:.6}.rw-quest--done>i{background:var(--success);color:#fff}
/* Uncompleted quests are tappable — take the user to where they can do it. */
.rw-quest--go{cursor:pointer;-webkit-tap-highlight-color:transparent;transition:transform .12s var(--ease),box-shadow .12s var(--ease)}
.rw-quest--go:hover{box-shadow:var(--sh-2)}
.rw-quest--go:active{transform:scale(.985)}
.rw-quest__go{flex:0 0 auto;color:var(--muted);font-size:12px;margin-left:2px}
.rw-quest--bonus.rw-quest--go .rw-quest__go{display:none}
.rw-quest__cnt{color:var(--muted);font-weight:700}
/* Daily bonus card — stacks vertically (overrides the row layout of .rw-quest)
   with a clean gold-tinted surface. */
.rw-quest--bonus{flex-direction:column;align-items:stretch;gap:10px;padding:14px;
  background:linear-gradient(135deg,rgba(246,168,33,.16),rgba(246,168,33,.05));
  border:1.5px solid rgba(246,168,33,.38);border-radius:var(--r-md)}
.rw-quest--bonus.rw-quest--done{opacity:1}
.rw-bonus-top{display:flex;align-items:center;gap:10px}
.rw-bonus-tag{font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.06em;
  color:var(--gold);display:inline-flex;align-items:center;gap:5px;line-height:1.3}
.rw-bonus-reward{margin-left:auto;flex:0 0 auto;font-size:11px;font-weight:800;color:var(--gold);white-space:nowrap}
.rw-bonus-main{display:flex;align-items:center;gap:12px}
.rw-bonus-main>i{width:38px;height:38px;border-radius:var(--r-full);display:grid;place-items:center;
  background:rgba(246,168,33,.18);color:var(--gold);font-size:17px;flex:0 0 auto}
.rw-bonus-main b{font-size:var(--t-sm);display:block}
.rw-bonus-main .hint{margin:2px 0 0;font-size:11px}
.rw-bonus-main .xpbar{margin-top:5px}
.rw-quest--bonus .xpbar i{background:var(--gold)}
/* Flash highlight when a notification deep-links to a specific quest / badge */
.rw-quest--flash{animation:rw-flash 2.2s var(--ease)}
@keyframes rw-flash{0%,100%{box-shadow:var(--sh-1)}15%,45%{box-shadow:var(--sh-1),inset 0 0 0 2px var(--primary);background:var(--primary-softer)}}
.badge-cell--flash{animation:badge-flash 1.6s var(--ease)}
@keyframes badge-flash{0%,100%{transform:scale(1)}30%{transform:scale(1.16)}60%{transform:scale(1.04)}}
.lb-row{display:flex;gap:12px;align-items:center;padding:12px 11px;border-radius:var(--r-md);margin-bottom:6px;background:var(--surface-2);box-shadow:var(--sh-1)}
.lb-row--me{background:var(--primary-soft)}
.lb-rank{flex:0 0 30px;text-align:center;font-weight:800;color:var(--muted)}
.lb-rank--top{color:var(--gold)}
.badge-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:15px}
.badge-cell{display:flex;flex-direction:column;align-items:center;gap:7px;text-align:center;font-size:var(--t-xs);font-weight:700;cursor:pointer;-webkit-tap-highlight-color:transparent;transition:transform .12s var(--ease)}
.badge-cell:active{transform:scale(.94)}
.badge-cell--locked{opacity:.34;filter:grayscale(1)}
/* Achievement-badge explainer modal */
.badge-detail{text-align:center;padding:4px 2px}
.badge-detail__ic{width:74px;height:74px;font-size:30px;margin:0 auto}
.badge-detail__status{display:inline-flex;align-items:center;gap:7px;margin-top:4px;padding:8px 14px;border-radius:var(--r-full);
  background:var(--surface-2);color:var(--text-2);font-size:var(--t-sm);font-weight:700}
.badge-detail__status--on{background:var(--primary-softer);color:var(--primary)}
.badge-ic{width:58px;height:58px;border-radius:var(--r-full);display:grid;place-items:center;font-size:23px;color:#fff;box-shadow:var(--sh-2)}
.badge-ic--bronze{background:linear-gradient(140deg,#c98a5c,#7c5230)}
.badge-ic--silver{background:linear-gradient(140deg,#c2cad6,#7d8694)}
.badge-ic--gold{background:linear-gradient(140deg,#f7cb5d,#d99a14)}
.badge-ic--special{background:var(--primary)}

/* ───────────────── PWA INSTALL NUDGE (clay banner) ───────────────── */
.install-bar{position:fixed;left:50%;transform:translate(-50%,140%);
  bottom:calc(var(--nav-h) + 30px + var(--safe-bottom));width:min(560px,calc(100% - 24px));z-index:70;
  display:flex;align-items:center;gap:13px;padding:12px 14px;background:var(--surface);border-radius:var(--r-xl);
  box-shadow:var(--sh-4);opacity:0;transition:transform .35s cubic-bezier(.34,1.1,.4,1),opacity .35s}
.install-bar--in{transform:translate(-50%,0);opacity:1}
.install-bar__ic{flex:0 0 auto;width:44px;height:44px;border-radius:var(--r-md);display:grid;place-items:center;font-size:19px;
  color:var(--primary-ink);background:var(--primary);box-shadow:var(--sh-1)}
.install-bar__t{flex:1;min-width:0;display:flex;flex-direction:column;line-height:1.3}
.install-bar__t b{font-size:var(--t-sm)}
.install-bar__t span{font-size:var(--t-xs);color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.install-bar__x{flex:0 0 auto;width:34px;height:34px;border-radius:var(--r-full);border:none;background:var(--surface-2);
  color:var(--muted);cursor:pointer;font-size:15px;box-shadow:var(--sh-1)}
.install-bar__x:active{transform:scale(.9)}
.install-bar__ic--push{background:linear-gradient(140deg,var(--gold,#f6c453),#ffb020);color:#3a2600}
@media(min-width:1024px){.install-bar{bottom:24px;left:calc(50% + 132px)}}

/* ═════════════════ "TAKE TOUR" BEACON ═════════════════
   Floating, gently drifting + shaking pill that invites a new (or returning-but-
   unfinished) user to take the guided tour. Persists until the ACCOUNT completes
   the tour (tied server-side), then App.mountTourBeacon() removes it. */
.tour-beacon{position:fixed;z-index:69;right:16px;bottom:calc(var(--nav-h) + 34px + var(--safe-bottom));
  display:inline-flex;align-items:center;gap:9px;padding:11px 16px 11px 12px;border:none;cursor:pointer;
  border-radius:var(--r-full);color:#fff;font-family:inherit;font-weight:800;font-size:var(--t-sm);
  background:var(--primary);
  box-shadow:0 12px 28px rgba(29,111,224,.42), inset 0 2px 4px rgba(255,255,255,.4), inset 0 -5px 11px rgba(0,0,0,.18);
  animation:tbDrift 3.4s ease-in-out infinite, tbShake 4.2s ease-in-out infinite}
.tour-beacon:active{transform:scale(.94)}
.tour-beacon__ic{flex:0 0 auto;width:30px;height:30px;border-radius:var(--r-full);display:grid;place-items:center;
  background:rgba(255,255,255,.22);font-size:15px}
.tour-beacon__lbl{white-space:nowrap;letter-spacing:.01em}
.tour-beacon__pulse{position:absolute;inset:0;border-radius:var(--r-full);border:2px solid var(--primary-2);
  animation:tbPulse 2s ease-out infinite;pointer-events:none}
@keyframes tbDrift{0%,100%{transform:translateY(0)}50%{transform:translateY(-9px)}}
@keyframes tbShake{0%,86%,100%{rotate:0deg}88%{rotate:-7deg}91%{rotate:6deg}94%{rotate:-4deg}97%{rotate:2deg}}
@keyframes tbPulse{0%{opacity:.65;transform:scale(1)}100%{opacity:0;transform:scale(1.55)}}
@media(min-width:1024px){.tour-beacon{bottom:26px;right:26px}}
@media(prefers-reduced-motion:reduce){.tour-beacon{animation:none}.tour-beacon__pulse{animation:none;opacity:.4}}

/* ═════════════════ RESPONSIVE: TABLET ═════════════════ */
@media(min-width:680px){
  :root{--maxw:600px}
}

/* ═════════════════ RESPONSIVE: DESKTOP SHELL (≥1024) ═════════════════ */
@media(min-width:1024px){
  .navdock{display:none}
  body{padding-bottom:40px;padding-left:264px}
  .topbar__logo{display:none}        /* brand lives in the side rail on desktop */
  .siderail{display:flex;flex-direction:column;position:fixed;top:0;left:0;bottom:0;width:264px;z-index:60;
    padding:26px 16px;overflow-y:auto;
    background:var(--glass);backdrop-filter:blur(24px) saturate(170%);-webkit-backdrop-filter:blur(24px) saturate(170%);
    border-right:1px solid var(--glass-line);box-shadow:14px 0 40px rgba(0,0,0,.06)}
  .surfaces{padding-top:14px}
}
@media(min-width:1320px){
  :root{--maxw:660px}
}
button{
  border: none;
}

/* ── TODAY strip ──────────────────────────────────────────────────────────────
   Horizontal row of puffy clay cards at the top of the feed — the daily loop
   made glanceable. Scrolls sideways on phones, wraps comfortably on desktop. */
.today{display:flex;gap:9px;overflow-x:auto;-webkit-overflow-scrolling:touch;
  scrollbar-width:none;padding:2px 2px 8px;margin:0 0 4px;scroll-snap-type:x proximity}
.today::-webkit-scrollbar{display:none}
.tdc{flex:0 0 auto;width:112px;min-height:84px;scroll-snap-align:start;
  display:flex;flex-direction:column;align-items:flex-start;gap:0;
  padding:10px 11px;border-radius:var(--r-md);background:var(--surface);
  box-shadow:var(--sh-2);cursor:pointer;text-align:left;color:var(--text);
  transition:var(--ease)}
.tdc:hover{transform:translateY(-2px)}
.tdc:active{transform:translateY(1px) scale(.985);box-shadow:var(--sh-1)}
.tdc__ico{width:26px;height:26px;border-radius:var(--r-full);display:grid;place-items:center;
  font-size:12px;margin-bottom:4px;background:var(--surface-sunk);color:var(--muted);box-shadow:var(--sh-1)}
.tdc__big{font-size:var(--t-2xl);font-weight:800;line-height:1;letter-spacing:-.03em}
.tdc__den{font-size:var(--t-md);font-weight:700;color:var(--muted)}
.tdc__lbl{font-size:var(--t-xs);font-weight:700;margin-top:1px}
.tdc__sub,.tdc__cta{font-size:10px;color:var(--muted);margin-top:2px;line-height:1.3;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.tdc__cta{color:var(--primary);font-weight:700}

/* streak rides on gold; spin glows green to pull the eye to the free reward */
.tdc--streak .tdc__ico{background:linear-gradient(140deg,#ffd76b,var(--gold));color:#3a2400;box-shadow:var(--glow-sm)}
.tdc--streak .tdc__big{color:var(--gold)}
.tdc--spin{background:var(--primary-softer)}
.tdc--spin .tdc__ico{background:var(--primary);color:var(--primary-ink);box-shadow:var(--glow-sm)}
.tdc--spin .tdc__lbl{margin-top:auto}
.tdc--quest .tdc__ico{color:var(--primary)}
.tdc--quiz .tdc__ico{background:var(--primary);color:var(--primary-ink);box-shadow:var(--glow-sm)}
.tdc--quiz .tdc__lbl{font-size:var(--t-sm);margin-top:3px}
.tdc--rank .tdc__ico{color:var(--gold)}
.tdc--rank .tdc__lbl,.tdc--spin .tdc__lbl{font-size:var(--t-sm)}

/* ---- ONBOARDING (item 9): compact Today-strip card → full checklist in a modal ---- */
.tdc--onboard{background:var(--primary-softer)}
.tdc--onboard .tdc__ico{background:var(--primary);color:var(--primary-ink);box-shadow:var(--glow-sm)}
.tdc--onboard .tdc__cta{margin-top:auto}
/* checklist rendered inside a modal (the modal panel is the surface, so no wrapper bg) */
.onbc__head{display:flex;align-items:center;justify-content:space-between;gap:10px}
.onbc__title{font-size:var(--t-lg);font-weight:800;display:flex;align-items:center;gap:8px}
.onbc__title i{color:var(--primary)}
.onbc__badge{font-size:var(--t-xs);font-weight:800;color:var(--primary);
  background:var(--primary-soft);padding:4px 11px;border-radius:var(--r-full);box-shadow:var(--sh-1)}
.onbc__steps--scroll{max-height:min(52vh,420px);overflow-y:auto;scrollbar-width:thin;
  margin:0 -4px;padding:0 4px 2px}
.onbc__prog{height:7px;border-radius:var(--r-full);background:var(--surface-sunk);box-shadow:var(--sunk);
  margin:12px 0 6px;overflow:hidden}
.onbc__prog span{display:block;height:100%;border-radius:inherit;
  background:var(--primary);transition:width .5s var(--ease-fn,ease)}
.onbc__count{font-size:var(--t-xs);color:var(--muted);font-weight:700;margin-bottom:8px}
.onbc__steps{display:flex;flex-direction:column;gap:7px}
.onbc__step{display:flex;align-items:center;gap:11px;width:100%;text-align:left;
  padding:9px 11px;border-radius:var(--r-md);background:var(--surface-sunk);color:var(--text);
  box-shadow:var(--sh-1);cursor:pointer;transition:var(--ease)}
.onbc__step:hover{transform:translateY(-1px);box-shadow:var(--sh-2)}
.onbc__step:active{transform:translateY(1px)}
.onbc__step--done{opacity:.62;cursor:default}
.onbc__step--done:hover{transform:none;box-shadow:var(--sh-1)}
.onbc__check{width:30px;height:30px;flex:0 0 auto;border-radius:var(--r-full);display:grid;place-items:center;
  font-size:13px;background:var(--surface);color:var(--primary);box-shadow:var(--sh-1)}
.onbc__step--done .onbc__check{background:var(--primary);color:var(--primary-ink)}
.onbc__body{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}
.onbc__body b{font-size:var(--t-sm);font-weight:800}
.onbc__step--done .onbc__body b{text-decoration:line-through}
.onbc__body span{font-size:var(--t-xs);color:var(--muted);line-height:1.3;
  display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden}
.onbc__go{color:var(--muted);font-size:12px;flex:0 0 auto}
.tdc--busy{opacity:.6;pointer-events:none}
@media(min-width:721px){ .today{flex-wrap:wrap;overflow:visible} .tdc{flex:1 1 112px} }

/* ── Install gate ─────────────────────────────────────────────────────────────
   Value-first "get the app" prompt shown at the moment of participation. */
.appgate__head{text-align:center;padding:4px 4px 2px}
.appgate__icon{width:58px;height:58px;border-radius:var(--r-lg);display:grid;place-items:center;margin:0 auto 12px;
  font-size:25px;background:var(--primary);color:var(--primary-ink);box-shadow:var(--glow-sm)}
.appgate__head h3{font-size:var(--t-xl);font-weight:800;margin:0 0 6px}
.appgate__head p{margin:0;font-size:var(--t-sm);line-height:1.55}
.appgate__steps{display:flex;flex-direction:column;gap:10px;margin-top:16px}
.appgate__step{display:flex;align-items:center;gap:12px;padding:13px 14px;border-radius:var(--r-md);
  background:var(--surface-sunk);box-shadow:var(--sunk,inset 0 2px 5px rgba(0,0,0,.06))}
.appgate__step.is-done{background:var(--primary-softer)}
.appgate__tick{flex:0 0 auto;width:34px;height:34px;border-radius:var(--r-full);display:grid;place-items:center;
  font-size:16px;background:var(--surface);color:var(--muted);box-shadow:var(--sh-1)}
.appgate__step.is-done .appgate__tick{color:var(--primary)}
.appgate__txt{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}
.appgate__txt b{font-size:var(--t-base);font-weight:700}
.appgate__txt span{font-size:var(--t-xs)}
.appgate__on{flex:0 0 auto;font-size:var(--t-xs);font-weight:800;color:var(--primary);
  display:inline-flex;align-items:center;gap:4px}
.appgate__on::before{content:"\f00c";font-family:"Font Awesome 6 Free";font-weight:900}

/* ── LIVE "NEW POSTS" PILL (item 11) ──────────────────────────────────────────
   Tap-to-load pill that appears when the live heartbeat finds fresh posts above
   the feed. Sticks just below the header while scrolling. Clay, green accent
   fill, no border/glow. */
/* A compact FLOATING pill (not a full-width bar): overlays the feed near the top so it
   never pushes content down, and the JS only reveals it once you've scrolled down a bit. */
.feed-new-pill{position:fixed;top:calc(var(--safe-top,0px) + 64px);left:50%;transform:translateX(-50%);
  z-index:60;width:auto;max-width:calc(100vw - 32px);display:inline-flex;align-items:center;
  padding:8px 16px;border:none;cursor:pointer;font:inherit;font-weight:800;font-size:var(--t-sm);
  color:var(--primary-ink,#fff);background:var(--primary);border-radius:var(--r-full,999px);
  box-shadow:var(--sh-3);transition:filter .12s ease}
.feed-new-pill:hover{filter:brightness(1.05)}
.feed-new-pill:active{filter:brightness(.93)}
.feed-new-pill i{margin-right:6px}
/* Small, non-obstructive variant (founder 2026-07-10): tighter padding, smaller text, a
   touch of lift so it reads as a quiet floating chip rather than a bar. */
.feed-new-pill--sm{padding:5px 12px;font-size:var(--t-xs,12px);box-shadow:var(--sh-2);animation:pillIn .18s ease}
@keyframes pillIn{from{opacity:0;transform:translateX(-50%) translateY(-6px)}to{opacity:1;transform:translateX(-50%) translateY(0)}}
@media (prefers-reduced-motion:reduce){.feed-new-pill{transition:none}.feed-new-pill--sm{animation:none}}

/* ── OFFLINE / SYNC STATUS CHIP (item 20) ─────────────────────────────────────
   A small floating chip shown while offline (with the pending-write count) and
   briefly while a reconnect flush runs. Clay, one accent, no border/glow, FA icon. */
.offbar{position:fixed;left:50%;bottom:calc(var(--dock-h,64px) + env(safe-area-inset-bottom,0px) + 12px);
  transform:translateX(-50%);z-index:130;max-width:calc(100vw - 28px);
  display:flex;align-items:center;gap:8px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
  padding:9px 16px;border-radius:var(--r-full,999px);font-weight:700;font-size:var(--t-sm);
  box-shadow:var(--sh-2);animation:offbarIn .2s ease}
.offbar--off{background:var(--surface-3);color:var(--text)}
.offbar--sync{background:var(--primary);color:var(--primary-ink,#fff)}
.offbar i{font-size:.95em}
@keyframes offbarIn{from{opacity:0;transform:translate(-50%,8px)}to{opacity:1;transform:translate(-50%,0)}}
@media (prefers-reduced-motion:reduce){.offbar{animation:none}}

/* ── FEED DISCOVERY SPOTLIGHTS (items 3 + 12) ─────────────────────────────────
   Discovery shows ONE thing at a time, FULL-BLEED (full width + near-full height) —
   never a horizontal line-up. A single immersive spotlight (game / person / community
   / tournament / tutorial / quiz / app / Hall-of-Fame glimpse / trending / Archie)
   drops between posts; the per-type cursor makes the next one a fresh item. Media
   cards float white text over a dark scrim; text-only cards stay clay B&W + green.
   No borders, no glow. */
.fspot{position:relative;margin:16px 0;border-radius:var(--r-lg);overflow:hidden;
  min-height:70vh;box-shadow:var(--sh-2);cursor:pointer;color:var(--text);display:flex;
  background:var(--surface) center/cover no-repeat}
@media(min-width:721px){ .fspot{min-height:560px} }
.fspot--media{color:#fff}
.fspot__scrim{position:absolute;inset:0;pointer-events:none}
.fspot--media .fspot__scrim{background:linear-gradient(to top,
  rgba(0,0,0,.86) 4%,rgba(0,0,0,.42) 44%,rgba(0,0,0,.12) 100%)}
.fspot__inner{position:relative;z-index:1;display:flex;flex-direction:column;justify-content:flex-end;
  gap:10px;width:100%;padding:20px;padding-top:58px}
.fspot:not(.fspot--media) .fspot__inner{justify-content:center}
.fspot__kicker{position:absolute;top:16px;left:20px;display:inline-flex;align-items:center;gap:7px;
  font-size:12px;font-weight:800;letter-spacing:.04em;text-transform:uppercase;
  padding:7px 12px;border-radius:var(--r-full);background:var(--primary);color:var(--primary-ink)}
.fspot__body{display:flex;flex-direction:column;align-items:flex-start;gap:9px}
.fspot__title{margin:0;font-size:clamp(22px,5.4vw,30px);font-weight:900;line-height:1.12;letter-spacing:-.02em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%}
.fspot__sub{margin:0;font-size:var(--t-sm);font-weight:600;opacity:.94}
.fspot:not(.fspot--media) .fspot__sub{color:var(--muted);opacity:1}
.fspot__desc{margin:2px 0 0;font-size:var(--t-sm);line-height:1.5;opacity:.9;max-width:52ch}
.fspot:not(.fspot--media) .fspot__desc{color:var(--muted);opacity:1}
.fspot__foot{display:flex;align-items:center;gap:14px;margin-top:8px;flex-wrap:wrap}
.fspot__cta{padding:12px 22px;font-weight:800}
.fspot__all{border:none;background:none;cursor:pointer;font:inherit;font-weight:800;font-size:var(--t-sm);
  color:inherit;opacity:.92;display:inline-flex;align-items:center;gap:6px;padding:6px 2px}
.fspot:not(.fspot--media) .fspot__all{color:var(--primary);opacity:1}
/* avatar-led cards (people / communities) */
.fspot__avatar{width:96px;height:96px;border-radius:var(--r-full);object-fit:cover;
  box-shadow:var(--sh-2);background:var(--surface-3)}
/* big play button (games) */
.fspot__play{width:64px;height:64px;border-radius:var(--r-full);display:grid;place-items:center;
  background:var(--primary);color:var(--primary-ink);font-size:22px;box-shadow:var(--sh-2);margin-bottom:2px}
/* live/open badge (tournaments) */
.fspot__badge{align-self:flex-start;font-size:11px;font-weight:900;letter-spacing:.05em;
  color:var(--primary-ink);background:var(--primary);padding:4px 11px;border-radius:var(--r-full)}
/* trending chips */
.fspot__chips{display:flex;flex-wrap:wrap;gap:9px}
/* Hall-of-Fame mini leaderboard */
.fspot__ranks{display:flex;flex-direction:column;gap:8px;width:100%;max-width:420px;margin-top:4px}
.fspot__rank{display:flex;align-items:center;gap:11px;padding:9px 12px;border-radius:var(--r-md);
  background:var(--surface-sunk);box-shadow:var(--sh-1);cursor:pointer;color:var(--text);text-decoration:none}
.fspot__medal{width:26px;text-align:center;font-size:15px;color:var(--muted)}
.fspot__medal--0{color:var(--gold,#f5b301)}
.fspot__rnm{flex:1;min-width:0;font-weight:800;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.fspot__rscore{font-weight:800;color:var(--primary)}

/* ── INLINE FULLSCREEN GAME PLAYER (item 3) ───────────────────────────────────
   Tapping a game in the feed launches it fullscreen over everything, playable in
   place — no page change. Mirrors the games.html immersive player. */
.gplay{position:fixed;inset:0;z-index:300;background:#000;display:flex;flex-direction:column}
.gplay__bar{display:flex;align-items:center;gap:10px;padding:calc(8px + var(--safe-top)) 12px 8px;
  background:var(--surface);box-shadow:var(--sh-2);position:relative;z-index:2}
.gplay__title{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:var(--t-md)}
.gplay__stage{position:relative;flex:1;min-height:0;background:#000}
.gplay__frame{display:block;width:100%;height:100%;border:none;background:#000}
.gplay__stage--rot .gplay__frame{position:absolute;top:50%;left:50%;
  width:100vh;height:100vw;transform:translate(-50%,-50%) rotate(90deg);transform-origin:center}

/* ── INTERACTIVE FEED CARDS (feed mixer) ──────────────────────────────────────
   Compact, snackable, act-in-place cards interleaved between posts: trivia,
   this-or-that, guess-the-emoji, daily challenge, coin nudge. Unlike the 70vh
   immersive .fspot spotlights, these are short so the feed stays lively without
   a full-screen takeover every few posts. */
.fcard{position:relative;margin:16px 0;border-radius:var(--r-lg);overflow:hidden;
  box-shadow:var(--sh-2);background:var(--surface);padding:18px}
.fcard--accent{background:var(--primary-softer)}
.fcard--coin{background:linear-gradient(135deg,rgba(245,179,1,.16),var(--surface))}
.fcard__kicker{display:inline-flex;align-items:center;gap:7px;font-size:11px;font-weight:800;
  letter-spacing:.05em;text-transform:uppercase;color:var(--primary);margin-bottom:12px}
.fcard__kicker .fcard__streak{margin-left:auto;color:var(--gold,#f5b301);text-transform:none;letter-spacing:0}
.fcard__q{margin:0 0 14px;font-size:clamp(17px,4vw,21px);font-weight:800;line-height:1.3;letter-spacing:-.01em}
.fcard__opts{display:flex;flex-direction:column;gap:9px}
.fcard__opts--row{flex-direction:row}
.fcard__opts--row .fopt{flex:1}
.fopt{position:relative;overflow:hidden;display:flex;align-items:center;gap:10px;width:100%;
  text-align:left;padding:14px 15px;border:1.5px solid var(--line,rgba(128,128,128,.18));border-radius:var(--r-md);
  background:var(--surface);color:var(--text);font:inherit;font-weight:700;font-size:var(--t-sm);
  cursor:pointer;transition:border-color .15s,background .15s,transform .1s}
.fopt:active{transform:scale(.985)}
.fopt:hover{border-color:var(--primary)}
.fopt__ic{flex:0 0 auto;width:26px;height:26px;border-radius:50%;display:grid;place-items:center;
  background:var(--surface-sunk);color:var(--muted);font-size:12px;font-weight:800}
.fopt__txt{flex:1;min-width:0}
.fopt__emoji{font-size:26px;line-height:1}
.fopt__bar{position:absolute;inset:0 auto 0 0;width:0;background:var(--primary-soft);z-index:0;
  transition:width .5s cubic-bezier(.2,.7,.3,1)}
.fopt>*{position:relative;z-index:1}
.fopt__pct{margin-left:auto;font-weight:800;color:var(--muted);opacity:0;transition:opacity .3s}
.fcard--done .fopt{cursor:default}
.fcard--done .fopt__pct{opacity:1}
.fopt--picked{border-color:var(--primary)}
.fopt--right{border-color:var(--good,#22c55e)!important}
.fopt--right .fopt__ic{background:var(--good,#22c55e);color:#fff}
.fopt--right .fopt__bar{background:rgba(34,197,94,.16)}
.fopt--wrong{border-color:var(--danger,#e5484d)!important}
.fopt--wrong .fopt__ic{background:var(--danger,#e5484d);color:#fff}
.fcard__foot{display:flex;align-items:center;gap:12px;margin-top:14px;flex-wrap:wrap}
.fcard__result{font-size:var(--t-sm);font-weight:800;display:inline-flex;align-items:center;gap:7px}
.fcard__result--good{color:var(--good,#22c55e)}
.fcard__result--bad{color:var(--danger,#e5484d)}
.fcard__all{margin-left:auto;border:none;background:none;cursor:pointer;font:inherit;font-weight:800;
  font-size:var(--t-sm);color:var(--primary);display:inline-flex;align-items:center;gap:6px}
.fcard__hint{margin:0 0 12px;font-size:var(--t-sm);color:var(--muted);font-weight:600}
/* coin-nudge card layout */
.fcard__coinrow{display:flex;align-items:center;gap:14px}
.fcard__coinic{flex:0 0 auto;width:54px;height:54px;border-radius:var(--r-md);display:grid;place-items:center;
  background:linear-gradient(140deg,#f7cb5d,var(--gold,#f5b301));color:#3a2a06;font-size:24px;box-shadow:var(--sh-1)}
.fcard__coinbig{font-size:clamp(20px,5vw,26px);font-weight:900;letter-spacing:-.02em;line-height:1.1}
.fcard__coinsub{font-size:var(--t-sm);color:var(--muted);font-weight:600;margin-top:2px}
.fcard__prog{height:8px;border-radius:var(--r-full);background:var(--surface-sunk);overflow:hidden;margin-top:12px}
.fcard__prog>i{display:block;height:100%;border-radius:inherit;background:var(--primary)}


/* =============================================================================
   PREMIUMFREELANCERS — MARKETPLACE COMPONENTS
   Built on the same clay language above: puffy surfaces, big radii, depth from
   soft dual shadows (never borders), one blue accent used sparingly.
   ========================================================================== */

/* ── auth sheet: role picker / checkbox line / or-separator ── */
.role-pick{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.role-opt{display:flex;flex-direction:column;align-items:center;gap:2px;padding:16px 12px;border:none;cursor:pointer;
  border-radius:var(--r-lg);background:var(--surface);box-shadow:var(--sh-1);color:var(--text);transition:var(--ease);text-align:center}
.role-opt i{font-size:20px;color:var(--muted);margin-bottom:4px;transition:var(--ease)}
.role-opt b{font-size:var(--t-sm);font-weight:800}
.role-opt span{font-size:var(--t-xs);color:var(--muted)}
.role-opt:active{transform:scale(.96)}
.role-opt--on{background:var(--primary-softer);box-shadow:var(--sh-2),inset 0 0 0 2px var(--primary)}
.role-opt--on i{color:var(--primary)}

.checkline{display:flex;align-items:flex-start;gap:10px;margin:-2px 0 16px;font-size:var(--t-sm);color:var(--text-2);cursor:pointer}
.checkline input{margin-top:1px}   /* look comes from the custom checkbox reset in FORMS */

.or-sep{display:flex;align-items:center;gap:12px;margin:18px 0;color:var(--muted);font-size:var(--t-xs);font-weight:700}
.or-sep::before,.or-sep::after{content:'';flex:1;height:1px;background:var(--line)}

/* ── menu sheet grid ── */
.menu-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
.menu-tile{display:flex;flex-direction:column;align-items:center;gap:7px;padding:16px 8px;border:none;cursor:pointer;
  border-radius:var(--r-lg);background:var(--surface-2);box-shadow:var(--sh-1);color:var(--text);
  font-weight:700;font-size:var(--t-xs);transition:var(--ease)}
.menu-tile i{font-size:19px;color:var(--primary)}
.menu-tile:active{transform:scale(.94)}

/* ── stars ── */
.stars{display:inline-flex;align-items:center;gap:4px;color:var(--gold);font-weight:800;font-size:var(--t-xs);white-space:nowrap}
.stars .muted{font-weight:700}

/* ── page header (title + optional back/action) ── */
.pagehead{display:flex;align-items:center;gap:12px;padding:calc(11px + var(--safe-top)) 0 6px}
.pagehead h1{font-size:var(--t-2xl);margin:0;flex:1;min-width:0}
.crumb{font-size:var(--t-xs);color:var(--muted);margin-bottom:6px}
.crumb a{color:var(--muted)}
.crumb a:hover{color:var(--primary)}

/* ── HERO (home) ── */
.hero{text-align:center;padding:26px 0 8px}
.hero h1{font-size:var(--t-3xl);letter-spacing:-.035em;margin-bottom:10px}
.hero h1 b{color:var(--primary)}
.hero p{color:var(--muted);max-width:460px;margin:0 auto 18px}
.hero__search{display:flex;gap:9px;align-items:center;margin-bottom:14px}
.hero__search .search-box{flex:1}
.catrow{display:flex;gap:8px;overflow-x:auto;padding:2px 2px 10px;scrollbar-width:none}
.catrow::-webkit-scrollbar{display:none}
.catrow .chip{flex:0 0 auto}

/* ── role CTA cards (home) ── */
.ctacards{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:8px 0 22px}
@media(max-width:560px){.ctacards{grid-template-columns:1fr}}
.ctacard{padding:20px;border-radius:var(--r-xl);background:var(--surface);box-shadow:var(--sh-2);transition:var(--ease)}
.ctacard:hover{box-shadow:var(--sh-3);transform:translateY(-2px)}
.ctacard__ic{width:46px;height:46px;border-radius:var(--r-md);display:grid;place-items:center;font-size:20px;
  color:var(--primary);background:var(--primary-soft);box-shadow:var(--sh-1);margin-bottom:12px}
.ctacard h3{font-size:var(--t-lg);margin-bottom:6px}
.ctacard p{color:var(--muted);font-size:var(--t-sm);margin-bottom:14px}

/* ── GIG CARDS ── */
.gigrid{display:grid;gap:14px;grid-template-columns:repeat(auto-fill,minmax(230px,1fr))}
.gcard{display:flex;flex-direction:column;border-radius:var(--r-lg);background:var(--surface);box-shadow:var(--sh-2);
  overflow:hidden;color:var(--text);transition:var(--ease)}
.gcard:hover{box-shadow:var(--sh-3);transform:translateY(-3px)}
.gcard:active{transform:scale(.98)}
.gcard__thumb{width:100%;aspect-ratio:16/10;object-fit:cover;background:var(--surface-3);display:block}
/* Themed stand-in for a gig with no cover image (App.gigThumb). Built from
   tokens so it is correct in both themes no matter how the theme was chosen. */
.gcard__thumb--ph{display:grid;place-items:center;background:var(--surface-3);color:var(--muted);font-size:30px;opacity:.5}
/* the same thumbnail blown up as the gig-detail hero */
.gig-hero{margin-bottom:18px}
.gig-hero .gcard__thumb{border-radius:var(--r-lg);box-shadow:var(--sh-2);aspect-ratio:16/9;font-size:44px}
.gcard__body{padding:13px 15px 15px;display:flex;flex-direction:column;gap:8px;flex:1}
.gcard__seller{display:flex;align-items:center;gap:8px;font-size:var(--t-xs);color:var(--muted);font-weight:700}
.gcard__title{font-weight:700;font-size:var(--t-sm);line-height:1.4;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.gcard__foot{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:auto;padding-top:10px}
.gcard__price{font-weight:800;font-size:var(--t-md)}
.gcard__price small{font-weight:700;color:var(--muted);font-size:var(--t-xs)}

/* ── JOB CARDS ── */
.jcard{display:block;padding:17px 18px;border-radius:var(--r-lg);background:var(--surface);box-shadow:var(--sh-2);
  margin-bottom:13px;color:var(--text);transition:var(--ease)}
.jcard:hover{box-shadow:var(--sh-3);transform:translateY(-2px)}
.jcard:active{transform:scale(.99)}
.jcard__title{font-weight:700;font-size:var(--t-md);margin-bottom:5px}
.jcard__desc{color:var(--muted);font-size:var(--t-sm);line-height:1.5;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;margin-bottom:10px}
.jcard__tags{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:11px}
.jcard__meta{display:flex;gap:16px;flex-wrap:wrap;font-size:var(--t-xs);color:var(--muted);font-weight:700}
.jcard__meta i{margin-right:5px}

/* ── PACKAGES (Basic / Standard / Premium) ── */
.pkgtabs{display:flex;gap:5px;background:var(--surface-sunk);border-radius:var(--r-full);padding:5px;margin-bottom:16px;box-shadow:var(--sunk)}
.pkgtabs button{flex:1;padding:10px 6px;border:none;background:none;color:var(--muted);font-weight:800;
  border-radius:var(--r-full);cursor:pointer;font-size:var(--t-xs);transition:var(--ease-1);text-transform:capitalize}
.pkgtabs button.on{background:var(--primary);color:var(--primary-ink);box-shadow:var(--glow-sm)}
.pkg__price{font-size:var(--t-3xl);font-weight:800;letter-spacing:-.03em;margin:2px 0 8px}
.pkg__meta{display:flex;gap:16px;font-size:var(--t-xs);color:var(--muted);font-weight:700;margin:10px 0 14px}
.pkg__feats{display:flex;flex-direction:column;gap:9px;margin-bottom:16px}
.pkg__feats li{display:flex;gap:9px;align-items:flex-start;font-size:var(--t-sm)}
.pkg__feats i{color:var(--success);margin-top:3px;flex:0 0 auto}

/* ── STATUS PILLS ── */
.spill{display:inline-flex;align-items:center;gap:6px;padding:6px 14px;border-radius:var(--r-full);
  font-weight:800;font-size:var(--t-xs);background:var(--surface-2);color:var(--muted);box-shadow:var(--sh-1);white-space:nowrap}
.spill--active,.spill--paid,.spill--in_escrow,.spill--pending_review{background:var(--primary-soft);color:var(--primary)}
.spill--delivered,.spill--revision_requested,.spill--pending{background:var(--warning-soft);color:#8a5a00}
.spill--completed,.spill--released,.spill--verified{background:var(--success-soft);color:var(--success)}
.spill--cancelled,.spill--disputed,.spill--failed,.spill--refunded,.spill--rejected{background:var(--danger-soft);color:var(--danger)}
[data-theme=dark] .spill--delivered,[data-theme=dark] .spill--revision_requested,[data-theme=dark] .spill--pending{color:var(--warning)}

/* ── STAT TILES ── */
.stats{display:grid;gap:11px;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));margin-bottom:20px}
.stile{padding:16px 17px;border-radius:var(--r-lg);background:var(--surface);box-shadow:var(--sh-2)}
.stile__v{font-size:var(--t-2xl);font-weight:800;letter-spacing:-.03em;line-height:1.1}
.stile__l{font-size:var(--t-xs);color:var(--muted);font-weight:700;margin-top:3px}

/* ── ORDER TIMELINE ── */
.tline{position:relative;padding-left:30px;margin-top:6px}
.tline::before{content:'';position:absolute;left:10px;top:6px;bottom:8px;width:2px;background:var(--surface-3);border-radius:2px}
.tline__i{position:relative;padding-bottom:20px}
.tline__i:last-child{padding-bottom:0}
.tline__i::before{content:'';position:absolute;left:-30px;top:2px;width:22px;height:22px;border-radius:var(--r-full);
  background:var(--surface);box-shadow:var(--sh-1),inset 0 0 0 2px var(--surface-3)}
.tline__i--on::before{background:var(--primary);box-shadow:var(--glow-sm)}
.tline__i b{display:block;font-size:var(--t-sm);text-transform:capitalize}
.tline__i span{color:var(--muted);font-size:var(--t-xs)}

/* ── file chips (deliveries / verification docs) ── */
.filechip{display:inline-flex;align-items:center;gap:8px;padding:9px 15px;border-radius:var(--r-full);
  background:var(--surface-2);box-shadow:var(--sh-1);font-size:var(--t-xs);font-weight:700;color:var(--text);
  margin:0 7px 7px 0;transition:var(--ease)}
.filechip:active{transform:scale(.95)}
.filechip i{color:var(--primary)}

/* ── skill picker (verification onboarding) ── */
.skillwrap{display:flex;flex-wrap:wrap;gap:8px}
.skillpick{padding:9px 15px;border-radius:var(--r-full);border:none;cursor:pointer;background:var(--surface);
  box-shadow:var(--sh-1);color:var(--muted);font-weight:700;font-size:var(--t-xs);transition:var(--ease)}
.skillpick:active{transform:scale(.94)}
.skillpick.on{background:var(--primary);color:var(--primary-ink);box-shadow:var(--glow-sm)}

/* ── file drop input ── */
.filein{display:block;width:100%;padding:14px 16px;border-radius:var(--r-md);background:var(--surface-sunk);
  box-shadow:var(--sunk);font-size:var(--t-sm);color:var(--text-2);cursor:pointer}
.filein::file-selector-button{margin-right:12px;padding:8px 15px;border:none;border-radius:var(--r-full);
  background:var(--surface);box-shadow:var(--sh-1);font-family:inherit;font-weight:700;font-size:var(--t-xs);
  color:var(--text);cursor:pointer}

/* ── notice banners ── */
.notice{display:flex;gap:13px;align-items:flex-start;padding:15px 17px;border-radius:var(--r-lg);
  background:var(--surface);box-shadow:var(--sh-2);margin-bottom:16px}
.notice__ic{flex:0 0 auto;width:38px;height:38px;border-radius:var(--r-md);display:grid;place-items:center;
  font-size:16px;background:var(--primary-soft);color:var(--primary)}
.notice--warn .notice__ic{background:var(--warning-soft);color:var(--warning)}
.notice--danger .notice__ic{background:var(--danger-soft);color:var(--danger)}
.notice b{display:block;margin-bottom:2px}
.notice p{margin:0;color:var(--muted);font-size:var(--t-sm)}

/* ── profile header ── */
.phead{text-align:center;padding:8px 0 18px}
.phead__cover{height:112px;border-radius:var(--r-xl);background:var(--primary);
  box-shadow:var(--sh-2);background-size:cover;background-position:center;margin-bottom:-46px}
.phead__av{margin:0 auto 10px;border:5px solid var(--bg);box-shadow:var(--sh-3)}
.phead h1{font-size:var(--t-xl);margin-bottom:2px;display:flex;align-items:center;justify-content:center;gap:8px;flex-wrap:wrap}
.phead__title{color:var(--muted);font-size:var(--t-sm);margin-bottom:12px}
.phead__row{display:flex;justify-content:center;gap:26px;margin:14px 0}
.phead__row b{display:block;font-size:var(--t-lg);font-weight:800;line-height:1.1}
.phead__row span{font-size:var(--t-xs);color:var(--muted);font-weight:700}

/* ── account settings editor ── */
.ac-cover{height:120px;border-radius:var(--r-lg);background:var(--surface-3);box-shadow:var(--sunk);
  background-size:cover;background-position:center;margin-bottom:14px}
.ac-avwrap{display:flex;align-items:center;gap:16px;flex-wrap:wrap}
.ac-avwrap .avatar{box-shadow:var(--sh-2);flex:0 0 auto}
.ac-handle{display:flex;align-items:center;gap:0}
.ac-handle>span{padding:0 4px 0 14px;color:var(--muted);font-weight:700;
  background:var(--surface-sunk);border-radius:var(--r-full) 0 0 var(--r-full);
  box-shadow:var(--sunk);align-self:stretch;display:grid;place-items:center}
.ac-handle .input{border-radius:0 var(--r-full) var(--r-full) 0;flex:1;min-width:0}
/* the settings tab strip carries icons, so let it wrap instead of squeezing */
#ac-tabs{flex-wrap:wrap}
#ac-tabs .tab i{margin-right:6px}

/* ── two-column split (detail pages) ── */
.split{display:grid;grid-template-columns:1fr;gap:18px}
@media(min-width:1024px){
  .split{grid-template-columns:minmax(0,1fr) 340px;align-items:start}
  .split__side{position:sticky;top:16px}
}

/* ── wide page container (grids need more room than the 620px feed column) ── */
.app--wide{max-width:1080px}

/* ── chat ── */
.chatwrap{display:grid;grid-template-columns:280px 1fr;gap:0;border-radius:var(--r-xl);overflow:hidden;
  background:var(--surface);box-shadow:var(--sh-2);height:calc(100dvh - 190px);min-height:420px}
.chatlist{overflow-y:auto;background:var(--surface-2)}
.chatthread{display:flex;flex-direction:column;min-width:0}
.chatscroll{flex:1;overflow-y:auto;padding:16px;display:flex;flex-direction:column;gap:9px}
.chatrow{display:flex;gap:11px;padding:13px 15px;cursor:pointer;transition:var(--ease-1);align-items:center}
.chatrow:hover,.chatrow.on{background:var(--surface)}
.chatrow__m{min-width:0;flex:1}
.chatrow__m b{display:block;font-size:var(--t-sm);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.chatrow__m span{font-size:var(--t-xs);color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block}
.bub{max-width:72%;padding:11px 15px;border-radius:var(--r-lg);font-size:var(--t-sm);line-height:1.45;box-shadow:var(--sh-1);word-break:break-word}
.bub--me{align-self:flex-end;background:var(--primary);color:var(--primary-ink);border-bottom-right-radius:8px}
.bub--them{align-self:flex-start;background:var(--surface-2);border-bottom-left-radius:8px}
.chatsend{display:flex;gap:9px;padding:13px 15px;background:var(--surface)}
@media(max-width:860px){
  .chatwrap{grid-template-columns:1fr;height:auto}
  .chatlist{max-height:none}
  .chatwrap.thread-open .chatlist{display:none}
  .chatwrap:not(.thread-open) .chatthread{display:none}
  .chatscroll{height:calc(100dvh - 320px)}
}

/* ── iframe stage (games / apps) ── */
.stage{width:100%;aspect-ratio:16/10;border-radius:var(--r-lg);overflow:hidden;box-shadow:var(--sh-3);background:#000}
.stage iframe{width:100%;height:100%;border:0;display:block}
.stage__ext{display:grid;place-items:center;height:100%;background:var(--surface)}

/* ── review rows ── */
.rev{display:flex;gap:12px;padding:15px 0;border-bottom:1px solid var(--line)}
.rev:last-child{border-bottom:none}
.rev__b{min-width:0;flex:1}
.rev__b b{display:block;font-size:var(--t-sm)}
.rev__b p{margin:5px 0 0;font-size:var(--t-sm);color:var(--text-2);line-height:1.5}

/* ── simple list row ── */
.lrow{display:flex;align-items:center;gap:12px;padding:14px 16px;border-radius:var(--r-lg);background:var(--surface);
  box-shadow:var(--sh-1);margin-bottom:10px;color:var(--text);transition:var(--ease)}
.lrow:hover{box-shadow:var(--sh-2)}
.lrow__m{flex:1;min-width:0}
.lrow__m b{display:block;font-size:var(--t-sm)}
.lrow__m span{font-size:var(--t-xs);color:var(--muted)}

/* ── daily-game play area ── */
.dgq{font-size:var(--t-4xl);font-weight:800;letter-spacing:-.03em;text-align:center;margin:22px 0}
.dgin{font-size:var(--t-2xl);text-align:center;max-width:220px;margin:0 auto;font-weight:800}
.dgbar{display:flex;justify-content:center;gap:22px;font-size:var(--t-sm);font-weight:700;color:var(--muted)}
.dgbar b{color:var(--text)}

/* ── topbar avatar button + nav-less pages + app font default ── */
.topbar__me{width:44px;height:44px;padding:0;border:none;background:none;border-radius:var(--r-full);cursor:pointer;
  display:grid;place-items:center;transition:var(--ease)}
.topbar__me:active{transform:scale(.9)}
.topbar__me .avatar{box-shadow:var(--sh-2)}
body.no-appnav{padding-bottom:40px;padding-left:0}
body.no-appnav .navdock,body.no-appnav .siderail{display:none}

/* PremiumFreelancers ships Quicksand as the app face — a rounded geometric sans
   that matches the soft, puffy clay surfaces (the archive's handwriting default
   doesn't fit a professional marketplace, and a hard grotesk fights the clay).
   Declared LAST so it wins over the :root default at the top of this file; the
   data-font picker still overrides it per-user. */
:root{ --font-app:'Quicksand', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; }

/* Quicksand's lower weights read thin at body size on dark backgrounds — nudge
   the whole app up one step so text keeps its presence in both themes. */
body{font-weight:500}
b,strong,h1,h2,h3,h4,h5,h6,.btn,.chip,.tab,.srail,.navbar__item{font-weight:700}

/* =============================================================================
   RESPONSIVE HARDENING
   ---------------------------------------------------------------------------
   The system above is already mobile-first (floating dock, safe-area insets,
   fluid cards). This last layer closes the remaining gaps that only show up on
   a real handset: sideways overflow from unbreakable strings and rigid rows,
   iOS's focus-zoom on sub-16px fields, rows that refuse to wrap at 320–400px,
   and viewport units that mis-measure once the mobile browser chrome collapses.

   Declared LAST on purpose — every rule here is a deliberate override of an
   earlier one, so source order (not !important) settles the cascade. Selectors
   wrapped in :where() carry ZERO specificity, so any component rule above still
   wins; they only fill in where nothing was said at all.
   ========================================================================== */

/* ── 1. NOTHING OVERFLOWS SIDEWAYS ───────────────────────────────────────────
   `body{overflow-x:hidden}` (top of this file) hides sideways overflow, it
   doesn't prevent it — a blown-out row still shoves content under the clip and
   out of reach. These rules remove the causes.

   Embedded media can't exceed its box. `overflow-wrap:anywhere` (not
   `break-word`) is the deliberate choice on text: unlike break-word it also
   shrinks the element's MIN-CONTENT width, which is what lets a flex/grid item
   holding a long URL, wallet address or @handle actually shrink instead of
   forcing its parent wider. Normal prose still breaks at spaces first — a word
   is only split when it genuinely cannot fit. */
:where(img,video,svg,canvas,iframe,table,pre){max-width:100%}
:where(h1,h2,h3,h4,h5,h6,p,li,dd,dt,blockquote,figcaption,td,th,label,summary){overflow-wrap:anywhere}
:where(.sectitle,.gcard__title,.gcard__seller,.jcard__title,.jcard__desc,.post__body,.stile__v,
  .stile__l,.pkg__price,.empty h3,.empty p,.notice b,.notice p,.hint,.crumb,.rev__b,
  .lrow__m,.lrow__b,.chatrow__m,.bub,.spill,.filechip,.tline__i,.badge-guide__txt){overflow-wrap:anywhere}
/* A flex/grid child only shrinks below its content when min-width is cleared.
   These are the shells that wrap user-supplied text throughout the app. */
:where(.lrow__m,.lrow__b,.chatrow__m,.rev__b,.sug-main,.fopt__txt,.appgate__txt,
  .onbc__body,.install-bar__t,.mention-opt__m,.filepick__txt){min-width:0}

/* ── 2. iOS: NO FOCUS ZOOM ───────────────────────────────────────────────────
   Mobile Safari force-zooms the whole viewport when a focused field's text is
   under 16px, then leaves the page zoomed — every layout in the app looks
   broken afterwards. The design tokens put fields at 13.5–15px, so on touch
   pointers only (desktop keeps the tighter scale) pin the interactive text to
   16px. Anything that accepts typing counts, including the contenteditable
   emoji field, whose caret triggers the same zoom. */
@media (pointer:coarse){
  input,textarea,select,
  .input,textarea.input,select.input,
  .search-box input,.composer textarea,.emoji-field,.ai__ta,
  .cmt-sheet__compose .input,.disc__compose .input{font-size:16px}
  /* 16px text needs a hair more room than the 13.5px the padding was tuned for */
  .btn--sm{min-height:40px}
  .chip{min-height:36px}
  .act{min-height:44px}
}

/* ── 3. ROWS WRAP INSTEAD OF BURSTING ────────────────────────────────────────
   `.row-between` is the app's title-left / action-right row. At 320–400px a
   long title beside a nowrap button (the wallet balance at --t-4xl next to the
   currency picker is the worst case) exceeds the column and clips. Wrapping
   costs nothing when there's room and drops the action to its own line when
   there isn't. */
.row-between{flex-wrap:wrap}
.row-between>*{min-width:0}
/* Paired action buttons in dialogs/sheets: let the pair wrap and each button
   take a full row rather than squeezing both past the panel edge. */
.dlg-actions,.onb__foot{flex-wrap:wrap}
.dlg-actions .btn,.onb__foot .btn{flex:1 1 140px;min-width:0}
.btn{max-width:100%}
/* Segmented tab strips scroll sideways once the labels stop fitting, instead of
   crushing each tab to an unreadable sliver. `min-width:max-content` is what
   makes that happen: the tabs keep their `flex:1` equal widths while there is
   room, but can never shrink below their own label, so the surplus becomes
   scroll instead of clipped text. (#ac-tabs opts into wrapping instead — its ID
   rule above outranks this.) */
.tabs,.pkgtabs{max-width:100%;overflow-x:auto;scrollbar-width:none}
.tabs::-webkit-scrollbar,.pkgtabs::-webkit-scrollbar{display:none}
.tab,.pkgtabs button{white-space:nowrap;min-width:max-content}
/* The account strip asks to wrap (#ac-tabs above) because its tabs carry icons,
   but `flex:1` gives every tab a flex BASE SIZE of 0 — the row can therefore
   never exceed the line, so it never wrapped. Basing them on their content is
   what actually lets the second row form. */
#ac-tabs .tab{flex:1 1 auto}
/* Message composer: the input must be free to shrink, or its intrinsic width
   pushes the send button off the row. */
.chatsend .input,.ai__bar .ai__ta{flex:1;min-width:0}

/* ── 4. AUTO-FILL GRIDS CAN'T EXCEED THEIR CONTAINER ─────────────────────────
   `minmax(230px,1fr)` is a floor, not a cap: inside anything narrower than the
   floor (a phone in portrait, a modal, the 340px `.split__side`) the track stays
   230px and the grid overflows. `min(230px,100%)` keeps the intended breakpoint
   on roomy screens and collapses to the container's width when there isn't
   room — the standard safe form of the pattern. */
.gigrid{grid-template-columns:repeat(auto-fill,minmax(min(230px,100%),1fr))}
.grid{grid-template-columns:repeat(auto-fill,minmax(min(155px,100%),1fr))}
.stats{grid-template-columns:repeat(auto-fill,minmax(min(140px,100%),1fr))}
.navcfg{grid-template-columns:repeat(auto-fill,minmax(min(140px,100%),1fr))}
.stk-grid{grid-template-columns:repeat(auto-fill,minmax(min(84px,100%),1fr))}
.accent-grid{grid-template-columns:repeat(auto-fill,minmax(min(52px,100%),1fr))}
/* Paired form fields (price + delivery, min + max, new + confirm password).
   Two-up while both stay legible, stacked below that. */
.grid2{display:grid;gap:10px;grid-template-columns:repeat(auto-fit,minmax(min(140px,100%),1fr))}

/* ── 5. FLOATING POPOVERS STAY ON SCREEN ─────────────────────────────────────
   These are positioned by script against a caret or a tapped control, so on a
   narrow screen their fixed width can hang off the right edge. */
.mention-box{max-width:calc(100vw - 24px)}
.xsel__list{max-width:100vw}
.spot__coach{max-width:min(300px,calc(100vw - 32px))}

/* ── 6. VIEWPORT UNITS THAT SURVIVE MOBILE BROWSER CHROME ────────────────────
   `vh` on a phone measures the viewport with the URL bar HIDDEN, so a 92vh
   sheet is taller than the screen until you scroll. `dvh` tracks the live
   viewport, keeping a sheet's footer (where the primary button lives) reachable
   at every scroll position. */
.modal__panel{max-height:92dvh}
.modal__panel--sheet{height:82dvh;max-height:82dvh}
.ai{height:min(72dvh,560px);max-height:72dvh}
/* Landscape phones are ~360px tall — a 92dvh sheet with 28px of padding leaves
   almost no content. Trim the chrome and give the content the screen. */
@media (max-height:520px) and (orientation:landscape){
  .modal__panel{max-height:96dvh;padding-top:18px;padding-bottom:18px}
  .modal__panel--sheet{height:96dvh;max-height:96dvh}
  .modal__panel::before{display:none}
  .ai{height:auto;max-height:none;flex:1}
  .fspot{min-height:auto}
  .onb__chips{max-height:38vh}
}

/* ── 7. CHAT ON A PHONE ──────────────────────────────────────────────────────
   The thread LIST is a normal page-scrolling list. An OPEN CONVERSATION becomes
   a proper viewport-height column instead, so the composer is pinned in reach
   and only the message log scrolls — the behaviour a messaging screen needs. */
@media (max-width:860px){
  .chatwrap.thread-open{height:calc(100dvh - 215px);min-height:340px}
  .chatthread{min-height:0}
  .chatscroll{height:auto;min-height:0;padding:14px 12px}
  .bub{max-width:86%}
}

/* ── 8. THE HEADER FITS A SMALL PHONE ────────────────────────────────────────
   The topbar carries the brand chip plus up to three 44px controls. Measured at
   375px the row needs ~376px and the last control clips under the body's
   overflow guard. Scale the chip and the controls down together so everything
   stays visible AND stays a comfortable tap target. */
@media (max-width:430px){
  .topbar{gap:6px;padding-left:12px;padding-right:12px}
  .topbar__logo{min-width:0}
  .topbar__logo .brand{padding:7px 13px;font-size:var(--t-md)}
  .topbar .icon-btn,.topbar__me{width:40px;height:40px}
  .topbar .avatar--40{width:38px;height:38px}
  /* Hero search: the field and its button each get a full row rather than
     splitting ~150px between them. */
  .hero__search{flex-wrap:wrap}
  .hero__search .search-box,.hero__search .btn{flex:1 1 100%}
  /* Long button labels wrap instead of overrunning the button box. */
  .btn{white-space:normal}
  .pagehead h1{font-size:var(--t-xl)}
  .phead__row{gap:18px}
  .menu-grid{gap:8px}
}
@media (max-width:359px){
  .app{padding:0 12px}
  .topbar{padding-left:10px;padding-right:10px}
  .topbar__logo .brand{font-size:var(--t-sm);padding:6px 11px}
  .hero h1{font-size:var(--t-2xl)}
  .card,.post{padding-left:14px;padding-right:14px}
  .modal__panel{padding-left:16px;padding-right:16px}
  .badge-grid{gap:10px}
}
