/* Battle Buddy website. Colors are tokens; app.js swaps them for the member's Customize theme. */
:root {
  --chart-2: #60a5fa; /* the second series in a two-series chart */
  --accent: #ff7a1f;
  --accent-ink: #14100c;
  --bg-top: #11151b;
  --bg: #090b0f;
  --panel: #151a21;
  --panel-2: #1b2129;
  --border: #2f3741;
  --text: #eceff2;
  --muted: #8a96a3;
  --dim: #4e5865;
  --good: #4ade80;
  --bad: #f85149;
  --radius: 10px;
  --font-head: 'Barlow Condensed', 'Arial Narrow', system-ui, sans-serif;
  --font-body: 'Barlow', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: dark;
}
:root[data-light='1'] { color-scheme: light; }
/* /console (Owner Console): black with the orange accent. */
:root[data-site='console'] {
  --accent: #ff7a1f;
  --accent-ink: #140c06;
  --bg-top: #000;
  --bg: #000;
  --panel: #0a0a0a;
  --panel-2: #111;
  --border: #222;
  --text: #ededed;
  --muted: #8d8d92;
  --dim: #48484c;
}
:root[data-site='console'] .back-arrow { display: none; }

/* Bigger screens: the whole site scales up with the window (phones and laptops stay at 1).
   vh/vw sizes below are divided by --z so full-height things still fit the screen. */
:root { --z: 1; }
@media (min-width: 1400px) { :root { --z: 1.1; } }
@media (min-width: 1600px) { :root { --z: 1.2; } }
@media (min-width: 1800px) { :root { --z: 1.28; } }
@media (min-width: 2100px) { :root { --z: 1.35; } }
html { zoom: var(--z); }


/* ==================== MOTION GUIDELINE ====================
   One set of timings and curves for everything that moves, so the whole site feels like one app.
   app.js reads these same values, so a change here changes the whole site.
   Curves:  --ease-ios     iOS-style deceleration: things arriving or moving (pages, sheets, panels, items)
            --ease-out     things leaving, hovers and colour changes
            --ease-spring  a touch of overshoot: small things that pop (press release, badges, the menu circle)
   Timings: --t-tap    100ms  touch feedback (press in)
            --t-out    200ms  anything closing or leaving, hovers, small state changes
            --t-in     320ms  anything opening or arriving: pages, sheets, panels, items, pop-ups
            --t-show   640ms  one-off showpieces: count-ups, charts drawing, the logo
            --t-loop   1.6s   repeating loops: pulses, shimmer, typing dots
            --lead     80ms   wait before the first item of a sequence
            --stagger  30ms   gap between items in a cascade (max 14 steps)
   Rules:   animate transform and opacity only (the one exception is expand() opening a section in place);
            things open in --t-in and close in --t-out; everything turns off for prefers-reduced-motion. */
:root {
  --ease-ios: cubic-bezier(.32, .72, 0, 1);
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-spring: cubic-bezier(.34, 1.36, .64, 1);
  --t-tap: 100ms;
  --t-out: 200ms;
  --t-in: 320ms;
  --t-show: 640ms;
  --t-loop: 1.6s;
  --lead: 80ms;
  --stagger: 30ms;
}

/* ==================== DESIGN GUIDELINE ====================
   One set of sizes for everything that isn't a copy of Discord (.dc-, .dcx-) or the stats card (.sc-).
   Heights:  32 small controls · 40 controls (buttons, fields, dropdowns, icon buttons) · 48 big buttons
   Radius:   4 tiny marks · 8 controls and rows inside a panel · 10 panels and cards · 16 sheets and chat windows
             · 20 front-page cards and phone pop-ups · pill · circle
   Type:     body 11 · 12 · 13 (small) · 15 (body);  head 13 · 15 · 16 · 18 (card titles) · 20 (feature cards) · 22 · 26 · 30
   Spacing:  2 · 4 · 6 · 8 · 12 · 16 · 24 · 48 (gaps and margins);  panels pad 16, list rows 12 x 14
   Rows inside a panel: --bg; a group of fields inside a panel: --panel-2.
   Shadows:  four levels (--shadow-1 small floating controls ... --shadow-4 sheets and windows), --shadow-show on the front page
   Layers:   banner 45 · dropdown 47 · chat 50 · menu 55 · sheet 60 · toast 65 · popover 70 · picture viewer 80 · tooltip 90
   Widths:   480 · 600 · 760 · 900 · 1100 (phones are under 760)
   Hovers only on mouse screens (@media (hover: hover)); disabled is opacity .45; keyboard focus shows an accent ring. */
:root {
  --warn: #ffb020;
  --on-bad: #fff; /* text and marks on a red fill */
  --glyph: #fff;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 20px;
  --r-pill: 999px;
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 24px; /* spacing scale */
  --shadow-1: 0 6px 18px rgba(0,0,0,.35);
  --shadow-2: 0 10px 30px rgba(0,0,0,.4);
  --shadow-3: 0 16px 40px rgba(0,0,0,.45);
  --shadow-4: 0 22px 60px rgba(0,0,0,.55);
  --shadow-show: 0 30px 70px rgba(0,0,0,.5);
  --z-banner: 45; --z-drop: 47; --z-chat: 50; --z-nav: 55; --z-sheet: 60; --z-toast: 65; --z-pop: 70; --z-lightbox: 80; --z-tip: 90;
}
/* Light themes (Snow, Mist, Blossom, Sand): dark glyphs, deeper status colors, softer shadows */
:root[data-light='1'] {
  --glyph: var(--text);
  --good: #16a34a;
  --bad: #dc2626;
  --warn: #c27803;
  --dim: #a3adb8;
  --shadow-1: 0 6px 18px rgba(20,25,35,.12);
  --shadow-2: 0 10px 30px rgba(20,25,35,.14);
  --shadow-3: 0 16px 40px rgba(20,25,35,.16);
  --shadow-4: 0 22px 60px rgba(20,25,35,.2);
  --shadow-show: 0 30px 70px rgba(20,25,35,.22);
}
/* Keyboard focus: one accent ring on everything you can tab to (fields show it as their accent border) */
:where(a, button, [tabindex], summary, label.switch):focus-visible { outline: 2px solid color-mix(in srgb, var(--accent) 80%, transparent); outline-offset: 2px; }
::placeholder { color: color-mix(in srgb, var(--muted) 75%, transparent); opacity: 1; }
:is(.morph-btn, .tabs button, .chat-tab):focus-visible { outline-offset: -3px; } /* inside a clipped box: the ring goes inside */
.morph-btn:focus-visible { border-radius: var(--r-pill); }

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: linear-gradient(180deg, var(--bg-top), var(--bg) 60%) fixed, var(--bg);
  color: var(--text);
  font: 15px/1.45 var(--font-body);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
a { color: var(--accent); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
h1, h2, h3 { font-family: var(--font-head); font-weight: 700; letter-spacing: 0.02em; margin: 0; line-height: 1.1; }
h1 { font-size: 30px; }
h2 { font-size: 22px; }
h3 { font-size: 18px; }
.kicker, .eyebrow { font-family: var(--font-head); font-weight: 700; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; }
.kicker { color: var(--accent); }
.eyebrow { color: var(--muted); } /* a sub-heading inside a panel; .kicker is the accent one over a title */
.desc { margin: 4px 0 0; color: var(--muted); font-size: 13px; line-height: 1.4; } /* the line under a heading */
.flat { margin: 0 !important; } /* a paragraph with no outside margin (inside a stack or row, where the gap spaces it) */
.muted { color: var(--muted); }
.small { font-size: 13px; }
/* Avatar placeholders: the first letter in the accent color, on a round tile */
.ph { display: grid; place-items: center; border-radius: 50%; background: var(--panel-2); color: var(--accent); font-family: var(--font-head); font-weight: 700; }

/* ---------- shell: the floating menu (top left) ---------- */
.shell { min-height: calc(100vh / var(--z)); }
/* The banner: always on top. */
:root { --banner-h: 56px; }
.banner { position: fixed; top: 0; left: 0; right: 0; z-index: var(--z-banner); height: calc(var(--banner-h) + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 16px 0; display: flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.banner-brand { display: flex; align-items: center; gap: 8px; color: var(--text); }
.banner-brand img { width: 32px; height: 32px; border-radius: 50%; }
.bname { font-family: var(--font-head); font-weight: 700; font-size: 20px; letter-spacing: .06em; text-transform: uppercase; }
/* The server picker (top bar, left): the current server; open, the others slide down under it. */
.banner:has(.sv.open) { z-index: calc(var(--z-nav) + 1); } /* the open list sits over the menu button */
.sv { position: absolute; left: 12px; top: calc(env(safe-area-inset-top) + (var(--banner-h) - 36px) / 2); }
.sv-btn { display: flex; align-items: center; gap: 8px; height: 36px; max-width: min(240px, 34vw); padding: 0 10px 0 4px; border-radius: var(--r-pill); border: 1px solid var(--border); background: var(--panel-2); color: var(--text); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; transition: border-color .2s, background .2s; }
.sv-btn:hover, .sv.open .sv-btn { border-color: var(--accent); }
.sv-icon { width: 28px; height: 28px; border-radius: 50%; flex: none; object-fit: cover; }
.sv-none { display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 18%, var(--panel-2)); color: var(--muted); font-size: 13px; font-weight: 700; }
.sv-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sv-chev { display: flex; flex: none; color: var(--muted); transition: transform .25s var(--ease, ease); }
.sv-chev svg { width: 14px; height: 14px; }
.sv.open .sv-chev { transform: rotate(180deg); }
.sv-drop { position: absolute; left: 0; top: calc(100% + 6px); z-index: var(--z-drop); width: max-content; min-width: 100%; max-width: min(300px, calc(100vw - 24px)); max-height: 60vh; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; padding: 6px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--panel); box-shadow: var(--shadow-3); }
.sv-item { display: flex; align-items: center; gap: 10px; padding: 6px 10px 6px 6px; border: 0; border-radius: calc(var(--radius) - 4px); background: none; color: var(--text); font: inherit; font-size: 14px; text-align: left; cursor: pointer; transition: background .15s; }
@media (hover: hover) { .sv-item:hover { background: var(--panel-2); } }
.sv-item.on { color: var(--accent); font-weight: 600; }
.sv-head { padding: 8px 10px 4px; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.sv-head:not(:first-child) { margin-top: 4px; border-top: 1px solid var(--border); padding-top: 10px; }
@media (max-width: 600px) { .sv-btn .sv-name { display: none; } .sv-btn { padding-right: 8px; } }
.bver { position: absolute; right: 100px; bottom: 5px; font-size: 11px; color: var(--muted); letter-spacing: .04em; }

/* The store button (top bar, between the version and the profile picture). */
.st-btn { position: absolute; right: 56px; top: calc(env(safe-area-inset-top) + (var(--banner-h) - 36px) / 2); width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--border); background: var(--panel-2); color: var(--muted); transition: border-color .2s, color .2s, box-shadow .2s, transform .2s var(--ease-out, ease); }
.st-btn svg { width: 18px; height: 18px; }
.st-btn:hover, .st-btn.on { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent); }
.st-btn:active { transform: scale(.92); }

/* The profile menu (top bar, right): the member's picture; open, their options slide down under it. */
.banner:has(.pf.open) { z-index: calc(var(--z-nav) + 1); }
.pf { position: absolute; right: 12px; top: calc(env(safe-area-inset-top) + (var(--banner-h) - 36px) / 2); }
.pf-btn { display: block; width: 36px; height: 36px; padding: 1px; border-radius: 50%; border: 1px solid var(--border); background: var(--panel-2); cursor: pointer; transition: border-color .2s, box-shadow .2s; }
.pf-btn:hover, .pf.open .pf-btn { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent); }
.pf-pic { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; display: grid; place-items: center; }
.pf-drop { position: absolute; right: 0; top: calc(100% + 6px); z-index: var(--z-drop); width: max-content; min-width: 200px; max-width: calc(100vw - 24px); display: flex; flex-direction: column; gap: 2px; padding: 6px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--panel); box-shadow: var(--shadow-3); }
.pf-name { padding: 6px 10px 8px; margin-bottom: 2px; border-bottom: 1px solid var(--border); font-weight: 600; font-size: 14px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: calc(var(--radius) - 4px); color: var(--text); font-size: 14px; text-decoration: none; transition: background .15s, color .15s; }
@media (hover: hover) { .pf-item:hover { background: var(--panel-2); color: var(--accent); } }
.pf-gl { display: flex; flex: none; color: var(--muted); }
.pf-gl svg { width: 18px; height: 18px; }
@media (hover: hover) { .pf-item:hover .pf-gl { color: var(--accent); } }

/* My Panel: one compact card per owned server. */
.mp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 12px; margin-top: 12px; }
.mp-card { display: flex; flex-direction: column; gap: 12px; }
.mp-head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.mp-head .sv-icon { width: 36px; height: 36px; }
.mp-title { display: flex; flex-direction: column; min-width: 0; }
.mp-title b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mp-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.mp-kpi { display: flex; flex-direction: column; gap: 1px; padding: 8px; border-radius: calc(var(--radius) - 4px); background: var(--panel-2); }
.mp-kpi b { font-size: 18px; }
.mp-chg { font-size: 11px; font-weight: 600; }
.mp-chg.good { color: var(--good); }
.mp-chg.bad { color: var(--bad); }
.mp-chart { display: flex; flex-direction: column; gap: 4px; }
.mp-spark { width: 100%; height: 44px; display: block; }
.mp-line { fill: none; stroke: var(--accent); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-dasharray: 1; stroke-dashoffset: 1; animation: mp-draw .9s var(--ease-out, ease-out) .15s forwards; }
.mp-area { fill: color-mix(in srgb, var(--accent) 14%, transparent); opacity: 0; animation: mp-fade .6s ease .5s forwards; }
@keyframes mp-draw { to { stroke-dashoffset: 0; } }
@keyframes mp-fade { to { opacity: 1; } }
.mp-ai { display: flex; flex-direction: column; gap: 6px; padding-top: 10px; border-top: 1px solid var(--border); }
.mp-ai-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.mp-bar { height: 6px; border-radius: 3px; background: var(--panel-2); overflow: hidden; }
.mp-bar i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 3px; animation: mp-fill .8s var(--ease-out, ease-out) .2s forwards; }
@keyframes mp-fill { to { width: var(--w); } }
.mp-go { gap: 8px; }
.oc-card .mp-kpis { grid-template-columns: repeat(2, 1fr); }
.mp-head .oc-plan { position: static; margin-left: auto; flex: none; }
.ai-goes { margin-bottom: 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.ai-goes-list { display: flex; flex-wrap: wrap; gap: 6px 14px; }
@media (prefers-reduced-motion: reduce) { .mp-line, .mp-area, .mp-bar i { animation-duration: 1ms; animation-delay: 0s; } }

/* The menu: a circle whose pages drop out under it as glyph circles, one after another; hovering one slides its name out. */
.morph { position: fixed; top: calc(var(--banner-h) + 12px + env(safe-area-inset-top)); left: 16px; z-index: var(--z-nav); width: 40px; height: 40px; border-radius: var(--r-xl); border: 1px solid var(--border); background: var(--panel-2); box-shadow: var(--shadow-1);
  transition: background var(--t-out) var(--ease-out), box-shadow var(--t-out) var(--ease-out), border-color var(--t-out) var(--ease-out); }
.morph.open { background: var(--panel); border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); box-shadow: var(--shadow-4), 0 0 0 4px color-mix(in srgb, var(--accent) 12%, transparent);
  transition: background var(--t-in) var(--ease-ios), box-shadow var(--t-in) var(--ease-ios), border-color var(--t-in) var(--ease-ios); }
.morph-btn { position: absolute; top: 0; left: 0; width: 38px; height: 38px; border: 0; background: transparent; color: var(--text); display: grid; place-items: center; cursor: pointer; z-index: 2; }
@media (hover: hover) { .morph-btn:hover { color: var(--accent); } }
.burger { position: relative; width: 18px; height: 14px; }
.burger i { position: absolute; left: 0; width: 18px; height: 2.2px; border-radius: 2px; background: currentColor; transition: transform var(--t-in) var(--ease-spring), opacity var(--t-out) var(--ease-out), top var(--t-out) var(--ease-out); }
.burger i:nth-child(1) { top: 0; }
.burger i:nth-child(2) { top: 6px; }
.burger i:nth-child(3) { top: 12px; }
.morph.open .burger i:nth-child(1) { top: 6px; transform: rotate(45deg); }
.morph.open .burger i:nth-child(2) { opacity: 0; transform: scaleX(0); }
.morph.open .burger i:nth-child(3) { top: 6px; transform: rotate(-45deg); }
.morph-list { position: absolute; top: 48px; left: -1px; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.morph.open .morph-list { pointer-events: auto; }
.morph-list a { --back: calc((var(--n) - 1 - var(--i)) * var(--stagger)); --fwd: calc(var(--lead) + var(--i) * var(--stagger)); --t-hover: calc(var(--t-out) / 2); --t-hover-in: calc(var(--t-in) / 2); position: relative; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border); background: var(--panel); box-shadow: var(--shadow-2); color: var(--glyph); text-decoration: none; opacity: 0; transform: translateY(-10px) scale(.6); transition: opacity var(--t-out) var(--ease-out) var(--back), transform var(--t-out) var(--ease-out) var(--back), border-color var(--t-hover) var(--ease-out), background var(--t-hover) var(--ease-out); }
/* Open: the circles drop in one after another; the open page's stays back, the others sit a little to the right. Closing runs in reverse. */
.morph.open .morph-list a { opacity: 1; transform: translateX(12px); transition: opacity var(--t-out) var(--ease-out) var(--fwd), transform var(--t-in) var(--ease-spring) var(--fwd), border-color var(--t-hover) var(--ease-out), background var(--t-hover) var(--ease-out); }
.morph.open .morph-list a.on { transform: none; }
.morph-list .mi { display: grid; place-items: center; }
.morph-list .mi svg { width: 20px; height: 20px; }
/* Names: half see-through beside their circle while open, full on hover. */
.morph-list .ml { position: absolute; left: 48px; top: 50%; display: flex; align-items: center; height: 32px; padding: 0 12px; border-radius: var(--r-pill); border: 1px solid var(--border); background: var(--panel); box-shadow: var(--shadow-2); color: var(--text); font-family: var(--font-head); font-weight: 600; font-size: 15px; letter-spacing: .04em; white-space: nowrap; pointer-events: none; opacity: 0; filter: opacity(.5); transform: translate(-8px, -50%); clip-path: inset(0 100% 0 0 round var(--r-pill)); transition: opacity var(--t-out) var(--ease-out) var(--back), transform var(--t-out) var(--ease-out) var(--back), clip-path var(--t-out) var(--ease-out) var(--back), filter var(--t-hover) var(--ease-out), translate var(--t-hover) var(--ease-out); }
.morph.open .morph-list .ml { opacity: 1; transform: translate(0, -50%); clip-path: inset(0 0 0 0 round var(--r-pill)); transition: opacity var(--t-out) var(--ease-out) calc(var(--fwd) + var(--t-out)), transform var(--t-in) var(--ease-spring) calc(var(--fwd) + var(--t-out)), clip-path var(--t-in) var(--ease-ios) calc(var(--fwd) + var(--t-out)), filter var(--t-hover) var(--ease-out), translate var(--t-hover-in) var(--ease-spring); }
.morph.open .morph-list .ml { pointer-events: auto; cursor: pointer; } /* the name opens its page like its circle */
.morph-list a::after { content: ''; position: absolute; top: 0; bottom: 0; left: 100%; width: 10px; } /* the gap to the name counts too */
.morph.open .morph-list a:is(:hover, :focus-visible) .ml { filter: none; translate: 4px 0; } /* hover in and out: twice the usual speed */
@media (hover: hover) { .morph-list a:hover { border-color: color-mix(in srgb, var(--accent) 60%, var(--border)); background: var(--panel-2); } }
.morph-list a.on { color: var(--accent); border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, var(--panel)); }
.morph-list a.out { color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .morph, .morph.open, .morph-list a, .morph-list .ml, .burger i { transition: none !important; } }

main { max-width: 1180px; margin: 0 auto; padding: calc(var(--banner-h) + 66px + env(safe-area-inset-top)) 16px 40px; } /* phones: the menu circle sits above the page */
@media (min-width: 900px) { main { padding: calc(var(--banner-h) + 22px) 32px 48px 82px; } } /* wider: beside it */

/* Apply to Web: the member's wallpaper behind the whole site, darkened so text stays readable. */
html.web-wall body { background: var(--bg); }
html.web-wall body::before { content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, color-mix(in srgb, var(--bg) 52%, transparent), color-mix(in srgb, var(--bg) 78%, transparent)), var(--web-wall) center / cover no-repeat; } /* an uploaded picture: still */
/* A pattern wallpaper is drawn live (app.js liveWall) on this canvas behind everything. */
.live-wall { position: fixed; inset: 0; width: calc(100vw / var(--z)); height: calc(100vh / var(--z)); z-index: -1; pointer-events: none; }

/* Customize: the tab bar, My Cards and My Web Interface under it */
.cz-tabs-row { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-width: 0; }
.cz-tabs-row > :is(.tabs, .hscroll) { align-self: stretch; flex: 0 0 auto !important; }
.home-grid > * { min-width: 0; } /* a long row of tabs scrolls instead of widening the page */
.cz-tabs-row .tabs { flex: 1; min-width: 0; margin-bottom: 0; }
.swatch:disabled { opacity: .45; cursor: not-allowed; }

/* Home: the latest news from #announcements. */
.home-status { margin-top: 24px; }
.status-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.status-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
.status-card { --st: var(--good); padding: 16px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--border); box-shadow: inset 3px 0 0 var(--st); display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.status-card.linked { color: inherit; text-decoration: none; cursor: pointer; transition: transform var(--t-out) var(--ease-out), border-color var(--t-out) var(--ease-out); }
@media (hover: hover) { .status-card.linked:hover { transform: translateY(-2px); } }
.status-card.linked:active { transform: scale(.965); }
.status-src { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; font-size: 12px; font-weight: 700; color: var(--accent); }
.status-src svg { width: 13px; height: 13px; }
.status-card.reports { --st: var(--warn); }
.status-card.down { --st: var(--bad); border-color: color-mix(in srgb, var(--bad) 45%, var(--border)); }
.status-card.unknown { --st: var(--dim); }
.status-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.status-top h3 { font-size: 18px; min-width: 0; overflow-wrap: anywhere; }
.status-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--st); flex: 0 0 auto; box-shadow: 0 0 0 0 var(--st); }
.status-card:not(.ok):not(.unknown) .status-dot { animation: status-ping var(--t-loop) var(--ease-out) infinite; }
/* One live pulse for every status dot on the site. */
@keyframes status-ping { 70% { box-shadow: 0 0 0 9px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.status-word { font-family: var(--font-head); font-weight: 700; font-size: 22px; letter-spacing: .04em; color: var(--st); }
.status-since { font-family: var(--font-body, inherit); font-weight: 400; font-size: 13px; letter-spacing: 0; color: var(--muted); }
.home-news { margin-top: 24px; }
.dd-compact { display: none; }
/* Phones: Down Detector is a row of round icons; a tap opens that service's card under the row */
@media (max-width: 759px) {
  :is(.home-status, .ld-ddsec) .status-grid { display: none; }
  .dd-compact { display: block; }
  .dd-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .dd-dot { --st: var(--good); display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 0; border: 0; background: none; color: var(--text); font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
  .dd-dot.reports { --st: var(--warn); }
  .dd-dot.down { --st: var(--bad); }
  .dd-dot.unknown { --st: var(--dim); }
  .dd-ring { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; color: var(--st); background: color-mix(in srgb, var(--st) 14%, var(--panel-2)); border: 1.5px solid color-mix(in srgb, var(--st) 60%, var(--border)); transition: transform var(--t-tap) var(--ease-out), box-shadow var(--t-out) var(--ease-out); }
  .dd-ring svg { width: 26px; height: 26px; }
  .dd-dot:active .dd-ring { transform: scale(.92); }
  .dd-dot.on .dd-ring { box-shadow: 0 0 0 3px color-mix(in srgb, var(--st) 35%, transparent); }
  .dd-dot.down .dd-ring, .dd-dot.reports .dd-ring { animation: status-ping var(--t-loop) var(--ease-out) infinite; box-shadow: 0 0 0 0 var(--st); }
  .dd-name { font-size: 12px; font-weight: 600; text-align: center; white-space: nowrap; }
  .dd-dot.on .dd-name { color: var(--st); }
  .dd-panel { padding-top: 12px; }
}
.news-sub { margin: 2px 0 12px; }
.news-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); align-items: start; }
/* Masonry: each card spans as many 1px rows as it is tall, so a short card leaves no gap under it. */
.news-grid.masonry { grid-auto-rows: 1px; row-gap: 0; }
.news-card { display: flex; flex-direction: column; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--border); overflow: hidden; }
.news-img { width: 100%; aspect-ratio: 16 / 8; object-fit: cover; cursor: zoom-in; }
.news-body { display: flex; flex-direction: column; gap: 8px; padding: 16px; flex: 1; }
.news-meta { display: flex; align-items: center; gap: 8px; }
.news-body h3 { font-size: 20px; }
.news-text { color: color-mix(in srgb, var(--text) 82%, var(--muted)); font-size: 15px; line-height: 1.5; }
.news-date { font-family: var(--font-head); font-weight: 600; font-size: 15px; letter-spacing: .04em; color: var(--text); }
.news-links { margin-top: auto; }

/* ---------- building blocks ---------- */
.page-head { overflow-x: clip; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-height: 54px; margin-bottom: 16px; }
.page-title { font-family: var(--font-head); font-weight: 700; font-size: clamp(30px, 5vw, 42px); letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); flex: 0 1 auto; min-width: 0; margin-right: auto; position: relative; isolation: isolate; }
.page-title::before { content: ''; position: absolute; inset: -18px -36px; z-index: -1; pointer-events: none; background: radial-gradient(closest-side, rgba(0,0,0,.5), rgba(0,0,0,.25) 55%, transparent); } /* keeps the title readable on any wallpaper */
:root[data-light='1'] .page-title::before { background: radial-gradient(closest-side, rgba(255,255,255,.6), rgba(255,255,255,.3) 55%, transparent); }
@media (max-width: 599px) { .page-title { letter-spacing: .08em; } .page-head .head-actions { width: 100%; } }
.back-arrow { width: 40px; height: 40px; flex: 0 0 auto; display: grid; place-items: center; border: 0; border-radius: var(--r-sm); background: transparent; color: var(--text); cursor: pointer; margin-left: -8px; }
.back-arrow svg { width: 32px; height: 32px; }
@media (hover: hover) { .back-arrow:hover { color: var(--accent); background: var(--panel); } } /* phones keep :hover after a tap */
.head-actions { flex-wrap: nowrap; }
.count-line { margin: 2px 0 16px; }
/* The row over a list: New top left, the count at the far end. */
.list-head { align-items: center; margin-bottom: 16px; }
.list-head > .list-count { margin-left: auto; }
.row.nowrap > input { flex: 1; min-width: 0; }
/* Section titles on a page (one style everywhere): a smaller version of the page title */
.sub-head, .hub-title, .section-head h2 { font-family: var(--font-head); font-weight: 700; font-size: 22px; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.sub-head { margin: 4px 0 16px; }
.sub-head.spaced { margin-top: 24px; }
.nowrap { flex-wrap: nowrap; }
.show-btn { position: absolute; right: 12px; bottom: 12px; z-index: 4; height: 50px; min-width: 50px; max-width: 50px; padding: 0 13px; border-radius: var(--r-pill); border: 0; background: var(--accent); color: var(--accent-ink); display: flex; align-items: center; gap: 0; overflow: hidden; white-space: nowrap; cursor: pointer; box-shadow: var(--shadow-1); transition: max-width var(--t-out) var(--ease-out), gap var(--t-out) var(--ease-out), transform var(--t-tap) var(--ease-out); }
.show-btn svg { width: 24px; height: 24px; flex: 0 0 auto; }
.show-label { font-family: var(--font-head); font-weight: 700; font-size: 16px; letter-spacing: .04em; opacity: 0; transition: opacity var(--t-out) var(--ease-out); }
.show-btn:active { transform: scale(.92); }
/* Idle: a soft glowing ring pulses out, and the sparkle twinkles. */
.show-btn { animation: show-pulse var(--t-loop) var(--ease-out) infinite; }
.show-btn svg { animation: show-twinkle var(--t-loop) ease-in-out infinite; transform-origin: 50% 50%; }
@keyframes show-pulse { 0% { box-shadow: 0 6px 18px rgba(0,0,0,.45), 0 0 0 0 color-mix(in srgb, var(--accent) 60%, transparent); } 70%, 100% { box-shadow: 0 6px 18px rgba(0,0,0,.45), 0 0 0 14px color-mix(in srgb, var(--accent) 0%, transparent); } }
@keyframes show-twinkle { 0%, 60%, 100% { transform: scale(1) rotate(0deg); } 70% { transform: scale(1.22) rotate(18deg); } 82% { transform: scale(.94) rotate(-6deg); } }
@media (hover: hover) { .show-btn:hover svg { animation: show-twinkle .9s ease-in-out infinite; } }
@media (prefers-reduced-motion: reduce) { .show-btn, .show-btn svg { animation: none; } }
@media (hover: hover) {
  .show-btn:hover, .show-btn:focus-visible { max-width: 170px; gap: 8px; padding-right: 18px; }
  .show-btn:hover .show-label, .show-btn:focus-visible .show-label { opacity: 1; transition-delay: .06s; }
}
.panel { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); }
.pad { padding: 16px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row.spread { justify-content: space-between; }
.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 12px;
  border-radius: var(--r-sm); border: 1px solid var(--border); background: var(--panel-2); color: var(--text);
  font-family: var(--font-head); font-weight: 600; font-size: 16px; letter-spacing: 0.04em; cursor: pointer; white-space: nowrap;
  transition: transform var(--t-tap) var(--ease-out), background var(--t-out) var(--ease-out), border-color var(--t-out) var(--ease-out);
}
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 50%, var(--border)); }
.btn.small { min-height: 32px; padding: 0 10px; font-size: 15px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
/* Hovers (mouse screens only, so a tap on a phone never leaves one stuck) */
@media (hover: hover) {
  .btn:hover:not([disabled]) { border-color: var(--muted); }
  .btn.primary:hover:not([disabled]) { background: color-mix(in srgb, var(--accent) 86%, #fff); border-color: color-mix(in srgb, var(--accent) 86%, #fff); }
  .btn.danger:hover:not([disabled]) { border-color: var(--bad); background: color-mix(in srgb, var(--bad) 12%, var(--panel-2)); }
}

.tile { display: flex; flex-direction: column; gap: 6px; padding: 16px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--border); color: var(--text); cursor: pointer; text-align: left; position: relative; overflow: hidden; transition: border-color var(--t-out) var(--ease-out), transform var(--t-tap) var(--ease-out); }
@media (hover: hover) { .tile:not(.soon-tile):hover { border-color: var(--accent); } }
.tile::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--accent); }
.tile h3 { font-size: 20px; }
.tag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: var(--r-pill); font-family: var(--font-head); font-weight: 600; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; background: var(--panel-2); border: 1px solid var(--border); color: var(--muted); }
.tag.accent { background: color-mix(in srgb, var(--accent) 18%, transparent); border-color: color-mix(in srgb, var(--accent) 50%, transparent); color: var(--accent); }
.tag.warn { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 50%, var(--border)); }
.gap-note { margin: 0; padding: 10px 12px; border: 1px solid color-mix(in srgb, var(--bad) 45%, var(--border)); border-radius: var(--r-sm); color: var(--bad); font-size: 13px; } /* Warn System: steps the Warn Duration makes unreachable */
.tag.after { margin-left: 8px; } /* a tag right after a name */
.pick-none { padding: 8px 10px; } /* a picker's "nobody by that name" line */
.logs-note { margin: -6px 0 10px; }
.tag.amber { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 50%, var(--border)); }

.tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; margin-bottom: 16px; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { flex: 0 0 auto; min-height: 32px; padding: 0 12px; border-radius: var(--r-pill); border: 1px solid var(--border); background: var(--panel); color: var(--muted); font-family: var(--font-head); font-weight: 600; font-size: 15px; letter-spacing: .04em; cursor: pointer; }
.tabs button.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.tabs button[disabled] { opacity: .45; cursor: not-allowed; }
@media (hover: hover) { .tabs button:not(.on):not([disabled]):hover { color: var(--text); border-color: var(--muted); } }
/* Screen tabs (tabBar in app.js): every label in one bar, an indicator under the open one; tap or swipe the screen */
div.tabs.ubar { position: relative; flex-wrap: nowrap; gap: 0; padding: 3px; border: 1px solid var(--border); border-radius: var(--r-pill); background: var(--panel); }
.tabs.ubar > button { position: relative; z-index: 1; flex: 1 0 auto; white-space: nowrap; border: 0; background: transparent; }
.tabs.ubar > button.on { background: transparent; color: var(--accent-ink); }
.tabs.ubar > button:active:not([disabled]) { transform: none; }
.ub-ind { position: absolute; left: 0; top: 3px; bottom: 3px; width: 0; border-radius: var(--r-pill); background: var(--accent); pointer-events: none; }
.ub-ind.anim { transition: transform var(--t-in) var(--ease-ios), width var(--t-in) var(--ease-ios); }
@media (prefers-reduced-motion: reduce) { .ub-ind.anim { transition: none; } }

input[type=text], input[type=search], input[type=number], input[type=date], input[type=time], textarea, select {
  width: 100%; min-height: 40px; padding: 8px 12px; border-radius: var(--r-sm); border: 1px solid var(--border); background: var(--bg); color: var(--text); font-size: 15px; outline: none;
  transition: border-color var(--t-out) var(--ease-out), background var(--t-out) var(--ease-out);
}
input:focus, textarea:focus, select:focus { border-color: var(--accent); }
textarea { resize: vertical; min-height: 70px; }
:is(input, textarea, select):disabled { opacity: .45; cursor: not-allowed; }
label.field, div.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.field-label, .tool-label { font-size: 13px; color: var(--muted); } /* a label over something that isn't in a .field (one look for every label) */
.check { display: flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); }
input[type='number'] { -moz-appearance: textfield; appearance: textfield; } /* every number field looks like a text field */
input[type='number']::-webkit-inner-spin-button, input[type='number']::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input[type='number']:invalid { border-color: var(--bad); }
.dur-pick { display: grid; grid-template-columns: minmax(0, 96px) minmax(0, 1fr); gap: 8px; align-items: center; transition: grid-template-columns var(--t-in) var(--ease-ios), gap var(--t-in) var(--ease-ios); }
.dur-pick input { min-width: 0; transition: opacity var(--t-out) var(--ease-out); }
.dur-pick.off { grid-template-columns: minmax(0, 0px) minmax(0, 1fr); gap: 0; }
.dur-pick.off input { opacity: 0; pointer-events: none; padding-inline: 0; border-width: 0; }

/* ---------- pictures ---------- */
.pic { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--panel); border: 1px solid var(--border); }
.pic img { display: block; width: 100%; height: auto; transition: opacity var(--t-out) var(--ease-out); }
.pic.loading img { opacity: .55; }
.pic .spin { position: absolute; top: 10px; right: 10px; opacity: 0; transition: opacity var(--t-out) var(--ease-out); }
.pic:not(.loading) .spin { animation-play-state: paused; }
.pic.loading .spin { opacity: 1; transition: opacity var(--t-in) var(--ease-ios); }
.pic .empty { aspect-ratio: 16 / 9; display: grid; place-items: center; color: var(--muted); }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 3px solid color-mix(in srgb, var(--accent) 30%, transparent); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.spinner.small { width: 18px; height: 18px; border-width: 2px; } /* one spinner everywhere; .small inside pills */
.boot { min-height: calc(100vh / var(--z)); display: grid; place-items: center; }

/* ---------- loadouts ---------- */
.lo-list { display: flex; flex-direction: column; gap: 8px; }
.lo-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--border); cursor: pointer; }
@media (hover: hover) { .lo-item:hover { border-color: var(--accent); } }
.lo-item .main { flex: 1; min-width: 0; }
.lo-item .title { font-family: var(--font-head); font-weight: 700; font-size: 18px; overflow: hidden; }
.lo-item .pts { font-family: var(--font-head); font-weight: 700; font-size: 18px; color: var(--accent); }
.lo-item.sel { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--panel)); }
.lo-item .tick { width: 22px; height: 22px; border-radius: 4px; border: 2px solid var(--border); display: grid; place-items: center; flex: 0 0 auto; }
.lo-item.sel .tick { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.group-title { margin: 16px 0 4px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.lo-item .title { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 6px; }
.lo-item .title .pts { font-size: 15px; margin-left: 4px; }
.lo-item .desc { margin-top: 2px; }
.wpn { color: var(--accent); }
.sep { color: var(--muted); }
.actions { gap: 6px; flex-wrap: nowrap; }
.icon-btn { width: 40px; height: 40px; display: inline-grid; place-items: center; border-radius: var(--r-sm); border: 1px solid var(--border); background: var(--panel-2); color: var(--muted); cursor: pointer; flex: 0 0 auto; }
.icon-btn svg { width: 20px; height: 20px; }
@media (hover: hover) { .icon-btn:hover:not(:disabled) { color: var(--text); border-color: var(--muted); } .icon-btn.del:hover:not(:disabled) { color: var(--bad); border-color: var(--bad); } }
.icon-btn.fav.on { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 55%, var(--border)); }
/* The one close button (x-btn) and the one delete button in a row (del, a trash can that turns red) */
.x-btn svg { width: 18px; height: 18px; }
.x-btn, :is(.hist-item, .member, .cb-note, .chat-head) .icon-btn { width: 32px; height: 32px; }
:is(.hist-item, .member, .cb-note) .icon-btn svg { width: 18px; height: 18px; }
.icon-btn.back { color: var(--text); }

.builder { display: grid; gap: 16px; }
@media (min-width: 1101px) {
  .builder { grid-template-columns: minmax(0, 1.35fr) minmax(320px, 1fr); align-items: start; }
  .builder .sticky { position: sticky; top: 78px; }
}
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.slot { text-align: left; padding: 10px 12px; border-radius: var(--r-sm); border: 1px solid var(--border); background: var(--panel); cursor: pointer; min-height: 62px; }
.slot .s { font-family: var(--font-head); font-weight: 600; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); display: flex; justify-content: space-between; }
.slot .v { font-family: var(--font-head); font-weight: 600; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slot.on { border-color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
.slot.on .s { color: var(--accent); }
.slot.emptyv .v { color: var(--dim); }
.opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; max-height: 420px; overflow: auto; padding: 2px; }
.opt { display: flex; justify-content: space-between; gap: 8px; align-items: center; padding: 10px 12px; border-radius: var(--r-sm); border: 1px solid var(--border); background: var(--bg); cursor: pointer; text-align: left; }
@media (hover: hover) { .opt:hover { border-color: var(--accent); } }
.opt.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, var(--bg)); }
.opt .n { font-weight: 600; font-size: 15px; line-height: 1.2; }
.opt .c { font-family: var(--font-head); font-weight: 600; color: var(--muted); white-space: nowrap; }
.budget { height: 10px; border-radius: var(--r-pill); background: var(--bg); border: 1px solid var(--border); overflow: hidden; }
.budget > div { height: 100%; background: var(--accent); transition: width var(--t-out) var(--ease-out); }
.budget.over > div { background: var(--bad); }
.points { font-family: var(--font-head); font-weight: 700; font-size: 26px; }
.points.over { color: var(--bad); }
.wgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.wbtn { padding: 14px 12px; border-radius: var(--r-sm); border: 1px solid var(--border); background: var(--panel); text-align: left; cursor: pointer; font-family: var(--font-head); font-weight: 600; font-size: 16px; }
@media (hover: hover) { .wbtn:hover { border-color: var(--accent); } }
.wbtn .small { display: block; font-family: var(--font-body); font-weight: 400; }
.wbtn[disabled] { opacity: .45; cursor: not-allowed; }

/* ---------- customize, trophies ---------- */
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
.swatch { position: relative; border-radius: var(--radius); border: 2px solid var(--border); overflow: hidden; cursor: pointer; text-align: left; padding: 0; background: var(--panel); }
.swatch .ti { aspect-ratio: 2 / 1; background-color: var(--panel-2); background-repeat: no-repeat; }
.swatches.emblem { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
.swatches.emblem .ti { aspect-ratio: 1; }
.swatch .nm { padding: 8px 10px; font-family: var(--font-head); font-weight: 600; font-size: 15px; display: flex; flex-direction: column; gap: 2px; }
.swatch .nm .st { font-family: var(--font-body); font-weight: 600; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--good); white-space: nowrap; }
.swatch .nm .st.on { color: var(--accent); }
.swatch .nm .st.locked { color: var(--muted); }
.swatch.on { border-color: var(--accent); }
.swatch.locked { cursor: not-allowed; }
.swatch.locked .ti { opacity: .45; filter: grayscale(.5); }
.swatch.locked .nm { opacity: .45; }
.lock { font-size: 12px; color: var(--muted); font-family: var(--font-body); font-weight: 500; }
.trophy-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.trophy-bar .tabs { flex: 1; min-width: 0; margin-bottom: 0; }
.drop-wrap { position: relative; }
.drop-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: var(--z-drop); min-width: 180px; display: flex; flex-direction: column; gap: 2px; padding: 8px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--panel); box-shadow: var(--shadow-3); }
.drop-menu .check { padding: 8px 10px; border-radius: var(--r-sm); font-size: 15px; font-weight: 500; } /* checklist rows read like choice() rows */
@media (hover: hover) { .drop-menu .check:hover { background: var(--panel-2); } }
.drop-menu .check:has(input:checked) > span:first-of-type { color: var(--accent); }
.drop-item { text-align: left; padding: 8px 10px; border: 0; border-radius: var(--r-sm); background: transparent; cursor: pointer; font-family: var(--font-head); font-weight: 600; font-size: 16px; }
@media (hover: hover) { .drop-item:hover { background: var(--panel-2); } }
.drop-item.on { color: var(--accent); }
.drop-item:disabled { opacity: .45; cursor: not-allowed; background: transparent; }
/* a heading inside a dropdown (e.g. Invisi-roles in role pickers) and a last row that does something */
.drop-head { padding: 10px 10px 4px; margin-top: 4px; border-top: 1px solid var(--border); }
.drop-menu > .drop-head:first-child { margin-top: 0; border-top: 0; padding-top: 4px; }
.drop-item.drop-action { color: var(--accent); }
.trophy-grid { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .trophy-grid { grid-template-columns: 1fr 1fr; } }
.trophy { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--border); box-shadow: inset 3px 0 0 var(--accent); cursor: pointer; text-align: left; width: 100%; }
@media (hover: hover) { .trophy:hover { border-color: var(--accent); } }
.trophy.locked { box-shadow: inset 3px 0 0 var(--dim); }
.trophy.locked .t-main h3, .trophy.locked .t-desc { color: var(--muted); }
.medal-img { width: 56px; height: 56px; flex: 0 0 auto; background-repeat: no-repeat; border-radius: var(--r-sm); }
.medal-img.big { width: 112px; height: 112px; margin: 0 auto; }
.t-main { flex: 1; min-width: 0; }
.t-main h3 { font-size: 20px; }
.t-desc { font-size: 15px; color: var(--muted); margin-top: 2px; }
.t-date { font-family: var(--font-head); font-weight: 600; font-size: 15px; letter-spacing: .06em; margin-top: 4px; }
.t-side { align-self: flex-start; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: 0 0 auto; }
.t-kind { font-family: var(--font-head); font-weight: 700; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; }
.rarity { display: inline-flex; align-items: center; gap: 4px; font-family: var(--font-head); font-weight: 600; font-size: 13px; color: var(--muted); }
.rarity svg { width: 14px; height: 14px; }
.trophy .bar { height: 6px; border-radius: 4px; background: var(--bg); overflow: hidden; margin-top: 6px; }
.trophy .bar div { height: 100%; background: var(--accent); }
/* The trophy pop-up is a sheet: medal and kind above the name, then the description, then the buttons. */
.trophy-pop { text-align: center; gap: 8px; }
.trophy-pop .pop-body { display: contents; }
.trophy-pop > h2 { order: 1; }
.trophy-pop .pop-desc, .trophy-pop .pop-meta { order: 2; }
.trophy-pop .sheet-actions { order: 3; justify-content: center; margin-top: 8px; }
.pop-kind { font-family: var(--font-head); font-weight: 700; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; margin-top: 6px; }
.trophy-pop h2 { font-size: 30px; }
.pop-desc { font-size: 15px; color: var(--muted); margin: 0 auto; max-width: 420px; }
.pop-meta { display: flex; flex-direction: column; align-items: center; gap: 4px; font-family: var(--font-head); font-weight: 600; font-size: 16px; margin-top: 6px; }
.pop-meta .rarity { font-size: 15px; }

/* ---------- BF6 stats ---------- */
.search-wrap { position: relative; margin-bottom: 16px; max-width: 520px; }
.search-drop { max-height: min(calc(52vh / var(--z)), 420px); overflow-y: auto; position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: var(--z-drop); display: flex; flex-direction: column; padding: 6px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--panel); box-shadow: var(--shadow-3); }
.res { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 0; border-radius: var(--r-sm); background: transparent; cursor: pointer; text-align: left; }
@media (hover: hover) { .res:hover:not([disabled]) { background: var(--panel-2); } }
.res[disabled] { opacity: .45; cursor: not-allowed; }
.res img, .res .ph { width: 32px; height: 32px; border-radius: 50%; background: var(--panel-2); flex: 0 0 auto; }
.res .n { flex: 1; font-weight: 600; }
.bf6-cards { display: flex; flex-direction: column; gap: 16px; }
.bf6-filters { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 12px; margin-bottom: 16px; align-items: end; }
.bf6-filters .search-wrap { margin-bottom: 0; max-width: none; }
.bf6-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; min-height: 36px; }
.bf6-head .sub-head { margin: 0; font-size: 22px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bf6-cols.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.bf6-cols.two .bf6-main img { max-height: max(220px, calc(100dvh - 360px)); }
.bf6-side { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); margin-bottom: 12px; }
.bf6-side .bf6-player { grid-column: 1 / -1; }
.bf6-pick .empty { width: 100%; }
.bf6-pick .empty svg { width: clamp(72px, 22%, 140px); height: auto; opacity: .55; transition: opacity var(--t-out) var(--ease-out), transform var(--t-out) var(--ease-out), color var(--t-out) var(--ease-out); }
.bf6-pick:focus-visible .empty svg { opacity: 1; color: var(--accent); transform: scale(1.08); }
@media (hover: hover) { .bf6-pick:hover .empty svg { opacity: 1; color: var(--accent); transform: scale(1.08); } }
.bf6-both { display: flex; justify-content: center; margin-top: 16px; }
.bf6-both.hide { display: none; }
.bf6-pick { width: 100%; padding: 0; border-style: dashed; cursor: pointer; color: inherit; font: inherit; }
@media (max-width: 759px) { .bf6-cols.two { grid-template-columns: minmax(0, 1fr); } } /* phones: the two cards stack */
.bf6-cards .bf6-main { width: fit-content; max-width: 100%; margin: 0 auto; }
.bf6-cards .bf6-main img { width: auto; max-width: 100%; max-height: max(260px, calc(100dvh - 300px)); margin: 0 auto; } /* the whole card fits on screen under the filters */
.bf6-cards .pic .empty { width: min(720px, 86vw); }
@media (max-width: 759px) { .bf6-filters { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .bf6-player { grid-column: 1 / -1; } } /* phones: Player on its own row */
.link-box { max-width: 620px; }
.people { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.person { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--border); color: var(--text); }
@media (hover: hover) { .person:hover { border-color: var(--accent); } }
.person img, .person .ph { width: 40px; height: 40px; border-radius: 50%; background: var(--panel-2); flex: 0 0 auto; display: grid; place-items: center; font-family: var(--font-head); font-weight: 700; color: var(--accent); }
.person .n { flex: 1; min-width: 0; font-family: var(--font-head); font-weight: 700; font-size: 18px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icon-btn.tool { width: 32px; height: 32px; }
.builder-actions { margin-top: 16px; }

/* ---------- misc ---------- */
.toast { position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: var(--z-toast); max-width: min(calc(92vw / var(--z)), 520px); padding: 12px 16px; border-radius: var(--radius); background: var(--panel-2); border: 1px solid var(--border); box-shadow: var(--shadow-2); font-weight: 500; }
.toast.bad { border-color: var(--bad); }
.toast.good { border-color: var(--good); }
@keyframes rise { from { opacity: 0; transform: translate(-50%, 8px); } }
.hello { text-align: center; padding: 6px 0 4px; }
.hello-line { font-family: var(--font-head); font-weight: 700; font-size: clamp(26px, 4.2vw, 46px); letter-spacing: .03em; color: var(--text); overflow-wrap: anywhere; }
.hub-title { margin-bottom: 2px; }
.home-grid { display: grid; gap: 16px; margin-top: 16px; }
.home-actions { display: flex; flex-direction: column; gap: 8px; }
.home-actions .tile h3 { font-size: 20px; }
.btn.wide { width: 100%; min-height: 48px; font-size: 18px; }
@media (min-width: 1101px) { .home-grid { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; } }
.empty-state { text-align: center; padding: 34px 16px; color: var(--muted); }
.sheet-backdrop { position: fixed; inset: 0; z-index: var(--z-sheet); background: rgba(0,0,0,.55); display: grid; place-items: end center; }
.sheet { width: min(100%, 560px); max-height: calc(86vh / var(--z)); overflow: auto; background: var(--panel); border: 1px solid var(--border); border-radius: var(--r-lg) var(--r-lg) 0 0; padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); }
@media (min-width: 760px) { .sheet-backdrop { place-items: center; } .sheet { border-radius: var(--r-lg); } }
.sheet.chan-pop { overflow: visible; } /* the channel picker pop-up: its dropdown hangs out past it instead of scrolling inside it */
.hide { display: none !important; }

/* ---------- live loadout builder ---------- */
.stage { position: relative; border-radius: var(--radius); border: 1px solid var(--border); background: radial-gradient(60% 55% at 50% 58%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 70%), linear-gradient(180deg, var(--bg-top), var(--bg)); overflow: hidden; }
.stage.loading .stage-gun { opacity: .55; }
.stage { color: var(--text); transition: background-color var(--t-in) var(--ease-ios); }
.look-wear { color: var(--text); }
.look-wear.walled { background: var(--look-wall) center / cover no-repeat; } /* the member's Server Card wallpaper (drawn on their theme): builder stage, trophy and Show off pop-ups */
.look-wear.live-walled { isolation: isolate; } /* its moving wallpaper (canvas.look-live) sits under the content */
.look-wear.live-walled > canvas.look-live { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; border-radius: inherit; }
.stage-head { padding: 14px 16px 0; }
.stage-title { font-size: clamp(24px, 3.2vw, 40px); display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 4px; }
.stage-name, .stage-desc { cursor: text; border-radius: 4px; outline: none; }
.stage-name:focus, .stage-desc:focus { background: color-mix(in srgb, var(--text) 7%, transparent); }
@media (hover: hover) { .stage-name:hover, .stage-desc:hover { background: color-mix(in srgb, var(--text) 7%, transparent); } }
.stage-name.placeholder, .stage-desc.placeholder { color: var(--dim); }
.stage-desc { color: var(--muted); font-size: 15px; margin: 4px 0 16px; max-width: 46%; min-height: 22px; white-space: pre-wrap; }
.stage-name input { font: inherit; width: min(420px, calc(60vw / var(--z))); padding: 0 6px; min-height: 0; }
.stage-desc textarea { width: 100%; min-height: 60px; }
.stage-pts { position: absolute; top: 14px; right: 18px; font-family: var(--font-head); font-weight: 700; font-size: clamp(22px, 2.6vw, 34px); color: var(--good); }
.stage-pts.over { color: var(--bad); }
.stage-gun { display: block; transition: opacity var(--t-out) var(--ease-out); pointer-events: none; }
.stage-lines line { stroke: var(--dim); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.stage-lines line.on { stroke: color-mix(in srgb, var(--accent) 65%, transparent); }
.stage-lines line.hi { stroke: var(--accent); stroke-width: 2.5; }
.sbox { display: flex; flex-direction: column; justify-content: center; gap: 2px; text-align: left; padding: 6px 10px 6px 12px; border: 1px solid var(--border); background: color-mix(in srgb, var(--panel) 92%, transparent); color: var(--text); cursor: pointer; clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%); box-shadow: inset 3px 0 0 var(--accent); min-width: 0; }
.sbox.emptyv { box-shadow: none; }
.sbox .s { display: flex; justify-content: space-between; gap: 6px; font-family: var(--font-head); font-weight: 600; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.sbox .v { font-family: var(--font-head); font-weight: 600; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sbox.emptyv .v { color: var(--dim); }
@media (hover: hover) { .sbox:hover { border-color: var(--accent); } }
.sbox.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, var(--panel)); }
.sbox.on .s { color: var(--accent); }
.drop-menu.lo-pick { position: absolute; right: auto; z-index: var(--z-pop); } /* the attachment list: placed by script under or over its slot box */
.lo-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.lo-row .c { color: var(--muted); font-variant-numeric: tabular-nums; }
.lo-row.on .c { color: inherit; }
.pick-list { display: flex; flex-direction: column; gap: 2px; max-height: calc(50vh / var(--z)); overflow-y: auto; margin: 0 -6px; }
.pick-list .drop-item { font-family: inherit; font-weight: 500; font-size: 15px; }
@media (min-width: 760px) {
  .stage { height: 0; width: min(100%, var(--fit-w, 100%)); padding-bottom: calc(544 / 1040 * min(100%, var(--fit-w, 100%)) + var(--push, 0px)); margin-inline: auto; } /* the art's shape, plus room for a long description; narrowed by fitScreen() so the page never scrolls */
  .stage ~ .builder-actions, .stage ~ .builder-hint { max-width: var(--fit-w, none); margin-inline: auto; }
  .stage-head { position: absolute; left: 2%; top: 3%; right: 22%; padding: 0; z-index: 2; }
  .stage-art, .stage-lines { position: absolute; inset: 0; width: 100%; height: 100%; }
  .stage-gun { position: absolute; height: auto; }
  .stage-slots { position: absolute; inset: 0; }
  .stage > .stage-art, .stage-slots { top: var(--push, 0px); height: auto; bottom: 0; }
  .sbox { position: absolute; left: var(--x); top: var(--y); width: 18.08%; height: 13.24%; z-index: 3; padding: 0 1cqw 0 1.2cqw; }
  .stage { container-type: inline-size; } /* the slot text scales with the stage, which fitScreen() may narrow */
  .sbox .s { font-size: clamp(9px, 1.15cqw, 12px); letter-spacing: .1em; white-space: nowrap; }
  .sbox .s span:first-child { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  .sbox .v { font-size: clamp(11px, 1.6cqw, 17px); }
}
@media (max-width: 759px) {
  .stage-lines { display: none; }
  .stage-desc { max-width: none; }
  .stage-pts { top: 12px; right: 14px; }
  .stage-head { padding-right: 90px; }
  .stage-gun { width: min(78%, var(--gun-max, 320px)) !important; position: static; margin: 6px auto 6px; } /* smaller and centered on phones; fitScreen() shrinks it so the page never scrolls */
  .stage-desc { margin-bottom: 4px; }
  .stage-slots { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 0 10px 10px; }
  .sbox { min-height: 0; padding: 4px 10px; gap: 0; }
  .sbox .s { font-size: 10px; letter-spacing: .08em; }
  .sbox .v { font-size: 14px; }
  .stage:has(.show-btn) .stage-slots { padding-bottom: 74px; }
}

/* ---------- player notes ---------- */
.bell-btn { display: grid; place-items: center; width: 40px; height: 40px; flex: 0 0 auto; padding: 0; border-radius: 50%; border: 1px solid var(--border); background: var(--panel-2); color: var(--muted); cursor: pointer; transition: color var(--t-out) var(--ease-out), border-color var(--t-out) var(--ease-out), background var(--t-out) var(--ease-out), transform var(--t-out) var(--ease-spring); }
.bell-btn svg { width: 20px; height: 20px; transform-origin: 50% 10%; }
.bell-btn.on { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 55%, var(--border)); background: color-mix(in srgb, var(--accent) 14%, var(--panel-2)); }
@media (hover: hover) { .bell-btn:hover { border-color: var(--muted); } }
.bell-btn:active { transform: scale(.92); }
.sw-label { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; } /* a short label beside a switch; tapping either flips it */
.notes-add { margin-bottom: 16px; }
.notes-add .search-wrap { margin-bottom: 0; }
.note-list { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.note { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--border); text-align: left; cursor: pointer; width: 100%; }
@media (hover: hover) { .note:hover { border-color: var(--accent); } }
.note img, .note .ph, .member img, .member .ph, .chip img, .chip .ph, .avatars img, .avatars .ph { width: 40px; height: 40px; border-radius: 50%; background: var(--panel-2); flex: 0 0 auto; display: grid; place-items: center; font-family: var(--font-head); font-weight: 700; color: var(--accent); }
.note-main { flex: 1; min-width: 0; }
.note-main h3 { font-size: 18px; }
.note-main p { margin: 4px 0 0; color: var(--muted); white-space: pre-wrap; overflow-wrap: anywhere; }
.res .ph { display: grid; place-items: center; font-family: var(--font-head); font-weight: 700; color: var(--accent); }

/* ---------- notifications ---------- */
.notif-sec h2 { font-size: 22px; }
.row-sec { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.switch { width: 52px; height: 30px; flex: 0 0 auto; border-radius: var(--r-pill); border: 1px solid var(--border); background: var(--bg); position: relative; cursor: pointer; transition: background var(--t-in) var(--ease-spring), border-color var(--t-in) var(--ease-spring), opacity var(--t-in) var(--ease-spring); }
.switch:disabled { opacity: .45; cursor: not-allowed; }
.switch:disabled:active span { width: 22px; }
.switch.on:disabled:active span { transform: translateX(22px); }
.switch span { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--muted); transition: transform var(--t-in) var(--ease-spring), background var(--t-in) var(--ease-spring), width var(--t-in) var(--ease-spring); }
.switch.on { background: var(--accent); border-color: var(--accent); }
.switch.on span { transform: translateX(22px); background: var(--accent-ink); }
.outage-grid { display: grid; grid-template-columns: 1fr 90px 90px; gap: 12px 8px; align-items: center; }
.outage-grid .c { justify-content: center; text-align: center; }
.outage-grid div.c { display: flex; }
.sc-list { gap: 0; }
.sc-row { padding: 8px 0; cursor: pointer; }
.sc-row + .sc-row { border-top: 1px solid var(--border); }
.svc { font-weight: 600; }
.tabs.seg { margin-bottom: 0; flex-wrap: wrap; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 6px 4px 12px; border-radius: var(--r-pill); background: var(--panel-2); border: 1px solid var(--border); font-weight: 600; }
.chip:has(> img, > .ph) { padding-left: 4px; } /* an avatar sits snug to the edge; text gets room */
.chip img, .chip .ph { width: 24px; height: 24px; font-size: 12px; }
.chip button { border: 0; background: transparent; color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer; padding: 0 4px; }
@media (hover: hover) { .chip button:hover { color: var(--bad); } }

/* ---------- gun stats ---------- */
.gun-slots { display: grid; gap: 12px; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 16px; }
.gun-slot { min-height: 58px; display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: var(--radius); border: 1px dashed var(--border); background: transparent; text-align: left; }
.gun-slot.on { border-style: solid; background: var(--panel); cursor: pointer; }
.gun-slot .dot { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto; }
.gun-slot .n { font-family: var(--font-head); font-weight: 700; font-size: 18px; }
.gun-slot .x { margin-left: auto; color: var(--muted); font-size: 20px; }
.gun-slot.free { cursor: pointer; justify-content: center; color: var(--muted); font-weight: 600; }
@media (hover: hover) { .gun-slot.free:hover { border-color: var(--accent); } }
@media (max-width: 599px) { .gun-slots { grid-template-columns: 1fr; } .gun-slot:not(.on) { min-height: 44px; } }
.gun-drop { max-height: min(calc(62vh / var(--z)), 520px); overflow-y: auto; padding: 8px; gap: 2px; }
.drop-cat { font-family: var(--font-head); font-weight: 700; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); padding: 10px 6px 6px; }
.drop-grid { display: grid; gap: 6px; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.gun-opt { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 8px 10px 6px; border-radius: var(--r-sm); border: 1px solid var(--border); background: var(--panel-2); cursor: pointer; text-align: left; }
.gun-opt .n { font-family: var(--font-head); font-weight: 700; font-size: 16px; }
.gun-opt.hi { border-color: var(--accent); }
@media (hover: hover) { .gun-opt:hover { border-color: var(--accent); } }
.gun-glyph { width: 100%; max-width: 150px; aspect-ratio: 560 / 250; background-repeat: no-repeat; filter: brightness(2.6) contrast(.9); }
:root[data-light="1"] .gun-glyph { filter: none; }
.gs-main { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.gun-slot .gun-glyph { max-width: 110px; }
@media (max-width: 599px) {
  /* phones: smaller glyphs, centered in the weapon list; in a picked slot the glyph sits beside the name */
  .gun-opt { align-items: center; text-align: center; }
  .gun-opt .gun-glyph { max-width: 96px; }
  .gs-main { flex-direction: row; align-items: center; justify-content: space-between; gap: 8px; }
  .gun-slot .gun-glyph { max-width: 84px; flex: 0 0 84px; }
}
.res.hi { background: var(--panel-2); }
.res .small { margin-left: auto; }
.wbtn.on { background: color-mix(in srgb, var(--accent) 10%, var(--panel)); }

/* ---------- parties ---------- */
.party-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.party-head h2 { font-size: 26px; margin-top: 2px; }
.party-mode { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.rec-btn { display: inline-flex; align-items: center; gap: 6px; transition: background-color var(--t-out) var(--ease-out), color var(--t-out) var(--ease-out), border-color var(--t-out) var(--ease-out), opacity var(--t-out) var(--ease-out); }
.rec-btn .rec-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; opacity: .55; transition: background-color var(--t-out) var(--ease-out), opacity var(--t-out) var(--ease-out); }
.rec-btn.on { background: var(--bad); border-color: var(--bad); color: var(--on-bad); }
.rec-btn.on .rec-dot { background: var(--on-bad); opacity: 1; animation: rec-pulse var(--t-loop) ease-in-out infinite; }
.rec-btn.flip { animation: rec-flip var(--t-in) var(--ease-spring); }
@keyframes rec-pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.75); } }
@keyframes rec-flip { from { transform: scale(.88); opacity: .6; } }
@media (prefers-reduced-motion: reduce) { .rec-btn, .rec-btn .rec-dot { animation: none !important; transition: none; } }
.party-head .pts { font-family: var(--font-head); font-weight: 700; font-size: 22px; color: var(--accent); }
.roster { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
.member { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: var(--r-sm); background: var(--bg); border: 1px solid var(--border); }
.member img, .member .ph { width: 32px; height: 32px; }
.member .n { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member.empty { border-style: dashed; background: transparent; }
.member.empty .ph { color: var(--muted); background: transparent; border: 1px dashed var(--border); }
.party-settings { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); }
.invite-box { padding-top: 12px; border-top: 1px solid var(--border); }
.invite-box h3 { font-size: 18px; }
.invite-box .search-wrap { margin-bottom: 0; }
.party-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.party-card h3 { font-size: 20px; }
.avatars { display: flex; gap: 6px; }
.avatars img, .avatars .ph { width: 32px; height: 32px; }
.grow { flex: 1; }

/* ---------- chat windows (Battle Buddy bottom left, #general bottom right) ---------- */
.chat-win { position: fixed; bottom: 16px; z-index: var(--z-chat); width: min(var(--w), calc(100vw / var(--z) - 64px)); height: var(--chat-h); display: flex; flex-direction: column; border: 1px solid var(--border); background: var(--bg); box-shadow: var(--shadow-4); overflow: hidden; }
.chat-win.left { --w: var(--w-bot, 280px); left: 0; border-left: 0; border-radius: 0 var(--r-lg) var(--r-lg) 0; animation: slide-l var(--t-in) var(--ease-ios); }
.chat-win.right { --w: var(--w-general, 280px); right: 0; border-right: 0; border-radius: var(--r-lg) 0 0 var(--r-lg); animation: slide-r var(--t-in) var(--ease-ios); }
.chat-win.left.closing { animation: slide-l-out var(--t-out) var(--ease-out) forwards; }
.chat-win.right.closing { animation: slide-r-out var(--t-out) var(--ease-out) forwards; }
@keyframes slide-l-out { to { transform: translateX(-100%); opacity: .4; } } /* own keyframes: re-running the open one in reverse jumps straight to the end */
@keyframes slide-r-out { to { transform: translateX(100%); opacity: .4; } }
@keyframes slide-l { from { transform: translateX(-100%); } }
@keyframes slide-r { from { transform: translateX(100%); } }
/* The edge bubbles: half off-screen when closed; open, they ride on the window's outer edge as its handle. */
/* The edge bubbles: slim tabs, centered on their chat window's height; open, they ride on the window's outer edge. */
:root { --chat-h: min(510px, calc(100vh / var(--z) - 32px)); --tab-h: 44px; }
.chat-tab { position: fixed; bottom: calc(16px + (var(--chat-h) - var(--tab-h)) / 2); z-index: calc(var(--z-chat) + 1); width: 30px; height: var(--tab-h); display: grid; place-items: center; padding: 0; border: 1px solid var(--border); background: var(--panel); color: var(--text); cursor: pointer; box-shadow: var(--shadow-1); transition: left var(--t-out) var(--ease-out), right var(--t-out) var(--ease-out), background var(--t-out) var(--ease-out), color var(--t-out) var(--ease-out); }
.chat-tab svg { width: 16px; height: 16px; }
.chat-tab-icon { width: 24px; height: 24px; border-radius: 50%; }
@media (hover: hover) { .chat-tab:hover { color: var(--accent); } }
.chat-tab.left { left: 0; border-left: 0; border-radius: 0 var(--r-lg) var(--r-lg) 0; } /* the window's own corners */
.chat-tab.right { right: 0; border-right: 0; border-radius: var(--r-lg) 0 0 var(--r-lg); }
.chat-tab.open { opacity: 0; pointer-events: none; } /* an open chat closes with its × */
/* The resize handle along each window's inner edge. */
.chat-grip { position: absolute; top: 0; bottom: 0; width: 8px; cursor: ew-resize; z-index: 2; touch-action: none; }
.chat-win.left .chat-grip { right: 0; }
.chat-win.right .chat-grip { left: 0; }
.chat-grip::after { content: ''; position: absolute; top: 50%; width: 3px; height: 36px; margin-top: -18px; border-radius: 2px; background: var(--border); opacity: 0; transition: opacity var(--t-out) var(--ease-out); }
.chat-win.left .chat-grip::after { right: 2px; }
.chat-win.right .chat-grip::after { left: 2px; }
body.chat-resizing .chat-grip::after { opacity: 1; }
@media (hover: hover) { .chat-win:hover .chat-grip::after { opacity: 1; } }
body.chat-resizing, body.chat-resizing * { cursor: ew-resize !important; user-select: none; }
body.chat-resizing .chat-tab { transition: none; }
@media (max-width: 759px) { .chat-grip { display: none; } }
.chat-head .chat-icon { width: 32px; height: 32px; border-radius: 50%; flex: 0 0 auto; }
.bot-line { display: flex; gap: 8px; align-items: flex-end; max-width: 92%; }
.bot-line .bubble.bot { max-width: none; min-width: 0; }
.bot-av { width: 24px; height: 24px; border-radius: 50%; flex: 0 0 auto; }
.chat-head .hash svg { width: 18px; height: 18px; }
.chat-pics img { cursor: zoom-in; }
.chat-compose textarea::placeholder { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-win .chat-compose .send { padding: 0 12px; }
.lightbox { position: fixed; inset: 0; z-index: var(--z-lightbox); display: grid; place-items: center; padding: 24px; background: rgba(0,0,0,0); cursor: zoom-out; }
.lightbox img { width: auto; height: auto; max-width: calc(100vw / var(--z) - 48px); max-height: calc(100vh / var(--z) - 48px); object-fit: contain; border-radius: var(--r-sm); } /* always fits the screen */
.lb-close { position: absolute; top: 16px; right: 16px; width: 40px; height: 40px; }
.chat-head { display: flex; align-items: center; gap: 8px; padding: 10px 10px 10px 14px; border-bottom: 1px solid var(--border); background: var(--panel); }
.chat-head h3 { font-size: 18px; }
.chat-head .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.chat-head .hash { width: 32px; height: 32px; border-radius: var(--r-sm); display: grid; place-items: center; font-family: var(--font-head); font-weight: 700; font-size: 18px; background: var(--panel-2); color: var(--muted); border: 1px solid var(--border); flex: 0 0 auto; }
.chat-log { position: relative; flex: 1; min-height: 0; overflow-y: auto; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.chat-empty { margin: auto; max-width: 300px; text-align: center; color: var(--muted); }
.chat-empty.leaving { position: absolute; left: 14px; right: 14px; top: 50%; margin: 0 auto; translate: 0 -50%; pointer-events: none; animation: empty-out var(--t-out) var(--ease-out) forwards; } /* out of the way at once, then fades */
@keyframes empty-out { to { opacity: 0; scale: .96; } }
.bubble { max-width: 86%; padding: 9px 13px; border-radius: var(--r-lg); line-height: 1.45; overflow-wrap: anywhere; }
.bubble.bot { align-self: flex-start; background: var(--panel); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.bubble.me { align-self: flex-end; background: var(--accent); color: var(--accent-ink); border-bottom-right-radius: 4px; }
.bubble.me a { color: inherit; text-decoration: underline; }
.bubble code, .gtext code { font-family: ui-monospace, Menlo, monospace; font-size: .92em; padding: 1px 5px; border-radius: 4px; background: color-mix(in srgb, var(--text) 12%, transparent); }
/* Discord formatting (the one renderer) in the site's own colors: chats, news and the Home notice. */
:is(.bubble-text, .gtext, .news-text, .notice-body) :is(.dc-h1, .dc-h2, .dc-h3) { color: inherit; }
:is(.bubble-text, .gtext, .news-text, .notice-body) .dc-sub { color: var(--muted); font-size: 12px; }
.bubble.me .bubble-text .dc-sub { color: inherit; opacity: .75; }
:is(.bubble-text, .gtext, .news-text, .notice-body) .dc-quote { border-left-color: var(--border); }
:is(.bubble-text, .gtext, .news-text, .notice-body) .dc-mention { background: color-mix(in srgb, var(--accent) 16%, transparent); color: inherit; }
:is(.bubble-text, .gtext, .news-text, .notice-body) .dc-pre { background: var(--panel-2); border-color: var(--border); }
:is(.bubble-text, .gtext, .news-text, .notice-body) .dc-stamp { background: color-mix(in srgb, var(--text) 8%, transparent); }
.chat-pics { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.chat-pics img { max-width: 100%; max-height: 260px; border-radius: var(--radius); object-fit: contain; }
.bubble.typing { display: flex; gap: 4px; padding: 13px 15px; }
.bubble.typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: blink var(--t-loop) ease-in-out infinite; }
.bubble.typing span:nth-child(2) { animation-delay: .2s; }
.bubble.typing span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.gmsg { display: flex; gap: 8px; align-items: flex-start; }
.gmsg .av { width: 32px; height: 32px; border-radius: 50%; flex: 0 0 auto; background: var(--panel-2); display: grid; place-items: center; font-family: var(--font-head); font-weight: 700; color: var(--accent); }
.gbody { flex: 1; min-width: 0; }
.gtop { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.gname { font-weight: 700; }
.gmsg.isbot .gname { color: var(--accent); }
.gtext { overflow-wrap: anywhere; }
.gtext div { white-space: pre-wrap; }
.chat-compose { display: flex; gap: 8px; align-items: flex-end; padding: 10px 12px; border-top: 1px solid var(--border); background: var(--panel); }
.chat-compose textarea { flex: 1; min-height: 40px; max-height: 120px; resize: none; padding: 9px 12px; }
.chat-compose .send { flex: 0 0 auto; }
/* A chat inside a page (the party chat, Chatbot Try it): the window's parts in a framed box */
.chat-box { border: 1px solid var(--border); border-radius: var(--r-sm); overflow: hidden; background: var(--panel-2); }
.pchat-log { height: 320px; flex: none; }
.pchat.readonly { border: 0; background: none; overflow: visible; }
.pchat.readonly .pchat-log { height: min(60vh, 460px); padding: 0; }
.pchat-attach { flex: 0 0 auto; width: 40px; height: 40px; }
.pchat-attach svg { width: 20px; height: 20px; }
.pchat-chip { display: flex; align-items: center; gap: 8px; margin: 8px 12px 0; padding: 4px 6px 4px 10px; border-radius: var(--r-pill); background: var(--panel); border: 1px solid var(--border); width: fit-content; max-width: calc(100% - 24px); font-size: 13px; animation: bubble-in var(--t-in) var(--ease-ios) both; }
.pchat-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pchat-chip button { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 16px; line-height: 1; }
.pchat-file { color: var(--accent); word-break: break-all; }
.chat-pics video { max-width: 100%; max-height: 260px; border-radius: var(--radius); background: #000; }
@media (max-width: 599px) { .pchat-log { height: 260px; } }
@media (max-width: 759px) {
  :root { --chat-h: min(510px, calc(100vh / var(--z) - 100px)); }
  .chat-win { height: var(--chat-h); }
}

.pic.zoomable img, img.zoomable { cursor: zoom-in; }
.pic canvas.live-card { position: absolute; pointer-events: none; z-index: 1; border-radius: inherit; } /* a card with its wallpaper moving, over its still frame */
.lightbox canvas.live-card { z-index: 2; transition: opacity var(--t-out) var(--ease-out); }

/* Side-scrolling rows (tabs, chips): the edges fade where more is hidden, with small < > arrows to scroll. */
.hscroll { position: relative; min-width: 0; }
.hscroll > .tabs { margin-bottom: 0; }
.hscroll.more-l > .tabs { -webkit-mask-image: linear-gradient(to right, transparent 0, #000 34px); mask-image: linear-gradient(to right, transparent 0, #000 34px); }
.hscroll.more-r > .tabs { -webkit-mask-image: linear-gradient(to left, transparent 0, #000 34px); mask-image: linear-gradient(to left, transparent 0, #000 34px); }
.hscroll.more-l.more-r > .tabs { -webkit-mask-image: linear-gradient(to right, transparent 0, #000 34px, #000 calc(100% - 34px), transparent 100%); mask-image: linear-gradient(to right, transparent 0, #000 34px, #000 calc(100% - 34px), transparent 100%); }
.hs-arrow { position: absolute; top: 50%; z-index: 2; width: 22px; height: 28px; margin-top: -14px; border: 0; background: transparent; color: var(--text); display: none; place-items: center; cursor: pointer; padding: 0; filter: drop-shadow(0 1px 3px rgba(0,0,0,.8)); }
.hs-arrow svg { width: 18px; height: 18px; }
@media (hover: hover) { .hs-arrow:hover { color: var(--accent); } }
.hs-arrow.l { left: -4px; animation: hs-float-l var(--t-loop) ease-in-out infinite; }
.hs-arrow.r { right: -4px; animation: hs-float-r var(--t-loop) ease-in-out infinite; }
/* A gentle nudge toward the hidden side. */
@keyframes hs-float-l { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(-3px); } }
@keyframes hs-float-r { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(3px); } }
@media (prefers-reduced-motion: reduce) { .hs-arrow.l, .hs-arrow.r { animation: none; } }
.hscroll.more-l > .hs-arrow.l, .hscroll.more-r > .hs-arrow.r { display: grid; }

/* Scrollbars: one style everywhere. Slim and grey with no track; they show while you hover an area or scroll it
   (app.js adds .scrolling while an area moves). */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track, ::-webkit-scrollbar-corner { background: transparent; }
::-webkit-scrollbar-thumb { background: transparent; border-radius: var(--r-pill); border: 2px solid transparent; background-clip: padding-box; }
:hover::-webkit-scrollbar-thumb { background-color: color-mix(in srgb, var(--muted) 45%, transparent); }
.scrolling::-webkit-scrollbar-thumb, ::-webkit-scrollbar-thumb:hover, ::-webkit-scrollbar-thumb:active { background-color: color-mix(in srgb, var(--muted) 75%, transparent); }
::-webkit-scrollbar-button { display: none; }
@supports (-moz-appearance: none) {
  * { scrollbar-width: thin; scrollbar-color: transparent transparent; }
  :hover { scrollbar-color: color-mix(in srgb, var(--muted) 45%, transparent) transparent; }
  .scrolling { scrollbar-color: color-mix(in srgb, var(--muted) 75%, transparent) transparent; }
}
html { scrollbar-width: none; } html::-webkit-scrollbar { display: none; } /* no page scrollbar; inner panels keep their slim ones */

/* ---------- motion: press feedback ---------- */
:is(.btn, .tile, .lo-item, .trophy, .swatch, .wbtn, .note, .person, .tabs button, .icon-btn, .chat-tab, .gun-slot.on, .res, .gun-opt, .sbox, .opt, .morph-btn, .back-arrow, .send) {
  transition: transform var(--t-out) var(--ease-spring), background var(--t-out) var(--ease-out), border-color var(--t-out) var(--ease-out), color var(--t-out) var(--ease-out), opacity var(--t-out) var(--ease-out), box-shadow var(--t-out) var(--ease-out);
}
:is(.btn, .tile, .lo-item, .trophy, .swatch, .wbtn, .note, .person, .tabs button, .icon-btn, .gun-slot.on, .res, .gun-opt, .sbox, .opt, .back-arrow, .send):active:not([disabled]):not(.soon-tile) {
  transform: scale(.965); transition-duration: var(--t-tap); transition-timing-function: var(--ease-out);
}

/* Every other button presses too (zero specificity, so a button's own rules win). */
:where(button) { transition: transform var(--t-out) var(--ease-spring); }
:where(button):active:not(:disabled) { transform: scale(.965); transition-duration: var(--t-tap); transition-timing-function: var(--ease-out); }
/* A part that fades in or out where it stands (fadeSlot in app.js). */
.slot-fade { transition: opacity var(--t-in) var(--ease-ios), transform var(--t-in) var(--ease-ios), visibility 0s; }
.slot-fade.gone { opacity: 0; transform: scale(.96); visibility: hidden; pointer-events: none; transition: opacity var(--t-out) var(--ease-out), transform var(--t-out) var(--ease-out), visibility 0s linear var(--t-out); }
/* A chat tab fades away as its window opens, and comes back once the window has slid shut. */
.chat-tab:not(.open) { transition: opacity var(--t-in) var(--ease-ios) var(--t-out), transform var(--t-out) var(--ease-spring), background var(--t-out) var(--ease-out), color var(--t-out) var(--ease-out), border-color var(--t-out) var(--ease-out); }
.chat-tab.open { transition: opacity var(--t-out) var(--ease-out); }
/* Hovers glide instead of snapping (zero specificity, so a control's own transition wins). */
:where(.drop-item, .choice-btn, .check-row, .cp-btn, .chip button, .hs-arrow, .notice-arrow, .stage-name, .stage-desc) { transition: background var(--t-out) var(--ease-out), border-color var(--t-out) var(--ease-out), color var(--t-out) var(--ease-out), box-shadow var(--t-out) var(--ease-out), transform var(--t-out) var(--ease-spring); }
.switch:active { transform: none; } /* switches don't shrink; the knob stretches instead */
.switch:active span { width: 26px; } /* the knob stretches while held, like iOS */
.switch.on:active span { transform: translateX(18px); }

/* Home: the latest announcement under the greeting (a day after it's posted). */
.home-notice { margin: 24px 0 16px; } /* room between the greeting and the banner */
.notice { position: relative; padding: 16px; border-radius: var(--radius); background: color-mix(in srgb, var(--panel) 92%, transparent); border: 1px solid var(--border); box-shadow: inset 3px 0 0 var(--accent); display: flex; flex-direction: column; gap: 8px; }
.notice-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.notice-more { position: relative; display: flex; flex-direction: column; gap: 8px; overflow: hidden; }
/* Folded: only the title (or first sentence) on one line, a shadow across the bottom, the down arrow sitting on it. */
.notice-peek { display: none; font-weight: 600; font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notice.folded .notice-peek { display: block; animation: peek-in var(--t-in) var(--ease-ios); }
@keyframes peek-in { from { opacity: 0; transform: translateY(-4px); } }
.notice.folded .notice-more { height: 0; margin-top: -10px; }
.notice.folded { box-shadow: inset 3px 0 0 var(--accent), inset 0 -26px 22px -14px rgba(0,0,0,.55); }
.notice-arrow { align-self: center; position: relative; z-index: 1; width: 44px; height: 28px; margin: -14px 0 -10px; border: 0; padding: 0; background: transparent; color: var(--text); display: grid; place-items: center; cursor: pointer; filter: drop-shadow(0 1px 3px rgba(0,0,0,.8)); animation: notice-bob var(--t-loop) ease-in-out infinite; }
.notice-arrow svg { width: 22px; height: 22px; transform: rotate(180deg); transition: transform var(--t-in) var(--ease-ios); }
.notice.folded .notice-arrow svg { transform: none; }
.notice:not(.folded) .notice-arrow { margin-top: -4px; }
@media (hover: hover) { .notice-arrow:hover { color: var(--accent); } }
/* The same gentle nudge as the side-scroll arrows, downward. */
@keyframes notice-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(3px); } }
@media (prefers-reduced-motion: reduce) { .notice-arrow { animation: none; } }
.notice-body { display: flex; flex-direction: column; gap: 6px; overflow-wrap: anywhere; }
.notice-body p { margin: 0; line-height: 1.45; }
.notice-body .rt-title { font-size: clamp(24px, 3.4vw, 32px); line-height: 1.15; letter-spacing: .02em; margin-bottom: 2px; }
.notice-body :is(.dc-h1, .dc-h2, .dc-h3) { font-family: var(--font-head); font-size: 22px; margin: 0; }
.notice-body .dc-sub { font-size: 13px; }
.notice-body .dc-line { line-height: 1.45; }
.notice-body a { color: var(--accent); }
.notice-img { max-width: 100%; max-height: 360px; width: auto; border-radius: var(--r-sm); cursor: zoom-in; align-self: flex-start; }

/* Player notes: detail pills, tags on the list, squads. */
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pill, .chip-toggle { display: inline-flex; align-items: center; justify-content: center; min-height: 32px; padding: 0 12px; border-radius: var(--r-pill); border: 1px solid var(--border); background: var(--panel); color: var(--muted); font: inherit; font-size: 13px; font-weight: 600; white-space: nowrap; cursor: pointer; transition: background var(--t-out) var(--ease-out), border-color var(--t-out) var(--ease-out), color var(--t-out) var(--ease-out), transform var(--t-out) var(--ease-spring); } /* every toggle chip: one size, one on look */
.pill:active:not(:disabled), .chip-toggle:active { transform: scale(.965); }
.pill:disabled { opacity: .45; cursor: not-allowed; }
@media (hover: hover) { :is(.pill, .chip-toggle):not(.on):not(:disabled):hover { color: var(--text); border-color: var(--muted); } }
.tier-dot { width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--tier); flex: 0 0 auto; }
.tier-pills { margin-bottom: 16px; }
.pill.on, .chip-toggle.on { background: color-mix(in srgb, var(--accent) 18%, var(--panel)); border-color: var(--accent); color: var(--text); }
.note-field { display: flex; flex-direction: column; gap: 8px; }
.big-avatar { display: flex; justify-content: center; margin: -4px 0 4px; }
.big-avatar img, .big-avatar .ph { width: 96px; height: 96px; border-radius: 50%; background: var(--panel-2); display: grid; place-items: center; font-family: var(--font-head); font-weight: 700; font-size: 40px; color: var(--accent); box-shadow: 0 0 0 3px var(--accent), var(--shadow-2); }
.notes-squads-head, .party-list-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.notes-squads-head .sub-head, .party-list-head .sub-head { margin: 0; }
.notes-squads-head { margin-top: 24px; }
.party-list-head { margin-bottom: 14px; }
.party-list-head.after-mine { margin-top: 10px; }
.notes-players-head { margin-top: 24px; }
.notes-tabs { display: none; }
/* Phones: Favorite Squads and Players one at a time under a tab bar (tap or swipe) */
@media (max-width: 759px) {
  .notes-tabs { display: flex; flex-wrap: nowrap; margin: 16px 0 6px; }
  .notes-tabs button { flex: 1 1 0; }
  .notes-pane { min-height: calc(60vh / var(--z)); }
  .notes-pane.off { display: none; }
  .notes-pane .notes-squads-head { margin-top: 12px; }
  .notes-players-head { margin-top: 12px; }
}
.squad-slots { display: grid; gap: 12px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 599px) { .squad-slots { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.sq-slot { position: relative; min-height: 132px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 12px 8px; border-radius: var(--r-sm); border: 1px solid var(--border); background: var(--bg); color: var(--text); text-align: center; cursor: pointer; min-width: 0; }
.sq-slot img, .sq-slot .ph { width: 64px; height: 64px; border-radius: 50%; background: var(--panel-2); display: grid; place-items: center; font-family: var(--font-head); font-weight: 700; font-size: 26px; color: var(--accent); }
.sq-slot .n { font-weight: 700; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sq-slot.me { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--bg)); }
.sq-slot.empty { border-style: dashed; color: var(--muted); }
.sq-slot.picking { border-color: var(--accent); }
@media (hover: hover) { .sq-slot.empty:hover { border-color: var(--accent); } }
.sq-slot .plus { width: 64px; height: 64px; border-radius: 50%; border: 2px dashed var(--border); display: grid; place-items: center; font-size: 30px; line-height: 1; }
.sq-slot .x { position: absolute; top: 6px; right: 10px; color: var(--muted); font-size: 18px; }
.squad-pick .search-wrap { margin-bottom: 0; max-width: none; }
.note-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.note-tags span { padding: 2px 8px; border-radius: var(--r-pill); background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--text); font-size: 12px; font-weight: 600; }
.chip.me { border-color: var(--accent); }

/* Staff: hub, member page, chat summary; Commands; About */
.soon-tile { cursor: default; opacity: .45; }
.staff-layout { display: grid; gap: 0; grid-template-columns: minmax(0, 1fr) minmax(0, 0fr); align-items: start; } /* the second track holds the Logs column or a tool's own column (toolSide), closed until one opens */
@media (min-width: 1101px) { .staff-layout.logs-on { gap: 16px; grid-template-columns: minmax(0, 3fr) minmax(0, 1fr); } }
@media (min-width: 1101px) and (max-width: 1799px) { .staff-layout.logs-on .staff-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } } /* beside the Logs, four columns get too narrow */
.logs-head { justify-content: space-between; flex-wrap: nowrap; }
.logs-toggle.on { border-color: var(--accent); color: var(--accent); }
.logs-toggle { transition: opacity var(--t-out) var(--ease-out), border-color var(--t-out) var(--ease-out), color var(--t-out) var(--ease-out); }
main.staff-app:has(.staff-layout.side-on) .logs-toggle, main.staff-app:has(.staff-layout.full-logs) .logs-toggle { opacity: 0; pointer-events: none; } /* a tool's own column, or the full log, has the room */
.staff-logs { transition: opacity var(--t-out) var(--ease-out); }
@media (min-width: 1101px) { .staff-layout.logs-on.full-logs { gap: 0; grid-template-columns: minmax(0, 1fr) minmax(0, 0fr); } }
.staff-layout.full-logs .staff-logs { opacity: 0; pointer-events: none; overflow: hidden; }
@media (max-width: 1100px) { .staff-layout.full-logs .staff-logs { display: none; } }
.staff-stage { position: relative; overflow-x: clip; min-width: 0; }
.stage-screen { min-width: 0; }
.staff-stage .page-head { margin-top: 0; }
.staff-stage .page-title { font-size: clamp(20px, 2vw, 24px); letter-spacing: .1em; }
.staff-stage .page-title::before { inset: -10px -20px; }
.staff-stage .back-arrow { width: 32px; height: 32px; margin-left: -6px; }
.staff-stage .back-arrow svg { width: 22px; height: 22px; }
.staff-stage .page-head { gap: 6px; margin-bottom: 8px; }
/* Wide screens: the Staff Panel fills exactly one screen. The title stays put; the tools and the
   logs each scroll on their own, and the page itself doesn't move. */
@media (min-width: 1101px) {
  main.staff-app { height: calc(100vh / var(--z)); padding-bottom: 16px; display: flex; flex-direction: column; overflow: hidden; box-sizing: border-box; }
  main.staff-app > .page-head { flex: 0 0 auto; }
  main.staff-app .staff-layout { flex: 1; min-height: 0; align-items: stretch; }
  main.staff-app .staff-stage { height: 100%; overflow-y: auto; overscroll-behavior: contain; padding-right: 6px; }
  main.staff-app .staff-logs { height: 100%; min-height: 0; display: flex; flex-direction: column; }
  .staff-logs .logs-box { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding-right: 4px; }
}
/* Narrow screens: the title scrolls with the page like every other page title (only its radial glow behind it, no bar). */
.check-row { gap: 8px; }
@media (hover: hover) { .check-row:hover { background: var(--panel-2); } }
.check-row .muted { margin-left: auto; }
.check-row.check-cat > span:first-of-type { font-weight: 700; }
.check-row.check-cat { margin-top: 4px; }
.check-row.check-cat .drop-tag { margin-left: auto; }
.check-row.check-kid { padding-left: 32px; }
.cmd-item { border-radius: var(--r-sm); background: var(--bg); border: 1px solid var(--border); }
.cmd-item.open { border-color: color-mix(in srgb, var(--accent) 50%, var(--border)); }
.cmd-line { display: flex; align-items: center; gap: 8px; padding-right: 12px; }
.cmd-mode { text-align: left; font-size: 14px; color: var(--muted); transition: color .2s ease, background-color .2s ease; }
.cmd-mode.on { font-weight: 800; color: var(--accent); background: color-mix(in srgb, var(--accent) 15%, transparent); border-radius: var(--r-pill); padding: 2px 8px; }
.cmd-line .cmd-head { flex: 1; min-width: 0; }
.cmd-quick { flex: 0 0 auto; }
.cmd-brief { flex: 0 0 auto; font-size: 11px; white-space: nowrap; }
.cmd-quick-fixed { flex: 0 0 52px; text-align: center; font-size: 11px; }
/* Fold rows: one reset for every click-to-open header (expand() / DISCLOSE in app.js) */
:is(.cmd-head, .rj-head, .sq-card-head, .sum-head, .cb-head, .cb-area-head) { width: 100%; border: 0; background: transparent; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.cmd-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto auto; gap: 4px 12px; align-items: center; padding: 12px 14px; }
.cmd-head code { font-family: ui-monospace, 'JetBrains Mono', Menlo, monospace; font-weight: 700; color: var(--accent); }
.cmd-desc { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmd-tags { display: flex; align-items: center; gap: 8px; justify-content: flex-end; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmd-tags .tag { flex: none; }
@media (max-width: 759px) { .cmd-head { grid-template-columns: minmax(0, 1fr) auto; } .cmd-head > :not(.chev) { grid-column: 1; } .cmd-head > .chev { grid-column: 2; grid-row: 1 / span 4; } .cmd-tags { justify-content: flex-start; max-width: none; overflow: visible; } .cmd-desc { white-space: normal; } }
.cmd-edit { padding: 4px 14px 14px; border-top: 1px solid var(--border); }
.cmd-ui { gap: 6px; min-width: 116px; align-items: center; min-height: 34px; flex-wrap: nowrap; }
.cmd-pair.has-ui { grid-template-columns: auto minmax(0, 220px) minmax(0, 320px); }
.cmd-pair { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 320px); gap: 10px; align-items: start; }
.cmd-pair .field { font-size: 13px; min-width: 0; }
.cmd-pair .choice-btn { padding: 4px 8px; font-size: 12px; min-height: 30px; }
.cmd-where { flex-wrap: nowrap; gap: 6px; }
.cmd-where > .drop-wrap { flex: 1; min-width: 0; }
.cmd-where .btn.small { flex: none; min-height: 30px; padding: 4px 10px; font-size: 12px; }
@media (max-width: 759px) { .cmd-pair, .cmd-pair.has-ui { grid-template-columns: 1fr 1fr; } .cmd-pair.has-ui > :first-child { grid-column: 1 / -1; } .cmd-pair .field > span { white-space: nowrap; } }
.staff-cols { display: grid; gap: 16px; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: start; }
.st-group + .st-group { margin-top: 16px; }
.st-group-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 8px; }
.st-group-head .eyebrow { margin: 0; }
/* The fold button at the right of each group's label: tap folds, hold drags the group (no scrolling, selecting or callout while held) */
.st-fold { flex: none; display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: var(--r-sm); background: none; color: var(--muted); cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; transition: background var(--t-out) var(--ease-out), color var(--t-out) var(--ease-out); }
@media (hover: hover) { .st-fold:hover { background: var(--panel-2); color: var(--text); } }
.st-group.st-dragging { position: relative; z-index: 5; border-radius: var(--r-sm); background: var(--bg); box-shadow: 0 0 0 8px var(--bg), var(--shadow-2); }
.st-group.st-dragging .st-fold { cursor: grabbing; background: var(--panel-2); color: var(--accent); }
.st-about { font-size: 12px; line-height: 1.3; color: var(--muted); }
.cmd-tip { position: fixed; z-index: var(--z-tip); pointer-events: none; display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: var(--radius); background: var(--panel-2); border: 1px solid var(--border); color: var(--text); font-size: 13px; box-shadow: var(--shadow-2); opacity: 0; transform: translateY(4px); transition: opacity var(--t-out) var(--ease-out), transform var(--t-out) var(--ease-out); }
.cmd-tip.on { opacity: 1; transform: none; }
.cmd-tip code { font-family: ui-monospace, 'JetBrains Mono', Menlo, monospace; font-size: 12px; color: var(--text); white-space: nowrap; }
.cmd-tip-k { font-weight: 700; color: var(--text); } /* the same look as every tooltip: a bold first line, then the details */
@media (hover: none) { .cmd-tip { display: none; } }
.staff-col .sub-head { margin-top: 0; white-space: nowrap; }
.staff-list { display: flex; flex-direction: column; gap: 8px; }
.st-tile { flex-direction: row; gap: 12px; padding: 12px 14px; }
:is(.staff-list, .ld-st-tiles) .st-tile { padding: 10px 12px; }
:is(.staff-list, .ld-st-tiles) .st-glyph svg { width: 32px; height: 32px; }
:is(.staff-list, .ld-st-tiles) .st-head h3 { font-size: 16px; }
.home-actions .st-tile { align-items: center; }
.st-short { display: none; }
/* Phones: the Profile Hub is one row of round icons with short labels */
@media (max-width: 759px) {
  .home-actions { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
  .home-actions .hub-title { grid-column: 1 / -1; }
  .home-actions .st-tile { flex-direction: column; justify-content: flex-start; gap: 6px; padding: 0; background: none; border: 0; box-shadow: none; min-width: 0; }
  .home-actions .st-glyph { width: 56px; height: 56px; padding: 0; align-self: center; border: 1.5px solid color-mix(in srgb, var(--accent) 55%, var(--border)); border-radius: 50%; background: var(--panel-2); transition: transform var(--t-tap) var(--ease-out), border-color var(--t-out) var(--ease-out); }
  .home-actions .st-glyph svg { width: 26px; height: 26px; }
  .home-actions .st-tile:active .st-glyph { transform: scale(.92); border-color: var(--accent); }
  .home-actions .st-text { display: none; }
  .home-actions .st-short { display: block; font-size: 12px; font-weight: 600; color: var(--text); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
}
/* XP and Levels off: no Server Card, so the Profile Hub is a full-width grid of big tiles that rise in one by one */
.home-grid.no-card { grid-template-columns: minmax(0, 1fr); }
.home-actions.hub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.hub-grid .hub-title { grid-column: 1 / -1; }
.hub-grid .st-tile { flex-direction: column; align-items: flex-start; gap: 14px; padding: 20px; min-height: 168px; animation: hub-rise var(--t-in) var(--ease-ios) backwards; animation-delay: calc(var(--i) * 40ms); }
.hub-grid .st-glyph { align-self: flex-start; padding: 0 0 12px; border-right: 0; border-bottom: 3px solid var(--accent); }
.hub-grid .st-glyph svg { width: 44px; height: 44px; }
.hub-grid .st-text h3 { font-size: 22px; }
@keyframes hub-rise { from { opacity: 0; transform: translateY(12px) scale(.98); } }
@media (prefers-reduced-motion: reduce) { .hub-grid .st-tile { animation: none; } }
@media (max-width: 759px) {
  .home-actions.hub-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .hub-grid .st-tile { flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 16px 10px; min-height: 0; background: var(--panel); border: 1px solid var(--border); border-radius: var(--r-md, 12px); box-shadow: var(--shadow-1, none); }
  .hub-grid .st-glyph { align-self: center; width: 64px; height: 64px; padding: 0; border: 1.5px solid color-mix(in srgb, var(--accent) 55%, var(--border)); border-radius: 50%; background: var(--panel-2); }
  .hub-grid .st-glyph svg { width: 30px; height: 30px; }
  .hub-grid .st-short { font-size: 14px; }
}
/* Tile glyphs: big and white, no box; an accent bar divides them from the text. */
.st-tile::before { display: none; }
.st-tile { align-items: center; }
.st-glyph { flex: 0 0 auto; display: grid; place-items: center; align-self: stretch; padding-right: 14px; color: var(--glyph); border-right: 3px solid var(--accent); }
.st-glyph svg { width: 38px; height: 38px; }
.soon-tile .st-glyph { color: var(--muted); border-right-color: var(--dim); }
.st-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.st-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.st-head h3 { font-size: 18px; }
.setup-slot { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 8px 16px; align-items: start; padding-top: 12px; border-top: 1px solid var(--border); }
.setup-slot:first-of-type { border-top: 0; padding-top: 0; }
.lv-list { display: grid; gap: 8px; }
.hist-item.rj-item { flex-direction: column; align-items: stretch; gap: 0; padding: 0; }
.rj-top { display: flex; width: 100%; align-items: center; gap: 8px; padding-right: 8px; }
.rj-head { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r-sm); width: auto; }
.rj-head img, .rj-head .ph { width: 32px; height: 32px; border-radius: 50%; background: var(--panel-2); flex: 0 0 auto; }
.rj-edit { padding: 0 14px 12px; }
.lv-row { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.setup-slot .search-wrap { margin-bottom: 0; max-width: none; } /* lines up with the dropdown beside it */
.setup-slot ~ .stack > .setup-slot:first-of-type { border-top: 1px solid var(--border); padding-top: 12px; } /* a group of slots after other slots (Delete's Only from / Skip) keeps its divider */
.setup-label { display: flex; flex-direction: column; gap: 2px; }
.num-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; } /* "5 messages in 5 seconds": short numbers inline with their words */
.num-line input { width: 64px; flex: none; }
.num-line span { color: var(--muted); }
.num-unit { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.num-unit > input { width: 96px; flex: none; } /* numBox with its unit word: a short box, like the length picker's */
.num-line .num-unit > input { width: 64px; }
.plan-row > input[type='number'] { width: 96px; flex: none; } /* Owner Console → Money: plan settings */
.plan-row > input[type='text'] { width: min(260px, 50%); flex: none; }
.rec-stat b.good-text { color: var(--good); } /* Owner Console → Money: profit */
.rec-stat b.bad-text { color: var(--bad); } /* and loss */
/* Filters: the chat preview (Fast Messages, Repeated Messages, Caps), built from the draft */
.flt-pv { padding-bottom: 6px; }
.flt-pv .dc-msg { padding: 8px 16px 2px; }
.flt-pv .dc-msg.dc-cont { padding: 1px 16px 1px 70px; }
.flt-av { display: grid; place-items: center; background: #5865f2; color: #fff; font-weight: 700; font-size: 16px; }
.flt-run { padding: 8px 16px 2px; }
.flt-who { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.flt-who .flt-av { width: 28px; height: 28px; font-size: 13px; }
.flt-rows { position: relative; display: grid; gap: 4px; }
.flt-rows.braced { padding-left: 84px; }
/* the bracket: from message 1 to the last, with what links them in its middle */
.flt-brace { position: absolute; left: 0; top: 4px; bottom: 4px; width: 76px; display: flex; align-items: center; justify-content: center; }
.flt-brace::before { content: ''; position: absolute; left: 50%; right: 0; top: 0; bottom: 0; border: 2px solid var(--accent); border-right: 0; border-radius: 6px 0 0 6px; }
.flt-brace span { position: relative; padding: 2px 4px; background: #313338; color: #ffb27a; font-size: 11px; font-weight: 700; text-align: center; line-height: 1.2; }
.flt-row { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.flt-num { flex: none; width: 66px; font-size: 11.5px; color: #949ba4; white-space: nowrap; }
.flt-body { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.flt-tag { font-size: 11px; font-weight: 600; padding: 1px 6px; border-radius: 4px; background: #2b2d31; color: #949ba4; white-space: nowrap; }
.flt-tag.hit { background: color-mix(in srgb, var(--accent) 22%, #2b2d31); color: #ffb27a; }
.flt-verdict { margin: 8px 12px 0; padding: 6px 0 4px; border-radius: var(--r-sm); border-left: 3px solid; }
.flt-verdict.pass { border-color: #23a55a; background: rgba(35, 165, 90, .12); }
.flt-verdict.bad { border-color: #f23f43; background: rgba(242, 63, 67, .12); }
.flt-vlabel { padding: 0 12px; font-size: 12px; font-weight: 700; }
.flt-verdict.pass .flt-vlabel { color: #57d48c; }
.flt-verdict.bad .flt-vlabel { color: #ff7a7d; }
.flt-verdict .flt-run { padding: 6px 12px 2px; }
.flt-outcome { margin: 8px 16px 0; padding: 6px 10px; border-left: 3px solid var(--accent); background: #2b2d31; border-radius: 0 4px 4px 0; font-size: 13.5px; }
.flt-gone { padding: 0 16px 6px 70px; }
.flt-pv-under { padding-top: 12px; border-top: 1px solid var(--border); }
/* The draft mark: a name with the accent Changed tag beside it while it differs from what is saved (a row's border tints too) */
:is(.cmd-item, .hist-item, .ai-model-row) { transition: border-color var(--t-out) var(--ease-out); }
:is(.cmd-item, .hist-item, .ai-model-row, .cb-area).dirty { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
.name-line { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; min-width: 0; }
.chg-mark { display: inline-flex; flex: none; }
.chg-mark:empty { display: none; }
@media (max-width: 759px) { .setup-slot { grid-template-columns: 1fr; } }
.drop-item.has-tag { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-weight: 700; }
.drop-tag { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.pair-picks { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; align-items: start; }
@media (max-width: 759px) { .pair-picks { grid-template-columns: 1fr; } }
.setup-bar { position: sticky; bottom: 12px; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 16px; padding: 12px 14px; border-radius: var(--radius); background: var(--panel-2); border: 1px solid var(--border); box-shadow: var(--shadow-2); }
@media (max-width: 759px) { .setup-bar { bottom: 74px; } }
.sq-alert-row + .sq-alert-row { padding-top: 10px; border-top: 1px solid var(--border); }
.sq-list { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
@media (max-width: 899px) { .sq-list { grid-template-columns: 1fr; } }
.sq-card { cursor: pointer; transition: border-color var(--t-out) var(--ease-out); }
.sq-card:focus-visible { border-color: var(--accent); outline: none; }
@media (hover: hover) { .sq-card:hover { border-color: var(--accent); outline: none; } }
.sq-card .sq-card-head { cursor: pointer; flex-wrap: wrap; row-gap: 6px; }
.sq-card-head .sw-label { margin-left: auto; }
.sq-tagline { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; min-height: 18px; }
.sq-tagline span { font-size: 11px; padding: 1px 6px; border-radius: var(--r-pill); background: var(--panel-2); border: 1px solid var(--border); color: var(--muted); }
button.sq-cell { cursor: pointer; }
@media (hover: hover) { button.sq-cell:hover { border-color: var(--accent); } }
.sheet-actions { display: flex; justify-content: flex-end; align-items: center; gap: 8px; flex-wrap: wrap; }
.sheet-left { margin-right: auto; }
.sq-slot.me { cursor: pointer; }
.sq-slot.filled { padding: 0; }
.sq-open { width: 100%; height: 100%; min-height: 130px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 12px 8px; border: 0; background: transparent; color: var(--text); font: inherit; cursor: pointer; }
.sq-open img, .sq-open .ph { width: 64px; height: 64px; border-radius: 50%; background: var(--panel-2); display: grid; place-items: center; font-family: var(--font-head); font-weight: 700; font-size: 26px; color: var(--accent); }
.sq-open .n { font-weight: 700; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sq-x { position: absolute; top: 6px; right: 6px; width: 32px; height: 32px; border-radius: var(--r-sm); display: grid; place-items: center; font-size: 20px; line-height: 1; color: var(--text); background: var(--panel-2); border: 1px solid var(--border); cursor: pointer; transition: background var(--t-out) var(--ease-out), color var(--t-out) var(--ease-out); }
@media (hover: hover) { .sq-x:hover { background: var(--bad); border-color: var(--bad); color: var(--on-bad); } }
.stats-pop { position: fixed; z-index: var(--z-pop); width: min(460px, calc(100vw / var(--z) - 16px)); display: flex; flex-direction: column; gap: 8px; padding: 10px; border-radius: var(--radius); background: var(--panel); border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--border)); box-shadow: var(--shadow-4); animation: drop-in var(--t-in) var(--ease-ios) both; }
.stats-pop.leaving { animation: drop-out var(--t-out) var(--ease-out) both; pointer-events: none; }
.stats-pop .pic img { width: 100%; height: auto; display: block; border-radius: var(--r-sm); }
.stats-pop .pic { min-height: 120px; }
.notes-add.row { flex-wrap: nowrap; }
.notes-add.row .search-wrap { flex: 1; min-width: 0; }
.sq-card { border-radius: var(--radius); background: var(--panel); border: 1px solid var(--border); padding: 12px 14px 14px; }
.sq-card-head { display: flex; align-items: center; gap: 8px; padding: 0 0 10px; }
.sq-card-head h3 { font-size: 20px; }
/* Disclosure chevrons (chev() in app.js): point down, turn up while the row is open */
.chev { flex: 0 0 auto; display: grid; place-items: center; color: var(--muted); transition: transform var(--t-out) var(--ease-out); }
.chev svg { width: 18px; height: 18px; }
[aria-expanded='true'] > .chev { transform: rotate(180deg); transition: transform var(--t-in) var(--ease-ios); }
.sum-head > .chev, .cb-head > .chev, .cb-area-head > .chev { margin-left: auto; }
.sq-row { display: grid; gap: 12px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 599px) { .sq-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.sq-cell { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 8px; border-radius: var(--r-sm); background: var(--bg); border: 1px solid var(--border); color: var(--text); font: inherit; text-align: center; min-width: 0; }
.sq-cell img, .sq-cell .ph { width: 64px; max-width: 100%; height: auto; aspect-ratio: 1; border-radius: 50%; object-fit: cover; display: grid; place-items: center; background: var(--panel-2); font-family: var(--font-head); font-weight: 700; font-size: 26px; color: var(--accent); }
.sq-cell .n { font-weight: 700; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sq-cell.empty { border-style: dashed; color: var(--muted); justify-content: center; }
.sq-cell .plus { font-size: 22px; line-height: 1; }
.sum-saved { display: flex; flex-direction: column; gap: 8px; }
.sum-card { gap: 0; padding: 0; }
.sum-head { display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
.sum-body { display: flex; padding: 0 14px 14px; }
.log-list { display: flex; flex-direction: column; gap: 8px; }
.log-card { position: relative; padding: 10px 14px 10px 16px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--border); overflow: hidden; }
.log-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--log); }
.log-time { margin-bottom: 4px; }
.log-embed + .log-embed { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border); }
.log-title { font-weight: 700; margin-bottom: 2px; }
.log-fields { display: grid; gap: 6px 12px; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); margin-top: 6px; font-size: 13px; }
.log-card .dc-body { font-size: 14.5px; }
.staff-logs .log-card { padding: 7px 9px 7px 11px; }
.staff-logs .log-card .dc-body { font-size: 12px; line-height: 1.35; }
.staff-logs .log-time { font-size: 11px; margin-bottom: 2px; }
.log-card .dc-mention { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--text); }
.st-tag { height: 18px; font-size: 11px; padding: 0 6px; }
@media (max-width: 1100px) { .staff-layout { grid-template-columns: 1fr; } .staff-logs { margin-top: 16px; } }
@media (max-width: 899px) { .staff-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.staff-seg { display: none; }
@media (max-width: 759px) {
  .staff-cols { grid-template-columns: 1fr; }
  /* Setup / Moderation / Community / Battle Buddy: the tab bar over one column at a time (tap or swipe) */
  .staff-seg { display: flex; margin-bottom: 16px; }
  .staff-seg button { flex: 1 1 auto; padding: 0 6px; font-size: 13px; letter-spacing: .02em; } /* four tabs fit across a phone */
  .staff-tools .staff-col.off { display: none; }
  .staff-tools .staff-col > .sub-head { display: none; }
  /* phones: three tools a row, each stacked (icon, name, description); the front page's tiles too */
  :is(.staff-list, .ld-st-tiles) { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  :is(.staff-list, .ld-st-tiles) .st-tile { flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 6px; padding: 10px 8px; }
  :is(.staff-list, .ld-st-tiles) .st-glyph { align-self: flex-start; padding: 0 0 6px; border-right: 0; border-bottom: 3px solid var(--accent); }
  :is(.staff-list, .ld-st-tiles) .soon-tile .st-glyph { border-bottom-color: var(--dim); }
  :is(.staff-list, .ld-st-tiles) .st-glyph svg { width: 22px; height: 22px; }
  :is(.staff-list, .ld-st-tiles) .st-head h3 { font-size: 13px; line-height: 1.2; }
  :is(.staff-list, .ld-st-tiles) .st-head { gap: 4px 6px; }
  :is(.staff-list, .ld-st-tiles) .st-tag { font-size: 11px; padding: 1px 6px; }
  :is(.staff-list, .ld-st-tiles) .st-about { font-size: 11px; line-height: 1.25; }
}
.soon-tile::before { background: var(--dim); }
.member-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.member-head .big-avatar { margin: 0; }
.member-head-text { flex: 1; min-width: 200px; display: flex; flex-direction: column; gap: 2px; }
.member-head-text h2 { font-size: 26px; }
.um-name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.um-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.member-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.member-chips .chip { padding: 5px 10px; font-size: 13px; }
.chip.warn { border-color: var(--bad); color: var(--bad); }
.hist-panel { gap: 8px; }
.hist-title { margin: 6px 0 0; }
.hist-list { display: flex; flex-direction: column; gap: 6px; }
.hist-item { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border-radius: var(--r-sm); background: var(--bg); border: 1px solid var(--border); }
.hist-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; overflow-wrap: anywhere; }
.post-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.post-row .choice { flex: 1 1 220px; min-width: 0; }
.two { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
.tr-add-row { display: grid; gap: 12px; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-areas: 'tier goal target'; }
.tr-add-row .tr-tier { grid-area: tier; } .tr-add-row .tr-goal { grid-area: goal; } .tr-add-row .tr-target { grid-area: target; }
.tr-add-row .field { min-width: 0; }
@media (max-width: 599px) { .tr-add-row { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-areas: 'tier target' 'goal goal'; } }

/* Staff tools: lists, editors, Discord preview, clips, invites */
.link-item { color: var(--text); text-decoration: none; cursor: pointer; text-align: left; font: inherit; width: 100%; transition: border-color var(--t-out) var(--ease-out); }
@media (hover: hover) { .link-item:hover { border-color: var(--accent); } }
.link-plain { color: var(--text); text-decoration: none; }
.mono { font-family: ui-monospace, 'JetBrains Mono', Menlo, monospace; letter-spacing: .02em; }
.accent-text { color: var(--accent); font-weight: 600; }
.btn.disabled { opacity: .45; pointer-events: none; }
.hist-snip { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.an-thumb { width: 64px; height: 64px; object-fit: cover; border-radius: var(--r-sm); flex: 0 0 auto; background: var(--panel-2); }
.msg-text { min-height: 160px; font-family: var(--font-body); line-height: 1.45; }
.ad-item { align-items: center; }
.msg-foot { justify-content: space-between; align-items: flex-start; flex-wrap: nowrap; gap: 12px; }
.msg-foot > .muted { flex: 0 0 auto; padding-top: 6px; white-space: nowrap; }
.dc-preview { border-radius: var(--radius); background: #313338; border: 1px solid #1e1f22; overflow: hidden; color: #dbdee1; font-family: 'gg sans', 'Noto Sans', var(--font-body); }
.dc-channel { padding: 10px 16px; border-bottom: 1px solid #26272b; color: #f2f3f5; font-weight: 700; font-size: 15px; }
.dc-msg { display: flex; gap: 14px; padding: 14px 16px 16px; }
/* A follow-up message from the same sender (the text after an announcement's picture): no name, lined up under the first. */
.dc-msg:has(+ .dc-cont) { padding-bottom: 4px; }
.dc-msg.dc-cont { padding-top: 0; padding-left: 70px; }
.dc-avatar { width: 40px; height: 40px; border-radius: 50%; flex: 0 0 auto; }
.dc-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.dc-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.dc-name, .dcx-name { color: #f2f3f5; font-weight: 600; font-size: 15.5px; }
.dc-app { display: inline-flex; align-items: center; height: 15px; padding: 0 4px; border-radius: 3px; background: #5865f2; color: #fff; font-size: 10px; font-weight: 600; letter-spacing: .02em; }
.dc-time { color: #949ba4; font-size: 12px; margin-left: 2px; }
.dc-body { font-size: 15.5px; line-height: 1.375; overflow-wrap: anywhere; }
.dc-body.muted { color: #949ba4; }
.dc-body a { color: #00a8fc; }
.dc-body code { background: #2b2d31; border-radius: 4px; padding: 1px 4px; font-size: 85%; font-family: ui-monospace, Menlo, monospace; }
.dc-pre { background: #2b2d31; border: 1px solid #1e1f22; border-radius: 4px; padding: 8px; margin: 4px 0; white-space: pre-wrap; font-size: 13.5px; font-family: ui-monospace, Menlo, monospace; }
.dc-h1, .dc-h2, .dc-h3 { color: #f2f3f5; font-weight: 700; line-height: 1.25; margin: 6px 0 2px; }
.dc-h1 { font-size: 24px; } .dc-h2 { font-size: 20px; } .dc-h3 { font-size: 16px; }
.dc-sub { color: #949ba4; font-size: 12.5px; }
.dc-quote { border-left: 4px solid #4e5058; padding-left: 10px; }
.dc-li { position: relative; padding-left: 18px; }
.dc-li::before { content: '•'; position: absolute; left: 4px; }
.dc-li.num::before { content: attr(data-n); left: 0; }
.dc-mention { background: rgba(88, 101, 242, .3); color: #c9cdfb; border-radius: 3px; padding: 0 2px; font-weight: 500; }
.dc-stamp { background: rgba(255, 255, 255, .06); border-radius: 3px; padding: 0 2px; }
.dc-emoji { width: 22px; height: 22px; vertical-align: -5px; object-fit: contain; }
.dc-spoiler { background: #1e1f22; color: transparent; border-radius: 3px; cursor: pointer; }
.dc-spoiler.open { background: rgba(255, 255, 255, .1); color: inherit; }
.dc-embed { border-left: 4px solid #f97316; background: #2b2d31; border-radius: 4px; padding: 10px 14px 12px; max-width: 520px; }
.dc-embed.rich { display: flex; flex-direction: column; gap: 8px; }
.dc-embed-grid { display: flex; gap: 14px; align-items: flex-start; }
.dc-embed-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.dc-embed-author { display: flex; align-items: center; gap: 8px; color: #f2f3f5; font-size: 14px; font-weight: 600; }
.dc-embed-author img { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }
.dc-embed-title { color: #f2f3f5; font-weight: 700; font-size: 16px; overflow-wrap: anywhere; }
.dc-embed-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.dc-embed-field { grid-column: 1 / -1; font-size: 14px; }
.dc-embed-field.in { grid-column: auto; }
.dc-embed-field b { color: #f2f3f5; display: block; margin-bottom: 2px; }
.dc-embed-thumb { width: 80px; height: 80px; border-radius: 4px; object-fit: cover; flex: 0 0 auto; }
.dc-embed-image { display: block; max-width: 100%; max-height: 300px; border-radius: 4px; object-fit: contain; align-self: flex-start; }
.dc-embed-foot { color: #b5bac1; font-size: 12px; }
@media (max-width: 480px) { .dc-embed-thumb { width: 56px; height: 56px; } }
.ph-menu { left: 0; right: auto; width: min(300px, calc(100vw - 48px)); padding: 12px; transform-origin: 0 0; }
.ph-actions { justify-content: flex-end; }
.wel-split { display: flex; flex-direction: column; gap: 12px; }
@media (min-width: 1101px) {
  /* Embed: the message shrinks to the left half and the embed settings take the right half (the columns glide). */
  .wel-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0fr); column-gap: 0; row-gap: 0; align-items: start; transition: grid-template-columns var(--t-in) var(--ease-ios), column-gap var(--t-in) var(--ease-ios); }
  .wel-split.split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 16px; }
  .wel-split .wel-embed { border-top: 0; padding-top: 0; min-width: 0; }
  .wel-split .wel-grid { grid-template-columns: minmax(0, 1fr); }
}
main.staff-app .tool-side-col .tool-side { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.tool-side .dc-embed { max-width: none; }
/* Delete after: Minutes slides in beside the dropdown (1.2.106) */
.wel-del { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0fr); column-gap: 0; align-items: end; transition: grid-template-columns var(--t-in) var(--ease-ios), column-gap var(--t-in) var(--ease-ios); }
.wel-del.mins { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 12px; }
.wel-del .wel-mins { min-width: 0; overflow: hidden; white-space: nowrap; opacity: 0; transition: opacity var(--t-in) var(--ease-ios); }
.wel-del.mins .wel-mins { opacity: 1; }
.wel-del .wel-mins input { width: 100%; min-width: 0; }
.wel-embed { border-top: 1px solid var(--border); padding-top: 12px; }
.wel-grid { display: grid; gap: 12px; align-items: start; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 480px) { .wel-grid { grid-template-columns: 1fr; } }
.cp-wrap { position: relative; align-self: flex-start; }
.cp-pick { padding: 6px 14px 6px 6px; font-size: 13px; font-family: ui-monospace, Menlo, monospace; transition: border-color var(--t-out) var(--ease-out), transform var(--t-tap) var(--ease-out); }
.cp-pick:active { transform: scale(.965); }
.cp-pick .cp-dot { width: 26px; height: 26px; transition: background var(--t-out) var(--ease-out); }
.cp-wrap:has(.drop-menu:not(.hide):not(.leaving)) .cp-pick { border-color: var(--accent); }
.drop-menu.cp-menu { left: 0; right: auto; width: 252px; gap: 8px; padding: 10px; transform-origin: 0 0; }
.cp-palette { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cp-menu .cp-slot { border-radius: 50%; transition: transform var(--t-tap) var(--ease-out), border-color var(--t-out) var(--ease-out); }
@media (hover: hover) { .cp-menu .cp-slot:hover { transform: scale(1.08); } }
.cp-sv { position: relative; height: 150px; border-radius: var(--radius); cursor: crosshair; touch-action: none; box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
.cp-hue { position: relative; height: 14px; border-radius: var(--r-pill); cursor: pointer; touch-action: none; margin: 2px 0; background: linear-gradient(to right, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00); box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
.cp-knob { position: absolute; width: 18px; height: 18px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.35), 0 2px 6px rgba(0,0,0,.45); transform: translate(-50%, -50%); pointer-events: none; transition: left var(--t-in) var(--ease-ios), top var(--t-in) var(--ease-ios), width var(--t-tap) var(--ease-out), height var(--t-tap) var(--ease-out); }
.cp-hue .cp-knob { top: 50%; }
.dragging .cp-knob { transition: width var(--t-tap) var(--ease-out), height var(--t-tap) var(--ease-out); width: 22px; height: 22px; }
.cp-menu .cp-now { width: 36px; height: 36px; border-radius: 50%; transition: background var(--t-out) var(--ease-out); }
.drop-menu.cp-menu { border-color: color-mix(in srgb, var(--accent) 55%, var(--border)); }
.cp-menu .cp-row input[type=text] { min-width: 0; font-family: ui-monospace, Menlo, monospace; }
.cp-menu .cp-shared { display: flex; flex-direction: column; gap: 8px; padding-top: 10px; border-top: 1px solid var(--border); }
.cp-menu .cp-slots { grid-template-columns: repeat(7, 1fr); }
.cp-menu .cp-slot.empty { font-size: 13px; line-height: 1; }
.cp-field { display: flex; flex-direction: column; gap: 4px; }
.drop-zone { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 76px; padding: 12px; border: 2px dashed var(--border); border-radius: var(--r-sm); color: var(--muted); text-align: center; cursor: pointer; transition: border-color var(--t-out) var(--ease-out), background var(--t-out) var(--ease-out); }
.drop-zone.over { border-color: var(--accent); color: var(--text); }
@media (hover: hover) { .drop-zone:hover { border-color: var(--accent); color: var(--text); } }
.drop-zone.over { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.drop-zone img { width: 52px; height: 52px; object-fit: cover; border-radius: var(--r-sm); flex: 0 0 auto; }
.wel-foot { align-items: flex-end; flex-wrap: nowrap; gap: 12px; }
.wel-foot > .field:first-child { flex: 1; min-width: 0; }
.wel-ts { flex: 0 0 auto; align-items: center; }
.wel-ts .switch { margin: 6px 0; }
.dc-media img, .dc-media video { display: block; max-width: min(100%, 420px); max-height: 340px; border-radius: 8px; }
.clip { display: block; width: 100%; max-width: 720px; aspect-ratio: 16 / 9; border: 0; border-radius: var(--radius); background: #000; }
.runner + .runner { border-top: 1px solid var(--border); padding-top: 14px; }
.inv-row { align-items: center; }
.inv-rank { width: 26px; flex: 0 0 auto; text-align: center; font-family: var(--font-head); font-weight: 700; font-size: 18px; color: var(--muted); }
.hist-av img, .hist-av .ph { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; object-fit: cover; background: var(--panel-2); font-family: var(--font-head); font-weight: 700; color: var(--accent); }
.post-row > input { flex: 1 1 120px; min-width: 0; }
.sum-text { display: flex; flex-direction: column; gap: 6px; }
.sum-text p { margin: 0; padding-left: 16px; position: relative; line-height: 1.5; }
.sum-text p::before { content: ''; position: absolute; left: 2px; top: .62em; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.cmd-section { display: flex; flex-direction: column; gap: 8px; }
.cmd-group h3 { font-size: 18px; }
.cmd-row { display: grid; grid-template-columns: minmax(0, 280px) minmax(0, 1fr) auto; gap: 12px; align-items: baseline; padding: 6px 0; border-top: 1px solid var(--border); }
.cmd-row:first-of-type { border-top: 0; }
.cmd-row code { color: var(--accent); font-weight: 700; overflow-wrap: anywhere; }
@media (max-width: 599px) { .cmd-row { grid-template-columns: 1fr auto; } .cmd-row > span:not(.tag) { grid-column: 1 / -1; } }
.about-hero { display: flex; gap: 16px; align-items: center; }
.about-hero .about-sum { margin: 8px 0 0; }
.cmds-block { margin-top: 12px; }
.about-hero img { width: 96px; height: 96px; border-radius: 50%; flex: 0 0 auto; }
.about-grid { margin: 16px 0; }
.about-notes { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }

/* The site's own dropdown (choice() in app.js) in place of <select>. */
.choice { position: relative; }
:is(.panel, .cascade, .party-settings, .field):has(.drop-menu:not(.hide)) { position: relative; z-index: calc(var(--z-banner) + 1); } /* an open dropdown sits above the cards after it */
.choice-btn { width: 100%; min-height: 40px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px; border-radius: var(--r-sm); border: 1px solid var(--border); background: var(--bg); color: var(--text); cursor: pointer; text-align: left; font-size: 15px; }
@media (hover: hover) { .choice-btn:hover:not(:disabled) { border-color: var(--muted); } }
.choice-btn[aria-expanded='true'], .choice:has(.drop-menu:not(.hide):not(.leaving)) .choice-btn { border-color: var(--accent); }
.choice-btn:disabled { opacity: .45; cursor: not-allowed; }
.choice-btn svg { width: 18px; height: 18px; flex: 0 0 auto; color: var(--muted); transition: transform var(--t-in) var(--ease-spring); }
.choice:has(.drop-menu:not(.hide):not(.leaving)) .choice-btn svg { transform: rotate(180deg); }
.choice-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.choice-menu { left: 0; right: 0; min-width: 0; max-height: min(calc(46vh / var(--z)), 320px); overflow-y: auto; transform-origin: 50% 0; }
.choice-menu .drop-item { font-family: inherit; font-weight: 500; font-size: 15px; }
.sort-row { display: flex; align-items: center; gap: 4px; }
.sort-row .drop-item { flex: 1; white-space: nowrap; }
.drop-menu:has(.sort-row) { min-width: 220px; }
/* the house time and date pickers (timePick, datePick): menus of choice() rows */
.time-menu, .date-menu { right: auto; max-height: none; overflow: visible; transform-origin: 0 0; }
.time-menu { min-width: 216px; }
.date-menu { width: 280px; }
.tp-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.tp-col { display: flex; flex-direction: column; gap: 2px; max-height: 216px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; }
.tp-col::-webkit-scrollbar { display: none; }
.tp-col .drop-item, .dp-days .drop-item { text-align: center; padding: 8px 4px; font-variant-numeric: tabular-nums; }
.tp-col .drop-item.on, .dp-days .drop-item.on { background: var(--accent); color: var(--accent-ink); }
.dp-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-bottom: 4px; }
.dp-nav { width: 32px; height: 32px; }
.dp-nav svg { width: 16px; height: 16px; }
.dp-week, .dp-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.dp-week span { text-align: center; font-size: 12px; font-weight: 600; color: var(--muted); padding: 2px 0; }
.dp-days .drop-item.today:not(.on) { color: var(--accent); }
.dp-clear { margin-top: 4px; text-align: center; color: var(--muted); }
.rev { width: 32px; height: 32px; flex: 0 0 auto; background: transparent; border-color: transparent; color: var(--muted); }
.rev svg { width: 16px; height: 16px; transition: transform var(--t-in) var(--ease-spring); }
.rev.flip svg { transform: rotate(180deg); }

/* ---------- motion: dropdowns and the attachment picker ---------- */
.drop-menu, .search-drop:not(.hide) { animation: drop-in var(--t-in) var(--ease-spring) both; }
.drop-menu { transform-origin: 100% 0; }
.search-drop:not(.hide) { transform-origin: 50% 0; }
.drop-menu.leaving { animation: drop-out var(--t-out) var(--ease-out) both; pointer-events: none; }
.search-drop.leaving { animation: drop-out var(--t-out) var(--ease-out) both; pointer-events: none; }
@keyframes drop-in { from { opacity: 0; scale: .94; } }
@keyframes drop-out { to { opacity: 0; scale: .96; } }

/* ---------- motion: lists cascade in when a page opens ---------- */
.cascade { animation: item-in var(--t-in) var(--ease-ios) backwards; animation-delay: calc(var(--i, 0) * var(--stagger)); }
@keyframes item-in { from { opacity: 0; transform: translateY(10px) scale(.985); } }

/* ---------- motion: chat bubbles, toasts ---------- */
.bubble, .bot-line, .gmsg { animation: bubble-in var(--t-in) var(--ease-ios) both; }
.bot-line > .bubble { animation: none; } /* the line brings its bubble in once */
.bubble.me { transform-origin: 100% 100%; }
.bot-line, .bubble.bot { transform-origin: 0 100%; }
@keyframes bubble-in { from { opacity: 0; transform: translateY(8px) scale(.96); } }
.toast { animation: toast-in var(--t-in) var(--ease-spring) both; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 14px) scale(.96); } }
.toast.leaving { animation: toast-out var(--t-out) var(--ease-out) forwards; pointer-events: none; }
@keyframes toast-out { to { opacity: 0; transform: translate(-50%, 8px) scale(.96); } }

/* ---------- motion: sheets and pop-ups spring up; the backdrop blurs in ---------- */
.sheet-backdrop { animation: veil-in var(--t-in) var(--ease-ios) both; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.sheet { animation: pop-in var(--t-in) var(--ease-ios) both; }
.sheet-backdrop.leaving { animation: veil-out var(--t-out) var(--ease-out) both; }
.sheet-backdrop.leaving .sheet { animation: pop-out var(--t-out) var(--ease-out) both; } /* leaves the way it came */
/* Phones: every pop-up is one style: in the middle of the screen, in the member's Server Card look (theme + still
   wallpaper, sheet() dresses it), buttons stacked full width that cascade in after it. Confirmations are the small ones. */
@media (max-width: 759px) {
  .sheet-backdrop { place-items: center; padding: 16px; }
  .sheet-backdrop .sheet { border-radius: var(--r-xl); padding: 22px 18px 18px; }
  .sheet-backdrop.confirm .sheet { width: min(100%, 290px); padding: 28px 20px 20px; gap: 12px; text-align: center; }
  .sheet-backdrop.confirm .sheet h2 { font-size: 20px; margin: 0; }
  .sheet-backdrop.confirm .sheet p { margin: 0; }
  /* buttons stacked, the main one on top and Cancel at the bottom; they cascade in after the pop-up */
  .sheet-backdrop .sheet-actions { flex-direction: column-reverse; flex-wrap: nowrap; align-items: stretch; gap: 8px; margin-top: 12px; }
  .sheet-backdrop .sheet-actions .btn { width: 100%; min-width: 0; min-height: 48px; border-radius: var(--r-sm); animation: item-in var(--t-in) var(--ease-ios) both; }
  .sheet-backdrop .sheet-left { order: 99; margin-right: 0; } /* opts.left (e.g. the squad editor's bell): above the buttons */
  /* Show off, top to bottom: Animated, Static, Download, Cancel */
  .sheet-backdrop .sheet-actions.show-acts { flex-direction: column; }
  .show-acts .act-anim { order: 1; animation-delay: calc(var(--lead) + 1 * var(--stagger)) !important; }
  .show-acts .act-static { order: 2; animation-delay: calc(var(--lead) + 2 * var(--stagger)) !important; }
  .show-acts .act-dl { order: 3; animation-delay: calc(var(--lead) + 3 * var(--stagger)) !important; }
  .show-acts .act-cancel { order: 4; animation-delay: calc(var(--lead) + 4 * var(--stagger)) !important; margin-top: 16px; } /* a clear gap above Cancel */
  .sheet-backdrop .sheet-actions .btn:nth-last-child(1) { animation-delay: calc(var(--lead) + 1 * var(--stagger)); }
  .sheet-backdrop .sheet-actions .btn:nth-last-child(2) { animation-delay: calc(var(--lead) + 2 * var(--stagger)); }
  .sheet-backdrop .sheet-actions .btn:nth-last-child(3) { animation-delay: calc(var(--lead) + 3 * var(--stagger)); }
  .sheet-backdrop .sheet-actions .btn:nth-last-child(4) { animation-delay: calc(var(--lead) + 4 * var(--stagger)); }
  .sheet-backdrop .sheet-actions .btn:nth-last-child(n+5) { animation-delay: calc(var(--lead) + 5 * var(--stagger)); }
  .sheet-backdrop.leaving .sheet-actions .btn { animation: none; }
  /* Player Notes editor: smaller than the screen (narrower, shorter, compact avatar, text box and pills) */
  .sheet.note-ed { width: min(100%, 380px); max-height: calc(72vh / var(--z)); padding: 14px 14px 14px; gap: 8px; }
  .sheet.note-ed h2 { font-size: 18px; margin: 0; }
  .sheet.note-ed .big-avatar { margin: 0; }
  .sheet.note-ed .big-avatar img, .sheet.note-ed .big-avatar .ph { width: 56px; height: 56px; font-size: 22px; box-shadow: 0 0 0 2px var(--accent), var(--shadow-1); }
  .sheet.note-ed textarea { min-height: 60px; }
  .sheet.note-ed .note-field { gap: 6px; }
}
@keyframes pop-out { to { transform: translateY(18px) scale(.94); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .sheet-backdrop .sheet-actions .btn { animation: none; } }
@keyframes veil-in { from { opacity: 0; backdrop-filter: blur(0); } }
@keyframes veil-out { to { opacity: 0; backdrop-filter: blur(0); } }
@keyframes pop-in { from { transform: translateY(18px) scale(.94); opacity: 0; } }
.lightbox { backdrop-filter: blur(0); transition: background var(--t-out) var(--ease-out), backdrop-filter var(--t-out) var(--ease-out); }
.lightbox.on { background: rgba(0,0,0,.88); backdrop-filter: blur(8px); transition: background var(--t-in) var(--ease-ios), backdrop-filter var(--t-in) var(--ease-ios); }
.lightbox .lb-close { opacity: 0; transition: opacity var(--t-out) var(--ease-out); }
.lightbox.on .lb-close { opacity: 1; transition: opacity var(--t-in) var(--ease-ios) var(--lead); }

/* ---------- motion: the typewriter greeting ---------- */
.caret { display: inline-block; width: .08em; height: .9em; margin-left: .06em; vertical-align: -.08em; background: var(--accent); border-radius: 2px; animation: caret 1s steps(1) infinite; transition: opacity var(--t-in) var(--ease-ios); }
.caret.done { opacity: 0; }
@keyframes caret { 50% { opacity: 0; } }

/* Apply to Web: the old look crossfades into the new one (crossfadeLook in app.js). */
::view-transition-old(root), ::view-transition-new(root) { animation-duration: var(--t-in); animation-timing-function: var(--ease-ios); }

/* Reduced motion: everything settles instantly. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; transition-delay: 0ms !important; scroll-behavior: auto !important; }
  .spinner { animation-duration: .8s !important; animation-iteration-count: infinite !important; } /* loading spinners keep turning */
}

/* Phones: the menu button is a long pill at the bottom center (the menu opens upward, centered), the chat tabs
   sit higher so the pill stays clear, and the pill steps aside while a chat window is open. */
.morph-label { display: none; }
@media (max-width: 759px) {
  .toast { bottom: calc(74px + env(safe-area-inset-bottom)); } /* above the menu pill */
  .morph { top: auto; left: 50%; translate: -50% 0; bottom: calc(14px + env(safe-area-inset-bottom)); width: 150px; height: 46px; border-radius: var(--r-pill); }
  .morph-btn { top: auto; bottom: 0; left: 0; width: 100%; height: 44px; display: flex; align-items: center; justify-content: center; gap: 8px; }
  .morph-label { display: inline; font-family: var(--font-head); font-weight: 700; font-size: 16px; letter-spacing: .12em; text-transform: uppercase; }
  /* Phones (no hover): the circles rise above the pill and their names slide out beside them, one after another. */
  /* Compact rows on a panel (sized to the longest name, --mw from app.js), centered over the pill; circle and name tap as one row. */
  .morph-list { --row: 34px; top: auto; bottom: 64px; left: calc(50% - (var(--row) + 6px + var(--mw, 160px)) / 2); gap: 4px; flex-direction: column-reverse; }
  .morph-list::before { content: ''; position: absolute; inset: -10px auto -10px -10px; width: calc(var(--row) + 26px + var(--mw, 160px)); z-index: -1; border-radius: var(--r-lg); border: 1px solid var(--border); background: color-mix(in srgb, var(--panel) 90%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: var(--shadow-3);
    opacity: 0; transform: translateY(10px) scale(.96); transform-origin: 50% 100%; transition: opacity var(--t-out) var(--ease-out) calc((var(--n) - 1) * var(--stagger)), transform var(--t-out) var(--ease-out) calc((var(--n) - 1) * var(--stagger)); } /* closing: leaves after the rows */
  .morph.open .morph-list::before { opacity: 1; transform: none; transition: opacity var(--t-in) var(--ease-ios), transform var(--t-in) var(--ease-spring); }
  .morph-list a { width: var(--row); height: var(--row); transform: translateY(10px) scale(.6); -webkit-tap-highlight-color: transparent; }
  .morph.open .morph-list a { transform: none; } /* rows line up on the panel; the open page shows in orange */
  .morph-list .mi svg { width: 18px; height: 18px; }
  .morph-list .ml { left: calc(var(--row) + 6px); height: 28px; padding: 0 10px; font-size: 14px; box-shadow: none; }
  .morph.open .morph-list .ml { filter: none; } /* no hover on phones: names show in full */
  .morph-list a:active .ml { background: var(--panel-2); }
  .chat-tab { bottom: calc(120px + env(safe-area-inset-bottom)); }
  main { padding-top: calc(var(--banner-h) + 20px + env(safe-area-inset-top)); padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
  body:has(.chat-win:not(.closing)) .morph:not(.open) { opacity: 0; pointer-events: none; transform: scale(.8); }
}


/* ==================== FRONT PAGE (logged out) ====================
   Same motion guideline: things rise/zoom in as they scroll into view ([data-rv] -> .in), the story
   section keeps its picture pinned while the steps scroll, parallax only moves transforms. */
html.landing-on { scroll-behavior: auto; }
.ld { position: relative; z-index: 1; overflow-x: clip; }
/* Every scrolling page: the same bar as the front page, along the bottom edge of the banner. */
.page-progress { position: fixed; left: 0; right: 0; top: calc(var(--banner-h) + env(safe-area-inset-top) - 2px); height: 3px; z-index: calc(var(--z-banner) + 1); pointer-events: none; background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 40%, #fff)); transform-origin: 0 50%; transform: scaleX(0); opacity: 0; transition: opacity var(--t-out) var(--ease-out); }
.page-progress.on { opacity: 1; }
.ld-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: calc(var(--z-nav) + 1); background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 40%, #fff)); transform-origin: 0 50%; transform: scaleX(0); }
.ld-nav { position: fixed; top: 0; left: 0; right: 0; z-index: var(--z-nav); display: flex; align-items: center; gap: 18px; padding: 12px max(16px, calc(50% - 600px)); transition: background var(--t-in) var(--ease-ios), box-shadow var(--t-in) var(--ease-ios), backdrop-filter var(--t-in) var(--ease-ios); }
.ld-nav.solid { background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3); box-shadow: 0 1px 0 var(--border); }
.ld-brand { display: flex; align-items: center; gap: 10px; white-space: nowrap; color: var(--text); font-family: var(--font-head); font-weight: 700; font-size: 20px; letter-spacing: .06em; text-transform: uppercase; }
.ld-brand img { width: 34px; height: 34px; border-radius: 50%; }
.ld-links { display: flex; gap: 4px; margin-left: auto; }
.ld-links a { padding: 8px 12px; border-radius: var(--r-pill); color: var(--muted); font-weight: 600; font-size: 15px; transition: color var(--t-out) var(--ease-out), background var(--t-out) var(--ease-out); }
@media (hover: hover) { .ld-links a:hover { color: var(--text); background: color-mix(in srgb, var(--text) 8%, transparent); } }
@media (max-width: 899px) { .ld-links { display: none; } .ld-nav > :last-child { margin-left: auto; } }
@media (max-width: 480px) { .ld-brand { font-size: 17px; } .ld-brand img { width: 30px; height: 30px; } }

/* Front page buttons are the site's buttons (.btn) at the big size, like .btn.wide */
.ld-btn { min-height: 48px; padding: 0 24px; font-size: 18px; }
.ld-btn svg { width: 20px; height: 20px; }
.ld-btn.small { min-height: 40px; padding: 0 14px; font-size: 16px; }
.ld-btn.off { opacity: .45; cursor: default; }

.ld-section { scroll-margin-top: 64px; position: relative; padding: clamp(64px, 10vw, 120px) max(16px, calc(50% - 580px)); }
.ld-head { max-width: 760px; margin: 0 auto 40px; text-align: center; }
.ld-head h2, .ld-chat-copy h2 { font-size: clamp(32px, 5vw, 56px); line-height: 1.04; letter-spacing: .01em; }
.ld-kicker { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 12px; font-family: var(--font-head); font-weight: 700; font-size: 14px; letter-spacing: .22em; text-transform: uppercase; color: var(--accent); }
.ld-sub { color: var(--muted); font-size: clamp(16px, 1.6vw, 19px); line-height: 1.5; margin: 14px auto 0; max-width: 640px; }
.ld-pulse { width: 9px; height: 9px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 0 color-mix(in srgb, var(--good) 70%, transparent); animation: status-ping var(--t-loop) var(--ease-out) infinite; flex: 0 0 auto; }

/* scroll reveal */
[data-rv] { opacity: 0; transition: opacity var(--t-show) var(--ease-out), transform var(--t-show) var(--ease-ios); transition-delay: var(--d, 0ms); will-change: transform, opacity; }
[data-rv='up'] { transform: translateY(36px); }
[data-rv='left'] { transform: translateX(-48px); }
[data-rv='right'] { transform: translateX(48px); }
[data-rv='zoom'] { transform: scale(.9); }
[data-rv].in { opacity: 1; transform: none; }

/* hero */
.ld-hero { position: relative; min-height: 100svh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: center; gap: 40px; padding: 110px max(16px, calc(50% - 600px)) 80px; }
.ld-hero::before { content: ''; position: absolute; inset: 0; z-index: -1; background: radial-gradient(60% 50% at 30% 30%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%), radial-gradient(40% 40% at 80% 70%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 70%); }
.ld-avatar { position: relative; width: 96px; height: 96px; margin-bottom: 20px; }
.ld-avatar img { width: 100%; height: 100%; border-radius: 50%; box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 60%, transparent), var(--shadow-show); animation: ld-float 5s ease-in-out infinite; }
.ld-live-dot { position: absolute; right: 4px; bottom: 6px; width: 18px; height: 18px; border-radius: 50%; background: var(--good); border: 3px solid var(--bg); }
@keyframes ld-float { 50% { transform: translateY(-8px); } }
.ld-title { font-size: clamp(44px, 7.4vw, 92px); line-height: .98; letter-spacing: .005em; }
.ld-grad { background: linear-gradient(100deg, var(--accent), color-mix(in srgb, var(--accent) 45%, #fff) 60%, var(--accent)); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: ld-sheen 6s ease-in-out infinite; }
@keyframes ld-sheen { 50% { background-position: 100% 0; } }
.ld-lead { font-size: clamp(17px, 1.8vw, 21px); line-height: 1.5; color: var(--muted); margin: 18px 0 28px; max-width: 560px; }
.ld-cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.ld-error { margin-top: 16px; color: var(--bad); font-weight: 600; }
.ld-hero-stats { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 28px; color: var(--muted); font-size: 15px; }
.ld-hero-stats b { color: var(--text); font-size: 17px; }
.ld-hero-stats .sep { width: 4px; height: 4px; border-radius: 50%; background: var(--dim); }
.ld-hero-cards { position: relative; height: min(560px, 60vw); perspective: 1200px; --rx: 0deg; --ry: 0deg; }
.ld-hero-cards .hc { position: absolute; border-radius: 14px; box-shadow: var(--shadow-show), 0 0 0 1px color-mix(in srgb, var(--text) 10%, transparent); transition: transform var(--t-in) var(--ease-ios); }
.hc1 { width: 88%; left: 2%; top: 8%; transform: rotateX(var(--rx)) rotateY(var(--ry)) rotate(-5deg); animation: ld-in-1 var(--t-show) var(--ease-ios) both .15s; }
.hc2 { width: 52%; right: -2%; top: 46%; transform: rotateX(var(--rx)) rotateY(var(--ry)) rotate(6deg); animation: ld-in-2 var(--t-show) var(--ease-ios) both .3s; }
.hc3 { width: 50%; left: -4%; top: 58%; transform: rotateX(var(--rx)) rotateY(var(--ry)) rotate(-3deg); animation: ld-in-3 var(--t-show) var(--ease-ios) both .45s; }
@keyframes ld-in-1 { from { opacity: 0; translate: 0 60px; scale: .92; } }
@keyframes ld-in-2 { from { opacity: 0; translate: 60px 40px; scale: .9; } }
@keyframes ld-in-3 { from { opacity: 0; translate: -60px 40px; scale: .9; } }
.ld-scroll { position: absolute; left: 50%; bottom: 24px; width: 44px; height: 44px; margin-left: -22px; display: grid; place-items: center; border-radius: 50%; color: var(--muted); border: 1px solid var(--border); animation: notice-bob var(--t-loop) ease-in-out infinite; }
.ld-scroll svg { width: 22px; height: 22px; }
@media (max-width: 899px) {
  .ld-hero { grid-template-columns: 1fr; text-align: center; padding-top: 96px; gap: 10px; }
  .ld-avatar { margin: 0 auto 18px; }
  .ld-lead { margin-left: auto; margin-right: auto; }
  .ld-cta-row, .ld-hero-stats { justify-content: center; }
  .ld-hero-cards { height: 92vw; max-height: 480px; }
  .ld-scroll { display: none; }
}

/* live numbers */
.ld-stat-grid { display: grid; gap: 14px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ld-stat.week { grid-column: span 2; }
@media (max-width: 899px) { .ld-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.rec-stat.ld-stat { position: relative; overflow: hidden; gap: 4px; padding: 24px 22px; border-radius: 20px; background: color-mix(in srgb, var(--panel) 82%, transparent); backdrop-filter: blur(10px); }
.ld-stat::after { content: ''; position: absolute; inset: auto -30% -60% auto; width: 70%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 22%, transparent), transparent); pointer-events: none; }
.ld-stat:nth-child(2) { transition-delay: var(--lead); } .ld-stat:nth-child(3) { transition-delay: calc(2 * var(--lead)); } .ld-stat:nth-child(4) { transition-delay: calc(3 * var(--lead)); } .ld-stat:nth-child(5) { transition-delay: calc(4 * var(--lead)); }
.rec-stat.ld-stat b { font-size: clamp(40px, 5.4vw, 64px); font-weight: 700; margin-bottom: 6px; }
.rec-stat.ld-stat > span.muted { font-size: 17px; }
.rec-stat.ld-stat .rec-sub { font-size: 14px; }
.ld-week-bars { display: flex; align-items: flex-end; gap: 6px; height: 46px; margin-top: 14px; }
.ld-wb { flex: 1; height: 100%; display: flex; align-items: flex-end; justify-content: center; }
.ld-wb-stack { width: 100%; max-width: 48px; min-height: 3px; display: flex; flex-direction: column; border-radius: 4px 4px 0 0; overflow: hidden; transform-origin: 50% 100%; }
.ld-wb.hot .ld-wb-stack { filter: brightness(1.15); }
.ld-stat.in .ld-wb-stack { animation: ld-grow var(--t-show) var(--ease-ios) both; }
.ld-wb:nth-child(2) .ld-wb-stack { animation-delay: calc(1 * var(--lead)); } .ld-wb:nth-child(3) .ld-wb-stack { animation-delay: calc(2 * var(--lead)); } .ld-wb:nth-child(4) .ld-wb-stack { animation-delay: calc(3 * var(--lead)); } .ld-wb:nth-child(5) .ld-wb-stack { animation-delay: calc(4 * var(--lead)); } .ld-wb:nth-child(6) .ld-wb-stack { animation-delay: calc(5 * var(--lead)); } .ld-wb:nth-child(7) .ld-wb-stack { animation-delay: calc(6 * var(--lead)); }
@keyframes ld-grow { from { transform: scaleY(0); } }
.ld-wb-stack .discord { flex-grow: 1; background: var(--accent); } .ld-wb-stack .chatbot { background: color-mix(in srgb, var(--accent) 55%, #fff); } .ld-wb-stack .web { background: color-mix(in srgb, var(--text) 45%, transparent); }
.ld-wb-stack > div { min-height: 0; }

/* story: sticky picture, scrolling steps */
.ld-story-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 48px; }
.ld-story-sticky { position: sticky; top: 90px; height: calc(100vh - 120px); display: flex; flex-direction: column; justify-content: center; gap: 18px; }
.ld-story-stage { position: relative; aspect-ratio: 16 / 10; }
.ld-story-img { position: absolute; inset: 0; opacity: 0; transform: translateY(24px) scale(.96); transition: opacity var(--t-show) var(--ease-out), transform var(--t-show) var(--ease-ios); filter: drop-shadow(0 30px 50px rgba(0,0,0,.5)); pointer-events: none; }
.ld-story-img .ld-slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
/* slideshows: cards crossfade with a small zoom settle */
.ld-slides { display: grid; }
.ld-slide { grid-area: 1 / 1; width: 100%; opacity: 0; transform: scale(1.025); transition: opacity var(--t-show) var(--ease-out), transform var(--t-show) var(--ease-out); cursor: zoom-in; pointer-events: none; }
.ld-slide.on { opacity: 1; transform: none; pointer-events: auto; }
.ld-story-img.on { opacity: 1; transform: none; pointer-events: auto; }
.ld-story-dots { display: flex; justify-content: center; gap: 8px; }
.ld-story-dots span { width: 8px; height: 8px; border-radius: var(--r-pill); background: var(--dim); transition: width var(--t-in) var(--ease-spring), background var(--t-in) var(--ease-ios); }
.ld-story-dots span.on { width: 28px; background: var(--accent); }
.ld-steps { display: flex; flex-direction: column; }
.ld-step { min-height: 78vh; display: flex; flex-direction: column; justify-content: center; opacity: .3; transform: translateX(10px); transition: opacity var(--t-in) var(--ease-ios), transform var(--t-show) var(--ease-ios); }
.ld-step.on { opacity: 1; transform: none; }
.ld-step h3 { font-size: clamp(28px, 3.4vw, 42px); line-height: 1.08; margin: 12px 0 10px; }
.ld-step p { color: var(--muted); font-size: 18px; line-height: 1.55; margin: 0 0 14px; }
.ld-step ul, .ld-ticks { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.ld-step li, .ld-ticks li { position: relative; padding-left: 28px; font-weight: 600; }
.ld-step li::before, .ld-ticks li::before { content: ''; position: absolute; left: 0; top: 4px; width: 16px; height: 16px; border-radius: 50%; background: color-mix(in srgb, var(--accent) 25%, transparent); box-shadow: inset 0 0 0 5px var(--accent); }
.ld-chip { align-self: flex-start; display: inline-block; padding: 6px 12px; border-radius: var(--r-pill); background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); font-family: var(--font-head); font-weight: 700; font-size: 15px; letter-spacing: .06em; border: 0; }
.ld-step-img { display: none; }
@media (max-width: 899px) {
  .ld-story-grid { grid-template-columns: 1fr; }
  .ld-story-sticky { display: none; }
  .ld-step { min-height: 0; opacity: 1; transform: none; padding: 26px 0; }
  .ld-step-img { display: grid; width: 100%; margin-top: 18px; align-items: center; }
  .ld-step-img .ld-slide { border-radius: var(--r-md); box-shadow: var(--shadow-show); }
}

/* make it yours */
.ld-swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.ld-swatch { width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer; background: conic-gradient(var(--a) 0 50%, var(--b) 0 100%); box-shadow: 0 0 0 2px var(--border); transition: transform var(--t-out) var(--ease-spring), box-shadow var(--t-out) var(--ease-out); }
@media (hover: hover) { .ld-swatch:hover { transform: scale(1.08); } }
.ld-swatch.on { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--a); transform: scale(1.08); }
.ld-wall-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.busy img { filter: saturate(.6) brightness(.85); transition: filter var(--t-out) var(--ease-out); }
@media (max-width: 899px) { .ld-swatches, .ld-wall-chips { justify-content: center; } }

/* chat demo */
.ld-chat-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 44px; align-items: center; }
.ld-chat-copy p { color: var(--muted); font-size: 18px; line-height: 1.55; margin: 16px 0 18px; }
.ld-chat-win { border-radius: var(--r-lg); overflow: hidden; background: color-mix(in srgb, var(--panel) 92%, transparent); border: 1px solid var(--border); box-shadow: var(--shadow-show); display: flex; flex-direction: column; height: 600px; }
.ld-chat-log { padding: 16px; }
.ld-bubble-chart { display: block; width: 100%; max-width: 320px; margin-top: 6px; border-radius: var(--radius); cursor: zoom-in; }
.ld-av { width: 30px; height: 30px; border-radius: 50%; flex: 0 0 auto; object-fit: cover; }
.ld-later { opacity: 0; transform: translateY(8px); transition: opacity var(--t-in) var(--ease-ios), transform var(--t-in) var(--ease-ios); }
.ld-later.in { opacity: 1; transform: none; }
.ld-rich { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.ld-embed { border-left: 4px solid var(--c); border-radius: 4px; padding: 8px 12px; background: color-mix(in srgb, var(--bg) 70%, var(--panel)); font-size: 14px; display: flex; flex-direction: column; gap: 3px; }
.ld-embed-title { font-weight: 700; font-size: 14.5px; }
.ld-embed-small { color: var(--muted); font-size: 12px; }
.dc-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; transform-origin: 0 0; }
.dc-buttons.fresh { animation: drop-in var(--t-in) var(--ease-spring) both; }
.dc-button { display: inline-flex; align-items: center; height: 32px; padding: 0 16px; border-radius: 8px; color: #fff; font-weight: 500; font-size: 14px; background: #4e5058; }
.dc-button.green { background: #248046; }
.dc-button.blurple { background: #5865f2; }
.dc-button.red { background: #da373c; }
.dc-button { transition: background var(--t-out) var(--ease-out); }
.wel-colors { display: flex; flex-wrap: nowrap; gap: 16px; align-items: flex-start; }
.wel-colors > * { flex: 0 0 auto; min-width: 0; }
.wel-colors .tabs { flex-wrap: nowrap; }
.wel-fmt { gap: 0; flex-wrap: nowrap; }
.ping-wrap { display: grid; grid-template-columns: 0fr; opacity: 0; margin-left: 0; transition: grid-template-columns var(--t-in) var(--ease-ios), opacity var(--t-in) var(--ease-ios), margin-left var(--t-in) var(--ease-ios); }
.ping-wrap > div { overflow: hidden; min-width: 0; }
.ping-wrap.show { grid-template-columns: 1fr; opacity: 1; margin-left: 8px; }
.ping-wrap:not(.show) .ping-chip { pointer-events: none; }
.wel-ecolors { flex-wrap: nowrap; gap: 16px; align-items: flex-start; }
.wel-ecolors > * { flex: 0 0 auto; min-width: 0; }
.bc-dots { display: flex; gap: 8px; align-items: center; min-height: 40px; }
.bc-dot { width: 30px; height: 30px; border-radius: 50%; border: 0; cursor: pointer; box-shadow: 0 0 0 2px var(--panel), 0 0 0 2px transparent; transition: box-shadow var(--t-out) var(--ease-out), transform var(--t-tap) var(--ease-out); }
@media (hover: hover) { .bc-dot:hover { transform: scale(1.08); } }
.bc-dot:active { transform: scale(.92); }
.bc-dot.on { box-shadow: 0 0 0 3px var(--panel), 0 0 0 5px var(--accent); }
.bc-dot.blurple { background: #5865f2; } .bc-dot.grey { background: #4e5058; } .bc-dot.green { background: #248046; } .bc-dot.red { background: #da373c; }
@media (max-width: 480px) { .wel-colors, .wel-ecolors { gap: 8px; } .bc-dots { gap: 6px; } .bc-dot { width: 24px; height: 24px; } .ping-wrap.show { margin-left: 6px; } }
.ld-dc-btn { border: 0; font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; transition: background var(--t-out) var(--ease-out); }
@media (hover: hover) { .ld-dc-btn:hover:not(:disabled) { background: #6d6f78; } }
.ld-dc-btn:disabled { background: #248046; cursor: default; }
.ld-on-list { display: flex; flex-direction: column; gap: 4px; }
.ld-on { display: grid; grid-template-columns: 26px minmax(0, auto) 1fr; align-items: center; gap: 8px; font-size: 14px; }
.ld-on .ld-av { width: 26px; height: 26px; }
.ld-on span { color: var(--good); font-size: 12.5px; text-align: right; }
.ld-on.traitor span { color: var(--bad); font-weight: 700; }
.ld-chat-chips { display: flex; flex-wrap: wrap; gap: 8px; max-height: 104px; overflow-y: auto; padding: 12px 14px; border-top: 1px solid var(--border); scrollbar-width: none; }
.ld-chat-chips::-webkit-scrollbar { display: none; }
.ld-chip.btnlike { cursor: pointer; white-space: nowrap; transition: background var(--t-out) var(--ease-out), transform var(--t-out) var(--ease-spring); }
@media (hover: hover) { .ld-chip.btnlike:hover { background: color-mix(in srgb, var(--accent) 28%, transparent); } }
.ld-chip.btnlike:active { transform: scale(.965); }
@media (max-width: 899px) { .ld-chat-grid { grid-template-columns: 1fr; } .ld-chat-win { height: min(640px, 82vh); } .ld-chat-chips { max-height: 92px; } .ld-on span { white-space: nowrap; } }

/* Front page: the look picker in the hero, Roll a loadout in the first story step, staff tiles that show their command,
   the member commands as one row of chips, and the "more" list as chips under the website cards */
.ld-look { margin-top: 24px; display: flex; flex-direction: column; gap: 8px; min-width: 0; max-width: 100%; padding: 16px 18px; border-radius: 18px; background: color-mix(in srgb, var(--panel) 72%, transparent); border: 1px solid var(--border); backdrop-filter: blur(10px); }
.ld-look-head { display: flex; flex-direction: column; gap: 2px; margin-bottom: 4px; }
.ld-look-head b { font-family: var(--font-head); font-size: 19px; letter-spacing: .02em; color: var(--text); }
.ld-look-head span { font-size: 14px; color: var(--muted); line-height: 1.4; }
.ld-look-count { font-family: var(--font-head); font-weight: 700; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-top: 4px; }
.ld-hero-text { min-width: 0; }
.ld-look .ld-swatch { width: 34px; height: 34px; }
.ld-look .ld-swatches { gap: 8px; }
.ld-look .ld-wall-chips .pill { padding: 5px 12px; font-size: 13px; }
/* Phones: each picker is one row you swipe */
@media (max-width: 899px) {
  .ld-look { align-items: stretch; text-align: center; }
  .ld-look .ld-swatches, .ld-look .ld-wall-chips { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; margin: 0 -16px; padding: 4px 16px; scrollbar-width: none; }
  .ld-look .ld-swatches::-webkit-scrollbar, .ld-look .ld-wall-chips::-webkit-scrollbar { display: none; }
  .ld-look .ld-swatch, .ld-look .pill { flex: 0 0 auto; }
}
.ld-more-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.ld-more-wrap { max-width: 1040px; margin: 44px auto 0; text-align: center; }
.ld-more-wrap h3 { margin: 0 0 14px; font-family: var(--font-head); font-size: 22px; }
.ld-more-chip { padding: 7px 14px; border-radius: var(--r-pill); font-size: 14px; background: color-mix(in srgb, var(--panel) 80%, transparent); border: 1px solid var(--border); color: var(--muted); cursor: default; outline: none; transition: border-color var(--t-out) var(--ease-out), color var(--t-out) var(--ease-out); }
@media (hover: hover) { .ld-more-chip:hover { border-color: var(--accent); color: var(--text); } }
.ld-more-chip:focus-visible, .ld-more-chip.hot { border-color: var(--accent); color: var(--text); }

/* Front page: a phone showing the Staff Panel, scrollable */
.ld-phone { --ph-k: .7179; justify-self: center; width: 300px; height: 610px; padding: 10px; border-radius: 48px; background: #0b0d10; box-shadow: 0 0 0 2px #2a2f36, 0 40px 80px rgba(0,0,0,.55); }
.ld-ph-screen { position: relative; height: 100%; border-radius: 38px; overflow: hidden; background: var(--bg); }
/* Laid out at a real phone's width (390px) with the member site's own phone sizes, then shrunk to fit the screen. */
.ld-ph-view { position: absolute; top: 0; left: 0; width: 390px; height: calc(100% / var(--ph-k)); transform: scale(var(--ph-k)); transform-origin: 0 0; display: flex; flex-direction: column; background: linear-gradient(180deg, var(--bg-top), var(--bg) 60%); color: var(--text); font: 15px/1.45 var(--font-body); }
.ld-ph-status { flex: none; display: flex; align-items: center; justify-content: space-between; height: 50px; padding: 4px 34px 0; font-size: 17px; }
.ld-ph-island { width: 124px; height: 36px; border-radius: var(--r-pill); background: #000; }
.ld-ph-bars { display: flex; align-items: flex-end; gap: 3px; height: 14px; }
.ld-ph-bars i { width: 4px; background: var(--text); border-radius: 1px; } .ld-ph-bars i:nth-child(1) { height: 5px; } .ld-ph-bars i:nth-child(2) { height: 8px; } .ld-ph-bars i:nth-child(3) { height: 11px; } .ld-ph-bars i:nth-child(4) { height: 14px; }
.ld-ph-banner { position: relative; flex: none; height: 56px; display: flex; align-items: center; justify-content: center; gap: 10px; background: color-mix(in srgb, var(--bg) 82%, transparent); border-bottom: 1px solid var(--border); }
.ld-ph-banner img { width: 30px; height: 30px; border-radius: 50%; }
.ld-ph-banner b { font-family: var(--font-head); font-weight: 700; font-size: 21px; letter-spacing: .06em; text-transform: uppercase; }
.ld-ph-banner small { position: absolute; right: 14px; bottom: 5px; font-size: 11px; color: var(--muted); }
.ld-ph-main { flex: 1; min-height: 0; overflow-y: auto; padding: 20px 16px 84px; overscroll-behavior: contain; scrollbar-width: none; }
.ld-ph-main::-webkit-scrollbar { display: none; }
.ld-ph-head { display: flex; align-items: center; gap: 10px; min-height: 54px; margin-bottom: 14px; }
.ld-ph-back { width: 44px; height: 44px; margin-left: -8px; display: grid; place-items: center; color: var(--text); flex: none; }
.ld-ph-back svg { width: 34px; height: 34px; }
.ld-ph-title { margin: 0; font-family: var(--font-head); font-weight: 700; font-size: 30px; line-height: 1.1; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); position: relative; isolation: isolate; }
.ld-ph-title::before { content: ''; position: absolute; inset: -18px -36px; z-index: -1; pointer-events: none; background: radial-gradient(closest-side, rgba(0,0,0,.5), rgba(0,0,0,.25) 55%, transparent); } /* the page title's glow */
.ld-ph-seg { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 3px; margin-bottom: 14px; border-radius: var(--r-pill); background: var(--panel); border: 1px solid var(--border); }
.ld-ph-segbar { position: absolute; top: 3px; bottom: 3px; left: 3px; width: calc((100% - 6px) / 4); border-radius: var(--r-pill); background: var(--accent); transition: transform var(--t-in) var(--ease-ios); }
.ld-ph-segbtn { position: relative; z-index: 1; min-height: 32px; padding: 0 4px; border: 0; background: none; color: var(--muted); font-family: var(--font-head); font-weight: 600; font-size: 12px; letter-spacing: .01em; white-space: nowrap; cursor: pointer; transition: color var(--t-out) var(--ease-out); }
.ld-ph-segbtn.on { color: var(--accent-ink); }
.ld-ph-cols { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none; align-items: flex-start; }
.ld-ph-cols::-webkit-scrollbar { display: none; }
.ld-ph-col { flex: 0 0 100%; min-width: 0; scroll-snap-align: start; scroll-snap-stop: always; }
.ld-ph-group + .ld-ph-group { margin-top: 18px; }
.ld-ph-ghead { margin: 0 0 8px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.ld-ph-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.ld-ph-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 10px 8px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--border); min-width: 0; }
.ld-ph-glyph { padding: 0 0 6px; color: var(--glyph); border-bottom: 3px solid var(--accent); }
.ld-ph-glyph svg { display: block; width: 22px; height: 22px; }
.ld-ph-tile b { font-family: var(--font-head); font-size: 13px; font-weight: 700; line-height: 1.2; }
.ld-ph-tile small { font-size: 11px; line-height: 1.25; color: var(--muted); }
.ld-ph-tab { position: absolute; bottom: 120px; width: 30px; height: 44px; display: grid; place-items: center; border: 1px solid var(--border); background: var(--panel); color: var(--text); box-shadow: 0 6px 18px rgba(0,0,0,.4); }
.ld-ph-tab.left { left: 0; border-left: 0; border-radius: 0 12px 12px 0; }
.ld-ph-tab.right { right: 0; border-right: 0; border-radius: var(--r-md) 0 0 12px; }
.ld-ph-tab img { width: 22px; height: 22px; border-radius: 50%; }
.ld-ph-tab svg { width: 16px; height: 16px; }
.ld-ph-pill { position: absolute; left: 50%; bottom: 22px; translate: -50% 0; width: 150px; height: 46px; display: flex; align-items: center; justify-content: center; gap: 10px; border-radius: 23px; border: 1px solid var(--border); background: var(--panel-2); box-shadow: 0 6px 18px rgba(0,0,0,.3); font-family: var(--font-head); font-weight: 700; font-size: 16px; letter-spacing: .12em; text-transform: uppercase; }
.ld-ph-home { position: absolute; left: 50%; bottom: 8px; translate: -50% 0; width: 140px; height: 5px; border-radius: 5px; background: color-mix(in srgb, var(--text) 70%, transparent); }
@media (max-width: 480px) { .ld-phone { --ph-k: .6667; width: 280px; height: 570px; } }

/* Front page "Inside the server": six Discord channels (dark theme look) that play a scripted conversation while on screen */
.ld-cv-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px 18px; max-width: 1180px; margin: 0 auto; }
.ld-cv-item { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.ld-cv-item figcaption { text-align: center; font-family: var(--font-head); font-weight: 700; font-size: 15px; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.dcx-win { display: flex; flex-direction: column; height: 500px; border-radius: var(--r-md); overflow: hidden; background: #313338; border: 1px solid #1e1f22; color: #dbdee1; box-shadow: var(--shadow-show); font: 15.5px/1.375 'gg sans', 'Noto Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; text-align: left; }
.dcx-top { display: flex; align-items: center; gap: 8px; height: 48px; padding: 0 14px; flex: 0 0 auto; box-shadow: 0 1px 0 rgba(4,4,5,.2), 0 1.5px 0 rgba(6,6,7,.05), 0 2px 0 rgba(4,4,5,.05); position: relative; z-index: 1; }
.dcx-top b { color: #f2f3f5; font-weight: 600; font-size: 15px; }
.dcx-hash { color: #80848e; font-size: 22px; font-weight: 400; line-height: 1; }
.dcx-icons { margin-left: auto; display: flex; gap: 14px; color: #b5bac1; }
.dcx-icons svg { width: 20px; height: 20px; }
.dcx-log { flex: 1; min-height: 0; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; padding: 8px 0 6px; -webkit-mask-image: linear-gradient(transparent, #000 40px); mask-image: linear-gradient(transparent, #000 40px); }
.dcx-msg { flex: 0 0 auto; padding: 2px 14px 2px 14px; margin-top: 15px; animation: bubble-in var(--t-in) var(--ease-ios) both; }
.dcx-msg.grouped { margin-top: 0; }
.dcx-row { display: flex; gap: 14px; align-items: flex-start; }
.dcx-av { width: 40px; height: 40px; border-radius: 50%; flex: 0 0 auto; object-fit: cover; margin-top: 2px; }
.dcx-gutter { width: 40px; flex: 0 0 auto; }
.dcx-main { min-width: 0; flex: 1; }
.dcx-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; line-height: 1.3; }
.dcx-time { font-size: 12px; color: #949ba4; margin-left: 2px; }
.dcx-text { color: #dbdee1; overflow-wrap: anywhere; }
.dcx-text b, .dcx-embed b { color: #f2f3f5; font-weight: 700; }
.dcx-ref { position: relative; display: flex; align-items: center; gap: 4px; margin: 0 0 4px 54px; font-size: 13px; color: #b5bac1; white-space: nowrap; overflow: hidden; }
.dcx-spine { position: absolute; left: -36px; top: 8px; width: 32px; height: 12px; border-left: 2px solid #4e5058; border-top: 2px solid #4e5058; border-top-left-radius: 6px; }
.dcx-av.sm { width: 16px; height: 16px; margin: 0 2px 0 0; }
.dcx-ref .dcx-name { font-size: 13px; opacity: .9; }
.dcx-ref-text { overflow: hidden; text-overflow: ellipsis; margin-left: 2px; }
.dcx-cmd { color: #00a8fc; }
.dcx-embed { margin-top: 4px; max-width: 520px; border-left: 4px solid var(--c); border-radius: 4px; padding: 10px 14px 12px; background: #2b2d31; font-size: 14px; display: flex; flex-direction: column; gap: 3px; }
.dcx-embed-title { color: #f2f3f5; font-weight: 700; font-size: 16px; margin-bottom: 2px; }
.dcx-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 10px; margin-top: 2px; }
.dcx-field { grid-column: 1 / -1; min-width: 0; } .dcx-field.in { grid-column: auto; }
.dcx-field b { display: block; font-size: 13px; font-weight: 600; margin-bottom: 1px; }
.dcx-small { font-size: 12px; color: #b5bac1; margin-top: 4px; }
.dcx-foot { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 12px; color: #b5bac1; }
.dcx-foot img { width: 18px; height: 18px; border-radius: 50%; }
.dcx-pic { display: block; align-self: flex-start; max-width: 100%; max-height: 240px; width: auto; height: auto; margin-top: 6px; border-radius: 8px; cursor: zoom-in; }
.dcx-reacts { display: flex; gap: 4px; margin-top: 6px; }
.dcx-reacts span { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 8px; border-radius: 8px; background: #2b2d31; border: 1px solid transparent; color: #b5bac1; font-size: 13px; font-weight: 600; }
.dcx-reacts span.me { background: rgba(88,101,242,.15); border-color: #5865f2; color: #dee0fc; }
.dcx-reacts i { font-style: normal; font-size: 15px; }
.dcx-eph { display: flex; align-items: center; gap: 4px; margin-top: 4px; font-size: 12px; color: #949ba4; }
.dcx-eph svg { width: 14px; height: 14px; }
.dcx-eph span { color: #00a8fc; }
.dcx-compose { flex: 0 0 auto; padding: 0 14px; }
.dcx-input { display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 14px; border-radius: 8px; background: #383a40; color: #b5bac1; }
.dcx-input svg { width: 22px; height: 22px; }
.dcx-plus { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #b5bac1; color: #383a40; font-weight: 700; font-size: 18px; line-height: 1; }
.dcx-ph { flex: 1; min-width: 0; color: #6d6f78; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dcx-gif { font-size: 11px; font-weight: 800; padding: 1px 4px; border: 2px solid #b5bac1; border-radius: 4px; line-height: 1.1; }
@media (max-width: 1100px) { .ld-cv-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* Phones: one row you swipe through instead of six cards stacked */
@media (max-width: 599px) {
  .ld-cv-grid { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -16px; padding: 0 16px 10px; scrollbar-width: none; }
  .ld-cv-grid::-webkit-scrollbar { display: none; }
  .ld-cv-item { flex: 0 0 88%; scroll-snap-align: center; }
  .dcx-win { height: 480px; }
  .dcx-icons svg:nth-child(n+3) { display: none; }
}
@media (prefers-reduced-motion: reduce) { .dcx-msg { animation: none; } }

/* Front page spotlights: party chat (Discord + website side by side), animated show-offs, the Staff Panel */
.ld-pc-grid { display: grid; grid-template-columns: minmax(0, 1fr) 56px minmax(0, 1fr); align-items: stretch; gap: 0; max-width: 1040px; margin: 0 auto; }
.ld-pc-win { border-radius: 20px; overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow-show); display: flex; flex-direction: column; height: 430px; background: color-mix(in srgb, var(--panel) 92%, transparent); }
.ld-pc-win.dc { background: #313338; border-color: #1e1f22; color: #dbdee1; }
.ld-pc-log { scrollbar-width: none; }
.ld-pc-log::-webkit-scrollbar { display: none; }
.ld-pc-link { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 8px; }
.ld-pc-link span { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: ld-pc-flow var(--t-loop) ease-in-out infinite; }
.ld-pc-link span:nth-child(2) { animation-delay: .2s; } .ld-pc-link span:nth-child(3) { animation-delay: .4s; }
@keyframes ld-pc-flow { 0%, 100% { opacity: .2; transform: scale(.7); } 50% { opacity: 1; transform: scale(1); } }
.ld-pc-points { list-style: none; padding: 0; margin: 34px auto 0; max-width: 1040px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.ld-pc-points li { padding: 16px; border-radius: 16px; background: color-mix(in srgb, var(--panel) 80%, transparent); border: 1px solid var(--border); color: var(--muted); font-size: 15px; line-height: 1.45; }
.ld-pc-points b { display: block; color: var(--text); font-family: var(--font-head); font-size: 17px; margin-bottom: 4px; }
@media (max-width: 899px) {
  .ld-pc-grid { grid-template-columns: 1fr; gap: 0; }
  .ld-pc-win, .ld-pc-win.dcx-win { height: 330px; }
  .ld-pc-link { flex-direction: row; height: 44px; }
  .ld-pc-points { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) { .ld-pc-points { grid-template-columns: 1fr; } }

.ld-anim-wait { position: absolute; inset: auto 14px 14px auto; display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: var(--r-pill); background: color-mix(in srgb, var(--panel) 90%, transparent); border: 1px solid var(--border); font-size: 13px; color: var(--muted); opacity: 0; transform: translateY(6px); transition: opacity var(--t-in) var(--ease-ios), transform var(--t-in) var(--ease-ios); pointer-events: none; }
/* Show-offs: a loadout, a Server Card and a trophy side by side, all in the picked look. Each keeps its own shape. */
.ld-show-chips { justify-content: center; margin: 0 auto 26px; max-width: 900px; }
.ld-show-row { display: grid; grid-template-columns: 1.15fr 1.15fr .7fr; gap: 18px; align-items: start; max-width: 1180px; margin: 0 auto; }
.ld-show-pic { position: relative; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.ld-show-pic img { display: block; width: 100%; min-height: 120px; border-radius: 14px; box-shadow: var(--shadow-show); background: color-mix(in srgb, var(--panel) 70%, transparent); }
.ld-show-pic figcaption { text-align: center; font-family: var(--font-head); font-weight: 700; font-size: 15px; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.ld-show-pic .ld-anim-wait { inset: 14px 14px auto auto; }
.ld-show-pic.busy .ld-anim-wait { opacity: 1; transform: none; }
@media (max-width: 899px) {
  .ld-show-row { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -16px; padding: 0 16px 10px; scrollbar-width: none; }
  .ld-show-row::-webkit-scrollbar { display: none; }
  .ld-show-pic { flex: 0 0 82%; scroll-snap-align: center; }
  .ld-show-pic:last-child { flex-basis: 56%; }
}
/* Still conversations: no entrance per message. The party chat's Discord side keeps its live feed. */
.ld-cv .dcx-msg { animation: none; }
.ld-cv-grid { align-items: start; }
.ld-cv .dcx-win, .ld-cv-grid .dcx-win { height: auto; }
.ld-cv .dcx-log { overflow: visible; justify-content: flex-start; padding-bottom: 14px; -webkit-mask-image: none; mask-image: none; }
.ld-pc-win.dcx-win { border-radius: var(--r-md); }
.ld-pc-win.web { border-radius: var(--r-lg); }
.dcx-hash.thread { display: grid; place-items: center; }
.dcx-hash.thread svg { width: 18px; height: 18px; }
.dcx-sub { padding-left: 10px; margin-left: 2px; border-left: 1px solid #3f4147; color: #949ba4; font-size: 13px; }

.ld-st-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 36px; align-items: center; max-width: 1080px; margin: 0 auto; }
.ld-st-tiles { display: grid; }
@media (min-width: 760px) { .ld-st-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } }
.ld-st-tile { cursor: default; outline: none; }
.ld-st-tile:focus-visible { border-color: var(--accent); }
.ld-st-tiles.in .ld-st-tile { animation: bubble-in var(--t-in) var(--ease-ios) var(--d) both; }
@media (max-width: 899px) { .ld-st-grid { grid-template-columns: 1fr; } }

/* down detector, website, more */
.ld-dd { max-width: 1000px; margin: 0 auto; }
.ld-web-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
.ld-web-card { --mx: 50%; --my: 0%; position: relative; padding: 22px; border-radius: 20px; background: radial-gradient(400px circle at var(--mx) var(--my), color-mix(in srgb, var(--accent) 14%, transparent), transparent 60%), color-mix(in srgb, var(--panel) 85%, transparent); border: 1px solid var(--border); transition: opacity var(--t-show) var(--ease-out), transform var(--t-in) var(--ease-ios), border-color var(--t-in) var(--ease-ios); transition-delay: var(--d, 0ms), 0ms, 0ms; }
@media (hover: hover) { .ld-web-card:hover { border-color: color-mix(in srgb, var(--accent) 60%, var(--border)); } }
.ld-web-card h3 { font-size: 20px; margin: 0 0 6px; }
.ld-web-card p { color: var(--muted); margin: 0; line-height: 1.45; }
.ld-web-card { display: flex; align-items: center; gap: 14px; }
.ld-web-card .st-glyph svg { width: 34px; height: 34px; }

/* final */
.ld-final { text-align: center; margin: 0 max(16px, calc(50% - 560px)) 60px; padding: 70px 24px; border-radius: 32px; background: radial-gradient(80% 120% at 50% 0%, color-mix(in srgb, var(--accent) 26%, transparent), transparent 70%), color-mix(in srgb, var(--panel) 85%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--border)); }
.ld-final h2 { font-size: clamp(34px, 5.4vw, 62px); }
.ld-final .ld-cta-row { justify-content: center; margin-top: 26px; }
.ld-final-av { width: 84px; height: 84px; border-radius: 50%; margin-bottom: 16px; animation: ld-float 5s ease-in-out infinite; }
.ld-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding: 26px max(16px, calc(50% - 580px)) 40px; color: var(--muted); font-size: 14px; border-top: 1px solid var(--border); }

@media (prefers-reduced-motion: reduce) { [data-rv] { opacity: 1; transform: none; } }

/* Front page: the floating buttons (bottom left) and back to top (bottom right), sliding in once the big buttons are out of view */
.ld-dock { position: fixed; left: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: var(--z-nav); display: flex; gap: 8px; padding: 6px; border-radius: calc(var(--r-sm) + 6px); background: color-mix(in srgb, var(--panel) 80%, transparent); border: 1px solid var(--border); backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3); box-shadow: var(--shadow-3); transform: translateX(calc(-100% - 24px)); opacity: 0; pointer-events: none; transition: transform var(--t-in) var(--ease-ios), opacity var(--t-in) var(--ease-ios); }
.ld-dock.show { transform: none; opacity: 1; pointer-events: auto; }
.ld-totop { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: var(--z-nav); width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--border); background: color-mix(in srgb, var(--panel) 80%, transparent); color: var(--text); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: var(--shadow-3); cursor: pointer; transform: translateY(calc(100% + 30px)) scale(.8); opacity: 0; pointer-events: none; transition: transform var(--t-in) var(--ease-spring), opacity var(--t-in) var(--ease-ios), color var(--t-out) var(--ease-out), border-color var(--t-out) var(--ease-out); }
.ld-totop svg { width: 22px; height: 22px; }
.ld-totop.show { transform: none; opacity: 1; pointer-events: auto; }
@media (hover: hover) { .ld-totop:hover { color: var(--accent); border-color: var(--accent); } }
.ld-totop:active { transform: scale(.92); }
.ld-dock { max-width: calc(100% - 98px); }
@media (max-width: 360px) { .ld-dock .ld-your { display: none; } }


/* Delete messages preview, Records */
.del-item { align-items: flex-start; gap: 8px; }
.del-av { width: 32px; height: 32px; border-radius: 50%; flex: 0 0 auto; font-size: 13px; object-fit: cover; }
span.del-av { display: grid; place-items: center; background: var(--panel-2); color: var(--accent); font-family: var(--font-head); font-weight: 700; }
.del-text { white-space: pre-wrap; word-break: break-word; }
.del-list { max-height: 60vh; overflow: auto; }
.del-item.check { cursor: pointer; user-select: text; }
.del-item > input { margin-top: 6px; flex: 0 0 auto; }
.del-item .del-av, .del-item .hist-main { transition: opacity var(--t-out) var(--ease-out); }
.del-item.del-off .del-av, .del-item.del-off .hist-main { opacity: .45; }
.rec-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr)); gap: 12px; }
.rec-stat { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: var(--r-sm); background: var(--bg); border: 1px solid var(--border); }
.rec-stat b { font-family: var(--font-head); font-size: 26px; line-height: 1; font-variant-numeric: tabular-nums; }
.rec-stat .rec-sub { font-size: 12px; color: var(--muted); }

/* Charts (AI usage): one accent series, thin marks, recessive grid, hover tooltip, Table view */
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid { stroke: var(--border); stroke-width: 1; opacity: .6; }
.chart .axis { fill: var(--muted); font-size: 11px; font-family: inherit; }
.chart .bar { fill: var(--accent); transition: filter var(--t-out) var(--ease-out); }
.chart .bar.hot { filter: brightness(1.25) saturate(1.1) drop-shadow(0 0 2.5px var(--accent)); }
.chart .bar.alt.hot { filter: brightness(1.2) drop-shadow(0 0 2.5px var(--chart-2)); }
.chart .bar.down.hot { filter: brightness(1.2) drop-shadow(0 0 2.5px var(--bad)); }
.chart .bar.down { fill: var(--bad); }
.chart .bar.alt { fill: var(--chart-2); }
.chart .axis.alt { fill: var(--chart-2); }
/* Empty statistics and charts stay and say "No data yet" */
.chart .no-data { fill: var(--muted); font-size: 13px; font-family: inherit; }
.no-data-tag { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); padding: 4px 12px; border-radius: var(--r-pill); background: var(--panel); color: var(--muted); font-size: 13px; pointer-events: none; white-space: nowrap; }
.ring-mid.nd b { display: none; }
.chart .line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .dot { fill: var(--accent); stroke: var(--panel); stroke-width: 2; }
.chart .cross { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
.chart .hit { fill: transparent; cursor: crosshair; }
/* One tooltip look everywhere (charts, tiles, bars, the command tip, the cost circle): bold first line, muted details */
.chart-tip { position: fixed; z-index: var(--z-tip); pointer-events: none; display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: var(--radius); background: var(--panel-2); border: 1px solid var(--border); color: var(--text); font-size: 13px; box-shadow: var(--shadow-2); opacity: 0; transform: translateY(4px); transition: opacity var(--t-out) var(--ease-out), transform var(--t-out) var(--ease-out); }
.chart-tip.on { opacity: 1; transform: none; }
.chart-tip span { color: var(--muted); }
.chart-table { max-height: 260px; overflow: auto; }
.chart-table table { width: 100%; border-collapse: collapse; font-size: 13px; }
.chart-table th, .chart-table td { text-align: left; padding: 5px 8px; border-bottom: 1px solid var(--border); }
.chart-table th { color: var(--muted); font-weight: 600; }
.chart-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.chart-pair > * { min-width: 0; }
@media (max-width: 899px) { .chart-pair { grid-template-columns: 1fr; } }
.hbars { display: flex; flex-direction: column; gap: 8px; }
.hb-more { display: flex; flex-direction: column; gap: 8px; }
.hb-row { display: grid; grid-template-columns: minmax(120px, 34%) 1fr auto; gap: 12px; align-items: center; }
.hb-label { display: flex; flex-direction: column; min-width: 0; }
.hb-label span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
/* every bar: square where it starts, 4px round where it ends; a bar under the mouse (or tapped) brightens */
.hb-track { position: relative; height: 12px; border-radius: 0 4px 4px 0; background: var(--panel-2); }
.hb-fill { height: 100%; border-radius: 0 4px 4px 0; background: var(--accent); min-width: 0; transition: filter var(--t-out) var(--ease-out); }
.hb-row { -webkit-tap-highlight-color: transparent; }
.hb-row.hot .hb-fill, .cap-track:hover .cap-fill { filter: brightness(1.25) saturate(1.1) drop-shadow(0 0 2.5px var(--accent)); }
.hb-cap { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--text); border-radius: 1px; box-shadow: 0 0 0 2px var(--panel); }
.hb-val { font-variant-numeric: tabular-nums; font-size: 13px; white-space: nowrap; }
@media (max-width: 599px) { .hb-row { grid-template-columns: 1fr auto; } .hb-track { grid-column: 1 / -1; grid-row: 2; } }
.cap-bars { position: relative; display: grid; grid-template-columns: repeat(var(--n, 8), minmax(0, 1fr)); gap: 12px; }
.cap-col { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; text-align: center; }
.cap-top, .cap-in { width: 100%; height: 32px; border-radius: var(--r-sm); font: 600 13px/1 var(--font-body); font-variant-numeric: tabular-nums; text-align: center; }
.cap-top { border: 1px solid var(--border); background: var(--panel-2); color: var(--text); cursor: pointer; padding: 0 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: border-color var(--t-out) var(--ease-out), background var(--t-out) var(--ease-out); -webkit-tap-highlight-color: transparent; }
.cap-top:focus-visible { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--panel-2)); }
@media (hover: hover) { .cap-top:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--panel-2)); } }
.cap-col.none .cap-top { color: var(--muted); font-weight: 500; }
.cap-in { border: 1px solid var(--accent); background: var(--bg); color: var(--text); padding: 0 4px; min-width: 0; }
.cap-track { position: relative; width: 100%; max-width: 64px; height: 150px; border-radius: 4px 4px 0 0; background: var(--panel-2); overflow: hidden; display: flex; align-items: flex-end; }
.cap-fill { width: 100%; background: var(--accent); border-radius: 4px 4px 0 0; transition: height var(--t-in) var(--ease-ios), filter var(--t-out) var(--ease-out); }
.cap-col.paused .cap-fill { background: var(--bad); }
.cap-col.none .cap-track { align-items: center; justify-content: center; border: 1px dashed var(--border); background: transparent; cursor: pointer; }
.cap-none { font-size: 11px; color: var(--muted); line-height: 1.2; padding: 0 4px; }
.cap-spent { font-size: 13px; font-variant-numeric: tabular-nums; }
.cap-name { font-size: 11px; color: var(--muted); line-height: 1.25; max-width: 100%; overflow-wrap: anywhere; }
@media (max-width: 599px) { .cap-bars { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 16px; } .cap-track { max-width: 56px; height: 120px; } }
/* Auto grids: as many columns as fit, each at least --min wide */
:is(.cap-grid, .test-grid, .xp-nums, .tool-grid, .bn-gallery, .cb-grid, .cb-checks) { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(var(--min), 100%), 1fr)); gap: var(--gap); }
.cap-grid { --min: 210px; --gap: 12px; }
.ai-alert { border-color: color-mix(in srgb, var(--bad) 55%, var(--border)); }
/* Chatbot memory */
.cb-person { border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--bg); }
.cb-head { display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
.cb-notes { display: flex; flex-direction: column; gap: 6px; padding: 0 14px 14px; }
.cb-note { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: var(--r-sm); background: var(--panel-2); }
.cb-n { color: var(--muted); font-variant-numeric: tabular-nums; min-width: 20px; }
/* Stats refresh, Test Lab */
.gun-nav { gap: 8px; flex-wrap: nowrap; flex: none; }
.gun-nav .btn { width: 48px; height: 48px; padding: 0; justify-content: center; border-radius: var(--r-sm); }
.gun-nav .btn svg { width: 28px; height: 28px; }
.stat-grid { display: flex; flex-direction: column; gap: 12px; }
/* Stats refresh: the stats card, editable (same layout as lib/statsCard.js) */
.sc-card { position: relative; max-width: 560px; background: var(--panel-2); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.sc-card::before { content: ''; position: absolute; left: 0; top: 0; width: 4px; height: 70px; background: var(--accent); }
.sc-head { padding: 12px 18px 12px; border-bottom: 1px solid var(--border); margin: 0 0 0; }
.sc-cat { font-size: 13px; letter-spacing: .12em; color: var(--accent); font-weight: 600; }
.sc-name { font-family: var(--font-head); font-size: 32px; font-weight: 700; line-height: 1.05; }
.sc-body { display: grid; grid-template-columns: 112px 1fr; gap: 18px; padding: 14px 18px 16px; }
.sc-left { display: flex; flex-direction: column; gap: 10px; }
.sc-lbl { display: flex; align-items: center; gap: 6px; font-size: 14px; letter-spacing: .08em; color: var(--muted); }
.sc-right { display: flex; flex-direction: column; justify-content: space-between; gap: 10px; }
.sc-bar-top { display: flex; align-items: center; gap: 6px; }
.sc-bar-lbl { font-size: 16px; letter-spacing: .04em; font-weight: 600; }
.sc-track { position: relative; height: 5px; margin-top: 6px; background: linear-gradient(var(--dim), var(--dim)) 0 2px / 100% 1px no-repeat; }
.sc-fill { position: absolute; left: 0; top: 0; height: 5px; background: var(--text); transition: width var(--t-in) var(--ease-ios); }
.sc-fill::after { content: ''; position: absolute; right: -5px; top: 7px; border: 5px solid transparent; border-top: 0; border-bottom: 7px solid var(--muted); }
.sc-icons { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin: 0 16px; padding: 12px 0 14px; border-top: 1px solid var(--border); }
.sc-slot { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; position: relative; }
.sc-slot .sc-dot { position: absolute; top: 2px; right: 4px; }
.sc-ico { display: grid; place-items: center; height: 40px; color: var(--text); }
.sc-ico svg { width: 40px; height: 40px; }
input.sc-in { background: transparent; border: 1px dashed var(--border); border-radius: 6px; color: var(--text); padding: 2px 6px; min-width: 0; width: 100%; transition: border-color var(--t-out) var(--ease-out), color var(--t-out) var(--ease-out); }
@media (hover: hover) { input.sc-in:hover { border-color: var(--muted); } }
input.sc-in:focus { border-style: solid; border-color: var(--accent); }
input.sc-bignum { font-family: var(--font-head); font-size: 38px; font-weight: 700; line-height: 1.1; padding: 0 6px; }
input.sc-small { width: 64px; font-size: 16px; text-align: right; }
input.sc-center { width: 100%; text-align: center; color: var(--muted); font-size: 15px; }
input.sc-in.chg { color: var(--warn); }
input.sc-in.edited { border-style: solid; border-color: var(--accent); }
.sc-was { font-size: 12px; color: var(--muted); white-space: nowrap; animation: stat-was-in var(--t-in) var(--ease-ios); }
.sc-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex: none; }
.sc-legend .sc-dot { vertical-align: 1px; }
.sc-range { max-width: 560px; }
.sc-range > span { display: flex; align-items: center; gap: 6px; }
.sc-range input.sc-in { font-size: 15px; padding: 8px 10px; }
@keyframes stat-was-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .sc-was { animation: none; } .sc-fill { transition: none; } }
@media (max-width: 599px) {
  .sc-body { grid-template-columns: 92px 1fr; gap: 12px; padding: 12px 14px 14px; }
  input.sc-bignum { font-size: 30px; }
  .sc-bar-lbl { font-size: 14px; }
  input.sc-small { width: 54px; font-size: 15px; }
  .sc-icons { gap: 4px; margin: 0 12px; }
  .sc-ico svg { width: 34px; height: 34px; }
  input.sc-center { font-size: 12px; padding: 2px 1px; }
}
.test-grid { --min: 200px; --gap: 8px; }
.test-tile { display: flex; flex-direction: column; gap: 4px; text-align: left; padding: 12px 14px; border-radius: var(--r-sm); border: 1px solid var(--border); background: var(--bg); color: inherit; font: inherit; cursor: pointer; transition: border-color var(--t-out) var(--ease-out), transform var(--t-tap) var(--ease-out); }
@media (hover: hover) { .test-tile:hover { border-color: var(--accent); } }
.test-tile:active { transform: scale(.965); }
.test-tile.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.test-card { width: 100%; height: auto; border-radius: var(--radius); }
.test-send { flex-wrap: wrap; }
.test-out { scroll-margin-top: 80px; }
/* Test Lab: Health Checks */
.hc-list { display: flex; flex-direction: column; gap: 8px; }
.hc-row { border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--bg); transition: border-color var(--t-out) var(--ease-out); }
.hc-row.warn { border-color: color-mix(in srgb, var(--warn) 45%, var(--border)); }
.hc-row.fail { border-color: color-mix(in srgb, var(--bad) 45%, var(--border)); }
.hc-head { display: flex; align-items: center; gap: 8px; padding: 6px 10px 6px 4px; }
.hc-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 6px 8px; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; border-radius: var(--r-sm); }
.hc-main[aria-expanded="true"] .hc-tag { box-shadow: inset 0 0 0 1px currentColor; }
.hc-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.hc-dot { flex: none; width: 12px; height: 12px; border-radius: 50%; background: var(--border); transition: background-color var(--t-in) var(--ease-out), transform var(--t-in) var(--ease-out); }
.hc-dot.pass { background: var(--good); }
.hc-dot.warn { background: var(--warn); }
.hc-dot.fail { background: var(--bad); }
.hc-tag { flex: none; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: var(--r-pill); }
.hc-tag.pass { color: var(--good); background: color-mix(in srgb, var(--good) 14%, transparent); }
.hc-tag.warn { color: var(--warn); background: color-mix(in srgb, var(--warn) 14%, transparent); }
.hc-tag.fail { color: var(--bad); background: color-mix(in srgb, var(--bad) 14%, transparent); }
.hc-details { display: flex; flex-direction: column; gap: 4px; padding: 0 14px 12px 34px; overflow-wrap: anywhere; }
@media (max-width: 640px) { .hc-details { padding-left: 14px; } }
/* XP and levels, Trophies (Staff Panel) */
.xp-src { display: flex; flex-direction: column; gap: 8px; padding-top: 12px; border-top: 1px solid var(--border); transition: opacity var(--t-out) var(--ease-out); }
.xp-src:first-of-type { border-top: 0; padding-top: 0; }
.xp-src.off .xp-nums { opacity: .45; }
.xp-nums { --min: 130px; --gap: 8px; }
.xp-num input { width: 100%; }
.xp-nums.dim { opacity: .45; transition: opacity var(--t-out) var(--ease-out); }
.xp-range-row { display: flex; align-items: center; gap: 6px; }
.xp-range-row input { width: 76px; }
.xp-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.bd-date { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 10px; }
@media (max-width: 520px) { .bd-date { grid-template-columns: 1fr 1fr; } .bd-date > :first-child { grid-column: 1 / -1; } }
.xp-range-dash { color: var(--muted); font-weight: 600; }
.xp-nums:has(.xp-range) { grid-template-columns: repeat(auto-fill, minmax(170px, auto)); justify-content: start; }
.boost-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; }
.boost-row .field { flex: 0 0 auto; }
.boost-row .field .boost-hours { width: 84px; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--panel-2); overflow: hidden; }
.stepper-btn { width: 40px; height: 40px; border: 0; background: none; color: var(--text); font-size: 20px; cursor: pointer; transition: background var(--t-out) var(--ease-out), transform var(--t-out) var(--ease-spring); }
@media (hover: hover) { .stepper-btn:hover { background: color-mix(in srgb, var(--accent) 18%, transparent); } }
.stepper-val { min-width: 48px; color: var(--text); text-align: center; font-family: var(--font-head); font-size: 20px; }
.boost-timer { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: var(--r-sm); background: color-mix(in srgb, var(--accent) 12%, var(--panel-2)); border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--border)); }
.boost-clock { font-family: var(--font-head); font-size: 30px; line-height: 1; font-variant-numeric: tabular-nums; color: var(--accent); }
.boost-go { align-self: flex-start; }
.danger-zone { border-color: color-mix(in srgb, var(--bad) 40%, var(--border)); }
.tr-head { display: flex !important; align-items: center; gap: 12px; }
.tr-medal { width: 44px; height: 44px; flex: 0 0 auto; }
.tr-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
.tr-text b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tr-item.off .tr-medal { filter: grayscale(1); opacity: .5; }
.tr-who .chip { font-size: 13px; }
/* Banner creator */
.bn-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.bn-bar > .choice { flex: 1 1 170px; min-width: 150px; }
.bn-acts { margin-left: auto; flex-wrap: wrap; }
.bn-stage { display: flex; flex-direction: column; gap: 6px; }
.bn-stage .pic { border-radius: var(--r-sm); overflow: hidden; border: 1px solid var(--border); background-color: var(--panel-2); background-image: linear-gradient(45deg, var(--border) 25%, transparent 25%, transparent 75%, var(--border) 75%), linear-gradient(45deg, var(--border) 25%, transparent 25%, transparent 75%, var(--border) 75%); background-size: 20px 20px; background-position: 0 0, 10px 10px; }
.bn-stage .pic img { display: block; width: 100%; height: auto; max-height: 62vh; object-fit: contain; }
.bn-els { margin-bottom: 0; }
.tool-grid { --min: 280px; --gap: 12px 16px; }
.tool-row { display: flex; flex-direction: column; gap: 4px; }
.tool-ctl { display: flex; flex-direction: column; gap: 6px; }
.tool-seg { margin-bottom: 0; flex-wrap: wrap; }
.tool-seg button { min-height: 32px; font-size: 13px; }
.style-chips { gap: 6px; }
.cp-btns { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.cp-btn { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 5px; border-radius: var(--r-pill); border: 1px solid var(--border); background: var(--bg); color: inherit; font: inherit; font-size: 13px; cursor: pointer; }
@media (hover: hover) { .cp-btn:hover { border-color: var(--accent); } }
.cp-dot { width: 20px; height: 20px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(255,255,255,.25); }
.grad-strip { flex: 1 1 100%; height: 10px; border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.15); }
.cp-row { display: flex; gap: 8px; align-items: center; }
.cp-now { width: 40px; height: 40px; border-radius: var(--r-sm); flex: 0 0 auto; box-shadow: inset 0 0 0 1px rgba(255,255,255,.25); }
.cp-row input[type=text] { flex: 1; }
.cp-slots { display: grid; grid-template-columns: repeat(10, 1fr); gap: 6px; }
.cp-slot { aspect-ratio: 1; border-radius: var(--r-sm); border: 2px solid transparent; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(255,255,255,.2); color: var(--muted); font-size: 18px; background: var(--panel-2); transition: transform var(--t-tap) var(--ease-out); }
.cp-slot:active { transform: scale(.965); }
.cp-slot.on { border-color: var(--text); }
.bn-text { width: 100%; resize: vertical; }
.bn-text.one { min-height: 44px; }
.bn-pic { padding: 12px; border-radius: var(--r-sm); border: 1px dashed var(--border); }
.bn-range { width: 100%; accent-color: var(--accent); }
.bn-walls { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.bn-wall { position: relative; display: grid; gap: 5px; padding: 5px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--panel-2); color: inherit; font: inherit; text-align: left; cursor: pointer; transition: border-color var(--t-in) var(--ease-ios), transform var(--t-in) var(--ease-ios), box-shadow var(--t-in) var(--ease-ios); }
.bn-wall:hover, .bn-wall:focus-visible { border-color: var(--accent); transform: translateY(-1px); }
.bn-wall.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.bn-wall img, .bn-wall-none { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 6px; background: repeating-conic-gradient(rgba(255,255,255,.06) 0 25%, transparent 0 50%) 0 0 / 14px 14px; }
.bn-wall-name { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bn-wall-tag { position: absolute; top: 9px; left: 9px; padding: 1px 7px; border-radius: 999px; font-size: 11px; font-weight: 700; color: #fff; background: rgba(0,0,0,.55); }
.bn-post-img { max-width: 100%; border-radius: var(--r-sm); display: block; }
.bn-gallery { --min: 260px; --gap: 12px; }
.bn-card { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: var(--r-sm); border: 1px solid var(--border); background: var(--bg); }
.bn-thumb { padding: 0; border: 0; background: var(--panel-2); border-radius: var(--r-sm); overflow: hidden; cursor: zoom-in; }
.bn-thumb img { display: block; width: 100%; height: auto; }
.bn-meta { display: flex; flex-direction: column; gap: 2px; }
.bn-card-acts { flex-wrap: wrap; }
@media (max-width: 599px) { .cp-slots { grid-template-columns: repeat(5, 1fr); } .bn-acts { margin-left: 0; } }
/* Member list: recent actions */
.recent-act .tag { font-size: 11px; }
.tag.act-warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 50%, var(--border)); }
.tag.act-mute { color: color-mix(in srgb, var(--warn) 45%, var(--bad)); border-color: color-mix(in srgb, color-mix(in srgb, var(--warn) 45%, var(--bad)) 50%, var(--border)); }
.tag.act-kick { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 50%, var(--border)); }
.tag.act-ban { color: var(--on-bad); background: var(--bad); border-color: var(--bad); }
.tag.act-undo { color: var(--good); border-color: color-mix(in srgb, var(--good) 50%, var(--border)); }
/* A warn, mute or action row on a member's page: its text opens the case. */
.case-open { background: none; border: 0; padding: 0; color: inherit; font: inherit; text-align: left; cursor: pointer; border-radius: 6px; transition: opacity var(--t-out) var(--ease-out); }
@media (hover: hover) { .case-open:hover { opacity: .8; } }
.case-open:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.swatch .nm .st.anim { color: var(--muted); font-size: 11px; }
.swatch .nm .st.anim.on { color: var(--good); }

/* Phones: unsaved changes = a round Save button beside the Menu pill (the pill slides left to make room). */
.mob-save { display: none; }
@media (max-width: 759px) {
  .setup-bar { display: none; }
  .morph { transition: width var(--t-out) var(--ease-out), height var(--t-out) var(--ease-out), border-radius var(--t-out) var(--ease-out), background var(--t-out) var(--ease-out), box-shadow var(--t-out) var(--ease-out), border-color var(--t-out) var(--ease-out), translate var(--t-in) var(--ease-ios), margin-left var(--t-in) var(--ease-ios), opacity var(--t-out) var(--ease-out), transform var(--t-out) var(--ease-out); }
  .morph.open { transition: width var(--t-in) var(--ease-spring), height var(--t-in) var(--ease-spring) var(--lead), border-radius var(--t-in) var(--ease-ios), background var(--t-in) var(--ease-ios), box-shadow var(--t-in) var(--ease-ios), border-color var(--t-in) var(--ease-ios), translate var(--t-in) var(--ease-ios), margin-left var(--t-in) var(--ease-ios); }
  body.save-ready .morph:not(.open) { translate: calc(-50% - 30px) 0; }
  /* app.js syncMobSave: .show pops it in, .hiding shrinks it away */
  .mob-save { display: none; place-items: center; position: fixed; z-index: calc(var(--z-nav) + 2); bottom: calc(14px + env(safe-area-inset-bottom)); left: calc(50% + 59px); width: 46px; height: 46px; margin: 0; padding: 0; border-radius: 50%; border: 0; -webkit-appearance: none; appearance: none; background: var(--accent); color: var(--accent-ink); box-shadow: var(--shadow-1); cursor: pointer; -webkit-tap-highlight-color: transparent; }
  .mob-save svg { width: 22px; height: 22px; display: block; }
  .mob-save.show { display: grid; transform-origin: right center; animation: mob-save-in var(--t-in) var(--ease-spring) var(--lead) backwards; } /* grows out of its right edge */
  .mob-save.show:active { transform: scale(.92); }
  .mob-save.hiding { display: grid; pointer-events: none; transform-origin: right center; animation: mob-save-out var(--t-out) var(--ease-out) forwards; } /* shrinks into its right edge */
}
@keyframes mob-save-in { from { opacity: 0; transform: scale(0); } to { opacity: 1; transform: none; } }
@keyframes mob-save-out { to { opacity: 0; transform: scale(0); } }
@media (max-width: 759px) and (prefers-reduced-motion: reduce) { .morph, .morph.open { transition: none !important; } .mob-save.show { animation: none; } }

/* ---------- Analytics (#/analytics) ---------- */
.an-controls { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.an-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-bottom: 0; }
.an-tabs::-webkit-scrollbar { display: none; }
.an-tabs button { white-space: nowrap; }
.an-body { transition: opacity var(--t-out) var(--ease-out); }
.an-body.loading { opacity: .55; pointer-events: none; }
.an-delta { font-size: 13px; font-weight: 700; min-height: 18px; }
.an-delta.up { color: var(--good); }
.an-delta.down { color: var(--bad); }
.an-delta.flat { color: var(--muted); }
.an-delta .muted { font-weight: 400; }
.an-live { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--muted); }
.an-live-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 0 color-mix(in srgb, var(--good) 60%, transparent); animation: status-ping var(--t-loop) var(--ease-out) infinite; }
.an-heat { position: relative; display: grid; grid-template-columns: 34px repeat(24, minmax(0, 1fr)); gap: 3px; align-items: center; }
.an-heat-day { font-size: 12px; color: var(--muted); }
.an-heat-cell { aspect-ratio: 1; border-radius: 3px; background: color-mix(in srgb, var(--accent) calc(var(--a) * 100%), var(--panel-2)); border: 1px solid color-mix(in srgb, var(--border) 60%, transparent); -webkit-tap-highlight-color: transparent; transition: filter var(--t-out) var(--ease-out); }
.an-heat-cell.hot { filter: brightness(1.25) saturate(1.1) drop-shadow(0 0 2.5px var(--accent)); outline: 1.5px solid var(--accent); }
.an-heat-hour { font-size: 11px; color: var(--muted); white-space: nowrap; }
.an-funnel { position: relative; display: flex; flex-direction: column; gap: 8px; }
.an-step { position: relative; min-height: 52px; border-radius: var(--r-sm); background: var(--bg); overflow: hidden; }
.an-step-bar { position: absolute; inset: 0 auto 0 0; width: var(--w); background: color-mix(in srgb, var(--accent) 26%, transparent); border-right: 3px solid var(--accent); transform-origin: left; animation: an-grow var(--t-in) var(--ease-ios) both; }
@keyframes an-grow { from { transform: scaleX(0); } }
.an-quiet .an-step-bar { animation: none; }
.an-step-txt { position: relative; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; padding: 8px 14px; }
.an-step-txt b { font-family: var(--font-head); font-size: 22px; }
.an-board { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.an-board li { display: flex; align-items: center; gap: 12px; padding: 6px 12px; border-radius: var(--r-sm); background: var(--bg); min-width: 0; }
.an-board li.pick { cursor: pointer; transition: background var(--t-out) var(--ease-out); }
@media (hover: hover) { .an-board li.pick:hover { background: color-mix(in srgb, var(--accent) 12%, var(--bg)); } }
.an-board .av { width: 32px; height: 32px; flex: 0 0 auto; }
.an-board .n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.an-board b { font-variant-numeric: tabular-nums; }
.an-rank { width: 22px; text-align: right; font-family: var(--font-head); font-weight: 700; color: var(--accent); }
.an-anon { display: grid; place-items: center; border-radius: 50%; background: var(--panel-2); color: var(--muted); font-family: var(--font-head); font-weight: 700; }
.an-member-head { display: flex; align-items: center; gap: 12px; }
.an-member-head > div { flex: 1; min-width: 0; }
.an-member-head .av { width: 64px; height: 64px; }
.an-live-list { display: flex; flex-direction: column; gap: 6px; }
.an-live-row { display: flex; align-items: center; gap: 8px; }
.an-body .rec-stats { grid-template-columns: repeat(auto-fit, minmax(min(100%, 124px), 1fr)); gap: 8px; }
.an-body .rec-stat { padding: 10px 12px; }
.an-body .rec-stat b { font-size: 22px; }
.an-sw { margin: 0; }
.an-body .rec-stat.has-pop { transition: border-color var(--t-out) var(--ease-out), background var(--t-out) var(--ease-out), box-shadow var(--t-out) var(--ease-out); }
.an-body .rec-stat.has-pop:hover, .an-body .rec-stat.pop-on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--bg)); box-shadow: var(--shadow-2); }
.an-body .rec-stat.pop-on { z-index: var(--z-drop); }
.an-duals { display: flex; flex-direction: column; gap: 4px; }
.an-dual-name { display: block; font-size: 12px; font-weight: 600; color: var(--accent); }
.an-dual.alt .an-dual-name { color: var(--chart-2); }
.an-dual.alt .chart .bar { fill: var(--chart-2); }
.an-dual.alt .chart .bar.hot { filter: brightness(1.2) drop-shadow(0 0 2.5px var(--chart-2)); }
.an-legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); }
.an-legend span { display: inline-flex; align-items: center; gap: 6px; }
.an-legend i { width: 10px; height: 10px; border-radius: 3px; background: var(--accent); }
.an-legend .alt i { background: var(--chart-2); }
.an-pop { position: absolute; top: calc(100% + 6px); left: 0; width: 290px; max-height: 320px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; padding: 6px; border-radius: var(--r-sm); background: var(--panel-2); border: 1px solid var(--border); box-shadow: var(--shadow-3); animation: an-pop-in var(--t-in) var(--ease-ios) both; }
.an-pop.flip { left: auto; right: 0; }
.an-pop.leaving { animation: an-pop-out var(--t-out) var(--ease-out) both; pointer-events: none; }
.an-body .rec-stat.has-pop::after { content: ''; position: absolute; left: 0; right: 0; top: 100%; height: 8px; } /* a bridge, so moving down to the list keeps it open */
.an-pop-row { display: flex; align-items: center; gap: 7px; padding: 3px 6px; border-radius: var(--r-sm); font-size: 12px; animation: an-pop-in var(--t-in) var(--ease-ios) both; animation-delay: calc(var(--i) * 30ms); }
.an-pop-row .av { width: 18px; height: 18px; flex: 0 0 auto; border-radius: 50%; object-fit: cover; font-size: 10px; }
.an-body .av { border-radius: 50%; object-fit: cover; flex: 0 0 auto; }
.an-who-n { display: inline-flex; align-items: center; gap: 8px; }
.an-who-n .av { width: 22px; height: 22px; font-size: 11px; }
.an-pop-row .av.ph { display: grid; place-items: center; background: var(--panel); color: var(--muted); }
.an-pop-row .n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.an-body .an-pop-row b { font-family: inherit; font-size: 12px; white-space: nowrap; line-height: inherit; font-variant-numeric: tabular-nums; }
@keyframes an-pop-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@keyframes an-pop-out { to { opacity: 0; transform: translateY(-4px); } }
@media (prefers-reduced-motion: reduce) { .an-pop, .an-pop-row { animation: none; } }
.an-body .rec-stat { position: relative; }
.an-tag { position: absolute; top: 10px; right: 10px; padding: 0 6px; border-radius: var(--r-pill); border: 1px solid var(--border); font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); line-height: 16px; }
.an-body .an-board { gap: 4px; }
.an-body .an-board li { padding: 4px 10px; }
.an-body .an-board .av { width: 26px; height: 26px; }
.an-sw button { min-height: 28px; padding: 0 10px; font-size: 13px; transition: background var(--t-out) var(--ease-out), border-color var(--t-out) var(--ease-out), color var(--t-out) var(--ease-out); }
.an-group { display: flex; flex-direction: column; gap: 12px; }
.an-group-head { display: flex; align-items: center; gap: 10px; width: 100%; padding: 4px 0 8px; border: 0; border-bottom: 1px solid var(--border); background: none; color: var(--text); cursor: pointer; text-align: left; }
.an-group-head h2 { margin: 0; flex: 1; }
.an-group-head .chev { transform: rotate(-90deg); }
.an-group-head.open .chev { transform: none; }
.an-live-row .av { width: 24px; height: 24px; }
.an-live-row .n { flex: 1; }
.an-who td, .an-who th { white-space: nowrap; }
.an-who-n { display: inline-flex; align-items: center; gap: 8px; }
.an-who-n .av { width: 24px; height: 24px; }
.an-weekly { flex-wrap: wrap; align-items: center; gap: 8px; }
.an-weekly input[type=time] { width: auto; }
@media (max-width: 599px) {
  .an-heat { grid-template-columns: 28px repeat(24, minmax(0, 1fr)); gap: 1px; }
  .an-heat-hour { font-size: 9px; }
}

/* Staff Panel > Chatbot > Settings */
.cb-area { border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--panel-2); } /* no clipping: dropdowns inside spill out */
.cb-area-head { border-radius: var(--r-sm); display: flex; align-items: center; gap: 8px; padding: 12px 14px; }
.cb-area-body { padding: 4px 14px 16px; display: flex; flex-direction: column; gap: 12px; }
.cb-grid { --min: 200px; --gap: 12px; }
.cb-sub { margin: 6px 0 0; }
.cb-checks { --min: 230px; --gap: 6px; }
.cb-chans { max-height: 260px; overflow-y: auto; }
.cb-check { display: flex; justify-content: space-between; gap: 12px; cursor: pointer; align-items: center; padding: 8px 12px; border-radius: var(--r-sm); border: 1px solid var(--border); background: var(--bg); }
.cb-check-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.cb-sw { padding: 4px 0; }
.cb-sec { display: flex; flex-direction: column; gap: 8px; padding-top: 12px; border-top: 1px solid var(--border); }
.cb-sec .tag { margin-left: 8px; }
.cb-text { width: 100%; min-height: 140px; font: inherit; font-size: 15px; line-height: 1.45; resize: vertical; }
.cb-sec-foot { justify-content: space-between; align-items: center; }
/* Chatbot settings beside the preview chat (stacked on narrow screens) */
.cb-layout { display: grid; gap: 16px; grid-template-columns: minmax(0, 1.4fr) minmax(300px, 1fr); align-items: start; }
@media (max-width: 1100px) { .cb-layout { grid-template-columns: 1fr; } }
.pv-pane { position: sticky; top: 78px; }
.pv-list { height: min(56vh, 520px); flex: none; }
.pv-extra { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.pv-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.pv-btn { padding: 4px 10px; border-radius: var(--r-sm); border: 1px solid var(--border); background: var(--panel-2); font-size: 13px; font-weight: 600; }
.pv-note { font-size: 12px; color: var(--muted); }

/* Visible Admin Tools: a moderator looking at an admin tool */
.vo-off { opacity: .45; cursor: not-allowed !important; filter: grayscale(.6); }
@media (hover: hover) { .vo-off:hover { opacity: .45; cursor: not-allowed !important; filter: grayscale(.6); } }
.vo-off:active, .switch.vo-off:active span { transform: none; }
.switch.on.vo-off:active span { transform: translateX(22px); width: 22px; }

/* Chatbot: Try it takes the Logs column (wide screens) */
.staff-layout.side-on { gap: 16px; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
@media (min-width: 1101px) { .staff-layout { transition: grid-template-columns var(--t-in) var(--ease-ios), gap var(--t-in) var(--ease-ios); } }
.staff-side .pv-pane { position: static; }
main.staff-app .staff-side { height: 100%; min-height: 0; display: flex; flex-direction: column; }
main.staff-app .staff-side .pv-pane { flex: 1; min-height: 0; display: flex; flex-direction: column; }
main.staff-app .staff-side .pv-box { flex: 1; min-height: 0; display: flex; flex-direction: column; }
main.staff-app .staff-side .pv-list { flex: 1; height: auto; min-height: 280px; }
.staff-side .pv-list { height: min(72vh, 760px); }
.pv-where { align-self: flex-start; }

/* API > Models: a job, its model and its effort side by side */
.ai-models { display: flex; flex-direction: column; gap: 8px; }
.ai-model-row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, .8fr); gap: 12px; align-items: center; padding: 8px 12px; border-radius: var(--r-sm); border: 1px solid var(--border); background: var(--panel-2); }
.ai-model-name { display: flex; flex-direction: column; min-width: 0; }
.ai-effort { position: relative; min-width: 0; }
.ai-effort > * { width: 100%; }
.bal-acts { display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.bal-acts .btn.small { flex: 1 1 auto; min-width: 0; }
.bal-bell { width: 32px; height: 32px; }
.bal-bell svg { width: 17px; height: 17px; }
@media (max-width: 759px) { .ai-model-row { grid-template-columns: 1fr 1fr; } .ai-model-name { grid-column: 1 / -1; } }

/* Chatbot: the cost per reply, a small circle at the bottom right of the section */
.cb-cost { position: relative; animation: range-in var(--t-in) var(--ease-spring) var(--lead) backwards; } /* rides in the page dock, above the Save Changes bar */
.cb-cost-dot { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; padding: 0; border: 1.5px solid var(--accent); background: var(--panel-2); color: var(--text); font-weight: 800; font-size: 9.5px; letter-spacing: -.3px; box-shadow: var(--shadow-2); cursor: default; transition: border-color var(--t-in) var(--ease-ios), transform var(--t-in) var(--ease-spring); }
.cb-cost.up .cb-cost-dot { border-color: var(--warn); }
.cb-cost.down .cb-cost-dot { border-color: var(--good); }
@media (hover: hover) { .cb-cost:hover .cb-cost-dot { transform: scale(1.08); } .cb-cost:hover .cb-cost-tip { opacity: 1; transform: none; } }
.cb-cost.open .cb-cost-tip { opacity: 1; transform: none; } /* hover opens it on computers; a tap opens and closes it anywhere (phones keep :hover stuck after a tap) */
.cb-cost-tip { position: absolute; right: 0; bottom: calc(100% + 10px); display: flex; flex-direction: column; gap: 2px; min-width: 210px; padding: 8px 10px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--panel-2); color: var(--text); font-size: 13px; box-shadow: var(--shadow-2); opacity: 0; transform: translateY(6px) scale(.97); transform-origin: 100% 100%; pointer-events: none; transition: opacity var(--t-out) var(--ease-out), transform var(--t-in) var(--ease-ios); white-space: nowrap; }
.cb-cost.up .cb-cost-tip b { color: var(--warn); }
.cb-cost.down .cb-cost-tip b { color: var(--good); }
.cb-cost-tip span { color: var(--muted); }
.cb-auto { display: flex; flex-direction: column; gap: 8px; }

.cb-cost-in { display: flex; flex-direction: column; align-items: center; line-height: 1.1; }
.cb-cost-diff { font-size: 8px; font-weight: 700; }
.cb-cost-diff:empty { display: none; }
.cb-cost.up .cb-cost-diff { color: var(--warn); }
.cb-cost.down .cb-cost-diff { color: var(--good); }

/* A dropdown without room below (page or scrolling panel) opens upward */
.drop-menu.up { top: auto; bottom: calc(100% + 6px); transform-origin: 50% 100%; }
.cb-area:has(.drop-menu:not(.hide)) { position: relative; z-index: calc(var(--z-banner) + 1); } /* an open dropdown sits above the next area */

/* Touch screens: text fields stay at 16px or more so iOS never zooms in when the keyboard opens (pinch zoom still works) */
@media (hover: none) and (pointer: coarse) {
  input, textarea, select { font-size: max(16px, 1em) !important; }
}
/* The page itself never scrolls sideways or clips at the edges; wide pieces scroll inside their own box (clip keeps sticky headers working) */
html, body { overflow-x: clip; max-width: 100%; }

/* A page's floating controls (the range control on API and Analytics, the chatbot's cost circle): docked at the bottom
   right of the page's panel (sticky, above the Save bar when it shows), 46px tall like the round Save button.
   Phones: the range control sits beside the Menu pill, which slides left for it (app.js puts it in .shell with .mob and
   sets body.range-on); whatever stays in the dock steps aside while the menu is open. */
.page-dock { position: sticky; bottom: 12px; z-index: 6; display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; pointer-events: none; transition: bottom var(--t-in) var(--ease-ios); }
.page-dock > * { pointer-events: auto; }
.stage-screen:has(.setup-bar:not(.hide)) .page-dock, main:has(.setup-bar:not(.hide)) .page-dock { bottom: 84px; }
.range-box { display: flex; align-items: center; height: 46px; padding: 0 4px; border-radius: var(--r-pill); border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--border)); background: var(--panel-2); box-shadow: var(--shadow-2); pointer-events: auto; transform-origin: right center; animation: range-in var(--t-in) var(--ease-spring) var(--lead) backwards; }
.range-arrow { display: grid; place-items: center; width: 32px; height: 32px; margin: 0; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--accent); cursor: pointer; -webkit-tap-highlight-color: transparent; transition: background var(--t-out) var(--ease-out), transform var(--t-out) var(--ease-spring); }
@media (hover: hover) { .range-arrow:hover { background: color-mix(in srgb, var(--accent) 16%, transparent); } }
.range-arrow:active { transform: scale(.92); }
.range-arrow svg { width: 18px; height: 18px; }
.range-clip { display: inline-block; overflow: hidden; min-width: 108px; padding: 4px 2px; text-align: center; font: 700 17px/1 var(--font-head); letter-spacing: .04em; color: var(--text); }
.range-text { display: inline-block; white-space: nowrap; }
.range-face { display: flex; align-items: center; justify-content: center; }
.range-box.has-swap { position: relative; margin-right: 56px; }
.range-box.has-swap .range-face { width: 176px; }
.range-dates { gap: 2px; }
.range-dates .choice-btn { min-height: 32px; padding: 4px 8px; gap: 4px; border: 0; border-radius: var(--r-pill); background: transparent; font: 700 15px/1 var(--font-head); letter-spacing: .03em; transition: background var(--t-out) var(--ease-out); }
@media (hover: hover) { .range-dates .choice-btn:hover { background: color-mix(in srgb, var(--accent) 16%, transparent); } }
.range-dates .choice-btn svg { width: 14px; height: 14px; color: var(--accent); }
.range-dates .date-menu { top: auto; bottom: calc(100% + 10px); }
.range-to { font-size: 12px; color: var(--muted); }
.range-swap { position: absolute; left: calc(100% + 10px); top: 50%; display: grid; place-items: center; width: 46px; height: 46px; margin-top: -23px; padding: 0; border-radius: 50%; border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--border)); background: var(--panel-2); color: var(--accent); box-shadow: var(--shadow-2); cursor: pointer; -webkit-tap-highlight-color: transparent; transition: background var(--t-out) var(--ease-out), transform var(--t-out) var(--ease-spring); }
@media (hover: hover) { .range-swap:hover { background: color-mix(in srgb, var(--accent) 16%, var(--panel-2)); } }
.range-swap:active { transform: scale(.92); }
.range-glyph { display: grid; place-items: center; }
.range-glyph svg { width: 20px; height: 20px; }
@keyframes range-in { from { opacity: 0; transform: translateY(14px) scale(.85); } to { opacity: 1; transform: none; } }
@keyframes range-pop { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: none; } }
@keyframes range-out { to { opacity: 0; transform: scale(.4); } }
@media (max-width: 759px) {
  .range-dock { display: none; }
  /* Menu pill (150px) + 10px + this (186px), centered together */
  body.range-on:not(.save-ready) .morph:not(.open) { margin-left: -98px; } /* margin, not translate: mixing % and px in translate jumped on phones after the menu closed */
  .range-box.mob { position: fixed; z-index: calc(var(--z-nav) + 1); bottom: calc(14px + env(safe-area-inset-bottom)); left: calc(50% - 13px); transform-origin: left center; animation: range-pop var(--t-in) var(--ease-spring) var(--lead) backwards; transition: opacity var(--t-out) var(--ease-out), transform var(--t-out) var(--ease-out); }
  .range-box.mob.hiding, body.menu-open .range-box.mob, body.save-ready .range-box.mob { opacity: 0; transform: scale(.4); pointer-events: none; }
  .range-box.mob.hiding { animation: range-out var(--t-out) var(--ease-out) forwards; }
  /* With the swap button the pill holds it inside (a 36px circle), so the pair stays centered: menu 150 + 10 + 222 */
  body.range-on.range-swap-on:not(.save-ready) .morph:not(.open) { margin-left: -116px; }
  .range-box.mob.has-swap { left: calc(50% - 31px); margin-right: 0; }
  .range-box.mob.has-swap .range-face { width: 172px; }
  .range-box.mob .range-swap { position: static; width: 36px; height: 36px; margin: 0 0 0 4px; box-shadow: none; }
  .range-box.mob .range-glyph svg { width: 18px; height: 18px; }
  .page-dock > * { transition: opacity var(--t-in) var(--ease-ios), transform var(--t-in) var(--ease-ios); }
  body.menu-open .page-dock > * { opacity: 0; transform: scale(.4); pointer-events: none; transition: opacity var(--t-out) var(--ease-out), transform var(--t-out) var(--ease-out); }
}
@media (prefers-reduced-motion: reduce) { .range-box, .range-box.mob, .page-dock, .page-dock > * { animation: none; transition: none; } }

/* Rings (API page Breakdown): one accent color, gaps between slices; a slice and its row light up together */
.ring-wrap { display: grid; grid-template-columns: auto minmax(0, max-content); justify-content: start; gap: 16px; align-items: center; }
.ring-box { position: relative; flex: none; }
.ring { display: block; width: 100%; height: 100%; overflow: visible; }
.ring-track { fill: none; stroke: var(--panel-2); stroke-width: 9; }
.ring-seg { fill: none; stroke: var(--accent); stroke-width: 9; stroke-linecap: round; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: filter var(--t-out) var(--ease-out), stroke-width var(--t-in) var(--ease-spring); }
.ring-seg.hot { filter: brightness(1.25) saturate(1.1) drop-shadow(0 0 2.5px var(--accent)); stroke-width: 13; }
.ring-mid-sub:empty { display: none; }
.ring-mid { position: absolute; inset: 14%; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; text-align: center; }
.ring-mid b { font: 700 22px/1.1 var(--font-head); letter-spacing: .02em; }
.ring-list { display: flex; flex-direction: column; gap: 1px; min-width: 0; font-size: 12px; }
.ring-row { cursor: default; -webkit-tap-highlight-color: transparent; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 3px 8px; border-radius: var(--r-sm); line-height: 1.35; transition: background var(--t-out) var(--ease-out); }
.ring-row.hot { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.ring-label { min-width: 0; }
.ring-val { flex: none; white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--muted); }
.ring-row.hot .ring-val { color: inherit; }
@media (max-width: 599px) { .ring-wrap { gap: 12px; } .ring-box { width: 128px !important; height: 128px !important; } .ring-box .ring { width: 100%; height: 100%; } .ring-mid b { font-size: 18px; } .ring-row { padding: 3px 6px; } }

/* API page: numbers retype on a range change; one line each so the typing never reflows the page (the jitter on phones) */
.rec-stat b, .chart-card .row-sec p, .ring-label, .ring-mid > * { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.ring-mid > span { font-size: 12px; }
/* a retype empties a line for a moment: keep its height so nothing below moves (except the ring's optional third line) */
:is(.rec-stat b, .rec-stat span, .chart-card .row-sec p, .ring-val, .ring-label, .ring-mid > b, .ring-mid > span:not(.ring-mid-sub)):empty::before { content: '\200b'; }

/* View as role: the button under the greeting, and the bar on every page while previewing */
.va-btn { margin-top: 12px; }
.va-row { gap: 8px; }
.va-bars { gap: 8px; margin: 0 0 16px; }
.va-bars .va-bar { margin: 0; }
.va-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 16px; padding: 8px 10px 8px 16px; border-radius: var(--radius); background: var(--accent); color: var(--accent-ink); font-weight: 700; }
.va-bar .btn { background: rgba(0, 0, 0, .18); border-color: transparent; color: var(--accent-ink); }
.ring-row .ring-label { flex: 1 1 auto; }
.ring-row .ring-av { width: 18px; height: 18px; flex: 0 0 auto; border-radius: 50%; object-fit: cover; font-size: 10px; }
.ring-row .ring-av.ph { display: grid; place-items: center; background: var(--panel); color: var(--muted); }
.an-pop-hint { position: absolute; top: 10px; right: 10px; width: 16px; height: 16px; fill: none; stroke: var(--muted); stroke-width: 1.8; stroke-linecap: round; opacity: .7; pointer-events: none; transition: stroke var(--t-out) var(--ease-out), opacity var(--t-out) var(--ease-out), transform var(--t-out) var(--ease-out); }
.an-body .rec-stat.has-pop:hover .an-pop-hint, .an-body .rec-stat.pop-on .an-pop-hint { stroke: var(--accent); opacity: 1; transform: scale(1.12); }
.an-ring-alt .ring-seg { stroke: var(--chart-2); }
.an-ring-alt .ring-seg.hot { filter: brightness(1.2) drop-shadow(0 0 2.5px var(--chart-2)); }
.an-ring-alt .ring-row.hot { background: color-mix(in srgb, var(--chart-2) 14%, transparent); }
@media (min-width: 900px) { .chart-pair > .an-tall { grid-row: span 2; } .an-tall .chart-body { flex: 1; display: grid; align-content: center; } }
/* Top Chats and Requests (the tall card): a bigger ring, its list underneath */
.an-tall .ring-wrap { grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 18px; }
.an-tall .ring-box { width: 240px !important; height: 240px !important; }
.an-tall .ring-box .ring { width: 100%; height: 100%; }
.an-tall .ring-mid b { font-size: 30px; }
.an-tall .ring-list { width: min(100%, 340px); }

/* ---------- Setup Wizard (staffSetupWizard) ---------- */
.wiz-bar { height: 6px; margin: 0 0 14px; border-radius: var(--r-pill); background: var(--panel-2); overflow: hidden; }
.wiz-bar > span { display: block; height: 100%; background: var(--accent); transform-origin: 0 50%; transition: transform var(--t-show) var(--ease-out); }
.wiz-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 16px; align-items: start; }
.wiz-track { display: flex; flex-direction: column; gap: 4px; }
.wiz-track-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid transparent; border-radius: var(--r-md); background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; transition: background-color var(--t-out) var(--ease-out), border-color var(--t-out) var(--ease-out); }
@media (hover: hover) { .wiz-track-item:hover { background: var(--panel-2); } }
.wiz-track-item.on { border-color: color-mix(in srgb, var(--accent) 60%, var(--border)); background: var(--panel-2); }
.wiz-track-label { flex: 1; min-width: 0; font-weight: 600; }
.wiz-num { position: relative; flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--border); font-size: 13px; font-weight: 700; transition: background-color var(--t-out) var(--ease-out), color var(--t-out) var(--ease-out), border-color var(--t-out) var(--ease-out); }
.wiz-num svg { width: 14px; height: 14px; }
.wiz-track-item.on .wiz-num { border-color: var(--accent); color: var(--accent); }
.wiz-num.complete { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.wiz-num.skipped { border-style: dashed; color: var(--muted); }
.wiz-num.skipped svg { width: 13px; height: 13px; }
/* In Progress: the number with a turning arc around it */
.wiz-num.progress { border-color: color-mix(in srgb, var(--accent) 30%, var(--border)); color: var(--accent); }
.wiz-num.progress::after { content: ''; position: absolute; inset: -1.5px; border-radius: 50%; border: 2px solid transparent; border-top-color: var(--accent); border-right-color: var(--accent); animation: wiz-turn 1.6s linear infinite; }
@keyframes wiz-turn { to { transform: rotate(1turn); } }
.wiz-card h2 { margin: 0 0 2px; }
.wiz-foot { gap: 8px; flex-wrap: nowrap; margin-top: 4px; }
.wiz-foot .btn { flex: none; white-space: pre; gap: 0; }
.wiz-fields > * + * { border-top: 1px solid var(--border); padding-top: 12px; }
.wiz-fields .setup-slot { border-top: 0; padding-top: 0; }
.wiz-fields > .wiz-fold.hide + * { border-top: 0; }
.wiz-sw { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.wiz-sw .switch { flex: none; }
.wiz-sw.big .setup-label b { font-size: 20px; font-family: var(--font-head); letter-spacing: .02em; }
.wiz-cmds { gap: 18px; }
.wiz-cmd-group { gap: 0; }
.wiz-cmd-group h3 { margin: 0 0 4px; font-size: 15px; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }
.wiz-cmd { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); }
.wiz-cmd-group h3 + .wiz-cmd { border-top: 0; }
.wiz-cmd-seg { margin: 0; flex-wrap: nowrap; }
.wiz-cmd-seg button { min-height: 30px; padding: 0 10px; font-size: 14px; transition: background-color var(--t-out) var(--ease-out), border-color var(--t-out) var(--ease-out), color var(--t-out) var(--ease-out); }
@media (max-width: 759px) { .wiz-cmd { grid-template-columns: minmax(0, 1fr) auto; } .wiz-cmd .setup-label { grid-column: 1 / -1; } }
.wiz-slider { display: flex; flex-direction: column; gap: 6px; }
.wsl { --p: 0%; position: relative; padding: 40px 12px 10px; cursor: pointer; touch-action: none; outline: none; -webkit-tap-highlight-color: transparent; }
.wsl-rail { position: relative; height: 6px; border-radius: var(--r-pill); background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--border); }
.wsl-fill { position: absolute; inset: 0 auto 0 0; width: var(--p); border-radius: inherit; background: var(--accent); transition: width var(--t-in) var(--ease-ios); }
.wsl-mark { position: absolute; top: 50%; width: 2px; height: 14px; border-radius: 2px; translate: -50% -50%; background: var(--border); transition: background-color var(--t-in) var(--ease-ios); }
.wsl-mark.past { background: var(--accent); }
.wsl-knob { position: absolute; top: 50%; left: var(--p); width: 22px; height: 22px; border-radius: 50%; translate: -50% -50%; background: #fff; border: 4px solid var(--accent); box-shadow: 0 2px 8px rgba(0,0,0,.45); transition: left var(--t-in) var(--ease-ios), scale var(--t-tap) var(--ease-out), opacity var(--t-in) var(--ease-out), box-shadow var(--t-out) var(--ease-out); }
.wsl.drag .wsl-knob { scale: 1.18; transition: left 120ms var(--ease-out), scale var(--t-tap) var(--ease-out); }
.wsl:focus-visible .wsl-knob { box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 35%, transparent), 0 2px 8px rgba(0,0,0,.45); }
.wsl-bubble { position: absolute; bottom: calc(100% + 14px); left: var(--p); translate: calc(var(--p) * -1) 0; padding: 4px 10px; border-radius: var(--r-pill); background: var(--accent); color: var(--accent-ink); font: 700 13px/1.25 var(--font-head); letter-spacing: .04em; white-space: nowrap; pointer-events: none; transition: left var(--t-in) var(--ease-ios), translate var(--t-in) var(--ease-ios), opacity var(--t-in) var(--ease-out); }
.wsl-bubble::after { content: ''; position: absolute; top: 100%; left: clamp(10px, var(--p), calc(100% - 10px)); translate: -50% 0; border: 5px solid transparent; border-top-color: var(--accent); transition: left var(--t-in) var(--ease-ios); }
.wsl.drag .wsl-bubble { transition: left 120ms var(--ease-out), translate 120ms var(--ease-out); }
.wsl.unset .wsl-bubble { opacity: 0; }
.wsl.unset .wsl-knob { opacity: .55; }
.wiz-details { list-style: none; margin: 6px 0 0; padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--panel-2); display: flex; flex-direction: column; gap: 4px; }
.wiz-details li { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.wiz-details b { color: var(--accent); }
.wiz-details b.off { color: var(--muted); font-weight: 600; }
.wiz-pv { gap: 12px; }
.wiz-pv:empty { display: none; }
.wiz-pv-one { display: flex; flex-direction: column; gap: 6px; }
.wiz-note { margin: 0; min-height: 1.2em; opacity: 0; transition: opacity var(--t-out) var(--ease-out); }
.wiz-note.on { opacity: 1; }
.wiz-preset-btns { flex-wrap: wrap; gap: 6px; }
.wiz-about { margin-top: 8px; }
.wiz-swap { animation: peek-in var(--t-in) var(--ease-out); }
.wiz-sum { gap: 10px; }
.wiz-sum-row { padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--r-md); }
.wiz-sum-row .row { gap: 8px; align-items: center; }
.wiz-changes { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.wiz-changes li { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.wiz-changes li b { color: var(--accent); text-align: right; }
/* Opening the wizard: Battle Buddy pops in with a greeting */
.wiz-hello { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 40px 20px; text-align: center; }
.wiz-hello h2 { margin: 8px 0 0; animation: wiz-rise var(--t-in) var(--ease-ios) 240ms backwards; }
.wiz-hello p { margin: 0; animation: wiz-rise var(--t-in) var(--ease-ios) 380ms backwards; }
.wiz-hello-av { width: 88px; height: 88px; border-radius: 50%; animation: wiz-pop 620ms var(--ease-spring) backwards, wiz-wave 900ms var(--ease-out) 620ms; }
@keyframes wiz-pop { from { transform: scale(.3); opacity: 0; } }
@keyframes wiz-wave { 25% { transform: rotate(-10deg); } 50% { transform: rotate(8deg); } 75% { transform: rotate(-4deg); } }
@keyframes wiz-rise { from { opacity: 0; transform: translateY(10px); } }
/* Complete Setup: a ring and a check draw themselves, then the summary rises in */
.wiz-done-head { display: flex; align-items: center; gap: 14px; }
.wiz-done-head h2 { margin: 0 0 2px; }
.wiz-done-mark svg { display: block; width: 52px; height: 52px; fill: none; stroke: var(--accent); stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }
.wiz-done-mark.play { animation: wiz-pop 520ms var(--ease-spring) backwards; }
.wiz-done-mark.play circle, .wiz-done-mark.play path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: wiz-draw 520ms var(--ease-out) forwards; }
.wiz-done-mark.play circle { animation-delay: 120ms; }
.wiz-done-mark.play path { animation-delay: 520ms; }
@keyframes wiz-draw { to { stroke-dashoffset: 0; } }
.wiz-done-in .wiz-done-head > div { animation: wiz-rise var(--t-in) var(--ease-ios) 700ms backwards; }
.wiz-done-in > :not(.wiz-done-head) { animation: wiz-rise var(--t-in) var(--ease-ios) 900ms backwards; }
.wiz-dock { position: sticky; bottom: 12px; z-index: 6; display: flex; justify-content: flex-start; margin-top: 16px; pointer-events: none; transition: bottom var(--t-in) var(--ease-ios); animation: wiz-float-in var(--t-in) var(--ease-spring) both; }
.wiz-dock.still { animation: none; }
.wiz-dock.leaving { animation: wiz-float-out var(--t-out) var(--ease-out) forwards; }
.stage-screen:has(.setup-bar:not(.hide)) .wiz-dock, main:has(.setup-bar:not(.hide)) .wiz-dock { bottom: 84px; }
.wiz-back { pointer-events: auto; display: inline-flex; align-items: center; gap: 6px; box-shadow: 0 8px 24px rgba(0,0,0,.4); }
.wiz-back svg { width: 16px; height: 16px; }
@keyframes wiz-float-in { from { opacity: 0; transform: translateY(18px) scale(.94); } }
@keyframes wiz-float-out { to { opacity: 0; transform: translateY(12px) scale(.96); } }
/* The welcome previews' column is open: the step list stays on the side, a little narrower, and the step's buttons tighten to stay on one row */
.wiz-layout { transition: grid-template-columns var(--t-in) var(--ease-ios); }
.staff-layout.side-on .wiz-layout { grid-template-columns: 200px minmax(0, 1fr); }
.staff-layout.side-on .wiz-foot { gap: 6px; }
.staff-layout.side-on .wiz-foot .btn { flex: 1 1 auto; min-width: 0; padding: 0 10px; font-size: 14px; letter-spacing: .02em; }
.staff-layout.side-on .wiz-foot .grow { display: none; }
.staff-layout.side-on .wiz-long { display: none; }
@media (max-width: 759px) {
  .wiz-layout { grid-template-columns: minmax(0, 1fr); }
  .wiz-track { flex-direction: row; overflow-x: auto; scrollbar-width: none; }
  .wiz-track-item { flex: none; }
  .wiz-dock, .stage-screen:has(.setup-bar:not(.hide)) .wiz-dock, main:has(.setup-bar:not(.hide)) .wiz-dock { bottom: calc(76px + env(safe-area-inset-bottom)); } /* above the phone MENU pill */
  .wiz-foot { gap: 6px; }
  .wiz-foot .btn { flex: 1 1 auto; min-width: 0; min-height: 38px; padding: 0 8px; font-size: clamp(12px, 3.4vw, 14px); letter-spacing: .02em; }
  .wiz-foot .grow { display: none; }
  .wiz-long { display: none; } /* "Advanced" and "Complete" on phones, so the buttons stay on one row */
}
@media (prefers-reduced-motion: reduce) { .wiz-bar > span, .wiz-layout, .wiz-track-item, .wiz-num, .wiz-note, .wsl-fill, .wsl-mark, .wsl-knob, .wsl-bubble, .wsl-bubble::after { transition: none; } .wiz-swap, .wiz-dock, .wiz-dock.leaving, .wiz-num.progress::after, .wiz-hello *, .wiz-done-in * { animation: none; } }

/* Logging (1.3.68): each log type a card; on, its channel and color slide open under it */
.log-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 759px) { .log-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.log-card { display: flex; flex-direction: column; gap: 8px; padding: 8px 10px; transition: border-color var(--t-out) var(--ease-out); }
.log-card { overflow: visible; position: relative; }
.log-card:has(.drop-menu:not(.hide)) { z-index: 5; }
.log-card-head { display: flex; align-items: center; gap: 8px; min-height: 32px; }
.log-card:not(.on) .log-card-name { opacity: .55; }
.log-card-name { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 13px; line-height: 1.25; transition: opacity var(--t-out) var(--ease-out); }
.log-card-name b { hyphens: auto; }
.log-card .switch { flex: 0 0 auto; zoom: .8; }
.log-cp { flex: 0 0 auto; }
.log-cp .cp-pick { padding: 4px; border: 0; background: none; border-radius: 50%; }
.log-cp .cp-pick > span:not(.cp-dot) { display: none; }
.log-cp .cp-pick .cp-dot { width: 26px; height: 26px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.18); transition: background var(--t-out) var(--ease-out), transform var(--t-tap) var(--ease-out); }
@media (hover: hover) { .log-cp .cp-pick:hover .cp-dot { transform: scale(1.15); } }
.log-cp .cp-pick:active .cp-dot { transform: scale(.9); }
.log-cp:has(.drop-menu:not(.hide):not(.leaving)) .cp-dot { box-shadow: 0 0 0 2px var(--accent); }
.log-card-ch .choice { width: 100%; }
.log-card-ch .choice-btn { min-height: 34px; padding: 6px 10px; font-size: 13px; }
@media (max-width: 759px) { .log-card { padding: 8px; } .log-card-head { gap: 6px; } .log-card-name { font-size: 12.5px; } }
.log-dot { width: 14px; height: 14px; border-radius: 50%; flex: 0 0 auto; box-shadow: inset 0 0 0 1px rgba(255,255,255,.18); transition: background var(--t-out) var(--ease-out); }
.hist-item.bd-past { opacity: .55; } /* Birthdays → This Month: days already gone */

/* Battle Buddy Max: plan cards, the buy pop-up, and the front page's Max button */
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 12px; }
.plan-card { gap: 10px; transition: border-color var(--t-out) var(--ease-out), transform var(--t-out) var(--ease-out); }
.plan-card.hot { border-color: var(--accent); }
/* Plan logos: Battle Buddy's picture in a glow ring that spins clockwise, faster each tier (Start has none). */
.plan-logo { display: flex; align-items: center; gap: 12px; --pl: var(--muted); --pl-spin: 0s; }
.plan-logo.pl-extended, .plan-ring.pl-extended { --pl: #7fb3ff; --pl-spin: 12s; }
.plan-logo.pl-power, .plan-ring.pl-power { --pl: #ff7a1f; --pl-spin: 8s; }
.plan-logo.pl-max, .plan-ring.pl-max { --pl: #ffc83d; --pl-spin: 4s; }
.pl-mark { position: relative; width: 44px; height: 44px; flex: none; }
.pl-mark img { position: relative; z-index: 1; width: 44px; height: 44px; border-radius: 50%; display: block; }
.pl-ring { position: absolute; inset: -5px; border-radius: 50%; display: none;
  background: conic-gradient(from 0deg, var(--pl), transparent 30%, var(--pl) 50%, transparent 80%, var(--pl));
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px)); mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px));
  filter: drop-shadow(0 0 5px var(--pl)) drop-shadow(0 0 2px var(--pl)); animation: pl-spin var(--pl-spin) linear infinite; }
.plan-logo:not(.pl-start) .pl-ring { display: block; }
.plan-logo h2 { font-size: 22px; line-height: 1.05; text-transform: uppercase; letter-spacing: .04em; }
.pl-bb { display: block; font-size: 13px; letter-spacing: .14em; color: var(--muted); }
.pl-tier { color: var(--pl); }
.pl-start .pl-tier { color: var(--text); }
/* The top bar on a paid plan: the same ring, top-bar size. */
.banner-brand.plan-logo { gap: 10px; }
.banner-brand .pl-mark, .banner-brand .pl-mark img { width: 32px; height: 32px; }
.banner-brand .pl-ring { inset: -4px; }
@media (max-width: 480px) { .banner-brand .pl-tier { display: none; } }
@keyframes pl-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .pl-ring { animation: none; } }
/* Past this server's plan (a Staff Panel tool it lacks, a full New/Add button): the plan logo's glow ring, spinning around the border in the plan that gives it. */
@property --pt-r { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
.plan-ring { position: relative; border-color: color-mix(in srgb, var(--pl) 25%, var(--border)); }
.plan-ring::after { content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 2px; pointer-events: none;
  background: conic-gradient(from var(--pt-r), var(--pl), transparent 30%, var(--pl) 50%, transparent 80%, var(--pl));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  filter: drop-shadow(0 0 4px var(--pl)); animation: pt-spin var(--pl-spin) linear infinite; }
.btn.plan-ring::after { inset: -1px; }
@keyframes pt-spin { to { --pt-r: 360deg; } }
@media (prefers-reduced-motion: reduce) { .plan-ring::after { animation: none; } }
@media (hover: hover) { .plan-card:hover { transform: translateY(-2px); } }
.plan-card > .btn { margin-top: auto; justify-content: center; }
.plan-price { display: flex; align-items: baseline; gap: 6px; }
.plan-price b { font-size: 34px; font-weight: 700; }
.plan-perks, .plan-lines { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.plan-card { position: relative; }
.plan-card.pc-max { border-color: color-mix(in srgb, #ffc83d 55%, var(--border)); }
.plan-badge { position: absolute; top: -11px; right: 14px; padding: 3px 10px; border-radius: 999px; font-family: var(--font-head); font-weight: 700; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; background: var(--accent); color: #0b0e13; }
.pc-max .plan-badge { background: #ffc83d; }
.pc-extended .plan-badge { background: #7fb3ff; }
.pc-start { --pl-c: var(--accent); }
.plan-card.is-current { border: 2px solid var(--pl-c, var(--accent)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--pl-c, var(--accent)) 16%, transparent), 0 0 28px color-mix(in srgb, var(--pl-c, var(--accent)) 22%, transparent); }
.plan-card.is-current .plan-badge { background: var(--pl-c, var(--accent)); }
.plan-bill { min-height: 1.4em; }
.plan-trial { align-self: flex-start; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--pl-c, var(--accent)); background: color-mix(in srgb, var(--pl-c, var(--accent)) 14%, transparent); }
.pc-max { --pl-c: #ffc83d; }
.pc-extended { --pl-c: #7fb3ff; }
.plan-plus-head { margin: 4px 0 0; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.plan-plus { list-style: none; padding-left: 0; }
.plan-plus li { position: relative; padding-left: 22px; color: var(--text); }
.plan-plus li::before { content: ''; position: absolute; left: 5px; top: 3px; width: 5px; height: 10px; border: solid var(--pl-c, var(--accent)); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.pc-start .plan-plus li::before { border-color: var(--muted); }
.plan-save { align-self: flex-start; font-size: 13px; font-weight: 700; color: var(--good, #4ade80); }
.plan-hero h2 { font-size: 28px; margin-bottom: 4px; }
.plan-assure { text-align: center; }
.plan-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 14px; }
.plan-table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 520px; }
.plan-table th, .plan-table td { padding: 9px 12px; text-align: center; border-bottom: 1px solid var(--border); }
.plan-table th:first-child, .plan-table td:first-child { text-align: left; position: sticky; left: 0; background: var(--panel); }
.plan-table thead th { font-family: var(--font-head); font-size: 16px; letter-spacing: .06em; text-transform: uppercase; }
.plan-table .pt-extended { color: #7fb3ff; } .plan-table .pt-power { color: var(--accent); } .plan-table .pt-max { color: #ffc83d; }
.plan-table tr.pt-group td { text-align: left; font-family: var(--font-head); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); background: var(--panel-2); }
.plan-table tr:last-child td { border-bottom: 0; }
.plan-yes { display: inline-block; width: 6px; height: 12px; border: solid var(--accent); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.plan-perks li { font-weight: 600; }
.plan-lines li { color: var(--muted); font-size: 14px; }
.sheet.plans-sheet { width: min(100%, 1040px); }
.buy-row { cursor: pointer; }
.buy-row input { width: 20px; height: 20px; flex: none; accent-color: var(--accent); }
.buy-icon { width: 36px; height: 36px; border-radius: 50%; }
.ld-nav-end { display: flex; align-items: center; gap: 8px; }
@media (max-width: 899px) { .ld-nav-end { margin-left: auto; } }
@media (max-width: 480px) { .ld-max-long { display: none; } .ld-max { padding: 0 11px; } }


/* Plan limits on the website: an Upgrade link beside a full tool's count, and a badge naming the plan that adds a feature. */
.plan-up { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; color: #0b0e13; background: var(--accent); white-space: nowrap; transition: filter var(--t-out) var(--ease-out), transform var(--t-out) var(--ease-out); }
@media (hover: hover) { .plan-up:hover { filter: brightness(1.08); transform: translateY(-1px); } }
.plan-chip { display: inline-flex; align-items: center; padding: 1px 8px; border-radius: 999px; font-family: var(--font-head); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; border: 1px solid var(--pc, var(--accent)); color: var(--pc, var(--accent)); }
.plan-chip.pc-extended { --pc: #7fb3ff; } .plan-chip.pc-max { --pc: #ffc83d; }
.rec-btn.locked { gap: 8px; opacity: .9; }
.rec-btn.locked .rec-dot { background: var(--muted); }
.plan-note { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.gw-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.gw-stats .rec-stat { padding: 10px 12px; }
.gw-stats .rec-stat b { font-size: 22px; }
.gw-stats .rec-stat:last-child b { font-size: 15px; line-height: 1.3; }

/* Saved Banner: the message editors' picker of this server's saved banners */
.pic-head { flex-wrap: wrap; row-gap: 8px; }
.pic-head > span { white-space: nowrap; }
.drop-zone:has(.drop-x) { position: relative; padding-right: 44px; }
.drop-x { position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; display: grid; place-items: center; padding: 0; border: 1px solid var(--border); border-radius: 50%; background: var(--panel-2); color: var(--muted); cursor: pointer; animation: x-in var(--t-in) var(--ease-ios) both; transition: color var(--t-out) var(--ease-out), border-color var(--t-out) var(--ease-out), background var(--t-out) var(--ease-out); }
.drop-x svg { width: 14px; height: 14px; }
@keyframes x-in { from { transform: scale(.6); opacity: 0; } }
.drop-x:hover, .drop-x:focus-visible { color: #fff; border-color: var(--bad); background: var(--bad); }
.btn.small.locked { gap: 8px; opacity: .9; }
.bn-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr)); gap: 10px; max-height: min(60vh, 520px); overflow: auto; }
.bn-pick-item { display: grid; gap: 6px; padding: 6px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--panel-2); color: inherit; font: inherit; text-align: left; cursor: pointer; transition: border-color var(--t-in) var(--ease-ios), transform var(--t-in) var(--ease-ios); }
.bn-pick-item:hover, .bn-pick-item:focus-visible { border-color: var(--accent); transform: translateY(-1px); }
.bn-pick-item:disabled { opacity: .6; cursor: progress; }
.bn-pick-item img { width: 100%; aspect-ratio: 2 / 1; object-fit: cover; border-radius: 6px; background: rgba(0,0,0,.25); }
.bn-pick-item span { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plan-locked { animation: plan-locked-in var(--t-out, .25s) var(--ease-out, ease-out) both; }
@keyframes plan-locked-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.dc-foot-icon { width: 20px; height: 20px; border-radius: 50%; margin-right: 8px; vertical-align: middle; }
.brand-form { animation: plan-locked-in var(--t-out, .25s) var(--ease-out, ease-out) both; }
.dc-embed-foot:has(.dc-foot-icon) { display: flex; align-items: center; }

/* The store's theme colors (registered so a theme tried on fades across). */
@property --t0 { syntax: '<color>'; inherits: true; initial-value: #ff7a1f; }
@property --t1 { syntax: '<color>'; inherits: true; initial-value: #d946ef; }
@property --t2 { syntax: '<color>'; inherits: true; initial-value: #22d3ee; }
.shell:has(.st-page) { transition: --t0 .6s ease, --t1 .6s ease, --t2 .6s ease; }

/* The store page: title, tab bar, sections. */
main:has(.st-page) .page-head { overflow-x: visible; } /* no back arrow here: the title's soft glow reaches past the left edge */
main:has(.st-page) .page-title { background: linear-gradient(90deg, #ffc83d, var(--t0) 35%, var(--t1) 70%, var(--t2)); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: st-shine 6s linear infinite; }
main:has(.st-page) .back-arrow { color: #fff; }
.shell:has(.st-page) > main { position: relative; z-index: 1; }
.st-page { gap: 18px; }
.stb { position: relative; display: flex; gap: 4px; padding: 6px; overflow-x: auto; scrollbar-width: none; border-radius: 18px; border: 1px solid rgba(255,255,255,.1); background: color-mix(in srgb, var(--panel) 82%, transparent); }
.stb::-webkit-scrollbar { display: none; }
.stb-tab { position: relative; z-index: 1; flex: 1 0 auto; height: 48px; padding: 0 14px; border: 0; border-radius: 13px; background: none; color: var(--muted); font-family: var(--font-head); font-weight: 700; font-size: 15px; letter-spacing: .05em; text-transform: uppercase; white-space: nowrap; cursor: pointer; transition: color .25s; }
@media (hover: hover) { .stb-tab:hover { color: var(--text); } }
.stb-tab.on { color: #fff; }
.stb-ind { position: absolute; z-index: 0; left: 0; top: 6px; bottom: 6px; width: 0; border-radius: 13px; background: linear-gradient(135deg, var(--t0), var(--t1)); box-shadow: 0 4px 18px color-mix(in srgb, var(--t1) 40%, transparent); transition: transform .4s var(--ease-ios, ease), width .4s var(--ease-ios, ease); }
@media (max-width: 600px) { .stb-tab { height: 42px; padding: 0 14px; font-size: 15px; } }
.st-body { gap: 22px; }
.st-headrow { display: flex; align-items: center; gap: 12px; }
.st-headrow > .st-head { position: relative; font-size: 22px; padding-left: 14px; background: linear-gradient(90deg, #fff, color-mix(in srgb, var(--t1) 30%, #fff)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.st-headrow > .st-head::before { content: ''; position: absolute; left: 0; top: 15%; bottom: 15%; width: 4px; border-radius: 4px; background: linear-gradient(180deg, #ffc83d, var(--t0), var(--t1), var(--t2)); }
.st-all { margin-left: auto; border: 0; background: none; color: var(--t0); font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; transition: color .2s, transform .2s; }
@media (hover: hover) { .st-all:hover { color: var(--t1); transform: translateX(2px); } }

/* Item cards: tall (2:3), the picture on top, name, and the price at the bottom; pointing at one slides Get in. */
.sc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 14px; }
@media (max-width: 480px) { .sc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }
.sc { position: relative; display: flex; flex-direction: column; aspect-ratio: 2 / 3; padding: 8px; border-radius: 18px; border: 1px solid rgba(255,255,255,.1); background: color-mix(in srgb, var(--panel) 84%, transparent); color: var(--text); cursor: pointer; outline: none; transition: transform .35s var(--ease-ios, ease), border-color .3s, box-shadow .35s; }
@media (hover: hover) { .sc:hover { transform: translateY(-6px); border-color: color-mix(in srgb, var(--t1) 60%, transparent); box-shadow: 0 16px 40px color-mix(in srgb, var(--t1) 25%, transparent); } }
.sc:focus-visible { border-color: var(--t0); }
.sc:active { transform: scale(.97); }
.sc-badge { position: absolute; top: -10px; left: 50%; transform: translateX(-50%); z-index: 3; padding: 3px 10px; border-radius: 999px; font-family: var(--font-head); font-weight: 700; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; color: #0b0e13; background: linear-gradient(90deg, #ffc83d, #ff7a1f, #ffc83d); background-size: 200% 100%; animation: st-shine 3s linear infinite; }
.sc-top { position: relative; flex: 1 1 auto; min-height: 0; overflow: hidden; border-radius: 12px; }
.sc-top > * { position: absolute; inset: 0; transition: transform .5s var(--ease-ios, ease); }
@media (hover: hover) { .sc:hover .sc-top > * { transform: scale(1.06); } }
.sc-glyph { display: grid; place-items: center; color: var(--st); background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--st) 40%, transparent), transparent 70%), color-mix(in srgb, var(--st) 10%, var(--panel-2)); }
.sc-glyph svg { width: 42%; height: 42%; filter: drop-shadow(0 0 12px color-mix(in srgb, var(--st) 60%, transparent)); }
.sc-body { display: flex; flex-direction: column; gap: 2px; padding: 10px 4px 6px; min-width: 0; }
.sc-name { font-size: 15px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-line { color: var(--muted); font-size: 12.5px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.7em; }
.sc-foot { position: relative; height: 38px; overflow: hidden; border-radius: 11px; }
.sc-swap { position: absolute; inset: 0; display: flex; flex-direction: column; transition: transform .35s var(--ease-ios, ease); }
.sc-price, .sc-get { flex: 0 0 38px; display: grid; place-items: center; border-radius: 11px; font-weight: 700; font-size: 15px; }
.sc-price { background: rgba(255,255,255,.06); color: #fff; }
.sc-get { background: linear-gradient(135deg, var(--t0), var(--t1)); color: #fff; font-family: var(--font-head); letter-spacing: .1em; text-transform: uppercase; }
@media (hover: hover) { .sc:hover .sc-swap, .sc:focus-visible .sc-swap { transform: translateY(-38px); } }
.st-sheet-top { position: relative; height: 200px; overflow: hidden; border-radius: 14px; }
.st-sheet-top > * { position: absolute; inset: 0; }
.st-price { font-size: 22px; color: var(--accent); }
/* Store banners: the banner over a blurred copy of itself; a pack fans three out and spreads them on hover. */
.sbn { background: #07090d; overflow: hidden; }
.sbn-img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; opacity: 0; transition: opacity .45s ease; }
.sbn-img.ld { opacity: 1; }
.sbn-img.sbn-bg { position: absolute; inset: 0; z-index: 0; height: 100%; object-fit: cover; filter: blur(16px) brightness(.5) saturate(1.2); transform: scale(1.25); }
.sbn-fg { position: absolute; z-index: 2; left: 6%; right: 6%; top: 50%; transform: translateY(-50%); border-radius: 8px; overflow: hidden; box-shadow: 0 10px 28px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.12); }
.sbn-fan { position: absolute; left: 9%; right: 9%; top: 50%; border-radius: 7px; overflow: hidden; box-shadow: 0 8px 22px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.14); transition: transform .5s var(--ease-ios, ease); }
.sbn-fan.f0 { z-index: 3; transform: translateY(-50%); }
.sbn-fan.f1 { z-index: 2; transform: translateY(-92%) scale(.9) rotate(-4deg); }
.sbn-fan.f2 { z-index: 1; transform: translateY(-8%) scale(.9) rotate(4deg); }
@media (hover: hover) {
  .sc:hover .sbn-fan.f1 { transform: translateY(-112%) scale(.9) rotate(-6deg); }
  .sc:hover .sbn-fan.f2 { transform: translateY(12%) scale(.9) rotate(6deg); }
}
.sbn-big { border-radius: 14px; overflow: hidden; box-shadow: 0 0 0 1px rgba(255,255,255,.12); background: #07090d; }
.sbn-big .sbn-img { aspect-ratio: 16 / 9; object-fit: contain; }
.sbn-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.sbn-cell { display: flex; flex-direction: column; gap: 4px; }
.sbn-cell .sbn-img { aspect-ratio: 16 / 9; object-fit: contain; border-radius: 9px; background: #07090d; box-shadow: 0 0 0 1px rgba(255,255,255,.12); }
.sc-price.own { color: #4ade80; font-family: var(--font-head); letter-spacing: .1em; text-transform: uppercase; }

/* The Storefront's hero: a slowly turning glow in the page's theme with twinkling sparks. */
.st-hero { position: relative; overflow: hidden; min-height: 150px; display: flex; align-items: flex-end; padding: 22px; border-radius: var(--radius); border: 1px solid rgba(255,255,255,.14); background: color-mix(in srgb, var(--panel) 40%, transparent); }
.st-hero-bg { position: absolute; inset: -40%; background: conic-gradient(from 0deg, var(--t0), #ffc83d, var(--t1), var(--t2), var(--t0)); filter: blur(50px) saturate(1.2); opacity: .55; animation: st-spin 18s linear infinite; }
.st-plans-btn { margin-top: 12px; align-self: flex-start; display: inline-flex; gap: 8px; }
.st-plans-btn svg { width: 16px; height: 16px; }
.st-hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 20%, color-mix(in srgb, var(--bg) 80%, transparent)); }
.st-hero-text { position: relative; z-index: 1; }
.st-hero h2 { font-family: var(--font-head); font-size: 34px; letter-spacing: .06em; text-transform: uppercase; margin: 6px 0 2px; text-shadow: 0 2px 18px rgba(0,0,0,.4); }
.st-hero-tag { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; background: #ffc83d; color: #0b0e13; }
.st-spark { position: absolute; z-index: 1; left: var(--x); top: var(--y); width: 6px; height: 6px; background: #fff; clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); opacity: 0; animation: st-twinkle 2.6s ease-in-out var(--w) infinite; }

/* Wallpapers (the store's own and the ones for sale): each fills its box; a tried-on one fades in over the store's. */
.st-wall { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; animation: st-in .8s var(--ease-out, ease) both; }
.wp { position: absolute; inset: 0; overflow: hidden; container-type: size; }
.wp-try { opacity: 0; transition: opacity .5s ease; will-change: opacity; }
.wp-try.out *, .wp-try.out *::before { animation-play-state: paused !important; }
.st-wall.covered > :not(.wp-try) { visibility: hidden; }
.wp-try.on { opacity: 1; }
.wp-star { position: absolute; left: var(--x); top: var(--y); width: var(--s); height: var(--s); border-radius: 50%; background: #fff; box-shadow: 0 0 6px #fff; opacity: .2; animation: wp-twinkle 4s ease-in-out var(--w) infinite; }
.wp-grid { position: absolute; left: -50%; right: -50%; bottom: -10%; height: 60%; background-image: linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px); background-size: 60px 60px; --g: 60px; overflow: hidden; transform: perspective(500px) rotateX(62deg); transform-origin: 50% 100%; -webkit-mask-image: linear-gradient(transparent, #000 60%); mask-image: linear-gradient(transparent, #000 60%); }
/* Store (its own, never sold) */
.wp-store { background: radial-gradient(120% 90% at 50% 0%, #1a1035, #0b0e13 70%); }
.wp-orb { position: absolute; width: 55vmax; height: 55vmax; border-radius: 50%; filter: blur(90px); opacity: .32; }
.wp-orb.o1 { background: var(--t0); left: -15vmax; top: -10vmax; animation: wp-drift1 22s ease-in-out infinite; }
.wp-orb.o2 { background: var(--t1); right: -18vmax; top: 20vh; animation: wp-drift2 26s ease-in-out infinite; }
.wp-orb.o3 { background: var(--t2); left: 20vw; bottom: -30vmax; opacity: .22; animation: wp-drift3 30s ease-in-out infinite; }
/* Inferno */
.wp-inferno { background: radial-gradient(120% 80% at 50% 120%, #ff7a1f, #b3261e 35%, #2a0d0d 70%, #0b0e13); }
.wp-heat { position: absolute; inset: 30% -20% -40%; background: radial-gradient(closest-side, #ffc83d, transparent); opacity: .5; animation: wp-breathe 3.5s ease-in-out infinite; }
.wp-ember { position: absolute; bottom: -10px; left: var(--x); width: var(--s); height: var(--s); border-radius: 50%; background: #ffc83d; box-shadow: 0 0 8px #ff7a1f, 0 0 2px #fff; animation: wp-rise var(--d) linear var(--w) infinite; }
/* Neon Grid */
.wp-neon { background: linear-gradient(180deg, #12002b, #3b0764 55%, #0b0e13 56%, #12002b); }
.wp-neon .wp-grid { height: 46%; bottom: 0; -webkit-mask-image: linear-gradient(transparent, #000 25%); mask-image: linear-gradient(transparent, #000 25%); background-image: linear-gradient(#f0abfc 1.5px, transparent 1.5px), linear-gradient(90deg, #f0abfc 1.5px, transparent 1.5px); background-size: 40px 40px; filter: drop-shadow(0 0 4px #d946ef); }
.wp-neon .wp-grid { --g: 40px; }
.wp-grid::before { content: ''; position: absolute; left: 0; right: 0; top: calc(var(--g) * -1); bottom: 0; background: inherit; background-size: var(--g) var(--g); animation: wp-grid 4s linear infinite; will-change: transform; }
.wp-neon .wp-grid::before { animation-duration: 1.6s; }
.wp-grid { background-size: 0 0; }
.wp-sun { position: absolute; left: 50%; top: 54%; width: min(46cqmin, 360px); height: min(46cqmin, 360px); transform: translate(-50%, -100%); border-radius: 50%; background: linear-gradient(180deg, #fde047, #fb7185 60%, #d946ef); box-shadow: 0 0 60px #fb7185; -webkit-mask-image: repeating-linear-gradient(180deg, #000 0 8%, transparent 8% 10%); mask-image: repeating-linear-gradient(180deg, #000 0 8%, transparent 8% 10%); animation: wp-breathe 4s ease-in-out infinite; }
/* Frostbite */
.wp-frost { background: linear-gradient(180deg, #0c1e3a, #164e63 60%, #a5f3fc); }
.wp-haze { position: absolute; inset: -20%; background: radial-gradient(40% 30% at 30% 70%, rgba(255,255,255,.35), transparent), radial-gradient(40% 30% at 75% 40%, rgba(186,230,253,.3), transparent); animation: wp-drift1 18s ease-in-out infinite; }
.wp-snow { position: absolute; top: -10px; left: var(--x); width: var(--s); height: var(--s); border-radius: 50%; background: #fff; opacity: .85; animation: wp-fall var(--d) linear var(--w) infinite; }
/* Midnight Ops */
.wp-midnight { background: radial-gradient(circle at 50% 60%, #0f2a4a, #060b16 70%); }
.wp-sweep { position: absolute; left: 50%; top: 60%; width: 160cqmax; height: 160cqmax; transform: translate(-50%, -50%); background: conic-gradient(from 0deg, rgba(74,222,128,.45), transparent 50deg); border-radius: 50%; animation: wp-radar 5s linear infinite; }
.wp-rings { position: absolute; left: 50%; top: 60%; width: 80cqmin; height: 80cqmin; transform: translate(-50%, -50%); border-radius: 50%; background: repeating-radial-gradient(circle, transparent 0 18%, rgba(74,222,128,.25) 18% 18.8%); }
/* Your own picture */

/* Prices with a deal: the old price crossed out; a corner chip with the saving. */
.sc-price s { margin-right: 6px; font-weight: 500; font-size: 12.5px; color: var(--muted); }
.sc-off { position: absolute; top: 14px; left: 14px; z-index: 3; padding: 3px 8px; border-radius: 999px; font-weight: 800; font-size: 12px; color: #fff; background: linear-gradient(135deg, #f43f5e, #ff7a1f); box-shadow: 0 2px 10px rgba(244,63,94,.45); }
.sc-off.in { position: static; align-self: center; }
.sc-type { position: absolute; top: 14px; right: 14px; z-index: 3; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; color: #fff; background: rgba(11,14,19,.72); border: 1px solid rgba(255,255,255,.16); cursor: help; transition: background .25s, border-color .25s, transform .3s var(--ease-ios, ease); }
.sc-type svg { width: 15px; height: 15px; }
@media (hover: hover) { .sc-type:hover { background: var(--accent); border-color: var(--accent); transform: scale(1.1); } }
.st-price-row { display: flex; align-items: center; gap: 10px; }
.st-timer { padding: 4px 10px; border-radius: 999px; font-variant-numeric: tabular-nums; font-weight: 700; font-size: 13px; color: #fff; background: linear-gradient(135deg, #f43f5e, #ff7a1f); animation: st-pulse 2s ease-in-out infinite; }
@keyframes st-pulse { 50% { box-shadow: 0 0 0 6px rgba(244,63,94,0); } 0%, 100% { box-shadow: 0 0 0 0 rgba(244,63,94,.45); } }
/* Bundles: the wallpaper with the theme's card floating over it. */
.bd-top > .wp { position: absolute; inset: 0; }
.bd-over { position: absolute; inset: 0; display: grid; place-items: center; }
.bd-over .tp-card { width: 78%; }

/* The member's card in item pop-ups: their own look (theme and wallpaper, via wearLook) with the item put on. */
.mc-label { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.mc-label.new { color: var(--t0, var(--accent)); }
.mc-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .mc-pair { grid-template-columns: 1fr; } }
.sheet.st-sheet-wide { width: min(100%, 720px); }
.mc { position: relative; overflow: hidden; height: 190px; border-radius: 16px; isolation: isolate; color: #fff; background: linear-gradient(var(--bg-top, #11151b), var(--bg, #090b0f)); box-shadow: inset 0 0 0 2px var(--accent); animation: mc-in .45s var(--ease-out, ease) both; }
@keyframes mc-in { from { opacity: 0; transform: scale(.97); } }
.mc > .wp { position: absolute; inset: 0; z-index: 0; }
.mc-wash { position: absolute; inset: 0; z-index: 0; background: linear-gradient(135deg, var(--a), var(--b), var(--c)); background-size: 200% 200%; opacity: .28; mix-blend-mode: screen; }
.mc-flow .mc-wash { animation: tp-flow 8s ease-in-out infinite; }
.mc-th { box-shadow: none; }
.mc-th::after, .mc-border::after { content: ''; position: absolute; inset: 0; z-index: 2; border-radius: inherit; padding: 2px; pointer-events: none; background: linear-gradient(135deg, var(--a), var(--b), var(--c)); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); }
.mc-border { box-shadow: none; }
.mc-border::after { padding: 3px; background: conic-gradient(from var(--mc-r, 0deg), var(--a, var(--accent)), var(--b, #fff), var(--c, var(--accent)), var(--a, var(--accent))); animation: mc-spin 3s linear infinite; }
@property --mc-r { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
@keyframes mc-spin { to { --mc-r: 360deg; } }
.mc-in { position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: 10px; padding: 14px; background: linear-gradient(180deg, transparent 30%, rgba(0,0,0,.55)); }
.mc-head { display: flex; align-items: center; gap: 12px; min-width: 0; }
.mc-pic { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; flex: none; display: grid; place-items: center; border: 2px solid var(--a, var(--accent)); }
.mc-txt { display: flex; flex-direction: column; min-width: 0; }
.mc-name { font-size: 18px; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mc-glow { text-shadow: 0 0 8px var(--b, var(--accent)), 0 0 18px var(--b, var(--accent)); animation: mc-glow 2.4s ease-in-out infinite; }
@keyframes mc-glow { 50% { text-shadow: 0 0 4px var(--b, var(--accent)), 0 0 10px var(--b, var(--accent)); } }
.mc-title { font-size: 13px; color: rgba(255,255,255,.75); }
.mc-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.mc-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; color: #fff; background: color-mix(in srgb, var(--a, var(--accent)) 35%, rgba(0,0,0,.5)); border: 1px solid color-mix(in srgb, var(--a, var(--accent)) 60%, transparent); }
.mc-chip svg { width: 13px; height: 13px; }
.mc-bar { height: 5px; border-radius: 4px; background: var(--accent); }
.mc-th .mc-bar { background: linear-gradient(90deg, var(--a), var(--b), var(--c)); }
/* Supporter Badge: any amount from $1. */
.st-amts { display: flex; flex-wrap: wrap; gap: 8px; }
.st-amt { min-width: 64px; height: 40px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--panel-2); color: var(--text); font: inherit; font-weight: 700; cursor: pointer; transition: background .2s, border-color .2s, color .2s, transform .15s; }
.st-amt.on { border-color: transparent; background: linear-gradient(135deg, #f43f5e, #ff7a1f); color: #fff; }
.st-amt:active { transform: scale(.95); }
.st-amt-in { width: 110px; height: 40px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--panel-2); color: var(--text); font: inherit; font-weight: 700; }
.st-amt-in:focus { outline: none; border-color: #f43f5e; }

/* Still wallpapers. */
.wp-carbon { background: linear-gradient(27deg, #151515 5px, transparent 5px) 0 5px, linear-gradient(207deg, #151515 5px, transparent 5px) 10px 0, linear-gradient(27deg, #222 5px, transparent 5px) 0 10px, linear-gradient(207deg, #222 5px, transparent 5px) 10px 5px, linear-gradient(90deg, #1b1b1b 10px, transparent 10px), linear-gradient(#1d1d1d 25%, #1a1a1a 25%, #1a1a1a 50%, transparent 50%, transparent 75%, #242424 75%, #242424); background-color: #131313; background-size: 20px 20px; }
.wp-blueprint { background: linear-gradient(rgba(255,255,255,.28) 1.5px, transparent 1.5px) 0 0 / 100px 100px, linear-gradient(90deg, rgba(255,255,255,.28) 1.5px, transparent 1.5px) 0 0 / 100px 100px, linear-gradient(rgba(255,255,255,.1) 1px, transparent 1px) 0 0 / 20px 20px, linear-gradient(90deg, rgba(255,255,255,.1) 1px, transparent 1px) 0 0 / 20px 20px, #0b4a9e; }
.wp-chevron { background: linear-gradient(135deg, #ff7a1f 25%, transparent 25%) -30px 0 / 60px 60px, linear-gradient(225deg, #ff7a1f 25%, transparent 25%) -30px 0 / 60px 60px, linear-gradient(315deg, #ff7a1f 25%, transparent 25%) 0 0 / 60px 60px, linear-gradient(45deg, #ff7a1f 25%, transparent 25%) 0 0 / 60px 60px, #1f2937; }
.wp-dunes { background: linear-gradient(180deg, #4c1d95, #f97316 55%, #fbbf24 70%); }
/* Free wallpapers */
.wp-dusk { background: radial-gradient(120% 80% at 50% 110%, #fb923c 0, #db2777 35%, transparent 70%), linear-gradient(180deg, #1e1b4b, #4c1d95 60%, #9d174d); }
.wp-bokeh { background: radial-gradient(circle at 18% 30%, rgba(251,191,36,.45) 0 6%, transparent 7%), radial-gradient(circle at 70% 22%, rgba(56,189,248,.35) 0 9%, transparent 10%), radial-gradient(circle at 42% 70%, rgba(244,114,182,.35) 0 8%, transparent 9%), radial-gradient(circle at 85% 68%, rgba(251,191,36,.3) 0 5%, transparent 6%), radial-gradient(circle at 10% 82%, rgba(56,189,248,.3) 0 7%, transparent 8%), radial-gradient(circle at 58% 42%, rgba(167,139,250,.3) 0 4%, transparent 5%), linear-gradient(180deg, #0b1023, #111a3a); filter: saturate(1.1); }
.wp-lagoon { background: radial-gradient(90% 60% at 30% 0%, rgba(153,246,228,.55), transparent 70%), linear-gradient(170deg, #14b8a6, #0e7490 45%, #1e3a8a); }
.wp-dune { position: absolute; left: -20%; right: -20%; border-radius: 50% 50% 0 0; }
.wp-dune.d1 { bottom: -10%; height: 45%; background: #b45309; left: -40%; right: 10%; }
.wp-dune.d2 { bottom: -18%; height: 42%; background: #92400e; left: 20%; right: -40%; }
.wp-dune.d3 { bottom: -24%; height: 38%; background: #78350f; }
.wp-skyline { background: linear-gradient(180deg, #1e1b4b, #581c87 70%, #9d174d); }
.wp-star.still { animation: none; opacity: .7; }
.wp-city { position: absolute; left: 0; bottom: 0; width: calc(100% + var(--tw)); background-repeat: repeat-x; background-size: var(--tw) 100%; will-change: transform; }
.wp-city.near { --tw: 80cqh; height: 50cqh; background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 160 100' preserveAspectRatio='none'><rect x='0' y='45' width='22' height='55' fill='%230f0a1f'/><rect x='8' y='57' width='2' height='3' fill='%23fde68a' fill-opacity='.75'/><rect x='8' y='64' width='2' height='3' fill='%23fde68a' fill-opacity='.75'/><rect x='13' y='64' width='2' height='3' fill='%23fde68a' fill-opacity='.75'/><rect x='13' y='85' width='2' height='3' fill='%23fde68a' fill-opacity='.75'/><rect x='3' y='92' width='2' height='3' fill='%23fde68a' fill-opacity='.75'/><rect x='8' y='92' width='2' height='3' fill='%23fde68a' fill-opacity='.75'/><rect x='13' y='92' width='2' height='3' fill='%23fde68a' fill-opacity='.75'/><rect x='24' y='20' width='18' height='80' fill='%230f0a1f'/><rect x='27' y='25' width='2' height='3' fill='%23fde68a' fill-opacity='.75'/><rect x='27' y='32' width='2' height='3' fill='%23fde68a' fill-opacity='.75'/><rect x='37' y='32' width='2' height='3' fill='%23fde68a' fill-opacity='.75'/><rect x='27' y='39' width='2' height='3' fill='%23fde68a' fill-opacity='.75'/><rect x='37' y='46' width='2' height='3' fill='%23fde68a' fill-opacity='.75'/><rect x='27' y='60' width='2' height='3' fill='%23fde68a' fill-opacity='.75'/><rect x='37' y='60' width='2' height='3' fill='%23fde68a' fill-opacity='.75'/><rect x='27' y='67' width='2' height='3' fill='%23fde68a' fill-opacity='.75'/><rect x='32' y='74' width='2' height='3' fill='%23fde68a' fill-opacity='.75'/><rect x='32' y='88' width='2' height='3' fill='%23fde68a' fill-opacity='.75'/><rect x='32' y='95' width='2' height='3' fill='%23fde68a' fill-opacity='.75'/><rect x='44' y='60' width='26' height='40' fill='%230f0a1f'/><rect x='52' y='65' width='2' height='3' fill='%23fde68a' fill-opacity='.75'/><rect x='52' y='72' width='2' height='3' fill='%23fde68a' fill-opacity='.75'/><rect x='57' y='72' width='2' height='3' fill='%23fde68a' fill-opacity='.75'/><rect x='52' y='79' width='2' height='3' fill='%23fde68a' fill-opacity='.75'/><rect x='47' y='93' width='2' height='3' fill='%23fde68a' fill-opacity='.75'/><rect x='72' y='8' width='14' height='92' fill='%230f0a1f'/><rect x='75' y='13' width='2' height='3' fill='%23fde68a' fill-opacity='.75'/><rect x='75' y='20' width='2' height='3' fill='%23fde68a' fill-opacity='.75'/><rect x='75' y='27' width='2' height='3' fill='%23fde68a' fill-opacity='.75'/><rect x='75' y='41' width='2' height='3' fill='%23fde68a' fill-opacity='.75'/><rect x='75' y='48' width='2' height='3' fill='%23fde68a' fill-opacity='.75'/><rect x='80' y='48' width='2' height='3' fill='%23fde68a' fill-opacity='.75'/><rect x='75' y='55' width='2' height='3' fill='%23fde68a' fill-opacity='.75'/><rect x='80' y='55' width='2' height='3' fill='%23fde68a' fill-opacity='.75'/><rect x='80' y='69' width='2' height='3' fill='%23fde68a' fill-opacity='.75'/><rect x='80' y='76' width='2' height='3' fill='%23fde68a' fill-opacity='.75'/><rect x='75' y='83' width='2' height='3' fill='%23fde68a' fill-opacity='.75'/><rect x='80' y='83' width='2' height='3' fill='%23fde68a' fill-opacity='.75'/><rect x='75' y='90' width='2' height='3' fill='%23fde68a' fill-opacity='.75'/><rect x='80' y='90' width='2' height='3' fill='%23fde68a' fill-opacity='.75'/><rect x='88' y='38' width='30' height='62' fill='%230f0a1f'/><rect x='91' y='43' width='2' height='3' fill='%23fde68a' fill-opacity='.75'/><rect x='111' y='50' width='2' height='3' fill='%23fde68a' fill-opacity='.75'/><rect x='106' y='57' width='2' height='3' fill='%23fde68a' fill-opacity='.75'/><rect x='101' y='64' width='2' height='3' fill='%23fde68a' fill-opacity='.75'/><rect x='111' y='64' width='2' height='3' fill='%23fde68a' fill-opacity='.75'/><rect x='106' y='71' width='2' height='3' fill='%23fde68a' fill-opacity='.75'/><rect x='111' y='71' width='2' height='3' fill='%23fde68a' fill-opacity='.75'/><rect x='91' y='78' width='2' height='3' fill='%23fde68a' fill-opacity='.75'/><rect x='101' y='78' width='2' height='3' fill='%23fde68a' fill-opacity='.75'/><rect x='91' y='85' width='2' height='3' fill='%23fde68a' fill-opacity='.75'/><rect x='96' y='85' width='2' height='3' fill='%23fde68a' fill-opacity='.75'/><rect x='101' y='85' width='2' height='3' fill='%23fde68a' fill-opacity='.75'/><rect x='91' y='92' width='2' height='3' fill='%23fde68a' fill-opacity='.75'/><rect x='120' y='26' width='20' height='74' fill='%230f0a1f'/><rect x='133' y='38' width='2' height='3' fill='%23fde68a' fill-opacity='.75'/><rect x='123' y='45' width='2' height='3' fill='%23fde68a' fill-opacity='.75'/><rect x='128' y='45' width='2' height='3' fill='%23fde68a' fill-opacity='.75'/><rect x='128' y='52' width='2' height='3' fill='%23fde68a' fill-opacity='.75'/><rect x='133' y='52' width='2' height='3' fill='%23fde68a' fill-opacity='.75'/><rect x='123' y='66' width='2' height='3' fill='%23fde68a' fill-opacity='.75'/><rect x='123' y='73' width='2' height='3' fill='%23fde68a' fill-opacity='.75'/><rect x='128' y='73' width='2' height='3' fill='%23fde68a' fill-opacity='.75'/><rect x='128' y='80' width='2' height='3' fill='%23fde68a' fill-opacity='.75'/><rect x='133' y='80' width='2' height='3' fill='%23fde68a' fill-opacity='.75'/><rect x='128' y='87' width='2' height='3' fill='%23fde68a' fill-opacity='.75'/><rect x='142' y='52' width='18' height='48' fill='%230f0a1f'/><rect x='145' y='57' width='2' height='3' fill='%23fde68a' fill-opacity='.75'/><rect x='145' y='64' width='2' height='3' fill='%23fde68a' fill-opacity='.75'/><rect x='155' y='64' width='2' height='3' fill='%23fde68a' fill-opacity='.75'/><rect x='145' y='78' width='2' height='3' fill='%23fde68a' fill-opacity='.75'/><rect x='150' y='78' width='2' height='3' fill='%23fde68a' fill-opacity='.75'/><rect x='150' y='85' width='2' height='3' fill='%23fde68a' fill-opacity='.75'/></svg>"); animation: wp-pan 40s linear infinite; }
.wp-city.far { --tw: 72cqh; height: 60cqh; background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 100' preserveAspectRatio='none'><rect x='0' y='50' width='16' height='50' fill='%232e1065'/><rect x='18' y='25' width='12' height='75' fill='%232e1065'/><rect x='32' y='40' width='20' height='60' fill='%232e1065'/><rect x='54' y='12' width='10' height='88' fill='%232e1065'/><rect x='66' y='45' width='22' height='55' fill='%232e1065'/><rect x='90' y='30' width='14' height='70' fill='%232e1065'/><rect x='106' y='55' width='14' height='45' fill='%232e1065'/></svg>"); opacity: .85; animation: wp-pan 70s linear infinite; }
@keyframes wp-pan { to { transform: translateX(calc(var(--tw) * -1)); } }
.wp-shards { background: #083344 url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 560' preserveAspectRatio='xMidYMid slice'><rect width='1000' height='560' fill='%23083344'/><polygon points='400,300 452.6,296.8 459.5,311.8 456.4,327.4' fill='%2322d3ee' fill-opacity='0.55' stroke='%23cffafe' stroke-opacity='.55' stroke-width='2'/><polygon points='452.6,296.8 629.7,286.1 595.9,338.8 571.2,383.0 456.4,327.4 459.5,311.8' fill='%230e7490' fill-opacity='1' stroke='%23cffafe' stroke-opacity='.55' stroke-width='2'/><polygon points='629.7,286.1 1797.4,215.5 1770.6,585.6 595.5,340.7' fill='%230c4a6e' fill-opacity='1' stroke='%23cffafe' stroke-opacity='.55' stroke-width='2'/><polygon points='595.5,340.7 1770.6,585.6 1659.7,910.9 571.2,383.0' fill='%23075985' fill-opacity='1' stroke='%23cffafe' stroke-opacity='.55' stroke-width='2'/><polygon points='400,300 456.4,327.4 449.1,352.9 427.5,369.6' fill='%235eead4' fill-opacity='0.55' stroke='%23cffafe' stroke-opacity='.55' stroke-width='2'/><polygon points='456.4,327.4 571.2,383.0 519.7,429.0 466.2,467.5 427.5,369.6 449.1,352.9' fill='%23155e75' fill-opacity='1' stroke='%23cffafe' stroke-opacity='.55' stroke-width='2'/><polygon points='571.2,383.0 1659.7,910.9 1417.3,1261.8 527.8,420.9' fill='%23164e63' fill-opacity='1' stroke='%23cffafe' stroke-opacity='.55' stroke-width='2'/><polygon points='527.8,420.9 1417.3,1261.8 915.0,1601.9 466.2,467.5' fill='%230f766e' fill-opacity='1' stroke='%23cffafe' stroke-opacity='.55' stroke-width='2'/><polygon points='400,300 427.5,369.6 412.8,366.3 400.2,353.7' fill='%235eead4' fill-opacity='0.55' stroke='%23cffafe' stroke-opacity='.55' stroke-width='2'/><polygon points='427.5,369.6 466.2,467.5 432.2,467.1 400.7,478.2 400.2,353.7 412.8,366.3' fill='%230891b2' fill-opacity='1' stroke='%23cffafe' stroke-opacity='.55' stroke-width='2'/><polygon points='466.2,467.5 915.0,1601.9 659.8,1675.7 431.6,467.3' fill='%23075985' fill-opacity='1' stroke='%23cffafe' stroke-opacity='.55' stroke-width='2'/><polygon points='431.6,467.3 659.8,1675.7 405.2,1700.0 400.7,478.2' fill='%23115e59' fill-opacity='1' stroke='%23cffafe' stroke-opacity='.55' stroke-width='2'/><polygon points='400,300 400.2,353.7 379.5,354.2 362.3,342.4' fill='%2367e8f9' fill-opacity='0.55' stroke='%23cffafe' stroke-opacity='.55' stroke-width='2'/><polygon points='400.2,353.7 400.7,478.2 337.9,464.3 272.8,443.2 362.3,342.4 379.5,354.2' fill='%230c4a6e' fill-opacity='1' stroke='%23cffafe' stroke-opacity='.55' stroke-width='2'/><polygon points='400.7,478.2 405.2,1700.0 -85.0,1613.3 339.1,464.8' fill='%230f766e' fill-opacity='1' stroke='%23cffafe' stroke-opacity='.55' stroke-width='2'/><polygon points='339.1,464.8 -85.0,1613.3 -529.7,1346.7 272.8,443.2' fill='%230e7490' fill-opacity='1' stroke='%23cffafe' stroke-opacity='.55' stroke-width='2'/><polygon points='400,300 362.3,342.4 345.2,336.6 334.9,322.4' fill='%2367e8f9' fill-opacity='0.55' stroke='%23cffafe' stroke-opacity='.55' stroke-width='2'/><polygon points='362.3,342.4 272.8,443.2 234.5,410.3 185.2,373.9 334.9,322.4 345.2,336.6' fill='%23164e63' fill-opacity='1' stroke='%23cffafe' stroke-opacity='.55' stroke-width='2'/><polygon points='272.8,443.2 -529.7,1346.7 -748.0,1101.3 236.9,413.8' fill='%23115e59' fill-opacity='1' stroke='%23cffafe' stroke-opacity='.55' stroke-width='2'/><polygon points='236.9,413.8 -748.0,1101.3 -923.7,755.8 185.2,373.9' fill='%23155e75' fill-opacity='1' stroke='%23cffafe' stroke-opacity='.55' stroke-width='2'/><polygon points='400,300 334.9,322.4 323.1,307.6 322.3,289.5' fill='%2322d3ee' fill-opacity='0.55' stroke='%23cffafe' stroke-opacity='.55' stroke-width='2'/><polygon points='334.9,322.4 185.2,373.9 206.3,319.2 219.0,275.6 322.3,289.5 323.1,307.6' fill='%23075985' fill-opacity='1' stroke='%23cffafe' stroke-opacity='.55' stroke-width='2'/><polygon points='185.2,373.9 -923.7,755.8 -997.7,380.6 205.7,311.2' fill='%230e7490' fill-opacity='1' stroke='%23cffafe' stroke-opacity='.55' stroke-width='2'/><polygon points='205.7,311.2 -997.7,380.6 -987.4,112.8 219.0,275.6' fill='%230891b2' fill-opacity='1' stroke='%23cffafe' stroke-opacity='.55' stroke-width='2'/><polygon points='400,300 322.3,289.5 332.7,263.5 356.0,249.0' fill='%235eead4' fill-opacity='0.55' stroke='%23cffafe' stroke-opacity='.55' stroke-width='2'/><polygon points='322.3,289.5 219.0,275.6 235.7,211.0 262.4,140.4 356.0,249.0 332.7,263.5' fill='%230f766e' fill-opacity='1' stroke='%23cffafe' stroke-opacity='.55' stroke-width='2'/><polygon points='219.0,275.6 -987.4,112.8 -787.9,-440.8 241.5,201.1' fill='%23155e75' fill-opacity='1' stroke='%23cffafe' stroke-opacity='.55' stroke-width='2'/><polygon points='241.5,201.1 -787.9,-440.8 -514.1,-760.4 262.4,140.4' fill='%230c4a6e' fill-opacity='1' stroke='%23cffafe' stroke-opacity='.55' stroke-width='2'/><polygon points='400,300 356.0,249.0 367.1,240.7 381.6,240.9' fill='%2322d3ee' fill-opacity='0.55' stroke='%23cffafe' stroke-opacity='.55' stroke-width='2'/><polygon points='356.0,249.0 262.4,140.4 302.0,123.3 336.3,94.9 381.6,240.9 367.1,240.7' fill='%23115e59' fill-opacity='1' stroke='%23cffafe' stroke-opacity='.55' stroke-width='2'/><polygon points='262.4,140.4 -514.1,-760.4 -267.8,-930.5 303.6,122.4' fill='%230891b2' fill-opacity='1' stroke='%23cffafe' stroke-opacity='.55' stroke-width='2'/><polygon points='303.6,122.4 -267.8,-930.5 -15.5,-1036.9 336.3,94.9' fill='%23164e63' fill-opacity='1' stroke='%23cffafe' stroke-opacity='.55' stroke-width='2'/><polygon points='400,300 381.6,240.9 403.9,226.0 431.3,227.1' fill='%235eead4' fill-opacity='0.55' stroke='%23cffafe' stroke-opacity='.55' stroke-width='2'/><polygon points='381.6,240.9 336.3,94.9 410.2,105.1 477.4,119.8 431.3,227.1 403.9,226.0' fill='%230e7490' fill-opacity='1' stroke='%23cffafe' stroke-opacity='.55' stroke-width='2'/><polygon points='336.3,94.9 -15.5,-1036.9 471.6,-1098.2 410.0,105.1' fill='%230c4a6e' fill-opacity='1' stroke='%23cffafe' stroke-opacity='.55' stroke-width='2'/><polygon points='410.0,105.1 471.6,-1098.2 952.5,-986.4 477.4,119.8' fill='%23075985' fill-opacity='1' stroke='%23cffafe' stroke-opacity='.55' stroke-width='2'/><polygon points='400,300 431.3,227.1 440.4,244.5 438.7,266.2' fill='%2367e8f9' fill-opacity='0.55' stroke='%23cffafe' stroke-opacity='.55' stroke-width='2'/><polygon points='431.3,227.1 477.4,119.8 513.0,144.7 556.8,162.8 438.7,266.2 440.4,244.5' fill='%23155e75' fill-opacity='1' stroke='%23cffafe' stroke-opacity='.55' stroke-width='2'/><polygon points='477.4,119.8 952.5,-986.4 1258.0,-806.3 517.7,148.2' fill='%23164e63' fill-opacity='1' stroke='%23cffafe' stroke-opacity='.55' stroke-width='2'/><polygon points='517.7,148.2 1258.0,-806.3 1453.8,-621.7 556.8,162.8' fill='%230f766e' fill-opacity='1' stroke='%23cffafe' stroke-opacity='.55' stroke-width='2'/><polygon points='400,300 438.7,266.2 450.6,279.2 452.6,296.8' fill='%2367e8f9' fill-opacity='0.55' stroke='%23cffafe' stroke-opacity='.55' stroke-width='2'/><polygon points='438.7,266.2 556.8,162.8 592.7,220.9 629.7,286.1 452.6,296.8 450.6,279.2' fill='%230891b2' fill-opacity='1' stroke='%23cffafe' stroke-opacity='.55' stroke-width='2'/><polygon points='556.8,162.8 1453.8,-621.7 1706.3,-203.6 594.3,225.1' fill='%23075985' fill-opacity='1' stroke='%23cffafe' stroke-opacity='.55' stroke-width='2'/><polygon points='594.3,225.1 1706.3,-203.6 1797.4,215.5 629.7,286.1' fill='%23115e59' fill-opacity='1' stroke='%23cffafe' stroke-opacity='.55' stroke-width='2'/><circle cx='400' cy='300' r='10' fill='%23ecfeff' fill-opacity='.8'/></svg>") center / cover no-repeat; }
.wp-upload, .wp-uploadAnim { background: linear-gradient(135deg, #1f2937, #111827); }
.wp-uploadAnim { background: linear-gradient(135deg, #1f2937, #3b0764, #111827); background-size: 200% 200%; animation: tp-flow 6s ease-in-out infinite; }
.wp-drop { position: absolute; inset: 10%; display: grid; place-items: center; align-content: center; gap: 6px; border: 2px dashed rgba(255,255,255,.25); border-radius: 12px; color: rgba(255,255,255,.6); }
.wp-drop svg { width: 44px; height: 44px; }
.wp-drop b { padding: 2px 8px; border-radius: 999px; font-size: 11px; letter-spacing: .1em; color: #fff; background: linear-gradient(135deg, #c084fc, #f472b6); }
.wp-drop.anim { animation: wp-breathe 2.4s ease-in-out infinite; }
.tp.still { animation: none; background: linear-gradient(135deg, var(--a), var(--b) 55%, var(--c)); }

/* Theme previews: the theme's colors flowing behind a little card wearing it. */
.tp { contain: paint; isolation: isolate; display: grid; place-items: center; background: var(--a); }
.tp::before { content: ''; position: absolute; z-index: -1; left: 0; top: -100%; width: 300%; height: 300%; background: linear-gradient(120deg, var(--a), var(--b), var(--c), var(--a)); animation: tp-slide 8s ease-in-out infinite; will-change: transform; }
.tp.still::before { display: none; }
@keyframes tp-slide { 50% { transform: translateX(-66.667%); } }
.tp-card { display: grid; grid-template-columns: auto 1fr; gap: 8px 10px; align-items: center; width: 80%; max-width: 240px; padding: 10px; border-radius: 12px; border: 2px solid transparent; background: linear-gradient(rgba(11,14,19,.75), rgba(11,14,19,.75)) padding-box, linear-gradient(135deg, var(--a), var(--b), var(--c)) border-box; box-shadow: 0 8px 24px rgba(0,0,0,.35); }
.tp-av { width: 26px; height: 26px; border-radius: 50%; background: linear-gradient(135deg, var(--a), var(--b)); }
.tp-lines { display: flex; flex-direction: column; gap: 5px; }
.tp-lines i { height: 6px; border-radius: 4px; background: rgba(255,255,255,.75); }
.tp-lines i + i { width: 60%; background: rgba(255,255,255,.35); }
.tp-bar { grid-column: 1 / -1; height: 5px; border-radius: 4px; background: linear-gradient(90deg, var(--a), var(--b), var(--c)); }

@keyframes st-spin { to { transform: rotate(360deg); } }
@keyframes st-shine { to { background-position: -200% 0; } }
@keyframes st-twinkle { 0%, 100% { opacity: 0; transform: scale(.4); } 50% { opacity: .9; transform: scale(1.4) rotate(45deg); } }
@keyframes st-in { from { opacity: 0; } }
@keyframes wp-twinkle { 50% { opacity: .9; transform: scale(1.5); } }
@keyframes wp-drift1 { 50% { transform: translate(18%, 14%) scale(1.1); } }
@keyframes wp-drift2 { 50% { transform: translate(-16vw, -10vh) scale(.9); } }
@keyframes wp-drift3 { 50% { transform: translate(-12vw, -12vh) scale(1.15); } }
@keyframes wp-grid { to { transform: translateY(var(--g)); } }
@keyframes wp-breathe { 0%, 100% { opacity: .35; } 50% { opacity: .7; } }
@keyframes wp-rise { 0% { transform: translateY(0); opacity: 0; } 10% { opacity: 1; } 100% { transform: translate(14px, calc(-100cqh - 20px)); opacity: 0; } }
@keyframes wp-fall { 0% { transform: translateY(0); } 100% { transform: translate(-20px, calc(100cqh + 20px)); } }
@keyframes wp-radar { to { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes tp-flow { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
@media (prefers-reduced-motion: reduce) { .st-wall *, .sc *, .st-hero *, .st-sheet-top *, .st-wall *::before, .sc *::before, .st-sheet-top *::before, main:has(.st-page) .page-title { animation: none !important; } .wp-star, .st-spark { opacity: .6; } }

/* Phones: the brand steps left and shrinks a little so the store and profile buttons fit beside it. */
@media (max-width: 480px) { .banner-brand { margin-right: 36px; } .bname { font-size: 18px; letter-spacing: .04em; } }

/* Owner Console → Shop */
.shop-row > .row { flex-wrap: nowrap; gap: 8px; flex: none; }
.shop-row input[type='number'] { width: 76px; }
.shop-row .choice { min-width: 180px; }
.shop-head { justify-content: space-between; align-items: baseline; }
.shop-send-line { gap: 8px; flex-wrap: wrap; }
.shop-send-line > input { flex: 1 1 200px; }
.shop-send-line > div { flex: 1 1 200px; }
.shop-send-line .choice, .shop-send-line .choice-btn { width: 100%; }
.shop-who { display: flex; align-items: center; gap: 10px; }
.shop-who img { width: 36px; height: 36px; border-radius: 50%; }
.shop-who > div { display: flex; flex-direction: column; }
@media (max-width: 640px) {
  .shop-row { flex-wrap: wrap; }
  .shop-row > .row { flex-wrap: wrap; width: 100%; }
  .shop-row .choice { flex: 1 1 160px; min-width: 0; }
}
/* Gift Center (#/gifts) */
.gift-page { gap: 22px; }
.gift-head { font-size: 1.05rem; margin: 0; }
.gift-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.gift-card { gap: 8px; animation: giftIn .38s cubic-bezier(.22, 1, .36, 1) backwards; }
.gift-card .plan-logo h2, .gift-claim .plan-logo h2 { font-size: 1rem; }
.gift-len { font-size: 1.15rem; }
.gift-note { font-style: italic; opacity: .85; }
.gift-warn { color: var(--bad, #ff6b6b); }
.gift-item { display: flex; align-items: center; gap: 10px; }
.gift-item svg { width: 28px; height: 28px; color: var(--accent); }
.gift-item h2 { margin: 0; font-size: 1rem; }
.gift-claim { align-items: center; text-align: center; }
@keyframes giftIn { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .gift-card { animation: none; } }
.pf-dot { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--accent); color: #111; font-size: .75rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; animation: giftIn .38s cubic-bezier(.22, 1, .36, 1) backwards; }

/* The store for visitors (a gift link): the banner holds Battle Buddy and Log In */
.banner.guest-bar { justify-content: space-between; }
.banner.guest-bar .btn { gap: 6px; }
.banner.guest-bar .btn svg { width: 18px; height: 18px; }

/* Customize → Owned: store items the member owns (store pictures, 2:1 like the other tiles) */
.own-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.own-tile { position: relative; border-radius: var(--radius); border: 2px solid var(--border); overflow: hidden; cursor: pointer; text-align: left; padding: 0; background: var(--panel); color: inherit; transition: border-color var(--t-tap, .1s) ease, transform var(--t-tap, .1s) ease; }
.own-tile:disabled { cursor: default; }
.own-tile.on { border-color: var(--accent); }
@media (hover: hover) { .own-tile:not(:disabled):hover { border-color: var(--muted); transform: translateY(-2px); } }
.own-art { position: relative; aspect-ratio: 2 / 1; overflow: hidden; display: grid; place-items: center; background: var(--panel-2); }
.own-art > .wp, .own-art > .tp { position: absolute; inset: 0; }
.own-art .tp-card { transform: scale(.62); }
.own-art.sc-glyph svg, .own-art.own-none svg { width: 34px; height: 34px; }
.own-tile .nm { padding: 8px 10px; font-family: var(--font-head); font-weight: 600; font-size: 15px; display: flex; flex-direction: column; gap: 2px; }
.own-tile .nm .st { font-family: var(--font-body); font-weight: 600; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--good); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.own-tile .nm .st.on { color: var(--accent); }
.buy-tile { display: block; text-decoration: none; border-style: dashed; }
.buy-art { color: var(--accent); background: radial-gradient(circle at 50% 45%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%), var(--panel-2); }
.buy-art svg { width: 34px; height: 34px; transition: transform var(--t-in, .32s) var(--ease-ios, ease); }
@media (hover: hover) { .buy-tile:hover .buy-art svg { transform: scale(1.12) rotate(-6deg); } }
.swatches .buy-tile .own-art { aspect-ratio: 2 / 1; }

/* Store wallpapers worn on cards and the page: the store's own moving version (storeWall) with the card's dimming */
.store-back { overflow: hidden; pointer-events: none; }
.store-back > .wp, .store-back > .store-dim { position: absolute; inset: 0; }
.pic .store-back.live-card { position: absolute; z-index: 0; border-radius: inherit; }
.pic img.over-store { position: relative; z-index: 1; }
.store-back.look-live { position: absolute; inset: 0; z-index: -1; border-radius: inherit; }
.store-back.store-page-wall { position: fixed; inset: 0; width: calc(100vw / var(--z)); height: calc(100vh / var(--z)); z-index: -1; }
.store-mirror { overflow: hidden; }
.store-mirror > .store-back, .store-mirror > img { position: absolute; inset: 0; width: 100%; height: 100%; }
.lightbox .store-mirror { z-index: 2; transition: opacity var(--t-out) var(--ease-out); }

/* Animated borders (store add-ons): frameFx overlays; some drift a little into the card */
.fx { position: absolute; inset: 0; z-index: 3; border-radius: inherit; pointer-events: none; overflow: hidden; }
.fx::after { content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 3px; -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); }
.mc-framed { box-shadow: none; }
.fx i { position: absolute; display: block; }
.fx svg { width: 100%; height: 100%; display: block; }
.fx-spin::after { background: conic-gradient(from var(--mc-r, 0deg), var(--a, #ff7a1f), var(--b, #fff), var(--c, #ff7a1f), var(--a, #ff7a1f)); animation: mc-spin 3s linear infinite; }
/* Butterfly Garden: soft pink-teal edge, butterflies flutter in and back out */
.fx-butterflies::after { background: linear-gradient(135deg, #f0abfc, #5eead4, #fde68a, #f0abfc); background-size: 300% 300%; animation: fx-pan 6s ease-in-out infinite; }
.fx-bf { left: var(--x); top: var(--y); width: 22px; height: 22px; margin: -11px; color: hsl(var(--h) 90% 72%); filter: drop-shadow(0 0 6px hsl(var(--h) 90% 60% / .7)); animation: fx-bf-fly 6.5s ease-in-out var(--d) infinite; }
.fx-bf-svg { fill: currentColor; animation: fx-flap .28s ease-in-out infinite alternate; transform-origin: 50% 50%; }
@keyframes fx-bf-fly { 0%, 100% { transform: translate(0, 0) rotate(-8deg); } 50% { transform: translate(var(--dx), var(--dy)) rotate(10deg); } }
@keyframes fx-flap { from { transform: scaleX(1); } to { transform: scaleX(.25); } }
/* Blossom Vine: corner flowers breathe and turn, petals fall a little way in */
.fx-blossom::after { background: linear-gradient(135deg, #86efac, #fb7185, #86efac); }
.fx-fl { left: var(--x); top: var(--y); width: 34px; height: 34px; margin: -12px; color: #fb7185; filter: drop-shadow(0 0 6px rgba(251,113,133,.6)); animation: fx-bloom 5s ease-in-out var(--d) infinite; }
.fx-fl:nth-child(2n) { color: #fde047; }
.fx-fl-svg { fill: currentColor; stroke: #fff6; stroke-width: .4; }
.fx-petal { left: var(--x); top: -8px; width: 7px; height: 5px; border-radius: 60% 0 60% 0; background: #fda4af; opacity: 0; animation: fx-fall 5.5s linear var(--d) infinite; }
@keyframes fx-bloom { 0%, 100% { transform: scale(.85) rotate(0deg); } 50% { transform: scale(1.1) rotate(25deg); } }
@keyframes fx-fall { 0% { opacity: 0; transform: translate(0, 0) rotate(0); } 15% { opacity: .9; } 70% { opacity: .7; } 100% { opacity: 0; transform: translate(var(--dx), 60px) rotate(220deg); } }
/* Ember Edge: a flickering hot edge, embers rise from the bottom into the card */
.fx-embers::after { background: linear-gradient(0deg, #ff3d00, #ff7a1f, #ffc83d, #ff7a1f, #ff3d00); background-size: 100% 300%; animation: fx-pan 2.4s linear infinite; }
.fx-embers { box-shadow: inset 0 -18px 24px -18px rgba(255,90,0,.7); }
.fx-ember { left: var(--x); bottom: 0; width: var(--s); height: var(--s); border-radius: 50%; background: #ffc83d; box-shadow: 0 0 6px 2px rgba(255,122,31,.8); opacity: 0; animation: fx-rise 3.6s ease-out var(--d) infinite; }
@keyframes fx-rise { 0% { opacity: 0; transform: translate(0, 0); } 15% { opacity: 1; } 100% { opacity: 0; transform: translate(8px, -70px) scale(.4); } }
/* Frost Bite: icy edge, frost breathing in from the corners, a few snowflakes */
.fx-frost::after { background: linear-gradient(135deg, #e0f2fe, #7dd3fc, #ffffff, #7dd3fc); background-size: 300% 300%; animation: fx-pan 7s ease-in-out infinite; }
.fx-ice { left: var(--x); top: var(--y); width: 90px; height: 90px; margin: -45px; border-radius: 50%; background: radial-gradient(circle, rgba(224,242,254,.55), rgba(125,211,252,.18) 45%, transparent 70%); animation: fx-breathe 6s ease-in-out var(--d) infinite; }
.fx-snow { left: var(--x); top: -6px; width: 4px; height: 4px; border-radius: 50%; background: #fff; box-shadow: 0 0 4px #bae6fd; opacity: 0; animation: fx-snow 6s linear var(--d) infinite; }
@keyframes fx-breathe { 0%, 100% { transform: scale(.75); opacity: .7; } 50% { transform: scale(1.15); opacity: 1; } }
@keyframes fx-snow { 0% { opacity: 0; transform: translate(0, 0); } 15% { opacity: .9; } 100% { opacity: 0; transform: translate(-10px, 70px); } }
/* Live Wire: a bright arc racing round the edge, sparks popping */
.fx-wire::after { padding: 2px; background: conic-gradient(from var(--mc-r, 0deg), transparent 0 70%, #fef08a 80%, #fff 84%, #facc15 88%, transparent 92%), linear-gradient(#facc1533, #facc1533); animation: mc-spin 1.4s linear infinite; }
.fx-spark { left: var(--x); top: var(--y); width: 3px; height: 3px; margin: -1.5px; border-radius: 50%; background: #fff; box-shadow: 0 0 6px 3px #facc15; opacity: 0; animation: fx-pop 1.8s ease-out var(--d) infinite; }
@keyframes fx-pop { 0%, 70% { opacity: 0; transform: scale(.2); } 75% { opacity: 1; transform: scale(1.4); } 100% { opacity: 0; transform: scale(.3) translate(6px, 6px); } }
/* Neon Pulse: two neon lines that breathe */
.fx-neon::after { padding: 2px; background: #22d3ee; filter: drop-shadow(0 0 6px #22d3ee); animation: fx-glow 2.2s ease-in-out infinite; }
.fx-neon { box-shadow: inset 0 0 0 5px transparent, inset 0 0 0 6px rgba(217,70,239,.85), inset 0 0 18px rgba(34,211,238,.35); animation: fx-glow 2.2s ease-in-out infinite reverse; }
@keyframes fx-glow { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
@keyframes fx-pan { 0%, 100% { background-position: 0% 0%; } 50% { background-position: 100% 100%; } }
/* The store card top: a small card wearing the border */
.sfr { display: grid; place-items: center; background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--st) 30%, transparent), transparent 70%), color-mix(in srgb, var(--st) 8%, var(--panel-2)); }
.sfr-card { position: relative; width: 74%; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; background: linear-gradient(160deg, #1b2230, #0b0e13); display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto 1fr; gap: 6px 8px; padding: 14px; align-content: start; }
.sfr-pic { grid-row: span 2; width: 30px; height: 30px; border-radius: 50%; background: color-mix(in srgb, var(--st) 70%, #fff); }
.sfr-l1, .sfr-l2 { height: 8px; border-radius: 4px; background: rgba(255,255,255,.75); align-self: center; }
.sfr-l2 { width: 60%; background: rgba(255,255,255,.35); }
/* Still borders (free) */
.fx-clean::after { padding: 2px; background: #e2e8f0; }
.fx-twilight::after { background: linear-gradient(135deg, #7fb3ff, #a78bfa 50%, #c084fc); }
.fx-gold::after { padding: 2px; background: linear-gradient(135deg, #fde68a, #b45309 30%, #fbbf24 55%, #92400e 80%, #fde68a); }
@media (prefers-reduced-motion: reduce) { .fx, .fx *, .fx::after { animation: none !important; } }
/* Store cards outside the 2 rows nearest the middle of the screen hold still (hover still plays them) */
.sc.sc-still:not(:hover) *, .sc.sc-still:not(:hover) *::before, .sc.sc-still:not(:hover) *::after { animation-play-state: paused !important; }

/* Plan perks in the store: plan price on top-up cards, the plan nudge in a top-up's pop-up, Plan Exclusives */
.sc-plan { margin-top: 4px; font-size: 12px; font-weight: 700; color: #ffc83d; }
.st-nudge { display: grid; gap: 8px; padding: 12px; border-radius: 12px; border: 1px solid var(--border); background: color-mix(in srgb, var(--panel-2) 80%, transparent); animation: mc-in .45s var(--ease-out, ease) both; }
.st-nd-row { display: grid; grid-template-columns: 84px 1fr auto; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: rgba(255,255,255,.04); }
.st-nd-row.hot { background: color-mix(in srgb, #ffc83d 14%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, #ffc83d 45%, transparent); }
.st-nd-k { font-family: var(--font-head); font-weight: 700; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.st-nd-row.hot .st-nd-k { color: #ffc83d; }
@media (max-width: 600px) { .st-nd-row { grid-template-columns: 1fr auto; } .st-nd-row b { grid-column: 1 / -1; grid-row: 2; } }
.sc-excl { box-shadow: 0 0 0 1px color-mix(in srgb, #ffc83d 50%, transparent), 0 0 24px -8px #ffc83d; }
.sc-excl .sc-badge { background: linear-gradient(90deg, #ffc83d, #fff1b8, #ffc83d); background-size: 200% 100%; }
.excl-month h2 { margin: 0; }
.excl-chips { flex-wrap: wrap; gap: 8px; align-items: center; }
.excl-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 6px 5px 12px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--border); font-weight: 600; font-size: 13px; animation: mc-in .3s var(--ease-out, ease) both; }
.btn-x { display: grid; place-items: center; width: 22px; height: 22px; border: 0; border-radius: 50%; background: rgba(255,255,255,.08); color: var(--text); cursor: pointer; font-size: 15px; line-height: 1; transition: background .2s; }
.btn-x:hover { background: #f43f5e; }

/* Store item pop-up: computers side by side (the item big on the left, what it is and its price on the right);
   phones a drawer from the bottom with the price bar pinned. The art swipes (or taps) between With This and Now. */
.sheet-backdrop:has(.stp-sheet) { place-items: center; padding: 24px; }
.sheet.stp-sheet { position: relative; width: min(100%, 800px); padding: 0; overflow: hidden auto; gap: 0; border-radius: 22px; box-shadow: 0 30px 80px rgba(0,0,0,.55); }
.sheet.stp-sheet > h2, .sheet.stp-sheet > .sheet-actions { display: none; }
.stp { display: grid; grid-template-columns: 1.15fr 1fr; min-height: 380px; }
.stp-art { position: relative; min-width: 0; }
.stp-stage { position: relative; height: 100%; min-height: 300px; overflow: hidden; isolation: isolate; display: grid; background: radial-gradient(120% 90% at 30% 20%, color-mix(in srgb, var(--st, var(--accent)) 38%, transparent), transparent 70%), var(--bg, #090b0f); }
.stp-stage.stp-tint { background: linear-gradient(135deg, color-mix(in srgb, var(--a) 55%, #090b0f), color-mix(in srgb, var(--b) 40%, #090b0f) 55%, color-mix(in srgb, var(--c) 45%, #090b0f)); }
.stp-stage.stp-plain { padding: 18px; align-content: center; background: var(--panel-2, var(--bg)); }
.stp-bg { position: absolute; inset: 0; z-index: -1; animation: stp-zoom 1.2s var(--ease-out, ease) both; }
.stp-bg > * { position: absolute; inset: 0; }
.stp-bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(transparent 40%, rgba(0,0,0,.45)); }
.stp-slides { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.stp-slides::-webkit-scrollbar { display: none; }
.stp-slide { flex: 0 0 100%; scroll-snap-align: center; display: grid; align-content: center; gap: 10px; padding: 34px 28px 58px; min-width: 0; }
.stp-slide .mc { height: 200px; box-shadow: inset 0 0 0 2px var(--accent), 0 18px 40px rgba(0,0,0,.45); animation: stp-card .55s var(--ease-ios, ease) .08s both; }
.stp-label { justify-self: start; font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #fff; background: rgba(0,0,0,.45); padding: 4px 10px; border-radius: 99px; }
.stp-tabs { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); display: flex; gap: 4px; padding: 4px; border-radius: 99px; background: rgba(0,0,0,.5); }
.stp-tab { border: 0; background: none; color: rgba(255,255,255,.7); font: inherit; font-size: 12px; font-weight: 700; padding: 6px 12px; border-radius: 99px; cursor: pointer; transition: background var(--t-in, .25s) ease, color var(--t-in, .25s) ease; }
.stp-tab.on { background: var(--accent); color: #fff; }
.stp-big { display: grid; justify-items: center; gap: 4px; color: #fff; text-align: center; animation: stp-card .55s var(--ease-ios, ease) .08s both; }
.stp-big b { font-size: clamp(54px, 9vw, 84px); line-height: 1; font-weight: 900; text-shadow: 0 0 34px color-mix(in srgb, var(--st, var(--accent)) 70%, transparent); }
.stp-big span { font-size: 15px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; opacity: .85; }
.stp-glyph { display: grid; place-items: center; width: 110px; height: 110px; border-radius: 30px; background: color-mix(in srgb, var(--st, var(--accent)) 30%, transparent); box-shadow: 0 0 50px color-mix(in srgb, var(--st, var(--accent)) 45%, transparent); }
.stp-glyph svg { width: 54px; height: 54px; }
.stp-x { position: absolute; top: 12px; right: 12px; z-index: 2; width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(0,0,0,.5); color: #fff; cursor: pointer; transition: background .2s ease, transform .2s var(--ease-ios, ease); }
.stp-x:hover { background: rgba(0,0,0,.75); transform: rotate(90deg); }
.stp-x svg { width: 16px; height: 16px; }
.stp-info { display: flex; flex-direction: column; gap: 10px; padding: 26px 24px 20px; min-width: 0; }
.stp-info > * { animation: item-in var(--t-in, .3s) var(--ease-ios, ease) both; }
.stp-info > :nth-child(2) { animation-delay: 40ms; } .stp-info > :nth-child(3) { animation-delay: 80ms; } .stp-info > :nth-child(4) { animation-delay: 120ms; } .stp-info > :nth-child(n+5) { animation-delay: 160ms; }
.stp-type { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); padding: 5px 10px; border-radius: 99px; }
.stp-type svg { width: 13px; height: 13px; }
.stp-name { margin: 0; font-size: 26px; line-height: 1.15; }
.stp-line { color: var(--muted); }
.stp-points { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 8px; }
.stp-points li { position: relative; padding-left: 26px; font-size: 14px; }
.stp-points li::before { content: ''; position: absolute; left: 0; top: 1px; width: 18px; height: 18px; border-radius: 50%; background: color-mix(in srgb, var(--accent) 18%, transparent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ff7a1f' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 12px no-repeat; }
.stp-buy { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 16px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.stp-buy .st-price { font-size: 24px; }
.stp-own { font-size: 18px; color: var(--good, #4ade80); }
.stp-acts { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.stp-acts .btn { min-width: 120px; }
@keyframes stp-zoom { from { transform: scale(1.08); opacity: 0; } }
@keyframes stp-card { from { transform: translateY(16px) scale(.96); opacity: 0; } }
@keyframes stp-up { from { transform: translateY(100%); } }
@keyframes stp-down { to { transform: translateY(100%); } }
@media (max-width: 759px) {
  .sheet-backdrop:has(.stp-sheet) { place-items: end center; padding: 0; }
  .sheet-backdrop .sheet.stp-sheet { width: 100%; max-height: calc(92vh / var(--z)); border-radius: 22px 22px 0 0; padding: 0; overflow: auto; animation: stp-up .42s var(--ease-ios, ease) both; }
  .sheet-backdrop.leaving .sheet.stp-sheet { animation: stp-down var(--t-out, .22s) var(--ease-out, ease) both; }
  .sheet.stp-sheet::before { content: ''; position: absolute; top: 8px; left: 50%; z-index: 3; width: 40px; height: 4px; margin-left: -20px; border-radius: 4px; background: rgba(255,255,255,.55); }
  .stp { grid-template-columns: 1fr; min-height: 0; }
  .stp-stage { min-height: 0; height: auto; }
  .stp-slide { padding: 30px 18px 54px; }
  .stp-slide .mc { height: 170px; }
  .stp-info { padding: 18px 16px 0; }
  .stp-name { font-size: 22px; }
  .stp-buy { position: sticky; bottom: 0; margin: 4px -16px 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--panel); flex-wrap: nowrap; }
  .stp-acts { flex-wrap: nowrap; }
  .stp-acts .btn { min-width: 0; min-height: 46px; padding-inline: 18px; animation: none; }
}
@media (prefers-reduced-motion: reduce) { .stp-bg, .stp-slide .mc, .stp-big, .stp-info > *, .sheet.stp-sheet { animation: none !important; } }
