/* swap-reskin-a · GLOBAL: the original page in the app's team-page language (newui-v1 02/03/04): a white page (ink night),
   1.5px ink hairlines, heavy black CJK, SF Mono labels, acid keys with a hard ink shadow. Owns: page ground, nav bar,
   download dock, global type tokens, keys (.dl), store badges, the theme toggle's night, the statue ink. Sections
   (kingdom/team, roundtable/dawn, finale/faq/footer) are tuned in swap-reskin-b/c/d, which load after this file. */

/* ---------- tokens: the app's own, and the original's tokens re-pointed at them ---------- */
:root {
  --rk-bg: #fff; --rk-ink: #141414; --rk-ink2: #4b4b4b; --rk-mute: #8a8a8a; --rk-hair: #e4e4e4;
  --rk-cobalt: #1f2bff; --rk-pink: #ff4f9a; --rk-acid: #eeff2d; --rk-orange: #ff8200;
  --rk-lw: 1.5px; --rk-line: var(--rk-lw) solid var(--rk-ink);
  --rk-key-ink: #141414;          /* a key's edge and glyphs: always ink (acid face) */
  --rk-key-sh: #141414;           /* the hard offset shadow */
  --rk-cjk: "PingFang TC", "Noto Sans TC", "Hiragino Sans", "Heiti TC", "Microsoft JhengHei", sans-serif;
  --rk-grot: "Helvetica Neue", "Arial Nova", Arial, "PingFang TC", "Noto Sans TC", sans-serif;
  --rk-mono: "SF Mono", ui-monospace, "JetBrains Mono", Menlo, Consolas, monospace;
  --rk-out: cubic-bezier(.2, .9, .2, 1);
  /* the original's tokens */
  --font-display: var(--rk-cjk);
  --font-body: var(--rk-grot);
  --ink: #141414; --ink-2: #4b4b4b; --ink-3: #8a8a8a;
  --title-ink: var(--rk-ink); --title-ink-2: var(--rk-ink2);
  --on-sky: var(--rk-ink); --on-sky-2: var(--rk-ink2); --on-sky-3: var(--rk-mute); --on-sky-title: var(--rk-ink);
  --ink-line: var(--rk-ink);
  --sky-halo: 0 0 0 transparent;
  --focus: var(--rk-cobalt);
  --lime: var(--rk-acid);
  --pearl: #fff; --pearl-2: #f3f3f3; --pearl-3: #e4e4e4;
  --paper-shadow: none; --paper-edge: inset 0 0 0 var(--rk-lw) var(--rk-ink);
  --sky-edge-top: var(--rk-bg); --sky-edge-bottom: var(--rk-bg);
  /* statues: a quiet cobalt engraving on white */
  --statue-ink: rgba(31, 43, 255, .3);
}
@media (min-resolution: 2.5dppx) { :root { --rk-lw: 1.334px; } }
:root[data-theme="dark"] {
  --rk-bg: #0b0b10; --rk-ink: #f2f2f5; --rk-ink2: #c9c9d4; --rk-mute: #8b8b99; --rk-hair: #34343e;
  --rk-key-sh: #f2f2f5;           /* night: the slab under a key is light ink, the inverse of day */
  --on-sky: var(--rk-ink); --on-sky-2: var(--rk-ink2); --on-sky-3: var(--rk-mute); --on-sky-title: var(--rk-ink);
  --ink-line: var(--rk-ink); --focus: var(--rk-acid);
  --statue-ink: rgba(242, 242, 245, .2);   /* the night dot sets carry the form in their light */
}

/* ---------- ground: pure white day, ink night. The sky (canvas, gradients, lamp, prism, twinkles, glints) is gone ---------- */
html, :root[data-theme], :root[data-theme][data-sky-phase] { background: var(--rk-bg) !important; color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }
body { background: var(--rk-bg); color: var(--rk-ink); font-family: var(--rk-grot); }
.sky, .sky-decor, .sky-edge, .sky-glint { display: none !important; }
.scene, .faq { background-image: none; }
::selection { background: var(--rk-acid); color: #141414; }
:focus-visible { outline: 2.5px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
.skip { border: 2.5px solid #141414; border-radius: 12px; background: var(--rk-acid); color: #141414; box-shadow: 4px 4px 0 #141414; }

/* atmosphere that belonged to the sky: sparkles, the sticker's halo, actor back-lights, stage glows */
.sparkle, .actor__glow { display: none; }
.sticker::before, .actor::before { content: none; }
.kd__glow, .dawn__glow { display: none; }

/* ---------- global type: heavy black CJK display, grotesk body, mono labels ---------- */
main > :not(.sh) :is(h2, h3), .sticker {
  font-family: var(--rk-cjk); font-weight: 900; font-synthesis: none; letter-spacing: -.04em;
  -webkit-text-stroke: .018em currentColor; paint-order: stroke fill;
  color: var(--rk-ink); text-shadow: none;
}
.lede { color: var(--rk-ink2); }
.mono-label, .nav__lang { font: 600 12px/1 var(--rk-mono); letter-spacing: .14em; text-transform: uppercase; }

/* ---------- nav: one flat bar, edge to edge, an ink hairline under it (the app's header) ---------- */
html .nav { top: 0; color: var(--rk-ink); }
:root[data-theme] .nav[data-nav]::after {
  inset: 0; border-radius: 0; background: var(--rk-bg);
  -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: none;
  border-bottom: var(--rk-line);
}
.nav::before { display: none; }
/* logo: the brand mark in its official colours (no glow, no keyline) + the brand wordmark in ink */
.nav .mark__glow, .foot .mark__glow { display: none !important; }
:root[data-theme] .nav .mark { --mark-star: #00A5FF; --mark-dot: #FA0691; }
:root[data-theme] .mark__star, :root[data-theme] .mark__dot { stroke: none; }
.nav__word { font-family: "Attunely Display", var(--rk-cjk); font-weight: 800; color: var(--rk-ink); letter-spacing: .01em; }
.nav__brand { border-radius: 4px; }
/* desktop links: heavy CJK, a 2px underline on hover (next/.nav__links) */
:root .nav__links a { font: 800 16px/1 var(--rk-cjk); letter-spacing: 0; opacity: 1; border-radius: 4px; color: var(--rk-ink); }
@media (hover: hover) { :root .nav__links a:hover { background: none; text-decoration: underline 2px; text-underline-offset: 6px; } }
.nav__lang { color: var(--rk-ink); border-radius: 4px; }
/* the theme toggle: ink glyph, flat; night = light ink */
.nav__theme { color: var(--rk-ink); border-radius: 4px; }
@media (hover: hover) and (pointer: fine) { :root .nav__theme:hover { background: none; } :root .nav__theme:hover .tmark { transform: scale(1.1); } }
/* the clock (desktop only in the original, hidden at ≥1024 by R9): squared, hairline */
:root .clock { border-radius: 4px; background: var(--rk-bg); box-shadow: inset 0 0 0 var(--rk-lw) var(--rk-ink); }
:root .clock__disc { border-radius: 0; }

/* chapter sheet: a white card, ink hairline, hard shadow */
:root .chapters { background: var(--rk-bg); color: var(--rk-ink); border: var(--rk-line); border-radius: 14px; box-shadow: 5px 5px 0 var(--rk-ink); }
:root .chapters__title { color: var(--rk-mute); font: 600 12px/1 var(--rk-mono); letter-spacing: .14em; }
:root .chapters__list a { border-radius: 4px; font-family: var(--rk-cjk); font-weight: 800; }
:root .chapters__list a[aria-current], :root .chapters__list a:hover { background: none; box-shadow: inset 3px 0 0 var(--rk-ink); }
:root .chapters__list img { border-radius: 0; background: none; }
:root :is(.chapters__motion, .chapters__theme) { border-radius: 10px; background: var(--rk-bg); box-shadow: inset 0 0 0 var(--rk-lw) var(--rk-ink); }

/* ---------- keys: every .dl becomes the app key (acid face, 2.5px ink edge, hard offset shadow, press = sink) ---------- */
:root[data-theme] .dl {
  --sh: var(--rk-key-sh);
  padding: 0; border-radius: 16px; background: none; box-shadow: none; color: var(--rk-key-ink);
  scale: none; transition: none;
}
:root[data-theme] .dl::before, .dl-ring, .dl-orbit { display: none !important; }
:root[data-theme] .dl-in {
  min-height: var(--h); padding: 0 22px; gap: 10px; border: 2.5px solid var(--rk-key-ink); border-radius: inherit;
  background: var(--rk-acid); color: var(--rk-key-ink); box-shadow: 5px 5px 0 var(--sh); text-shadow: none;
  font: 800 var(--fs)/1 var(--rk-grot); letter-spacing: 0; overflow: visible;
  transition: transform .14s var(--rk-out), box-shadow .14s var(--rk-out);
}
:root[data-theme] .dl-in::before, :root[data-theme] .dl-in::after { content: none; animation: none; }
.dl .dl-t { font-family: var(--rk-cjk); font-weight: 800; -webkit-text-stroke: .01em currentColor; }
.dl .dl-c { stroke-width: 3; }
@media (hover: hover) and (pointer: fine) {
  :root[data-theme] .dl:hover .dl-in { transform: translate(-1px, -1px); box-shadow: 6px 6px 0 var(--sh); }
  .dl:hover .dl-c { translate: 3px 0; }
}
:root[data-theme] .dl:is(:active, .is-pressed, .is-busy) { scale: none; }
:root[data-theme] .dl:is(:active, .is-pressed, .is-busy) .dl-in { transform: translate(4px, 4px); box-shadow: 1px 1px 0 var(--sh); transition-duration: .06s; }
:root[data-theme] .dl:focus-visible { outline: 2.5px solid var(--focus); outline-offset: 4px; }
/* the nav's 下載: the small key (next/.nav .key at phone size) */
:root[data-theme] .dl.sm { --h: 36px; --fs: 14px; border-radius: 11px; margin-right: 4px; }
:root[data-theme] .dl.sm .dl-in { padding: 0 13px; gap: 6px; box-shadow: 3px 3px 0 var(--sh); }
:root[data-theme] .dl.sm:is(:active, .is-pressed) .dl-in { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--sh); }
@media (min-width: 1024px) {
  :root[data-theme] .dl.sm { --h: 44px; --fs: 15px; border-radius: 13px; }
  :root[data-theme] .dl.sm .dl-in { padding: 0 18px; box-shadow: 4px 4px 0 var(--sh); }
}
@media (forced-colors: active) { :root[data-theme] .dl-in { border-color: LinkText; box-shadow: none; } }

/* ---------- store badges → the app's two keys (App Store: acid; Google Play: ink with a pink slab), as in the hero ---------- */
:root .badges { gap: 14px; }
:root .store-badge {
  --sh: var(--rk-key-sh);
  display: inline-flex; align-items: center; gap: 9px; height: 48px; padding: 0 16px 0 14px;
  border: 2.5px solid #141414; border-radius: 13px; background: var(--rk-acid); color: #141414;
  box-shadow: 4px 4px 0 var(--sh); font: 800 15px/1 var(--rk-grot); white-space: nowrap;
  transition: transform .14s var(--rk-out), box-shadow .14s var(--rk-out);
}
:root .store-badge--play { background: #141414; color: #fff; --sh: var(--rk-pink); }
:root[data-theme="dark"] .store-badge--play { border-color: #f2f2f5; }
:root .store-badge img { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; pointer-events: none; }   /* the official art stays as the accessible name */
:root .store-badge::before {
  content: ""; position: static; inset: auto; width: 20px; height: 20px; flex: none; border-radius: 0; opacity: 1;
  background: currentColor; transition: none;
  -webkit-mask: var(--rk-glyph) center / contain no-repeat; mask: var(--rk-glyph) center / contain no-repeat;
}
:root .store-badge::after { content: "App Store"; }
:root .store-badge--play::after { content: "Google Play"; }
.store-badge { --rk-glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M16.4 12.6c0-2.6 2.1-3.8 2.2-3.9-1.2-1.8-3.1-2-3.7-2-1.6-.2-3.1.9-3.9.9-.8 0-2-.9-3.4-.9-1.7 0-3.3 1-4.2 2.6-1.8 3.1-.5 7.7 1.3 10.2.9 1.2 1.9 2.6 3.2 2.6 1.3-.1 1.8-.8 3.4-.8 1.6 0 2 .8 3.4.8 1.4 0 2.3-1.3 3.1-2.5 1-1.4 1.4-2.8 1.4-2.9-.1 0-2.8-1.1-2.8-4.1zM13.9 5c.7-.9 1.2-2 1-3.2-1 0-2.3.7-3 1.6-.7.8-1.2 2-1.1 3.1 1.2.1 2.3-.6 3.1-1.5z'/%3E%3C/svg%3E"); }
.store-badge--play { --rk-glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 2.5v19l10.5-9.5L4 2.5zm11.6 10.6 2.6 2.4-11 6.2 8.4-8.6zm0-2.2L7.2 2.3l11 6.2-2.6 2.4zm3.7 3.7L16.6 12l2.7-2.6 2.6 1.5c.8.5.8 1.7 0 2.2l-2.6 1.5z'/%3E%3C/svg%3E"); }
@media (hover: hover) and (pointer: fine) { :root .store-badge:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--sh); } }
:root .store-badge:is(:active, .is-pressed) { transform: translate(4px, 4px); box-shadow: 1px 1px 0 var(--sh); transition-duration: .06s; }

/* ---------- dock: a flat bar along the bottom, an ink hairline over it; the logo left, the key right ---------- */
html .dock {
  justify-content: space-between; align-items: center; gap: 16px;
  padding: 10px max(var(--gut), env(safe-area-inset-right, 0px)) max(12px, env(safe-area-inset-bottom, 0px)) max(var(--gut), env(safe-area-inset-left, 0px));
}
.dock::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: var(--rk-bg); border-top: var(--rk-line);
  translate: 0 calc(100% + 8px); transition: translate .24s var(--ease-in, ease-in);
}
.dock.is-on::before { translate: 0 0; transition: translate .5s var(--ease, ease); }
html .dock > a { flex: 0 1 auto; width: auto; }
html .dock > a .dl-in { padding: 0 18px; }
.rk-dock-logo {
  display: flex; align-items: center; gap: 7px; flex: none; color: var(--rk-ink);
  font: 800 19px/1 "Attunely Display", var(--rk-cjk); letter-spacing: .01em;
  translate: 0 calc(100% + 40px); opacity: 0; transition: translate .24s var(--ease-in, ease-in), opacity .2s linear;
}
.rk-dock-logo svg { width: 32px; height: auto; overflow: visible; }
.dock.is-on .rk-dock-logo { translate: 0 0; opacity: 1; transition: translate .5s var(--ease, ease), opacity .16s linear; }
:root[data-motion="off"] :is(.dock::before, .rk-dock-logo) { transition: none; }
:root[data-motion="off"] .dock:not(.is-on)::before { visibility: hidden; }
@media (max-width: 339px) { .rk-dock-logo span { display: none; } }

/* ---------- owner bans, as a page-wide safety net (section files refine their own pieces after this) ----------
   no capsules (text containers ≤ 12px, keys ≤ 16px), no gold ✦, no frosted glass, no iridescent rims, no soft drop
   shadows, nothing tilted. swap-reskin-a-global.js also squares any capsule the CSS below does not name. */
.float, .paper, .glass, .glass *, .say { rotate: none !important; }
@keyframes float-wob { 0%, 100% { transform: translate3d(0, 0, 0); } 30% { transform: translate3d(0, -6px, 0); } 64% { transform: translate3d(0, 4px, 0); } }
.kd__tag::before { content: none; }
*, *::before, *::after { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
:root .glass, :root[data-theme] .glass, :root .glass--dense, :root[data-theme] .glass--dense {
  --gls-fill: var(--rk-bg); --gls-shadow: inset 0 0 0 var(--rk-lw) var(--rk-ink); --gls-sheen: none; --gls-holo: 0;
  border-radius: 4px; color: var(--rk-ink);
}
:root .glass::before, :root .glass::after { content: none; }
:root .glass__face, :root .glass__icon { box-shadow: none; }
:root .glass__t > b { font: 600 11px/1.25 var(--rk-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--rk-mute); }
:root .glass__t > :last-child { font-family: var(--rk-cjk); font-weight: 800; }
:root .nametag, :root[data-theme] .nametag {
  border-radius: 0; border: 0; padding: 4px 8px; background: var(--tm-sq, var(--rk-ink)); color: #fff; box-shadow: none;
  font: 800 13px/1.15 var(--rk-cjk); letter-spacing: .04em;
}
:root .chip, :root[data-theme] .chip { border-radius: 12px; box-shadow: inset 0 0 0 var(--rk-lw) var(--rk-ink); }
:root .chip::after { border-radius: 14px; }
:root :is(.lime, .lime__face, .nav__dl, .nav__dl-face, .kd__tag, .motion-btn, .kbd__field, .kbd__fix .dawn-ring, .fix__glow) { border-radius: 12px; }
:root .lime::before, :root .lime::after, :root .nav__dl::before, :root .fix__glow { box-shadow: none; }
:root .say, :root[data-theme="light"] .say { border-radius: 12px; box-shadow: none; border: var(--rk-line); background: var(--rk-bg); color: var(--rk-ink); }
:root .say::after { display: none; }
:root .bubble > span { border-radius: 12px; }
:root .paper { box-shadow: inset 0 0 0 var(--rk-lw) var(--rk-ink); background: #fff; border-radius: 12px; }
:root .actor.is-hint::after { box-shadow: 0 0 0 2px var(--rk-ink); }
[data-teammate="concierge"] { --tm-sq: var(--rk-pink); } [data-teammate="strategist"], [data-teammate="crown"] { --tm-sq: var(--rk-cobalt); }
[data-teammate="commander"] { --tm-sq: var(--rk-orange); } [data-teammate="scout"], [data-teammate="scientist"] { --tm-sq: #141414; }
