
/* Self-hosted pixel faces · files in apps/web/public/assets/fonts/ (no CDN). */
@font-face {
  font-family: "Press Start 2P";
  src: url("/assets/fonts/PressStart2P-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Pixeloid Sans";
  src: url("/assets/fonts/pixeloid.sans.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Pixeloid Sans";
  src: url("/assets/fonts/pixeloid.sans-bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root,
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f1a2c;
  --bg-elevated: #1b2b3a;
  --ink: #d4c9ba;
  --ink-strong: #f0e9dc;
  --muted: #9aa8bc;
  /* Primary gold rim matches logged-out landing panels (slim / faint). */
  --line: rgba(212, 197, 154, 0.48);
  --line-soft: rgba(212, 197, 154, 0.32);
  --line-alt: #4a5a7a;
  --line-alt-soft: rgba(185, 140, 255, 0.38);
  /* Universal .btn face is Pixel Quest green via --btn-base in shell-btn.css.ts; --accent no longer drives it. */
  --accent: #c28f52;
  --accent-hover: #d4a468;
  --accent-ink: #1b1204;
  --ok: #8fb9a4;
  --danger: #b8432f;
  --danger-bg: rgba(184, 67, 47, 0.42);
  --equip: #e8903a;
  --equip-shadow: #b45309;
  --equip-ink: #1a0e04;
  --pct: #d4a574;
  --pct-bg: rgba(212, 165, 116, 0.16);
  --notice-bg: rgba(74, 90, 122, 0.42);
  --panel: rgba(15, 26, 44, 0.88);
  --panel-strong: rgba(11, 20, 35, 0.96);
  --header: rgba(9, 17, 30, 0.96);
  --scrim: rgba(6, 12, 22, 0.62);
  --shadow: 0 0.5rem 1.5rem rgba(2, 8, 18, 0.34);
  --scene-image: url("/assets/splash/bg.webp");
  --gold: #d4c59a;
  /* Rarity ladder (kanban / planner headings · site-wide). */
  --rarity-common: #c8ced8;
  --rarity-common-ink: #1a2030;
  --rarity-common-border: #8a93a3;
  --rarity-uncommon: #34d399;
  --rarity-uncommon-ink: #06241a;
  --rarity-uncommon-border: #059669;
  --rarity-rare: #38bdf8;
  --rarity-rare-ink: #082635;
  --rarity-rare-border: #0284c7;
  --rarity-epic: #8f62d4;
  --rarity-epic-ink: #1a1028;
  --rarity-epic-border: #6f3fc4;
  --rarity-legendary: #e0b050;
  --rarity-legendary-ink: #1a0e04;
  --rarity-legendary-border: #8a6d2f;
  --rarity-event: #e09a5c;
  --rarity-event-ink: #2a1408;
  --rarity-event-border: #ca7b76;
  /* Admin rarity board · blue slate bed inside the Set 1 wood rim. */
  --rarity-board-slate-top: #1f2c4f;
  --rarity-board-slate-bot: #172240;
  --rarity-board-card-top: #253654;
  --rarity-board-card-bot: #17233b;
  --rarity-board-line: rgb(123 148 185 / 42%);
  --rarity-board-gold: #d4b36e;
  --rarity-board-gold-bright: #f0d18a;
  --rarity-board-muted: #aeb9ca;
  --rarity-board-ink: #f0e6d1;
  --rarity-board-well: #0b1422;
  /* Date-stamp weekday accents (day-of-week only). */
  --date-weekday-sun: #e07070;
  --date-weekday-mon: #e0a050;
  --date-weekday-tue: #e0c85a;
  --date-weekday-wed: #6fbf6a;
  --date-weekday-thu: #5ab0e0;
  --date-weekday-fri: #8a7ae0;
  --date-weekday-sat: #e07ab8;
  --scene-shade: rgba(6, 12, 22, 0.9);
  --scene-ink: #f0e9dc;
  --scene-muted: #b7c3d6;
  --scene-line: rgba(212, 197, 154, 0.38);

  --font-display: "Literata", Georgia, "Times New Roman", serif;
  --font-ui: "Literata", Georgia, "Times New Roman", serif;
  /* Pixel UI · settings board first; sitewide swap is opt-in later. */
  --font-pixel: "Press Start 2P", "Courier New", Courier, monospace;
  --font-pixel-body: "Pixeloid Sans", "Courier New", Courier, monospace;
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text: 1rem;
  --text-lg: 1.125rem;
  --text-xl: clamp(1.65rem, 4vw, 2.5rem);
  --text-hero: clamp(2.5rem, 8vw, 5rem);

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;

  --radius-sm: 0.25rem;
  --radius: 0.5rem;
  --radius-lg: 0.75rem;
  --border-width: 2px;
  /* Tighter Y padding · pairs with larger .btn type so net height stays close. */
  --control-y: 0.42rem;
  --control-x: 1rem;
  /* One-row site header (brand · nav · tools) + the thick v3 wood bar. */
  --header-h: 5rem;
  /* Content band + bottom wood bar (matches .site-header height). */
  --header-offset: calc(var(--header-h) + var(--wood-rim-w));
  /* Footer content band + the same thick top bar. */
  --footer-h: 4rem;
  --footer-offset: calc(var(--footer-h) + var(--wood-rim-w));
  /* Coop v2 header/footer bed · painted plank SVG from the demo (seamless tile). */
  --planks-header: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%22640%22 height=%2272%22 viewBox=%220 0 640 72%22%3E%3Cdefs%3E%3ClinearGradient id=%22sh%22 x1=%220%22 y1=%220%22 x2=%220%22 y2=%221%22%3E%3Cstop offset=%220%22 stop-color=%22%23000%22 stop-opacity=%220%22/%3E%3Cstop offset=%221%22 stop-color=%22%23000%22 stop-opacity=%22.45%22/%3E%3C/linearGradient%3E%3ClinearGradient id=%22tp%22 x1=%220%22 y1=%220%22 x2=%220%22 y2=%221%22%3E%3Cstop offset=%220%22 stop-color=%22%23ffdcaa%22 stop-opacity=%22.10%22/%3E%3Cstop offset=%221%22 stop-color=%22%23ffdcaa%22 stop-opacity=%220%22/%3E%3C/linearGradient%3E%3Cfilter id=%22d0%22 x=%220%22 y=%220%22 width=%22100%25%22 height=%22100%25%22%3E%3CfeTurbulence type=%22fractalNoise%22 baseFrequency=%220.0035 0.16%22 numOctaves=%224%22 seed=%22143%22 stitchTiles=%22stitch%22/%3E%3CfeColorMatrix values=%220 0 0 0 0.10  0 0 0 0 0.05  0 0 0 0 0.015  0 0 0 2.4 -0.95%22/%3E%3C/filter%3E%3Cfilter id=%22l0%22 x=%220%22 y=%220%22 width=%22100%25%22 height=%22100%25%22%3E%3CfeTurbulence type=%22fractalNoise%22 baseFrequency=%220.005 0.22%22 numOctaves=%223%22 seed=%22148%22 stitchTiles=%22stitch%22/%3E%3CfeColorMatrix values=%220 0 0 0 0.95  0 0 0 0 0.72  0 0 0 0 0.45  0 0 0 1.8 -0.78%22/%3E%3C/filter%3E%3Cfilter id=%22d1%22 x=%220%22 y=%220%22 width=%22100%25%22 height=%22100%25%22%3E%3CfeTurbulence type=%22fractalNoise%22 baseFrequency=%220.0035 0.16%22 numOctaves=%224%22 seed=%22160%22 stitchTiles=%22stitch%22/%3E%3CfeColorMatrix values=%220 0 0 0 0.10  0 0 0 0 0.05  0 0 0 0 0.015  0 0 0 2.4 -0.95%22/%3E%3C/filter%3E%3Cfilter id=%22l1%22 x=%220%22 y=%220%22 width=%22100%25%22 height=%22100%25%22%3E%3CfeTurbulence type=%22fractalNoise%22 baseFrequency=%220.005 0.22%22 numOctaves=%223%22 seed=%22165%22 stitchTiles=%22stitch%22/%3E%3CfeColorMatrix values=%220 0 0 0 0.95  0 0 0 0 0.72  0 0 0 0 0.45  0 0 0 1.8 -0.78%22/%3E%3C/filter%3E%3C/defs%3E%3Crect x=%220%22 y=%220%22 width=%22640%22 height=%2236%22 fill=%22%23281809%22/%3E%3Crect x=%220%22 y=%220%22 width=%22640%22 height=%2236%22 filter=%22url%28%23l0%29%22 opacity=%22.26%22/%3E%3Crect x=%220%22 y=%220%22 width=%22640%22 height=%2236%22 filter=%22url%28%23d0%29%22 opacity=%22.85%22/%3E%3Cellipse cx=%22536%22 cy=%2219%22 rx=%2211%22 ry=%225.5%22 fill=%22none%22 stroke=%22%232a1608%22 stroke-width=%221.2%22 opacity=%220.5%22/%3E%3Cellipse cx=%22536%22 cy=%2219%22 rx=%228%22 ry=%224%22 fill=%22none%22 stroke=%22%232a1608%22 stroke-width=%221.2%22 opacity=%220.55%22/%3E%3Cellipse cx=%22536%22 cy=%2219%22 rx=%225%22 ry=%222.6%22 fill=%22none%22 stroke=%22%232a1608%22 stroke-width=%221.2%22 opacity=%220.6%22/%3E%3Cellipse cx=%22536%22 cy=%2219%22 rx=%222.4%22 ry=%221.3%22 fill=%22none%22 stroke=%22%232a1608%22 stroke-width=%221.2%22 opacity=%220.75%22/%3E%3Cellipse cx=%22536%22 cy=%2219%22 rx=%222.2%22 ry=%221.2%22 fill=%22%2324130a%22 opacity=%22.8%22/%3E%3Crect x=%22375%22 y=%220%22 width=%222%22 height=%2233%22 fill=%22%23190d05%22 opacity=%22.92%22/%3E%3Crect x=%22377%22 y=%220%22 width=%221%22 height=%2233%22 fill=%22%23ffdcaa%22 opacity=%22.16%22/%3E%3Ccircle cx=%22365%22 cy=%2211%22 r=%222.3%22 fill=%22%232a1a0e%22/%3E%3Ccircle cx=%22364.4%22 cy=%2210.4%22 r=%221%22 fill=%22%239a7a52%22 opacity=%22.7%22/%3E%3Ccircle cx=%22365%22 cy=%2222%22 r=%222.3%22 fill=%22%232a1a0e%22/%3E%3Ccircle cx=%22364.4%22 cy=%2221.4%22 r=%221%22 fill=%22%239a7a52%22 opacity=%22.7%22/%3E%3Ccircle cx=%22387%22 cy=%2211%22 r=%222.3%22 fill=%22%232a1a0e%22/%3E%3Ccircle cx=%22386.4%22 cy=%2210.4%22 r=%221%22 fill=%22%239a7a52%22 opacity=%22.7%22/%3E%3Ccircle cx=%22387%22 cy=%2222%22 r=%222.3%22 fill=%22%232a1a0e%22/%3E%3Ccircle cx=%22386.4%22 cy=%2221.4%22 r=%221%22 fill=%22%239a7a52%22 opacity=%22.7%22/%3E%3Crect x=%220%22 y=%220%22 width=%22640%22 height=%226%22 fill=%22url%28%23tp%29%22/%3E%3Crect x=%220%22 y=%2222%22 width=%22640%22 height=%2211%22 fill=%22url%28%23sh%29%22/%3E%3Crect x=%220%22 y=%2233%22 width=%22640%22 height=%223%22 fill=%22%23190d05%22 opacity=%22.9%22/%3E%3Crect x=%220%22 y=%2236%22 width=%22640%22 height=%2236%22 fill=%22%232d1c0e%22/%3E%3Crect x=%220%22 y=%2236%22 width=%22640%22 height=%2236%22 filter=%22url%28%23l1%29%22 opacity=%22.26%22/%3E%3Crect x=%220%22 y=%2236%22 width=%22640%22 height=%2236%22 filter=%22url%28%23d1%29%22 opacity=%22.85%22/%3E%3Crect x=%22212%22 y=%2236%22 width=%222%22 height=%2233%22 fill=%22%23190d05%22 opacity=%22.92%22/%3E%3Crect x=%22214%22 y=%2236%22 width=%221%22 height=%2233%22 fill=%22%23ffdcaa%22 opacity=%22.16%22/%3E%3Ccircle cx=%22202%22 cy=%2247%22 r=%222.3%22 fill=%22%232a1a0e%22/%3E%3Ccircle cx=%22201.4%22 cy=%2246.4%22 r=%221%22 fill=%22%239a7a52%22 opacity=%22.7%22/%3E%3Ccircle cx=%22202%22 cy=%2258%22 r=%222.3%22 fill=%22%232a1a0e%22/%3E%3Ccircle cx=%22201.4%22 cy=%2257.4%22 r=%221%22 fill=%22%239a7a52%22 opacity=%22.7%22/%3E%3Ccircle cx=%22224%22 cy=%2247%22 r=%222.3%22 fill=%22%232a1a0e%22/%3E%3Ccircle cx=%22223.4%22 cy=%2246.4%22 r=%221%22 fill=%22%239a7a52%22 opacity=%22.7%22/%3E%3Ccircle cx=%22224%22 cy=%2258%22 r=%222.3%22 fill=%22%232a1a0e%22/%3E%3Ccircle cx=%22223.4%22 cy=%2257.4%22 r=%221%22 fill=%22%239a7a52%22 opacity=%22.7%22/%3E%3Crect x=%220%22 y=%2236%22 width=%22640%22 height=%226%22 fill=%22url%28%23tp%29%22/%3E%3Crect x=%220%22 y=%2258%22 width=%22640%22 height=%2211%22 fill=%22url%28%23sh%29%22/%3E%3Crect x=%220%22 y=%2269%22 width=%22640%22 height=%223%22 fill=%22%23190d05%22 opacity=%22.9%22/%3E%3C/svg%3E");
  --planks-header-size: 640px 72px;
  /* P1 plank wall, boards turned horizontal (Wood UI Kit). */
  --wood-plank: repeating-linear-gradient(
    180deg,
    #3e2616 0 3px,
    #36210f 3px 6px,
    #33200f 6px 9px,
    #2e1b0e 9px 11px,
    #1a0f08 11px 12px,
    #4a2e1a 12px 15px,
    #42281a 15px 18px,
    #3e2616 18px 21px,
    #2e1b0e 21px 23px,
    #0c0704 23px 24px
  );
  /* Darker alternate bed (activity modal loot panels). */
  --wood-plank-dark: repeating-linear-gradient(
    180deg,
    #24160e 0 3px,
    #1e120a 3px 6px,
    #1a1008 6px 9px,
    #160c06 9px 11px,
    #0a0603 11px 12px,
    #2a1a10 12px 15px,
    #24160e 15px 18px,
    #1e120a 18px 21px,
    #160c06 21px 23px,
    #050302 23px 24px
  );
  /* Vertical boards (Enchanted Incubator · egg + equipped panels). */
  --wood-plank-v: repeating-linear-gradient(
    90deg,
    #3e2616 0 3px,
    #36210f 3px 6px,
    #33200f 6px 9px,
    #2e1b0e 9px 11px,
    #1a0f08 11px 12px,
    #4a2e1a 12px 15px,
    #42281a 15px 18px,
    #3e2616 18px 21px,
    #2e1b0e 21px 23px,
    #0c0704 23px 24px
  );
  --wood-plank-v-dark: repeating-linear-gradient(
    90deg,
    #24160e 0 3px,
    #1e120a 3px 6px,
    #1a1008 6px 9px,
    #160c06 9px 11px,
    #0a0603 11px 12px,
    #2a1a10 12px 15px,
    #24160e 15px 18px,
    #1e120a 18px 21px,
    #160c06 21px 23px,
    #050302 23px 24px
  );
  /* Universal wood rim. Width plus the two plank stops. Settings overrides --wood-rim-w locally. */
  --wood-rim-w: 12px;
  --wood-rim-hi: #7a5330;
  --wood-rim-lo: #684428;
  /* Pop-up bed. dialog.modal reads this. The Settings board (.profile-drop) does not. */
  --modal-bed: var(--slate-window);
  /* Header/footer strip · same thickness as the full v3 rim. */
  --wood-bar-w: var(--wood-rim-w);
  /* Set-1 side clearance and hanging-sign shift. Phone overrides shrink these. */
  /* Side clearance inside vine-framed panels (body pads push content inward). */
  --vine-gutter: 80px;
  --vine-gutter-wide: 88px;
  /*
   * Page-panel body X inset · shop / arcade / admin slate bodies MUST stay in lockstep.
   * When you change this, update notes on .shop-catalog__body / .arcade-panel__body /
   * .admin-shell__body (they share this token · do not hand-tune one alone).
   */
  --page-panel-body-x: max(1.35rem, calc(var(--vine-gutter) * 0.4));
  /* Dotted night slate · coop Today panel / shop / arcade / admin / notify bodies. */
  --slate-window: radial-gradient(rgba(255,255,255,.04) 1px,transparent 1.2px) 0 0 / 7px 7px,
    linear-gradient(180deg, #27315a 0%, #1a2342 100%);
  /* Solid slate well · lodge reward boxes and other sunken sub-containers. Not the dotted bed. */
  --slate-well: linear-gradient(180deg, color-mix(in srgb, #2a3a4e 70%, #0c1218), #121a24);
  --page-panel-slate: var(--slate-window);
  /* Sunken sub-container used inside pop-ups and cards (the demo indent). */
  --inset-bg: rgb(14 9 6 / 55%);
  --inset-border: 1px solid #1a0e06;
  --inset-shadow: inset 0 3px 9px rgb(0 0 0 / 65%);
  /* Coop v3 popup scale. dialogShellHtml({ size }) sets data-size. */
  /* 100% of the layout viewport, not 100vw, so the scrollbar does not shove the sheet to the right. */
  --modal-sm: min(410px, calc(100% - 1rem));
  --modal-md: min(28rem, calc(100% - 1rem));
  --modal-lg: min(980px, calc(100% - 1rem));
  --modal-xl: min(1180px, calc(100% - 1rem));
  --modal-max: min(1360px, calc(100% - 1.5rem));
  --sign-nudge: 40px;
  --sign-nudge-sip: 90px;
  /* Page banner plaques (shop / arcade / admin) · shared hang origin. */
  --banner-plaque-top: -0.15rem;
  --banner-plaque-pad-top: 1.4rem;
  --banner-plaque-left: 0.7rem;
  /* Clears left vine stack · do not per-page override. */
  --banner-plaque-x: 52px;
  /* Width a left-hung banner plaque occupies · banner chrome (tabs) starts after it. */
  --banner-plaque-w: 14rem;
  --banner-plaque-clear: calc(var(--banner-plaque-left) + var(--banner-plaque-x) + var(--banner-plaque-w) + 0.75rem);
  /* Shared page-banner strip height (shop / arcade / admin). */
  --page-banner-ratio: 16 / 4.35;
  --page-banner-min-h: 5.75rem;
  --page-banner-max-h: 10rem;
  /*
   * Frame sets · every wood-framed container pulls its spacing from here.
   * Sets (pixel-frame.css.ts): flush · card · roomy · vines. Heads: wood bar,
   * hanging sign, banner plaque. Close plates: in-head, in-band, overlay.
   * Change a value here, never hand-tune one container.
   */
  /* Same 8px bevel as the header gold. Wood beams still use --wood-rim-w. */
  --frame-rim: 8px;
  --frame-bar: var(--wood-bar-w);
  /* Negative of the rim · children bleed over the rim padding to touch the beams. */
  --frame-bleed: calc(-1 * var(--frame-rim));
  /* Inner pads */
  --frame-pad: var(--space-4);
  --frame-pad-roomy: var(--space-5);
  --frame-vine-gutter: var(--vine-gutter);
  /* Default modal / panel body inset (flush sets) */
  --frame-body-pad: var(--space-4) var(--space-3) var(--space-3);
  /* Hanging sign (Set 1 plaque, sip plaque) */
  --frame-sign-top: calc(var(--frame-rim) + 0.2rem);
  --frame-sign-top-sip: calc(var(--frame-rim) + 0.55rem);
  --frame-sign-nudge: var(--sign-nudge);
  --frame-sign-nudge-sip: var(--sign-nudge-sip);
  /* Close plate · gap below the top rim and in from the side rim */
  --frame-close-gap: 0.35rem;
  --frame-close-top: calc(var(--frame-rim) + var(--frame-close-gap));
  --frame-close-right: calc(var(--frame-rim) + 0.3rem);
  /* Thin even wood rim (inner panels · same on all four sides). */
  --wood-rim-thin-w: 7px;
  --rail-w: 13rem;
  /* Was 82.25rem (1316px) · +200px body wrap. */
  --content-w: 94.75rem;
  --reading-w: 48rem;
  /* Header stays above page chrome; toasts sit above open modals. */
  --z-header: 360;
  --z-menu: 370;
  --z-skip: 390;
  --z-modal: 400;
  --z-toast: 450;
  /* Tips sit above wood rims, modals, and page wrappers (fixed tips on craft). */
  --z-tip: 5000;
  /* Earn-stage popup (Popup-Modals_v2) · wood sign + slate well. */
  --earn-ink: #1a0e06;
  --earn-wood-1: #a8703a;
  --earn-wood-2: #7d4d22;
  --earn-wood-3: #5e3817;
  --earn-wood-4: #2b1709;
  --earn-cream: #fff1cc;
  --earn-straw: #f2cf73;
  --earn-mut: #c2ae88;
  --earn-grn: #9af0b0;
  --earn-inner-top: #3b4e66;
  --earn-inner-mid: #1c2838;
  --earn-inner-bot: #111a26;
  --earn-nail-hi: #f4ead0;
  --earn-nail-mid: #8d7a4e;
  --earn-close-hi: #ff8c74;
  --earn-close-mid: #d8412c;
  --earn-close-lo: #b3301e;
  --earn-close-edge: #6e180d;
  --earn-claim-hi: #a6f58a;
  --earn-claim-mid: #4cb43b;
  --earn-claim-lo: #348c28;
  --earn-claim-edge: #123a0f;
  /* Darker gold plaques · ink stays readable on claim cards. */
  --earn-plate-hi: #c9a04a;
  --earn-plate-mid: #8f6a28;
  --earn-plate-lo: #5c4214;
  --earn-plate-ink: #fff1c8;
  --earn-well-hi: #4c3a28;
  --earn-well-lo: #1d130b;
  --earn-val-bg: #0a0f0a;
  --earn-rope-a: #d9bd84;
  --earn-rope-b: #9a7a45;
  --earn-glow: #ffd36a33;
  --earn-hot: #f08a52;
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #dce4eb;
  --bg-elevated: #eef2f5;
  --ink: #243247;
  --ink-strong: #101b2c;
  --muted: #52637a;
  --line: #8395ad;
  --line-soft: rgba(74, 90, 122, 0.28);
  --line-alt: #4a5a7a;
  --line-alt-soft: rgba(138, 86, 224, 0.28);
  --accent: #c28f52;
  --accent-hover: #b87a3a;
  --accent-ink: #1b1204;
  --ok: #3f745f;
  --danger: #b8432f;
  --danger-bg: rgba(184, 67, 47, 0.16);
  --equip: #d97706;
  --equip-shadow: #92400e;
  --equip-ink: #fff8f0;
  --pct: #b8844f;
  --pct-bg: rgba(184, 132, 79, 0.14);
  --notice-bg: rgba(107, 139, 177, 0.18);
  --panel: rgba(238, 242, 245, 0.9);
  --panel-strong: rgba(246, 248, 250, 0.97);
  --header: rgba(220, 228, 235, 0.96);
  --scrim: rgba(220, 228, 235, 0.48);
  --shadow: 0 0.5rem 1.5rem rgba(32, 48, 69, 0.15);
  --scene-image: url("/assets/splash/bg.webp");
  --gold: #8a6d2f;
  --date-weekday-sun: #c05050;
  --date-weekday-mon: #c07830;
  --date-weekday-tue: #b89620;
  --date-weekday-wed: #3a8f3a;
  --date-weekday-thu: #2f7eb0;
  --date-weekday-fri: #6a5ab8;
  --date-weekday-sat: #b85090;
}


* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
/*
 * Sticky site footer · short pages (Community, etc.) still pin the bar to the
 * viewport bottom. Legal stack keeps its own fixed-footer / overflow rules.
 */
html:not(:has(.page-viewport)) {
  min-height: 100%;
}
body:not(:has(.page-viewport)) {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
body:not(:has(.page-viewport)) .site-layout {
  flex: 1 0 auto;
}
body:not(:has(.page-viewport)) .site-footer {
  flex-shrink: 0;
  margin-top: auto;
}
/* tip-place.js: break sticky :hover while scrolling so custom tips dismiss. */
html.tips-scroll-clear .tip,
html.tips-scroll-clear .affinity-tip {
  pointer-events: none !important;
}
html.tips-scroll-clear .tip.tip--open .tip__bubble,
html.tips-scroll-clear .tip:hover .tip__bubble,
html.tips-scroll-clear .affinity-tip.tip--open .affinity-tip__pop,
html.tips-scroll-clear .affinity-tip:hover .affinity-tip__pop,
html.tips-scroll-clear .tip:focus-within .tip__bubble,
html.tips-scroll-clear .affinity-tip:focus-within .affinity-tip__pop,
html.tips-scroll-clear .tip__bubble,
html.tips-scroll-clear .affinity-tip__pop,
html.tips-scroll-clear .tip-bubble--live {
  opacity: 0 !important;
  visibility: hidden !important;
}
body {
  font-family: var(--font-ui);
  font-size: var(--text);
  line-height: 1.55;
  background-color: var(--bg);
  background-image: var(--scene-image);
  background-size: cover;
  background-position: center top;
  background-attachment: fixed;
  color: var(--ink);
}
html[data-quality="low"] body {
  background-attachment: scroll;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: var(--scrim);
  pointer-events: none;
}
/* Settings board open · blur the page under the header menu. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: calc(var(--z-header, 40) - 1);
  background: rgb(2 7 18 / 0%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, background 0.15s ease;
}
html:has(.profile-drop.open) body::after {
  opacity: 1;
  background: rgb(2 7 18 / 55%);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  pointer-events: auto;
}
html[data-quality="low"]:has(.profile-drop.open) body::after {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
a { color: var(--accent-hover); }
a:hover { color: var(--ink-strong); }
button, input { font: inherit; }
/*
 * No global focus ring · the gold outline was cropping selects / modal edges.
 * Controls that need a keyboard cue opt in (buttons already have press/hover).
 */
:focus,
:focus-visible {
  outline: none;
}
/* Dialog hosts grab focus on showModal · keep suppressed. */
dialog:focus,
dialog:focus-visible,
dialog.modal:focus,
dialog.modal:focus-visible,
.modal__panel:focus,
.modal__panel:focus-visible,
.start-confirm-panel:focus,
.start-confirm-panel:focus-visible {
  outline: none;
}

.skip {
  position: fixed;
  left: var(--space-4);
  top: calc(var(--header-offset) + var(--space-2));
  z-index: var(--z-skip);
  padding: var(--space-2) var(--space-3);
  background: var(--accent);
  color: var(--accent-ink);
  transform: translateY(-10rem);
}
.skip:focus { transform: translateY(0); }

.site-header {
  /* Fixed to the viewport. Do not let .pixel-frame { position: relative } win. */
  position: fixed !important;
  top: 0 !important;
  left: 0;
  right: 0;
  width: 100%;
  z-index: var(--z-header);
  /* Content band + bottom wood bar so items can center in the clear area. */
  height: var(--header-offset);
  /* Thick v3 rim is .pixel-frame--bar::after. Bed is flat planks, not the double-row splitter tile. */
  border-bottom: 0;
  /* Visible so nav-group menus can hang below the wood band. */
  overflow: visible;
  background: var(--wood-plank);
  backdrop-filter: none;
}
/* Dedicated date/time chip (no TZ abbr - Settings owns the zone). */
.date-stamp {
  --date-weekday-color: var(--gold);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.28rem 0.7rem 0.28rem 0.55rem;
  font-family: var(--font-display);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  color: #f0e0b8;
  white-space: nowrap;
  border: 1px solid #5a3c24;
  border-radius: 0;
  background:
    linear-gradient(180deg, rgb(36 24 14 / 78%), rgb(16 10 6 / 90%));
  box-shadow:
    inset 0 0 0 1px #2a170c,
    0 1px 0 #1a1008;
}
.date-stamp[data-weekday="sun"] { --date-weekday-color: var(--date-weekday-sun); }
.date-stamp[data-weekday="mon"] { --date-weekday-color: var(--date-weekday-mon); }
.date-stamp[data-weekday="tue"] { --date-weekday-color: var(--date-weekday-tue); }
.date-stamp[data-weekday="wed"] { --date-weekday-color: var(--date-weekday-wed); }
.date-stamp[data-weekday="thu"] { --date-weekday-color: var(--date-weekday-thu); }
.date-stamp[data-weekday="fri"] { --date-weekday-color: var(--date-weekday-fri); }
.date-stamp[data-weekday="sat"] { --date-weekday-color: var(--date-weekday-sat); }
.date-stamp__weekday {
  color: var(--date-weekday-color);
  font-weight: 800;
}
.date-stamp__rest {
  color: #f0e0b8;
  font-weight: 600;
}
.date-stamp::before {
  content: "";
  width: 0.42rem;
  height: 0.42rem;
  flex: 0 0 auto;
  background: var(--date-weekday-color);
  box-shadow: 0 0 0 1px #2a170c;
}
.site-header.pixel-frame::after {
  z-index: 6;
}
.site-header__inner {
  /* One row: brand · centered nav · tools (music / notify / profile / purse). */
  --header-h: 5rem;
  height: var(--header-h);
  width: min(var(--content-w), calc(100% - var(--space-8)));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 0.35rem 0.45rem;
  box-sizing: border-box;
}
.site-header__inner > .brand {
  grid-column: 1;
  justify-self: start;
  min-width: 0;
}
.site-header__inner > .nav-rail {
  grid-column: 2;
  justify-self: center;
  min-width: 0;
}
.site-header__inner > .header-end {
  grid-column: 3;
  justify-self: end;
  align-self: center;
  min-width: 0;
}
.site-header__inner--no-rail {
  grid-template-columns: auto minmax(0, 1fr);
}
.site-header__inner--no-rail > .brand {
  grid-column: 1;
}
.site-header__inner--no-rail > .header-end {
  grid-column: 2;
}
/* Player name lives in the settings status banner · not the site header. */
.site-header__user,
.site-header__top,
.site-header__nav-row {
  display: none !important;
}
/* FPS chip · docked right of the brand logo: "FPS" label over the value. */
.site-header {
  position: relative;
}
#chiken-fps[data-fps-dock="header-brand"] {
  position: absolute;
  left: 0.7rem;
  top: auto;
  bottom: 0.35rem;
  transform: none;
  z-index: calc(var(--z-header, 40) + 3);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.05rem;
  padding: 0.1rem 0.2rem;
  margin: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  font: 11px/1.15 ui-monospace, Consolas, monospace;
  color: #e8f5c8;
  white-space: nowrap;
  box-sizing: border-box;
}
.chiken-fps__cap {
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  opacity: 0.7;
}
.chiken-fps__label {
  font-size: 0.95rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
/* Promoted into the top layer while a dialog is open so it stays above the backdrop blur. */
#chiken-fps.is-toplayer[data-fps-dock="header-brand"] {
  position: fixed;
  inset: auto;
  top: var(--fps-top, 2.6rem);
  left: var(--fps-left, 0.7rem);
  bottom: auto;
  transform: none;
  overflow: visible;
}
#chiken-fps.is-logging,
#chiken-fps[data-fps-logging="1"] {
  border: 0;
  box-shadow: none;
  color: #d8ffe4;
}
#chiken-fps[hidden] {
  display: none !important;
}
/* Lodge admin · Event/Normal tab fixed to the left screen edge under the header. */
.chiken-holiday-edge {
  position: fixed;
  left: 0;
  top: calc(var(--header-offset, 4.5rem) + 4.5rem);
  z-index: calc(var(--z-menu, 370) + 8);
  margin: 0;
  padding: 0.55rem 0.35rem;
  border: 1px solid #6c4728;
  border-left: 0;
  border-radius: 0 0.35rem 0.35rem 0;
  background: #14100cee;
  color: #f0e4c8;
  font: 700 0.72rem/1.1 ui-monospace, Consolas, monospace;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  transform-origin: center center;
  cursor: pointer;
  pointer-events: auto;
  box-shadow: 0 0.35rem 0.85rem rgb(0 0 0 / 35%);
}
.chiken-holiday-edge:hover,
.chiken-holiday-edge:focus-visible {
  outline: none;
  border-color: color-mix(in srgb, var(--gold, #c4a35a) 55%, #6c4728);
  color: #fff6e4;
}
.chiken-holiday-edge[aria-pressed="true"] {
  border-color: #7eb0ff;
  color: #9ec4ff;
}
.chiken-holiday-edge[hidden] {
  display: none !important;
}
.site-footer {
  position: relative;
  z-index: 2;
  width: 100%;
  height: var(--footer-offset, calc(4rem + var(--wood-rim-w)));
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: visible;
  /* Same flat plank bed as the header. The thick top rim is .pixel-frame--bar-top::after. */
  background: var(--wood-plank);
  isolation: isolate;
}
.site-footer.pixel-frame {
  position: relative;
  box-shadow: var(--shadow);
}
.site-footer__inner {
  height: var(--footer-h, 4rem);
  width: min(var(--content-w), calc(100% - var(--space-8)));
  margin: 0 auto;
  padding-top: 0;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: var(--space-4);
  box-sizing: border-box;
}
.site-footer__copy {
  margin: 0;
  justify-self: start;
  align-self: center;
  line-height: 1;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0.06em;
}
.site-footer__legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 0.35rem 1rem;
  justify-self: end;
  align-self: center;
  width: 100%;
  max-width: min(28rem, 100%);
}
.site-footer__legal .site-footer__discord {
  flex: 1 1 auto;
  justify-content: center;
  min-width: 0;
}
.site-footer__legal a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
}
.site-footer__legal a:hover {
  color: var(--ink-strong);
}
.site-footer__legal a[aria-current="page"] {
  color: var(--ink-strong);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
.site-footer__discord {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #9aa4f5;
  font-weight: 700;
}
.site-footer__discord .icon {
  width: 1.05rem;
  height: 1.05rem;
  flex: none;
}
.site-footer__discord:hover {
  color: #c5cafe;
}
/*
 * Shop and legal pages · page-viewport: no body scroll, fixed footer,
 * only .legal-doc__body scrolls. Full --content-w width.
 */
.page-viewport {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: 0;
  width: 100%;
}
html:has(.page-viewport),
body:has(.page-viewport) {
  height: 100%;
  overflow: hidden;
}
body:has(.page-viewport) {
  height: 100dvh;
  max-height: 100dvh;
}
body:has(.page-viewport) .site-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: var(--z-header);
}
body:has(.page-viewport) .site-layout {
  box-sizing: border-box;
  height: 100dvh;
  max-height: 100dvh;
  padding-top: var(--header-offset);
  padding-bottom: var(--footer-offset, var(--header-offset));
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
body:has(.page-viewport) .site-layout > .page {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding-top: var(--space-3);
  padding-bottom: var(--space-3);
  overflow: hidden;
}
body:has(.page-viewport) .page-viewport {
  flex: 1 1 auto;
  min-height: 0;
}
.legal-doc.vine-page.pixel-frame {
  display: flex;
  flex-direction: column;
  gap: 0;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  max-width: none;
  margin: 0;
  /* Set: flush (frame-set registry, pixel-frame.css.ts). */
  background: #120c08;
  box-shadow: 0 10px 24px rgb(0 0 0 / 35%);
  color: #d4c9ba;
  overflow: hidden;
}
.legal-doc__head.modal-wood-head {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  min-height: 4.1rem;
  margin: 0;
  width: auto;
  padding: 0.7rem 1.15rem calc(0.7rem + 10px) 0.35rem;
  box-sizing: border-box;
}
.legal-doc__head.modal-wood-head h2 {
  margin: 0;
  font-size: clamp(1.35rem, 2.6vw, 1.85rem);
  color: #f0e2c4;
  text-shadow: 0 1px 0 #1a1008;
}
/* Carved pip well · scroll lives here. */
.legal-doc__body {
  flex: 1 1 auto;
  min-height: 0;
  margin: 0;
  padding: var(--space-4) var(--space-4) var(--space-5);
  overflow-x: hidden;
  overflow-y: auto;
  box-sizing: border-box;
  border-radius: 2px;
  background:
    linear-gradient(180deg, rgb(8 12 18 / 55%), rgb(6 10 14 / 72%)),
    #1a222c;
  box-shadow:
    inset 0 0 0 2px #05080c,
    inset 6px 6px 0 0 #090d12,
    inset -6px -6px 0 0 #36424f;
  color: #d4c9ba;
}
.legal-doc__lead {
  margin: 0 0 0.85rem;
  color: color-mix(in srgb, #d4c9ba 85%, #8a7a62);
}
.legal-doc__body h3 {
  margin: 1.25rem 0 0.45rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: 0.03em;
  color: #f0e2c4;
}
.legal-doc__body h3:first-of-type {
  margin-top: 0.35rem;
}
.legal-doc__body p,
.legal-doc__body li {
  margin: 0 0 0.65rem;
  line-height: 1.55;
  color: #d4c9ba;
}
.legal-doc__body ul {
  margin: 0 0 0.75rem;
  padding-left: 1.25rem;
}
.legal-doc__body strong {
  color: #f0e2c4;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  /* Match header control lip clearance so brand lines up with buttons. */
  margin-bottom: 0.375rem;
  color: var(--ink-strong);
  font-family: var(--font-display);
  font-size: 1.42rem;
  letter-spacing: 0.13em;
  line-height: 1;
  text-decoration: none;
}
.brand__mark {
  display: block;
  width: 2.1rem;
  height: 2.1rem;
  filter: drop-shadow(0 0 8px #b98cff);
}
.brand:hover { color: var(--ink-strong); }
.egg-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  justify-self: center;
  min-height: 2.25rem;
  padding: var(--space-1) var(--space-3);
  border: var(--border-width) solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: var(--text-xs);
  letter-spacing: 0.06em;
  text-decoration: none;
}
.egg-badge:hover {
  border-color: var(--accent);
  color: var(--ink-strong);
  text-decoration: none;
}
.egg-badge img {
  display: block;
  width: 1.5rem;
  height: 1.5rem;
  object-fit: contain;
  image-rendering: pixelated;
}
.header-end {
  justify-self: end;
  align-self: center;
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 0;
  margin-left: 0;
}
/* Inbox · sits between music and profile; gold count pip like the old avatar badge. */
.header-notify.btn {
  --btn-face: #4a4f57;
  --btn-lip: #25282d;
  --btn-shell: color-mix(in srgb, #25282d 72%, #140a04);
  --btn-ink: #fff8f0;
  position: relative;
  display: inline-grid;
  place-items: center;
  color: var(--btn-ink);
  text-decoration: none;
}
.header-notify.btn:hover,
.header-notify.btn:focus-visible {
  --btn-face: #5d636c;
  outline: none;
}
.header-notify__glyph {
  display: inline-grid;
  place-items: center;
  width: 1.15rem;
  height: 1.15rem;
  line-height: 0;
}
.header-notify__glyph .icon {
  width: 1.15rem;
  height: 1.15rem;
}
.header-notify .notify-badge--header {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 2;
  pointer-events: none;
  transform: translate(58%, -58%);
  min-width: 1.7rem;
  width: auto;
  height: 1.7rem;
  padding: 0 0.32rem;
  font-size: 0.95rem;
  line-height: 1;
}
/* Chikonomicon / Global Help family is orange. */
.chikonomicon-toggle.btn {
  border: 0;
  --btn-face: #e07a28;
  --btn-lip: #8a4010;
  --btn-shell: color-mix(in srgb, #8a4010 72%, #140a04);
  --btn-ink: #fff8f0;
  display: inline-grid;
  place-items: center;
  color: var(--btn-ink);
}
.chikonomicon-toggle.btn:hover,
.chikonomicon-toggle.btn:focus-visible {
  --btn-face: #f08830;
  --btn-lip: #8a4010;
  outline: none;
}
.chikonomicon-toggle__glyph {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 1.05rem;
  height: 1.05rem;
  line-height: 0;
}
.chikonomicon-toggle__icon {
  display: block;
  width: 1.05rem;
  height: 1.05rem;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}
.chikonomicon-toggle__icon rect {
  fill: currentColor;
}
.header-auth {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-2);
}
.header-auth .btn {
  /* Keep the universal .btn lip · match condensed header control height. */
  margin: 0;
  margin-bottom: 0.375rem;
  min-height: 2.25rem;
  white-space: nowrap;
  font-size: var(--text-sm);
  font-weight: 800;
  letter-spacing: 0.02em;
}
.header-auth__discord,
a.btn.header-auth__discord,
.btn.header-auth__discord {
  --btn-face: #5865f2 !important;
  --btn-lip: #3c45a5 !important;
  color: #fff !important;
}
.header-auth__discord:hover,
a.btn.header-auth__discord:hover,
.btn.header-auth__discord:hover {
  --btn-face: color-mix(in srgb, #5865f2 88%, #fff) !important;
  --btn-lip: #3c45a5 !important;
  color: #fff !important;
}
.header-auth__dev,
a.btn.header-auth__dev,
.btn.header-auth__dev,
.btn.secondary.header-auth__dev {
  --btn-face: var(--gold) !important;
  --btn-lip: color-mix(in srgb, var(--gold) 40%, #000) !important;
  color: #000 !important;
}
.header-auth__dev:hover,
a.btn.header-auth__dev:hover,
.btn.header-auth__dev:hover,
.btn.secondary.header-auth__dev:hover {
  --btn-face: color-mix(in srgb, var(--gold) 88%, #fff) !important;
  --btn-lip: color-mix(in srgb, var(--gold) 40%, #000) !important;
  color: #000 !important;
}
.header-auth .profile-drop {
  margin-left: 0.15rem;
}
.profile-drop {
  position: relative;
  display: inline-flex;
  align-items: center;
  align-self: center;
  gap: 0.45rem;
}
/* Stacked Chimkoins / Chips beside the profile plate (desktop). Phone hides below. */
.header-wallet {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0.12rem;
  margin-left: 0.2rem;
  margin-bottom: 0;
  line-height: 1.05;
  align-self: center;
}
.header-wallet__row {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.05;
}
button.header-wallet__row--chips {
  cursor: pointer;
  border-radius: 0.2rem;
  pointer-events: auto;
}
button.header-wallet__row--chips:hover,
button.header-wallet__row--chips:focus-visible {
  color: var(--ink-strong);
  outline: none;
  text-decoration: underline;
  text-underline-offset: 0.12em;
}
.header-wallet__row .icon,
.header-wallet__row svg,
.header-wallet__row img.icon {
  width: 1.05rem;
  height: 1.05rem;
  flex: 0 0 auto;
  object-fit: contain;
  image-rendering: pixelated;
}
.profile-menu__wallet {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
  /* Bleeds over the profile card's set pad (not the rim). */
  margin: calc(-1 * var(--frame-pad-y)) calc(-1 * var(--frame-pad-x)) 0;
  padding: 0.65rem var(--frame-pad-x) 0.7rem;
  /* Darker horizontal plank bed · same family as the site header. */
  background:
    linear-gradient(180deg, rgb(12 8 4 / 28%), rgb(8 5 2 / 42%)),
    var(--wood-plank-dark);
  box-shadow: inset 0 -1px 0 rgb(0 0 0 / 45%);
}
.profile-menu__wallet-col {
  display: grid;
  gap: 0.2rem;
  justify-items: center;
  text-align: center;
}
.profile-menu__wallet-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.profile-menu__wallet-val {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--ink-strong);
  font-variant-numeric: tabular-nums;
}
.profile-menu__wallet-val .icon,
.profile-menu__wallet-val svg {
  width: 1rem;
  height: 1rem;
}
/*
 * Logged-in profile · slate face · avatar only (username lives in the top strip).
 */
.profile-btn:not(.profile-btn--guest).btn,
button.profile-btn:not(.profile-btn--guest).btn {
  --btn-face: #4a4f57;
  --btn-lip: #25282d;
  --btn-shell: color-mix(in srgb, #25282d 72%, #140a04);
  --btn-ink: #fff8f0;
  --btn-ink-shadow: rgba(12, 6, 0, 0.55);
  --btn-pad-x: 0.55rem;
  --profile-top-r: 0;
  position: relative;
  display: inline-grid;
  place-items: center;
  gap: 0;
  width: auto;
  max-width: none;
  min-width: 2.45rem;
  height: auto;
  min-height: 2.35rem;
  margin: 0;
  margin-bottom: 0.375rem;
  padding: 0.28rem var(--btn-pad-x);
  overflow: visible;
  cursor: pointer;
  font: inherit;
  border-radius: 4px;
  justify-content: center;
  color: var(--btn-ink);
}
.profile-btn:not(.profile-btn--guest).btn .btn__face,
button.profile-btn:not(.profile-btn--guest).btn .btn__face {
  gap: 0;
  justify-content: center;
}
/* Real inbox count · music-toggle gold family (not a glossy urgency pill). */
/* Alerts off · hide inbox badges (localStorage chikenAlerts=off · default). */
html[data-alerts="off"] .notify-badge {
  display: none !important;
}
.notify-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.2rem;
  height: 1.2rem;
  padding: 0 0.32rem;
  border: 1px solid #6a4210;
  border-radius: 999px;
  background:
    linear-gradient(180deg, #e0b03a 0%, #c49228 55%, #a87820 100%);
  color: #1a1008;
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
  box-shadow:
    0 1px 0 #3a2410,
    inset 0 1px 0 #ffe08a88,
    inset 0 -1px 0 #6a421066;
}
.notify-badge[hidden] {
  display: none !important;
}
.notify-badge--link {
  margin-left: 0.35rem;
  vertical-align: middle;
}


dialog.modal.modal--notify {
  width: min(72rem, calc(100vw - 1.25rem));
  max-width: min(72rem, calc(100vw - 1.25rem));
}
dialog.modal.modal--notify .notify-modal__body {
  max-height: min(78vh, 48rem);
  overflow: auto;
}
/* Notifications · slate ledger inside the site modal. */
.notify-shell.pixel-frame {
  margin: 0 auto;
  width: min(100%, 72rem);
  overflow: visible;
  /* Set: flush (frame-set registry, pixel-frame.css.ts). */
  background: #120c08;
}
.notify-shell__plaque-wrap {
  position: absolute;
  top: var(--banner-plaque-top);
  left: var(--banner-plaque-left);
  z-index: 4;
  margin: 0;
  padding-top: var(--banner-plaque-pad-top);
  transform: translateX(var(--banner-plaque-x));
}
.notify-shell__plaque.carved-plaque {
  margin: 0;
}
.notify-shell__plaque.carved-plaque h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(0.95rem, 2vw, 1.2rem);
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #f6e6b8;
  text-shadow: 0 2px 0 #2a1208, 1px 0 0 #2a1208, -1px 0 0 #2a1208;
  white-space: nowrap;
}
.notify-banner__copy {
  position: absolute;
  right: var(--space-5);
  bottom: calc(var(--frame-rim) + var(--space-3));
  z-index: 2;
  max-width: 22rem;
  margin: 0;
  text-align: right;
  pointer-events: none;
  text-shadow: 0 1px 2px #000;
}
.notify-banner__copy strong {
  display: block;
  font-family: var(--font-display);
  font-size: var(--text-sm);
  color: var(--scene-ink);
}
.notify-banner__copy span {
  display: block;
  margin-top: var(--space-1);
  color: var(--scene-muted);
  font-size: var(--text-xs);
  line-height: 1.4;
}
.notify-shell__body {
  margin: 0;
  /* Dotted night slate. Flush to the inner rim. */
  padding: var(--space-4) var(--page-panel-body-x) var(--space-5);
  background: var(--slate-window);
  min-height: 12rem;
  color: var(--ink);
}
dialog.modal.modal--notify .modal__panel.pixel-frame {
  background: var(--slate-window);
}
dialog.modal.modal--notify .modal__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 0;
}
dialog.modal.modal--notify .modal__close-x {
  display: block;
  width: 14px;
  height: 14px;
  margin: 0;
}
.notify-overview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-3);
}
.notify-eyebrow {
  margin: 0 0 var(--space-1);
  color: var(--gold);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.notify-intro h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--text-lg);
  color: var(--ink-strong);
}
.notify-intro p,
.notify-section__head p,
.notify-hint,
.notify-footnote {
  margin: var(--space-1) 0 0;
  color: var(--muted);
  font-size: var(--text-xs);
  line-height: 1.4;
}
.notify-live {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin: 0;
  padding: var(--space-2) var(--space-3);
  border: 1px solid color-mix(in srgb, var(--ok) 45%, var(--line-alt));
  background: color-mix(in srgb, var(--panel) 80%, var(--ok));
  color: var(--ink-strong);
  font-size: var(--text-xs);
  white-space: nowrap;
}
.notify-live__dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--ok);
  flex: none;
}
.notify-stats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: 0 0 var(--space-4);
}
.notify-stat {
  display: flex;
  align-items: center;
  flex: 1 1 11rem;
  gap: var(--space-3);
  max-width: 16rem;
  min-height: 3.6rem;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--line-alt);
  background: linear-gradient(135deg, var(--panel-strong), var(--panel));
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 6%);
}
.notify-stat__ico {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  flex: none;
  border: 1px solid color-mix(in srgb, var(--gold) 55%, var(--line-alt));
  background: var(--panel);
  color: var(--gold);
}
.notify-stat__ico .icon {
  width: 1.1rem;
  height: 1.1rem;
}
.notify-stat__copy {
  display: grid;
  min-width: 0;
}
.notify-stat__copy b {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.05;
  color: var(--ink-strong);
}
.notify-stat__copy span {
  margin-top: var(--space-1);
  color: var(--muted);
  font-size: var(--text-xs);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.notify-section {
  display: grid;
  gap: var(--space-2);
}
.notify-section__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-3);
}
.notify-section__head h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--text);
  letter-spacing: 0.03em;
  color: var(--ink-strong);
}
.notify-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  margin-left: var(--space-2);
  padding: 0 var(--space-2);
  border: 1px solid color-mix(in srgb, var(--gold) 55%, var(--line-alt));
  background: color-mix(in srgb, var(--panel) 70%, var(--gold));
  color: var(--gold);
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0;
  vertical-align: middle;
}
.notify-ready-tools {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.notify-ready-tools .notify-hint {
  margin: 0;
}
.notify-dismiss-all {
  appearance: none;
  border: 1px solid color-mix(in srgb, var(--accent) 75%, #1a1008);
  border-radius: var(--radius-sm);
  background: var(--wood-plank);
  color: var(--ink-strong);
  font: inherit;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: var(--space-2) var(--space-3);
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 12%);
}
.notify-dismiss-all:hover {
  color: var(--gold);
}
.notify-dismiss-all:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.notify-ready-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-2);
}
.notify-ready {
  --notify-tone: var(--gold);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--space-2);
  align-content: start;
  min-width: 0;
  padding: var(--space-2);
  border: 1px solid var(--line-alt);
  border-top: 2px solid var(--notify-tone);
  background: linear-gradient(145deg, var(--panel-strong), var(--panel));
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 5%);
}
.notify-ready[data-notify-category="egg"] { --notify-tone: var(--rarity-rare); }
.notify-ready[data-notify-category="lodge"] { --notify-tone: var(--rarity-uncommon); }
.notify-ready[data-notify-category="streak"] { --notify-tone: var(--rarity-event); }
.notify-ready[data-notify-category="daily"] { --notify-tone: var(--rarity-epic); }
.notify-ready__ico,
.notify-event__ico {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border: 1px solid color-mix(in srgb, var(--notify-tone, var(--gold)) 55%, var(--line-alt));
  background: var(--panel);
  color: var(--notify-tone, var(--gold));
}
.notify-ready__ico .icon,
.notify-event__ico .icon {
  width: 1.15rem;
  height: 1.15rem;
}
.notify-ready__main,
.notify-event__copy {
  min-width: 0;
}
.notify-ready__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1) var(--space-2);
  color: var(--muted);
  font-size: var(--text-xs);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.notify-ready__pill {
  padding: 0.05rem var(--space-1);
  border: 1px solid color-mix(in srgb, var(--notify-tone) 55%, transparent);
  background: color-mix(in srgb, var(--notify-tone) 12%, var(--panel));
  color: var(--notify-tone);
  font-weight: 700;
}
.notify-ready__title,
.notify-event__title {
  display: block;
  margin: var(--space-1) 0 0;
  overflow: hidden;
  color: var(--ink-strong);
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 700;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}
a.notify-ready__title,
a.notify-ready__open,
a.notify-event {
  text-decoration: none;
}
.notify-ready__actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-2);
}
.notify-ready__open {
  color: var(--gold);
  font-size: var(--text-xs);
  font-weight: 700;
}
.notify-ready__open:hover,
.notify-dismiss:hover {
  text-decoration: underline;
}
.notify-dismiss {
  appearance: none;
  margin-left: auto;
  border: 0;
  padding: var(--space-1);
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: var(--text-xs);
  cursor: pointer;
}
.notify-dismiss:hover {
  color: var(--danger);
}
.notify-divider {
  height: 1px;
  margin: var(--space-4) 0;
  background: linear-gradient(90deg, transparent, var(--line-alt) 12%, var(--line-alt) 88%, transparent);
}
.notify-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  flex-wrap: wrap;
}
.notify-filterbar { display: none; }
.notify-filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
}
.notify-filter-pick {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
  flex: 1 1 auto;
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.notify-filter-pick select {
  flex: 1 1 auto;
  min-width: 0;
  height: 2rem;
  border: 1px solid var(--line-alt);
  border-radius: var(--radius-sm);
  background: var(--panel-strong);
  color: var(--ink-strong);
  font: inherit;
  font-size: var(--text-xs);
  letter-spacing: 0;
  text-transform: none;
  padding: 0 var(--space-2);
}
.notify-filter {
  appearance: none;
  border: 1px solid var(--line-alt);
  border-radius: var(--radius-sm);
  background: var(--panel);
  color: var(--muted);
  font: inherit;
  font-size: var(--text-xs);
  letter-spacing: 0.03em;
  padding: var(--space-1) var(--space-2);
  cursor: pointer;
}
.notify-filter:hover,
.notify-filter.is-active {
  border-color: var(--rarity-legendary);
  color: var(--ink-strong);
}
.notify-filter.is-active {
  background: var(--wood-plank);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 10%);
}
.notify-search {
  position: relative;
  flex: 1 1 12rem;
  max-width: 18rem;
  min-width: 0;
}
.notify-search::before {
  content: "⌕";
  position: absolute;
  left: var(--space-2);
  top: 0.15rem;
  color: var(--gold);
  font-size: var(--text);
  line-height: 1;
  pointer-events: none;
}
.notify-search input {
  width: 100%;
  height: 2rem;
  border: 1px solid var(--line-alt);
  border-radius: var(--radius-sm);
  background: var(--panel-strong);
  color: var(--ink-strong);
  font: inherit;
  font-size: var(--text-xs);
  padding: var(--space-1) var(--space-2) var(--space-1) var(--space-6);
}
.notify-search input:focus {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
  border-color: var(--gold);
}
.notify-timeline {
  border: 1px solid var(--line-alt);
  background: var(--panel);
  box-shadow: inset 0 2px 10px rgb(5 10 20 / 35%);
}
.notify-day + .notify-day {
  border-top: 1px solid var(--line-alt);
}
.notify-day__head {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  background: color-mix(in srgb, var(--panel-strong) 88%, var(--bg));
  border-bottom: 1px solid var(--line-alt);
}
.notify-day__head strong {
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
}
.notify-day__head span {
  color: var(--muted);
  font-size: var(--text-xs);
}
.notify-day__head i {
  height: 1px;
  flex: 1;
  background: linear-gradient(90deg, var(--line-alt), transparent);
}
.notify-event[hidden],
.notify-day[hidden] {
  display: none !important;
}
.notify-event {
  --notify-tone: var(--gold);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: var(--space-2);
  align-items: center;
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid color-mix(in srgb, var(--line-alt) 80%, transparent);
  color: inherit;
  min-width: 0;
}
.notify-day .notify-event:last-child {
  border-bottom: 0;
}
.notify-event:hover {
  color: var(--ink-strong);
  background: color-mix(in srgb, var(--panel-strong) 75%, transparent);
}
.notify-event[data-notify-category="egg"] { --notify-tone: var(--rarity-rare); }
.notify-event[data-notify-category="shop"] { --notify-tone: var(--rarity-legendary); }
.notify-event[data-notify-category="lodge"] { --notify-tone: var(--rarity-uncommon); }
.notify-event[data-notify-category="streak"] { --notify-tone: var(--rarity-event); }
.notify-event[data-notify-category="daily"] { --notify-tone: var(--rarity-epic); }
.notify-event__detail {
  display: block;
  margin-top: 0.1rem;
  color: var(--muted);
  font-size: var(--text-xs);
  line-height: 1.3;
}
.notify-event__kind {
  margin-right: var(--space-2);
  color: var(--gold);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.notify-event__right {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  white-space: nowrap;
}
.notify-event__amount {
  color: var(--gold);
  font-size: var(--text-xs);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.notify-event__amount--pos { color: var(--ok); }
.notify-event__amount--neg { color: var(--danger); }
.notify-event__time {
  min-width: 4.5rem;
  color: var(--muted);
  font-size: var(--text-xs);
  text-align: right;
}
.notify-empty {
  margin: 0;
  padding: var(--space-4);
  color: var(--muted);
  font-size: var(--text-xs);
  text-align: center;
}
.notify-ready-grid > .notify-empty {
  grid-column: 1 / -1;
  border: 1px dashed var(--line-alt);
  background: var(--panel);
}
.notify-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  padding: var(--space-2);
  border-top: 1px solid var(--line-alt);
  color: var(--muted);
  font-size: var(--text-xs);
}
.notify-pager__link {
  border: 1px solid var(--line-alt);
  border-radius: var(--radius-sm);
  background: var(--panel-strong);
  color: var(--ink-strong);
  font-weight: 700;
  padding: var(--space-1) var(--space-2);
  text-decoration: none;
}
.notify-pager__link:hover {
  border-color: var(--gold);
  color: var(--gold);
}
.notify-pager__n {
  color: var(--muted);
}
.notify-footnote b {
  color: var(--gold);
}
.notify-ready__open:focus-visible,
.notify-ready__title:focus-visible,
.notify-event:focus-visible,
.notify-filter:focus-visible,
.notify-dismiss:focus-visible,
.notify-dismiss-all:focus-visible,
.notify-pager__link:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
@media (max-width: 56rem) {
  .notify-ready-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .notify-banner__copy span {
    display: none;
  }
}
@media (max-width: 45rem) {
  .notify-shell__plaque-wrap {
    --banner-plaque-x: 18px;
    transform: translateX(var(--banner-plaque-x));
  }
  .notify-banner__copy {
    display: none;
  }
  .notify-shell__body {
    padding-inline: max(var(--space-3), calc(var(--vine-gutter, 52px) * 0.35));
  }
  .notify-overview,
  .notify-section__head,
  .notify-ready-tools {
    align-items: flex-start;
    flex-direction: column;
  }
  .notify-toolbar {
    align-items: stretch;
    flex-direction: column;
    justify-content: flex-start;
    gap: 0.45rem;
  }
  .notify-filters { display: none; }
  .notify-filterbar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
  }
  .notify-live {
    white-space: normal;
  }
  .notify-stat {
    max-width: none;
    min-width: 0;
    flex: 1 1 6.5rem;
    gap: var(--space-2);
    padding: var(--space-2);
  }
  .notify-ready-grid {
    grid-template-columns: 1fr;
  }
  .notify-search {
    max-width: none;
    width: 100%;
  }
  .notify-event {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .notify-event__right {
    grid-column: 2;
    justify-content: space-between;
  }
  .notify-event__time {
    text-align: left;
  }
}

/*
 * Shared plaque shell class names (onboard first · notify/shop can adopt later).
 * Head = slate blue title band · body = horizontal wood plank bed.
 */
.sign-shell.pixel-frame {
  position: relative;
  overflow: visible;
  display: flex;
  flex-direction: column;
  /* Set: flush (frame-set registry, pixel-frame.css.ts). */
  background: #120c08;
}
.sign-shell__head {
  position: relative;
  z-index: 4;
  flex: 0 0 auto;
  min-height: 4.75rem;
  padding: 1.35rem 1rem 0.85rem;
  background: var(--page-panel-slate);
  border-bottom: 2px solid #2a3a52;
}
.sign-shell__body {
  flex: 1 1 auto;
  min-width: 0;
  background: var(--slate-window);
}



/* Village onboarding · full page wrapper · two-column setup. */
.onboard.pixel-frame {
  margin: 0 auto;
  width: 100%;
  max-width: none;
}
.onboard .sign-shell__head {
  min-height: 0;
  padding: 0;
  background: none;
  border-bottom: 0;
}
.onboard__banner.page-banner {
  --page-banner-min-h: 8.5rem;
  --page-banner-max-h: 12rem;
  --page-banner-ratio: 16 / 4.4;
  background-color: #101822;
  background-image: url("/assets/coop/hero-night.webp");
  background-position: center 42%;
  background-size: cover;
}
.onboard__banner-copy {
  position: absolute;
  left: 0;
  right: 0;
  bottom: var(--frame-rim, 14px);
  z-index: 2;
  padding: 2.2rem 1.2rem 0.75rem;
  background: linear-gradient(180deg, transparent, rgb(6 8 14 / 82%));
}
.onboard__banner-split {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  margin: 0;
  pointer-events: none;
}
.onboard__banner-copy h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 2.8vw, 2rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #fff6dc;
  text-shadow: 0 2px 0 rgb(0 0 0 / 80%);
}
.onboard__body {
  display: grid;
  gap: 1.1rem;
  padding: 1.25rem max(1.5rem, calc(var(--vine-gutter, 52px) * 0.72)) 1.35rem;
  min-width: 0;
}
.onboard__lead {
  margin: 0;
  color: #f6e6c0;
  line-height: 1.45;
  text-shadow: 0 1px 0 #1a1008;
}
.onboard__form {
  display: grid;
  gap: 1rem;
}
.onboard__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 1rem;
  align-items: start;
}
.onboard__col {
  display: grid;
  gap: 1rem;
  min-width: 0;
}
.onboard__card {
  margin: 0;
  padding: 0.85rem 0.95rem 1rem;
  border: 1px solid #6a5220;
  border-top: 2px solid #e0bd65;
  background:
    radial-gradient(ellipse at 50% 0%, rgb(82 139 171 / 18%), transparent 58%),
    linear-gradient(180deg, #1b3050, #0c1628);
  min-width: 0;
  box-shadow:
    inset 0 1px 0 rgb(218 241 250 / 14%),
    inset 0 8px 16px rgb(0 0 0 / 42%),
    0 10px 22px rgb(0 0 0 / 40%);
}
.onboard__card legend {
  padding: 0 0.35rem;
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff6dc;
}
.onboard__field {
  display: grid;
  gap: 0.3rem;
  margin-top: 0.55rem;
  font-weight: 700;
  color: #e8dcc4;
}
.onboard__name-input,
.onboard__field input[type="text"].onboard__name-input {
  width: 100%;
  min-width: 0;
  padding: 0.55rem 0.7rem;
  border: 2px solid #5a3c24;
  border-radius: 0;
  background:
    linear-gradient(180deg, rgb(36 24 14 / 55%), rgb(16 10 6 / 72%)),
    var(--wood-plank);
  color: #f6e6b8;
  font-family: var(--font-pixel-body), "Pixeloid Sans", "Courier New", monospace;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  image-rendering: pixelated;
  box-shadow: inset 0 0 0 1px #2a170c, inset 0 2px 0 #ffffff14, 0 1px 0 #1a1008;
}
.onboard__name-input::placeholder {
  color: #9a8060;
}
.onboard__name-input:focus {
  outline: none;
  border-color: #c49228;
  box-shadow: inset 0 0 0 1px #2a170c, 0 0 0 2px #c4922844;
}
.onboard__alert-kinds {
  list-style: none;
  margin: 0.65rem 0 0.45rem;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
}
.onboard__alert-kind {
  display: grid;
  gap: 0.2rem;
  justify-items: center;
  text-align: center;
  padding: 0.55rem 0.35rem;
  border: 1px solid #29435c;
  background: rgb(6 10 20 / 72%);
  box-shadow: inset 0 3px 8px rgb(0 0 0 / 45%);
  min-width: 0;
}
.onboard__alert-kind-ico {
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  color: #c49228;
}
.onboard__alert-kind-ico .icon {
  width: 1.25rem;
  height: 1.25rem;
}
.onboard__alert-kind strong {
  font-size: 0.78rem;
  color: #f0e2c4;
  line-height: 1.2;
}
.onboard__alert-kind small {
  font-size: 0.68rem;
  color: #9ab0c8;
  line-height: 1.25;
}
.onboard__alert-foot {
  margin: 0 0 0.55rem;
}
.onboard__choices {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.35rem;
}
.onboard__choices--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.onboard__choices--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.onboard__choice {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.45rem;
  align-items: start;
  margin: 0;
  padding: 0.55rem 0.55rem;
  border: 1px solid #29435c;
  background: rgb(6 10 20 / 78%);
  box-shadow: inset 0 3px 8px rgb(0 0 0 / 50%);
  cursor: pointer;
  min-width: 0;
}
.onboard__choice:has(input:checked) {
  border-color: #e0bd65;
  background: linear-gradient(180deg, #3a2a14, #1a120c);
  box-shadow: inset 0 1px 0 rgb(224 189 101 / 45%), 0 0 0 1px rgb(214 180 94 / 45%);
}
.onboard__choice input {
  margin-top: 0.2rem;
}
.onboard__choice-face {
  display: grid;
  gap: 0.12rem;
  min-width: 0;
}
.onboard__choice-face strong {
  color: #f0e2c4;
}
.onboard__choice-face small {
  color: #9ab0c8;
  line-height: 1.3;
}
.onboard__fps {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0.55rem 0 0.75rem;
  padding: 0.45rem 0.65rem;
  border: 1px solid #29435c;
  background: #070d18;
  box-shadow: inset 0 3px 8px rgb(0 0 0 / 55%);
}
.onboard__fps-label {
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #9ab0c8;
}
.onboard__fps-val {
  font-family: var(--font-pixel), "Press Start 2P", monospace;
  font-size: 0.85rem;
  color: #8fb9a4;
  font-variant-numeric: tabular-nums;
}
.onboard__quality-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.4rem;
  align-items: stretch;
}
.onboard__auto-btn {
  width: 100%;
  min-width: 0;
  margin: 0;
  padding-inline: 0.35rem;
  justify-content: center;
}
.onboard__q {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0.4rem 0.35rem;
  border: 1px solid #29435c;
  background: rgb(6 10 20 / 78%);
  box-shadow: inset 0 3px 8px rgb(0 0 0 / 45%);
  color: #f0e2c4;
  cursor: pointer;
  font-weight: 700;
}
.onboard__q:has(input:checked) {
  border-color: #e0bd65;
  background: linear-gradient(180deg, #3a2a14, #1a120c);
  box-shadow: inset 0 1px 0 rgb(224 189 101 / 45%), 0 0 0 1px rgb(214 180 94 / 45%);
  color: #fff3d0;
}
.onboard__q input {
  margin: 0;
}
.onboard__quality-note {
  margin: 0.65rem 0 0;
}
.onboard__actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
}
.onboard__tour-choice {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}
.onboard__actions .btn--go {
  align-self: flex-end;
}
/* Gate · no center nav rail · brand left, tools right (same single row). */
.site-header__inner--no-rail {
  grid-template-columns: auto minmax(0, 1fr);
}
@media (max-width: 52rem) {
  .onboard__grid {
    grid-template-columns: 1fr;
  }
  .onboard__choices--2,
  .onboard__choices--3,
  .onboard__alert-kinds,
  .onboard__tour-choice {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 36rem) {
  .onboard__body {
    padding-inline: max(0.85rem, calc(var(--vine-gutter, 52px) * 0.4));
  }
  .onboard__quality-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}




/* Auto quality modal */
dialog.modal.modal--onboard-quality .onboard-quality-panel {
  width: min(100%, 28rem);
  padding: 1.1rem 1.15rem 1.2rem;
  background: var(--page-panel-slate);
  color: #e8dcc4;
}
.onboard-quality__title {
  margin: 0 2rem 0.75rem 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: #fff3d0;
}
.onboard-quality__body {
  display: grid;
  gap: 0.75rem;
}
.onboard-quality__status {
  margin: 0;
  font-weight: 700;
  color: #f0e2c4;
}
.onboard-quality__live {
  font-family: var(--font-pixel), "Press Start 2P", monospace;
  font-size: 0.8rem;
  color: #8fb9a4;
}
.onboard-quality__report {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}
.onboard-quality__report th,
.onboard-quality__report td {
  padding: 0.35rem 0.45rem;
  border: 1px solid #2a3a52;
  text-align: left;
}
.onboard-quality__report th {
  background: #0a1220;
  color: #c8b898;
}
.onboard-quality__picks {
  display: grid;
  gap: 0.45rem;
}
.onboard-quality__pick {
  display: grid;
  gap: 0.15rem;
  text-align: left;
  margin: 0;
  width: 100%;
}
.onboard-quality__pick small {
  color: #9ab0c8;
}
.onboard-quality__pick.is-recommend {
  box-shadow: inset 0 0 0 2px #8fb9a466;
}
.profile-btn:not(.profile-btn--guest).btn:hover,
.profile-btn:not(.profile-btn--guest).btn:focus-visible,
.profile-drop.open .profile-btn:not(.profile-btn--guest).btn {
  --btn-face: #5d636c;
  --btn-lip: #25282d;
  --btn-ink: #fff8f0;
  outline: none;
}
.profile-btn__cluster {
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 1.95rem;
  height: 1.95rem;
}
.profile-btn__avatar {
  width: 1.95rem;
  height: 1.95rem;
  border-radius: 999px;
  object-fit: cover;
  flex: 0 0 auto;
  background: var(--bg-elevated);
  box-shadow: none;
  transform: none;
}
.profile-btn__fallback {
  display: inline-grid;
  place-items: center;
  width: 1.95rem;
  height: 1.95rem;
  flex: 0 0 auto;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  box-shadow: none;
}
.profile-btn__fallback .icon {
  width: 1.35rem;
  height: 1.35rem;
}
.profile-btn--guest.btn {
  --btn-face: #4a4f57;
  --btn-lip: #25282d;
  --btn-shell: color-mix(in srgb, #25282d 72%, #140a04);
  --btn-ink: #fff8f0;
  justify-content: center;
  color: var(--btn-ink);
}
.profile-btn--guest.btn:hover,
.profile-btn--guest.btn:focus-visible,
.profile-drop.open .profile-btn--guest.btn {
  --btn-face: #5d636c;
  --btn-lip: #25282d;
}
.profile-btn__gear {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  color: inherit;
}
.profile-btn__gear .icon {
  width: 1.05rem;
  height: 1.05rem;
  color: inherit;
}
@media (max-width: 1000px) {
  /* Compact plate · avatar only · keep iron straps (match header toggles). */
  .profile-btn:not(.profile-btn--guest).btn,
  button.profile-btn:not(.profile-btn--guest).btn {
    display: inline-grid;
    place-items: center;
    --btn-pad-x: 0.55rem;
    width: auto;
    height: auto;
    min-height: 2.35rem;
    min-width: 2.45rem;
    max-width: none;
    margin-bottom: 0.375rem;
    padding: 0.28rem var(--btn-pad-x);
    gap: 0;
    justify-content: center;
  }
}
.profile-menu {
  /* Equal air under header and above footer so the wood rim is not cropped. */
  --settings-inset: 0.85rem;
  display: none;
  position: fixed;
  left: 50%;
  top: calc(var(--header-offset) + var(--settings-inset));
  right: auto;
  bottom: auto;
  transform: translateX(-50%);
  width: min(62rem, calc(100vw - 1.5rem));
  height: calc(
    100dvh - var(--header-offset) - var(--footer-offset, 0px) - (2 * var(--settings-inset))
  );
  max-height: calc(
    100dvh - var(--header-offset) - var(--footer-offset, 0px) - (2 * var(--settings-inset))
  );
  overflow: hidden;
  padding-top: 0;
  min-width: 0;
  z-index: calc(var(--z-menu) + 4);
  pointer-events: auto;
  box-sizing: border-box;
}
.profile-menu:focus {
  outline: none;
}
.profile-drop.open {
  z-index: calc(var(--z-modal, 400) + 4);
}
.profile-drop.open .profile-menu {
  display: block;
  z-index: calc(var(--z-modal, 400) + 5);
}
.profile-menu__card {
  display: grid;
  height: 100%;
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: var(--wood-plank);
  color: #e8dcc4;
  /* Set: card · extra L/R inset clears the vines. */
  --frame-pad-y: var(--space-2);
  --frame-pad-x: calc(var(--space-2) + var(--frame-rim));
  /* Card set maths written out: this card is not always a .pixel-frame host. */
  padding: calc(var(--frame-rim) + var(--frame-pad-y)) calc(var(--frame-rim) + var(--frame-pad-x));
  box-shadow: 0 10px 24px rgb(0 0 0 / 35%);
  overflow: hidden;
}
.profile-menu__card.pixel-frame {
  border-radius: 0;
}
.profile-menu__card a,
.profile-menu__card button {
  color: #f0e4c8;
}
.profile-menu__card a:hover,
.profile-menu__card button:hover,
.profile-menu__card a:focus-visible,
.profile-menu__card button:focus-visible {
  background: color-mix(in srgb, #2a170c 55%, transparent);
  color: #fff6e4;
}
.profile-menu__card .profile-menu__wallet-label {
  color: color-mix(in srgb, #e8dcc4 70%, transparent);
}
.profile-menu__card .profile-menu__wallet-val {
  color: #fff6e4;
}
.profile-menu a,
.profile-menu button {
  display: block;
  width: 100%;
  padding: var(--space-2) var(--space-3);
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ink);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.profile-menu__settings-block {
  padding: 0.15rem 0 0.35rem;
  margin: 0 0 0.25rem;
  border-bottom: 1px solid color-mix(in srgb, var(--line-soft) 80%, transparent);
}
.profile-menu__settings-block--tz {
  padding-top: 0.35rem;
}
.profile-menu__settings-block .profile-fps[hidden] {
  display: none !important;
}
.profile-menu__card .profile-fps {
  display: block;
  width: calc(100% - var(--space-6));
  margin: 0.2rem var(--space-3) 0.35rem;
  padding: 0.35rem 0.5rem;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: #f0e4c8;
  text-align: left;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.profile-menu__card .profile-tz {
  padding: 0 var(--space-3) 0.35rem;
  gap: 0.45rem;
}
.profile-menu__card .profile-tz .coop-settings__label,
.profile-menu__card .profile-tz .coop-settings__hint,
.profile-menu__card .profile-tz .coop-settings__clock-label {
  color: color-mix(in srgb, #e8dcc4 78%, transparent);
}
.profile-menu__card .profile-tz select {
  width: 100%;
  max-width: none;
  min-width: 0;
  min-height: 2.1rem;
  padding: 0.35rem 0.5rem;
  font-size: 0.88rem;
}
.profile-quality {
  display: grid;
  gap: 0.2rem;
  padding: 0.35rem var(--space-3) 0.45rem;
  color: #f0e4c8;
}
.profile-quality__title {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: color-mix(in srgb, #e8dcc4 72%, transparent);
}
.profile-quality__opt {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  padding: 0.28rem 0.35rem;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 700;
  color: #f0e4c8;
  cursor: pointer;
}
.profile-quality__opt:hover {
  background: color-mix(in srgb, #2a170c 55%, transparent);
  color: #fff6e4;
}
.profile-quality__opt input {
  appearance: auto;
  width: 0.95rem;
  height: 0.95rem;
  margin: 0;
  accent-color: #cdb47c;
  cursor: pointer;
}
.profile-menu__card .profile-quality__opt {
  color: #f0e4c8;
}
.profile-menu a:hover,
.profile-menu button:hover,
.profile-menu a:focus-visible,
.profile-menu button:focus-visible {
  background: var(--notice-bg);
  color: var(--ink-strong);
}
.profile-menu__rule {
  border-top: var(--border-width) solid var(--line);
  margin: var(--space-1) var(--space-2);
}
/* Ornate gold beam between purse band and menu links. */
.profile-menu__rule--ornate {
  position: relative;
  height: 1px;
  margin: 0.55rem calc(var(--space-2) + 2px) 0.65rem;
  border: 0;
  background: linear-gradient(
    90deg,
    transparent,
    #5a4020 12%,
    #cdb47c 50%,
    #5a4020 88%,
    transparent
  );
}
.profile-menu__rule--ornate::after {
  content: "✦";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -55%);
  padding: 0 0.45rem;
  color: #e9c77c;
  background: var(--wood-plank);
  font-size: 0.78rem;
  line-height: 1;
  text-shadow: 0 1px 0 #1a1008;
}
.profile-menu__card .profile-menu__rule:not(.profile-menu__rule--ornate) {
  border-top-color: color-mix(in srgb, #cdb47c 35%, #2a170c);
}
.profile-menu__logout,
.profile-menu__card .profile-menu__logout,
.profile-menu__logout:hover,
.profile-menu__card .profile-menu__logout:hover,
.profile-menu__logout:focus-visible,
.profile-menu__card .profile-menu__logout:focus-visible {
  color: #e05048;
}
.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  gap: 0.45rem 0.65rem;
  margin: 0;
  width: 100%;
}
.admin-tabs__link.btn,
.admin-tabs a.btn {
  /* Metrics match universal .btn · only face colors stay per-tab. */
  --btn-ink: #fff8f0;
  color: var(--btn-ink);
}
.admin-tabs__icon {
  display: block;
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}
.admin-tabs__label {
  display: inline-flex;
  align-items: baseline;
  gap: 0.4rem;
}
.admin-tabs__count {
  display: inline;
  font-size: 0.82em;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  opacity: 0.82;
  /* Same line as label · not a superscript badge. */
  vertical-align: baseline;
}
/* Active chrome · universal .btn[aria-current] (taller lip + copper straps). */
.admin-tabs a.btn[aria-current="page"] .admin-tabs__count {
  opacity: 0.9;
}
/* Rainbow faces, 36 degrees apart, so neighbouring sections stay easy to tell apart. */
.admin-tabs__link--members.btn { --btn-face: hsl(0 62% 48%); --btn-lip: hsl(0 55% 26%); }
.admin-tabs__link--studio.btn { --btn-face: hsl(36 70% 46%); --btn-lip: hsl(36 60% 24%); }
.admin-tabs__link--inventory.btn { --btn-face: hsl(72 62% 40%); --btn-lip: hsl(72 55% 22%); }
.admin-tabs__link--ledger.btn { --btn-face: hsl(108 52% 38%); --btn-lip: hsl(108 48% 20%); }
.admin-tabs__link--logs.btn { --btn-face: hsl(144 52% 36%); --btn-lip: hsl(144 48% 20%); }
.admin-tabs__link--backups.btn { --btn-face: hsl(180 55% 38%); --btn-lip: hsl(180 50% 20%); }
.admin-tabs__link--events.btn { --btn-face: hsl(216 58% 48%); --btn-lip: hsl(216 52% 26%); }
.admin-tabs__link--tools.btn { --btn-face: hsl(252 52% 52%); --btn-lip: hsl(252 46% 28%); }
.admin-tabs__link--qa.btn { --btn-face: hsl(288 50% 48%); --btn-lip: hsl(288 46% 26%); }
.admin-tabs__link--modals.btn { --btn-face: hsl(324 58% 48%); --btn-lip: hsl(324 52% 26%); }
.admin-tabs__link.btn {
  --btn-ink: #fff8f0;
  --btn-shell: color-mix(in srgb, var(--btn-lip) 72%, #140a04);
  color: var(--btn-ink);
}



/* Admin · wood rim + scene banner + slate body (synced with shop/arcade). */
.admin-shell.vine-page.pixel-frame {
  width: 100%;
  max-width: none;
  margin: 0;
  color: #d4c9ba;
  overflow: visible;
  /* Set: flush (frame-set registry, pixel-frame.css.ts). */
  background: #120c08;
}
body:has(.admin-shell.pixel-frame) .site-layout {
  width: min(96vw, 120rem, calc(100% - var(--space-4)));
}
.admin-shell__head {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0.85rem 1rem 0.35rem;
}
.admin-shell__head .admin-title-row { position: relative; z-index: 2; }
.admin-shell__head h1 { margin: 0; }
.admin-shell__banner.page-banner {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  aspect-ratio: auto;
  height: auto;
  max-height: none;
  min-height: 9.5rem;
  background-color: #121c30;
}
.admin-shell__chrome {
  position: relative;
  z-index: 8;
  margin-top: 3.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0;
  /* Banner-plaque set: tabs never run under the hanging "Admin" sign. */
  padding: 0.4rem var(--vine-gutter, 64px) 0.5rem max(var(--vine-gutter, 64px), var(--banner-plaque-clear));
  box-sizing: border-box;
  text-align: center;
}
.admin-tabs-pick { display: none; }
/* Phones: one section menu under the plain title. The tab row stays for wider screens. */
@media (max-width: 45rem) {
  .admin-shell__banner.page-banner {
    aspect-ratio: auto;
    height: auto;
    max-height: none;
  }
  .admin-shell__chrome {
    position: relative;
    bottom: auto;
    padding: 0.45rem var(--frame-pad) calc(var(--frame-rim) + 0.45rem);
  }
  .admin-shell__chrome .admin-tabs { display: none; }
  .admin-tabs-pick {
    display: block;
    width: min(100%, 18rem);
    margin: 0 auto;
  }
  .admin-tabs-pick__select {
    width: 100%;
    min-height: 2.3rem;
    padding: 0.35rem 0.6rem;
    border: 1px solid #4d3a26;
    background: #241810;
    color: #f0e2c4;
    font: inherit;
    font-size: 0.85rem;
    font-weight: 700;
  }
}
.admin-shell__chrome .admin-tabs {
  width: auto;
  max-width: 100%;
  margin-inline: auto;
  justify-content: center;
}
.admin-shell__plaque.carved-plaque {
  margin: 0;
  max-width: min(100%, var(--banner-plaque-w));
}
.admin-shell__body {
  min-width: 0;
  min-height: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  /* SYNC · shop / arcade / admin body X · token --page-panel-body-x in theme.ts */
  padding: 0.7rem var(--page-panel-body-x) 0.55rem;
  overflow: visible;
  background: var(--page-panel-slate);
}
/* Outer frame · same even wood rim as .wood-rim-thin / pixel-frame v3 beams. */
.admin-table-frame {
  border: 0;
  border-image: none;
  border-radius: 0;
  padding: 0.45rem;
  background: #120e0a;
  box-shadow:
    inset 0 0 0 2px #cdb47c,
    inset 0 0 0 5px #4a2e1a,
    inset 0 0 0 7px #241409,
    0 8px 18px rgb(0 0 0 / 32%);
  overflow: visible;
}
/* Members: keep wide tables inside the shell with an inner X scroll. */
.admin-table-frame--members {
  overflow-x: auto;
  overflow-y: visible;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}
.admin-table-frame--members .admin-table--members {
  width: max-content;
  min-width: 100%;
}
/* Studio columns stay inside the oak frame and scroll there. */
.admin-shell .oak-frame--studio,
.admin-shell .oak-frame--studio .oak-frame__panel {
  max-width: 100%;
  min-width: 0;
}
.admin-table-frame--studio {
  overflow: auto;
  max-width: 100%;
  max-height: calc(100dvh - 18rem);
}
.admin-inv__frame {
  display: grid;
  gap: var(--space-3);
}
.admin-shell.pixel-frame .admin-table {
  background: #120e0a;
  border: 0;
  box-shadow: none;
  width: 100%;
}
.admin-shell.pixel-frame .studio-table {
  width: 100%;
  min-width: max-content;
}
.admin-shell.pixel-frame .admin-table th,
.admin-shell.pixel-frame .admin-table td {
  border-bottom-color: #2a1c12;
  color: #e8dcc4;
}
.admin-shell.pixel-frame .admin-table thead th {
  background: #2a1c12;
  color: #f6e6c0;
  font-weight: 800;
  letter-spacing: 0.04em;
  border-bottom: 2px solid #5a3c24;
}
.admin-shell.pixel-frame .admin-table tbody tr:nth-child(odd) td {
  background: #14100c;
}
.admin-shell.pixel-frame .admin-table tbody tr:nth-child(even) td {
  background: #1c1510;
}
.admin-shell.pixel-frame .admin-table tbody tr:hover td {
  background: #241a12;
}
.admin-shell .date-stamp {
  font-size: 0.72rem;
  padding: 0.18rem 0.45rem 0.18rem 0.4rem;
}
.admin-shell.pixel-frame .studio-table thead th {
  background: #2a1c12;
  color: #f6e6c0;
}
.admin-shell.pixel-frame .admin-ledger__filter select {
  border-color: #5a3c24;
  background: color-mix(in srgb, #1a1008 82%, #2a1c12);
  color: #f0e2c4;
  box-shadow: inset 0 0 0 1px #2a170c;
}
.admin-shell.pixel-frame .meta {
  color: color-mix(in srgb, #d4c9ba 85%, #8a7a62);
}
.admin-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.55rem 1rem;
  margin: 0 0 0.55rem;
  width: 100%;
}
.admin-pager--bottom {
  margin: 0.55rem 0 0;
}
.admin-pager__form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.55rem 0.85rem;
  margin: 0;
}
.admin-pager__nav {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.admin-pager__btn {
  --control-y: 0.18rem;
  --control-x: 0.72rem;
  --btn-pad-x: var(--control-x);
  --btn-depth-idle: 5px;
  min-height: 2rem;
  /* Extra X so ← → clear iron nails (no faceplate chevron). */
  min-width: 2.55rem;
  padding: var(--control-y) var(--btn-pad-x);
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1;
}
.admin-pager__btn--disabled {
  opacity: 0.42;
  pointer-events: none;
  cursor: default;
}
.admin-pager__jump {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.82rem;
  color: #cbbba6;
}
.admin-pager__jump-label { display: none; }
.admin-pager__page {
  width: 3.4rem;
  min-height: 2rem;
  padding: 0.15rem 0.35rem;
  border: 1px solid #5a3c24;
  border-radius: 2px;
  background: #1a1008;
  color: #f0e2c4;
  font: inherit;
  text-align: center;
}
.admin-pager__of {
  font-size: 0.85rem;
  color: #b8a88a;
  white-space: nowrap;
}
.admin-pager__size {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  color: #cbbba6;
}
.admin-pager__size select {
  min-height: 2rem;
  padding: 0.15rem 0.4rem;
  border: 1px solid #5a3c24;
  border-radius: 2px;
  background: #1a1008;
  color: #f0e2c4;
  font: inherit;
}
.admin-pager__meta {
  margin: 0;
  font-size: 0.78rem;
}
.admin-ledger__filter,
.admin-ledger__rebuild {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}
.admin-ledger__filter label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: var(--text-sm);
}
.admin-ledger__filter select {
  min-height: 2rem;
  min-width: 12rem;
  padding: 0.2rem 0.45rem;
  border: var(--border-width) solid var(--line-alt, var(--line));
  border-radius: var(--radius-sm);
  background: var(--panel-strong);
  color: var(--ink-strong);
  font: inherit;
}
.admin-ledger__asset {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 700;
}
.admin-ledger__asset .icon {
  width: 1.15rem;
  height: 1.15rem;
  flex: none;
}
.admin-logs__note {
  flex: 1 1 22rem;
  margin: 0;
}
.admin-logs__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.admin-log-viewer {
  margin-top: 1rem;
  padding: 0.75rem 0.85rem 0.9rem;
  border: 1px solid rgb(255 222 165 / 22%);
  border-radius: 6px;
  background: color-mix(in srgb, #0c1628 72%, var(--panel-navy, #16243f));
}
.admin-log-viewer__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.45rem 1rem;
  margin-bottom: 0.45rem;
}
.admin-log-viewer__title {
  margin: 0;
  font-size: 1rem;
  color: var(--label-gold, #e3c377);
}
.admin-log-viewer__meta {
  margin: 0;
}
.admin-log-viewer__tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.5rem;
}
.admin-log-viewer__pre {
  margin: 0;
  max-height: min(28rem, 55vh);
  overflow: auto;
  padding: 0.65rem 0.75rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
  line-height: 1.35;
  white-space: pre-wrap;
  word-break: break-word;
  color: #efe6cf;
  background: #0a101c;
  border: 1px solid rgb(255 222 165 / 14%);
  border-radius: 4px;
}
.admin-ledger__filter,
.admin-ledger__rebuild {
  margin-bottom: 0;
}
.admin-ledger__rebuild .meta {
  margin: 0;
  flex: 1 1 12rem;
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}
.admin-table th,
.admin-table td {
  text-align: left;
  padding: var(--space-2);
  border-bottom: var(--border-width) solid var(--line-soft);
  vertical-align: middle;
}
.admin-table--members .admin-table__col-name {
  /* ~33% narrower nameplate column than prior 16/18rem. */
  min-width: 10.5rem;
  width: 11.5rem;
  max-width: 12.5rem;
}
.admin-member__identity {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}
.admin-member__lvl {
  flex: 0 0 auto;
  min-width: 1.55rem;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  font-size: 0.95rem;
  color: #f0e2c4;
  text-align: center;
}
.admin-member__nameplate {
  min-width: 0;
  flex: 1 1 auto;
  max-width: 12rem;
}
.admin-member__name {
  font-weight: 700;
  color: #f6e6c0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.admin-member__handle {
  margin-top: 0.15rem;
  font-size: 0.78rem;
  color: #b8a88a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.admin-table__col-role {
  white-space: nowrap;
  vertical-align: middle;
}
.admin-member__role {
  display: inline-block;
  padding: 0.12rem 0.45rem;
  border: 1px solid #4d3a26;
  background: #241810;
  color: #e8dcc4;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.2;
}
.admin-member__role--admin {
  border-color: #c45a4a;
  background: #3a1814;
  color: #f0b0a0;
}
.admin-member__role--moderator {
  border-color: #8a6ab0;
  background: #2a1c38;
  color: #d8c0f0;
}
.admin-member__role--premium {
  border-color: #c49228;
  background: #3a2a10;
  color: #f0d080;
}
.admin-member__role--pending {
  border-color: #5a5040;
  background: #1a1810;
  color: #a89880;
  opacity: 0.85;
}
.admin-member__role-lock {
  display: inline-block;
  margin-left: 0.35rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #a89880;
  opacity: 0.9;
}
.studio-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.55rem 1rem;
  margin: 0 0 0.55rem;
  width: 100%;
  max-width: 100%;
}
.studio-toolbar .admin-pager {
  margin: 0;
  width: auto;
  flex: 1 1 auto;
  justify-content: center;
}
.studio-toolbar .studio-rarity-bar__btn {
  flex: 0 0 auto;
}
.admin-table--members .admin-table__col-dates {
  min-width: 15.2rem;
  width: 15.8rem;
  white-space: nowrap;
}
.admin-dates {
  display: grid;
  gap: 0.22rem;
  justify-items: end;
}
.admin-dates__row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.4rem;
  min-width: 0;
  width: 100%;
}
.admin-dates__lbl {
  flex: 0 0 2.85rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #9a8a72;
  text-align: right;
}
.admin-dates__row .date-stamp {
  flex: 0 0 168px;
  width: 168px;
  min-width: 168px;
  max-width: 168px;
  box-sizing: border-box;
  justify-content: flex-end;
  text-align: right;
}
.admin-table--members .admin-table__col-chim,
.admin-table--members th.admin-table__col-chim {
  min-width: 9.5rem;
  width: 10.5rem;
}
.admin-table--members .admin-table__col-lvl,
.admin-table--members .admin-table__col-num {
  text-align: center;
}
.admin-table--members td.admin-table__col-lvl,
.admin-table--members td.admin-table__col-num {
  text-align: center;
}
.admin-th {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}
.admin-th-sort__link {
  display: inline-flex;
  align-items: center;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}
.admin-th-sort__link:hover,
.admin-th-sort.is-active .admin-th-sort__link {
  color: #ffe28a;
}
.admin-th__icon {
  display: block;
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  object-fit: contain;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}
.admin-th__label { line-height: 1; }
/* Lvl lives inside the name column now (admin-member__lvl). */
.admin-table__col-lvl {
  display: none;
}
.admin-table__col-num {
  text-align: center;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.admin-unlock-form { margin: 0; }
.admin-unlock-select {
  min-height: 2rem;
  min-width: 7.5rem;
  padding: 0.2rem 0.45rem;
  border: var(--border-width) solid #5a3c24;
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, #1a1008 82%, #2a1c12);
  color: #f0e2c4;
  font: inherit;
  box-shadow: inset 0 0 0 1px #2a170c;
}
.admin-checkin {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 700;
}
.admin-checkin--open { color: var(--muted); font-weight: 600; }
.admin-checkin--done { color: var(--ok); }
.admin-checkin__reset { margin: 0; }
.admin-checkin__btn {
  min-height: 1.75rem;
  padding: 0.15rem 0.5rem;
  border: var(--border-width) solid color-mix(in srgb, var(--danger) 55%, var(--line));
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--danger) 16%, var(--panel-strong));
  color: var(--ink-strong);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}
.admin-checkin__btn:hover { filter: brightness(1.08); }
.admin-currency__row {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.admin-currency__input {
  width: 5.5rem;
  min-height: 2rem;
  padding: 0.25rem 0.4rem;
  border: var(--border-width) solid var(--line-alt, var(--line));
  border-radius: var(--radius-sm);
  background: var(--panel-strong);
  color: var(--ink-strong);
  font: inherit;
}
.admin-currency__input:focus {
  outline: 2px solid var(--gold, #e0b050);
  outline-offset: 1px;
}
.admin-currency__ok {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: var(--border-width) solid var(--ok);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--ok) 22%, var(--panel-strong));
  color: var(--ink-strong);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}
.admin-currency__ok:hover {
  filter: brightness(1.1);
}
.admin-currency__ok:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.admin-currency-confirm__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-4);
}
.admin-currency-confirm__copy {
  margin: 0;
  font-size: var(--text-lg);
  color: var(--ink);
}
.admin-inv {
  display: grid;
  gap: var(--space-3);
}
.admin-inv__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin: 0 0 0.25rem 100px;
  padding: 0.65rem 0.75rem;
  border: 1px solid #3d2a16;
  background: #1a120c;
  box-shadow: inset 0 0 0 1px #2a1c12;
}
.admin-inv__filters,
.admin-inv__collapse-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.admin-inv__filter,
.admin-inv__tool {
  min-height: 2rem;
  padding: 0.25rem 0.7rem;
  border: 1px solid #4d3a26;
  border-radius: 0;
  background: #33220f;
  color: #efe6cf;
  font: inherit;
  font-size: var(--text-sm);
  cursor: pointer;
}
.admin-inv__filter.is-active {
  border-color: #c98a24;
  color: #f0b43c;
  background: #3d2a16;
  box-shadow: inset 0 -2px 0 #f0b43c;
}
.admin-inv__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9.7rem, 1fr));
  gap: 0.65rem;
  margin-top: 0.45rem;
}
@media (max-width: 45rem) {
  .admin-shell__body { padding-inline: 0.45rem; }
  .admin-inv__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.admin-features {
  margin: 0 0 1rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid color-mix(in srgb, var(--line, #3a4a62) 70%, #0a1018);
  background: color-mix(in srgb, var(--panel, #1a2434) 88%, #0a1018);
}
.admin-features__title {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}
.admin-features__form {
  display: grid;
  gap: 0.65rem;
  justify-items: start;
  margin-top: 0.55rem;
}
.admin-features__row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.55rem;
  align-items: start;
  cursor: pointer;
}
.admin-features__row strong {
  display: block;
}
/* ── Admin Events · page-specific parts (frame, tab, panel, pills live in admin-oak-frame.css.ts) ── */
.admin-events__header-copy {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.2rem 1.1rem;
}
.admin-events__header-title {
  margin: 0;
  font-family: var(--font-display, inherit);
  font-size: 1.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--oak-text);
  text-shadow: 0 2px 0 var(--oak-text-shadow);
}
.admin-events__header-subtitle {
  margin: 0;
  color: #f6e3bf;
  text-shadow: 0 1px 0 var(--oak-text-shadow);
}
.admin-events__header-actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}
.admin-events__feature-form,
.admin-events__end-form {
  display: contents;
}
.admin-events__end-button {
  border-color: var(--danger-line);
  color: var(--danger-text);
  cursor: pointer;
}
.admin-events__activate,
.admin-events__weather-force,
.admin-events__odds-form,
.admin-events__invite-form {
  display: grid;
  gap: 0.75rem;
  min-width: 0;
}
.admin-events__schedule-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}
.admin-events__schedule-row label,
.admin-events__weather-force label,
.admin-events__invite-form label {
  display: grid;
  gap: 0.25rem;
}
.admin-events__type-picker {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}
.admin-events__type-picker legend {
  padding: 0;
  margin-bottom: 0.3rem;
}
.admin-events__type-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.oak-frame label.admin-events__type-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 2rem;
  padding: 0 0.9rem;
  border: 1px solid rgb(255 222 165 / 22%);
  border-radius: 999px;
  background: rgb(0 0 0 / 25%);
  color: var(--text-parchment-dim);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0;
  cursor: pointer;
}
.admin-events__type-chip input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.oak-frame label.admin-events__type-chip:has(input:checked) {
  background: var(--label-gold);
  border-color: var(--focus-gold);
  color: #2a1a08;
  font-weight: 800;
}
.oak-frame label.admin-events__type-chip:has(input:focus-visible) {
  outline: 2px solid var(--focus-gold);
  outline-offset: 2px;
}
.admin-events__length-picker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}
.admin-events__length-picker .meta {
  margin: 0 0.2rem 0 0;
}
.admin-events__length-button {
  min-height: 1.9rem;
  padding: 0 0.75rem;
  border: 1px solid rgb(255 222 165 / 30%);
  border-radius: 6px;
  background: rgb(0 0 0 / 25%);
  color: var(--text-parchment-soft);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
}
.admin-events__length-button:hover {
  background: rgb(217 182 106 / 16%);
  border-color: var(--label-gold);
}
.admin-events__length-button:focus-visible {
  outline: 2px solid var(--focus-gold);
  outline-offset: 2px;
}
.admin-events__schedule-footer,
.admin-events__odds-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgb(255 222 165 / 18%);
}
.admin-events__schedule-footer .meta,
.admin-events__odds-footer .meta {
  margin: 0;
  flex: 1 1 14rem;
}
.admin-events__pool-list,
.admin-events__odds-list {
  display: grid;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.admin-events__pool-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 56rem) {
  .admin-events__pool-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 40rem) {
  .admin-events__pool-list { grid-template-columns: 1fr; }
}
.admin-events__windows {
  display: grid;
  gap: 0.65rem;
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
}
.admin-events__window {
  display: grid;
  gap: 0.45rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid rgb(255 222 165 / 16%);
  border-radius: 8px;
  background: rgb(0 0 0 / 22%);
}
.admin-events__window.is-live { border-color: var(--status-live-border); }
.admin-events__window-form,
.admin-events__type-select {
  display: grid;
  gap: 0.35rem;
}
.admin-events__window-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.admin-events__add-title {
  margin: 0.4rem 0;
  font-size: 1rem;
}
.admin-events__pool-launch {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.6rem 0 0;
}
.admin-events__pool-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.45rem 0.75rem;
  border: 1px solid rgb(255 222 165 / 12%);
  border-radius: 8px;
  background: rgb(0 0 0 / 24%);
}
.admin-events__pool-row.is-on {
  border-color: var(--status-live-border);
  background: rgb(47 122 73 / 22%);
}
.admin-events__pool-row-name,
.admin-events__odds-name {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  min-width: 0;
}
.admin-events__pool-row-name strong,
.admin-events__odds-name strong {
  color: var(--oak-text);
}
.admin-events__pool-row-name code,
.admin-events__odds-name code {
  color: var(--text-parchment-muted);
  font-size: 0.8rem;
}
.admin-events__pool-row-status {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--text-off);
}
.admin-events__pool-row.is-on .admin-events__pool-row-status {
  color: var(--status-live-text);
}
.admin-events__pool-row-form {
  margin: 0;
}
.admin-events__pool-switch {
  position: relative;
  width: 46px;
  height: 26px;
  padding: 0;
  border: 1px solid rgb(255 222 165 / 30%);
  border-radius: 999px;
  background: #0b1220;
  cursor: pointer;
}
.admin-events__pool-switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--text-off);
  transition: left 0.15s, background 0.15s;
}
.admin-events__pool-switch[aria-checked="true"] {
  background: var(--switch-on);
  border-color: var(--status-live);
}
.admin-events__pool-switch[aria-checked="true"]::after {
  left: 23px;
  background: #f6efd9;
}
.admin-events__pool-switch:focus-visible {
  outline: 2px solid var(--focus-gold);
  outline-offset: 2px;
}
.admin-events__weather-status {
  margin: 0;
}
.admin-events__weather-status strong {
  font-size: 1.1rem;
  color: var(--oak-text);
}
.admin-events__weather-force {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) auto;
  align-items: end;
}
.admin-events__weather-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
}
.admin-events__weather-tools form {
  margin: 0;
}
.admin-events__weather-tools .meta {
  margin: 0;
  flex: 1 1 14rem;
}
.admin-events__odds-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 4.5rem 3.6rem;
  align-items: center;
  gap: 0.6rem;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  background: rgb(0 0 0 / 22%);
}
.oak-frame .admin-events__weight {
  min-height: 2rem;
  padding: 0.2rem 0.45rem;
}
.admin-events__pct {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  color: var(--label-gold);
}
.admin-events__invite-form {
  grid-template-columns: minmax(0, 2fr) minmax(0, 1.2fr) auto auto;
  align-items: end;
}
.admin-events__invite-note {
  grid-column: 1 / -1;
  margin: 0;
}
.admin-events__check {
  display: flex !important;
  flex-direction: row;
  align-items: center;
  gap: 0.45rem;
  min-height: 2.5rem;
  font-weight: 700;
}
.admin-events__check input {
  width: 1rem !important;
  min-height: 1rem !important;
  height: 1rem;
}
@media (max-width: 62rem) {
  .admin-events__weather-force,
  .admin-events__invite-form,
  .admin-events__schedule-row {
    grid-template-columns: 1fr;
  }
}

.admin-backups__status,
.admin-backups__tiers {
  margin: 0.35rem 0 0;
  padding-left: 1.1rem;
  color: #e8d7b0;
  font-size: 0.86rem;
  line-height: 1.45;
}
.admin-backups__tiers .is-active > a {
  font-weight: 700;
  text-decoration: underline;
}
.admin-backups__form,
.admin-backups__settings {
  display: grid;
  gap: 0.55rem;
}
.admin-backups__form--purge {
  margin-top: 0.65rem;
  padding-top: 0.65rem;
  border-top: 1px dashed #4a3420;
}
.admin-backups__keep-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem 0.65rem;
}
.admin-backups__settings label,
.admin-backups__form label,
.admin-backups__restore-form label {
  display: grid;
  gap: 0.2rem;
  font-size: 0.82rem;
  color: #dcc9a0;
}
.admin-backups__settings input[type="number"],
.admin-backups__form input[type="text"],
.admin-backups__restore-form input[type="text"] {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #4a3420;
  background: #1a120a;
  color: #f2e4c4;
  padding: 0.35rem 0.45rem;
}
.admin-backups__note {
  margin: 0 0 0.25rem;
}
.admin-backups__settings-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
}
.admin-backups__check {
  display: flex !important;
  align-items: center;
  gap: 0.45rem;
  grid-template-columns: none !important;
}
.admin-backups__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: flex-start;
}
.admin-backups__inline {
  display: inline;
  margin: 0;
}
.admin-backups__restore {
  display: inline-block;
}
.admin-backups__restore > summary {
  list-style: none;
  cursor: pointer;
}
.admin-backups__restore > summary::-webkit-details-marker {
  display: none;
}
.admin-backups__restore-form {
  display: grid;
  gap: 0.45rem;
  margin-top: 0.45rem;
  padding: 0.55rem;
  border: 1px solid #6a2a1a;
  background: rgba(40, 12, 8, 0.65);
  min-width: min(22rem, 70vw);
}
.admin-backups__log {
  margin: 0.35rem 0 0;
  max-height: 14rem;
  overflow: auto;
  padding: 0.55rem 0.65rem;
  border: 1px solid #3d2a16;
  background: #120c08;
  color: #c9b892;
  font-size: 0.72rem;
  line-height: 1.35;
  white-space: pre-wrap;
  word-break: break-word;
}
.admin-shell__plaque.carved-plaque h1 {
  position: relative;
  z-index: 3;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1rem, 2.2vw, 1.28rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.12em;
  color: #f6e6b8;
  text-shadow: 0 2px 0 #2a1208, 1px 0 0 #2a1208, -1px 0 0 #2a1208;
  white-space: nowrap;
}
.admin-inv__location {
  margin-top: 0;
  border: 2px solid #3d2a16;
  border-radius: 0;
  overflow: hidden;
  background: #1e130a;
  box-shadow:
    inset 0 0 0 1px #573b1f,
    0 2px 0 #0a0604;
}
.admin-inv__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 44px;
  min-height: 44px;
  max-height: 44px;
  margin: 0;
  padding: 0 0.9rem;
  border: 0;
  border-bottom: 1px solid #4d3a26;
  background: linear-gradient(180deg, #573b1f, #3d2a16);
  color: #f0b43c;
  font: inherit;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: left;
  cursor: pointer;
}
.admin-inv__location:not([open]) .admin-inv__toggle {
  border-bottom: 0;
}
.admin-inv__location:not([open]) .admin-inv__chevron {
  transform: rotate(-90deg);
}
.admin-inv__chevron {
  display: inline-block;
  transition: transform 0.12s ease;
  color: #c98a24;
}
.admin-inv__panel {
  padding: 0.7rem 0.8rem 0.95rem;
  background: #16100a;
}
.admin-inv__role {
  margin: var(--space-3) 0 0;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #a99878;
}
.admin-inv__role:first-child {
  margin-top: 0;
}
.craft-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
  gap: var(--space-3);
  margin-top: var(--space-4);
}
.craft-card, .craft-gate {
  padding: var(--space-3);
  border: var(--border-width) solid var(--line-alt, var(--line));
  border-radius: var(--radius);
  background: var(--panel-strong);
}
.craft-gates {
  display: grid;
  gap: var(--space-3);
  margin: var(--space-4) 0;
}
.craft-gate--open {
  opacity: 0.72;
}
.craft-gate__ok {
  color: var(--ok, #7ec87a);
}
.craft-card h3, .craft-gate h2 { margin: 0 0 var(--space-2); }
.craft-card__ings, .craft-gate ul { margin: 0 0 var(--space-2); padding-left: 1.1rem; }


/* Admin inventory · shop egg-card face + green square Give (music-toggle footprint). */
.admin-inv-card.egg-card {
  position: relative;
  min-width: 0;
}
/*
 * Beat .egg-card .btn { width: 110px } from shop-cards · give is a corner + square.
 */
.egg-card .admin-inv__give-btn.btn,
.egg-card button.btn.admin-inv__give-btn,
.admin-inv-card.egg-card .admin-inv__give-btn.btn {
  --btn-face: #4a9a48;
  --btn-lip: #2a5a28;
  --btn-shell: color-mix(in srgb, #2a5a28 72%, #140a04);
  --btn-ink: #0c1410;
  --btn-pad-x: 0;
  --btn-depth-idle: 4px;
  position: absolute;
  /* Center between top-left / top-right indicators on .shop-card__top. */
  top: 0.28rem;
  left: calc(50% - 0.775rem);
  right: auto;
  z-index: 5;
  display: inline-grid;
  place-items: center;
  /* Compact square · shorter than a normal control. */
  width: 1.55rem;
  max-width: 1.55rem;
  height: 1.55rem;
  min-height: 0;
  min-width: 1.55rem;
  margin: 0;
  margin-inline: 0;
  margin-top: 0;
  margin-bottom: 0.25rem;
  padding: 0;
  font-size: 1.35rem;
  font-weight: 900;
  line-height: 1;
  /* Icon footprint · corner nails, no straps. */
  background-image:
    var(--btn-nail),
    var(--btn-nail),
    var(--btn-nail),
    var(--btn-nail),
    var(--btn-grain-a),
    var(--btn-grain-b),
    var(--btn-plate);
  background-size:
    5px 5px,
    5px 5px,
    5px 5px,
    5px 5px,
    100% 100%,
    100% 100%,
    100% 100%;
  background-position:
    left 3px top 3px,
    left 3px bottom 3px,
    right 3px top 3px,
    right 3px bottom 3px,
    0 0,
    0 0,
    0 0;
}
.egg-card .admin-inv__give-btn.btn:hover,
.egg-card button.btn.admin-inv__give-btn:hover,
.egg-card .admin-inv__give-btn.btn:focus-visible,
.admin-inv-card.egg-card .admin-inv__give-btn.btn:hover,
.admin-inv-card.egg-card .admin-inv__give-btn.btn:focus-visible {
  --btn-face: #5cb85a;
  --btn-lip: #2a5a28;
  outline: none;
}
.admin-inv-card .affinity-tip {
  display: block;
  width: 100%;
  min-width: 0;
}
.admin-inv-card__face {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.28rem;
  min-width: 0;
  width: 100%;
}
.admin-inv-card__art {
  display: grid;
  place-items: center;
  align-content: start;
  min-height: 0;
  /* Clear the centered + · light top · trim empty bottom under eggs/icons. */
  padding-top: 0.55rem;
  padding-bottom: 0;
  margin-bottom: 0;
}
.admin-inv-card__art .admin-inv-card__icon {
  display: block;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 0;
  border: 1px solid #4d3a26;
  background: #1e130a;
  image-rendering: auto;
}
.admin-inv-card__art .egg-token {
  width: 3.6rem;
  height: auto;
  aspect-ratio: 16 / 20;
  margin: 0.2rem 0 0;
}
.admin-inv-card__loc {
  display: inline-flex;
  align-items: center;
  min-height: 1.35rem;
  padding: 0.12rem 0.45rem;
  border: 1px solid #5a4024;
  background: #241810;
  color: #cbbba6;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.1;
}
.admin-shell.pixel-frame .admin-inv__filter,
.admin-shell.pixel-frame .admin-inv__tool {
  border-color: #4d3a26;
  background: #33220f;
  color: #efe6cf;
}
.admin-shell.pixel-frame .admin-inv__filter.is-active {
  border-color: #c98a24;
  color: #f0b43c;
  background: #3d2a16;
}
.admin-give__copy {
  margin: 0 0 var(--space-3);
  font-size: var(--text-lg);
  color: var(--ink);
}
.admin-give__form {
  display: grid;
  gap: var(--space-3);
}
.admin-give__field {
  display: grid;
  gap: 0.35rem;
}
.admin-give__field > span:first-child {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--ink-strong);
}
.admin-give__field select,
.admin-give__field input[type="number"] {
  width: 100%;
  min-height: 2.4rem;
  padding: 0.4rem 0.55rem;
  border: var(--border-width) solid var(--line-alt, var(--line));
  border-radius: var(--radius-sm);
  background: var(--panel-strong);
  color: var(--ink-strong);
  font: inherit;
}
.admin-give__field select {
  min-height: 11rem;
}
.admin-give__field--choice {
  gap: 0.45rem;
  border: 0;
  margin: 0;
  padding: 0;
}
.admin-give__field--choice legend {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--ink-strong);
  padding: 0;
}
.admin-give__choice {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.95rem;
  color: var(--ink);
  cursor: pointer;
}
.admin-tools {
  max-width: 36rem;
  padding: 1rem 1.1rem 1.15rem;
}
.admin-tools__form .admin-give__field select {
  min-height: 2.4rem;
}
.admin-tools__form .admin-give__field input[type="text"] {
  width: 100%;
  min-height: 2.4rem;
  padding: 0.4rem 0.55rem;
  border: var(--border-width) solid var(--line-alt, var(--line));
  border-radius: var(--radius-sm);
  background: var(--panel-strong);
  color: var(--ink-strong);
  font: inherit;
}
.admin-give__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-1);
}
dialog.modal.modal--admin-kit {
  width: min(96vw, 64rem);
  max-width: min(96vw, 64rem);
}
.admin-kit-panel {
  width: 100%;
  max-width: none;
}
.admin-kit {
  display: grid;
  gap: var(--space-3);
}
.admin-kit__player {
  display: grid;
  gap: 0.35rem;
}
.admin-kit__player > span {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--ink-strong);
}
.admin-kit__player select {
  width: 100%;
  max-width: none;
  min-height: 2.4rem;
  padding: 0.4rem 0.55rem;
  border: var(--border-width) solid var(--line-alt, var(--line));
  background: var(--panel-strong);
  color: var(--ink-strong);
  font: inherit;
}
.admin-kit__board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
  min-height: 22rem;
  justify-items: stretch;
}
.admin-kit__board > * {
  min-width: 0;
  width: 100%;
}
.admin-kit__side {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 0.55rem;
  min-height: 0;
  padding: 0.65rem;
  border: 1px solid #3d2a16;
  background: #16100a;
  box-shadow: inset 0 0 0 1px #2a1c12;
}
.admin-kit__side-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
}
.admin-kit__side-head h3 {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #f0b43c;
}
.admin-kit__side-head input[type="search"] {
  min-width: 8rem;
  flex: 1 1 8rem;
  min-height: 2rem;
  padding: 0.25rem 0.5rem;
  border: 1px solid #4d3a26;
  background: #1e130a;
  color: #efe6cf;
  font: inherit;
  font-size: var(--text-sm);
}
.admin-kit__clear {
  min-height: 2rem;
  padding: 0.2rem 0.55rem;
  border: 1px solid #4d3a26;
  background: #33220f;
  color: #efe6cf;
  font: inherit;
  font-size: var(--text-sm);
  cursor: pointer;
}
.admin-kit__catalog,
.admin-kit__cart {
  min-height: 0;
  max-height: 26rem;
  overflow: auto;
  margin: 0;
  padding: 0;
  list-style: none;
}
.admin-kit__group {
  margin: 0 0 0.7rem;
}
.admin-kit__group-label {
  margin: 0 0 0.35rem;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #a99878;
}
.admin-kit__role {
  margin: 0.35rem 0 0.25rem;
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #7a6a52;
}
.admin-kit__rows {
  display: grid;
  gap: 0.3rem;
}
.admin-kit__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.45rem;
  border: 1px solid #3d2a16;
  background: #1e130a;
}
.admin-kit__row-main {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}
.admin-kit__row img {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  image-rendering: pixelated;
}
.admin-kit__row-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #efe6cf;
  font-size: var(--text-sm);
}
.admin-kit__row-meta {
  color: #a99878;
  font-size: 0.68rem;
}
.admin-kit__add,
.admin-kit__qty-btn,
.admin-kit__remove {
  min-height: 1.85rem;
  min-width: 1.85rem;
  padding: 0 0.45rem;
  border: 1px solid #4d3a26;
  background: #33220f;
  color: #f0b43c;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.admin-kit__cart {
  display: grid;
  align-content: start;
  gap: 0.35rem;
}
.admin-kit__cart-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.45rem;
  border: 1px solid #3d2a16;
  background: #1e130a;
}
.admin-kit__qty {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}
.admin-kit__qty input {
  width: 3.2rem;
  min-height: 1.85rem;
  padding: 0.15rem 0.3rem;
  border: 1px solid #4d3a26;
  background: #120e0a;
  color: #efe6cf;
  font: inherit;
  text-align: center;
}
.admin-kit__empty {
  margin: 0.5rem 0;
  list-style: none;
}
.admin-kit__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--space-2);
}
.admin-kit__confirm-list {
  margin: 0 0 var(--space-3);
  padding: 0.55rem 0.75rem;
  list-style: none;
  border: 1px solid #3d2a16;
  background: #16100a;
  max-height: 16rem;
  overflow: auto;
}
.admin-kit__confirm-list li {
  padding: 0.25rem 0;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.studio-table {
  border-collapse: separate;
  border-spacing: 0;
  font-size: 1.05rem;
  width: max-content;
}
.studio-table th,
.studio-table td {
  padding: 0.3rem 0.28rem;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: middle;
}
.studio-table thead th {
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--ink-strong);
}
.studio-table__scene {
  width: auto;
  min-width: 0;
}
.studio-table__rarity {
  width: auto;
  white-space: nowrap;
}
.studio-rarity-pill {
  margin: 0;
  padding: 0.2rem 0.55rem;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--label-gold, #e3c377);
  background: rgb(0 0 0 / 28%);
  border: 1px solid rgb(255 222 165 / 28%);
  border-radius: 4px;
  cursor: pointer;
}
.studio-rarity-pill:hover,
.studio-rarity-pill:focus-visible {
  background: rgb(227 195 119 / 16%);
}
.studio-lifecycle {
  display: flex;
  align-items: flex-end;
  gap: 0.28rem;
  min-width: 0;
  width: max-content;
}
.studio-lifecycle__stage {
  display: grid;
  justify-items: center;
  align-content: end;
  min-width: 3.35rem;
  flex: 0 0 3.35rem;
}
.studio-lifecycle__stage--adult {
  min-width: 3.75rem;
}
.studio-lifecycle__art {
  width: 100%;
  height: 3.75rem;
  display: grid;
  place-items: end center;
  min-width: 0;
  overflow: visible;
}
.studio-lifecycle__art--scene {
  /* Keep adult scenic + hen inside the strip without clipping the bird. */
  overflow: visible;
}
.studio-lifecycle__label,
.studio-lifecycle--labels > span {
  font-size: 0.52rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1;
  text-align: center;
}
.studio-table thead .studio-table__scene {
  text-align: left;
}
.studio-scene-head {
  display: grid;
  justify-items: center;
  gap: 0.35rem;
  width: max-content;
}
.studio-scene-head__title {
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
}
.studio-lifecycle--labels {
  align-items: center;
  min-width: 0;
}
.studio-lifecycle--labels > span {
  flex: 0 0 3.35rem;
  min-width: 3.35rem;
}
.studio-lifecycle .visual-asset {
  margin: 0;
  display: block;
}
.studio-lifecycle canvas.chikling-portrait {
  display: block;
  width: 3.75rem;
  height: 3.75rem;
  image-rendering: pixelated;
}
.studio-lifecycle .egg-token {
  width: 2.4rem;
  height: 3rem;
  align-self: end;
}
.studio-lifecycle .egg-token__art {
  width: 100%;
  height: 100%;
}
.studio-table__reward {
  width: 4.5rem;
  vertical-align: middle;
}
.studio-table__reward-stack {
  display: grid;
  justify-items: center;
  gap: 0.35rem;
  width: fit-content;
  margin-inline: auto;
}
.studio-reward-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-width: 3.6rem;
  min-height: 2rem;
  padding: 0.2rem 0.55rem;
  border: 2px solid #5a3c24;
  background:
    linear-gradient(180deg, #6a4630 0%, #3a2416 55%, #2a180e 100%);
  color: #f0e2c4;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 #8a6238,
    inset 0 -2px 0 #1a1008,
    0 2px 0 #1a1008;
}
.studio-reward-toggle:hover { filter: brightness(1.08); }
.studio-reward-toggle__knob {
  width: 0.7rem;
  height: 0.7rem;
  border: 1px solid #1a1008;
  background: #6a6a6a;
  box-shadow: inset 0 1px 0 #bbb;
}
.studio-reward-toggle--on .studio-reward-toggle__knob {
  background: #6fbf6a;
  box-shadow: inset 0 1px 0 #b6e6c4;
}
.studio-reward-toggle--off {
  opacity: 0.82;
  color: #cbbba6;
}
.studio-reward-toggle--off .studio-reward-toggle__knob {
  background: #ff8a80;
  box-shadow: inset 0 1px 0 #ffc4c0;
}
/* Match On/Off toggle footprint; fill uses --rarity-* from data-tier. */
.studio-rarity-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  width: auto;
  min-width: 3.6rem;
  min-height: 2rem;
  margin: 0;
  padding: 0.2rem 0.55rem;
  border: 2px solid var(--rarity-border, #5a3c24);
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--rarity, #c8ced8) 88%, #fff) 0%,
    var(--rarity, #c8ced8) 55%,
    color-mix(in srgb, var(--rarity, #c8ced8) 70%, #000) 100%
  );
  color: var(--rarity-ink, #1a2030);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 color-mix(in srgb, var(--rarity, #c8ced8) 55%, #fff),
    inset 0 -2px 0 color-mix(in srgb, var(--rarity-border, #5a3c24) 80%, #000),
    0 2px 0 #1a1008;
}
.studio-rarity-btn:hover { filter: brightness(1.08); }
.studio-rarity-btn[data-tier="Common"],
.studio-rarity-toggle__opt[data-tier="Common"],
.studio-rarity-filter[data-tier="Common"] {
  --rarity: var(--rarity-common);
  --rarity-ink: var(--rarity-common-ink);
  --rarity-border: var(--rarity-common-border);
}
.studio-rarity-btn[data-tier="Uncommon"],
.studio-rarity-toggle__opt[data-tier="Uncommon"],
.studio-rarity-filter[data-tier="Uncommon"] {
  --rarity: var(--rarity-uncommon);
  --rarity-ink: var(--rarity-uncommon-ink);
  --rarity-border: var(--rarity-uncommon-border);
}
.studio-rarity-btn[data-tier="Rare"],
.studio-rarity-toggle__opt[data-tier="Rare"],
.studio-rarity-filter[data-tier="Rare"] {
  --rarity: var(--rarity-rare);
  --rarity-ink: var(--rarity-rare-ink);
  --rarity-border: var(--rarity-rare-border);
}
.studio-rarity-btn[data-tier="Epic"],
.studio-rarity-toggle__opt[data-tier="Epic"],
.studio-rarity-filter[data-tier="Epic"] {
  --rarity: var(--rarity-epic);
  --rarity-ink: var(--rarity-epic-ink);
  --rarity-border: var(--rarity-epic-border);
}
.studio-rarity-btn[data-tier="Legendary"],
.studio-rarity-toggle__opt[data-tier="Legendary"],
.studio-rarity-filter[data-tier="Legendary"] {
  --rarity: var(--rarity-legendary);
  --rarity-ink: var(--rarity-legendary-ink);
  --rarity-border: var(--rarity-legendary-border);
}
.studio-rarity-btn[data-tier="Event"],
.studio-rarity-toggle__opt[data-tier="Event"],
.studio-rarity-filter[data-tier="Event"] {
  --rarity: var(--rarity-event);
  --rarity-ink: var(--rarity-event-ink);
  --rarity-border: var(--rarity-event-border);
}
.studio-rarity-form {
  display: grid;
  gap: 0.55rem;
  align-content: start;
}
.studio-rarity-toggle {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}
.studio-rarity-toggle__opt {
  position: relative;
  display: inline-flex;
  cursor: pointer;
}
.studio-rarity-toggle__opt input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  cursor: pointer;
}
.studio-rarity-toggle__opt span {
  display: inline-block;
  padding: 0.22rem 0.5rem;
  border: 1px solid color-mix(in srgb, var(--rarity-border, #5a3c24) 55%, #2a1a10);
  background: color-mix(in srgb, var(--rarity, #c8ced8) 18%, #2a1a10);
  color: color-mix(in srgb, var(--rarity, #d8c8b0) 75%, #d8c8b0);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.2;
}
.studio-rarity-toggle__opt.is-on span,
.studio-rarity-toggle__opt:has(input:checked) span {
  border-color: var(--rarity-border, #5a3c24);
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--rarity, #c8ced8) 88%, #fff) 0%,
    var(--rarity, #c8ced8) 55%,
    color-mix(in srgb, var(--rarity, #c8ced8) 70%, #000) 100%
  );
  color: var(--rarity-ink, #1a2030);
  box-shadow: inset 0 1px 0 color-mix(in srgb, var(--rarity, #c8ced8) 55%, #fff);
}
.studio-table__type {
  display: grid;
  gap: 0.35rem;
  align-content: center;
  min-width: 9rem;
}
.studio-table__name {
  display: block;
  color: var(--ink-strong);
  font-size: 1.12rem;
  line-height: 1.25;
}
/* Rewardable Off / admin-hidden · muted purple plate so disabled types stay readable. */
.studio-table__name--disabled {
  display: inline-block;
  margin: 0 0 0.15rem;
  padding: 0.18rem 0.55rem 0.22rem;
  border-radius: 0.28rem;
  color: #e8d8f4;
  background:
    linear-gradient(180deg, #4a3a58 0%, #2e2438 55%, #221a2a 100%);
  box-shadow:
    inset 0 0 0 1px #6a5578,
    inset 0 1px 0 rgb(255 255 255 / 12%),
    0 1px 0 rgb(0 0 0 / 35%);
  text-shadow: 0 1px 0 rgb(0 0 0 / 45%);
}
.studio-table__affinities .affinity-chips {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.22rem;
}
.studio-table__affinities .affinity-chip {
  font-size: 0.78rem;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
}
.studio-table .type-badge {
  justify-self: start;
  font-size: 0.88rem;
}
.type-badge {
  display: inline-block;
  padding: 0.1rem 0.45rem;
  border: var(--border-width) solid var(--line);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  color: var(--ink-strong);
}

.site-layout {
  position: relative;
  z-index: 1;
  width: min(var(--content-w), calc(100% - var(--space-8)));
  margin: 0 auto;
  display: block;
  /* Clear fixed header so page content never sits underneath. */
  padding-top: var(--header-offset);
}

dialog.modal.modal--rarity-board.modal--set1 {
  width: min(90vw, 96rem);
  max-width: min(90vw, calc(100vw - 1.25rem));
  height: min(94vh, 66.25rem);
  max-height: min(94vh, calc(100dvh - 0.75rem));
  min-height: min(37.5rem, 94vh);
}
dialog.modal.modal--rarity-board .modal__panel.set1-panel {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  --set1-vine-gutter: var(--page-panel-body-x);
  background:
    radial-gradient(ellipse at 50% -20%, rgb(87 112 151 / 18%), transparent 60%),
    linear-gradient(180deg, var(--rarity-board-slate-top), var(--rarity-board-slate-bot));
}
/*
 * Body stays transparent so the panel slate runs to the inner rim.
 * Content padding is the shared page inset, not a second frame.
 */
dialog.modal.modal--rarity-board .modal__panel.set1-panel > .set1-body.studio-rarity-board {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  margin: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  overflow: hidden;
  padding:
    calc(var(--set1-sign-clear, 4.35rem) + 0.2rem)
    var(--page-panel-body-x)
    var(--space-3);
}
dialog.modal.modal--rarity-board .rarity-board__sign-copy {
  max-width: min(22rem, 100%);
  padding-top: calc(var(--frame-sign-top) + 0.15rem);
  color: var(--rarity-board-ink);
}
.rarity-board__kicker {
  margin: 0;
  color: var(--rarity-board-muted);
  font-family: var(--font-pixel);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.rarity-board__lede {
  margin: 0.35rem 0 0;
  color: var(--rarity-board-ink);
  font-size: 0.78rem;
  line-height: 1.35;
}
.rarity-board__layout {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: var(--space-3);
  flex: 1 1 auto;
  min-height: 0;
}
.rarity-board__notice {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  margin: 0;
  padding: 0.45rem 0.75rem;
  border: 1px solid color-mix(in srgb, var(--rarity-board-gold) 55%, transparent);
  background: linear-gradient(
    90deg,
    color-mix(in srgb, var(--rarity-board-gold) 16%, transparent),
    color-mix(in srgb, var(--rarity-board-well) 72%, transparent)
  );
  color: var(--rarity-board-ink);
  font-size: 0.75rem;
  line-height: 1.35;
}
.rarity-board__notice strong {
  color: var(--rarity-board-gold-bright);
  letter-spacing: 0.03em;
}
.rarity-board__notice-mark {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0.05rem;
  border: 1px solid var(--rarity-board-gold);
  color: var(--rarity-board-gold-bright);
  background: var(--rarity-board-well);
  font-family: var(--font-pixel);
  font-size: 0.62rem;
  line-height: 1;
}
.rarity-board__workspace {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: var(--space-3);
  min-height: 0;
}
.rarity-board__zone {
  border: 1px solid var(--rarity-board-line);
  background: linear-gradient(180deg, var(--rarity-board-card-top), var(--rarity-board-card-bot));
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 4%);
  padding: 0.7rem 0.8rem 0.75rem;
}
.rarity-board__heading,
.rarity-board__roster-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
}
.rarity-board__heading { margin-bottom: 0.55rem; }
.rarity-board__roster-head { margin-bottom: 0.55rem; }
.rarity-board__heading h2,
.rarity-board__roster-head h2 {
  margin: 0;
  color: var(--ink-strong);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.015em;
}
.rarity-board__heading p {
  margin: 0;
  color: var(--rarity-board-muted);
  font-size: 0.7rem;
}
.rarity-board__text-btn {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--rarity-board-gold);
  font: inherit;
  font-size: 0.7rem;
  text-decoration: underline;
  text-underline-offset: 0.18rem;
  cursor: pointer;
}
.rarity-board__text-btn:hover,
.rarity-board__text-btn:focus-visible { color: var(--rarity-board-gold-bright); }
.rarity-board__weights {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: var(--space-2);
}
.rarity-board__card {
  min-width: 0;
  padding: 0.5rem 0.55rem 0.45rem;
  border: 1px solid var(--rarity-border, var(--rarity-board-line));
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--rarity, var(--rarity-common)) 12%, var(--rarity-board-card-top)),
    var(--rarity-board-card-bot)
  );
}
.rarity-board__card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  margin-bottom: 0.3rem;
}
.rarity-board__tier {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
  color: var(--rarity, var(--rarity-board-ink));
  font-size: 0.75rem;
  font-weight: 800;
}
.rarity-board__dot {
  width: 0.45rem;
  height: 0.45rem;
  flex: 0 0 auto;
  background: var(--rarity, var(--rarity-board-ink));
}
.rarity-board__weight {
  color: var(--ink-strong);
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.rarity-board__unit,
.rarity-board__role {
  margin: 0;
  color: var(--rarity-board-muted);
  font-size: 0.62rem;
  line-height: 1.25;
}
.rarity-board__unit {
  font-family: var(--font-pixel);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.rarity-board__share {
  display: flex;
  align-items: baseline;
  gap: 0.3rem;
  margin: 0.4rem 0 0;
  color: var(--rarity, var(--rarity-board-ink));
}
.rarity-board__share strong {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.rarity-board__share span {
  color: var(--rarity-board-muted);
  font-size: 0.62rem;
}
.rarity-board__card.is-event .rarity-board__share {
  display: block;
}
.rarity-board__card.is-event .rarity-board__share span {
  display: block;
  margin-top: 0.15rem;
}
.rarity-board__track {
  height: 0.25rem;
  margin-top: 0.3rem;
  overflow: hidden;
  background: var(--rarity-board-well);
  border: 1px solid rgb(167 188 216 / 14%);
}
.rarity-board__track i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--rarity, var(--rarity-board-ink));
}
.rarity-board__card input[type="range"] {
  display: block;
  width: 100%;
  margin: 0.25rem 0 0.2rem;
  accent-color: var(--rarity, var(--rarity-board-gold));
  cursor: pointer;
}
.rarity-board__title-group {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  min-width: 0;
}
.rarity-board__count {
  color: var(--rarity-board-muted);
  font-size: 0.7rem;
  white-space: nowrap;
}
.rarity-board__tools {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
}
.rarity-board__search { position: relative; }
.rarity-board__search::before {
  content: "⌕";
  position: absolute;
  left: 0.5rem;
  top: 50%;
  transform: translateY(-54%);
  color: var(--rarity-board-muted);
  font-size: 1rem;
  pointer-events: none;
}
.rarity-board__search input,
.rarity-board__sort,
.rarity-board__select {
  font: inherit;
  color: var(--rarity-board-ink);
  background: var(--rarity-board-well);
  border: 1px solid var(--line-alt);
  border-radius: var(--radius-sm);
}
.rarity-board__search input,
.rarity-board__sort {
  height: 1.95rem;
  font-size: 0.75rem;
}
.rarity-board__search input {
  width: min(16rem, 25vw);
  padding: 0.3rem 0.55rem 0.3rem 1.7rem;
}
.rarity-board__sort { padding: 0.25rem 0.4rem; }
.rarity-board__search input:focus,
.rarity-board__sort:focus,
.rarity-board__select:focus-visible {
  outline: none;
  border-color: var(--rarity-board-gold);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--rarity-board-gold) 25%, transparent);
}
.rarity-board__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0 0 0.55rem;
}
.rarity-board__filter {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 1.7rem;
  margin: 0;
  padding: 0.25rem 0.55rem;
  border: 1px solid var(--rarity-board-line);
  background: var(--rarity-board-well);
  color: var(--rarity-board-ink);
  font: inherit;
  font-size: 0.7rem;
  line-height: 1;
  cursor: pointer;
  text-align: left;
}
.rarity-board__filter span:last-child {
  font-family: var(--font-pixel);
  font-size: 0.58rem;
  opacity: 0.72;
}
.rarity-board__filter:hover { filter: brightness(1.12); }
.rarity-board__filter.is-active {
  border-color: var(--rarity-border, var(--rarity-board-gold));
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--rarity, var(--gold)) 86%, #fff),
    var(--rarity, var(--gold)) 58%,
    color-mix(in srgb, var(--rarity, var(--gold)) 70%, #000)
  );
  color: var(--rarity-ink, var(--earn-ink));
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 35%);
}
.rarity-board__filter[data-tier="all"] {
  --rarity: var(--gold);
  --rarity-ink: var(--earn-ink);
  --rarity-border: var(--rarity-legendary-border);
}
.rarity-board__roster {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  min-height: 0;
  padding-bottom: 0.55rem;
}
.rarity-board__table-shell {
  min-height: 0;
  overflow: auto;
  border: 1px solid var(--rarity-board-line);
  background: color-mix(in srgb, var(--rarity-board-well) 62%, transparent);
}
.rarity-board__table {
  width: 100%;
  min-width: 47.5rem;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}
.rarity-board__table th:nth-child(1) { width: 25%; }
.rarity-board__table th:nth-child(2) { width: 27%; }
.rarity-board__table th:nth-child(3) { width: 24%; }
.rarity-board__table th:nth-child(4) { width: 12%; }
.rarity-board__table th:nth-child(5) { width: 12%; }
.rarity-board__table thead { position: sticky; top: 0; z-index: 1; }
.rarity-board__table th {
  height: 2.2rem;
  padding: 0.4rem 0.6rem;
  border-bottom: 1px solid var(--rarity-board-line);
  background: linear-gradient(180deg, var(--rarity-board-card-top), var(--rarity-board-slate-bot));
  color: var(--rarity-board-gold-bright);
  text-align: left;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.rarity-board__table td {
  height: 2.7rem;
  padding: 0.3rem 0.6rem;
  border-bottom: 1px solid rgb(166 185 213 / 13%);
  color: var(--rarity-board-ink);
  font-size: 0.75rem;
  vertical-align: middle;
}
.rarity-board__table tbody tr { background: rgb(17 29 49 / 66%); }
.rarity-board__table tbody tr:nth-child(even) { background: rgb(31 46 70 / 68%); }
.rarity-board__table tbody tr:hover { background: rgb(57 78 108 / 62%); }
.rarity-board__table tbody tr.is-changed td:first-child {
  box-shadow: inset 3px 0 0 var(--rarity-board-gold);
}
.rarity-board__table tbody tr:last-child td { border-bottom: 0; }
.rarity-board__chiken {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}
.rarity-board__egg.egg-token {
  width: 1.55rem;
  height: 1.85rem;
  flex: 0 0 auto;
}
.rarity-board__egg .egg-token__art {
  width: 100%;
  height: 100%;
}
.rarity-board__name {
  color: var(--ink-strong);
  font-weight: 800;
  font-size: 0.82rem;
  line-height: 1.1;
}
.rarity-board__code {
  margin-top: 0.15rem;
  color: var(--rarity-board-muted);
  font-family: var(--font-pixel);
  font-size: 0.55rem;
  line-height: 1.2;
}
.rarity-board__archetype { color: var(--rarity-board-muted); font-size: 0.7rem; }
.rarity-board__select-wrap {
  position: relative;
  display: inline-block;
  max-width: 100%;
}
.rarity-board__select-wrap::after {
  content: "▾";
  position: absolute;
  top: 50%;
  right: 0.45rem;
  transform: translateY(-55%);
  color: var(--rarity-ink, var(--earn-ink));
  pointer-events: none;
  font-size: 0.75rem;
}
.rarity-board__select {
  appearance: none;
  min-width: 7.6rem;
  max-width: 100%;
  height: 1.75rem;
  padding: 0.2rem 1.5rem 0.2rem 0.5rem;
  border-color: var(--rarity-border, var(--rarity-board-line));
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--rarity, var(--rarity-common)) 87%, #fff),
    var(--rarity, var(--rarity-common)) 58%,
    color-mix(in srgb, var(--rarity, var(--rarity-common)) 72%, #000)
  );
  color: var(--rarity-ink, var(--earn-ink));
  font-size: 0.7rem;
  font-weight: 800;
  cursor: pointer;
}
.rarity-board__select option {
  background: var(--rarity-board-slate-bot);
  color: var(--rarity-board-ink);
}
.rarity-board__num {
  color: var(--ink-strong);
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.rarity-board__sub {
  display: block;
  margin-top: 0.2rem;
  color: var(--rarity-board-muted);
  font-size: 0.62rem;
  font-variant-numeric: tabular-nums;
}
.rarity-board__empty {
  margin: 0;
  padding: 1.4rem;
  text-align: center;
  color: var(--rarity-board-muted);
  font-size: 0.82rem;
}
.rarity-board__empty[hidden] { display: none; }
.rarity-board__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: 3.4rem;
  padding-top: 0.35rem;
  border-top: 1px solid color-mix(in srgb, var(--rarity-board-line) 70%, transparent);
}
.rarity-board__assign-form,
#rarity-assign-form { display: none; }
.rarity-board__save {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0;
  color: var(--rarity-board-muted);
  font-size: 0.7rem;
}
.rarity-board__save strong { color: var(--rarity-board-ink); font-weight: 700; }
.rarity-board__state-dot {
  width: 0.45rem;
  height: 0.45rem;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 28%, transparent);
}
.rarity-board__save.is-pending .rarity-board__state-dot {
  background: var(--rarity-board-gold-bright);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--rarity-board-gold) 35%, transparent);
}
.rarity-board__save.is-error .rarity-board__state-dot {
  background: var(--danger);
  box-shadow: 0 0 0 3px var(--danger-bg);
}
.rarity-board__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-2);
}
.rarity-board__card[data-tier="Common"],
.rarity-board__select-wrap[data-tier="Common"],
.rarity-board__filter[data-tier="Common"] {
  --rarity: var(--rarity-common);
  --rarity-ink: var(--rarity-common-ink);
  --rarity-border: var(--rarity-common-border);
}
.rarity-board__card[data-tier="Uncommon"],
.rarity-board__select-wrap[data-tier="Uncommon"],
.rarity-board__filter[data-tier="Uncommon"] {
  --rarity: var(--rarity-uncommon);
  --rarity-ink: var(--rarity-uncommon-ink);
  --rarity-border: var(--rarity-uncommon-border);
}
.rarity-board__card[data-tier="Rare"],
.rarity-board__select-wrap[data-tier="Rare"],
.rarity-board__filter[data-tier="Rare"] {
  --rarity: var(--rarity-rare);
  --rarity-ink: var(--rarity-rare-ink);
  --rarity-border: var(--rarity-rare-border);
}
.rarity-board__card[data-tier="Epic"],
.rarity-board__select-wrap[data-tier="Epic"],
.rarity-board__filter[data-tier="Epic"] {
  --rarity: var(--rarity-epic);
  --rarity-ink: var(--rarity-epic-ink);
  --rarity-border: var(--rarity-epic-border);
}
.rarity-board__card[data-tier="Legendary"],
.rarity-board__select-wrap[data-tier="Legendary"],
.rarity-board__filter[data-tier="Legendary"] {
  --rarity: var(--rarity-legendary);
  --rarity-ink: var(--rarity-legendary-ink);
  --rarity-border: var(--rarity-legendary-border);
}
.rarity-board__card[data-tier="Event"],
.rarity-board__select-wrap[data-tier="Event"],
.rarity-board__filter[data-tier="Event"] {
  --rarity: var(--rarity-event);
  --rarity-ink: var(--rarity-event-ink);
  --rarity-border: var(--rarity-event-border);
}
@media (max-width: 1000px) {
  .rarity-board__weights { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .rarity-board__sign-copy { display: none; }
}
@media (max-width: 45rem) {
  dialog.modal.modal--rarity-board.modal--set1 {
    width: calc(100vw - 0.75rem);
    max-width: calc(100vw - 0.75rem);
    height: min(96vh, calc(100dvh - 0.5rem));
    min-height: 0;
  }
  /* Weights wrap to two columns, so the body scrolls instead of crushing the roster. */
  dialog.modal.modal--rarity-board .modal__panel.set1-panel > .set1-body.studio-rarity-board {
    overflow: auto;
    padding-inline: var(--space-3);
  }
  .rarity-board__layout,
  .rarity-board__workspace {
    display: flex;
    flex-direction: column;
    height: auto;
    flex: 0 0 auto;
  }
  .rarity-board__roster {
    min-height: 0;
  }
  .rarity-board__table-shell {
    min-height: 16rem;
    max-height: 50vh;
  }
  .rarity-board__weights { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rarity-board__heading,
  .rarity-board__roster-head,
  .rarity-board__footer {
    align-items: flex-start;
    flex-direction: column;
  }
  .rarity-board__tools,
  .rarity-board__actions { width: 100%; }
  .rarity-board__search { flex: 1 1 auto; }
  .rarity-board__search input { width: 100%; }
  .rarity-board__actions { flex-wrap: wrap; }
  .rarity-board__actions .btn { flex: 1 1 auto; }
}


/* ── Admin oak frame · variables ───────────────────────────────── */
.admin-shell {
  --oak-light: #9c6a3c;
  --oak-base: #94653a;
  --oak-dark: #6a431d;
  --oak-outline: #1b0f06;
  --oak-outline-deep: #130a04;
  --oak-text: #fff3d6;
  --oak-text-shadow: #2e1a09;
  --oak-rivet-shine: #fff1b8;
  --oak-rivet-brass: #a8863a;
  --oak-rivet-pit: #3a2610;
  --panel-navy: #16243f;
  --field-navy: #0b1730;
  --field-navy-border: #2c4068;
  --label-gold: #e3c377;
  --text-parchment: #f1e4c8;
  --text-parchment-soft: #e8d6ae;
  --text-parchment-dim: #cfc3a5;
  --text-parchment-muted: #b9ad92;
  --text-off: #a99f88;
  --focus-gold: #ffe29a;
  --status-live: #58b37a;
  --status-live-text: #7fd39c;
  --status-live-border: #3f8a58;
  --switch-on: #2f7a49;
  --pill-border: #4a3318;
  --danger-line: #8a3b34;
  --danger-text: #f0a79f;
}

/* ── Wood paint (one list so the grain is defined once) ───────── */
.oak-header-plank,
.oak-frame,
.oak-frame__tab,
.oak-frame .btn,
.oak-chicken-initial {
  background-color: var(--oak-base);
  background-image:
    repeating-linear-gradient(90deg, rgb(0 0 0 / 7%) 0 2px, transparent 2px 9px),
    linear-gradient(180deg, var(--oak-light), var(--oak-dark));
}
.oak-header-plank,
.oak-frame {
  position: relative;
  border-radius: 12px;
  box-shadow:
    0 0 0 2px var(--oak-outline),
    inset 0 3px 0 rgb(255 228 175 / 55%),
    inset 0 -4px 0 rgb(0 0 0 / 50%),
    0 5px 0 var(--oak-outline-deep),
    0 12px 16px rgb(0 0 0 / 40%);
}
.oak-header-plank::after,
.oak-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background:
    radial-gradient(circle at 6px 6px, var(--oak-rivet-shine) 0 0.7px, var(--oak-rivet-brass) 1.5px, var(--oak-rivet-pit) 2.6px, transparent 3px),
    radial-gradient(circle at calc(100% - 6px) 6px, var(--oak-rivet-shine) 0 0.7px, var(--oak-rivet-brass) 1.5px, var(--oak-rivet-pit) 2.6px, transparent 3px),
    radial-gradient(circle at 6px calc(100% - 6px), var(--oak-rivet-shine) 0 0.7px, var(--oak-rivet-brass) 1.5px, var(--oak-rivet-pit) 2.6px, transparent 3px),
    radial-gradient(circle at calc(100% - 6px) calc(100% - 6px), var(--oak-rivet-shine) 0 0.7px, var(--oak-rivet-brass) 1.5px, var(--oak-rivet-pit) 2.6px, transparent 3px);
}

/* ── Frame, tab, panel ────────────────────────────────────────── */
.oak-frame {
  display: block;
  min-width: 0;
  margin: 1.35rem 0 0;
  padding: 9px;
  color: var(--text-parchment);
}
.oak-frame + .oak-frame,
.oak-frame + * + .oak-frame {
  margin-top: 2.1rem;
}
.oak-frame__tab {
  position: absolute;
  top: -17px;
  left: 24px;
  z-index: 2;
  margin: 0;
  padding: 0.3rem 1.1rem 0.35rem;
  border: 2px solid var(--oak-outline);
  border-radius: 6px;
  font-family: var(--font-display, inherit);
  font-size: 0.98rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1.25;
  text-transform: uppercase;
  color: var(--oak-text);
  text-shadow: 0 1px 0 var(--oak-text-shadow);
  box-shadow:
    inset 0 2px 0 rgb(255 228 175 / 50%),
    inset 0 -3px 0 rgb(0 0 0 / 40%),
    0 3px 0 var(--oak-outline-deep);
}
.oak-frame__panel {
  display: grid;
  gap: 0.75rem;
  min-width: 0;
  padding: 1.9rem 1.25rem 1.25rem;
  border-radius: 6px;
  background: var(--panel-navy);
  box-shadow:
    inset 0 0 0 1.5px rgb(0 0 0 / 65%),
    0 0 0 1.5px rgb(255 222 165 / 30%);
}

/* ── Controls inside a frame ──────────────────────────────────── */
.oak-frame label,
.oak-frame legend {
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: var(--label-gold);
}
.oak-frame .meta,
.oak-frame__lead {
  color: var(--text-parchment-muted);
}
.oak-frame__lead {
  margin: 0;
}
.oak-frame .lead {
  color: var(--text-parchment);
}
.oak-frame code {
  color: var(--text-parchment-soft);
}
.oak-frame .section-head,
.oak-frame h3 {
  margin: 0;
  font-family: var(--font-display, inherit);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--label-gold);
}
.oak-frame input[type="url"],
.oak-frame input[type="text"],
.oak-frame input[type="search"],
.oak-frame input[type="number"],
.oak-frame input[type="datetime-local"],
.oak-frame select {
  width: 100%;
  min-width: 0;
  min-height: 2.5rem;
  padding: 0.4rem 0.7rem;
  border: 1px solid var(--field-navy-border);
  border-radius: 6px;
  background: var(--field-navy);
  color: var(--text-parchment);
  font: inherit;
  color-scheme: dark;
  box-shadow: inset 0 2px 4px rgb(0 0 0 / 35%);
}
.oak-frame input:focus-visible,
.oak-frame select:focus-visible,
.oak-frame .btn:focus-visible,
.oak-toggle-button:focus-visible,
.oak-header-plank .btn:focus-visible {
  outline: 2px solid var(--focus-gold);
  outline-offset: 2px;
}
.oak-frame .btn,
.oak-header-plank .btn {
  min-height: 2.6rem;
  padding: 0 1.4rem;
  border: 2px solid var(--oak-outline);
  border-radius: 8px;
  color: var(--oak-text);
  font-weight: 800;
  font-size: 1.02rem;
  letter-spacing: 0.03em;
  text-shadow: 0 1px 0 var(--oak-text-shadow);
  cursor: pointer;
  box-shadow:
    inset 0 2px 0 rgb(255 228 175 / 55%),
    inset 0 -3px 0 rgb(0 0 0 / 40%),
    0 3px 0 var(--oak-outline-deep);
}
.oak-frame .btn:active {
  transform: translateY(2px);
}
.oak-frame .btn[disabled],
.oak-frame .btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.oak-frame .btn.btn--cancel {
  background: rgb(0 0 0 / 25%);
  border: 1px solid var(--danger-line);
  color: var(--danger-text);
  text-shadow: none;
  box-shadow: none;
}

/* ── Tables inside a frame ────────────────────────────────────── */
.admin-shell .oak-frame .admin-table-frame {
  padding: 0;
  border: 1px solid rgb(255 222 165 / 18%);
  border-radius: 6px;
  background: transparent;
  box-shadow: none;
}
/* Logs + studio: secondary wash so the oak panel and the table read as two layers. */
.admin-shell .oak-frame--logs .admin-table-frame--logs,
.admin-shell .oak-frame--studio .admin-table-frame--studio {
  background: color-mix(in srgb, #0c1628 72%, var(--panel-navy, #16243f));
  border-color: rgb(255 222 165 / 22%);
}
.admin-shell .oak-frame--logs .oak-frame__panel,
.admin-shell .oak-frame--studio .oak-frame__panel {
  background: color-mix(in srgb, var(--panel-navy, #16243f) 82%, #243656);
}
.admin-shell.pixel-frame .oak-frame .admin-table {
  background: transparent;
}
.admin-shell.pixel-frame .oak-frame .admin-table th,
.admin-shell.pixel-frame .oak-frame .admin-table td {
  border-bottom-color: rgb(255 222 165 / 10%);
  color: var(--text-parchment);
}
.admin-shell.pixel-frame .oak-frame .admin-table thead th,
.admin-shell.pixel-frame .oak-frame .studio-table thead th {
  background: rgb(0 0 0 / 30%);
  color: var(--label-gold);
  border-bottom: 1px solid rgb(255 222 165 / 25%);
}
.admin-shell.pixel-frame .oak-frame .studio-table thead th {
  position: sticky;
  top: 0;
  z-index: 4;
  text-align: center;
  vertical-align: bottom;
  background: #1a2744;
}
.admin-shell.pixel-frame .oak-frame .admin-table tbody tr:nth-child(odd) td {
  background: transparent;
}
.admin-shell.pixel-frame .oak-frame .admin-table tbody tr:nth-child(even) td {
  background: rgb(255 255 255 / 3%);
}
.admin-shell.pixel-frame .oak-frame .admin-table tbody tr:hover td {
  background: rgb(227 195 119 / 10%);
}
/* Master ledger rows sit on the navy oak panel. The shared table stripe
   above is nearly clear, so these rows use the same wood plates as
   .admin-shell.pixel-frame .admin-table, with brighter body text. */
.admin-shell.pixel-frame .admin-ledger .oak-frame .admin-table tbody td {
  color: #f6e6c0;
}
.admin-shell.pixel-frame .admin-ledger .oak-frame .admin-table tbody td.meta {
  color: #efe6cf;
}
.admin-shell.pixel-frame .admin-ledger .oak-frame .admin-table tbody tr:nth-child(odd) td {
  background: #24180f;
}
.admin-shell.pixel-frame .admin-ledger .oak-frame .admin-table tbody tr:nth-child(even) td {
  background: #3a2818;
}
.admin-shell.pixel-frame .admin-ledger .oak-frame .admin-table tbody tr:hover td {
  background: #4a3420;
}

/* ── Header plank pieces ──────────────────────────────────────── */
.oak-header-plank {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem 1.5rem;
  margin: 0 0 1.5rem;
  padding: 0.9rem 1.7rem;
  color: var(--oak-text);
}
.oak-status-pill,
.oak-toggle-button {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  height: 2.1rem;
  padding: 0 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--pill-border);
  background: var(--oak-outline);
  color: var(--text-parchment-soft);
  font: inherit;
  font-weight: 800;
  font-size: 0.88rem;
  white-space: nowrap;
}
.oak-status-pill--accent {
  color: var(--label-gold);
}
.oak-status-pill__dot,
.oak-toggle-button__dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--text-off);
}
.oak-status-pill.is-live .oak-status-pill__dot,
.oak-toggle-button.is-on .oak-toggle-button__dot {
  background: var(--status-live);
}
.oak-toggle-button {
  cursor: pointer;
}
.oak-toggle-button:hover {
  border-color: var(--label-gold);
}
.oak-toggle-button.is-on {
  border-color: var(--status-live-border);
  color: var(--status-live-text);
}
.oak-chicken-initial {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 6px;
  font-family: var(--font-display, inherit);
  font-weight: 800;
  color: var(--oak-text);
  text-shadow: 0 1px 0 var(--oak-text-shadow);
  box-shadow:
    0 0 0 1.5px var(--oak-outline),
    inset 0 2px 0 rgb(255 228 175 / 50%),
    inset 0 -2px 0 rgb(0 0 0 / 45%);
}

/* ── Two-up layouts for tab bodies ────────────────────────────── */
.admin-tab-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2.1rem 1.6rem;
  align-items: start;
  margin-top: 1.35rem;
}
.admin-tab-grid > .oak-frame {
  margin: 0;
}
.admin-tab-grid--thirds {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.admin-tab-grid__wide {
  grid-column: 1 / -1;
}
.admin-tab-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem 1rem;
}
@media (max-width: 62rem) {
  .admin-tab-grid,
  .admin-tab-grid--thirds {
    grid-template-columns: 1fr;
  }
}


/* Backup Manager: newspaper columns. A short card stacks under the card above it.
   Cron log and Admin ops span the full three-column width. */
.admin-backups__flow {
  column-count: 3;
  column-gap: 1.6rem;
  margin-top: 1.35rem;
  padding-top: 0.35rem;
}
.admin-backups__flow > .oak-frame {
  display: block;
  width: 100%;
  margin: 0 0 2.1rem;
  break-inside: avoid;
  page-break-inside: avoid;
}
.admin-backups__flow > .admin-backups__span {
  column-span: all;
}
.admin-backups__flow .admin-table-frame {
  overflow-x: auto;
  max-width: 100%;
}
@media (max-width: 62rem) {
  .admin-backups__flow {
    column-count: 1;
  }
}
.modal-viewer { display: flex; flex-direction: column; gap: 1rem; padding: 0.5rem 0 2rem; }
.modal-viewer__lead { margin: 0; color: #d4c9ba; }
.modal-viewer__lead a { color: #f3cf74; }
.modal-viewer__group { display: flex; flex-direction: column; gap: 0.45rem; }
.modal-viewer__group h2 { margin: 0; font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: #f3cf74; }
.modal-viewer__row { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.modal-viewer__row small { opacity: 0.7; font-size: 0.72rem; }
/* Admin banner uses the plain header title, not a hanging sign. */
.admin-shell__plaque-wrap {
  position: static;
  top: auto;
  left: auto;
  padding-top: 0;
  transform: none;
}
.admin-shell__plaque.hanging-plaque.carved-plaque {
  position: static;
  display: block;
  width: auto;
  max-width: 100%;
  margin: 0 auto;
  padding: 0.15rem 0.2rem;
  border: 0;
  background: none;
  box-shadow: none;
}
.admin-shell__plaque.hanging-plaque.carved-plaque::after,
.admin-shell__plaque-wrap .carved-plaque__chain,
.admin-shell__plaque .carved-plaque__sprout {
  display: none;
  content: none;
}
.admin-shell__plaque.carved-plaque h1 {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.4vw, 1.7rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #f6e6c0;
  text-shadow: 0 2px 0 rgb(0 0 0 / 75%);
}
/* Title and section menu sit above the banner wash and the scene art. */
.admin-shell__plaque-wrap {
  position: relative;
  z-index: 6;
}
.admin-title-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}
.admin-section { position: relative; }
.admin-section__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  width: max-content;
  margin: 0;
  padding: 0.28rem 0.7rem 0.28rem 0.45rem;
  border: 1px solid #6a4a22;
  border-radius: 3px;
  background: rgb(12 8 4 / 72%);
  color: #f6e6c0;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  list-style: none;
}
.admin-section__btn::-webkit-details-marker { display: none; }
.admin-section__caret { width: 0.7rem; height: 0.7rem; margin-left: 0.35rem; flex: none; }
.admin-section__ico { width: 1rem; height: 1rem; flex: none; }
.admin-section__menu {
  position: absolute;
  z-index: 8;
  top: calc(100% + 0.35rem);
  left: 0;
  display: flex;
  flex-direction: column;
  width: max-content;
  min-width: 0;
  margin: 0;
  padding: 0.3rem;
  border: 2px solid transparent;
  border-radius: 3px;
  background:
    linear-gradient(180deg, #18214a, #0d1430) padding-box,
    linear-gradient(180deg, #fbe39a, #c99232 40%, #f2c862 62%, #7a4c12) border-box;
  box-shadow: 0 0 0 1px #160c02, 0 14px 30px rgb(0 0 0 / 65%);
}
.admin-section:not([open]) .admin-section__menu { display: none; }
.admin-section__link {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.38rem 0.85rem 0.38rem 0.45rem;
  font-size: 0.84rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  border-radius: 2px;
}
.admin-section__link:hover,
.admin-section__link:focus-visible { background: rgb(255 255 255 / 8%); }
.admin-section__link[aria-current="page"] { background: rgb(255 255 255 / 10%); }
.admin-section__count { margin-left: 0.35rem; font-size: 0.82em; opacity: 0.85; }
.admin-section--members .admin-section__btn,
.admin-section__link--members { color: hsl(0 72% 68%); }
.admin-section--studio .admin-section__btn,
.admin-section__link--studio { color: hsl(36 78% 64%); }
.admin-section--inventory .admin-section__btn,
.admin-section__link--inventory { color: hsl(72 62% 58%); }
.admin-section--ledger .admin-section__btn,
.admin-section__link--ledger { color: hsl(108 52% 58%); }
.admin-section--logs .admin-section__btn,
.admin-section__link--logs { color: hsl(144 52% 58%); }
.admin-section--backups .admin-section__btn,
.admin-section__link--backups { color: hsl(180 55% 62%); }
.admin-section--events .admin-section__btn,
.admin-section__link--events { color: hsl(216 78% 72%); }
.admin-section--tools .admin-section__btn,
.admin-section__link--tools { color: hsl(252 70% 76%); }
.admin-section--qa .admin-section__btn,
.admin-section__link--qa { color: hsl(288 68% 74%); }
.admin-section--modals .admin-section__btn,
.admin-section__link--modals { color: hsl(324 72% 72%); }




/* Ambient fireflies · behind page body (site-layout z:1). */
.site-fireflies {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.site-firefly {
  position: absolute;
  /* vw/vh + transform · animate composite, not layout. */
  left: clamp(2vw, var(--x, 10vw), 98vw);
  top: clamp(2vh, var(--y, 20vh), 98vh);
  width: 4px;
  height: 4px;
  border-radius: 0;
  background: #d8ff8a;
  box-shadow: 0 0 8px 3px #b8ff6a99;
  will-change: transform, opacity;
  animation:
    site-ff-drift var(--dur, 9s) ease-in-out var(--delay, 0s) infinite alternate,
    site-ff-blink var(--blink, 2.4s) steps(2) infinite;
}
@keyframes site-ff-drift {
  to {
    transform: translate3d(var(--dx, 6vw), var(--dy, -5vh), 0);
  }
}
@keyframes site-ff-blink {
  50% { opacity: 0.35; }
}
/* High only · Medium still sets full-quality but should not pay for layout flies. */
html:not([data-quality="high"]) .site-fireflies,
html[data-full-quality="0"] .site-fireflies,
html[data-idle-pause="1"] .site-fireflies,
html[data-modal-pause="1"] .site-fireflies,
html[data-motion-shed="1"] .site-fireflies,
.site-fireflies[data-inview="0"] {
  display: none;
}
/* Low quality · drop expensive glass blur on the phone dock. */
html[data-quality="low"] .nav-rail {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* Universal Drop / Craft / Egg / Prem marks (shop, sell, craft, admin). */
.item-kind {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.05rem;
  padding: 0.08rem 0.35rem;
  border: 1px solid var(--item-kind-border, #5a3c24);
  background: var(--item-kind-bg, #2a1a10);
  color: var(--item-kind-ink, #e8dcc4);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}
.item-kind--drop {
  /* Prize · light-med purple plate (kind key stays drop in economy code). */
  --item-kind-bg: color-mix(in srgb, #9b7bc8 58%, #1a1018);
  --item-kind-border: #6a4a8a;
  --item-kind-ink: #efe4ff;
}
.item-kind--craft {
  --item-kind-bg: color-mix(in srgb, #c98918 50%, #1a1008);
  --item-kind-border: #8a6238;
  --item-kind-ink: #ffe6a8;
}
.item-kind--egg {
  --item-kind-bg: color-mix(in srgb, #6a9cc8 55%, #1a1008);
  --item-kind-border: #3a6a8a;
  --item-kind-ink: #d8eef8;
}
.item-kind--premium {
  --item-kind-bg: color-mix(in srgb, #c9a24a 55%, #1a1008);
  --item-kind-border: #8a6d2f;
  --item-kind-ink: #fff0c8;
}
.site-layout--gate { display: block; }
.nav-rail {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 0.1rem 0.2rem;
}
.nav-rail a,
.nav-rail__link {
  padding: 0.28rem 0.32rem;
  border-radius: 0.4rem;
  color: var(--muted);
  text-decoration: none;
  font-size: 1.02rem;
  font-weight: 650;
}
/* Desktop header stays text-only; icons show under 1000px (bottom tab bar). */
.nav-rail__ico {
  display: none;
  shape-rendering: crispEdges;
}
/*
 * Muted lane colors · beat .nav-rail a (class+element) with two classes.
 * Soft hues so links differ without shouting.
 */
.nav-rail a.nav-rail__link--coop,
.nav-rail__link.nav-rail__link--coop { color: #c4a06a; } /* hearth / home */
.nav-rail a.nav-rail__link--lodge,
.nav-rail__link.nav-rail__link--lodge { color: #6f9e82; } /* trail / outdoors */
.nav-rail a.nav-rail__link--incubator,
.nav-rail__link.nav-rail__link--incubator { color: #b08eb0; } /* hatch / soft dusk */
.nav-rail a.nav-rail__link--craft,
.nav-rail__link.nav-rail__link--craft { color: #b07a58; } /* workshop copper */
.nav-rail a.nav-rail__link--arcade,
.nav-rail__link.nav-rail__link--arcade { color: #c49a5a; } /* play / prize glow */
.nav-rail a.nav-rail__link--shop,
.nav-rail__link.nav-rail__link--shop { color: #6f96a8; } /* trade / cool shelf */
.nav-rail a.nav-rail__link--admin,
.nav-rail__link.nav-rail__link--admin { color: #c4b48a; }
.nav-rail a:hover,
.nav-rail__link:hover {
  background: var(--notice-bg);
  border-radius: 0.4rem;
  filter: brightness(1.12);
}
.nav-rail a.nav-rail__link--coop:hover,
.nav-rail__link.nav-rail__link--coop:hover { color: #d4b47a; }
.nav-rail a.nav-rail__link--lodge:hover,
.nav-rail__link.nav-rail__link--lodge:hover { color: #82b094; }
.nav-rail a.nav-rail__link--incubator:hover,
.nav-rail__link.nav-rail__link--incubator:hover { color: #c0a0c0; }
.nav-rail a.nav-rail__link--craft:hover,
.nav-rail__link.nav-rail__link--craft:hover { color: #c28a68; }
.nav-rail a.nav-rail__link--arcade:hover,
.nav-rail__link.nav-rail__link--arcade:hover { color: #d4aa6a; }
.nav-rail a.nav-rail__link--shop:hover,
.nav-rail__link.nav-rail__link--shop:hover { color: #82a8ba; }
.nav-rail a.nav-rail__link--admin:hover,
.nav-rail__link.nav-rail__link--admin:hover { color: #d4c49a; }
.nav-rail a[aria-current="page"],
.nav-rail__link[aria-current="page"] {
  position: relative;
  box-shadow: none;
}
.nav-rail a[aria-current="page"]::after,
.nav-rail__link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0.1rem;
  right: 0.1rem;
  bottom: 0;
  height: 2px;
  pointer-events: none;
  /* Solid mid, short hard fade to empty at the ends. */
  background: linear-gradient(
    90deg,
    transparent 0%,
    transparent 6%,
    currentColor 14%,
    currentColor 86%,
    transparent 94%,
    transparent 100%
  );
}
.nav-rail a.nav-rail__link--coop[aria-current="page"],
.nav-rail__link.nav-rail__link--coop[aria-current="page"] { color: #c4a06a; }
.nav-rail a.nav-rail__link--lodge[aria-current="page"],
.nav-rail__link.nav-rail__link--lodge[aria-current="page"] { color: #6f9e82; }
.nav-rail a.nav-rail__link--incubator[aria-current="page"],
.nav-rail__link.nav-rail__link--incubator[aria-current="page"] { color: #b08eb0; }
.nav-rail a.nav-rail__link--craft[aria-current="page"],
.nav-rail__link.nav-rail__link--craft[aria-current="page"] { color: #b07a58; }
.nav-rail a.nav-rail__link--arcade[aria-current="page"],
.nav-rail__link.nav-rail__link--arcade[aria-current="page"] { color: #c49a5a; }
.nav-rail a.nav-rail__link--shop[aria-current="page"],
.nav-rail__link.nav-rail__link--shop[aria-current="page"] { color: #6f96a8; }
.page {
  min-width: 0;
  /* Extra top air under the site header (title / profile clear). */
  padding: calc(var(--space-8) + 0.65rem) 0 var(--space-16);
}
.site-layout--gate .page {
  width: 100%;
  padding-top: var(--space-8);
}

h1, h2, h3 {
  color: var(--ink-strong);
  font-family: var(--font-display);
  line-height: 1.2;
}
h1 {
  margin: 0 0 var(--space-2);
  font-size: var(--text-xl);
  font-weight: 600;
}
h2 {
  margin: 0 0 var(--space-3);
  font-size: var(--text-lg);
  font-weight: 600;
}
p { margin-top: 0; }
.lead {
  max-width: var(--reading-w);
  margin: 0 0 var(--space-6);
  color: var(--muted);
}
.muted { color: var(--muted); }
.meta { color: var(--muted); font-size: var(--text-sm); }
.eyebrow {
  margin: 0 0 var(--space-2);
  color: var(--accent-hover);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
/* Compact header. Purse stays in the status banner so the icon row has room. */
@media (max-width: 1000px) {
  .header-wallet { display: none; }
}
/* Icon-only once the words start to crowd the header. The phone drawer is below this. */
@media (max-width: 1180px) and (min-width: calc(45rem + 0.01rem)) {
  .nav-rail__label,
  .nav-group__caret { display: none; }
  .nav-rail__link,
  button.nav-rail__link--chikonomicon {
    display: inline-flex;
    align-items: center;
    gap: 0;
    padding: 0.45rem;
    min-width: 2.5rem;
    justify-content: center;
  }
  .nav-rail__ico { display: block; width: 1.45rem; height: 1.45rem; }
}
@media (max-width: 45rem) {
  .header-auth {
    flex-direction: column;
    align-items: stretch;
  }
  .header-auth .btn {
    justify-content: center;
    font-size: var(--text-xs);
  }
  body { background-attachment: scroll; }
  .site-header__inner {
    width: min(100% - 2.5rem, var(--content-w));
    gap: var(--space-2);
  }
  .site-footer__inner {
    width: min(100% - 2.5rem, var(--content-w));
  }
  .egg-badge span { display: none; }
  .egg-badge { padding-inline: var(--space-2); }
  .site-layout {
    width: min(100% - 2.5rem, var(--content-w));
    grid-template-columns: 1fr;
    gap: 0;
  }
  .page { padding-top: calc(var(--space-5) + 0.65rem); }
  .admin-table { display: block; overflow-x: auto; }
  .admin-table-frame--studio .admin-table {
    display: table;
    overflow: visible;
  }
  .admin-table-frame--members .admin-table {
    display: table;
  }
}




.clucky {
  position: fixed;
  z-index: 35;
  left: 0.85rem;
  bottom: 4.25rem;
  display: flex;
  align-items: flex-end;
  gap: 0.4rem;
  max-width: min(20rem, calc(100% - 6rem));
  pointer-events: none;
}
.clucky[data-clucky-tour-muted="1"] {
  visibility: hidden;
  opacity: 0;
}
.clucky__glyph {
  flex: 0 0 auto;
  width: 4.5rem;
  height: 4.5rem;
  image-rendering: pixelated;
  filter: drop-shadow(2px 3px 0 #2a2018);
}
.clucky__chip {
  margin: 0 0 0.45rem;
  padding: 0.4rem 0.6rem 0.45rem;
  background: #fbf3dc;
  color: #35261a;
  border: 3px solid #35261a;
  box-shadow: 0 3px 0 #6b4a2a;
  font-family: var(--font-display);
  font-size: 0.95rem;
  line-height: 1.25;
}
.clucky__name {
  display: block;
  margin-bottom: 0.12rem;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6f5a43;
}
.clucky-tour {
  position: fixed;
  inset: 0;
  /* Above header (360) and menus (370); under modal (400) and toasts (450). */
  z-index: calc(var(--z-menu, 370) + 15);
  pointer-events: none;
}
.clucky-tour__veil {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.clucky-tour__panel {
  position: absolute;
  background: rgb(18 12 8 / 72%);
  pointer-events: auto;
}
.clucky-tour__anchor {
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  gap: 0.35rem;
  max-width: min(17.5rem, calc(100vw - 1.5rem));
  pointer-events: auto;
}
.clucky-tour__glyph {
  flex: 0 0 auto;
  width: 4rem;
  height: 4rem;
  image-rendering: pixelated;
  filter: drop-shadow(2px 3px 0 #2a2018);
}
.clucky-tour__chip {
  position: relative;
  margin: 0 0 0.35rem;
  padding: 0.45rem 1.6rem 0.45rem 0.65rem;
  background: #fbf3dc;
  color: #35261a;
  border: 3px solid #35261a;
  box-shadow: 0 3px 0 #6b4a2a;
  font-family: var(--font-display);
  font-size: 0.95rem;
  line-height: 1.25;
  min-width: 11rem;
}
.clucky-tour__close {
  position: absolute;
  top: 0.15rem;
  right: 0.2rem;
  margin: 0;
  padding: 0 0.28rem;
  line-height: 1.1;
  font-size: 1.05rem;
  font-family: var(--font-display);
  color: #c97878;
  background: transparent;
  border: 0;
  cursor: pointer;
}
.clucky-tour__close:hover,
.clucky-tour__close:focus-visible {
  color: #d62828;
}
.clucky-tour__name {
  display: block;
  margin-bottom: 0.12rem;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6f5a43;
}
.clucky-tour__line {
  margin: 0 0 0.4rem;
}
.clucky-tour__actions {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  align-items: center;
}
.clucky-tour__btn {
  margin: 0;
  padding: 0.2rem 0.65rem;
  font-family: var(--font-display);
  font-size: 0.8rem;
  color: #35261a;
  background: #e8d9a8;
  border: 2px solid #35261a;
  box-shadow: 0 2px 0 #6b4a2a;
  cursor: pointer;
}
.clucky-tour__btn--end {
  background: #e8d9a8;
  color: #5a4030;
  border-color: #6b4a2a;
  padding: 0.18rem 0.65rem;
}
.clucky-tour__btn--next {
  background: linear-gradient(180deg, #f0d078, #c8962e);
  color: #1f160e;
  border-color: #6b4a2a;
  padding: 0.18rem 0.75rem;
}
.clucky-tour__btn:focus-visible {
  outline: 2px solid #6b4a2a;
  outline-offset: 2px;
}
.clucky-tour__anchor[data-motion="1"] {
  animation: clucky-tour-in 0.28s ease-out;
}
@keyframes clucky-tour-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .clucky-tour__anchor[data-motion="1"] {
    animation: none;
  }
}
@media (max-width: 40rem) {
  .clucky {
    left: 0.4rem;
    bottom: 5.5rem;
    max-width: calc(100% - 4.5rem);
  }
  .clucky__glyph {
    width: 3.25rem;
    height: 3.25rem;
  }
  .clucky__chip {
    font-size: 0.82rem;
  }
  .clucky-tour__glyph {
    width: 3.25rem;
    height: 3.25rem;
  }
  .clucky-tour__chip {
    font-size: 0.82rem;
    min-width: 0;
  }
}


.hero {
  position: relative;
  min-height: calc(100vh - var(--header-offset) - var(--space-16));
  display: grid;
  place-items: center;
  overflow: hidden;
  border: var(--border-width) solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: var(--shadow);
  text-align: center;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--notice-bg);
}
.hero__content {
  position: relative;
  z-index: 1;
  max-width: 42rem;
  padding: var(--space-10) var(--space-6);
}
.hero__egg {
  display: block;
  width: clamp(12rem, 32vw, 21rem);
  height: clamp(12rem, 32vw, 21rem);
  margin: 0 auto var(--space-2);
  object-fit: contain;
  image-rendering: pixelated;
  filter: drop-shadow(0 1.25rem 1.75rem var(--scrim));
}
.hero h1 {
  margin-bottom: var(--space-3);
  font-size: var(--text-hero);
  letter-spacing: 0.12em;
}
.hero .lead {
  margin-inline: auto;
  color: var(--ink);
  font-size: var(--text-lg);
}
.hero .actions { justify-content: center; }

.gate-page {
  display: grid;
  gap: var(--space-6);
  width: 100%;
  margin: 0;
  padding: 0 0 var(--space-10);
}
.pending-panel {
  width: min(36rem, 100%);
  margin: var(--space-6) auto var(--space-10);
  /* Set: roomy (frame-set registry). */
  --frame-pad-roomy: var(--space-6);
  background:
    linear-gradient(180deg, rgb(12 8 4 / 35%), rgb(10 7 4 / 55%)),
    var(--panel-strong, #1a1008);
  color: #e8dcc4;
}
.pending-panel .eyebrow {
  margin: 0 0 0.35rem;
  color: #c9a24a;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.78rem;
  font-weight: 800;
}
.pending-panel h1 {
  margin: 0 0 0.55rem;
}
.pending-panel .lead {
  margin: 0 0 1rem;
  max-width: 34rem;
}
.pending-panel__steps {
  margin: 0 0 1rem;
  padding: 0 0 0 1.15rem;
  display: grid;
  gap: 0.45rem;
  color: #d4c9ba;
}
.pending-panel__steps strong {
  color: #f0e2c4;
}
.pending-panel .meta {
  margin: 0 0 1.1rem;
}
.pending-panel .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}
.gate-hero {
  position: relative;
  width: 100%;
  max-width: none;
  margin: 0;
  min-height: 0;
  aspect-ratio: 2 / 1;
  box-sizing: border-box;
  padding: 0;
}
.gate-hero .world__stage {
  inset: 0;
  border-radius: inherit;
  overflow: hidden;
}
.gate-hero .world__stage::after {
  background: linear-gradient(
    90deg,
    var(--scene-shade) 0%,
    color-mix(in srgb, var(--scene-shade) 78%, transparent) 42%,
    transparent 68%
  );
}
.gate-hero .world__egg {
  /* Same share of the stage as the coop arch, with no rem cap.
     Full-bleed landing art grows the arch; the egg's pixel blocks grow with it. */
  width: 30%;
  max-width: none;
  border: 0;
  box-shadow: none;
  background: transparent;
}
.gate-hero .world__egg .ancient-egg {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}
.gate-hero__content {
  position: absolute;
  z-index: 3;
  left: 14%;
  right: 42%;
  top: 0;
  bottom: 0;
  display: grid;
  align-content: center;
  justify-items: start;
  gap: var(--space-3);
  padding: var(--space-6) var(--space-6);
  text-align: left;
  color: var(--scene-ink);
}
.gate-hero__content .eyebrow { margin: 0; color: var(--gold); }
.gate-hero__content h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, var(--text-hero));
  letter-spacing: 0.12em;
}
.gate-hero__content .lead {
  margin: 0;
  max-width: 28rem;
  color: var(--scene-muted);
  font-size: var(--text-lg);
}
.gate-hero__content .actions { margin-top: var(--space-2); justify-content: flex-start; }
.gate-hero__content .muted { color: var(--scene-muted); }
.gate-story {
  display: grid;
  gap: var(--space-6);
}
.gate-story .surface,
.gate-intro,
.gate-egg,
.gate-discord,
.gate-showcase,
.gate-preview,
.gate-shots,
.gate-sell__card {
  border: 0;
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--panel-strong) 90%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 0 0 1px var(--scene-line), var(--shadow);
}
.gate-story .surface.pixel-frame,
.gate-intro.pixel-frame,
.gate-egg.pixel-frame,
.gate-discord.pixel-frame,
.gate-showcase.pixel-frame,
.gate-preview.pixel-frame,
.gate-shots.pixel-frame,
.gate-sell__card.pixel-frame,
.gate-hero.pixel-frame {
  border-radius: 0;
  box-shadow: 0 10px 24px rgb(0 0 0 / 35%);
}
.gate-hero.pixel-frame {
  /* Set: flush (frame-set registry). */
  overflow: hidden;
}
/* .gate-sell__card · Set: roomy (frame-set registry). */
.gate-intro,
.gate-showcase,
.gate-preview,
.gate-egg,
.gate-discord,
.gate-shots {
  padding: clamp(var(--space-5), 4vw, var(--space-8));
}
/* Gate story panels are .surface → Set: roomy (default pad). Shots get a fluid pad. */
.gate-shots.pixel-frame {
  /* Set: roomy, with a fluid pad. */
  --frame-pad-roomy: clamp(var(--space-5), 4vw, var(--space-8));
}
/* Keep slate blue like neighboring gate cards · not the coop wood plank. */
.gate-intro.surface.pixel-frame {
  background: color-mix(in srgb, var(--panel-strong) 90%, transparent);
  color: var(--ink);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.gate-intro {
  position: relative;
  overflow: hidden;
}
.gate-intro::after {
  content: "";
  position: absolute;
  right: -4rem;
  top: -5rem;
  width: 16rem;
  height: 16rem;
  border: 0;
  border-radius: 999px;
  background:
    radial-gradient(circle at 42% 42%, color-mix(in srgb, var(--gold) 20%, transparent), transparent 58%),
    radial-gradient(circle, color-mix(in srgb, var(--accent) 18%, transparent), transparent 62%);
  opacity: 0.72;
  pointer-events: none;
}
.gate-intro > * {
  position: relative;
  z-index: 1;
}
.gate-intro h2,
.gate-egg h2,
.gate-discord h2,
.gate-showcase h2,
.gate-preview h2,
.gate-shots h2 {
  max-width: 48rem;
  margin: 0 0 var(--space-3);
  font-size: clamp(1.45rem, 2.8vw, 2.2rem);
}
.gate-intro p:not(.gate-sell__kicker),
.gate-showcase p:not(.gate-sell__kicker),
.gate-preview p:not(.gate-sell__kicker),
.gate-shots p:not(.gate-sell__kicker),
.gate-egg > div > p:not(.gate-sell__kicker):not(.meta) {
  max-width: 52rem;
  color: var(--muted);
  font-size: var(--text-lg);
}
.gate-bullets {
  display: grid;
  gap: var(--space-2);
  margin: var(--space-3) 0 0;
  padding: 0;
  list-style: none;
}
.gate-bullets--wide {
  margin-top: var(--space-4);
  max-width: 44rem;
}
.gate-bullets li {
  display: grid;
  grid-template-columns: 1.4rem minmax(0, 1fr);
  gap: var(--space-2);
  align-items: start;
  color: var(--muted);
}
.gate-bullets .icon {
  margin-top: 0.15rem;
  color: var(--gold);
}
.gate-showcase {
  box-shadow: 0 0 0 1px var(--scene-line), var(--shadow);
}
.gate-showcase__head { margin-bottom: var(--space-4); }
.gate-showcase__rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(7.5rem, 1fr);
  gap: var(--space-3);
  overflow-x: auto;
  padding-bottom: var(--space-2);
}
.gate-showcase__item {
  margin: 0;
  display: grid;
  gap: var(--space-2);
  justify-items: center;
  padding: var(--space-3);
  border: var(--border-width) solid var(--line-alt, var(--line));
  border-radius: var(--radius);
  background: var(--panel-strong);
}
.gate-showcase__art {
  position: relative;
  width: 5.5rem;
  height: 5.5rem;
}
.gate-showcase__art canvas {
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
}
.gate-showcase__art .egg-token {
  position: absolute;
  right: -0.35rem;
  bottom: -0.2rem;
  width: 1.7rem;
  height: 2.1rem;
}
.gate-showcase__item figcaption {
  color: var(--ink-strong);
  font-size: var(--text-sm);
  font-weight: 600;
}
.gate-bullets--plain li {
  display: block;
  padding-left: 0.9rem;
  position: relative;
}
.gate-bullets--plain li::before {
  content: "·";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--gold);
  font-weight: 700;
}
.gate-sell {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-4);
}
.gate-sell__card {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: var(--space-3);
  align-content: start;
  padding: var(--space-5);
  border: 0;
  box-shadow: 0 0 0 1px var(--scene-line), var(--shadow);
  background:
    linear-gradient(
      155deg,
      color-mix(in srgb, var(--sell-accent, var(--gold)) 18%, transparent),
      color-mix(in srgb, var(--panel-strong) 90%, transparent) 42%
    );
}
.gate-sell__card--catch { --sell-accent: #e08a4a; }
.gate-sell__card--raise { --sell-accent: #6fbf8a; }
.gate-sell__card--village { --sell-accent: #8b7cc9; }
.gate-sell__card::after { content: none; }
.gate-sell__card > * {
  position: relative;
  z-index: 1;
  min-width: 0;
}
.gate-sell__icon {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border: var(--border-width) solid color-mix(in srgb, var(--sell-accent, var(--gold)) 70%, var(--line));
  border-radius: 999px;
  color: color-mix(in srgb, var(--sell-accent, var(--gold)) 85%, var(--ink-strong));
  background: color-mix(in srgb, var(--sell-accent, var(--gold)) 16%, transparent);
}
.gate-sell__icon .icon {
  width: 1.25rem;
  height: 1.25rem;
}
.gate-sell__card h2 { margin: 0; font-size: var(--text-lg); color: var(--ink-strong); }
.gate-sell__card p { margin: 0; color: var(--muted); }
.gate-sell__lead {
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.45;
}
.gate-sell__kicker {
  margin: 0;
  color: var(--gold);
  font-size: var(--text-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
}
.gate-preview {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(18rem, 1.1fr);
  gap: var(--space-6);
  align-items: center;
  box-shadow: 0 0 0 1px var(--scene-line), var(--shadow);
}
.gate-preview__mock {
  display: grid;
  gap: var(--space-3);
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.gate-mock-steward.pixel-frame,
.gate-mock-power.pixel-frame {
  border-radius: 0;
  /* Set: card. */
  --frame-pad: 0.65rem;
  background: var(--wood-plank);
  color: #e8dcc4;
  box-shadow: 0 10px 24px rgb(0 0 0 / 35%);
}
.gate-mock-steward__paper.parchment {
  margin: 0;
}
.gate-mock-steward__top {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr);
  gap: 0.65rem;
  align-items: start;
}
.gate-mock-steward__portrait {
  width: 5.5rem;
  height: 5.5rem;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #1a1008;
}
.gate-mock-steward__portrait canvas {
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  display: block;
}
.gate-mock-steward__who {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.45rem 0.55rem;
  align-items: start;
  min-width: 0;
}
.gate-mock-steward__copy {
  display: grid;
  gap: 0.2rem;
  align-content: start;
  min-width: 0;
}
.gate-mock-steward__name {
  margin: 0;
  color: #2a160c;
  font-weight: 800;
  font-size: 1.05rem;
}
.gate-mock-steward__type {
  margin: 0;
  color: #8a5a14;
  font-size: var(--text-sm);
  font-weight: 600;
}
.gate-mock-steward .growth-badge {
  justify-self: start;
  border: 1px solid var(--line-alt, var(--line-soft));
  background: color-mix(in srgb, var(--accent) 10%, var(--panel-strong));
  color: var(--ink-strong);
  box-shadow: none;
}
.gate-mock-steward .steward__stats {
  justify-self: end;
}
.gate-mock-steward .steward-hyper {
  margin-top: 0.45rem;
}
.gate-preview .pill {
  border-width: var(--border-width);
  border-color: var(--gold);
}
.gate-mock-power .world__power-head {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-2);
  color: #f0e4c8;
  font-size: var(--text-sm);
  font-weight: 700;
}
.gate-mock-power .meta {
  margin: var(--space-2) 0 0;
  color: color-mix(in srgb, #f0e4c8 72%, transparent);
}
.gate-egg {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(20rem, 1.2fr);
  gap: var(--space-6);
  align-items: center;
}
.gate-steps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}
.gate-steps li {
  display: grid;
  grid-template-columns: 2.4rem minmax(0, 1fr);
  gap: var(--space-2) var(--space-3);
  align-items: start;
  padding: var(--space-4);
  border: var(--border-width) solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--panel-strong);
}
.gate-steps li.pixel-frame {
  border: 0;
  border-radius: 0;
  /* Set: card (default pad). */
  background: var(--wood-plank);
  color: #e8dcc4;
  box-shadow: 0 10px 24px rgb(0 0 0 / 35%);
}
.gate-steps li.pixel-frame strong { color: #f6e6c0; }
.gate-steps li.pixel-frame em { color: color-mix(in srgb, #e8dcc4 78%, transparent); }
.gate-steps span {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  border: var(--border-width) solid var(--gold);
  border-radius: 999px;
  color: var(--gold);
  font-weight: 700;
}
.gate-steps span .icon {
  width: 1.15rem;
  height: 1.15rem;
}
.gate-steps strong {
  color: var(--ink-strong);
  font-size: var(--text-lg);
}
.gate-steps em {
  color: var(--muted);
  font-style: normal;
}
.gate-shots__head { margin-bottom: var(--space-4); }
.gate-shots__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-3);
}
.gate-shot {
  margin: 0;
  display: grid;
  gap: var(--space-3);
}
.gate-shot__frame {
  position: relative;
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  border: 2px dashed color-mix(in srgb, var(--gold) 55%, var(--line));
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--accent) 12%, transparent), transparent 55%),
    var(--panel-strong);
  color: var(--muted);
  text-align: center;
  padding: var(--space-4);
  overflow: hidden;
}
.gate-shot__frame--photo {
  border-style: solid;
  border-color: var(--line-alt, var(--line));
  padding: 0;
  background: var(--panel-strong);
  cursor: zoom-in;
  width: 100%;
  font: inherit;
  color: inherit;
}
.gate-shot__frame--photo.pixel-frame {
  border: 0;
  border-radius: 0;
  /* Set: flush (frame-set registry). */
  background: var(--wood-plank);
  box-shadow: 0 10px 24px rgb(0 0 0 / 35%);
  overflow: hidden;
}
.gate-shot__frame--photo.pixel-frame:hover,
.gate-shot__frame--photo.pixel-frame:focus-visible {
  filter: brightness(1.04);
}
.gate-shot__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  border-radius: 2px;
}
.gate-shot__frame--photo.pixel-frame .gate-shot__img {
  /* Keep the photo under the wood rim FX. */
  position: relative;
  z-index: 1;
}
.gate-shot__badge {
  position: absolute;
  top: var(--space-2);
  left: var(--space-2);
  padding: 0.15rem 0.45rem;
  border: var(--border-width) solid var(--gold);
  border-radius: var(--radius-sm);
  color: var(--gold);
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}
.gate-shot figcaption strong {
  display: block;
  margin-bottom: var(--space-2);
  color: var(--ink-strong);
}
.gate-shot figcaption ul {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--muted);
  font-size: var(--text-sm);
}
dialog.modal.modal--shot {
  width: min(56rem, calc(100vw - 1.5rem));
  max-height: min(94vh, 44rem);
}
dialog.modal.modal--shot .modal__panel.pixel-frame {
  background: var(--wood-plank);
  color: #e8dcc4;
  max-height: min(94vh, 44rem);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
dialog.modal.modal--shot .gate-shot-lightbox__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}
dialog.modal.modal--shot .gate-shot-lightbox__caption,
dialog.modal.modal--shot .gate-shot-lightbox__index {
  color: color-mix(in srgb, #e8dcc4 82%, transparent);
}
.gate-shot-lightbox__body {
  display: grid;
  gap: var(--space-3);
}
.gate-shot-lightbox__stage {
  position: relative;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: var(--radius);
  box-shadow: 0 0 0 1px var(--scene-line);
  background: #0a1326;
  overflow: hidden;
}
.gate-shot-lightbox__img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.gate-shot-lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  display: grid;
  place-items: center;
  width: 2.85rem;
  height: 2.65rem;
  padding: 0;
  border: var(--border-width) solid var(--line-alt, var(--line));
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--panel-strong) 88%, transparent);
  color: var(--ink-strong);
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}
.gate-shot-lightbox__nav:hover,
.gate-shot-lightbox__nav:focus-visible {
  border-color: var(--gold);
  color: var(--gold);
}
.gate-shot-lightbox__nav--prev { left: var(--space-2); }
.gate-shot-lightbox__nav--next { right: var(--space-2); }
.gate-shot-lightbox__caption {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--muted);
}
.gate-shot-lightbox__index {
  margin: 0;
  text-align: center;
}
.gate-discord {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(16rem, 0.55fr);
  gap: var(--space-5);
  align-items: center;
}
.gate-discord__callout {
  display: grid;
  gap: var(--space-3);
  padding: var(--space-5);
  border: var(--border-width) solid color-mix(in srgb, var(--accent) 55%, var(--line));
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--accent) 12%, var(--panel-strong));
}
.gate-discord__callout strong {
  color: var(--ink-strong);
  font-size: var(--text-lg);
}
.gate-discord__callout > p {
  margin: 0;
  color: var(--muted);
}
.gate-discord__invite {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  width: fit-content;
  max-width: 100%;
  min-height: 3rem;
  padding: 0.4rem 1rem 0.4rem 0.45rem;
  border: var(--border-width) solid #4752c4;
  border-radius: var(--radius);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: linear-gradient(180deg, #6875f5, #5865f2);
  box-shadow: 0 0.15rem 0 #3c45a5, inset 0 1px 0 rgb(255 255 255 / 18%);
}
.gate-discord__invite:hover {
  border-color: #5b67d8;
  color: #fff;
  text-decoration: none;
  background: linear-gradient(180deg, #7984f7, #6875f5);
  box-shadow: 0 0.1rem 0 #3c45a5, inset 0 1px 0 rgb(255 255 255 / 18%);
}
.gate-discord__invite:active {
  transform: translateY(1px);
  box-shadow: 0 0.05rem 0 #3c45a5, inset 0 1px 0 rgb(255 255 255 / 12%);
}
.gate-discord__invite-egg {
  display: grid;
  place-items: center;
  flex: none;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, #1a1440 70%, #5865f2);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 14%);
}
.gate-discord__invite-egg img {
  display: block;
  width: 1.85rem;
  height: 1.85rem;
  object-fit: contain;
  image-rendering: auto;
}
.gate-discord__invite-copy {
  display: grid;
  gap: 0.1rem;
  min-width: 0;
  text-align: left;
}
.gate-discord__invite-copy em {
  font-style: normal;
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.82;
}
.gate-discord__invite-copy strong {
  font-size: var(--text);
  color: #fff;
}

.page-heading { margin-bottom: var(--space-6); }
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
}
.grid--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card {
  min-width: 0;
  padding: var(--space-2);
  border: var(--border-width) solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}
.card--wide { grid-column: 1 / -1; }
.card--feature {
  border-color: var(--line);
  background: var(--panel-strong);
}
.card > :last-child { margin-bottom: 0; }
.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-4);
}
.actions form { margin: 0; }
/*
 * Button chassis (CSS layers, no extra DOM):
 * 1) outer shell (darker tint of the button style)
 * 2) face plate (main color)
 * 3) seam under face (same shell tone)
 * 4) darker depth / lip plate
 */
/*
 * Universal button · Pixel Quest (steel-strap engine is dormant under ./dormant/).
 * Paint on .btn · .btn__face is a transparent label host only.
 * See shell-btn.css.ts.
 */


.btn,
button.btn {
  --skin-mix: 100%;
  --skin-wash: transparent;
  /* Main colour is green; variants below swap --btn-face. */
  --btn-base: #4caf50;
  --btn-face: var(--btn-base);
  --btn-face-rest: var(--btn-face);
  --btn-paint: var(--btn-face-rest);
  --btn-ink: #f6ffe8;
  --btn-ink-shadow: color-mix(in srgb, var(--btn-face) 30%, #000);
  --control-y: 0.36rem;
  /* Compact sides · matches the pixel chip. */
  --btn-pad-x: 0.62rem;
  --btn-strap-w: 0px;
  /* Lip under the plate (the 8px drop in the Pixel Quest demo, scaled). */
  --btn-depth-idle: 5px;
  --btn-depth-rest: var(--btn-depth-idle);
  /* Hover drops the plate 1px. A click drops it 2px more (3px from rest) and shortens the lip by the same amount. */
  --btn-hover-sink: 1px;
  --btn-depth: var(--btn-depth-rest);
  --btn-drop: calc(var(--btn-depth-rest) - var(--btn-depth));
  --btn-lip: rgba(0, 0, 0, 0.35);
  --btn-outline: color-mix(in srgb, var(--btn-paint) 30%, #000);
  --btn-shell: var(--btn-outline);
  --btn-bevel: 3px;
  /* Neutral stand-ins for the retired iron / wood layers. */
  --btn-nail: linear-gradient(transparent, transparent);
  --btn-strap: linear-gradient(transparent, transparent);
  --btn-strap-alt: linear-gradient(transparent, transparent);
  --btn-grain-a: linear-gradient(transparent, transparent);
  --btn-grain-b: linear-gradient(transparent, transparent);
  --btn-plate: linear-gradient(var(--btn-paint), var(--btn-paint));
  --btn-inset: inset 0 0 0 0 transparent;
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 1.95rem;
  /* Outline is outside the box · keep it off neighbours. */
  margin: 3px 3px var(--btn-depth-rest);
  padding: var(--control-y) var(--btn-pad-x);
  border: 0;
  border-radius: 0;
  background-color: var(--btn-paint);
  background-image: var(--btn-plate);
  background-size: 100% 100%;
  background-position: 0 0;
  background-repeat: no-repeat;
  color: var(--btn-ink);
  font-family: var(--font-pixel), "Press Start 2P", "Courier New", monospace;
  font-size: 0.62rem;
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: 0;
  text-align: center;
  text-decoration: none;
  text-shadow: 2px 2px 0 var(--btn-ink-shadow);
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
  box-shadow:
    0 -3px 0 0 var(--btn-outline),
    0 3px 0 0 var(--btn-outline),
    -3px 0 0 0 var(--btn-outline),
    3px 0 0 0 var(--btn-outline),
    var(--btn-inset),
    inset 0 calc(var(--btn-bevel) * -1) 0 0 rgba(0, 0, 0, 0.28),
    inset 0 var(--btn-bevel) 0 0 rgba(255, 255, 255, 0.3),
    0 calc(var(--btn-depth) + 3px) 0 0 var(--btn-lip);
  transform: translateY(var(--btn-drop));
  transition:
    transform 0.1s steps(3),
    box-shadow 0.1s steps(3),
    background-color 0.1s;
}
/* Legacy highlight layers are not used by the pixel plate. */
.btn::before,
button.btn::before,
.btn::after,
button.btn::after {
  content: none;
  display: none;
}
/*
 * Hover hit bridge: hover and press sink the plate a few px, which vacates a strip along the top edge.
 * A cursor parked there used to fall off, un-hover, rise, re-enter, and flicker. While hovered or pressed,
 * an invisible strip rides above the plate (it moves with it), so the vacated strip stays hoverable.
 * Variants that paint their own ::before keep it (higher specificity) and are unaffected.
 */
.btn:hover::before,
button.btn:hover::before,
.btn:active::before,
button.btn:active::before {
  content: "";
  display: block;
  position: absolute;
  left: 0;
  right: 0;
  top: -6px;
  height: 6px;
  background: transparent;
  pointer-events: auto;
  z-index: 0;
}
.btn:disabled:hover::before,
button.btn:disabled:hover::before,
.btn[aria-disabled="true"]:hover::before {
  content: none;
  display: none;
}
.btn__chip,
.btn > .btn__chip,
button.btn > .btn__chip,
.btn__face.btn__chip,
.btn > .btn__face.btn__chip,
button.btn > .btn__face.btn__chip {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.28rem;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: inherit;
  pointer-events: none;
}
.btn__chip .icon,
.btn__chip svg,
.btn__chip img,
.btn__face.btn__chip .icon,
.btn__face.btn__chip svg,
.btn__face.btn__chip img {
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
  image-rendering: pixelated;
}
.btn__face.btn__chip > .btn__chip {
  display: inline-flex;
  align-items: center;
  gap: inherit;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.btn__face,
.btn > .btn__face,
button.btn > .btn__face {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  flex: 1 1 auto;
  align-self: stretch;
  box-sizing: border-box;
  min-width: 0;
  width: auto;
  border: 0;
  color: inherit;
  font: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  text-decoration: inherit;
  text-shadow: inherit;
  pointer-events: none;
  margin: 0 !important;
  height: auto !important;
  min-height: 0 !important;
  background-image: none !important;
  transform: none !important;
}
.btn--icon > .btn__face,
.btn--icon > .btn__face.btn__chip,
.admin-inv__give-btn.btn > .btn__face,
.admin-inv__give-btn.btn > .btn__face.btn__chip,
.admin-pager__btn > .btn__face,
.admin-pager__btn > .btn__face.btn__chip {
  padding: 0;
  gap: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.btn__face::before,
.btn > .btn__face::before,
button.btn > .btn__face::before {
  content: none !important;
  display: none !important;
}
.btn > *,
.btn__face > * {
  position: relative;
  z-index: 1;
}
.btn .icon,
button.btn .icon,
.btn svg.icon,
button.btn svg.icon,
.btn__face .icon,
.btn__face svg.icon {
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
}
.btn:focus,
.btn:focus-visible,
button.btn:focus,
button.btn:focus-visible {
  outline: none;
}
.btn:focus-visible,
button.btn:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 5px;
}
/* Hover presses in (never grows): lighter plate, lip shrinks. */
.btn:hover,
button.btn:hover {
  --btn-paint: color-mix(in srgb, var(--btn-face-rest) 86%, #fff);
  --btn-depth: calc(var(--btn-depth-rest) - var(--btn-hover-sink));
  text-decoration: none;
}
.btn:active,
button.btn:active {
  --btn-depth: calc(var(--btn-depth-rest) - 3px);
  --btn-bevel: 2px;
}
/* Active / current page · one pixel deeper lip, lighter plate. */
.btn.is-active,
.btn[aria-current="page"],
button.btn.is-active,
a.btn.is-active,
a.btn[aria-current="page"] {
  --btn-depth-rest: calc(var(--btn-depth-idle) + 1px);
  --btn-hover-sink: 1px;
  --btn-paint: color-mix(in srgb, var(--btn-face-rest) 82%, #fff);
}
.btn.is-active:hover,
.btn[aria-current="page"]:hover,
button.btn.is-active:hover,
a.btn.is-active:hover,
a.btn[aria-current="page"]:hover {
  --btn-depth: calc(var(--btn-depth-rest) - var(--btn-hover-sink));
}
.btn__nav-arrow {
  display: inline-block;
  width: 0.42rem;
  height: 0.42rem;
  margin-left: 0.1rem;
  border-right: 2px solid currentColor;
  border-top: 2px solid currentColor;
  transform: rotate(45deg) translate(-1px, 1px);
  flex: 0 0 auto;
  opacity: 0.92;
}

/* Icon-only square. */
.btn--icon {
  --btn-pad-x: 0;
  --btn-depth-idle: 5px;
  width: 2.15rem;
  height: 2.15rem;
  min-height: 0;
  min-width: 2.15rem;
  padding: 0;
  margin-bottom: 0.375rem;
}
/* Header icon toggles · same compact sides as every other button. */
.music-toggle.btn,
.chikonomicon-toggle.btn,
.profile-btn--guest.btn {
  --btn-pad-x: 0.7rem;
  --btn-depth-idle: 5px;
  width: auto;
  height: auto;
  min-width: 2.4rem;
  max-width: none;
  min-height: 2.15rem;
  padding: var(--control-y) var(--btn-pad-x);
  margin-bottom: 0.375rem;
  border-radius: 0;
  aspect-ratio: auto;
}
.btn--pill {
  --btn-pad-x: 0.65rem;
  --btn-depth-idle: 5px;
}

/* Variants only pick a face; outline and bevel follow it. */
.btn.secondary,
button.btn.secondary {
  --btn-face: color-mix(in srgb, var(--bg-elevated) 82%, var(--panel-strong));
  --btn-ink: #fff;
  --btn-ink-shadow: rgba(0, 0, 0, 0.55);
  --btn-outline: color-mix(in srgb, var(--line) 45%, #05060a);
}
.btn.secondary:hover,
button.btn.secondary:hover {
  --btn-paint: color-mix(in srgb, var(--btn-face-rest) 70%, #6a82b0);
  color: var(--btn-ink);
}
.btn--equipped,
button.btn--equipped {
  --btn-face: var(--equip);
  --btn-ink: #fff;
}
.btn--cancel,
button.btn--cancel {
  --btn-face: var(--danger);
  --btn-ink: #fff;
}
.btn--mute,
button.btn--mute {
  --btn-face: #e07068;
  --btn-ink: #fff8f4;
}
.btn--snooze,
button.btn--snooze {
  --btn-face: #7a4ad0;
  --btn-ink: #fff;
}
.btn--gold,
button.btn--gold {
  --btn-face: #f0c048;
  --btn-ink: #fff;
  --btn-ink-shadow: #6a4810;
  --btn-outline: #5a3c0c;
  color: var(--btn-ink);
}
.btn--gold:hover,
button.btn--gold:hover {
  --btn-paint: #ffe078;
}
.btn--go,
button.btn--go {
  --btn-face: #34a046;
  --btn-ink: #fff;
}
.btn--purple,
button.btn--purple {
  --btn-face: #7a48c8;
  --btn-ink: #fff;
  color: var(--btn-ink);
}
.btn[aria-pressed="true"],
.btn[aria-pressed="true"]:hover,
.btn[aria-pressed="true"]:active,
button.btn[aria-pressed="true"],
button.btn[aria-pressed="true"]:hover,
button.btn[aria-pressed="true"]:active {
  --btn-depth: calc(var(--btn-depth-rest) - 4px);
  --btn-paint: var(--btn-face-rest);
  --btn-bevel: 1px;
  --btn-inset: inset 0 3px 0 0 rgba(0, 0, 0, 0.3);
}
.btn--purple[aria-pressed="true"],
button.btn--purple[aria-pressed="true"] {
  --btn-ink: #f4ecff;
}
.btn:disabled,
button.btn:disabled,
.btn[aria-disabled="true"],
button.btn[aria-disabled="true"] {
  --btn-face: #3b475a;
  --btn-ink: color-mix(in srgb, var(--muted) 85%, transparent);
  --btn-ink-shadow: transparent;
  --btn-lip: rgba(0, 0, 0, 0.2);
  --btn-depth: var(--btn-depth-rest);
  cursor: not-allowed;
}
.btn:disabled:hover,
.btn:disabled:active,
button.btn:disabled:hover,
button.btn:disabled:active,
.btn[aria-disabled="true"]:hover,
.btn[aria-disabled="true"]:active {
  --btn-depth: var(--btn-depth-rest);
  --btn-paint: var(--btn-face-rest);
}
.btn--equipped:disabled,
button.btn--equipped:disabled {
  cursor: default;
}
.btn--equipped:disabled:hover,
button.btn--equipped:disabled:hover {
  --btn-face: var(--equip);
  --btn-paint: var(--btn-face-rest);
}

/* Header-scale plate · same box as the profile button. */
.btn.btn--lg,
a.btn.btn--lg,
button.btn.btn--lg {
  --control-y: 0;
  --btn-pad-x: 0;
  width: 2.75rem;
  height: 2.75rem;
  min-width: 2.75rem;
  min-height: 2.75rem;
  margin: 2px 2px var(--btn-depth-rest);
  padding: 0;
  overflow: visible;
}

/* Roster page controls · shorter plate so a row of them fits. */
.btn.btn--page,
button.btn.btn--page {
  --control-y: 0.18rem;
  --btn-pad-x: 0.38rem;
  --btn-depth-idle: 3px;
  min-height: 1.45rem;
  margin: 2px 2px var(--btn-depth-rest);
  font-size: 0.5rem;
  line-height: 1.15;
}

@media (prefers-reduced-motion: reduce) {
  .btn,
  button.btn {
    transition: none;
  }
}

.notice,
.error {
  margin-bottom: var(--space-4);
  padding: var(--space-3) var(--space-4);
  border: var(--border-width) solid var(--line);
  border-radius: var(--radius-sm);
}
.notice { background: var(--notice-bg); }
.error {
  border-color: var(--danger);
  background: var(--danger-bg);
  color: var(--ink-strong);
}



/* Shared stack · desktop top-right; phone centered mid-viewport. */
.toast-stack {
  position: fixed;
  top: calc(var(--header-offset) + var(--space-3));
  right: var(--space-4);
  left: auto;
  z-index: var(--z-toast);
  display: grid;
  gap: var(--space-2);
  width: min(22rem, calc(100vw - var(--space-8)));
  max-width: 100%;
  max-height: calc(100vh - var(--header-offset) - var(--space-6));
  overflow-x: hidden;
  overflow-y: auto;
  pointer-events: none;
  box-sizing: border-box;
  align-content: start;
}
.toast-stack:empty {
  display: none;
}
/*
 * Blur only for sticky / ack toasts (Confirm · Mute · Go To).
 * Countdown-only notices stay out of the way · no page dim.
 */
body:has(> .toast-stack .toast--sticky:not(.toast--quiet))::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: calc(var(--z-toast) - 1);
  background: rgb(2 7 18 / 72%);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  pointer-events: auto;
}
html[data-quality="low"] body:has(> .toast-stack .toast--sticky:not(.toast--quiet))::before {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  background: rgb(2 7 18 / 82%);
}
.toast-host {
  position: relative;
  top: auto;
  right: auto;
  left: auto;
  transform: none;
  z-index: auto;
  display: grid;
  gap: var(--space-2);
  width: 100%;
  max-width: 100%;
  pointer-events: none;
  box-sizing: border-box;
}
/*
 * SSR / soft-nav toasts land inside #main before hoist.
 * Keep them fixed (never a full-width page banner under the site header).
 */
#main .toast-host,
.page .toast-host,
body > .toast-host {
  position: fixed;
  top: calc(var(--header-offset) + var(--space-3));
  right: var(--space-4);
  left: auto;
  z-index: var(--z-toast);
  width: min(22rem, calc(100vw - var(--space-8)));
  max-width: 100%;
  margin: 0;
}
.toast-stack .toast-host {
  position: relative;
  top: auto;
  right: auto;
  left: auto;
  z-index: auto;
  width: 100%;
}
.toast {
  pointer-events: auto;
  position: relative;
  display: grid;
  gap: 0;
  width: 100%;
  margin: 0;
  text-align: left;
  font: inherit;
  line-height: 1.4;
  overflow: hidden;
  animation: toast-in 0.22s ease-out;
}
/* Auto countdown toasts · whole plate is the dismiss hit target. */
.toast:not(.toast--sticky) {
  cursor: pointer;
}
.toast.toast--sticky {
  cursor: default;
}
/* Wood toast · same pixel-frame + plank bed as modals (canvas paints v2 rim). */
.toast.toast--wood {
  /* Equal rim inset · scene / panel / X share one seamless pad. */
  /* Set: flush (frame-set registry). */
  border: 0;
  border-radius: 0;
  background: var(--slate-window);
  color: #f0e2c4;
  box-shadow: 0 10px 24px rgb(0 0 0 / 40%);
}
.toast__panel {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0.55rem;
  min-width: 0;
  padding: 0.35rem 0.45rem 0.45rem;
  box-sizing: border-box;
}
.toast__x.modal__close {
  position: absolute;
  /* Clear painted wood rim · sit in the content well. */
  top: var(--frame-close-top);
  /* 2px further left so the gap to the right rim matches the gap above. */
  right: calc(var(--frame-close-right) + 2px);
  z-index: 8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 0;
}
.toast__x .modal__close-x {
  display: block;
  width: 14px;
  height: 14px;
  margin: 0;
  font-size: 0;
  line-height: 0;
}
/* Auto toasts also get X · keep panel clear of the close hit target. */
.toast:not(.toast--sticky) .toast__panel {
  padding-right: 2.1rem;
}
.toast__scene {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 4.5rem;
  margin: 0;
  border-radius: 0;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  box-shadow: inset 0 -12px 18px rgb(0 0 0 / 35%);
}
.toast.toast--scene .toast__panel {
  padding-top: 0.55rem;
}
.toast__body--centered {
  text-align: center;
  justify-items: center;
}
.toast__body--centered .toast__title {
  text-align: center;
}
.toast__fall {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}
.toast__fall img {
  position: absolute;
  top: -1.8rem;
  width: 1.15rem;
  height: 1.15rem;
  opacity: 0.85;
  animation: toast-fall 4.5s linear infinite;
}
.toast__fall img:nth-child(1) { left: 10%; animation-delay: -1s; }
.toast__fall img:nth-child(2) { left: 35%; animation-delay: -3s; }
.toast__fall img:nth-child(3) { left: 62%; animation-delay: -2s; }
.toast__fall img:nth-child(4) { left: 88%; animation-delay: -4s; }
@keyframes toast-fall {
  to { translate: 1.25rem 22rem; rotate: 280deg; }
}
@media (prefers-reduced-motion: reduce) {
  .toast__fall img { animation: none !important; }
}
.toast__body {
  display: grid;
  gap: 0.35rem;
  width: 100%;
  margin: 0;
  padding: 0.15rem 0.2rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  font: inherit;
  line-height: 1.35;
}
.toast__title {
  display: block;
  font-family: var(--font-display, Literata, Georgia, serif);
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: #fff4d8;
  text-shadow: 0 1px 0 #1a1008;
}
.toast__hint {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: color-mix(in srgb, #f0e2c4 70%, #8a7a62);
}
.toast__stamps {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}
.toast__foot {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.4rem;
  padding: 0.1rem 0 0.15rem;
}
.toast--sticky .toast__timer { display: none; }
/* Ack hold · OK + 1:00 clock (objectives / achievements claimed). */
.toast.toast--ack {
  cursor: default;
}
.toast-stack:has(.toast--ack) {
  width: min(28rem, calc(100vw - var(--space-8)));
}
.toast__hold-clock {
  position: absolute;
  top: calc(var(--frame-close-top, 10px) + 0.1rem);
  left: calc(var(--frame-close-right, 10px) + 0.15rem);
  z-index: 8;
  padding: 0.12rem 0.35rem;
  border-radius: 0.2rem;
  border: 1px solid rgb(214 180 94 / 45%);
  background: rgb(12 8 4 / 72%);
  color: #f0e2c4;
  font-family: var(--font-mono, ui-monospace, Menlo, Consolas, monospace);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}
.toast.toast--ack .toast__panel {
  padding-top: 0.55rem;
}
.toast.toast--ack .toast__body--reward {
  gap: 0.45rem;
}
.toast.toast--ack .earn-stage__sec {
  margin: 0.35rem 0 0.25rem;
  font-size: 0.72rem;
}
.toast.toast--ack .earn-stage__grid {
  gap: 0.35rem;
}
/* Claimed ack · one slate well, coin chip on top, one row per achievement / objective. */
.ack-list {
  display: grid;
  gap: 0.4rem;
  width: 100%;
  box-sizing: border-box;
  padding: 0.6rem 0.65rem;
  background: var(--slate-well);
  box-shadow: inset 0 0 0 1px #0c1218, inset 0 2px 8px rgb(0 0 0 / 45%);
}
.ack-chip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding-bottom: 0.2rem;
  color: #e8eef6;
  font-size: 0.82rem;
}
.ack-chip .icon,
.ack-chip svg,
.ack-chip img {
  width: 1.5rem;
  height: 1.5rem;
}
.ack-chip strong {
  color: #ffe28a;
  font-family: var(--font-display);
  font-size: 1.25rem;
  text-shadow: 0 1px 0 #000;
}
.ack-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.4rem 0.6rem;
  background: rgb(8 12 18 / 55%);
  border: 1px solid #2a3a4e;
}
.ack-row__mark {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 1.3rem;
  height: 1.3rem;
  color: #ffd45c;
}
.ack-row__mark svg,
.ack-row__mark .icon {
  width: 100%;
  height: 100%;
}
.ack-row__mark--check {
  color: #6fe09a;
  font-weight: 800;
}
.ack-row__name {
  min-width: 0;
  color: #f0e2c4;
  font-family: var(--font-display);
  font-size: 0.95rem;
  text-shadow: 0 1px 0 #000;
}



/* Hold CSS motion until scene-ready.js has the images. The veil spinner stays live. */
html[data-media-ready="0"] body,
html[data-media-ready="0"] body *,
html[data-media-ready="0"] body *::before,
html[data-media-ready="0"] body *::after {
  animation-play-state: paused !important;
}
html[data-media-ready="0"] .scene-veil,
html[data-media-ready="0"] .scene-veil::before,
html[data-media-ready="0"] .scene-veil *,
html[data-media-ready="0"] .toast,
html[data-media-ready="0"] .toast::before,
html[data-media-ready="0"] .toast::after,
html[data-media-ready="0"] .toast * {
  animation-play-state: running !important;
}
[data-scene-pos-fix="1"] { position: relative; }
.scene-veil {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: grid;
  place-items: center;
  background: rgb(6 4 8 / 62%);
  backdrop-filter: blur(8px);
  pointer-events: none;
}
.scene-veil__spin {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  border: 2px solid rgb(243 207 116 / 28%);
  border-top-color: var(--gold, #e0b050);
  animation: scene-veil-spin 0.8s linear infinite;
}
@keyframes scene-veil-spin { to { transform: rotate(1turn); } }
@media (prefers-reduced-motion: reduce) {
  .scene-veil { backdrop-filter: none; }
  .scene-veil__spin { animation: none; }
}
/* Freeze decorative CSS loops while idle-pause is on (canvas rAF uses the same flag). */
html[data-idle-pause="1"] .incubator-bay__equipped-tag::after,
html[data-idle-pause="1"] .activity-card__claim--ready,
html[data-idle-pause="1"] .activity-card__timer--ready .activity-card__timer-fill {
  animation-play-state: paused !important;
}
/*
 * Freeze every CSS loop under the blur (Settings or dialog).
 * animation-play-state inherits · body pause catches scenic hens, walk
 * headers, offerings, etc. without maintaining a selector laundry list.
 * Open dialogs + Settings board keep their own motion.
 */
html[data-modal-pause="1"] body {
  animation-play-state: paused;
}
html[data-modal-pause="1"] .profile-drop.open,
html[data-modal-pause="1"] dialog.modal[open] {
  animation-play-state: running;
}
/* Keep Lodge cards visible under the scrim · only pause their motion (not layout). */
html[data-modal-pause="1"] dialog.modal[open] .pixel-frame__fx,
html[data-modal-pause="1"] dialog.modal[open] .pixel-frame__fx *,
html[data-modal-pause="1"] dialog.modal[open] .start-confirm__fx,
html[data-modal-pause="1"] dialog.modal[open] .start-confirm__fx *,
html[data-modal-pause="1"] dialog.modal[open] .coop-wheel__bulb,
html[data-modal-pause="1"] dialog.modal[open] .coop-wheel__chick,
html[data-modal-pause="1"] dialog.modal[open] .fp-meter__sheen,
html[data-modal-pause="1"] dialog.modal[open] .fp-meter__fill,
html[data-modal-pause="1"] dialog.modal[open] .fp-meter__fill *,
html[data-modal-pause="1"] dialog.modal[open] .btn__face::before,
html[data-modal-pause="1"] dialog.modal[open] button.btn .btn__face::before {
  animation-play-state: running !important;
}
/*
 * Nested popup (Claimed over Check-in) · freeze under-dialog vines only.
 * Wheel chase bulbs / chick stay live on the check-in layer.
 */
html[data-nested-modal="1"] dialog.modal[open] .pixel-frame__fx,
html[data-nested-modal="1"] dialog.modal[open] .pixel-frame__fx *,
html[data-nested-modal="1"] dialog.modal[open] .start-confirm__fx,
html[data-nested-modal="1"] dialog.modal[open] .start-confirm__fx * {
  animation-play-state: paused !important;
}
html[data-nested-modal="1"] dialog.modal[open] .coop-wheel__bulb,
html[data-nested-modal="1"] dialog.modal[open] .coop-wheel__chick {
  animation-play-state: running !important;
}
html[data-nested-modal="1"] .coop-wheel-modal.is-open .pixel-frame__fx,
html[data-nested-modal="1"] .coop-wheel-modal.is-open .pixel-frame__fx * {
  animation-play-state: running !important;
}
.toast__body--static {
  cursor: default;
}
/* Unlock submit · single earn-slot card (no modal header / category). */
.toast__body--reward {
  justify-items: center;
  text-align: center;
  gap: 0.55rem;
}
.toast__body--reward .earn-slot {
  width: min(9.5rem, 100%);
  max-width: 9.5rem;
}
.toast__body--reward .toast__hint {
  max-width: 14rem;
}
.toast__close {
  min-height: 2rem;
  padding: 0.28rem 0.85rem;
  font-size: 0.78rem;
}
.toast__copy {
  margin: 0;
  padding: 0.28rem 0.7rem;
  border: 1px solid #5a3c24;
  border-radius: 0;
  background: rgb(36 24 14 / 78%);
  color: #f0e0b8;
  font: inherit;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.toast__copy:hover {
  border-color: color-mix(in srgb, var(--gold) 55%, #5a3c24);
  color: var(--gold);
  background: rgb(48 32 16 / 88%);
}
.toast__timer {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 8px;
  z-index: 6;
  height: 0.22rem;
  background: rgb(20 12 6 / 65%);
  pointer-events: none;
}
.toast__timer-fill {
  display: block;
  width: 100%;
  height: 100%;
  transform-origin: left center;
  background: linear-gradient(90deg, #f3d98a, var(--gold, #e0b050));
  transform: scaleX(1);
}
.toast.is-paused .toast__timer-fill {
  filter: brightness(0.85);
}
.toast--ok .toast__timer-fill {
  background: linear-gradient(90deg, #b8e0c0, var(--ok, #8fb9a4));
}
.toast--error .toast__timer-fill {
  background: linear-gradient(90deg, #e0a090, var(--danger, #ca7b76));
}
.toast--notice .toast__timer-fill {
  background: linear-gradient(90deg, #f3d98a, var(--gold, #e0b050));
}
.toast--leaving {
  opacity: 0;
  transform: translateY(-0.35rem);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
@keyframes toast-in {
  from { opacity: 0; transform: translateY(-0.4rem); }
  to { opacity: 1; transform: translateY(0); }
}
.badge,
.placeholder-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: var(--space-1) var(--space-2);
  border: var(--border-width) solid var(--line);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  color: var(--muted);
  font-size: var(--text-xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.badge--locked {
  border-color: var(--danger);
  background: var(--danger-bg);
  color: var(--danger);
  margin-bottom: 0;
}
.badge--pct {
  border-color: color-mix(in srgb, var(--pct) 55%, var(--line));
  background: var(--pct-bg);
  color: var(--pct);
  margin-bottom: 0;
  text-transform: none;
  letter-spacing: 0.02em;
}
.placeholder-badge { margin-top: var(--space-2); }
.pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 0.1rem 0.45rem;
  border: var(--border-width) solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.4;
  vertical-align: middle;
}
.pill--accent {
  border-color: color-mix(in srgb, var(--ok) 45%, var(--line));
  background: color-mix(in srgb, var(--ok) 12%, transparent);
  color: var(--ink-strong);
}
.pill--alt {
  border-color: var(--line-alt, var(--line));
  background: color-mix(in srgb, var(--line-alt, var(--line)) 14%, transparent);
  color: var(--ink-strong);
}
.meter {
  width: 100%;
  height: 0.625rem;
  border: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--line-soft);
}
.meter::-webkit-progress-bar { background: var(--line-soft); }
.meter::-webkit-progress-value { background: var(--ok); }
.meter::-moz-progress-bar { background: var(--ok); }



/* Plasma Arc skill XP (experience_bars.html) · hue via data-skill. */
.meter.meter--plasma {
  position: relative;
  height: 0.85rem;
  border: 1px solid color-mix(in srgb, var(--plasma-mid, #22c55e) 45%, #111);
  background:
    #0a0a0a
    repeating-linear-gradient(
      -45deg,
      color-mix(in srgb, var(--plasma-mid, #eab308) 10%, transparent) 0 10px,
      transparent 10px 20px
    );
  box-shadow: inset 0 0 18px color-mix(in srgb, var(--plasma-glow, #eab308) 10%, transparent);
  --plasma-deep: #14532d;
  --plasma-mid: #22c55e;
  --plasma-hot: #06b6d4;
  --plasma-spark: #a3e635;
  --plasma-glow: #a3e635;
}
.meter.meter--plasma .meter__fill {
  position: absolute;
  inset: 0 auto 0 0;
  height: 100%;
  background:
    radial-gradient(ellipse at 25% 50%, color-mix(in srgb, var(--plasma-spark) 55%, transparent) 0%, transparent 55%),
    radial-gradient(ellipse at 75% 50%, color-mix(in srgb, var(--plasma-hot) 35%, transparent) 0%, transparent 50%),
    linear-gradient(
      90deg,
      var(--plasma-deep) 0%,
      var(--plasma-mid) 20%,
      var(--plasma-hot) 45%,
      var(--plasma-spark) 70%,
      var(--plasma-deep) 100%
    );
  background-size: 100% 100%, 100% 100%, 280% 100%;
  animation: plasma-surge 7s ease-in-out infinite, plasma-flicker 2.5s ease-in-out infinite;
  box-shadow:
    inset 0 0 20px color-mix(in srgb, var(--plasma-spark) 25%, transparent),
    0 0 16px color-mix(in srgb, var(--plasma-hot) 20%, transparent);
  overflow: hidden;
}
.meter.meter--plasma .meter__fill::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(color-mix(in srgb, var(--plasma-spark) 45%, transparent) 1.5px, transparent 1.5px);
  background-size: 14px 14px;
  animation: plasma-bubbles 5s linear infinite;
  opacity: 0.5;
  mix-blend-mode: screen;
}
.meter.meter--plasma[data-skill="farming"],
.meter.meter--plasma[data-skill="exploration"],
.meter.meter--plasma[data-skill="gathering"] {
  --plasma-deep: #14532d;
  --plasma-mid: #22c55e;
  --plasma-hot: #86efac;
  --plasma-spark: #a3e635;
  --plasma-glow: #4ade80;
}
.meter.meter--plasma[data-skill="crafting"],
.meter.meter--plasma[data-skill="cooking"] {
  --plasma-deep: #7c2d12;
  --plasma-mid: #ea580c;
  --plasma-hot: #fbbf24;
  --plasma-spark: #fdba74;
  --plasma-glow: #f59e0b;
}
.meter.meter--plasma[data-skill="stewardship"],
.meter.meter--plasma[data-skill="hacking"] {
  --plasma-deep: #4c1d95;
  --plasma-mid: #8b5cf6;
  --plasma-hot: #22d3ee;
  --plasma-spark: #c4b5fd;
  --plasma-glow: #a78bfa;
}
.meter.meter--plasma[data-skill="tree_cutting"] {
  --plasma-deep: #1a2e05;
  --plasma-mid: #65a30d;
  --plasma-hot: #a3e635;
  --plasma-spark: #d9f99d;
  --plasma-glow: #84cc16;
}
.meter.meter--plasma[data-skill="fire_making"] {
  --plasma-deep: #7f1d1d;
  --plasma-mid: #ef4444;
  --plasma-hot: #fb923c;
  --plasma-spark: #fde047;
  --plasma-glow: #f97316;
}
.meter.meter--plasma[data-skill="mining"],
.meter.meter--plasma[data-skill="smithing"] {
  --plasma-deep: #1e293b;
  --plasma-mid: #64748b;
  --plasma-hot: #38bdf8;
  --plasma-spark: #e2e8f0;
  --plasma-glow: #94a3b8;
}
.meter.meter--plasma[data-skill="smelting"] {
  --plasma-deep: #7c2d12;
  --plasma-mid: #f97316;
  --plasma-hot: #facc15;
  --plasma-spark: #fff7ed;
  --plasma-glow: #fb923c;
}
.meter.meter--plasma[data-skill="strength"] {
  --plasma-deep: #7f1d1d;
  --plasma-mid: #dc2626;
  --plasma-hot: #f87171;
  --plasma-spark: #fecaca;
  --plasma-glow: #ef4444;
}
.meter.meter--plasma[data-skill="fishing"] {
  --plasma-deep: #0c4a6e;
  --plasma-mid: #0ea5e9;
  --plasma-hot: #67e8f9;
  --plasma-spark: #a5f3fc;
  --plasma-glow: #38bdf8;
}
@keyframes plasma-surge {
  0%, 100% { background-position: 0 0, 0 0, 0% 50%; }
  50% { background-position: 0 0, 0 0, 100% 50%; }
}
@keyframes plasma-flicker {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.12); }
}
@keyframes plasma-bubbles {
  0% { background-position: 0 0; }
  100% { background-position: 0 -14px; }
}
/* Nebula Pulse meter (same family as Ancient Egg EP · purple / blue / pink). */
.meter.meter--cloud,
.meter.meter--nebula {
  position: relative;
  height: 1.6rem;
  border-radius: 0;
  border: 1px solid rgba(129, 140, 248, 0.28);
  background:
    radial-gradient(ellipse at 20% 50%, rgba(88, 28, 135, 0.22) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 30%, rgba(59, 130, 246, 0.12) 0%, transparent 50%),
    #080612;
  box-shadow: inset 0 0 28px rgba(0, 0, 0, 0.95), inset 0 0 50px rgba(129, 140, 248, 0.08);
  overflow: hidden;
}
.meter.meter--cloud .meter__fill,
.meter.meter--nebula .meter__fill {
  position: absolute;
  inset: 0 auto 0 0;
  height: 100%;
  background: linear-gradient(90deg, #1e1b4b, #312e81, #4f46e5, #a78bfa, #f0abfc, #818cf8, #1e1b4b);
  background-size: 320% 100%;
  filter: none;
  animation: nebula-flow 5s ease-in-out infinite, nebula-brightness 3.2s ease-in-out infinite;
  box-shadow: 0 0 40px rgba(167, 139, 250, 0.45), inset 0 -10px 24px rgba(0, 0, 0, 0.45);
}
.meter.meter--cloud .meter__fill::before,
.meter.meter--nebula .meter__fill::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(rgba(255, 255, 255, 0.9) 1px, transparent 1px),
    radial-gradient(rgba(244, 114, 182, 0.55) 1px, transparent 1px);
  background-size: 38px 38px, 62px 62px;
  background-position: 0 0, 19px 31px;
  opacity: 0.35;
  mix-blend-mode: screen;
  animation: nebula-stars 8s linear infinite;
}
@media (prefers-reduced-motion: reduce) {
  .meter.meter--cloud .meter__fill,
  .meter.meter--nebula .meter__fill,
  .meter.meter--cloud .meter__fill::before,
  .meter.meter--nebula .meter__fill::before {
    animation: none;
    filter: none;
  }
}
html:not([data-full-quality="1"]) .meter.meter--plasma .meter__fill,
html:not([data-full-quality="1"]) .meter.meter--plasma .meter__fill::before,
html:not([data-full-quality="1"]) .meter.meter--cloud .meter__fill,
html:not([data-full-quality="1"]) .meter.meter--nebula .meter__fill,
html:not([data-full-quality="1"]) .meter.meter--cloud .meter__fill::before,
html:not([data-full-quality="1"]) .meter.meter--nebula .meter__fill::before {
  animation: none !important;
}
html:not([data-full-quality="1"]) .meter.meter--cloud .meter__fill,
html:not([data-full-quality="1"]) .meter.meter--nebula .meter__fill {
  filter: none;
}
@keyframes nebula-flow {
  0%, 100% { background-position: 100% 50%; }
  50% { background-position: 0% 50%; }
}
@keyframes nebula-brightness {
  0%, 100% { filter: brightness(0.55) saturate(1.2); }
  35% { filter: brightness(1.05) saturate(1.35); }
  65% { filter: brightness(1.45) saturate(1.5); }
}
@keyframes nebula-stars {
  0% { opacity: 0.25; }
  50% { opacity: 0.5; }
  100% { opacity: 0.25; }
}
.stack { display: grid; gap: var(--space-3); }
.section-title {
  margin: var(--space-5) 0 var(--space-2);
  font-size: var(--text-sm);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.skill {
  display: grid;
  grid-template-columns: minmax(7rem, 9rem) minmax(6rem, 1fr) auto;
  gap: var(--space-3);
  align-items: center;
}
.skill-label {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.skill-icon {
  display: block;
  image-rendering: pixelated;
}
.visual-asset,
.visual-banner,
.asset-row {
  position: relative;
  margin: 0 0 var(--space-3);
}
.visual-asset canvas { image-rendering: pixelated; }
.visual-asset--preview { opacity: 0.72; }
.visual-asset--lazy .portrait-slot {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 4rem;
  background: rgb(0 0 0 / 18%);
}
.visual-asset--chickling {
  display: grid;
  place-items: end center;
}
.visual-asset--chickling canvas,
.visual-asset--chickling .portrait-slot {
  width: 34%;
  height: auto;
  margin: 0 auto 8%;
  box-sizing: border-box;
}
.visual-asset--chickling .portrait-slot {
  aspect-ratio: 1;
  min-height: 0;
  border-radius: 2px;
}
.chikling-baby {
  cursor: pointer;
  transform-origin: 50% 100%;
}
.chikling-baby--idle {
  animation: chikling-baby-idle 1.35s ease-in-out infinite;
}
.chikling-baby--idle.chikling-baby--hue-idle {
  animation:
    chikling-baby-idle 1.35s ease-in-out infinite,
    chikling-baby-hue 4s linear infinite;
}
.chikling-baby--hop {
  animation: chikling-baby-hop 0.7s ease-out;
}
.chikling-baby--hop.chikling-baby--hue {
  animation: chikling-baby-hop 0.7s ease-out, chikling-baby-hue 1.4s linear;
}
@keyframes chikling-baby-idle {
  0%, 100% { transform: translateY(0) scale(1, 1); }
  40% { transform: translateY(-0.28rem) scale(0.985, 1.02); }
  70% { transform: translateY(-0.08rem) scale(1.02, 0.98); }
}
@keyframes chikling-baby-hop {
  0% { transform: translateY(0) scale(1, 1); }
  20% { transform: translateY(0) scale(1.06, 0.92); }
  50% { transform: translateY(-1.1rem) scale(0.96, 1.05); }
  80% { transform: translateY(0) scale(1.06, 0.92); }
  100% { transform: none; }
}
@keyframes chikling-baby-hue {
  to { filter: hue-rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
  .chikling-baby--idle,
  .chikling-baby--idle.chikling-baby--hue-idle,
  .chikling-baby--hop,
  .chikling-baby--hop.chikling-baby--hue { animation: none; }
}
html:not([data-full-quality="1"]) .chikling-baby--idle,
html:not([data-full-quality="1"]) .chikling-baby--idle.chikling-baby--hue-idle,
html:not([data-full-quality="1"]) .chikling-baby--hop,
html:not([data-full-quality="1"]) .chikling-baby--hop.chikling-baby--hue,
html:not([data-full-quality="1"]) .rim {
  animation: none !important;
}
.visual-banner { display: block; max-width: 100%; }
.visual-banner img,
.visual-asset img,
.visual-asset canvas,
.asset-row img {
  display: block;
  max-width: 100%;
  height: auto;
  border: var(--border-width) solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: var(--panel-strong);
  image-rendering: pixelated;
}
.asset-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4);
}
.asset-row p { flex: 1 1 12rem; margin: 0; }
.world-scene {
  display: grid;
  grid-template-columns: minmax(10rem, 0.8fr) minmax(12rem, 1.2fr);
  gap: var(--space-4);
  align-items: center;
}
.world-scene .visual-banner { margin: 0; }



/* Static wooden pixel cursors · Timber set injected by wood-cursor.js. */
.fx-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;
}
#wood-cursor-layer {
  display: none;
}
@media (max-width: 56rem) {
  .grid--three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gate-egg,
  .gate-discord,
  .gate-preview { grid-template-columns: 1fr; }
  .gate-fun__grid,
  .gate-shots__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1000px) {
  .toast-stack {
    top: calc(var(--header-offset) + var(--space-3));
    right: var(--space-3);
    left: auto;
    transform: none;
    width: min(19rem, calc(100% - 1.75rem));
    max-height: min(70vh, calc(100vh - 4rem));
    align-content: start;
  }
}
@media (max-width: 45rem) {
  /* Logged-out landing · stacked grid, no hero/copy/egg overlap. */
  .site-layout--gate {
    width: min(100% - 1.25rem, var(--content-w));
  }
  .site-layout--gate .page {
    padding-top: var(--space-3);
    padding-inline: 0;
    overflow-x: clip;
  }
  .gate-page {
    display: grid;
    gap: var(--space-4);
    padding-bottom: var(--space-8);
    min-width: 0;
  }
  .gate-hero {
    display: grid;
    grid-template-rows: minmax(12.5rem, 42vw) auto;
    aspect-ratio: auto;
    min-height: 0;
    max-width: 100%;
  }
  .gate-hero .world__stage {
    position: relative;
    inset: auto;
    min-height: 12.5rem;
    overflow: hidden;
  }
  .gate-hero .world__stage::after {
    background: linear-gradient(180deg, transparent 40%, var(--scene-shade) 92%);
  }
  .gate-hero .world__egg {
    left: 50%;
    bottom: 12%;
    width: clamp(5.25rem, 34vw, 8.5rem);
  }
  .gate-hero .world__shimmer {
    left: 18%;
    right: 18%;
    bottom: 2%;
  }
  .gate-hero__content {
    position: relative;
    left: auto;
    right: auto;
    top: auto;
    bottom: auto;
    z-index: 3;
    display: grid;
    gap: var(--space-2);
    align-content: start;
    justify-items: stretch;
    text-align: left;
    padding: var(--space-4) var(--space-3) var(--space-3);
    background: color-mix(in srgb, var(--scene-shade) 92%, transparent);
  }
  .gate-hero__content h1 {
    font-size: clamp(1.65rem, 7vw, 2.1rem);
    letter-spacing: 0.08em;
  }
  .gate-hero__content .lead {
    max-width: none;
    font-size: var(--text-base);
  }
  .gate-hero__content .actions {
    width: 100%;
  }
  .gate-hero__content .actions .btn {
    width: 100%;
    justify-content: center;
  }
  .gate-story {
    gap: var(--space-4);
    min-width: 0;
  }
  .gate-sell { grid-template-columns: 1fr; }
  .gate-egg,
  .gate-preview,
  .gate-discord {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }
  .gate-showcase__rail {
    display: grid;
    grid-auto-flow: row;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-columns: unset;
    overflow: visible;
    padding-bottom: 0;
  }
  .gate-showcase__item {
    min-width: 0;
  }
  .gate-showcase__art .egg-token {
    right: 0;
    bottom: 0;
  }
  .gate-mock-steward__top {
    grid-template-columns: 4.25rem minmax(0, 1fr);
  }
  .gate-mock-steward__portrait {
    width: 4.25rem;
    height: 4.25rem;
  }
  .gate-mock-steward__who {
    grid-template-columns: minmax(0, 1fr);
  }
  .gate-mock-steward .steward__stats {
    justify-self: start;
  }
  .gate-steps,
  .gate-fun__grid,
  .gate-shots__grid { grid-template-columns: 1fr; }
  .gate-intro,
  .gate-egg,
  .gate-discord,
  .gate-showcase,
  .gate-preview,
  .gate-shots { padding: var(--space-4); min-width: 0; }
  .gate-intro p:not(.gate-sell__kicker),
  .gate-showcase p:not(.gate-sell__kicker),
  .gate-preview p:not(.gate-sell__kicker),
  .gate-shots p:not(.gate-sell__kicker),
  .gate-egg > div > p:not(.gate-sell__kicker):not(.meta) {
    max-width: none;
    font-size: var(--text-base);
  }
  .hero {
    min-height: calc(100vh - var(--header-offset) - var(--space-6));
  }
  .hero__content { padding: var(--space-8) var(--space-4); }
  .hero h1 { letter-spacing: 0.07em; }
  .grid,
  .grid--three { grid-template-columns: 1fr; }
  .studio-grid { grid-template-columns: 1fr; }
  .skill { grid-template-columns: 1fr auto; }
  .skill .meter { grid-column: 1 / -1; grid-row: 2; }
}



/* Village forecast · left aside when logged in with weather. */
.site-layout.site-layout--with-aside {
  display: grid;
  grid-template-columns: minmax(12.5rem, 15.5rem) minmax(0, 1fr);
  gap: var(--space-4);
  align-items: start;
}
.site-aside {
  position: sticky;
  top: calc(var(--header-offset) + var(--space-2));
  z-index: 2;
}
.site-main-col {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}
/* Village forecast · wood frame (demo v5 · live codes only). */
.wx-forecast {
  --accent: #c4a858;
  --fill-a: #8a7040;
  --fill-b: #d4b060;
  --wood-1: #6b4426;
  --wood-2: #55341c;
  --wood-3: #3b2412;
  --wood-hi: #8a5c36;
  --wood-lo: #24150a;
  --brass: #d6b45e;
  --brass-dk: #8a6a28;
  --cream: #f4e8c8;
  --wx-h: 18.5rem;
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='130'%3E%3Cfilter id='g' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.012 0.32' numOctaves='3' seed='7'/%3E%3CfeColorMatrix values='0 0 0 0 0.10  0 0 0 0 0.05  0 0 0 0 0.02  1.5 0 0 0 -0.45'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 16rem;
  height: var(--wx-h);
  margin: var(--space-3) 0 0;
  padding: 9px;
  border-radius: 5px;
  color: #e8dcc0;
  background:
    var(--grain),
    linear-gradient(180deg, var(--wood-hi) 0%, var(--wood-1) 8%, var(--wood-2) 60%, var(--wood-3) 100%);
  border: 1px solid var(--wood-lo);
  box-shadow:
    inset 0 1px 0 rgba(255, 220, 170, 0.28),
    inset 0 -2px 0 rgba(0, 0, 0, 0.45),
    0 0.6rem 1.4rem rgba(2, 8, 18, 0.5);
}
.wx-forecast::before {
  content: "";
  position: absolute;
  inset: 2px;
  pointer-events: none;
  z-index: 3;
  background:
    radial-gradient(circle at 50% 40%, #e8d49a 0 1px, var(--brass-dk) 2px, transparent 2.6px) 0 0 / 5px 5px no-repeat,
    radial-gradient(circle at 50% 40%, #e8d49a 0 1px, var(--brass-dk) 2px, transparent 2.6px) 100% 0 / 5px 5px no-repeat,
    radial-gradient(circle at 50% 40%, #e8d49a 0 1px, var(--brass-dk) 2px, transparent 2.6px) 0 100% / 5px 5px no-repeat,
    radial-gradient(circle at 50% 40%, #e8d49a 0 1px, var(--brass-dk) 2px, transparent 2.6px) 100% 100% / 5px 5px no-repeat;
}
.wx-forecast--clear { --accent: #c4a858; --fill-a: #8a7040; --fill-b: #d4b060; }
.wx-forecast--wind { --accent: #9cc0c8; --fill-a: #4a7a80; --fill-b: #9cd0c8; }
.wx-forecast--heat { --accent: #f0643a; --fill-a: #8a1c10; --fill-b: #fa9a44; }
.wx-forecast--blizzard,
.wx-forecast--frost { --accent: #c8e0f0; --fill-a: #4a7088; --fill-b: #d4eefa; }
.wx-forecast--rain { --accent: #7aa8d0; --fill-a: #3a6a8a; --fill-b: #8ac0e8; }
.wx-forecast--forced {
  box-shadow:
    inset 0 1px 0 rgba(255, 220, 170, 0.28),
    inset 0 -2px 0 rgba(0, 0, 0, 0.45),
    0 0 0 1px #c47838,
    0 0.6rem 1.4rem rgba(2, 8, 18, 0.5);
}
.wx-forecast__admin-reset {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  z-index: 6;
  margin: 0;
}
.wx-forecast__reset-btn.btn {
  --btn-pad-x: 0.7rem;
  --btn-depth-rest: 4px;
  min-height: 1.65rem;
  margin: 0;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
}
.wx-forecast__admin-reset {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  z-index: 6;
  margin: 0;
}
.wx-forecast__reset-btn.btn {
  --btn-pad-x: 0.7rem;
  --btn-depth-rest: 4px;
  min-height: 1.65rem;
  margin: 0;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
}
.wx-forecast__inner {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  overflow: hidden;
  border-radius: 2px;
  border: 1px solid #1a0e06;
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent),
    inset 0 6px 14px rgba(0, 0, 0, 0.55);
  background: #101822;
}
.wx-scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.wx-forecast__inner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 12, 20, 0.58) 0%, rgba(8, 12, 20, 0.15) 40%, rgba(8, 12, 20, 0.62) 100%);
  pointer-events: none;
}
.wx-forecast__body {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 0.75rem 0.8rem 0.7rem;
}
.wx-forecast__kicker {
  margin: 0;
  min-height: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  font-size: 0.64rem;
  line-height: 1;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--accent) 55%, #d8c8a0);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.8);
}
.wx-forecast__forced {
  display: inline-block;
  padding: 0.12rem 0.4rem;
  border-radius: 2px;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #2a1808;
  background: linear-gradient(180deg, #f0c878, #c47838);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 1px 2px rgba(0, 0, 0, 0.6);
}
.wx-forecast__now {
  margin: 0.3rem 0 0;
  font-size: 1.45rem;
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--cream);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.7), 0 0 14px color-mix(in srgb, var(--accent) 40%, transparent);
}
.wx-forecast__blurb {
  margin: 0.4rem 0 0;
  min-height: 2.3rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 0.85rem;
  line-height: 1.35;
  color: #d8c8a8;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);
}
.wx-forecast__window {
  margin: 0.55rem 0 0;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  color: #b8c0cc;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.8);
}
.wx-forecast__window::before {
  content: "";
  display: inline-block;
  width: 0.4rem;
  height: 0.4rem;
  margin-right: 0.4rem;
  transform: rotate(45deg);
  background: var(--accent);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.6);
}
.wx-forecast__effects {
  margin: 0.6rem 0 0;
  padding: 0;
  list-style: none;
  height: 2.45rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.wx-forecast__effects li {
  display: grid;
  grid-template-columns: 3.6rem minmax(0, 1fr) 2.5rem;
  align-items: center;
  gap: 0.4rem;
  height: 1rem;
  font-size: 0.72rem;
}
.wx-forecast__effects--quiet {
  justify-content: center;
}
.wx-forecast__effects--quiet li {
  display: block;
  height: auto;
}
.wx-forecast__trait {
  text-transform: capitalize;
  color: #f0e0b8;
  font-weight: 600;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.9);
}
.wx-forecast__bar {
  position: relative;
  height: 0.62rem;
  border-radius: 1px;
  background: linear-gradient(180deg, #05080c, #0e1218);
  border: 1px solid #000;
  box-shadow: 0 1px 0 rgba(255, 220, 170, 0.22), inset 0 2px 3px rgba(0, 0, 0, 0.8);
  overflow: hidden;
}
.wx-forecast__bar i {
  display: block;
  height: 100%;
  max-width: 100%;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0) 45%, rgba(0, 0, 0, 0.25)),
    linear-gradient(90deg, var(--fill-a), var(--fill-b));
  box-shadow: 0 0 8px color-mix(in srgb, var(--fill-b) 45%, transparent);
}
.wx-forecast__bar::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 66.667%;
  width: 1px;
  background: rgba(214, 180, 94, 0.85);
}
.wx-forecast__pct {
  text-align: right;
  color: #ecdcb4;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.9);
}
.wx-forecast__quiet {
  font-size: 0.75rem;
  text-align: center;
  color: #c8b898;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.9);
}
.wx-forecast__next {
  position: relative;
  margin: auto -0.2rem -0.1rem;
  padding: 0.4rem 1.1rem 0.45rem;
  border-radius: 3px;
  border: 1px solid #1a0e06;
  background: var(--grain), linear-gradient(180deg, #5e3c20, #3e2713);
  box-shadow:
    inset 0 1px 0 rgba(255, 220, 170, 0.25),
    inset 0 -1px 0 rgba(0, 0, 0, 0.5),
    0 3px 6px rgba(0, 0, 0, 0.5);
}
.wx-forecast__next::before,
.wx-forecast__next::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 5px;
  height: 5px;
  margin-top: -2.5px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #e8d49a, var(--brass-dk) 70%);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.6);
}
.wx-forecast__next::before { left: 6px; }
.wx-forecast__next::after { right: 6px; }
.wx-forecast__next-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin: 0;
}
.wx-forecast__next-label {
  font-size: 0.58rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #d0b888;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.7);
}
.wx-forecast__next-when {
  font-size: 0.68rem;
  font-variant-numeric: tabular-nums;
  color: #e8dcc0;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.7);
}
.wx-forecast__next-name {
  margin: 0.1rem 0 0;
  font-size: 0.98rem;
  line-height: 1.15;
  font-weight: 700;
  color: var(--cream);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.8);
}
.wx-forecast__next-blurb {
  margin: 0.2rem 0 0;
  font-size: 0.72rem;
  line-height: 1.3;
}
/* Basement dock · short plate · height locked by .coop-under__dock. */
.wx-forecast.wx-forecast--compact {
  --wx-h: 100%;
  height: 100%;
  max-width: none;
  padding: 6px;
  margin: 0;
  box-shadow: none;
  border: 0;
  background: transparent;
}
.wx-forecast.wx-forecast--compact .wx-forecast__inner {
  height: 100%;
  min-height: 0;
}
.wx-forecast.wx-forecast--compact .wx-forecast__body {
  gap: 0.25rem;
  padding: 0.15rem 0.2rem;
}
.wx-forecast.wx-forecast--compact .wx-forecast__now {
  font-size: 1rem;
  margin: 0;
}
.wx-forecast.wx-forecast--compact .wx-forecast__window {
  margin: 0;
  font-size: 0.68rem;
}
.wx-forecast__compact-line {
  margin: 0.15rem 0 0;
  font-size: 0.72rem;
  line-height: 1.3;
  color: #e8d49a;
}
.wx-forecast--has-day { height: auto; }
.wx-forecast--has-day .wx-forecast__inner { flex-direction: column; }
.wx-forecast--has-day .wx-forecast__body {
  flex: none;
  height: calc(var(--wx-h) - 22px);
}
.wx-forecast__day {
  position: relative;
  z-index: 2;
  padding: 0.5rem 0.8rem 0.65rem;
  border-top: 1px solid rgba(214, 180, 94, 0.45);
  background: linear-gradient(180deg, rgba(8, 12, 20, 0.35), rgba(8, 12, 20, 0.6));
}
.wx-forecast__day-head {
  margin: 0 0 0.45rem;
  font-size: 0.6rem;
  line-height: 1;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #c8b080;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.8);
}
.wx-day__slots {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.3rem;
}
.wx-day__slot {
  display: flex;
  min-width: 0;
}
.wx-day__hit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.wx-day__tip {
  margin: 0;
  padding: 0.7rem 0.8rem;
  max-width: min(18rem, calc(100vw - 1.5rem));
  border: 2px solid #3a2410;
  border-radius: 4px;
  background: #f4e8c8;
  color: #120c06;
  box-shadow: 0 10px 22px rgb(0 0 0 / 40%);
}
.wx-day__tip-name {
  margin: 0 0 0.25rem;
  font-weight: 800;
}
.wx-day__tip-blurb,
.wx-day__tip-quiet {
  margin: 0 0 0.4rem;
  font-size: 0.78rem;
  line-height: 1.35;
}
.wx-day__tip-quiet { margin-bottom: 0; }
.wx-day__tip-effects {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.22rem;
}
.wx-day__tip-effects li {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.78rem;
}
.wx-day__time {
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
  color: #a8b4c4;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.8);
}
.wx-day__icon {
  position: relative;
  width: 100%;
  height: 2.5rem;
  display: grid;
  place-items: center;
  border-radius: 2px;
  border: 1px solid #000;
  background: linear-gradient(180deg, var(--slot-a), var(--slot-b));
  box-shadow:
    0 1px 0 rgba(255, 220, 170, 0.2),
    inset 0 2px 5px rgba(0, 0, 0, 0.55);
}
.wx-day__icon svg {
  width: 1.6rem;
  height: 1.6rem;
  display: block;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.6));
}
.wx-day__name {
  max-width: 100%;
  margin-top: 0.12rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--cream);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.8);
}
.wx-day__slot.is-now .wx-day__time { color: var(--brass); }
.wx-day__slot.is-now .wx-day__icon {
  border-color: var(--brass);
  box-shadow:
    0 0 0 1px rgba(214, 180, 94, 0.45),
    0 0 10px rgba(214, 180, 94, 0.3),
    inset 0 2px 5px rgba(0, 0, 0, 0.45);
}
.wx-day__now-pill {
  position: absolute;
  left: 50%;
  bottom: -0.3rem;
  transform: translateX(-50%);
  padding: 0 0.3rem;
  border-radius: 2px;
  font-size: 0.45rem;
  line-height: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #2a1808;
  background: linear-gradient(180deg, #f0d88a, #c49a40);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}
@media (max-width: 45rem) {
  .site-layout.site-layout--with-aside {
    grid-template-columns: 1fr;
  }
  .site-aside {
    position: static;
  }
}
/*
 * Seasonal site event · compact wood plate (matches Village forecast frame).
 * Status only · not dismissible.
 */
.site-event-banner--wood {
  --accent: #c4a858;
  --wood-1: #6b4426;
  --wood-2: #55341c;
  --wood-3: #3b2412;
  --wood-hi: #8a5c36;
  --wood-lo: #24150a;
  --brass: #d6b45e;
  --brass-dk: #8a6a28;
  --cream: #f4e8c8;
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='130'%3E%3Cfilter id='g' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.012 0.32' numOctaves='3' seed='7'/%3E%3CfeColorMatrix values='0 0 0 0 0.10  0 0 0 0 0.05  0 0 0 0 0.02  1.5 0 0 0 -0.45'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  position: relative;
  margin: 0;
  padding: 7px;
  border-radius: 5px;
  color: #e8dcc0;
  background:
    var(--grain),
    linear-gradient(180deg, var(--wood-hi) 0%, var(--wood-1) 8%, var(--wood-2) 60%, var(--wood-3) 100%);
  border: 1px solid var(--wood-lo);
  box-shadow:
    inset 0 1px 0 rgba(255, 220, 170, 0.28),
    inset 0 -2px 0 rgba(0, 0, 0, 0.45),
    0 0.45rem 1rem rgba(2, 8, 18, 0.45);
}
.site-event-banner--wood::before {
  content: "";
  position: absolute;
  inset: 2px;
  pointer-events: none;
  z-index: 3;
  background:
    radial-gradient(circle at 50% 40%, #e8d49a 0 1px, var(--brass-dk) 2px, transparent 2.6px) 0 0 / 5px 5px no-repeat,
    radial-gradient(circle at 50% 40%, #e8d49a 0 1px, var(--brass-dk) 2px, transparent 2.6px) 100% 0 / 5px 5px no-repeat,
    radial-gradient(circle at 50% 40%, #e8d49a 0 1px, var(--brass-dk) 2px, transparent 2.6px) 0 100% / 5px 5px no-repeat,
    radial-gradient(circle at 50% 40%, #e8d49a 0 1px, var(--brass-dk) 2px, transparent 2.6px) 100% 100% / 5px 5px no-repeat;
}
.site-event-banner--ember { --accent: #f0643a; }
.site-event-banner--pine { --accent: #6fa83a; }
.site-event-banner--rose { --accent: #b85878; }
.site-event-banner--amber { --accent: #d6b45e; }
.site-event-banner--halloween { --accent: #e07020; }
.site-event-banner--halloween .site-event-banner__kicker {
  color: #ffb060;
  letter-spacing: 0.14em;
}
.site-event-banner--halloween .site-event-banner__title {
  color: #ffe4c0;
}
.site-event-banner__moon {
  position: absolute;
  right: 0.7rem;
  top: 0.55rem;
  z-index: 4;
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 50%;
  background: #f4e0a8;
  box-shadow: 0 0 8px #ffb060;
  pointer-events: none;
}
.site-event-banner__moon::after {
  content: "";
  position: absolute;
  right: -0.22rem;
  top: -0.06rem;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: #101822;
}
.site-event-banner__bats {
  position: absolute;
  left: 0.55rem;
  top: 0.5rem;
  z-index: 4;
  width: 1.1rem;
  height: 0.4rem;
  pointer-events: none;
  background:
    radial-gradient(circle at 20% 60%, #0a0614 0 2px, transparent 3px),
    radial-gradient(circle at 80% 60%, #0a0614 0 2px, transparent 3px);
}
.site-event-banner__bats::before,
.site-event-banner__bats::after {
  content: "";
  position: absolute;
  top: 0.1rem;
  width: 0.45rem;
  height: 0.22rem;
  background: #14081c;
  border-radius: 50% 50% 40% 40%;
  box-shadow: 0.55rem 0.04rem 0 #14081c;
}
.coop-rail .site-event-banner {
  margin: 0;
}
.coop-rail .wx-forecast {
  margin: 0;
  max-width: none;
}
.daily-overview__forecast .wx-forecast {
  padding: 0;
  height: auto;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
}
.daily-overview__forecast .wx-forecast::before {
  content: none;
}
.site-event-banner__inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.12rem;
  padding: 0.42rem 0.55rem 0.48rem;
  border-radius: 2px;
  border: 1px solid #1a0e06;
  background: #101822;
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent),
    inset 0 4px 10px rgba(0, 0, 0, 0.5);
}
.site-event-banner__kicker {
  margin: 0;
  font-size: 0.58rem;
  line-height: 1;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--accent) 55%, #d8c8a0);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.8);
}
.site-event-banner__title {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.03em;
  color: var(--cream);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.75);
}
.site-event-banner__until {
  margin: 0.08rem 0 0;
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  color: #b8c0cc;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.8);
}
@media (max-width: 45rem) {
  .site-event-banner--wood {
    margin-inline: 0;
  }
}


