:root {
  --text: #eef3ff;
  --muted: #9aa7cf;
  --gold: #ffd166;
  --red: #ff4d6d;
  --cyan: #4cc9f0;
  --green: #06d6a0;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #060606;
  color: var(--text);
  font-family: var(--font);
  overscroll-behavior: none;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

/*
 * Budingxie backdrop around the portrait game (the same four layers as the Budingxie site's
 * SiteBackdrop: black base, the gold crab wallpaper, a faint gold / violet / ember glow, and a dark
 * vignette; wallpaper and vignette a touch lighter than the site's so the sides don't read as plain
 * black). Static CSS, painted once: never part of the game canvas. Phones in portrait are covered
 * by the game, so the wallpaper only loads where there is room beside it.
 */
body {
  background:
    radial-gradient(ellipse 88% 78% at 50% 38%, transparent 28%, rgba(6, 6, 6, 0.72) 78%, rgba(6, 6, 6, 0.95) 100%),
    radial-gradient(ellipse 62% 48% at 50% 26%, rgba(190, 160, 65, 0.15), transparent 70%),
    radial-gradient(ellipse 38% 34% at 86% 14%, rgba(95, 87, 226, 0.1), transparent 70%),
    radial-gradient(ellipse 34% 30% at 8% 34%, rgba(252, 70, 13, 0.06), transparent 70%),
    #060606;
}
.sides body {
  background:
    radial-gradient(ellipse 88% 78% at 50% 38%, transparent 28%, rgba(6, 6, 6, 0.66) 78%, rgba(6, 6, 6, 0.95) 100%),
    radial-gradient(ellipse 62% 48% at 50% 26%, rgba(190, 160, 65, 0.15), transparent 70%),
    radial-gradient(ellipse 38% 34% at 86% 14%, rgba(95, 87, 226, 0.1), transparent 70%),
    radial-gradient(ellipse 34% 30% at 8% 34%, rgba(252, 70, 13, 0.06), transparent 70%),
    /* wallpaper at 16 %: an 84 % black wash over the image (the site shows it at opacity 0.12) */
    linear-gradient(rgba(6, 6, 6, 0.84), rgba(6, 6, 6, 0.84)),
    url("brand/pattern-gold.webp") center / cover no-repeat,
    #060606;
}

/*
 * The game frame. main.ts sizes and places it (whole device pixels, so the canvas maps 1:1); the
 * backing store follows its device-pixel box. Beside the backdrop it gets a thin gold edge and a
 * soft shadow; when it floats (enough height for a margin) also slightly rounded corners.
 */
#game { position: fixed; left: 0; top: 0; width: 100%; height: 100%; display: block; touch-action: none; background: #03050d; }
.sides #game { box-shadow: 0 0 0 1px rgba(227, 197, 101, 0.22), 0 18px 60px rgba(0, 0, 0, 0.75), 0 0 90px rgba(190, 160, 65, 0.07); }
.floating #game, .floating #ui { border-radius: 14px; }
.diag {
  position: fixed; left: 4px; bottom: 4px; z-index: 50; margin: 0; padding: 6px 8px;
  font: 11px/1.35 ui-monospace, Menlo, Consolas, monospace; color: #b8ffde;
  background: rgba(0, 0, 0, 0.72); border-radius: 6px; pointer-events: none; white-space: pre;
}

#ui { position: fixed; pointer-events: none; overflow: hidden; font-size: 16px; }
#ui > * { pointer-events: auto; }

button {
  font: inherit;
  color: inherit;
  border: 0;
  background: none;
  cursor: pointer;
  touch-action: manipulation;
  padding: 0;
}
svg { width: 100%; height: 100%; display: block; }
.hidden { display: none !important; }

/* ---- shared ---------------------------------------------------------- */

.screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.8em;
  padding: calc(var(--safe-top, 0px) + 1em) 1.4em 1.4em;
  text-align: center;
  animation: fadeIn 0.18s ease-out;
}
.overlay { background: radial-gradient(ellipse at 50% 40%, rgba(10, 16, 40, 0.82), rgba(3, 5, 13, 0.92)); }

.title {
  font-size: 2.1em;
  font-weight: 900;
  font-style: italic;
  letter-spacing: 0.03em;
  text-shadow: 0 0.08em 0 rgba(0, 0, 0, 0.45);
  animation: popIn 0.35s cubic-bezier(0.2, 1.6, 0.4, 1);
}
.title.big { font-size: 2.8em; }
.title.gold { color: var(--gold); }
.sub.boss-level { color: var(--gold); }
.title.red { color: var(--red); }
.sub { color: var(--muted); font-weight: 600; margin-top: -0.4em; }
.sub.narrow { max-width: 17em; line-height: 1.45; margin-top: 0; }

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  width: 15em;
  max-width: 100%;
  padding: 0.85em 1.2em;
  border-radius: 0.95em;
  font-size: 1.12em;
  font-weight: 900;
  letter-spacing: 0.04em;
  transition: transform 0.08s, filter 0.08s;
}
.btn:active { transform: translateY(0.15em) scale(0.98); filter: brightness(0.95); }
.btn-primary {
  color: #3a1d00;
  background: linear-gradient(180deg, #ffe08a, #ffb020 60%, #ff9500);
  box-shadow: 0 0.28em 0 #b45f00, 0 0.7em 1.4em rgba(255, 159, 28, 0.3);
}
.btn-ad {
  color: #002a1e;
  background: linear-gradient(180deg, #7dfad2, #19d39d 60%, #06b58a);
  box-shadow: 0 0.28em 0 #04775b, 0 0.7em 1.4em rgba(6, 214, 160, 0.25);
}
.btn-ghost {
  font-size: 1em;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
}
.btn-text { color: var(--muted); font-weight: 700; padding: 0.6em 1.2em; }
.ad-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.2em;
  font-size: 0.68em;
  padding: 0.2em 0.5em 0.2em 0.35em;
  border-radius: 0.45em;
  background: rgba(0, 0, 0, 0.2);
}
.ad-badge svg { width: 1em; height: 1em; }
/* The website promo's longer badge sits above the label instead of squeezing it (320 px phones). */
.btn-ad.promo { flex-direction: column; gap: 0.3em; padding-top: 0.6em; padding-bottom: 0.7em; }
.btn-ad.promo .ad-badge { white-space: nowrap; }

.coin {
  display: inline-block;
  width: 1em;
  height: 1em;
  border-radius: 50%;
  vertical-align: -0.14em;
  background: radial-gradient(circle at 35% 30%, #fff6c7, #ffd166 45%, #e09a1a);
  box-shadow: inset 0 0 0 0.1em rgba(150, 90, 0, 0.6);
}

.chip {
  padding: 0.45em 0.9em;
  border-radius: 2em;
  font-weight: 800;
  font-size: 0.9em;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.panel {
  width: 100%;
  max-width: 17em;
  border-radius: 1em;
  background: linear-gradient(160deg, rgba(36, 48, 100, 0.85), rgba(16, 22, 52, 0.9));
  border: 1px solid rgba(120, 160, 255, 0.22);
}

.ico {
  flex: none;
  width: 3.1em;
  height: 3.1em;
  padding: 0.55em;
  border-radius: 0.85em;
  color: #0b1020;
  background: var(--c);
  box-shadow: 0 0 1.2em color-mix(in srgb, var(--c) 45%, transparent), inset 0 -0.2em 0 rgba(0, 0, 0, 0.2);
}

/* ---- menu ------------------------------------------------------------ */

.menu {
  justify-content: flex-start;
  gap: 0.7em;
  background: linear-gradient(180deg, rgba(3, 5, 13, 0.55), rgba(3, 5, 13, 0.25) 35%, rgba(3, 5, 13, 0.6) 65%, rgba(3, 5, 13, 0.92));
}
/*
 * Wallet left, tools right. The tools and the language chip keep their size and stay on one line
 * (Stage E: 中文 wrapped into a tall chip once the wallet showed diamonds and 4-digit coins); the
 * wallet is the part that gives way, with tighter spacing in this row.
 */
.menu-top { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 0.35em; }
.menu-top .wallet { flex: 0 1 auto; min-width: 0; overflow: hidden; white-space: nowrap; gap: 0.3em; padding: 0.4em 0.6em 0.4em 0.5em; }
.menu-top .wallet > * { flex: none; }
/* Seven-digit balances and more: a slightly smaller wallet, so the diamond count keeps clear of its edge on 320-wide frames. */
.menu-top .wallet.long { font-size: 0.95em; }
.menu-top .gems { margin-left: 0.15em; gap: 0.2em; }
.wallet {
  display: flex;
  align-items: center;
  gap: 0.4em;
  padding: 0.4em 0.9em 0.4em 0.55em;
  border-radius: 2em;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 209, 102, 0.3);
  font-size: 1.05em;
  color: var(--gold);
}
.logo { position: relative; margin-top: 1.6em; line-height: 0.92; font-weight: 900; font-style: italic; }
.logo-a, .logo-b { filter: drop-shadow(0 0.07em 0 rgba(0, 0, 0, 0.6)); }
/*
 * The gradient shows through the glyphs on an inline span, not on the block: a block paints its
 * background only inside its short 0.92 line box, which cut the bottoms of the hanzi (they sit lower
 * than Latin caps) and the italic overhang flat. An inline box paints over the font's whole ascent to
 * descent, and the side padding covers the italic lean without moving the centred text (no vertical
 * padding: it shifts how the glyphs snap to pixels). The stops sit on the old 0.92em band around
 * the line centre, so the colours land where they did.
 */
.logo .ink {
  padding: 0 0.15em;
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}
.logo-a { font-size: 3.5em; letter-spacing: 0.02em; }
.logo-b { font-size: 2.7em; letter-spacing: 0.14em; }
.logo-a .ink { background-image: linear-gradient(180deg, #ffffff calc(50% - 0.46em), #8be3ff calc(50% + 0.184em), #3aa8e0 calc(50% + 0.46em)); }
.logo-b .ink { background-image: linear-gradient(180deg, #ffe08a calc(50% - 0.46em), #ff9500 calc(50% + 0.184em), #ff5e3a calc(50% + 0.46em)); }
html[lang="zh-CN"] .logo-a, html[lang="zh-CN"] .logo-b { font-size: 3.6em; letter-spacing: 0.1em; }
/* Whole hanzi now show, and 聚变 reaches lower than Latin caps: a small gap keeps its strokes and shadow off 防线. */
html[lang="zh-CN"] .logo-b { margin-top: 0.1em; }
.tagline { color: var(--muted); font-weight: 700; letter-spacing: 0.04em; }
.spacer { flex: 1; }
/* Short frames (wide screens, 16:9 phones): a tighter menu so nothing is cut off. */
.short-frame .menu { gap: 0.5em; }
.short-frame .logo { margin-top: 0.5em; }
html[lang="zh-CN"].short-frame .logo-a, html[lang="zh-CN"].short-frame .logo-b { font-size: 3.2em; }
.meta-card {
  display: flex;
  align-items: center;
  gap: 0.8em;
  width: 100%;
  max-width: 19em;
  padding: 0.75em;
  border-radius: 1em;
  text-align: left;
  background: linear-gradient(160deg, rgba(36, 48, 100, 0.92), rgba(16, 22, 52, 0.95));
  border: 1px solid rgba(120, 160, 255, 0.25);
}
.meta-info { flex: 1; min-width: 0; }
.meta-name { font-weight: 900; }
.meta-desc { color: var(--muted); font-size: 0.82em; margin-top: 0.2em; white-space: nowrap; }
.meta-desc .lv { color: var(--gold); font-weight: 800; }
.buy {
  display: flex;
  align-items: center;
  gap: 0.3em;
  padding: 0.55em 0.75em;
  border-radius: 0.7em;
  font-weight: 900;
  color: #3a1d00;
  background: linear-gradient(180deg, #ffe08a, #ffb020);
  box-shadow: 0 0.2em 0 #b45f00;
}
.buy.off { filter: grayscale(0.85) brightness(0.7); }
.claim { color: #002a1e; background: linear-gradient(180deg, #7dfad2, #06b58a); box-shadow: 0 0.2em 0 #04775b; }
.daily.ready { border-color: rgba(6, 214, 160, 0.6); animation: glowPulse 1.6s ease-in-out infinite; }
.daily:not(.ready) { opacity: 0.75; }
/* The daily card (V1.1 2.5): its icon and text open the Daily Login page (the chevron after the name says so); Claim beside it still claims at once. */
.open-daily { display: flex; align-items: center; gap: 0.8em; flex: 1; min-width: 0; text-align: left; border-radius: 0.6em; }
.open-daily .meta-name, .open-daily .meta-desc { display: block; }
.open-daily .more { font-style: normal; font-size: 1.15em; line-height: 1; margin-left: 0.3em; color: var(--gold); }
.open-daily:active .ico { transform: scale(0.96); }
/*
 * The Daily Login page (V1.1 2.5): the seven days from today on today's coin schedule, today's first and the seventh
 * across the whole width. The title, the line under it, Claim and Back stay put; the days, the countdown and (local
 * builds) the Pass shells scroll inside a short frame, with the Endless page's soft edges and chevrons.
 */
.daily-page .title { font-size: 1.7em; }
.daily-page .sub.narrow { max-width: 19em; font-size: 0.85em; text-wrap: balance; }
.daily-page .title, .daily-page .sub, .daily-page .claim-daily, .daily-page .daily-done, .daily-page .back { flex: none; }
.daily-page .extras-box { max-width: 19em; }
.daily-page .extras-box.more-above::before, .daily-page .extras-box.more-below::after { opacity: 0.85; }
.daily-body {
  flex: 0 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; touch-action: pan-y; overscroll-behavior: contain;
  display: flex; flex-direction: column; align-items: center; gap: 0.6em; width: 100%; padding: 0.3em 0;
  -webkit-mask-image: linear-gradient(transparent, #000 0.3em, #000 calc(100% - 0.3em), transparent);
  mask-image: linear-gradient(transparent, #000 0.3em, #000 calc(100% - 0.3em), transparent);
}
.daily-body > * { flex: none; }
.daily-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.4em; width: 100%; }
.daily-day {
  display: flex; flex-direction: column; align-items: center; gap: 0.12em; min-width: 0; padding: 0.4em 0.25em 0.45em; line-height: 1.2;
  border-radius: 0.8em; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(120, 160, 255, 0.22);
}
.daily-day .coin { width: 1.45em; height: 1.45em; margin: 0.1em 0; }
.dd-day { font-size: 0.72em; font-weight: 900; letter-spacing: 0.04em; color: #c9e7ff; }
.dd-name { font-size: 0.68em; font-weight: 700; color: var(--muted); }
.dd-qty { font-size: 0.95em; font-weight: 900; color: var(--gold); }
.dd-when { font-size: 0.68em; font-weight: 800; color: var(--muted); white-space: nowrap; }
.daily-day.ready { background: rgba(6, 214, 160, 0.13); border-color: rgba(6, 214, 160, 0.7); }
.daily-day.claimed { background: rgba(6, 214, 160, 0.05); }
.daily-day.ready .dd-when, .daily-day.claimed .dd-when { color: #7dfad2; }
/* The seventh day: the whole width and gold-edged, showing its true amount (today's schedule has no bonus day). */
.daily-day.featured {
  grid-column: 1 / -1; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "ico day qty" "ico name when";
  align-items: center; column-gap: 0.7em; row-gap: 0.1em; padding: 0.55em 0.85em; text-align: left;
  background: linear-gradient(160deg, rgba(255, 209, 102, 0.16), rgba(255, 149, 0, 0.05)); border: 1.5px solid rgba(255, 209, 102, 0.6);
}
.daily-day.featured .coin { grid-area: ico; width: 2.3em; height: 2.3em; margin: 0; }
.daily-day.featured .dd-day { grid-area: day; font-size: 0.9em; color: var(--gold); }
.daily-day.featured .dd-name { grid-area: name; font-size: 0.75em; }
.daily-day.featured .dd-qty { grid-area: qty; justify-self: end; font-size: 1.3em; }
.daily-day.featured .dd-when { grid-area: when; justify-self: end; font-size: 0.75em; }
.daily-next { max-width: 19em; font-size: 0.85em; font-weight: 800; line-height: 1.4; color: #c9e7ff; }
.daily-next .nb { white-space: nowrap; }
.daily-count { font-variant-numeric: tabular-nums; color: #ffffff; }
.daily-clock { margin-top: -0.35em; font-size: 0.72em; font-weight: 600; color: var(--muted); }
.daily-done { padding: 0.55em 0; font-weight: 900; color: #7dfad2; }
.claim-daily .coin { width: 0.95em; height: 0.95em; }
/* Local builds only: the Pass layers as locked shells (dashed, nothing in them). */
.daily-pass {
  display: flex; flex-direction: column; gap: 0.3em; width: 100%; padding: 0.5em 0.7em; border-radius: 0.8em; text-align: left;
  font-size: 0.75em; color: var(--muted); border: 1px dashed rgba(154, 167, 207, 0.45);
}
.dp-head { font-weight: 900; letter-spacing: 0.03em; }
.dp-row { display: flex; align-items: center; gap: 0.45em; }
.dp-row b { color: #c9e7ff; }
.dp-lock { flex: none; width: 1.1em; height: 1.1em; font-style: normal; }
.short-frame .daily-page, .short-frame .daily-body { gap: 0.5em; }
.short-frame .daily-page .title { font-size: 1.5em; }
/* A short frame (small phones, 16:9 and 4:3 desktop frames): tighter days, so the countdown and its device-clock line are in view as the page opens. */
.short-frame .daily-grid { gap: 0.32em; }
.short-frame .daily-day { padding-top: 0.3em; padding-bottom: 0.32em; row-gap: 0.08em; }
.short-frame .daily-day .coin { margin: 0; }
.short-frame .daily-day.featured { padding-top: 0.42em; padding-bottom: 0.42em; }
.menu-tools { flex: none; display: flex; gap: 0.35em; }
.menu-tools .lang { white-space: nowrap; padding: 0.45em 0.55em; }
.chip.icon { width: 2.3em; height: 2.3em; padding: 0.45em; }
.test-row { display: flex; gap: 0.6em; flex-wrap: wrap; justify-content: center; }
.settings .note { font-size: 0.85em; min-height: 2.9em; }
/* Settings: the aim mode, three options with one line each (the pick applies from the next run). */
.aim-row { display: flex; flex-direction: column; align-items: center; gap: 0.55em; width: 100%; max-width: 17em; }
.aim-list { display: flex; flex-direction: column; gap: 0.15em; padding: 0.3em; }
.aim-opt { display: flex; align-items: center; gap: 0.5em; width: 100%; padding: 0.35em 0.45em; border-radius: 0.7em; text-align: left; border: 1px solid transparent; }
.aim-opt .ico { flex: none; width: 1.65em; height: 1.65em; padding: 0.3em; border-radius: 0.5em; color: var(--muted); background: rgba(255, 255, 255, 0.07); }
.aim-text { display: flex; flex-direction: column; gap: 0.08em; font-size: 0.8em; line-height: 1.25; }
.aim-text b { font-weight: 900; }
.aim-text span { color: var(--muted); font-size: 0.88em; font-weight: 600; }
.aim-opt.sel { background: rgba(255, 209, 102, 0.12); border-color: rgba(255, 209, 102, 0.5); }
.aim-opt.sel .ico, .aim-opt.sel b { color: var(--gold); }
/* Settings: the skill button position (owner addendum §7), six options, each a small phone outline with the button's spot. */
.sp-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0.25em; width: 100%; padding: 0.3em; }
.sp-opt { display: flex; align-items: center; gap: 0.45em; padding: 0.75em 0.45em; border-radius: 0.7em; text-align: left; font-size: 0.8em; font-weight: 800; border: 1px solid transparent; }
.sp-opt.sel { color: var(--gold); background: rgba(255, 209, 102, 0.12); border-color: rgba(255, 209, 102, 0.5); }
.sp-map { position: relative; flex: none; width: 1.3em; height: 2.1em; border-radius: 0.25em; border: 1.5px solid currentColor; opacity: 0.85; }
.sp-map::after { content: ""; position: absolute; width: 0.42em; height: 0.42em; border-radius: 50%; background: currentColor; right: 0.08em; bottom: 0.08em; }
.sp-map[data-side="left"]::after { right: auto; left: 0.08em; }
/* Title and Done stay put; the rest never shrinks below its text (the note once spilled onto the aim row) and scrolls inside the frame. */
.settings .title, .settings .done { flex: none; }
.settings-body {
  flex: 0 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; touch-action: pan-y; overscroll-behavior: contain;
  display: flex; flex-direction: column; align-items: center; gap: 0.8em; width: 100%; padding: 0.1em 0;
}
.settings-body > * { flex: none; }
.short-frame .settings, .short-frame .settings-body { gap: 0.55em; }
.short-frame .settings .btn-ghost { padding: 0.65em 1em; }
.short-frame .settings .note { min-height: 0; }
/* Reduce motion while the device's own setting asks for it: the switch reads On (device setting), stays readable, and a tap changes nothing. */
.settings .motion[aria-disabled="true"] { cursor: default; color: var(--muted); }
.settings .motion .nb { white-space: nowrap; }
.buzz { animation: buzz 0.3s linear; }
.btn > svg { width: 1.2em; height: 1.2em; flex: none; }
.buy:active { transform: translateY(0.1em); }
.play { margin-top: 0.4em; font-size: 1.45em; padding: 0.75em 1em; width: 11em; animation: breathe 1.6s ease-in-out infinite; }
.best { color: var(--muted); font-size: 0.85em; font-weight: 600; min-height: 1.2em; }
.ver { color: rgba(154, 167, 207, 0.5); font-size: 0.7em; letter-spacing: 0.1em; }
/* The stored save is a newer build's: this session keeps nothing. */
.save-warn { color: #ffb3c1; font-size: 0.72em; line-height: 1.35; text-align: center; max-width: 30em; margin: 0.2em auto 0.4em; }

/* Menu: Upgrades and Gear side by side; each tile opens its screen. */
.meta-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5em; width: 100%; max-width: 19em; }
.meta-tile {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 0.3em; min-width: 0;
  padding: 0.6em 1.5em 0.6em 0.7em; border-radius: 1em; text-align: left;
  background: linear-gradient(160deg, rgba(36, 48, 100, 0.92), rgba(16, 22, 52, 0.95)); border: 1px solid rgba(120, 160, 255, 0.25);
}
.meta-tile:active { transform: scale(0.98); }
.mt-name { display: flex; align-items: center; gap: 0.35em; font-weight: 900; color: var(--c); white-space: nowrap; }
.mt-name svg { flex: none; width: 1.15em; height: 1.15em; }
.meta-tile .meta-desc { margin-top: 0; }
.meta-tile .shop-levels { gap: 0.45em; }
.meta-tile .more { position: absolute; right: 0.5em; top: 50%; transform: translateY(-50%); font-style: normal; font-size: 1.4em; color: var(--gold); }

/*
 * Gear (V1.0): slots, materials, the inventory in a list that scrolls inside the frame (never the
 * page), the gear guarantee and the drop table; then one piece's detail and the dismantle confirm.
 */
.gear { justify-content: flex-start; gap: 0.5em; }
.gear-piece, .dismantle { gap: 0.6em; }
.gear .title, .dismantle .title { font-size: 1.7em; flex: none; }
.gear-top { flex: none; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 0.4em; }
.gear-top .wallet { font-size: 0.95em; padding: 0.3em 0.8em 0.3em 0.5em; }
.mat-count {
  display: inline-flex; align-items: center; gap: 0.25em; padding: 0.35em 0.7em 0.35em 0.45em; border-radius: 2em; font-size: 0.85em; font-weight: 900;
  background: rgba(0, 0, 0, 0.45); border: 1px solid rgba(255, 255, 255, 0.14);
}
.mat-count > span { color: var(--muted); font-size: 0.88em; font-weight: 700; margin-left: 0.1em; }
.mat-ico { display: inline-block; flex: none; width: 1.15em; height: 1.15em; vertical-align: -0.22em; color: var(--c); }
.mini-ico { display: inline-block; flex: none; width: 1.15em; height: 1.15em; color: var(--c); }
.gear-slots { flex: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.35em; width: 100%; max-width: 20.5em; }
.gear-slot {
  display: flex; flex-direction: column; align-items: flex-start; gap: 0.15em; min-width: 0; padding: 0.4em 0.5em 0.45em; border-radius: 0.75em; text-align: left;
  background: color-mix(in srgb, var(--c) 10%, rgba(255, 255, 255, 0.04)); border: 1px solid color-mix(in srgb, var(--c) 60%, transparent);
}
.gear-slot.empty { border-style: dashed; background: rgba(255, 255, 255, 0.04); cursor: default; }
.gs-name { display: flex; align-items: center; gap: 0.25em; max-width: 100%; color: var(--muted); font-size: max(0.62em, 9px); font-weight: 900; white-space: nowrap; }
.gs-item { max-width: 100%; font-size: 0.74em; font-weight: 900; line-height: 1.15; color: var(--c); overflow-wrap: anywhere; }
.gr-name .lv { color: var(--text); font-size: 0.9em; }
.gs-fx .lv { color: var(--gold); font-weight: 900; }
.gs-fx { font-size: max(0.62em, 9px); font-weight: 700; line-height: 1.25; color: var(--text); }
.gear-slot.empty .gs-fx { color: var(--muted); }
/* In the head's own (smaller) em, as wide as the list below it. */
.gear-head { flex: none; width: 100%; max-width: calc(20.5em / 0.72); margin: 0.1em 0 -0.35em; padding-left: 0.4em; text-align: left; }
.gear-scroll {
  position: relative; flex: 0 1 auto; min-height: 3.6em; width: 100%; max-width: 20.5em; overflow-y: auto; overflow-x: hidden;
  touch-action: pan-y; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 0.3em; padding: 0.35em 0.1em;
  -webkit-mask-image: linear-gradient(transparent, #000 0.5em, #000 calc(100% - 0.5em), transparent);
  mask-image: linear-gradient(transparent, #000 0.5em, #000 calc(100% - 0.5em), transparent);
}
.gear-row {
  flex: none; display: flex; align-items: center; gap: 0.5em; padding: 0.38em 0.55em; border-radius: 0.75em; text-align: left;
  background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.12);
}
.gear-row.on { border-color: color-mix(in srgb, var(--c) 70%, transparent); background: color-mix(in srgb, var(--c) 12%, rgba(255, 255, 255, 0.04)); }
.gear-row .ico { width: 1.9em; height: 1.9em; padding: 0.35em; border-radius: 0.55em; color: var(--c); background: rgba(255, 255, 255, 0.07); box-shadow: none; }
.gr-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.05em; }
.gr-name { font-size: 0.85em; font-weight: 900; color: var(--c); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gr-fx { font-size: 0.7em; font-weight: 700; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gear-row .more { font-style: normal; font-size: 1.3em; color: var(--gold); }
.eq { display: inline-block; padding: 0 0.35em; border-radius: 0.3em; font-size: 0.78em; font-weight: 900; color: #04241a; background: var(--green); vertical-align: 0.06em; }
.gear-none { color: var(--muted); font-size: 0.8em; font-weight: 700; line-height: 1.4; padding: 0.6em 0.8em; }
.gear-info { flex: none; max-width: 20.5em; padding: 0.5em 0.7em 0.4em; text-align: left; }
.gi-pity { display: flex; align-items: center; gap: 0.5em; font-size: 0.8em; color: var(--gold); }
.gi-pity b { white-space: nowrap; }
.pity-bar { flex: 1; height: 0.45em; border-radius: 0.3em; background: rgba(255, 255, 255, 0.1); overflow: hidden; }
.pity-bar > i { display: block; height: 100%; background: linear-gradient(90deg, #ffb020, #ffd166); }
.gi-note { margin: 0.15em 0 0.3em; color: var(--muted); font-size: 0.66em; font-weight: 600; line-height: 1.3; }
.drop-table { width: 100%; border-collapse: collapse; font-size: 0.66em; }
.drop-table th, .drop-table td { padding: 0.12em 0.25em; text-align: right; white-space: nowrap; }
.drop-table th { color: var(--muted); font-weight: 800; }
.drop-table td { font-weight: 700; border-top: 1px solid rgba(255, 255, 255, 0.07); }
.drop-table th:first-child, .drop-table td:first-child { padding-left: 0; text-align: left; }
.gear .done { flex: none; padding: 0.7em 1em; }
/* Short frames (wide screens, 16:9 phones): a tighter screen, so the list keeps room for rows. */
.short-frame .gear { gap: 0.4em; }
.short-frame .gear .title { font-size: 1.5em; }
.short-frame .gear .done { padding: 0.6em 1em; }
.dev-gear { flex: none; font-size: 0.7em; opacity: 0.7; }
.gp-head { flex: none; display: flex; align-items: center; gap: 0.7em; width: 100%; max-width: 20.5em; text-align: left; }
.gp-title { min-width: 0; }
.gp-title .title { font-size: 1.6em; color: var(--c); line-height: 1.15; }
.gp-title .sub { margin-top: 0.1em; font-size: 0.85em; }
.gp-panel { flex: none; max-width: 20.5em; padding: 0.7em 0.85em; text-align: left; }
.gp-panel .pips { margin: 0 0 0.6em; }
.gp-panel .pips i { flex: 1; height: 0.4em; }
.gp-panel dl { display: grid; grid-template-columns: auto 1fr; gap: 0.4em 0.7em; margin: 0; font-size: 0.82em; line-height: 1.3; }
.gp-panel dt { color: var(--muted); font-weight: 800; white-space: nowrap; }
.gp-panel dd { margin: 0; font-weight: 700; }
.gp-panel dd b { color: var(--gold); }
.gp-note { margin-top: 0.6em; color: var(--green); font-size: 0.72em; font-weight: 700; }
.gear-piece .enhance { flex: none; margin-top: 0.3em; }
.btn[disabled] { filter: grayscale(0.85) brightness(0.65); cursor: default; transform: none; }
.gp-why { color: #ffb36b; font-size: 0.8em; font-weight: 800; line-height: 1.4; margin-top: -0.2em; }
.gp-max { color: var(--gold); font-weight: 900; margin-top: 0.3em; }
.gp-actions { flex: none; display: flex; gap: 0.6em; width: 100%; max-width: 15em; }
.gp-actions .btn { flex: 1; width: auto; padding: 0.65em 0.6em; font-size: 0.95em; }
.btn-ghost[disabled] { opacity: 0.4; filter: none; }
/* t187: the piece fits one screen: header (with its × close) on top, the actions pinned below; only the middle may scroll. */
.gear-piece { justify-content: flex-start; gap: 0.45em; padding-bottom: 1em; }
.gp-x { flex: none; margin-left: auto; align-self: flex-start; }
.gp-body { flex: 1 1 auto; min-height: 0; width: 100%; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; align-items: center; gap: 0.5em; }
.gp-body > * { flex: none; }
.gp-body > .gp-panel { width: 100%; }
.gear-piece canvas.sk-preview { height: clamp(76px, 12vh, 150px); }
.gear-piece .gp-title .title { font-size: 1.4em; }
.gear-piece .sk-cards { margin: 0.4em 0 0; }
.gear-piece .gp-note { margin-top: 0.4em; }
.gear-piece .gp-dm-block { flex: none; margin-top: -0.2em; }
/*
 * t231: the piece header as one bar: icon, name, slot line and × centred on one axis, with room around the ×. The name wraps only at
 * its " · " (src/ui.ts `headName`: each part one block, kept whole; Chinese never split inside a word), and the piece name keeps its +N.
 */
.gear-piece .gp-head { gap: 0.6em; padding: 0.35em 0.4em 0.35em 0.35em; border-radius: 0.9em; }
.gear-piece .gp-head .ico { width: 2.8em; height: 2.8em; padding: 0.5em; }
.gear-piece .gp-title { flex: 1 1 auto; display: flex; flex-direction: column; gap: 0.18em; }
.gear-piece .gp-title .title { font-size: 1.22em; line-height: 1.22; word-break: keep-all; text-wrap: balance; }
.gp-seg { display: inline-block; }
.gear-piece .gp-title .sub { margin-top: 0; font-size: 0.8em; line-height: 1.25; }
.gear-piece .gp-x { align-self: center; margin-left: 0.15em; width: 1.75em; height: 1.75em; font-size: 1.15em; }
/* t230: the Bag's close: a × upper left (no 完成 button), clear of the centred 背包 title. */
.gear-x { position: absolute; top: calc(var(--safe-top, 0px) + 0.75em); left: 0.9em; z-index: 3; --hit-y: 0.3em; --hit-x: 0.3em; }
.dismantle .sub { margin-top: -0.2em; font-weight: 900; }
.dm-panel { flex: none; max-width: 18em; padding: 0.9em; display: flex; flex-direction: column; align-items: center; gap: 0.4em; }
.dm-line { font-size: 0.82em; font-weight: 700; line-height: 1.35; }
.dm-line.muted { color: var(--muted); }
.dm-line.warn { color: #ffb36b; }
.btn-danger {
  color: #fff;
  background: linear-gradient(180deg, #ff8a9c, #ff4d6d 60%, #e0304f);
  box-shadow: 0 0.28em 0 #9c1c33, 0 0.7em 1.4em rgba(255, 77, 109, 0.25);
}
/* The gear guarantee's progress under a stage win's reward cards. */
.drop-pity { color: var(--muted); font-size: 0.75em; font-weight: 700; }
.result.has-drops { gap: 0.6em; }
/* A short frame with everything at once (rating, cards, drops): tighter, so the buttons stay on screen. */
.short-frame .result.has-drops { gap: 0.45em; }
.short-frame .result.has-drops .title.big { font-size: 2.3em; }
.short-frame .result.has-drops .stats { padding: 0.6em 0.9em; gap: 0.4em; }
.short-frame .result.has-drops .btn-text.home { padding: 0.35em 1.2em; }

/* ---- upgrade cards ---------------------------------------------------- */

.cards { display: flex; flex-direction: column; gap: 0.75em; width: 100%; max-width: 19em; margin-top: 0.5em; }
.card {
  display: flex;
  align-items: center;
  gap: 0.9em;
  padding: 0.85em 0.95em;
  border-radius: 1.05em;
  text-align: left;
  background: linear-gradient(135deg, rgba(40, 52, 110, 0.97), rgba(18, 24, 58, 0.97));
  border: 2px solid var(--c);
  box-shadow: 0 0.35em 0 rgba(0, 0, 0, 0.35), 0 0 1.4em color-mix(in srgb, var(--c) 25%, transparent);
  animation: cardIn 0.38s cubic-bezier(0.2, 1.4, 0.4, 1) backwards;
  transition: transform 0.08s;
}
.card:nth-child(2) { animation-delay: 0.07s; }
.card:nth-child(3) { animation-delay: 0.14s; }
.card:active { transform: scale(0.97); }
.card-body { flex: 1; min-width: 0; }
.card-name { font-weight: 900; font-size: 1.12em; color: var(--c); }
.card-lv { font-size: 0.8em; letter-spacing: 0.04em; opacity: 0.9; }
.card-desc { color: var(--text); font-size: 0.88em; margin-top: 0.15em; opacity: 0.9; }
.pips { display: flex; gap: 0.25em; margin-top: 0.4em; }
.pips i { width: 0.9em; height: 0.32em; border-radius: 0.2em; background: rgba(255, 255, 255, 0.15); }
.pips i.on { background: var(--c); }
/* Evolution: a gold frame with a slow shine, and the fused skills named above the title. */
.card.evo {
  position: relative;
  overflow: hidden;
  border-color: var(--gold);
  background: linear-gradient(135deg, rgba(92, 66, 18, 0.97), rgba(36, 22, 50, 0.97));
  box-shadow: 0 0.35em 0 rgba(0, 0, 0, 0.35), 0 0 1.8em rgba(255, 209, 102, 0.45);
}
.card.evo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 35%, rgba(255, 240, 200, 0.22) 50%, transparent 65%);
  transform: translateX(-100%);
  animation: evoShine 2.2s ease-in-out 0.4s infinite;
  pointer-events: none;
}
@keyframes evoShine { to { transform: translateX(100%); } }
.card.evo .ico { color: var(--gold); }
.evo-tag { font-size: 0.66em; font-weight: 900; letter-spacing: 0.08em; color: var(--gold); text-transform: uppercase; }
/* Crit tactic: its own tag, in its colour (not an evolution's gold frame). */
.evo-tag.tac { color: var(--c); }
.card.tactic { border-style: dashed; }
/* Ultimate: the skill's own colour with a gold halo and tag; the new mechanic in bold. */
.card.ult { box-shadow: 0 0.35em 0 rgba(0, 0, 0, 0.35), 0 0 1.6em rgba(255, 209, 102, 0.4); }
.card.ult .card-desc b { color: var(--gold); font-weight: 800; }
/* "Unlocks <evolution>": picking this card makes an evolution ready. */
.evo-hint { margin-top: 0.2em; font-size: 0.72em; font-weight: 800; color: var(--gold); }

/*
 * Auto-select after 10s (owner addendum 2026-10-27 §5): a switch under the cards and, while it is on, the seconds left in gold
 * and a bar that empties (real time; src/autopick.ts). Off, the row is just the switch.
 */
.auto-pick-row { position: relative; display: flex; align-items: center; justify-content: center; gap: 0.55em; width: 100%; max-width: 19em; margin-top: 0.1em; padding-bottom: 0.4em; }
.auto-pick { display: flex; align-items: center; gap: 0.5em; padding: 0.72em 0.9em; border-radius: 2em; font-size: 0.8em; font-weight: 800; color: var(--muted); background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.16); }
.auto-pick[aria-checked="true"] { color: var(--text); border-color: rgba(255, 209, 102, 0.55); }
.ap-knob { position: relative; flex: none; display: inline-block; width: 2em; height: 1.15em; border-radius: 1em; background: rgba(255, 255, 255, 0.2); transition: background 0.15s; }
.ap-knob::after { content: ""; position: absolute; top: 0.15em; left: 0.15em; width: 0.85em; height: 0.85em; border-radius: 50%; background: #fff; transition: transform 0.15s; }
.ap-knob.on { background: var(--gold); }
.ap-knob.on::after { transform: translateX(0.85em); }
.ap-count { min-width: 2.4em; font-size: 0.95em; font-weight: 900; color: var(--gold); text-align: left; font-variant-numeric: tabular-nums; }
.ap-bar { position: absolute; left: 1.5em; right: 1.5em; bottom: 0; height: 0.2em; border-radius: 0.2em; background: rgba(255, 255, 255, 0.1); overflow: hidden; }
.ap-bar i { display: block; height: 100%; background: var(--gold); transform-origin: left center; transform: scaleX(var(--p, 1)); }
.auto-pick-row:not(.on) .ap-count, .auto-pick-row:not(.on) .ap-bar { visibility: hidden; }
.short-frame .upgrade .auto-pick-row { margin-top: 0; }

/* ---- HUD -------------------------------------------------------------- */

/* Ends above the upgrade-chips row (Stage E: the row once ran under its bottom 0.45em). */
.pause-btn {
  position: absolute;
  top: calc(var(--safe-top, 0px) + 0.2em);
  right: 0.55em;
  width: 2.2em;
  height: 2.2em;
  padding: 0.45em;
  border-radius: 0.75em;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

/*
 * The compact cloud-save indicator (V1.1.1; ui.ts setSync, src/account.ts syncBadge): a small badge on the pause button in a run
 * and on the account chip in the menu, never over the battlefield, so the base HP bar and the turret's lane always stay clear.
 * Each state has its own mark as well as its colour: "!" action needed (amber), "↻" waiting to retry (gold), a turning ring
 * while syncing (cyan; still with reduced motion), "✓" saved (green; only on the server's confirmation, for 3 s).
 */
#ui[data-sync="action"] { --sync-c: #ffb020; --sync-mark: "!"; }
#ui[data-sync="retry"] { --sync-c: #ffd166; --sync-mark: "↻"; }
#ui[data-sync="syncing"] { --sync-c: #4cc9f0; --sync-mark: ""; }
#ui[data-sync="saved"] { --sync-c: #2ee59d; --sync-mark: "✓"; }
#ui[data-sync] .acct-chip { position: relative; }
#ui[data-sync] .pause-btn::after, #ui[data-sync] .acct-chip::after {
  content: var(--sync-mark);
  position: absolute;
  top: -0.35em;
  right: -0.35em;
  width: 1.05em;
  height: 1.05em;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: max(0.62em, 9px);
  font-weight: 900;
  line-height: 1;
  color: #10131c;
  background: var(--sync-c);
  box-shadow: 0 0 0 2px #0b1020;
  pointer-events: none;
}
#ui[data-sync="syncing"] .pause-btn::after, #ui[data-sync="syncing"] .acct-chip::after {
  background: #0b1020;
  border: 2px solid var(--sync-c);
  border-top-color: transparent;
  box-sizing: border-box;
  animation: syncSpin 1s linear infinite;
}
@keyframes syncSpin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { #ui[data-sync="syncing"] .pause-btn::after, #ui[data-sync="syncing"] .acct-chip::after { animation: none; } }
.reduce-motion #ui[data-sync="syncing"] .pause-btn::after, .reduce-motion #ui[data-sync="syncing"] .acct-chip::after { animation: none; }
/* The words, on the pause screen and in the account sheet. */
.sync-line { display: inline-block; margin: 0.2em auto 0.4em; padding: 0.25em 0.7em; border-radius: 0.6em; font-size: 0.78em; font-weight: 800;
  color: #ffd77a; background: rgba(58, 42, 0, 0.75); border: 1px solid rgba(255, 176, 32, 0.45); }
.sync-line[data-sync="syncing"], .sync-line[data-sync="saved"] { color: #c9e7ff; background: rgba(0, 0, 0, 0.35); border-color: rgba(120, 160, 255, 0.35); }
/*
 * The website loader's own "sync paused" notice (a fixed link at the page's lower left, which covered the base HP bar) steps aside
 * on pages where the game shows the state itself (main.ts sets data-fd-sync-ui). Presentation only; the loader keeps the sync.
 */
html[data-fd-sync-ui] a[data-sync-paused] { display: none !important; }

/*
 * Challenge stages (fifteen, V1.0): the picked stage's details on top, then the three groups in a
 * list that scrolls inside the frame (never the page), so Play and Back always stay on screen.
 */
.challenge { justify-content: flex-start; gap: 0.5em; }
.challenge .title { font-size: 1.7em; flex: none; }
.stage-info { flex: none; max-width: 20.5em; padding: 0.55em 0.8em 0.6em; text-align: left; }
.si-head { font-weight: 900; color: var(--gold); }
.si-head span { color: var(--muted); font-size: 0.8em; letter-spacing: 0.06em; margin-right: 0.2em; }
.si-focus { font-size: 0.8em; font-weight: 700; margin: 0.1em 0 0.35em; }
.stage-info dl { display: grid; grid-template-columns: auto 1fr; gap: 0.18em 0.6em; margin: 0; font-size: 0.72em; line-height: 1.3; }
.stage-info dt { color: var(--muted); font-weight: 800; white-space: nowrap; }
.stage-info dd { margin: 0; min-width: 0; font-weight: 600; }
.stage-info dd.gems { display: flex; align-items: center; gap: 0.15em; margin: 0; color: #9be7ff; font-weight: 900; }
.stage-info dd.gems span { margin-left: 0.4em; font-weight: 700; }
/* Each tag is a box of its own: lines break between tags, and a tag longer than the line wraps inside its box (no overflow in English). */
.stage-info .tag { display: inline-block; max-width: 100%; margin: 0.1em 0 0 0.1em; padding: 0 0.35em; border-radius: 0.3em; font-size: 0.92em; color: #ffb36b; background: rgba(255, 159, 28, 0.12); vertical-align: top; }
.stage-info .you { margin-left: 0.3em; font-weight: 800; white-space: nowrap; }
.stage-info .you.low { color: #ff9f1c; }
.stage-info .note { color: var(--muted); }
.stage-info .ok, .stage-tile .ok { color: var(--green); }
.stage-scroll {
  position: relative; flex: 0 1 auto; min-height: 0; width: 100%; max-width: 20.5em; overflow-y: auto; overflow-x: hidden;
  touch-action: pan-y; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 0.55em; padding: 0.35em 0.1em;
  /* Soft top and bottom edges, so a list that goes on reads as one that scrolls. */
  -webkit-mask-image: linear-gradient(transparent, #000 0.5em, #000 calc(100% - 0.5em), transparent);
  mask-image: linear-gradient(transparent, #000 0.5em, #000 calc(100% - 0.5em), transparent);
}
.stage-group .rec-head { margin: 0 0 0.35em 0.2em; text-align: left; }
.stage-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.35em; }
.stage-tile {
  position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 0.45em; align-items: center; min-width: 0;
  padding: 0.35em 0.5em; border-radius: 0.7em; text-align: left; color: var(--muted);
  background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.14);
}
.stage-tile .num { grid-row: span 2; width: 1.35em; font-size: 1.15em; font-weight: 900; text-align: center; color: var(--text); }
.stage-tile .name { font-size: 0.8em; font-weight: 900; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Second line: cleared / not yet / what unlocks it, and the first-clear diamonds still to win. */
.stage-tile .state { display: flex; align-items: center; gap: 0.3em; min-width: 0; font-size: 0.66em; font-weight: 700; white-space: nowrap; }
.stage-tile .state > span { display: flex; align-items: center; gap: 0.25em; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.stage-tile .state svg { flex: none; width: 1em; height: 1em; }
.stage-tile .fc { flex: none; display: flex; align-items: center; margin-left: auto; font-style: normal; font-weight: 900; color: #9be7ff; }
.stage-tile.sel { border-color: var(--gold); background: rgba(255, 209, 102, 0.14); box-shadow: 0 0 0.8em rgba(255, 209, 102, 0.18); }
.stage-tile.sel .name { color: var(--gold); }
.stage-tile.locked { opacity: 0.5; }
/* Stage ratings (beta brief §4): S / SS / SSS badges on the stage list, the stage detail and the result screen. Static (no flashing). */
.rk {
  display: inline-block; flex: none; min-width: 1.2em; padding: 0 0.28em; border-radius: 0.3em; font-style: italic; font-weight: 900;
  letter-spacing: 0.02em; line-height: 1.3; text-align: center; color: #10162e; background: #b9c6e8;
}
.rk.r2 { background: var(--gold); }
.rk.r3 { background: linear-gradient(100deg, #ffd166, #ff9bd6 55%, #9be7ff); }
.rk.big { font-size: 1.6em; padding: 0 0.3em; border-radius: 0.25em; }
.stage-tile .state .rk { font-size: max(1em, 9px); }
.si-best { float: right; display: inline-flex; align-items: center; gap: 0.3em; margin-left: 0.4em; color: var(--muted); font-size: 0.75em; font-weight: 800; }
.si-best .rk { font-size: 1.1em; }
/* Stage detail: the rating conditions and rewards on two full-width lines under the facts (kept short so the stage list keeps its room). */
.si-rank { display: flex; flex-direction: column; gap: 0.2em; margin-top: 0.3em; font-size: 0.72em; font-weight: 600; line-height: 1.3; }
.rk-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.1em 0.55em; }
.rk-dt { color: var(--muted); font-weight: 800; }
.rk-need { display: inline-flex; align-items: baseline; gap: 0.3em; min-width: 0; }
.rk-need .rk { font-size: 0.9em; }
.rk-gift { color: var(--gold); font-weight: 800; white-space: nowrap; }
.rk-gift .coin { width: 0.95em; height: 0.95em; margin-right: 0.2em; vertical-align: -0.12em; }
.rk-gift.ok { color: var(--green); }
.rk-soon { color: var(--muted); }
.challenge .play-stage { flex: none; padding: 0.7em 1em; }
.stage-progress { flex: none; color: var(--muted); font-size: 0.72em; font-weight: 700; margin-top: -0.2em; }
/* Website 0024: a first-clear reward waiting to be claimed (tile marker), and the picked stage's claim row (outside the scrolling list). */
.stage-tile .fc.can { color: var(--gold); text-shadow: 0 0 0.5em rgba(255, 209, 102, 0.55); }
.stage-tile .fc.can::after { content: '!'; margin-left: 0.15em; color: var(--gold); }
.cfc-bar {
  flex: none; display: flex; align-items: center; gap: 0.5em; min-height: 2.6em; padding: 0.25em 0.6em; border-radius: 0.6em;
  background: rgba(155, 231, 255, 0.08); font-size: 0.8em; font-weight: 700;
}
.cfc-head { color: var(--muted); white-space: nowrap; }
.cfc-rew { display: inline-flex; align-items: center; font-weight: 900; color: #9be7ff; }
.cfc-note { color: var(--muted); margin-left: auto; text-align: right; }
.cfc-done { margin-left: auto; color: var(--green); white-space: nowrap; }
.cfc-bar .cfc-claim { margin-left: auto; min-height: 44px; min-width: 7.5em; padding: 0.35em 1em; font-size: 1em; }
.cfc-bar .cfc-claim[disabled] { opacity: 0.6; }
.challenge .back { flex: none; padding: 0.3em 1.2em; margin-top: -0.4em; }
.dev-unlock { flex: none; font-size: 0.7em; opacity: 0.7; }
.dev-unlock.on { color: var(--gold); border-color: var(--gold); opacity: 1; }
/* Local `?dev` builds only: the QA chips under the stage list, side by side. */
.dev-row { flex: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 0.35em; }
.dev-preview { flex: none; font-size: 0.7em; opacity: 0.7; }
/*
 * Back on the stage list after a result: the stage whose best rating just rose pops its badge once,
 * with a soft glow on its tile (with reduced motion the badge only fades in). Nothing repeats.
 */
.stage-tile.rank-pop { animation: tileGlow 1.2s ease-out 0.2s backwards; }
.stage-tile.rank-pop .rk { animation: rankPop 0.55s cubic-bezier(0.2, 1.8, 0.4, 1) 0.3s backwards; }
/* The state line clips long text; the badge growing past it for a moment must not be cut. */
.stage-tile.rank-pop .state > span { overflow: visible; }
@keyframes rankPop { from { transform: scale(0.3); opacity: 0; } 60% { transform: scale(1.25); opacity: 1; } }
@keyframes tileGlow { 35% { box-shadow: 0 0 1.1em 0.15em rgba(255, 209, 102, 0.5); } }
.reduce-motion .stage-tile.rank-pop .rk { animation: fadeIn 0.4s ease-out 0.15s backwards; }

.shop-levels { display: flex; gap: 0.6em; }
.shop-levels span { display: inline-flex; align-items: center; gap: 0.15em; color: var(--c); }
.shop-levels svg { width: 1em; height: 1em; }
.shop-levels b { color: var(--text); }
.shop-list { max-width: 20.5em; padding: 0.35em 0.6em; display: flex; flex-direction: column; text-align: left; }
.shop-row { display: flex; align-items: center; gap: 0.6em; padding: 0.5em 0; }
.shop-row + .shop-row { border-top: 1px solid rgba(255, 255, 255, 0.08); }
.shop-row .ico { flex: none; width: 2em; height: 2em; padding: 0.38em; border-radius: 0.6em; color: var(--c); background: rgba(255, 255, 255, 0.07); }
.shop-info { flex: 1; min-width: 0; }
.shop-name { font-weight: 900; font-size: 0.92em; color: var(--c); }
.shop-desc { color: var(--muted); font-size: 0.8em; font-weight: 600; white-space: nowrap; }
.shop-desc .lv { font-weight: 800; }
.shop-desc b { color: var(--text); }
.shop-row .buy { flex: none; font-size: 0.9em; padding: 0.55em 0.6em; gap: 0.22em; }
/* A track row stays one line where it fits; with the five-digit Stage D costs a long one (Chinese,
   Damage at x.5%) wraps after the level, its effect kept whole, instead of running under the button. */
.shop-row .shop-desc { white-space: normal; line-height: 1.3; }
.shop-row .shop-desc .lv, .shop-row .shop-desc .fx { white-space: nowrap; }
.shop-note { font-size: 0.75em; }
/* Upgrades, Combo Fever and the active skills: the list scrolls inside the frame when it is too tall. */
.shop .shop-list { flex: 0 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; touch-action: pan-y; overscroll-behavior: contain; }
.shop .title, .shop .wallet, .shop .done, .shop .shop-note { flex: none; }
/* The Fever row's tiers grow with its level: they may wrap (the track rows stay one line). */
.shop-desc.wrap { white-space: normal; line-height: 1.3; }
.shop-next { color: var(--muted); font-size: 0.7em; font-weight: 600; line-height: 1.3; margin-top: 0.1em; }
.shop-head { margin: 0.45em 0 0.05em; padding-top: 0.45em; border-top: 1px solid rgba(255, 255, 255, 0.14); color: var(--muted); font-size: 0.68em; font-weight: 900; letter-spacing: 0.06em; }
.shop-head + .shop-row { border-top: 0; }
.cd-note { color: var(--muted); font-size: 0.78em; font-weight: 700; }
.owned { flex: none; color: var(--green); font-size: 0.8em; font-weight: 900; white-space: nowrap; }
.short-frame .shop { gap: 0.55em; }
.short-frame .shop .title { font-size: 1.7em; }
.short-frame .shop .done { padding: 0.65em 1em; }
/* Active-skill picker: one card per skill; a locked one shows its cost (unlocked in the shop). */
.skill-picker { gap: 0.6em; }
.skill-list { flex: 0 1 auto; min-height: 0; overflow-y: auto; touch-action: pan-y; display: flex; flex-direction: column; gap: 0.5em; width: 100%; max-width: 20.5em; padding: 0.2em 0.1em; }
.skill-card {
  flex: none; display: flex; align-items: center; gap: 0.65em; padding: 0.6em 0.7em; border-radius: 0.9em; text-align: left;
  background: linear-gradient(135deg, rgba(40, 52, 110, 0.92), rgba(18, 24, 58, 0.95)); border: 1.5px solid color-mix(in srgb, var(--c) 45%, transparent);
}
.skill-card .ico { width: 2.4em; height: 2.4em; padding: 0.45em; border-radius: 0.7em; color: #0b1020; }
.skill-card.sel { border-color: var(--c); box-shadow: 0 0 1em color-mix(in srgb, var(--c) 35%, transparent); }
.skill-card.locked { opacity: 0.7; }
.skill-card.locked .ico { filter: grayscale(0.6); }
.skill-card:active { transform: scale(0.98); }
.sc-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.12em; }
.sc-name { color: var(--c); font-size: 0.95em; font-weight: 900; }
.sc-name .free { color: var(--muted); font-size: 0.75em; font-weight: 700; }
.sc-desc { color: var(--text); font-size: 0.74em; font-weight: 600; line-height: 1.3; opacity: 0.9; }
.sc-cd { color: var(--muted); font-size: 0.68em; font-weight: 700; }
.sc-state { flex: none; display: inline-flex; align-items: center; gap: 0.25em; font-size: 0.78em; font-weight: 900; color: var(--gold); white-space: nowrap; }
.sc-state.on { color: var(--green); }
.sc-state.locked { color: var(--muted); }
.sc-state svg { width: 1em; height: 1em; }
.skill-note { font-size: 0.72em; }
.skill-picker .back { flex: none; }
/* Earned diamonds beside the coins (local and unverified in this alpha). */
.gems { display: inline-flex; align-items: center; gap: 0.3em; margin-left: 0.35em; color: #9be7ff; }
.gem {
  display: inline-block; width: 0.72em; height: 0.72em; margin: 0 0.08em; transform: rotate(45deg); border-radius: 0.12em;
  background: linear-gradient(135deg, #e6fbff, #6fd8ff 50%, #2b8fd6); box-shadow: inset 0 0 0 0.08em rgba(10, 60, 110, 0.5);
}
/* One-time V1.0 notice: old vs new permanent effects, then what was moved, granted and backed up. */
.notice .shop-list { padding: 0.2em 0.6em; }
.notice-row { display: flex; align-items: center; gap: 0.6em; padding: 0.45em 0; }
.notice-row + .notice-row { border-top: 1px solid rgba(255, 255, 255, 0.08); }
.notice-row .ico { flex: none; width: 1.9em; height: 1.9em; padding: 0.36em; border-radius: 0.6em; color: var(--c); background: rgba(255, 255, 255, 0.07); box-shadow: none; }
.notice-row .shop-name .lv { color: var(--muted); font-size: 0.85em; }
.notice-list { max-width: 19em; margin: 0; padding: 0 0 0 1.1em; text-align: left; color: var(--muted); font-size: 0.8em; font-weight: 600; line-height: 1.4; }
.notice-list li + li { margin-top: 0.3em; }
/* The title, the line under it and the button stay put; everything between scrolls inside the frame when it is too tall. */
.notice .title, .notice .sub, .notice .done { flex: none; }
.notice-body {
  flex: 0 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; touch-action: pan-y; overscroll-behavior: contain;
  display: flex; flex-direction: column; align-items: center; gap: 0.7em; width: 100%; padding: 0.1em 0;
}
.notice-body > * { flex: none; }
.short-frame .notice { gap: 0.5em; }
.short-frame .notice .title { font-size: 1.6em; }
/* The kept coins, each track's next-level cost (V0.9 → now) and one line on what that means. */
.notice-coins { display: inline-flex; align-items: center; gap: 0.3em; color: var(--gold); font-size: 0.85em; font-weight: 800; }
.notice-row .notice-cost { color: var(--muted); }
.notice-row .notice-cost .coin { width: 0.85em; height: 0.85em; margin-right: 0.15em; vertical-align: -0.08em; }
.notice-costs { max-width: 19em; color: var(--muted); font-size: 0.78em; font-weight: 600; line-height: 1.35; }
/* Records with the V0.9 section: tighter so all three panels fit a short frame. */
.records-panel.has-legacy { gap: 0.6em; }
.records-panel.has-legacy .stats:not(.legacy) { padding: 0.65em 0.9em; gap: 0.45em; }
.stats.legacy { font-size: 0.8em; padding: 0.55em 0.7em; gap: 0.35em 0.5em; max-width: 21.25em; opacity: 0.85; }
.stats.legacy span { white-space: nowrap; }
/*
 * The Endless page (V1.1 2.3): the title, the line under it, Start and Back stay put; the records, rules and loadout scroll inside
 * the frame when it is too short, with soft edges and the result screen's chevron at an edge with more beyond.
 */
.endless-page .title { font-size: 1.7em; }
.endless-page .sub.narrow { max-width: 19em; }
.endless-page .title, .endless-page .sub, .endless-page .start-endless, .endless-page .back { flex: none; }
.endless-page .extras-box { max-width: 19em; }
.endless-page .extras-box.more-above::before, .endless-page .extras-box.more-below::after { opacity: 0.85; }
.endless-body {
  flex: 0 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; touch-action: pan-y; overscroll-behavior: contain;
  display: flex; flex-direction: column; align-items: center; gap: 0.7em; width: 100%; padding: 0.3em 0;
  -webkit-mask-image: linear-gradient(transparent, #000 0.3em, #000 calc(100% - 0.3em), transparent);
  mask-image: linear-gradient(transparent, #000 0.3em, #000 calc(100% - 0.3em), transparent);
}
.endless-body > * { flex: none; }
.endless-body .stats { max-width: 19em; padding: 0.65em 0.9em; gap: 0.45em; }
.endless-body .notice-list { max-width: none; padding-left: 1.35em; }
.endless-note { max-width: 19em; color: var(--muted); font-size: 0.8em; font-weight: 600; line-height: 1.4; }
.endless-note.loadout { display: flex; align-items: center; gap: 0.45em; color: #c9e7ff; text-align: left; }
.endless-note.loadout svg { flex: none; width: 1.35em; height: 1.35em; color: var(--c); }
.endless-note.loadout .nb { white-space: nowrap; }
.short-frame .endless-page, .short-frame .endless-body { gap: 0.55em; }
.short-frame .endless-page .title { font-size: 1.5em; }
.short-frame .endless-body .stats { padding: 0.5em 0.8em; gap: 0.3em; }
.reward .bonus { color: var(--gold); font-size: 0.8em; font-weight: 800; }

.records {
  display: flex; align-items: center; gap: 0.4em; max-width: 19em; color: var(--muted); font-size: 0.78em; font-weight: 700; text-align: left;
  padding: 0.3em 0.6em; border-radius: 0.7em; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1);
}
.records svg { flex: none; width: 1.3em; height: 1.3em; color: var(--gold); }
.records .more { font-style: normal; font-size: 1.3em; color: var(--gold); margin-left: 0.1em; }
/* Menu: Records beside a compact Achievements button (medal and count). */
.rec-row { display: flex; align-items: stretch; justify-content: center; gap: 0.4em; width: 100%; max-width: 19em; }
.rec-row .records { flex: 0 1 auto; min-width: 0; }
.ach-btn {
  flex: none; display: flex; align-items: center; gap: 0.25em; padding: 0.3em 0.45em 0.3em 0.5em; border-radius: 0.7em; font-size: 0.78em; font-weight: 900;
  color: var(--gold); white-space: nowrap; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 209, 102, 0.3);
}
.ach-btn svg { flex: none; width: 1.3em; height: 1.3em; }
.ach-btn .more { font-style: normal; font-size: 1.3em; }
.ach-btn:active, .records:active { transform: scale(0.97); }

/* The shown title, in place of the tagline on the menu and after the result's subtitle. */
.tagline.titled { display: flex; justify-content: center; }
.title-pill {
  display: inline-flex; align-items: center; gap: 0.3em; padding: 0.15em 0.6em 0.15em 0.4em; border-radius: 2em; font-size: 0.9em; font-weight: 900;
  font-style: normal; letter-spacing: 0.02em; color: var(--gold); white-space: nowrap; vertical-align: 0.05em;
  background: rgba(60, 44, 8, 0.6); border: 1px solid rgba(255, 209, 102, 0.45);
}
.title-pill svg { flex: none; width: 1.1em; height: 1.1em; }
.result .sub .title-pill { font-size: 0.78em; margin-left: 0.2em; }
/* Membership titles (shown only while the membership is valid) wear their tier's frame. */
.title-pill.member-captain, .tchip.member-captain { border: 1.5px solid #ffb020; box-shadow: 0 0 0.55em rgba(255, 176, 32, 0.45); }
.title-pill.member-blackcard, .tchip.member-blackcard {
  color: #f3e3b0; background: linear-gradient(180deg, #1c1c1c, #050505); border: 1.5px solid #d4af37; box-shadow: 0 0 0.55em rgba(212, 175, 55, 0.5);
}
.tchip.member-blackcard svg { color: #d4af37; }
/* A run played (partly) at 2× or 3×. */
.speed-tag {
  display: inline-flex; align-items: center; gap: 0.15em; margin-left: 0.25em; padding: 0.05em 0.45em; border-radius: 1em; font-size: 0.78em; font-weight: 900;
  font-style: normal; color: #c8ff4d; border: 1px solid rgba(200, 255, 77, 0.5); vertical-align: 0.05em;
}
.speed-tag svg { width: 1em; height: 1em; }
/* 3× (BLACK only) in BLACK's gold, as its in-run chip (.speed-chip.faster), on the result and in Records alike. */
.speed-tag.faster { color: #f3e3b0; border-color: rgba(212, 175, 55, 0.8); }
.speed-tag.faster svg { color: #d4af37; }
/* Records: how the run that set a record was helped (2× or 3× speed, a membership assist), under its value; the meaning is in the hint. */
.rec-tags { display: flex; justify-content: center; flex-wrap: wrap; gap: 0 0.4em; font-style: normal; font-size: 0.62em; font-weight: 900; }
.rec-tags i { font-style: normal; }
.rec-speed { color: #c8ff4d; }
.rec-speed.faster { color: #e2c35a; }
.rec-assist { color: #e0aaff; }
/* A confirm step over the current screen (the DEV diamond double uses it). */
.sheet { position: absolute; inset: 0; z-index: 4; display: flex; align-items: center; justify-content: center; padding: 1.4em; background: rgba(3, 5, 13, 0.62); animation: fadeIn 0.15s ease-out; }
.sheet-box {
  display: flex; flex-direction: column; align-items: center; gap: 0.6em; width: 100%; max-width: 18em; padding: 1.1em 1em 0.6em; border-radius: 1em; text-align: center;
  background: linear-gradient(160deg, rgba(36, 48, 100, 0.97), rgba(16, 22, 52, 0.98)); border: 1px solid rgba(120, 160, 255, 0.3);
}
.sheet-box .title { font-size: 1.35em; }
/*
 * The account entry (V1.1 2.1): one line under the tagline (and a row at the top of Settings) opening
 * the account sheet. A long name is cut with an ellipsis; the badge keeps its size. COMMANDER: blue and
 * silver; BLACK: black and gold (V1.1.1; the badge rules below).
 */
.acct-chip {
  display: inline-flex; align-items: center; gap: 0.35em; flex: none; max-width: 100%; min-width: 0; margin-top: -0.2em; padding: 0.3em 0.8em 0.3em 0.5em;
  border-radius: 2em; font-size: 0.8em; font-weight: 800; color: #c9e7ff; background: rgba(0, 0, 0, 0.42); border: 1px solid rgba(120, 160, 255, 0.35);
}
.acct-chip:disabled { cursor: default; opacity: 0.75; }
/*
 * Short frames (16:9 desktop, short phones) had no room to spare for the chip's line: their logo is a little
 * smaller (as with the newer-save warning) and framed menus tighten their gaps. With that warning on a short
 * frame the chip gives way; Settings keeps the Account row (plan R7).
 */
html.short-frame .menu .logo { font-size: 0.85em; }
html.short-frame.sides .menu { gap: 0.42em; }
html.short-frame .menu.newer .acct-chip { display: none; }
.acct-chip svg { flex: none; width: 1.25em; height: 1.25em; }
.acct-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-row { padding-top: 0.55em; padding-bottom: 0.55em; }
.acct-two { display: flex; flex-direction: column; align-items: flex-start; gap: 0.1em; min-width: 0; text-align: left; }
.acct-line { display: flex; flex-wrap: wrap; align-items: center; gap: 0.1em 0.35em; max-width: 100%; min-width: 0; font-size: 0.82em; }
.acct-row .acct-label { color: var(--muted); font-weight: 700; }
.acct-badge { flex: none; font-style: normal; font-size: 0.8em; font-weight: 900; line-height: 1.35; letter-spacing: 0.08em; padding: 0.05em 0.45em; border-radius: 0.35em; white-space: nowrap; }
/*
 * Membership badges (V1.1.1): COMMANDER a premium blue and silver (silver letters on deep blue, a silver edge); BLACK black and
 * gold (gold letters on black, a gold edge). Where both show, BLACK comes first. The words stay in English (spec A6).
 */
.acct-badge.tier-captain { color: #eef4ff; background: linear-gradient(180deg, #2f5fb8, #173a7a); border: 1px solid #c9d6ea; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35); text-shadow: 0 1px 0 rgba(0, 0, 0, 0.45); }
.acct-badge.tier-black_card { color: #ffd76a; background: linear-gradient(180deg, #1b1b1f, #050507); border: 1px solid #d4a72c; box-shadow: inset 0 1px 0 rgba(255, 215, 106, 0.25); }
/* Local builds only: a mock (test) record's label, striped like the TEST MEMBER badge. */
.acct-badge.acct-test { color: #2a1600; letter-spacing: 0.03em; background: repeating-linear-gradient(135deg, #ffcf4d 0 0.6em, #ffb020 0.6em 1.2em); }
.acct-sheet .acct-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.4em; max-width: 100%; }
.acct-sheet .acct-tags .acct-badge { white-space: normal; }
.acct-sheet .acct-name { color: #ffffff; overflow-wrap: anywhere; }
/* keep-all: Chinese words break only at the label's spaces, never inside 本局金币翻倍 (its '·' are glued to the part before them). */
.dev-double { font-size: 0.82em; padding: 0.55em 0.7em; color: #c9e7ff; border-style: dashed; word-break: keep-all; }

/*
 * Achievements (V1.0): totals, the title picker, then every achievement in a list that scrolls
 * inside the frame (never the page).
 */
.achievements { justify-content: flex-start; gap: 0.5em; }
.achievements .title { font-size: 1.7em; flex: none; }
.ach-sum { flex: none; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 0.3em 0.8em; font-size: 0.85em; font-weight: 800; }
.ach-sum b { color: var(--gold); }
.ach-sum span { display: inline-flex; align-items: center; gap: 0.25em; color: var(--muted); }
.achievements .rec-head { flex: none; margin-bottom: -0.25em; }
.title-chips { flex: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 0.3em; width: 100%; max-width: 20.5em; }
.tchip {
  display: inline-flex; align-items: center; gap: 0.25em; padding: 0.3em 0.6em; border-radius: 2em; font-size: 0.72em; font-weight: 800; white-space: nowrap;
  color: var(--text); background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 255, 255, 0.16);
}
.tchip svg { flex: none; width: 1.05em; height: 1.05em; color: var(--gold); }
.tchip.sel { color: #3a1d00; background: linear-gradient(180deg, #ffe08a, #ffb020); border-color: transparent; }
.tchip.sel svg { color: #3a1d00; }
.tchip.locked { color: var(--muted); opacity: 0.6; }
.tchip.locked svg { color: var(--muted); }
.ach-scroll {
  position: relative; flex: 0 1 auto; min-height: 4em; width: 100%; max-width: 20.5em; overflow-y: auto; overflow-x: hidden;
  touch-action: pan-y; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 0.3em; padding: 0.35em 0.1em;
  -webkit-mask-image: linear-gradient(transparent, #000 0.5em, #000 calc(100% - 0.5em), transparent);
  mask-image: linear-gradient(transparent, #000 0.5em, #000 calc(100% - 0.5em), transparent);
}
.ach-row {
  flex: none; display: flex; align-items: center; gap: 0.55em; padding: 0.4em 0.55em; border-radius: 0.75em; text-align: left;
  background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1);
}
.ach-row.complete { background: rgba(60, 44, 8, 0.4); border-color: rgba(255, 209, 102, 0.45); }
.ach-row .ico { width: 1.9em; height: 1.9em; padding: 0.35em; border-radius: 0.55em; color: var(--muted); background: rgba(255, 255, 255, 0.07); box-shadow: none; }
.ach-row.complete .ico { color: var(--gold); }
.ach-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.1em; }
.ach-name { font-size: 0.85em; font-weight: 900; }
.ach-row.complete .ach-name { color: var(--gold); }
.ach-ok { color: var(--green); font-size: 0.8em; font-weight: 800; white-space: nowrap; }
.ach-desc { color: var(--muted); font-size: 0.7em; font-weight: 600; line-height: 1.3; }
.ach-titlename { color: #e0c27a; font-size: 0.66em; font-weight: 800; }
.ach-prog { display: flex; align-items: center; gap: 0.4em; font-size: 0.66em; font-weight: 800; color: var(--muted); }
.ach-prog .bar { flex: 1; max-width: 8em; height: 0.5em; border-radius: 0.3em; background: rgba(255, 255, 255, 0.1); overflow: hidden; }
.ach-prog .bar > i { display: block; height: 100%; background: linear-gradient(90deg, #ffb020, #ffd166); }
.ach-reward { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 0.15em; font-size: 0.72em; font-weight: 900; color: var(--gold); }
.ach-reward span { display: inline-flex; align-items: center; gap: 0.2em; white-space: nowrap; }
.ach-reward .r-gem { color: #9be7ff; }
.ach-tt { padding: 0 0.35em; border-radius: 0.3em; font-size: max(0.85em, 9px); color: #3a1d00; background: var(--gold); }
/* Beta: the list in sections, each with its count; a proven one waiting for the next run; the titles still to earn. */
.ach-sec {
  flex: none; display: flex; align-items: baseline; justify-content: space-between; gap: 0.5em; margin: 0.45em 0.2em -0.05em;
  color: var(--muted); font-size: max(0.7em, 9px); font-weight: 900; letter-spacing: 0.06em; text-transform: uppercase; text-align: left;
}
.ach-sec:first-child { margin-top: 0.1em; }
.ach-sec b { color: var(--gold); letter-spacing: 0; }
.ach-row.ready { border-color: rgba(6, 214, 160, 0.5); }
.ach-ready { color: var(--green); font-size: max(0.66em, 9px); font-weight: 800; line-height: 1.3; }
.ach-tmore { flex: none; display: inline-flex; align-items: center; gap: 0.3em; max-width: 20.5em; margin-top: -0.15em; color: var(--muted); font-size: max(0.68em, 9px); font-weight: 700; line-height: 1.3; }
.ach-tmore svg { flex: none; width: 1.05em; height: 1.05em; }
.ach-note { flex: none; font-size: 0.72em; }
.ach-note .nb, .records .nb { white-space: nowrap; }
/* The records' whole parts spread evenly over their lines, so a time (2:05) never sits alone on the last one. */
.records > span { text-wrap: balance; }
.achievements button.done { flex: none; padding: 0.7em 1em; }
.short-frame .achievements { gap: 0.4em; }
.short-frame .achievements .title { font-size: 1.5em; }
.short-frame .achievements button.done { padding: 0.6em 1em; }

/*
 * Result: the rating, the reward cards and the lines under them (achievements, the gear guarantee, the
 * first Stage 15 clear's crab line). On a short frame the block scrolls; the victory sequence scrolls
 * each card into view as it begins (src/ui.ts), and once settled a small chevron marks an edge with
 * more beyond it (`more-above` / `more-below` on the box).
 */
.extras-box { position: relative; flex: 0 1 auto; min-height: 0; display: flex; flex-direction: column; align-items: center; gap: inherit; width: 100%; max-width: 21em; }
.extras-box::before, .extras-box::after {
  content: ''; position: absolute; left: 50%; z-index: 1; width: 0.5em; height: 0.5em; margin-left: -0.25em; pointer-events: none;
  border: solid var(--muted); border-width: 0 0.14em 0.14em 0; opacity: 0; transition: opacity 0.2s ease-out;
}
.extras-box::before { top: -0.05em; transform: rotate(-135deg); }
.extras-box::after { bottom: -0.05em; transform: rotate(45deg); }
.result:not(.seq-on) .extras-box.more-above::before, .result:not(.seq-on) .extras-box.more-below::after { opacity: 0.85; }
.result-extras {
  position: relative; flex: 0 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; touch-action: pan-y; overscroll-behavior: contain;
  display: flex; flex-direction: column; align-items: center; gap: inherit; width: 100%; max-width: 21em; padding: 0.3em 0;
  /* Soft edges: a part cut by a short screen reads as one that scrolls. */
  -webkit-mask-image: linear-gradient(transparent, #000 0.3em, #000 calc(100% - 0.3em), transparent);
  mask-image: linear-gradient(transparent, #000 0.3em, #000 calc(100% - 0.3em), transparent);
}
.result-extras > * { flex: none; }
/* A stage win's rating card: three stars lit up to the rank, the badge, the four conditions met (✓) or missed (✗), the best line. */
.rating-got { display: flex; flex-direction: column; align-items: center; gap: 0.25em; max-width: 21em; }
.rk-head { display: flex; align-items: center; gap: 0.45em; font-weight: 900; color: var(--muted); }
.rk-lbl { font-size: 0.85em; }
.rk-stars { display: inline-flex; gap: 0.1em; font-size: 1.2em; line-height: 1.25; }
.rk-stars i { display: inline-block; font-style: normal; color: rgba(255, 255, 255, 0.16); }
.rk-stars i.on { color: var(--gold); text-shadow: 0 0 0.45em rgba(255, 209, 102, 0.55); }
.rating-got.r3 .rk-stars i.on { color: #ffe3a3; text-shadow: 0 0 0.5em rgba(255, 155, 214, 0.6); }
.rk-head .rk.big { display: inline-block; }
.rk-conds { display: grid; grid-template-columns: auto auto; justify-content: center; gap: 0.1em 0.8em; font-size: 0.78em; font-weight: 800; line-height: 1.35; text-align: left; }
.rk-c { display: inline-block; }
/* Package 7: the base combo's bracket on the combo line wraps as one piece. */
.rk-c .nb { white-space: nowrap; }
.rk-c.ok { color: var(--green); }
.rk-c.no { color: #ff8a9d; }
.rk-best { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: 0.1em 0.5em; }
.rk-best em { font-style: normal; font-weight: 900; color: var(--gold); font-size: 0.85em; }
.rk-note { color: #ffc6ef; font-size: 0.8em; font-weight: 800; }
/*
 * Reward cards (src/victory.ts): first-clear diamonds, the first SS's coins, gear (a drop today; the
 * first-SSS reward later, shown only as the DEV preview's dashed mock), materials, achievements and
 * the stage a win opened. One look for all of them: an icon in the reward's colour and one or two lines.
 */
.rw-card {
  display: flex; align-items: center; gap: 0.5em; width: 100%; max-width: 19em; padding: 0.28em 0.6em; border-radius: 0.75em; text-align: left;
  background: linear-gradient(135deg, rgba(40, 52, 110, 0.92), rgba(18, 24, 58, 0.92));
  border: 1px solid color-mix(in srgb, var(--c, #7890ff) 50%, transparent);
}
.rw-ico {
  flex: none; display: flex; align-items: center; justify-content: center; width: 1.6em; height: 1.6em; padding: 0.3em; border-radius: 0.5em;
  font-style: normal; color: var(--c, var(--gold)); background: color-mix(in srgb, var(--c, #ffffff) 14%, transparent);
}
.rw-ico .coin { flex: none; width: 1em; height: 1em; }
.rw-ico .gem { flex: none; width: 0.72em; height: 0.72em; }
.rw-text { display: flex; flex-direction: column; gap: 0.05em; min-width: 0; line-height: 1.25; }
.rw-text b { font-size: 0.86em; font-weight: 900; color: var(--c, var(--text)); }
.rw-text span { color: var(--muted); font-size: max(0.7em, 9px); font-weight: 700; }
.rw-gem { --c: #9be7ff; }
.rw-coins { --c: var(--gold); }
.rw-unlock { --c: var(--green); }
.rw-scrapped { --c: #ffb36b; }
.rw-scrapped b { font-size: 0.8em; }
.rw-ach { --c: var(--gold); justify-content: center; padding-block: 0.35em; }
.rw-mock { border-style: dashed; }
.ach-got { display: flex; flex-direction: column; align-items: center; gap: 0.15em; max-width: 20em; }
.ach-line { color: var(--gold); font-size: 0.9em; line-height: 1.3; text-wrap: balance; }
.ach-line .mini-ico { width: 1.25em; height: 1.25em; vertical-align: -0.25em; color: var(--gold); }
.ach-rew { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 0.15em 0.8em; font-size: 0.8em; font-weight: 900; color: var(--gold); }
.ach-rew span { display: inline-flex; align-items: center; gap: 0.25em; }
.ach-rew em { color: var(--muted); font-size: 0.85em; font-style: normal; font-weight: 700; margin-left: 0.2em; }
.ach-rew .ach-newtitle { color: #e0c27a; font-size: 0.92em; font-weight: 800; }
.crab-line { display: flex; align-items: center; gap: 0.45em; max-width: 25em; color: #ffd77a; font-size: 0.76em; font-weight: 700; line-height: 1.3; text-align: left; }
.crab-mini { flex: none; width: 2.3em; height: 2.1em; }
/* A short frame with a result this full: the four stats on one row, and the coins (label, amount, Income) on one row too. */
.short-frame .result.has-drops .stats:not(.six) { grid-template-columns: repeat(4, 1fr); padding: 0.5em 0.7em; }
.short-frame .result.has-drops .reward { flex-direction: row; flex-wrap: wrap; justify-content: center; column-gap: 0.5em; }
.short-frame .result.has-drops .reward-amt { font-size: 1.7em; }
/* The settlement: (a won stage's stats on one row and its records), the coins, Double Coins and where to go next. */
.settle { flex: none; display: flex; flex-direction: column; align-items: center; gap: inherit; width: 100%; }
.stats.row4 { grid-template-columns: repeat(4, 1fr); gap: 0.3em; padding: 0.45em 0.7em; max-width: 19em; }
.stats.row4 b { font-size: 1.1em; }
/* A short frame with a full result: a slimmer stats row and buttons, so more reward cards stay in view. */
.short-frame .result.has-drops .stats.row4 { padding: 0.35em 0.6em; gap: 0.1em 0.3em; }
.short-frame .result.has-drops .stats.row4 b { font-size: 1em; }
.short-frame .result.has-drops .settle .btn { padding: 0.62em 1em; }
/* The website promo's two-line Double button, as slim as the others there. */
.short-frame .result.has-drops .settle .btn-ad.promo { padding: 0.4em 1em 0.46em; gap: 0.16em; }
/*
 * t212: an Endless result (ui.ts showResult): the heading on top, the actions (Double Coins, Play again, Home) pinned below, and
 * between them one middle that scrolls (the six stats, any drops, the coins with the V1.1.2 Gold lines and server notes). It is never
 * a page taller than the frame centred under #ui's hidden overflow. A short frame is compact with or without reward cards.
 */
.result.endless { justify-content: center; justify-content: safe center; gap: 0.6em; }
.result.endless > :not(.extras-box) { flex: none; }
.result.endless .reward { width: 100%; }
.result.endless .reward .gold-break { margin-inline: auto; }
.short-frame .result.endless { gap: 0.45em; }
.short-frame .result.endless .title.big { font-size: 2.3em; }
.short-frame .result.endless .sub { margin-top: -0.3em; }
.short-frame .result.endless .stats { padding: 0.55em 0.8em; gap: 0.3em 0.6em; }
.short-frame .result.endless .stats b { font-size: 1.1em; }
.short-frame .result.endless .reward-amt { font-size: 1.7em; }
.short-frame .result.endless .settle .btn { padding: 0.62em 1em; }
.short-frame .result.endless .settle .btn-ad.promo { padding: 0.4em 1em 0.46em; gap: 0.16em; }
.short-frame .result.endless .btn-text.home { padding: 0.35em 1.2em; }
.rec-line { display: flex; align-items: center; gap: 0.45em; color: var(--gold); font-size: 0.8em; font-weight: 800; }
.rec-line .rec { font-style: normal; font-size: max(0.8em, 9px); font-weight: 900; letter-spacing: 0.04em; padding: 0 0.35em; border-radius: 0.3em; color: #3a1d00; background: var(--gold); }
/* Replay / Retry, the stage list and Home: one row of small buttons under the main one. */
.nav-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.4em; }
.nav-row .chip { padding: 0.45em 0.75em; white-space: nowrap; }
.result.staged .title.big { font-size: 2.4em; }
/* A won stage's coins on one row (label, amount, Income), so the rating and the cards keep their room. */
.result.staged .reward { flex-direction: row; flex-wrap: wrap; justify-content: center; column-gap: 0.5em; }
.result.staged .reward-amt { font-size: 1.7em; }
.short-frame .result.staged .title.big { font-size: 2.1em; }
/* DEV preview only (local `?dev` builds): says the rewards on screen are mock and nothing is granted. */
.dev-preview-tag { flex: none; max-width: 22em; padding: 0.2em 0.6em; border-radius: 0.4em; font-size: max(0.68em, 9px); font-weight: 800; color: #ffb36b; border: 1px dashed rgba(255, 179, 107, 0.6); }

/*
 * The victory sequence (beta brief §9; src/victory.ts): each step of a won stage's result screen
 * (`data-seq`) gets its motion class, delay (--at) and length (--dur) from `buildSequence`; they
 * animate only while `seq-on` is set, so removing it (a skip, or the end) shows the settled screen at
 * once. Short eased entrances only: nothing repeats or flashes. With reduced motion every step is a
 * plain fade. Until it is settled the settlement takes no taps (a tap anywhere skips instead).
 */
.screen.seq-on .sq { animation-duration: var(--dur); animation-delay: var(--at); animation-fill-mode: backwards; animation-timing-function: cubic-bezier(0.2, 0.9, 0.3, 1); }
.seq-on .sq.sq-pop { animation-name: sqPop; animation-timing-function: cubic-bezier(0.2, 1.6, 0.4, 1); }
.seq-on .sq.sq-stamp { animation-name: sqStamp; animation-timing-function: ease-out; }
.seq-on .sq.sq-rise { animation-name: sqRise; }
.seq-on .sq.sq-slide { animation-name: sqSlide; }
.seq-on .sq.sq-fade { animation-name: fadeIn; animation-timing-function: ease-out; }
@keyframes sqPop { from { transform: scale(1.5); opacity: 0; } }
@keyframes sqStamp { 0% { transform: scale(2.2); opacity: 0; } 65% { transform: scale(0.94); opacity: 1; } }
@keyframes sqRise { from { transform: translateY(0.6em); opacity: 0; } }
@keyframes sqSlide { from { transform: translateX(1.6em); opacity: 0; } }
/* The heading's own pop is the sequence's; on the settled screen it stays still (never replays). */
.result.staged:not(.seq-on) .title { animation: none; }
.seq-on .settle { pointer-events: none; }
.seq-skip { display: none; position: absolute; top: calc(var(--safe-top, 0px) + 0.3em); right: 0.5em; z-index: 1; padding: 0.45em 0.8em; font-size: 0.85em; }
.seq-on .seq-skip { display: block; }

/*
 * Easter eggs: Budingxie the crab beside the menu title (five quick taps on the title; a tap on it
 * says goodbye) and the seasonal decoration on the other side. Small, menu only, a slow gentle
 * motion at most (none with reduced motion), never a flash.
 */
/* English: beside DEFENSE's last letter (the frame has no room past its ink box); the two-line bubble sits right of FUSION's N. */
.crab-egg {
  position: absolute; left: calc(100% - 0.2em); bottom: -0.4em; width: 3.6em; height: 3.3em; padding: 0; font-style: normal;
  animation: crabIn 0.4s ease-out both;
}
.crab-egg svg { overflow: visible; }
.crab-hi {
  position: absolute; right: 0; bottom: 100%; margin-bottom: 0.25em; padding: 0.25em 0.55em; border-radius: 0.6em;
  width: max-content; max-width: 6.2em; line-height: 1.2; text-align: left;
  font-size: max(0.62em, 9px); font-weight: 800; letter-spacing: 0; color: #3a1d00; background: #ffe7a6; box-shadow: 0 0.15em 0 rgba(0, 0, 0, 0.35);
}
.crab-wave { transform-box: view-box; transform-origin: 49px 33px; animation: crabWave 1.8s ease-in-out infinite; }
.season { position: absolute; right: calc(100% - 0.3em); top: 0.1em; width: 2.5em; height: 2.5em; font-style: normal; pointer-events: none; }
.season-lunar { height: 3em; top: -0.3em; transform-origin: 50% 0; animation: lanternSway 4s ease-in-out infinite; }
.season-winter { opacity: 0.9; }
html[lang="zh-CN"] .season { right: calc(100% + 0.2em); }
html[lang="zh-CN"] .crab-egg { left: calc(100% + 0.2em); }
/* Chinese: one line, starting at the crab and running right (clear of 变). */
html[lang="zh-CN"] .crab-hi { left: 0; right: auto; max-width: none; white-space: nowrap; }
@keyframes crabIn { from { transform: translateY(0.6em) scale(0.6); opacity: 0; } }
@keyframes crabWave { 50% { transform: rotate(-24deg); } }
@keyframes lanternSway { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(4deg); } }
@media (prefers-reduced-motion: reduce) {
  .crab-egg, .crab-wave, .season-lunar { animation: none; }
}
.rec-head { color: var(--muted); font-size: 0.72em; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: -0.45em; }
.stats.six { grid-template-columns: 1fr 1fr 1fr; gap: 0.5em 0.6em; max-width: 19em; }
.mode-label { color: var(--gold); font-weight: 900; font-size: 0.85em; letter-spacing: 0.06em; margin-bottom: -0.4em; }
/* The mode line carries the active-skill chip (it opens the picker). */
.mode-row { display: flex; align-items: center; justify-content: center; gap: 0.6em; margin-bottom: -0.4em; }
.mode-row .mode-label { margin-bottom: 0; white-space: nowrap; }
.skill-pick {
  display: inline-flex; align-items: center; gap: 0.3em; padding: 0.28em 0.55em 0.28em 0.45em; border-radius: 2em; font-size: 0.8em; font-weight: 900;
  color: var(--c); white-space: nowrap; background: rgba(0, 0, 0, 0.45); border: 1px solid color-mix(in srgb, var(--c) 55%, transparent);
}
.skill-pick svg { flex: none; width: 1.15em; height: 1.15em; }
.skill-pick .more { font-style: normal; color: var(--gold); margin-left: 0.1em; }
.skill-pick:active { transform: scale(0.96); }
.mode-row button.mode-label { padding: 0.25em 0.1em; }
.mode-label .more { font-style: normal; margin-left: 0.3em; }
.mode-label:active { transform: scale(0.97); }
.open-endless { margin-top: -0.3em; }
.toggle-row { display: flex; gap: 0.7em; }
.toggle-row .chip.icon { width: 2.8em; height: 2.8em; padding: 0.6em; }
.toggle-row .chip.off { opacity: 0.5; }
.stats .rec { display: block; font-style: normal; font-size: max(0.62em, 9px); font-weight: 900; color: var(--gold); letter-spacing: 0.04em; }

/* Upgrade chips on the XP-bar row (world y = hudTop + 32..52, right edge 14 units in), below the pause button. */
.skills {
  position: absolute;
  top: calc(var(--safe-top, 0px) + 2.5em);
  right: 0.875em;
  display: flex;
  gap: 0.15em;
  pointer-events: none !important;
}
.skill {
  position: relative;
  height: 1.25em;
  padding: 0.16em 0.3em 0.16em 0.1em;
  border-radius: 0.35em;
  color: var(--c);
  background: rgba(8, 12, 30, 0.55);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}
.skill svg { width: 0.9em; height: 0.9em; }
.skill b {
  position: absolute;
  right: 0.08em;
  bottom: 0.02em;
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: -0.02em;
  font-size: max(0.56em, 9px);
  font-weight: 900;
  line-height: 1;
  color: #fff;
  text-shadow: 0 0 0.25em #000, 0 0 0.1em #000;
}
.skill b.max { color: var(--gold); }
.skill.fused { box-shadow: inset 0 0 0 1.5px var(--gold), 0 0 0.45em rgba(255, 209, 102, 0.55); }
/* Ultimate (a core skill's final level): a gold star on the chip. */
.skill.ult { background: rgba(60, 44, 8, 0.7); }
.skill .star {
  position: absolute;
  top: -0.42em;
  left: -0.12em;
  font-style: normal;
  font-size: max(0.55em, 9px);
  line-height: 1;
  color: var(--gold);
  text-shadow: 0 0 0.3em #000, 0 0 0.5em rgba(255, 209, 102, 0.8);
}

/*
 * The active-skill button: bottom right by default, or bottom left (Settings › Active skill button; src/skillpos.ts). Sized for a
 * thumb in the frame's own units (4em: 57 CSS px on a 320-wide phone, 67 on 375, larger on wider; never smaller than the V1.1
 * button), so it always fits the free pocket beside the base HP bar and below the turret's lane, even in a small landscape frame,
 * and is lifted out of the home indicator's line where the phone has a bottom safe area. World geometry (1em = 16 world units, the frame 360 wide): base HP bar
 * x 70–290 at 20–34 above the bottom, its shield 16 outside the end away from the button. A conic shade sweeps away as the cooldown
 * runs; it glows when ready. A press that moves still steers (main.ts bindPress), so the button never takes steering away.
 */
.ability-btn {
  position: absolute;
  --sb: 4em;
  right: 0.3em;
  bottom: max(0.4em, calc(env(safe-area-inset-bottom, 0px) * 0.6));
  width: var(--sb);
  height: var(--sb);
  padding: calc(var(--sb) * 0.24);
  --hit-y: 0.15em;
  --hit-x: 0.25em;
  border-radius: 50%;
  color: var(--c, var(--cyan));
  background:
    conic-gradient(rgba(3, 5, 13, 0.72) calc(var(--cd, 0) * 360deg), transparent 0),
    color-mix(in srgb, var(--c, var(--cyan)) 14%, rgba(8, 20, 40, 0.88));
  border: 2px solid color-mix(in srgb, var(--c, var(--cyan)) 45%, transparent);
  touch-action: none;
}
.ability-btn[data-side="left"] { right: auto; left: 0.3em; }
.ability-btn svg { opacity: 0.55; }
.ability-btn .cd {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1em;
  font-weight: 900;
  color: var(--text);
  text-shadow: 0 0 0.3em #000;
}
.ability-btn.ready { border-color: var(--c, var(--cyan)); animation: abilityReady 1.6s ease-in-out infinite; }
.ability-btn.ready svg { opacity: 1; }
/* Barrier or Surge running: the button glows steadily in the skill's colour. */
.ability-btn.active { border-color: var(--c); box-shadow: 0 0 1.1em color-mix(in srgb, var(--c) 70%, transparent); animation: none; }
.ability-btn.active svg { opacity: 1; }
.ability-btn:active { transform: scale(0.94); }
@keyframes abilityReady { 50% { box-shadow: 0 0 1em color-mix(in srgb, var(--c, var(--cyan)) 65%, transparent); } }

/*
 * Run chips, bottom left (the skill button's mirror), clear of the HP bar: aim (only when the aim
 * setting is not Auto) above game speed (only while a membership offers more than 1×). Small squares:
 * icon over a short word. A tap switches; a press that moves steers the turret instead (main.ts).
 */
.run-chips {
  position: absolute;
  left: 0.4em;
  bottom: 0.45em;
  display: flex;
  flex-direction: column;
  gap: 0.2em;
}
.run-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.1em;
  /* Two stacked (aim over speed) end below the turret at its left limit (world y ≥ turret line + 23). */
  width: 2.75em;
  height: 2.55em;
  padding: 0.1em;
  border-radius: 0.8em;
  font-size: 0.72em;
  font-weight: 900;
  line-height: 1;
  color: var(--text);
  background: rgba(8, 12, 30, 0.72);
  border: 1.5px solid rgba(255, 255, 255, 0.22);
  touch-action: none;
}
.run-chip svg { flex: none; width: 1.2em; height: 1.2em; }
/* The label never drops below 9 CSS px (small frames); English uses a short form so it fits the chip. */
.run-chip span { font-size: max(0.72em, 9px); letter-spacing: 0.02em; white-space: nowrap; }
.run-chip:active { transform: scale(0.94); }
.aim-chip[data-mode="priority"], .aim-chip[data-mode="lock"] { color: var(--gold); border-color: rgba(255, 209, 102, 0.6); }
.speed-chip span { font-size: 0.95em; }
.speed-chip.fast { color: #c8ff4d; border-color: rgba(200, 255, 77, 0.6); }
/* 3× (BLACK only) wears BLACK's gold, so it never reads as 2× at a glance. */
.speed-chip.faster { color: #f3e3b0; border-color: #d4af37; box-shadow: 0 0 0.45em rgba(212, 175, 55, 0.45); }
/* A boss or elite wave holds the run at 1×: the chip dims until it is over. */
.speed-chip.held { opacity: 0.6; border-style: dashed; }
/* The skill button on the bottom left (owner addendum §7, Layout B): the run chips take the bottom right pocket instead. */
#ui[data-chips="right"] .run-chips { left: auto; right: 0.4em; }

/*
 * Local TEST builds only (?dev&member=…): always visible, never taking input. One line at the bottom
 * centre, in the screens' bottom padding (Stage E: bottom left it covered Done buttons and stage tiles).
 */
.test-member {
  position: absolute;
  left: 50%;
  bottom: 0.2em;
  max-width: calc(100% - 0.8em);
  padding: 0.12em 0.5em;
  border-radius: 0.5em;
  font-size: max(0.58em, 9px);
  font-weight: 900;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transform: translateX(-50%);
  letter-spacing: 0.03em;
  color: #2a1600;
  background: repeating-linear-gradient(135deg, #ffcf4d 0 0.6em, #ffb020 0.6em 1.2em);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4);
  pointer-events: none !important;
  z-index: 6;
}
/* Local TEST builds: while the badge is up, every screen keeps a free strip at the bottom for it (it never covers a button). */
#ui.test-badged > .screen { padding-bottom: 2.6em; }
/* A short window (the menu then overflows its frame anyway): outside a run the badge shrinks to a TEST pill in the bottom-right corner, clear of the centred buttons. */
@media (max-height: 620px) {
  .test-member:not(.in-run) { left: auto; right: 0.3em; transform: none; font-size: 0 !important; padding: 0.15em 0.45em; }
  .test-member:not(.in-run)::before { content: 'TEST'; font-size: 9px; }
}
/* In a run: one line under the base HP bar, clear of the turret's lane, the run chips and the toasts. */
.test-member.in-run { left: 50%; bottom: 0.2em; max-width: none; padding: 0.12em 0.5em; font-size: max(0.58em, 9px); white-space: nowrap; transform: translateX(-50%); }

/* Critical base HP: a soft red edge glow that breathes slowly; the centre stays completely clear. */
.vignette {
  position: absolute;
  inset: 0;
  pointer-events: none !important;
  opacity: 0;
  transition: opacity 0.4s;
  background: radial-gradient(ellipse at 50% 45%, transparent 60%, rgba(255, 40, 70, 0.16) 80%, rgba(255, 30, 60, 0.4) 100%);
}
.vignette.on { opacity: 1; animation: critPulse 1.8s ease-in-out infinite; }
@keyframes critPulse { 50% { opacity: 0.55; } }
@media (prefers-reduced-motion: reduce) { .vignette.on { animation: none; } }
.up-row.evo b { color: var(--gold); }
.up-list { max-width: 17em; padding: 0.5em 0.7em; display: flex; flex-direction: column; gap: 0.35em; text-align: left; }
/* A long build scrolls inside its panel, so Resume and Quit always stay on screen. */
.pause .up-list { flex: 0 1 auto; min-height: 0; overflow-y: auto; touch-action: pan-y; overscroll-behavior: contain; }
.up-row { display: flex; align-items: center; gap: 0.5em; font-size: 0.78em; line-height: 1.25; }
.up-row .ico { flex: none; width: 1.7em; height: 1.7em; padding: 0.3em; border-radius: 0.5em; color: var(--c); background: rgba(255, 255, 255, 0.07); }
.up-row b { color: var(--c); }
.up-row .lv { color: var(--muted); font-weight: 800; }
.up-row .lv.max { color: var(--gold); }
.up-desc { color: var(--muted); }

/* ---- revive & result -------------------------------------------------- */

.revive-ico {
  width: 5em;
  height: 5em;
  padding: 1em;
  border-radius: 50%;
  color: var(--green);
  background: rgba(6, 214, 160, 0.12);
  border: 2px solid rgba(6, 214, 160, 0.4);
  animation: breathe 1.4s ease-in-out infinite;
}
/* Why a reward asked for here was not given (closed early, unavailable): one line is kept for it, so a short note moves nothing. */
.revive-note { min-height: 1.3em; max-width: 20em; margin: -0.35em 0; color: var(--gold); font-size: 0.85em; font-weight: 700; line-height: 1.3; }
/*
 * The offer's words wrap only between their parts (ui.ts showRevive): each part is a box as wide as its words, so it moves to the
 * next line whole. t212: a part wider than the line (a narrow phone, a long promo or mock-ad clause) wraps inside its box instead of
 * running out of the frame as a nowrap span did.
 */
.revive .nb { display: inline-block; max-width: 100%; }
.revive { justify-content: center; justify-content: safe center; }
.revive > * { flex: none; }
.short-frame .revive { gap: 0.65em; }
.short-frame .revive .revive-ico { width: 4.2em; height: 4.2em; padding: 0.85em; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6em; padding: 0.9em; }
.stats div { display: flex; flex-direction: column; gap: 0.1em; }
.stats span { color: var(--muted); font-size: max(0.78em, 9px); font-weight: 700; }
.stats b { font-size: 1.25em; }
.reward { display: flex; flex-direction: column; align-items: center; gap: 0.2em; }
.reward span { color: var(--muted); font-size: 0.85em; font-weight: 700; }
.reward-amt { font-size: 2em; font-weight: 900; color: var(--gold); display: flex; align-items: center; gap: 0.25em; }
.doubled { color: var(--green); font-weight: 900; padding: 0.7em; }

/* ---- toast & mock ad -------------------------------------------------- */

/* Toasts stack in one column (a second never lands on the first) and wrap inside the frame. */
.toasts {
  position: absolute;
  left: 5%;
  right: 5%;
  bottom: 16%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4em;
  pointer-events: none !important;
  z-index: 5;
}
.toast {
  max-width: 100%;
  padding: 0.6em 1.1em;
  border-radius: 0.7em;
  background: rgba(0, 0, 0, 0.85);
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  text-wrap: balance;
  overflow-wrap: anywhere;
  animation: toast 2.2s forwards;
}

.mock-ad {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: calc(env(safe-area-inset-top, 0px) + 16px) 20px calc(env(safe-area-inset-bottom, 0px) + 28px);
  font-size: min(4.4vw, 18px);
  background: repeating-linear-gradient(45deg, #15122b 0 22px, #1a1634 22px 44px);
  animation: fadeIn 0.2s;
}
.mock-ad-top { width: 100%; display: flex; justify-content: space-between; align-items: center; }
.mock-ad-tag { background: #ff3366; color: #fff; font-weight: 900; padding: 0.3em 0.7em; border-radius: 0.4em; letter-spacing: 0.08em; }
.mock-ad-place { color: #8b84b8; font-family: ui-monospace, monospace; font-size: 0.85em; }
.mock-ad-body { display: flex; flex-direction: column; align-items: center; gap: 0.8em; text-align: center; max-width: 22em; }
.mock-ad-logo {
  width: 5em;
  height: 5em;
  border-radius: 1.2em;
  background: linear-gradient(135deg, #ff3366, #7b2ff7);
  box-shadow: 0 0 3em rgba(123, 47, 247, 0.5);
  animation: breathe 1.2s ease-in-out infinite;
}
.mock-ad-title { font-size: 1.5em; font-weight: 900; }
.mock-ad-note { color: #b5aee0; line-height: 1.45; }
.mock-ad-timer { margin-top: 0.6em; font-size: 1.2em; font-weight: 900; color: var(--gold); }
.mock-ad-close {
  width: 100%;
  max-width: 20em;
  padding: 0.9em;
  border-radius: 0.9em;
  font-weight: 800;
  color: #c9c3ee;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.mock-ad.ready .mock-ad-close { color: #002a1e; background: linear-gradient(180deg, #7dfad2, #06b58a); border-color: transparent; }
.mock-ad.ready .mock-ad-timer { color: var(--green); }
/* t212: the simulated ad covers the game frame (#ui), not the browser window around it (src/ads.ts mounts it there). */
#ui > .mock-ad { position: absolute; font-size: 1.05em; padding: calc(var(--safe-top, 0px) + 1em) 1.25em 1.75em; }

/* ---- animation -------------------------------------------------------- */

.pop { animation: pop 0.4s cubic-bezier(0.2, 1.8, 0.4, 1); }

@keyframes fadeIn { from { opacity: 0; } }
@keyframes popIn { from { transform: scale(1.6); opacity: 0; } }
@keyframes cardIn { from { transform: translateY(1.2em) scale(0.92); opacity: 0; } }
@keyframes breathe { 50% { transform: scale(1.04); } }
@keyframes buzz { 20%, 60% { transform: translateX(-0.18em); } 40%, 80% { transform: translateX(0.18em); } }
@keyframes pop { 40% { transform: scale(1.18); } }
@keyframes glowPulse { 50% { box-shadow: 0 0 1.2em rgba(6, 214, 160, 0.35); } }
@keyframes toast {
  from { opacity: 0; transform: translateY(0.6em); }
  12% { opacity: 1; transform: none; }
  85% { opacity: 1; }
  to { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .play, .revive-ico, .mock-ad-logo { animation: none; }
}
/*
 * Reduced motion (Settings › Reduce motion, or the device's own preference: main.ts sets
 * `reduce-motion` on the page): headings, cards and toasts fade in instead of moving, the breathing,
 * shining and swaying stop, and a refused tap dims once instead of shaking. The victory sequence
 * fades by itself (src/victory.ts) and the battlefield stops shaking (src/render.ts).
 */
.reduce-motion .title, .reduce-motion .card, .reduce-motion .crab-egg { animation: fadeIn 0.2s ease-out backwards; }
.reduce-motion .play, .reduce-motion .revive-ico, .reduce-motion .mock-ad-logo, .reduce-motion .card.evo::after,
.reduce-motion .crab-wave, .reduce-motion .season-lunar, .reduce-motion .vignette.on { animation: none; }
.reduce-motion .pop { animation: fadeIn 0.3s ease-out; }
.reduce-motion .buzz { animation: dim 0.3s linear; }
.reduce-motion .toast { animation: toastFade 2.2s forwards; }
@keyframes dim { 50% { opacity: 0.5; } }
@keyframes toastFade { from { opacity: 0; } 12% { opacity: 1; } 85% { opacity: 1; } to { opacity: 0; } }

/*
 * C2 (beta brief §9, §14): in-run toasts, the level-up cue, screen transitions and keyboard focus.
 *
 * Toasts in a run sit in a band below the HUD (its wave, coins, level, boss bars, combo and buffs end
 * 7.5em down) and above the banners (36% of the field), clear of the turret, the skill button and the
 * base HP bar; compact, two at most (src/notify.ts), and none over the cards or the pause screen.
 */
.toasts.in-run { top: calc(var(--safe-top, 0px) + 7.8em); bottom: auto; gap: 0.25em; }
.toasts.in-run .toast { font-size: 0.78em; padding: 0.36em 0.85em; }
.toast-ach, .toast-record { display: inline-flex; align-items: center; justify-content: center; gap: 0.4em; }
.toast-ach > span, .toast-record > span { min-width: 0; }
.toast-ach { color: var(--gold); border: 1px solid rgba(255, 209, 102, 0.45); }
.toast-ach .mini-ico { flex: none; width: 1.2em; height: 1.2em; color: var(--gold); }
.toast-ach .tn-rew { white-space: nowrap; }
.toast-ach .coin { width: 0.95em; height: 0.95em; margin-right: 0.15em; }
.toast-record { color: #ffe3a3; border: 1px solid rgba(255, 209, 102, 0.6); background: rgba(40, 28, 4, 0.92); }
.toast-record .rec { font-style: normal; font-size: 0.85em; font-weight: 900; letter-spacing: 0.06em; padding: 0.05em 0.4em; border-radius: 0.3em; color: #3a1d00; background: var(--gold); white-space: nowrap; }

/*
 * Level-up: one gold burst behind the title as the cards open, never repeating; a boss level adds
 * "BOSS DEFEATED" stamped above LEVEL UP and a larger, warmer burst. The burst takes no taps and the
 * cards keep their guard; reduced motion drops the burst and fades the line in.
 */
.lvl-head { position: relative; display: flex; flex-direction: column; align-items: center; }
.lvl-head .title { position: relative; }
.lvl-burst {
  position: absolute; left: 50%; top: 50%; width: 9em; height: 9em; margin: -4.5em 0 0 -4.5em; border-radius: 50%; pointer-events: none; opacity: 0;
  background: radial-gradient(circle, rgba(255, 209, 102, 0.42), rgba(255, 209, 102, 0.12) 45%, transparent 70%);
  animation: lvlBurst 0.7s ease-out 0.05s;
}
.boss-up .lvl-burst {
  width: 13em; height: 13em; margin: -6.5em 0 0 -6.5em; animation-duration: 0.95s;
  background: radial-gradient(circle, rgba(255, 209, 102, 0.55), rgba(255, 120, 80, 0.18) 45%, transparent 70%);
}
.lvl-kick {
  position: relative; margin-bottom: 0.05em; font-size: 0.95em; font-weight: 900; font-style: italic; letter-spacing: 0.14em; color: #ffb36b;
  text-shadow: 0 0.08em 0 rgba(0, 0, 0, 0.5); animation: sqStamp 0.45s ease-out backwards;
}
@keyframes lvlBurst { from { transform: scale(0.3); opacity: 0.95; } to { transform: scale(1.35); opacity: 0; } }

/*
 * Screen transitions: a screen fades in over the one it replaces, which fades out underneath and
 * takes no input; the same screen drawn again (a purchase, a pick) has no entrance; a pick on the
 * stage list fades its detail over. The HUD fades in with a run. Fades only (no movement), so
 * reduced motion keeps them, shorter.
 */
.screen.leaving { animation: fadeOut 0.18s ease-in forwards; pointer-events: none !important; }
/* The cards and the pause screen clear off the battlefield faster: play has already resumed under them. */
.screen.upgrade.leaving, .screen.pause.leaving, .screen.revive.leaving { animation-duration: 0.1s; }
.screen.again, .screen.again .title { animation: none; }
.again .stage-info.swap { animation: swapIn 0.16s ease-out; }
.pause-btn, .ability-btn, .run-chips, .skills { animation: fadeIn 0.3s ease-out; }
@keyframes fadeOut { to { opacity: 0; } }
@keyframes swapIn { from { opacity: 0.35; } }
/* A result without the sequence (an Endless run, a loss) that broke a record: its tags pop once, with one sound. */
.rec-new .rec { animation: recPop 0.5s cubic-bezier(0.2, 1.8, 0.4, 1) 0.15s backwards; }
@keyframes recPop { from { transform: scale(0.4); opacity: 0; } 60% { transform: scale(1.15); opacity: 1; } }

/* Keyboard focus: a clear ring on whatever has it (never after a tap); inside a scrolling list it is drawn inside the control, so the list's edge never cuts it. */
button:focus { outline: none; }
button:focus-visible { outline: 0.15em solid #ffffff; outline-offset: 0.15em; }
.stage-scroll button:focus-visible, .gear-scroll button:focus-visible, .shop-list button:focus-visible, .skill-list button:focus-visible,
.settings-body button:focus-visible, .ach-scroll button:focus-visible, .title-chips button:focus-visible { outline-offset: -0.2em; }

.reduce-motion .screen, .reduce-motion .screen.leaving { animation-duration: 0.12s; }
.reduce-motion .lvl-burst { display: none; }
.reduce-motion .lvl-kick { animation: fadeIn 0.2s ease-out backwards; }
.reduce-motion .rec-new .rec { animation: fadeIn 0.3s ease-out 0.1s backwards; }

/*
 * Hit areas: on a phone a button takes taps over about 44 CSS px each way (3.1em on the 320-wide
 * frame, 2.64em on 375) through an invisible margin around it (::before), so the look and the
 * layout stay as they were. Each control's margin is set where it sits (--hit-y and --hit-x, or a
 * side's own --hit-t / -b / -l / -r, in its own em) and stays within the gap to its neighbours, so two buttons
 * never take each other's taps (where margins meet in a gap, the later button has the gap).
 */
button { position: relative; }
button::before {
  content: ""; position: absolute;
  inset: calc(-1 * var(--hit-t, var(--hit-y, 0em))) calc(-1 * var(--hit-r, var(--hit-x, 0em))) calc(-1 * var(--hit-b, var(--hit-y, 0em))) calc(-1 * var(--hit-l, var(--hit-x, 0em)));
}
/* Menu: the tools a little further apart (the wallet still fits a 7-digit balance at 320 px), their margins above the logo's tall glyph boxes. */
.menu-top { position: relative; z-index: 1; }
.menu-tools { gap: 0.62em; }
.menu-tools .chip { --hit-y: 0.62em; --hit-x: 0.4em; }
.menu-tools .lang { --hit-r: 0.7em; }
.claim { --hit-y: 0.32em; --hit-x: 0.3em; }
/* The daily card's opening part reaches the card's edges (Claim, later in the card, keeps the gap between them). */
.open-daily { --hit-y: 0.75em; --hit-l: 0.75em; --hit-r: 0.75em; }
/* Daily Login page: Back's margin stays in the gap under Claim. */
.daily-page .back { --hit-t: 0.3em; --hit-b: 0.6em; }
.rec-row .records, .rec-row .ach-btn { --hit-y: 0.34em; }
.mode-row button.mode-label { --hit-t: 0.65em; --hit-b: 0.75em; }
.skill-pick { --hit-t: 0.65em; --hit-b: 0.8em; }
/* Phones (no backdrop beside the frame): the mode line a little taller and further from the row above, so its two small buttons reach a full tap; the menu's gaps give back the room. */
html:not(.sides) .mode-row { margin: 0.25em 0 -0.1em; }
html:not(.sides) .mode-row button.mode-label { padding: 0.5em 0.1em; }
html:not(.sides) .skill-pick { padding: 0.5em 0.55em 0.5em 0.45em; }
html.short-frame:not(.sides) .menu { gap: 0.44em; }
html.short-frame:not(.sides) .save-warn { margin: 0 auto; }
/*
 * A short frame showing the newer-build warning (two lines): a smaller logo, so the warning and the version label stay in the frame.
 * Framed desktop 16:9 has no room to spare, so its gaps tighten too; phones keep theirs (the mode line's tap margins need them).
 */
html.short-frame.sides .menu.newer { gap: 0.38em; }
html.short-frame .menu.newer .logo { font-size: 0.85em; }
html.short-frame .menu.newer .save-warn { margin: 0 auto; }
.open-endless { --hit-t: 0.15em; --hit-b: 0.45em; }
/* The account chip (about 23 px tall at 320 px): its margin reaches over the tagline above and into the gap below, never to a button. */
.acct-chip { --hit-t: 1em; --hit-b: 0.85em; --hit-x: 0.3em; }
.acct-sheet .cancel { --hit-y: 0.3em; }
/* Stage list: taller tiles, each taking half the gap around it; Back under the list. */
.stage-tile { padding: 0.42em 0.5em; --hit-y: 0.2em; --hit-x: 0.2em; }
.challenge .back { --hit-y: 0.6em; }
/* Endless page: Back's margin stays in the gap under Start (whose own margin reaches 0.14em into it). */
.endless-page .back { --hit-t: 0.3em; --hit-b: 0.6em; }
.dev-row .chip, .dev-gear { --hit-y: 0.5em; }
/* Settings: the switches, the two tests and the aim options. */
.short-frame .settings .btn-ghost { padding: 0.74em 1em; }
.settings-body .btn-ghost { --hit-y: 0.18em; }
.test-row .chip { --hit-y: 0.6em; }
.aim-opt { padding: 0.6em 0.45em; --hit-y: 0.07em; }
/* Every screen's last button (Done, Back, Cancel, the main one) and the result's row of small ones. */
.screen > .btn, .settle > .btn { --hit-y: 0.14em; }
.skill-picker .back, .dismantle .cancel, .revive .decline, .result .btn-text.home { --hit-y: 0.4em; }
.gp-x { --hit-y: 0.3em; --hit-x: 0.3em; }
.gp-actions .btn { --hit-y: 0.26em; }
/* Gear list rows: half the list's 0.3em gap each, so a 320-wide English row (43 px) still takes a 44 px tap. */
.gear-row { --hit-y: 0.15em; }
.shop-row .buy { --hit-y: 0.45em; }
.nav-row { margin-top: 0.15em; }
.nav-row .chip { --hit-y: 0.6em; --hit-x: 0.2em; }
.seq-skip { --hit-t: 0.3em; --hit-b: 0.7em; --hit-x: 0.3em; }
/* Pause screen toggles; in a run the pause button (it may reach the frame's top edge) and the aim chip (its margin reaches into the field: a press there that moves still steers). */
.toggle-row .chip.icon { --hit-y: 0.36em; --hit-x: 0.36em; }
.pause-btn { --hit-t: 0.2em; --hit-b: 0.75em; --hit-x: 0.47em; }
.run-chip { --hit-l: 0.3em; --hit-r: 1.4em; --hit-t: 0.25em; --hit-b: 0.25em; }
.run-chip:first-child { --hit-t: 1.65em; }
.run-chip:last-child { --hit-b: 0.6em; }
/* The chips on the bottom right (skill button bottom left, owner addendum §7): their wider margin faces the field, mirrored. */
#ui[data-chips="right"] .run-chip { --hit-l: 1.4em; --hit-r: 0.3em; }
/* Auto-select switch (owner addendum §5): its margin reaches into the gaps above and below, never to a card. */
.auto-pick { --hit-t: 0.45em; --hit-b: 0.8em; --hit-x: 0.3em; }
.sp-opt { --hit-y: 0.1em; }

/*
 * Contrast (C2): small text keeps at least 4.5:1 against its background. A locked stage is dimmed by
 * its dashed, fainter tile (and its lock and "clear stage n first" line), not by fading its words; the
 * daily card waits a little less faded; the version label is a little brighter.
 */
.stage-tile.locked { opacity: 1; background: rgba(255, 255, 255, 0.03); border-style: dashed; }
.stage-tile.locked .num, .stage-tile.locked .name { color: var(--muted); }
.daily:not(.ready) { opacity: 0.88; }
.ver { color: rgba(154, 167, 207, 0.8); }

/*
 * DEV scaffold only (local `?dev` builds; V1.1 rev2 §12): the Workshop and the V1.1 Enhancement page, on mock data and
 * labelled TEST. The title, the label, the main action, the page links and Back stay in the frame; the rest scrolls
 * inside it (never the page), like the gear list.
 */
.workshop, .v11-enhance { justify-content: flex-start; gap: 0.45em; }
.workshop .title, .v11-enhance .title { flex: none; font-size: 1.6em; }
.v11-tag {
  flex: none; max-width: 100%; padding: 0.2em 0.7em; border-radius: 0.45em; font-size: 0.68em; font-weight: 900; letter-spacing: 0.03em;
  line-height: 1.3; color: #2a1600; background: #ffb020;
}
.v11-scroll {
  position: relative; flex: 0 1 auto; min-height: 4em; width: 100%; max-width: 20.5em; overflow-y: auto; overflow-x: hidden;
  touch-action: pan-y; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 0.35em; padding: 0.4em 0.1em; text-align: left;
  -webkit-mask-image: linear-gradient(transparent, #000 0.5em, #000 calc(100% - 0.5em), transparent);
  mask-image: linear-gradient(transparent, #000 0.5em, #000 calc(100% - 0.5em), transparent);
}
.v11-scroll > *, .en-list > * { flex: none; }
.v11-scroll button:focus-visible { outline-offset: -0.2em; }
.v11-head { flex: none; margin: 0.35em 0 -0.1em 0.3em; text-align: left; text-transform: none; letter-spacing: 0.02em; line-height: 1.35; }
.v11-note { color: var(--muted); font-size: 0.7em; font-weight: 700; line-height: 1.35; padding: 0 0.4em; }
.v11-ok, .v11-prop, .v11-base {
  display: inline-block; padding: 0 0.4em; border-radius: 0.35em; font-size: max(0.9em, 9px); font-style: normal; font-weight: 900; letter-spacing: 0;
  text-transform: none; white-space: nowrap; vertical-align: 0.05em;
}
.v11-ok { color: #04241a; background: var(--green); }
.v11-prop { color: #2a1600; background: #ffb36b; }
.v11-base { color: #0b1020; background: #9be7ff; }
.v11-nav { flex: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 0.35em; }
.v11-nav .chip { font-size: 0.72em; --hit-y: 0.4em; }
.workshop .back, .v11-enhance .back { flex: none; padding: 0.3em 1.2em; --hit-y: 0.4em; }
.dev-v11 { flex: none; font-size: 0.7em; opacity: 0.7; }
/* Workshop: the mock materials, then one card per blueprint (its craft choices when unlocked). */
.ws-mats { flex: none; max-width: none; display: flex; flex-direction: column; gap: 0.35em; padding: 0.6em 0.75em; }
.ws-mat-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5em; font-size: 0.85em; }
.ws-progress { display: flex; flex-direction: column; gap: 0.25em; font-size: 0.8em; font-weight: 800; color: var(--gold); }
.ws-progress .pity-bar { flex: none; width: 100%; }
.ws-ready { font-size: 0.75em; font-weight: 900; color: var(--green); }
.ws-rule { font-size: 0.68em; font-weight: 700; line-height: 1.4; color: #c9e7ff; }
.ws-clears { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3em; font-size: 0.72em; font-weight: 800; color: var(--muted); }
.ws-clears .chip { font-size: 1em; padding: 0.35em 0.75em; --hit-y: 0.3em; }
.ws-bp {
  display: flex; flex-direction: column; gap: 0.3em; padding: 0.5em 0.65em; border-radius: 0.75em;
  background: color-mix(in srgb, var(--c) 9%, rgba(255, 255, 255, 0.04)); border: 1px solid color-mix(in srgb, var(--c) 55%, transparent);
}
.ws-bp.locked { border-style: dashed; background: rgba(255, 255, 255, 0.03); }
.ws-bp-head { display: flex; align-items: center; gap: 0.35em; min-width: 0; font-size: 0.85em; }
.ws-bp-head b { flex: 1; min-width: 0; color: var(--c); overflow-wrap: anywhere; }
.ws-bp.locked .ws-bp-head b { color: var(--muted); }
.ws-bp-head > span { flex: none; color: var(--muted); font-size: 0.8em; font-weight: 800; }
.ws-bp-state { font-size: 0.7em; font-weight: 700; color: var(--muted); }
.ws-bp.open .ws-bp-state { color: var(--green); }
.ws-lead { font-size: 0.7em; font-weight: 800; color: #c9e7ff; }
.ws-items { display: flex; flex-wrap: wrap; gap: 0.3em; }
.ws-craft { font-size: 0.72em; padding: 0.4em 0.75em; color: var(--c); border-color: color-mix(in srgb, var(--c) 60%, transparent); --hit-y: 0.25em; }
/* V1.1 Enhancement: the main piece, its four slots (the last, Insurance, disabled), the chance, then the pickers. */
.en-main {
  display: flex; align-items: center; gap: 0.55em; padding: 0.5em 0.6em; border-radius: 0.8em;
  background: color-mix(in srgb, var(--c) 12%, rgba(255, 255, 255, 0.04)); border: 1px solid color-mix(in srgb, var(--c) 70%, transparent);
}
.en-main .ico { width: 2.3em; height: 2.3em; padding: 0.4em; border-radius: 0.6em; }
.en-main-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.05em; }
.en-main-info > b { color: var(--c); font-size: 0.95em; overflow-wrap: anywhere; }
.en-main-info .gr-fx { white-space: normal; }
.en-change { flex: none; font-size: 0.7em; padding: 0.4em 0.75em; --hit-y: 0.5em; }
.en-sl { display: flex; align-items: center; gap: 0.25em; color: var(--muted); font-size: 0.68em; font-weight: 900; letter-spacing: 0.02em; }
.en-slots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.3em; }
.en-slot {
  display: flex; flex-direction: column; gap: 0.12em; min-width: 0; padding: 0.35em 0.5em 0.4em; border-radius: 0.65em;
  border: 1px dashed rgba(154, 167, 207, 0.45); background: rgba(255, 255, 255, 0.03);
}
.en-slot b { font-size: 0.74em; font-weight: 800; color: var(--muted); overflow-wrap: anywhere; }
.en-slot.full { border-style: solid; border-color: rgba(255, 209, 102, 0.6); background: rgba(255, 209, 102, 0.08); }
.en-slot.full b { color: var(--gold); }
.en-slot.ins { opacity: 0.6; background: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0 0.4em, rgba(255, 255, 255, 0.07) 0.4em 0.8em); cursor: not-allowed; }
.en-slot.ins .mini-ico { width: 1em; height: 1em; color: var(--muted); }
.en-chance { flex: none; max-width: none; display: flex; flex-direction: column; gap: 0.3em; padding: 0.55em 0.7em; }
.en-ch-head { display: flex; align-items: baseline; justify-content: space-between; gap: 0.5em; font-size: 0.82em; font-weight: 800; color: #c9e7ff; }
.en-ch-head b { font-size: 1.5em; color: var(--gold); font-variant-numeric: tabular-nums; }
.en-ch-sub, .en-ch-fail, .en-ch-note { font-size: 0.68em; font-weight: 700; line-height: 1.35; color: var(--muted); }
.en-ch-fail { color: #ffb36b; }
.en-table { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.2em; }
.en-table span { display: flex; flex-direction: column; align-items: center; padding: 0.15em 0; border-radius: 0.35em; background: rgba(255, 255, 255, 0.05); }
.en-table i { font-style: normal; font-size: max(0.62em, 9px); font-weight: 700; color: var(--muted); white-space: nowrap; }
.en-table b { font-size: 0.66em; font-weight: 900; font-variant-numeric: tabular-nums; }
.en-table span.on { background: rgba(255, 209, 102, 0.2); box-shadow: inset 0 0 0 1px rgba(255, 209, 102, 0.7); }
.en-table span.on b { color: var(--gold); }
.en-list { display: flex; flex-direction: column; gap: 0.3em; }
/* A picker row's rarity, slot and protection reasons wrap rather than lose a reason (a desktop scrollbar narrows the list). */
.en-row .gr-fx { white-space: normal; }
.en-row.sel { border-color: var(--gold); background: rgba(255, 209, 102, 0.12); }
.en-row.off { opacity: 0.6; }
.en-why { color: #ffb36b; }
.rar { font-weight: 900; }
.rar-common { color: #d6deef; }
.rar-rare { color: #5cb2ff; }
.rar-epic { color: #c49bff; }
.rar-legendary { color: #ffb547; }
/* Owner directive 2026-10-28 (Part 3): names and "+N" levels in rarity colours (Common silver, Rare blue, Epic purple,
   Legendary gold-orange); a commemorative piece in its own magenta-purple. */
.rar-commem { color: #f07cff; }
.lv.plus { font-weight: 900; font-variant-numeric: tabular-nums; }
.lv.plus.rar-common { color: #d6deef; }
.lv.plus.rar-rare { color: #5cb2ff; }
.lv.plus.rar-epic { color: #c49bff; }
.lv.plus.rar-legendary { color: #ffb547; }
.lv.plus.rar-commem { color: #f07cff; text-shadow: 0 0 6px rgba(240, 124, 255, 0.5); }
.en-review, .en-stab { align-self: flex-start; font-size: 0.72em; padding: 0.4em 0.8em; --hit-y: 0.25em; }
.en-amps { display: flex; flex-wrap: wrap; gap: 0.3em; }
.en-amp { font-size: 0.72em; padding: 0.35em 0.7em; --hit-y: 0.25em; }
.en-amp small { margin-left: 0.35em; font-size: max(0.85em, 9px); color: var(--muted); }
.en-amp.on, .en-stab.on { color: var(--gold); border-color: var(--gold); background: rgba(255, 209, 102, 0.12); }
.en-amp[disabled], .en-stab[disabled] { opacity: 0.4; cursor: default; }
/* Owner directive 2026-10-28 (Parts 4 and 6): the current chance on one line; each consumable as its art and count (its effect
   in the tooltip and the info line under it); one with none owned stays visible, off. */
.en-ch-now { display: block; font-size: 0.9em; }
.en-ch-now b { font-size: 1.35em; color: var(--gold); font-variant-numeric: tabular-nums; }
.en-items { display: flex; flex-wrap: wrap; gap: 0.35em; }
.en-item {
  --c: #9aa7cf;
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 0.1em; min-width: 3.9em; padding: 0.35em 0.3em 0.3em;
  border-radius: 0.7em; border: 1px solid color-mix(in srgb, var(--c) 45%, transparent); background: color-mix(in srgb, var(--c) 10%, rgba(10, 14, 34, 0.85));
  color: var(--text); font: inherit; font-size: 0.72em; cursor: pointer;
}
.en-item .item-art { display: grid; place-items: center; width: 2.6em; height: 2.6em; font-style: normal; font-size: 1.1em; color: var(--muted); }
.en-item .item-art svg { width: 100%; height: 100%; }
.en-item .qty { font-size: 0.85em; line-height: 1.1; color: var(--c); font-variant-numeric: tabular-nums; }
.en-item .item-g { font-size: 0.85em; font-weight: 800; color: var(--muted); white-space: nowrap; }
.en-item.on { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold), 0 0 10px rgba(255, 209, 102, 0.35); }
.en-item.on .item-g { color: var(--gold); }
.en-item[disabled] { opacity: 0.38; cursor: default; filter: grayscale(0.6); }
.en-item.stab { padding-inline: 0.7em; }
.en-info { font-size: 0.68em; font-weight: 700; line-height: 1.35; color: var(--muted); }
.item-art.sm { display: inline-grid; width: 1.3em; height: 1.3em; margin-right: 0.2em; vertical-align: -0.3em; font-style: normal; }
.item-art.sm svg { width: 100%; height: 100%; }
/* The forging sequence (src/forge.ts; owner directive 2026-10-28 Part 5): the piece centred and charging, then the outcome,
   success green, failure red (a Stabilizer-protected failure too). Still with reduced motion. */
.forge-layer { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; padding: 1em; background: rgba(4, 6, 18, 0.84); animation: fadeIn 0.18s ease-out; }
.forge { display: flex; flex-direction: column; align-items: center; gap: 0.9em; max-width: 22em; text-align: center; }
.forge-stage { position: relative; display: grid; place-items: center; width: 9em; height: 9em; }
.forge-ring {
  position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(255, 209, 102, 0.6); border-top-color: transparent;
  box-shadow: 0 0 18px rgba(255, 209, 102, 0.3), inset 0 0 18px rgba(255, 209, 102, 0.2); animation: forgeSpin 1.1s linear 12;
}
.forge-ring.r2 { inset: 0.9em; border-color: rgba(76, 201, 240, 0.6); border-bottom-color: transparent; animation-duration: 0.8s; animation-direction: reverse; }
.forge-sparks { position: absolute; inset: 1.8em; border-radius: 50%; background: radial-gradient(circle, rgba(255, 230, 160, 0.55), rgba(255, 160, 60, 0.12) 55%, transparent 70%); animation: forgeCharge 0.9s ease-in-out 14 alternate; }
.forge-piece { position: relative; display: flex; flex-direction: column; align-items: center; gap: 0.35em; }
.forge-piece .ico {
  width: 3.2em; height: 3.2em; padding: 0.55em; border-radius: 0.9em; color: var(--c);
  background: color-mix(in srgb, var(--c) 18%, rgba(10, 14, 34, 0.92)); border: 1px solid color-mix(in srgb, var(--c) 65%, transparent); animation: forgeShake 0.16s linear 80;
}
.forge-name { font-size: 0.95em; white-space: nowrap; }
.forge-status { font-size: 0.85em; font-weight: 800; letter-spacing: 0.06em; color: var(--muted); }
.forge-skip { font-size: 0.8em; }
.forge.done .forge-ring, .forge.done .forge-piece .ico { animation: none; }
.forge.done .forge-sparks, .forge.done .forge-ring.r2 { display: none; }
.forge.done.ok .forge-ring { border-color: var(--green); box-shadow: 0 0 24px rgba(6, 214, 160, 0.55); }
.forge.done.bad .forge-ring { border-color: var(--red); box-shadow: 0 0 24px rgba(255, 77, 109, 0.5); }
.forge-result { display: flex; flex-direction: column; align-items: center; gap: 0.3em; animation: fadeIn 0.2s ease-out; }
.forge-title { font-size: 1.35em; font-weight: 900; }
.forge-result.ok .forge-title { color: var(--green); }
.forge-result.bad .forge-title { color: var(--red); }
.forge-lv { font-size: 1.1em; font-weight: 900; font-variant-numeric: tabular-nums; }
.forge-note { font-size: 0.8em; font-weight: 700; color: var(--gold); }
.forge-go { min-width: 10em; }
@keyframes forgeSpin { to { transform: rotate(360deg); } }
@keyframes forgeCharge { from { transform: scale(0.82); opacity: 0.55; } to { transform: scale(1.08); opacity: 1; } }
@keyframes forgeShake { 25% { transform: translate(0.6px, -0.6px); } 50% { transform: translate(-0.6px, 0.4px); } 75% { transform: translate(0.4px, 0.6px); } }
.forge-layer.still, .reduce-motion .forge-layer { animation: none; }
.forge-layer.still .forge *, .reduce-motion .forge * { animation: none !important; }
.v11-enhance .en-attempt { flex: none; padding: 0.7em 1em; }
.en-block { flex: none; margin-top: -0.2em; text-align: center; }
.short-frame .workshop, .short-frame .v11-enhance { gap: 0.35em; }
.short-frame .workshop .title, .short-frame .v11-enhance .title { font-size: 1.4em; }
.short-frame .v11-enhance .en-attempt { padding: 0.6em 1em; }
/*
 * DEV scaffold (V1.1 rev2 §12; local `?dev` builds only): the stage list's Difficulty I / II / III selector for the
 * picked stage, then one line with its TEST label and today's eligible clears, between the list and Play. Two short
 * lines (the note after the count is left out on a short frame), and the DEV chips under Back on one line there, so
 * the stage list keeps its room on a 320 x 568 frame.
 */
.dev-diff { flex: none; width: 100%; max-width: 20.5em; display: flex; flex-direction: column; align-items: center; gap: 0.22em; }
.diff-opts, .diff-chips { display: flex; justify-content: center; gap: 0.3em; width: 100%; }
.diff-opt, .diff-chip {
  flex: 1 1 auto; display: flex; align-items: center; justify-content: center; gap: 0.25em; min-width: 0; padding: 0.36em 0.5em;
  font-size: 0.72em; white-space: nowrap; color: var(--muted); --hit-y: 0.15em;
}
.diff-opt b, .diff-chip b { color: var(--text); }
.diff-opt span, .diff-chip span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.diff-opt .mini-ico, .diff-chip .mini-ico { width: 1em; height: 1em; color: var(--muted); }
.diff-opt.on, .diff-chip.on { color: var(--gold); border-color: var(--gold); background: rgba(255, 209, 102, 0.14); }
.diff-opt.on b, .diff-chip.on b { color: var(--gold); }
.diff-opt.locked, .diff-chip.locked { border-style: dashed; background: rgba(255, 255, 255, 0.03); }
.diff-left { font-size: max(0.64em, 9px); font-weight: 700; line-height: 1.35; color: var(--muted); text-align: center; }
.diff-left b { color: #c9e7ff; font-weight: 900; }
.diff-left .v11-tag { display: inline; padding: 0.05em 0.45em; font-size: 1em; font-style: normal; }
.short-frame .diff-more { display: none; }
.short-frame .challenge .dev-row { flex-wrap: nowrap; }
.short-frame .challenge .dev-row .chip { font-size: 0.6em; padding: 0.4em 0.65em; white-space: nowrap; }
/* The result screen's line for a scaffold run: its difficulty, then how it counted. */
.diff-result { display: flex; flex-direction: column; gap: 0.05em; text-align: center; }
.diff-result span { font-weight: 700; color: #c9e7ff; }

/*
 * Power Gain Reveal / 属性提升展示 (V1.1 owner addendum; src/revealView.ts): a panel over the current screen saying
 * what a piece, an enhancement or an upgrade changed. --c is the rarity's colour (V1.0 gear: the item's own). A gain
 * glows, a +5 / +10 milestone glows more and gets its banner, an obtained piece glows by rarity; a loss, a failure or
 * a held level stays plain and never celebrates. The sparks are CSS only, play once and are gone with reduced motion.
 * Sized in em on the frame, so it fits a 320 px portrait phone (the card scrolls inside itself if a list runs long).
 */
.reveal-layer { position: absolute; inset: 0; z-index: 4; display: flex; align-items: center; justify-content: center; padding: 1em; background: rgba(3, 5, 13, 0.76); animation: fadeIn 0.15s ease-out; }
.reveal { position: relative; display: flex; justify-content: center; width: 100%; max-width: 19em; max-height: 100%; }
.reveal.tier-simple { max-width: 17em; }
.rv-card {
  position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 0.45em; width: 100%; max-height: 100%; overflow-y: auto;
  padding: 1em 0.9em 0.75em; border-radius: 1em; text-align: center; overscroll-behavior: contain; touch-action: pan-y;
  background: linear-gradient(160deg, rgba(36, 48, 100, 0.97), rgba(14, 19, 46, 0.98));
  border: 1px solid color-mix(in srgb, var(--c) 55%, transparent);
  box-shadow: 0 0 1.6em color-mix(in srgb, var(--c) 30%, transparent);
  animation: rvIn var(--intro, 260ms) cubic-bezier(0.2, 1.4, 0.4, 1) backwards;
}
.reveal.tone-loss:not(.k-acquire) .rv-card, .reveal.tone-none:not(.k-acquire) .rv-card, .reveal.tone-fail .rv-card, .reveal.tone-held .rv-card {
  border-color: rgba(154, 167, 207, 0.35); box-shadow: none; animation-name: fadeIn;
}
.reveal.tier-simple .rv-card { box-shadow: none; }
.reveal.ms .rv-card { box-shadow: 0 0 2.4em 0.2em color-mix(in srgb, var(--c) 45%, transparent), inset 0 0 1.2em color-mix(in srgb, var(--c) 18%, transparent); }
.rv-kicker { font-size: 1.05em; font-weight: 900; font-style: italic; letter-spacing: 0.06em; text-transform: uppercase; color: var(--c); }
.tone-fail .rv-kicker { color: var(--red); }
/* Owner directive 2026-10-28 (Part 5): a failure is red, the Stabilizer-held one too; an enhancement success is green. */
.tone-held .rv-kicker { color: var(--red); }
.k-enhance.tone-gain .rv-kicker { color: var(--green); }
.tone-loss:not(.k-acquire) .rv-kicker { color: var(--muted); }
.rv-head { display: flex; align-items: center; gap: 0.6em; max-width: 100%; text-align: left; }
.rv-head .ico { flex: none; width: 2.8em; height: 2.8em; padding: 0.5em; border-radius: 0.8em; color: var(--c); background: color-mix(in srgb, var(--c) 16%, rgba(10, 14, 34, 0.9)); border: 1px solid color-mix(in srgb, var(--c) 60%, transparent); }
.rv-id { display: flex; flex-direction: column; min-width: 0; }
.rv-name { font-size: 1.15em; overflow-wrap: anywhere; }
.rv-meta { font-size: 0.78em; color: var(--muted); }
.rv-lv { font-size: 1.25em; font-weight: 900; font-variant-numeric: tabular-nums; }
.rv-lv.up { color: var(--green); }
.rv-lv.down { color: var(--red); }
.rv-lv.kept { color: var(--muted); }
.rv-ms {
  padding: 0.15em 0.8em; border-radius: 1em; font-weight: 900; letter-spacing: 0.05em; color: #1a1300;
  background: linear-gradient(90deg, var(--gold), color-mix(in srgb, var(--c) 55%, var(--gold)));
  animation: popIn 0.4s cubic-bezier(0.2, 1.6, 0.4, 1) calc(var(--intro, 260ms) * 0.6) backwards;
}
.rv-cause { max-width: 22em; font-size: 0.8em; color: var(--muted); }
.rv-if { font-size: 0.72em; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--cyan); }
.rv-stats, .rv-abil { display: flex; flex-direction: column; gap: 0.2em; width: 100%; margin: 0; padding: 0; list-style: none; }
.rv-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: baseline; gap: 0.5em; padding: 0.25em 0.5em; border-radius: 0.5em;
  font-size: 0.86em; text-align: left; background: rgba(10, 14, 34, 0.55);
}
.rv-v, .rv-d { white-space: nowrap; font-variant-numeric: tabular-nums; }
.rv-a, .rv-arrow { color: var(--muted); }
.rv-arrow { margin: 0 0.25em; font-style: normal; }
.rv-d { font-style: normal; font-weight: 800; }
.rv-row.up .rv-b, .rv-row.up .rv-d { color: var(--green); }
.rv-row.down .rv-b, .rv-row.down .rv-d { color: var(--red); }
.rv-abil li { font-size: 0.82em; font-weight: 700; }
.rv-abil li.up { color: var(--gold); }
.rv-abil li.down { color: var(--red); }
.rv-none, .rv-used { max-width: 22em; font-size: 0.78em; color: var(--muted); }
.rv-used b { color: var(--text); }
.rv-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.4em; width: 100%; margin-top: 0.2em; }
.rv-actions .btn { flex: 1 1 7em; width: auto; }
/* Until the buttons arm, a tap goes through them to the card (a skip), never to an action. */
.reveal-layer:not(.armed) .rv-actions { pointer-events: none; }
.rv-fx { position: absolute; left: 50%; top: 40%; z-index: 0; width: 0; height: 0; pointer-events: none; }
.rv-fx i {
  position: absolute; width: 0.4em; height: 0.4em; margin: -0.2em; border-radius: 50%; background: var(--c); box-shadow: 0 0 0.6em var(--c);
  opacity: 0; animation: rvSpark 1.1s ease-out calc(var(--intro, 260ms) + var(--d)) both;
}
@keyframes rvIn { from { transform: translateY(1em) scale(0.86); opacity: 0; } }
@keyframes rvSpark {
  from { transform: rotate(var(--a)) translateY(0) scale(0.6); opacity: 0.9; }
  to { transform: rotate(var(--a)) translateY(calc(var(--r) * -1)) scale(0.2); opacity: 0; }
}
.reduce-motion .rv-card, .reduce-motion .rv-ms { animation: fadeIn 0.12s ease-out backwards; }
.reduce-motion .rv-fx { display: none; }
/* The result screen's gear card: what the new piece would change if equipped (the simpler acquisition panel's comparison). */
.rv-cmp { display: block; font-style: normal; font-size: 0.92em; color: var(--muted); }
.rv-cmp .up { color: var(--green); }
.rv-cmp .down { color: var(--red); }
/* DEV scaffold only (local ?dev builds): the V1.1 Arsenal page (src/ui.ts showV11Arsenal). */
.ar-row { display: flex; flex-direction: column; gap: 0.3em; margin: 0 0 0.5em; padding: 0.55em 0.7em; text-align: left; }
.ar-head { display: flex; justify-content: space-between; align-items: baseline; gap: 0.5em; }
.ar-fx { font-size: 0.82em; color: var(--muted); }
.ar-fx b { color: var(--text); }
.ar-act { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.4em; }
.ar-cost { font-size: 0.8em; color: var(--gold); }
.ar-bank { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.4em; margin: 0 0 0.5em; padding: 0.5em 0.7em; font-size: 0.85em; }

/* ---- Stats panel (owner addendum 2026-10-27 §6): the loadout every run starts with ---- */
.gear-top .stats-open { font-size: 0.85em; padding: 0.35em 0.75em; }
/* t186: the active set skills' names left of 属性, same row; each its own tap target. Empty: the row is just 属性. */
.gear-stat-row { display: inline-flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 0.15em 0.9em; }
.gear-top .gear-res { font-size: 0.88em; padding: 0.4em 0.15em; line-height: 1.2; white-space: nowrap; }
.stats-panel { gap: 0.55em; }
.sp-lead { margin: -0.3em 0 0; max-width: 20.5em; color: var(--muted); font-size: 0.78em; font-weight: 600; text-align: center; line-height: 1.35; }
.sp-grid { max-width: 20.5em; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5em 0.4em; padding: 0.75em 0.6em; }
.sp-cell { display: flex; flex-direction: column; align-items: center; gap: 0.08em; min-width: 0; text-align: center; }
.sp-k { color: var(--muted); font-size: max(0.7em, 9px); font-weight: 800; line-height: 1.15; }
.sp-v { font-size: 1.2em; font-variant-numeric: tabular-nums; }
.sp-sub { color: var(--cyan); font-size: max(0.66em, 9px); font-weight: 700; }
.sp-head { width: 100%; max-width: 20.5em; }
.sp-scroll {
  flex: 0 1 auto; min-height: 4em; width: 100%; max-width: 20.5em; overflow-y: auto; overflow-x: hidden; touch-action: pan-y;
  overscroll-behavior: contain; display: flex; flex-direction: column; gap: 0.3em; padding: 0.3em 0.1em;
}
.sp-line { flex: none; border-radius: 0.7em; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(120, 160, 255, 0.16); }
.sp-line summary {
  list-style: none; display: flex; align-items: baseline; justify-content: space-between; gap: 0.6em; padding: 0.5em 0.7em;
  min-height: 2.6em; cursor: pointer; font-weight: 700; font-size: 0.9em;
}
.sp-line summary::-webkit-details-marker { display: none; }
.sp-line summary::after { content: '›'; color: var(--muted); transition: transform 0.15s; margin-left: 0.2em; }
.sp-line[open] summary::after { transform: rotate(90deg); }
.sp-line summary span { color: var(--text); }
.sp-line summary b { margin-left: auto; font-variant-numeric: tabular-nums; color: var(--gold); }
.sp-rows { margin: 0; padding: 0 0.75em 0.55em; display: grid; gap: 0.2em; font-size: 0.82em; }
.sp-rows div { display: flex; justify-content: space-between; gap: 0.8em; }
.sp-rows dt { color: var(--muted); font-weight: 600; }
.sp-rows dd { margin: 0; font-weight: 800; font-variant-numeric: tabular-nums; text-align: right; }
.sp-expr { padding: 0 0.75em 0.6em; color: var(--cyan); font-size: 0.76em; font-weight: 700; }
.sp-fever { padding: 0.45em 0.7em 0; color: var(--text); font-size: 0.82em; font-weight: 700; }
.sp-note { margin: 0.2em 0 0.3em; padding: 0 0.7em; color: var(--muted); font-size: 0.74em; font-weight: 600; line-height: 1.35; }
.reduce-motion .sp-line summary::after { transition: none; }

/* ---- Leaderboard Center (owner addendum 2026-10-27 §3) ---- */
.lb-btn {
  flex: none; display: flex; align-items: center; gap: 0.25em; padding: 0.3em 0.5em; border-radius: 0.7em; font-size: 0.78em; font-weight: 900;
  color: var(--cyan); white-space: nowrap; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(76, 201, 240, 0.32);
}
.lb-btn svg { flex: none; width: 1.3em; height: 1.3em; }
.lb-btn:active { transform: scale(0.97); }
.leaderboard { gap: 0.5em; }
.lb-tabs { display: flex; width: 100%; max-width: 20.5em; border-radius: 0.8em; padding: 0.2em; background: rgba(255, 255, 255, 0.06); }
.lb-tab { flex: 1; min-height: 2.4em; border-radius: 0.65em; font-size: 0.85em; font-weight: 800; color: var(--muted); }
.lb-tab.on { color: #10162f; background: linear-gradient(180deg, #7fe3ff, #4cc9f0); }
.lb-note { max-width: 20.5em; color: var(--muted); font-size: 0.72em; font-weight: 600; text-align: center; line-height: 1.35; }
.lb-scroll {
  flex: 0 1 auto; min-height: 5em; width: 100%; max-width: 20.5em; overflow-y: auto; overflow-x: hidden; touch-action: pan-y; overscroll-behavior: contain;
  -webkit-mask-image: linear-gradient(transparent, #000 0.4em, #000 calc(100% - 0.4em), transparent);
  mask-image: linear-gradient(transparent, #000 0.4em, #000 calc(100% - 0.4em), transparent);
}
.lb-list { list-style: none; margin: 0; padding: 0.3em 0.1em; display: flex; flex-direction: column; gap: 0.25em; }
.lb-row {
  display: grid; grid-template-columns: 2.2em 1fr auto; align-items: center; gap: 0.5em; padding: 0.4em 0.6em; border-radius: 0.65em;
  background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(120, 160, 255, 0.14); font-size: 0.86em;
}
.lb-row.top1 { border-color: rgba(255, 209, 102, 0.6); }
.lb-row.top2 { border-color: rgba(220, 230, 255, 0.5); }
.lb-row.top3 { border-color: rgba(214, 150, 92, 0.55); }
.lb-row.me { background: rgba(76, 201, 240, 0.12); border-color: rgba(76, 201, 240, 0.45); }
.lb-rank { font-weight: 900; text-align: center; font-variant-numeric: tabular-nums; color: var(--muted); }
.lb-row.top .lb-rank { color: var(--gold); }
.lb-name { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3em; min-width: 0; }
.lb-nick { font-weight: 800; overflow-wrap: anywhere; }
/* A BLACK member's name is in gold on the boards (V1.1.1). */
.lb-row.lb-black .lb-nick { color: #ffd76a; text-shadow: 0 0 0.6em rgba(255, 196, 64, 0.35); }
.lb-you { font-style: normal; font-size: 0.75em; color: var(--cyan); font-weight: 900; }
.lb-name .acct-badge { font-size: 0.66em; }
.lb-score { display: flex; flex-direction: column; align-items: flex-end; font-variant-numeric: tabular-nums; }
.lb-score b { font-size: 0.95em; }
.lb-score span { color: var(--muted); font-size: 0.72em; font-weight: 700; }
.lb-msg { display: flex; flex-direction: column; align-items: center; gap: 0.6em; padding: 1.4em 0.8em; color: var(--muted); font-size: 0.86em; font-weight: 700; text-align: center; line-height: 1.4; }
.lb-me { width: 100%; max-width: 20.5em; color: var(--muted); font-size: 0.8em; font-weight: 700; text-align: center; }
.lb-me .lb-list { padding: 0; }
.lb-pager { display: flex; align-items: center; justify-content: center; gap: 0.5em; color: var(--muted); font-size: 0.75em; font-weight: 700; }
.lb-pager .chip[disabled] { opacity: 0.4; }
.lb-row[data-name] { cursor: pointer; }
.lb-report {
  width: 100%; max-width: 20.5em; display: flex; flex-direction: column; gap: 0.35em; padding: 0.5em 0.6em; border-radius: 0.7em;
  background: rgba(255, 77, 109, 0.1); border: 1px solid rgba(255, 77, 109, 0.4); font-size: 0.78em; font-weight: 700;
}
.lb-report[hidden] { display: none; }
.lb-report-of { color: var(--text); overflow-wrap: anywhere; }
.lb-reasons { display: flex; flex-wrap: wrap; gap: 0.3em; }
.lb-reasons .chip { font-size: 0.92em; padding: 0.3em 0.6em; }
/* owner request 2026-11-04: the player panel: gold for BLACK, blue otherwise; 举报 a small red button */
.lb-act.lb-act-blue { background: rgba(76, 201, 240, 0.1); border-color: rgba(76, 201, 240, 0.5); }
.lb-act.lb-act-gold { background: rgba(255, 209, 102, 0.12); border-color: rgba(255, 209, 102, 0.6); }
.lb-act-name { font-size: 1.1em; font-weight: 900; }
.lb-act-gold .lb-act-name { color: var(--gold); }
.lb-act-btns { display: flex; flex-wrap: wrap; gap: 0.35em; align-items: center; }
.lb-act-btns .chip { font-size: 0.92em; padding: 0.35em 0.7em; }
.lb-act-btns .chip[hidden], .lb-reasons[hidden] { display: none; }
.lb-act-btns .chip[disabled] { opacity: 0.5; }
.lb-act-btns .lb-act-report { color: #fff; background: rgba(255, 77, 109, 0.85); border-color: var(--red); font-size: 0.8em; padding: 0.28em 0.55em; }
.lb-act-btns .lb-report-cancel { margin-left: auto; }

/* ---- Enemy Intel Archive / 敌情档案 (owner addendum 2026-10-28; src/intel.ts) ---- */
.intel-btn {
  flex: none; display: flex; align-items: center; gap: 0.25em; padding: 0.3em 0.45em; border-radius: 0.7em; font-size: 0.78em; font-weight: 900;
  color: #9fffcf; white-space: nowrap; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(6, 214, 160, 0.35);
}
.intel-btn svg { flex: none; width: 1.3em; height: 1.3em; }
.intel-btn:active { transform: scale(0.97); }
/* Menu: the Leaderboard and the archive share one column beside Achievements, so Records keeps its width on a phone. */
.rec-col { flex: none; display: flex; flex-direction: column; gap: 0.3em; }
.rec-col > button { flex: 1; --hit-y: 0.15em; }
.intel { justify-content: flex-start; gap: 0.5em; }
.intel .title { font-size: 1.7em; flex: none; }
.intel-sum { flex: none; display: flex; flex-direction: column; align-items: center; gap: 0.3em; width: 100%; max-width: 20.5em; font-size: 0.85em; font-weight: 800; }
.intel-sum b { color: var(--green); }
.intel-sum .bar { width: 100%; max-width: 12em; height: 0.45em; border-radius: 0.3em; background: rgba(255, 255, 255, 0.1); overflow: hidden; }
.intel-sum .bar > i { display: block; height: 100%; background: linear-gradient(90deg, #06d6a0, #9fffcf); }
.intel-tabs { flex: none; display: flex; gap: 0.15em; width: 100%; max-width: 20.5em; border-radius: 0.8em; padding: 0.2em; background: rgba(255, 255, 255, 0.06); }
.intel-tab {
  flex: 1; min-width: 0; min-height: 2.7em; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.05em;
  border-radius: 0.65em; font-size: 0.72em; font-weight: 800; line-height: 1.15; color: var(--muted);
}
.intel-tab span { max-width: 100%; overflow-wrap: anywhere; }
.intel-tab i { font-style: normal; font-size: 0.85em; opacity: 0.85; }
.intel-tab.on { color: #062a20; background: linear-gradient(180deg, #9fffcf, #06d6a0); }
.intel-scroll {
  position: relative; flex: 0 1 auto; min-height: 4em; width: 100%; max-width: 20.5em; overflow-y: auto; overflow-x: hidden;
  touch-action: pan-y; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 0.3em; padding: 0.35em 0.1em;
  -webkit-mask-image: linear-gradient(transparent, #000 0.5em, #000 calc(100% - 0.5em), transparent);
  mask-image: linear-gradient(transparent, #000 0.5em, #000 calc(100% - 0.5em), transparent);
}
.intel-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.4em; }
.intel-card {
  min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 0.15em; padding: 0.4em 0.25em 0.45em; border-radius: 0.75em;
  background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1);
}
.intel-card canvas { width: 3.4em; height: 3.4em; }
.intel-card .ic-name { max-width: 100%; font-size: 0.72em; font-weight: 900; line-height: 1.15; text-align: center; overflow-wrap: anywhere; }
/* t181 hotfix: a boss's 「short name」 never splits on the codex tile — the long name wraps, the bracketed part stays whole */
.intel-card .ic-name .ic-nb { display: inline-block; white-space: nowrap; }
.intel-card .ic-state { font-size: max(0.6em, 9px); font-weight: 800; color: var(--muted); }
.intel-card.seen { border-color: rgba(76, 201, 240, 0.4); }
.intel-card.seen .ic-state { color: var(--cyan); }
.intel-card.beaten { border-color: rgba(6, 214, 160, 0.5); background: rgba(6, 60, 45, 0.35); }
.intel-card.beaten .ic-state { color: var(--green); }
.intel-card.unknown .ic-name { color: var(--muted); }
.intel-card:active { transform: scale(0.97); }
.intel-empty { padding: 1.2em 0.8em; color: var(--muted); font-size: 0.8em; font-weight: 700; line-height: 1.4; text-align: center; }
.intel-note { flex: none; font-size: 0.72em; }
.intel button.done { flex: none; padding: 0.7em 1em; }
/* An entry's file. */
.intel-entry .intel-scroll { gap: 0.35em; text-align: left; }
.if-head { flex: none; display: flex; align-items: center; gap: 0.7em; }
.if-head canvas { flex: none; width: 5em; height: 5em; border-radius: 0.8em; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1); }
.if-id { min-width: 0; display: flex; flex-direction: column; gap: 0.15em; }
.if-name { font-size: 1.25em; font-weight: 900; line-height: 1.1; }
.if-alt { color: var(--muted); font-size: 0.8em; font-weight: 700; }
.if-tags { display: flex; flex-wrap: wrap; gap: 0.3em; margin-top: 0.15em; }
.if-tags span { padding: 0.05em 0.45em; border-radius: 0.4em; font-size: max(0.66em, 9px); font-weight: 900; color: var(--muted); background: rgba(255, 255, 255, 0.08); }
.if-tags .if-state.seen { color: var(--cyan); }
.if-tags .if-state.beaten { color: var(--green); }
.if-role { flex: none; font-size: 0.8em; font-weight: 700; line-height: 1.35; }
.if-stats {
  flex: none; display: flex; flex-direction: column; gap: 0.25em; padding: 0.45em 0.6em; border-radius: 0.7em;
  background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1);
}
.if-stat { display: flex; align-items: center; gap: 0.5em; font-size: 0.74em; font-weight: 800; }
.if-stat > span { flex: 1; color: var(--muted); }
.if-stat .pips { display: inline-flex; gap: 0.18em; }
.if-stat .pips i { width: 0.8em; height: 0.45em; border-radius: 0.2em; background: rgba(255, 255, 255, 0.12); }
.if-stat .pips i.on { background: var(--gold); }
.if-stat b { min-width: 4.4em; text-align: right; }
.intel-entry .rec-head { flex: none; margin: 0.3em 0 -0.15em; }
.if-list { flex: none; margin: 0; padding-left: 1.1em; display: flex; flex-direction: column; gap: 0.2em; font-size: 0.74em; font-weight: 600; line-height: 1.35; }
.if-phases { list-style: none; padding-left: 0; }
.if-phases li { display: flex; flex-direction: column; gap: 0.05em; padding: 0.3em 0.5em; border-radius: 0.55em; background: rgba(255, 255, 255, 0.05); }
.if-phases b { color: var(--gold); }
.if-phases span { color: var(--muted); }
.if-line { flex: none; color: var(--muted); font-size: 0.7em; font-weight: 600; line-height: 1.35; }
.if-diff { margin-top: 0.3em; }
/* V1.1 test build: the server's settlement note on the result, under the coins earned. */
.reward .v11-settle { max-width: 19em; color: var(--text); font-size: 0.78em; font-weight: 700; line-height: 1.35; text-align: center; }
/* V1.1.2: an account run's Gold before the server credits it (muted), and the server's breakdown under the credited amount. */
.reward-amt.pending { opacity: 0.5; }
.reward .gold-break { width: 100%; max-width: 17em; font-size: 0.8em; }
.gold-break dl { margin: 0.2em 0 0; display: grid; gap: 0.12em; }
.gold-break dl > div { display: flex; justify-content: space-between; gap: 1em; color: var(--muted); font-weight: 700; }
.gold-break dt, .gold-break dd { margin: 0; }
.gold-break dd { font-variant-numeric: tabular-nums; }
.gold-break .cut dd { color: #ffb36b; }
.gold-break .add dd { color: #9be7ff; }
.gold-break .total { color: var(--text); font-weight: 900; border-top: 1px solid rgba(255, 255, 255, 0.14); padding-top: 0.15em; }
.gold-break .gold-foot { margin-top: 0.3em; color: var(--muted); font-size: 0.92em; line-height: 1.35; text-align: center; }
.short-frame .intel { gap: 0.4em; }
.short-frame .intel .title { font-size: 1.5em; }

/* The V1.1 test build's Difficulty I / II / III selector and the result's difficulty line (owner authorization 2026-10-29): the DEV
   panel's look under their own names, so no DEV class name ships in a share build. */
.diff-sel { flex: none; width: 100%; max-width: 20.5em; display: flex; flex-direction: column; align-items: center; gap: 0.22em; }
.diff-sel .diff-left .diff-tag, .run-diff .diff-tag {
  display: inline; padding: 0.05em 0.45em; border-radius: 0.45em; font-size: 1em; font-style: normal; font-weight: 900; color: #2a1600; background: #ffb020;
}
.run-diff { flex: none; max-width: 22em; padding: 0.2em 0.6em; border-radius: 0.4em; font-size: max(0.68em, 9px); font-weight: 800; color: #ffb36b;
  border: 1px solid rgba(255, 179, 107, 0.6); display: flex; flex-direction: column; gap: 0.05em; text-align: center; }
.run-diff span { font-weight: 700; color: #c9e7ff; }

/* The V1.1 seven-day calendar (owner authorization 2026-10-29): several rewards a day, Day 7's commemorative piece. */
.d11 { display: flex; flex-direction: column; align-items: center; gap: 0.12em; }
.d11-items { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0.25em; }
/* Owner consolidated request §1: each day's rewards are picture cells (amount on the picture, the name in its detail). */
.d11-items .art-cell { width: 2.7em; height: 2.7em; font-size: 0.95em; }
.d11.featured .d11-items .art-cell { width: 3.2em; height: 3.2em; }
.d11-item { display: inline-flex; align-items: center; gap: 0.25em; font-size: 0.9em; }
.d11-ico { width: 1.1em; height: 1.1em; color: var(--gold); }
.d11-note { font-size: max(0.6em, 8px); font-weight: 700; color: #c39bff; text-align: center; line-height: 1.25; }
.d11.featured .dd-name { color: #c39bff; }
.daily-day.d11.featured { display: flex; flex-direction: column; align-items: center; gap: 0.15em; }

/* The V1.1 account level (owner authorization 2026-10-29): "Lv N" by the name, the XP line and bar in the account sheet. */
.acct-lv { background: rgba(155, 231, 255, 0.16); color: #9be7ff; border: 1px solid rgba(155, 231, 255, 0.5); }
.acct-xp { display: flex; flex-direction: column; align-items: center; gap: 0.25em; }
.acct-xp .pity-bar { flex: 0 0 auto; width: 12em; }

/* V1.1 TEST Season Pass page (src/ui.ts showPass11): the season head, a four-column table and the missions. */
.daily-page .to-pass { flex: none; }
.pass-page .title { font-size: 1.6em; }
.pass-page .sub.narrow { max-width: 21em; font-size: 0.8em; text-wrap: balance; }
.pass-page .title, .pass-page .sub, .pass-page .v11-tag, .pass-page .p11-head, .pass-page .p11-all, .pass-page .daily-done, .pass-page .back { flex: none; }
.pass-page .extras-box { max-width: 22em; width: 100%; min-height: 0; }
.p11-head { display: flex; flex-direction: column; align-items: center; gap: 0.2em; font-size: 0.85em; }
.p11-head .pity-bar { flex: 0 0 auto; width: 14em; }
.p11-battle { color: var(--muted); font-size: 0.9em; }
.p11-body { display: flex; flex-direction: column; gap: 0.25em; overflow-y: auto; max-height: 100%; }
.p11-row { display: grid; grid-template-columns: 2em 1fr 1fr 1fr; gap: 0.25em; align-items: stretch; font-size: 0.7em; }
.p11-row.p11-cols { position: sticky; top: 0; z-index: 1; background: #141b33; font-size: 0.74em; padding-bottom: 0.2em; }
.p11-th { display: flex; flex-direction: column; align-items: center; font-weight: 700; }
.p11-th small { font-weight: 400; color: var(--muted); font-size: 0.85em; text-align: center; }
.p11-lv { display: flex; align-items: center; justify-content: center; color: var(--muted); }
.p11-row.reached .p11-lv { color: var(--gold); }
.p11-cell { display: flex; align-items: center; justify-content: center; text-align: center; padding: 0.35em 0.2em; border-radius: 0.5em; background: rgba(255, 255, 255, 0.05); line-height: 1.2; min-height: 2.6em; overflow-wrap: anywhere; }
.p11-cell.locked, .p11-cell.empty { opacity: 0.45; }
.p11-cell.reached { opacity: 0.7; outline: 1px dashed rgba(255, 255, 255, 0.25); }
.p11-cell.claimed { color: var(--muted); }
button.p11-cell.ready { border: 1px solid var(--gold); color: #ffe7a8; background: rgba(255, 209, 102, 0.14); font: inherit; cursor: pointer; }
.p11-sect { margin-top: 0.6em; font-weight: 700; font-size: 0.85em; }
.p11-mission { display: grid; grid-template-columns: 4.6em 1fr auto; gap: 0.15em 0.4em; align-items: center; font-size: 0.72em; padding: 0.3em 0.45em; border-radius: 0.5em; background: rgba(255, 255, 255, 0.05); }
.p11-mg { color: var(--muted); grid-row: span 2; }
.p11-mx { color: var(--gold); }
.p11-mission .pity-bar { flex: none; grid-column: 2; }
.p11-mp { grid-column: 3; color: var(--muted); text-align: right; }
.p11-mission.met { opacity: 0.6; }
.p11-note { margin-top: 0.5em; font-size: 0.7em; color: var(--muted); text-align: center; }
.p11-grant { margin: 0.3em auto 0; flex: none; }
/* V1.1 art (src/v11/art.ts; owner consolidated request 2026-10-29 §1, §13): every collectible, reward, skill and emblem is a
   picture. A cell shows the picture, ×amount, its rarity frame, a level mark and its state (claimable glows, claimed dims under a
   check, locked is grey under a lock, premium is warm); its name is the tap / hover detail (.art-tip), never written on it. */
.art { display: inline-block; line-height: 0; flex: none; }
.art svg { width: 100%; height: 100%; display: block; overflow: visible; }
.art-cell {
  position: relative; display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 3.6em; height: 3.6em; padding: 0.28em; margin: 0; border-radius: 0.75em;
  border: 1px solid rgba(154, 167, 207, 0.3); color: var(--text); font: inherit; cursor: pointer;
  background: radial-gradient(circle at 50% 32%, rgba(120, 150, 230, 0.16), rgba(9, 13, 28, 0.92) 72%), #0d1328;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
}
span.art-cell { cursor: default; }
.art-cell .art { width: 100%; height: 100%; }
.art-n {
  position: absolute; right: 0.22em; bottom: 0.08em; font-size: 0.64em; font-weight: 900; line-height: 1.1;
  font-variant-numeric: tabular-nums; color: #fff; text-shadow: 0 1px 0 #000, 0 0 3px #000, 0 0 3px #000;
}
.art-lv {
  position: absolute; left: 0.2em; top: 0.12em; font-size: 0.6em; font-style: normal; font-weight: 900; line-height: 1.1;
  color: #fff; text-shadow: 0 1px 0 #000, 0 0 3px #000;
}
.art-cell.r-common { border-color: #8f9bb8; }
.art-cell.r-rare { border-color: #5cb2ff; box-shadow: inset 0 0 0.7em rgba(92, 178, 255, 0.35); }
.art-cell.r-epic { border-color: #c49bff; box-shadow: inset 0 0 0.8em rgba(196, 155, 255, 0.4); }
.art-cell.r-legendary { border-color: #ffb547; box-shadow: inset 0 0 0.9em rgba(255, 181, 71, 0.45), 0 0 0.5em rgba(255, 181, 71, 0.3); }
.art-cell.r-commemorative { border-color: #f07cff; box-shadow: inset 0 0 0.9em rgba(240, 124, 255, 0.45), 0 0 0.5em rgba(240, 124, 255, 0.3); }
.art-cell.r-rare .art-lv { color: #9fd0ff; }
.art-cell.r-epic .art-lv { color: #dcc4ff; }
.art-cell.r-legendary .art-lv { color: #ffd38a; }
.art-cell.r-commemorative .art-lv { color: #f9b8ff; }
.art-cell.st-premium { background: radial-gradient(circle at 50% 30%, rgba(255, 181, 71, 0.22), rgba(26, 16, 34, 0.94) 72%), #170f22; }
.art-cell.st-claimable { outline: 2px solid #06d6a0; outline-offset: 1px; box-shadow: 0 0 0.9em rgba(6, 214, 160, 0.6); animation: artReady 0.9s ease-out; }
.art-cell.st-claimed .art, .art-cell.st-claimed .art-n, .art-cell.st-claimed .art-lv { opacity: 0.5; }
.art-cell.st-claimed { border-color: rgba(6, 214, 160, 0.45); background: rgba(6, 214, 160, 0.07); }
.art-cell.st-locked .art { filter: grayscale(1) brightness(0.62); }
.art-cell.st-locked .art-n, .art-cell.st-locked .art-lv { opacity: 0.6; }
.art-cell.st-owned { box-shadow: 0 0 0.7em rgba(255, 255, 255, 0.25); }
.art-st { position: absolute; top: -0.32em; right: -0.32em; width: 1.25em; height: 1.25em; border-radius: 50%; border: 2px solid #0b1020; }
.art-done { background: #06d6a0; }
.art-done::after { content: ''; position: absolute; left: 0.36em; top: 0.15em; width: 0.3em; height: 0.56em; border: solid #fff; border-width: 0 0.13em 0.13em 0; transform: rotate(45deg); }
.art-lock { background: #2a3150; }
.art-lock::before { content: ''; position: absolute; left: 0.37em; top: 0.18em; width: 0.32em; height: 0.36em; border: 0.11em solid #cfd6ea; border-bottom: 0; border-radius: 0.3em 0.3em 0 0; }
.art-lock::after { content: ''; position: absolute; left: 0.3em; top: 0.5em; width: 0.6em; height: 0.44em; border-radius: 0.1em; background: #cfd6ea; }
@keyframes artReady { from { box-shadow: 0 0 1.6em rgba(6, 214, 160, 0.95); } }
.reduce-motion .art-cell.st-claimable { animation: none; }
@media (prefers-reduced-motion: reduce) { .art-cell.st-claimable { animation: none; } }
/* An inline picture in a line of text (a price, a wallet, a material count). */
.art-inline { display: inline-block; width: 1.35em; height: 1.35em; vertical-align: -0.32em; line-height: 0; }
.art-inline svg { width: 100%; height: 100%; display: block; overflow: visible; }
/* The detail a tap (touch) or hover (mouse) puts over a picture: its name and what it is. */
.art-tip {
  position: fixed; z-index: 95; max-width: min(18em, calc(100vw - 16px)); padding: 0.45em 0.75em; border-radius: 0.55em;
  background: rgba(8, 12, 26, 0.97); border: 1px solid rgba(154, 167, 207, 0.45); color: var(--text); font-size: 0.8em; line-height: 1.35;
  box-shadow: 0 0.4em 1.2em rgba(0, 0, 0, 0.5); pointer-events: none; opacity: 0; transition: opacity 0.12s;
}
.art-tip.on { opacity: 1; }
/* A line icon's place taken by the illustrated picture (V1.1 Arsenal rows, skills). */
.ico.pic { padding: 0; background: none; border: 0; color: inherit; overflow: visible; }
.ico.pic svg { width: 100%; height: 100%; display: block; overflow: visible; }
.shop-row .ico.pic { width: 2.6em; height: 2.6em; padding: 0; background: none; }
.skill-card .ico.pic { padding: 0; background: none; }
/* A price as pictures: each amount with its item's picture (red when the account lacks it). */
.price-pill { display: inline-flex; align-items: center; gap: 0.1em; margin-right: 0.35em; font-weight: 800; white-space: nowrap; font-variant-numeric: tabular-nums; }
.price-pill.short { color: #ff8fa3; }
/* The reveal panel's large upgrade / item picture (V1.1). */
.rv-art { display: block; width: 5.2em; height: 5.2em; margin: 0 auto 0.2em; filter: drop-shadow(0 0.3em 0.8em rgba(0, 0, 0, 0.45)); }
.rv-art svg { width: 100%; height: 100%; display: block; overflow: visible; }
.rv-art + .rv-head { justify-content: center; text-align: center; }
.rv-art + .rv-head .rv-id { align-items: center; }

/* V1.1 homepage (owner consolidated request 2026-10-29 §3–§4): the Season Pass card in the daily card's place; illustrated shortcuts down
   the left (Daily Login with its "!", gift packs, missions) and the membership emblems down the right (pictures only: grey and locked
   when not held, full colour with a glow when held). The rails sit beside the logo, clear of it from 320 px up. */
.home-rail { position: absolute; z-index: 2; top: calc(var(--safe-top, 0px) + 4.3em); display: flex; flex-direction: column; gap: 0.55em; }
.home-rail.left { left: 0.55em; }
.home-rail.right { right: 0.55em; }
.hr-btn { position: relative; display: flex; flex-direction: column; align-items: center; gap: 0.1em; width: 3.3em; padding: 0; color: var(--text); --hit-y: 0.1em; }
.hr-btn .art { width: 2.75em; height: 2.75em; filter: drop-shadow(0 0.2em 0.35em rgba(0, 0, 0, 0.55)); }
.hr-label { font-size: 0.6em; font-weight: 800; color: #cdd6f0; white-space: nowrap; text-shadow: 0 1px 0 #000, 0 0 3px #000; }
.hr-btn:active .art, .hr-member:active .art { transform: scale(0.94); }
.hr-bang {
  position: absolute; top: -0.15em; right: 0.05em; min-width: 1.15em; height: 1.15em; padding: 0 0.2em; border-radius: 0.6em;
  font-style: normal; font-weight: 900; font-size: 0.78em; line-height: 1.15em; color: #fff; background: #ff3b5c; border: 2px solid #0b1020;
  box-shadow: 0 0 0.5em rgba(255, 59, 92, 0.7);
}
/* V1.1.2 Mailbox: a number for claimable rewards, a dot for unread mail. */
.hr-dot { position: absolute; top: 0.1em; right: 0.35em; width: 0.62em; height: 0.62em; border-radius: 50%; background: #ff3b5c; border: 2px solid #0b1020; }
.hr-member { position: relative; width: 3.1em; height: 3.1em; padding: 0; border-radius: 50%; --hit-y: 0.1em; }
.hr-member .art { width: 100%; height: 100%; filter: grayscale(1) brightness(0.55) drop-shadow(0 0.15em 0.3em rgba(0, 0, 0, 0.6)); }
.hr-member.owned .art { filter: drop-shadow(0 0 0.45em rgba(92, 178, 255, 0.75)) drop-shadow(0 0.15em 0.3em rgba(0, 0, 0, 0.5)); }
.hr-member.blackcard.owned .art { filter: drop-shadow(0 0 0.5em rgba(245, 196, 81, 0.8)) drop-shadow(0 0.15em 0.3em rgba(0, 0, 0, 0.5)); }
.hr-member .art-st { top: auto; bottom: 0; right: 0; }
/*
 * The emblems' other states (V1.1.1; ui.ts homeRails, src/entitlements.ts memberState): expired keeps a little of the artwork's
 * colour under a clock mark (it was yours), locked stays grey under the lock, loading is faded with no mark, and unknown (no
 * answer from the server) is dim with a "?" mark, so a slow or failed check is never read as "locked". Both lit when both are active.
 */
.hr-member.st-expired .art { filter: grayscale(0.7) brightness(0.62) drop-shadow(0 0.15em 0.3em rgba(0, 0, 0, 0.6)); }
.hr-member.st-loading .art { filter: grayscale(1) brightness(0.45); opacity: 0.6; }
.hr-member.st-unknown .art { filter: grayscale(1) brightness(0.42); }
.art-expired { background: #4a3a12; }
.art-expired::before { content: ''; position: absolute; inset: 0.2em; border-radius: 50%; border: 0.1em solid #ffd76a; }
.art-expired::after { content: ''; position: absolute; left: 0.55em; top: 0.33em; width: 0.1em; height: 0.3em; background: #ffd76a; box-shadow: 0.1em 0.2em 0 -0.01em #ffd76a; }
.art-unknown { background: #2a3150; }
.art-unknown::after { content: '?'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 0.75em; font-weight: 900; color: #cfd6ea; }
/* The logo keeps clear of the rails on narrow frames (320 px: the rails are 3.3em wide). */
.home11 .logo, .home11 .tagline, .home11 .acct-entry { max-width: calc(100% - 7.6em); }
/* "FUSION DEFENSE" is wider than 聚变防线: a little smaller beside the rails (the frame is 22.5em wide at every width). */
html:not([lang="zh-CN"]) .home11 .logo { font-size: 0.84em; }
/* Beside the wider English logo the seasonal drawing sits over its first letter instead of to its left (where the shortcuts are). */
html:not([lang="zh-CN"]) .home11 .season { right: auto; left: -0.2em; top: -1.7em; width: 2em; height: 2em; }
.pass-card { gap: 0.7em; padding: 0.6em 0.75em; border-color: rgba(255, 159, 28, 0.35); background: linear-gradient(160deg, rgba(58, 36, 96, 0.92), rgba(20, 18, 52, 0.95)); }
.pass-card .pc-art { flex: none; width: 3.1em; height: 3.1em; line-height: 0; filter: drop-shadow(0 0.15em 0.35em rgba(0, 0, 0, 0.5)); }
.pass-card .pc-art svg { width: 100%; height: 100%; overflow: visible; }
.pass-card .meta-name { display: block; }
.pass-card .more { font-style: normal; font-size: 1.15em; line-height: 1; margin-left: 0.3em; color: var(--gold); }
.pc-line { display: flex; align-items: baseline; gap: 0.5em; margin-top: 0.15em; font-size: 0.82em; white-space: nowrap; }
.pc-lv { color: var(--gold); font-weight: 900; }
.pc-xp { color: var(--muted); font-weight: 700; font-variant-numeric: tabular-nums; }
.pc-bar { display: block; margin-top: 0.3em; width: 100%; }
.pc-ready { flex: none; padding: 0.35em 0.6em; border-radius: 0.7em; font-size: 0.8em; font-weight: 900; color: #002a1e; background: linear-gradient(180deg, #7dfad2, #06b58a); box-shadow: 0 0.15em 0 #04775b; }
.pass-card.ready { border-color: rgba(6, 214, 160, 0.6); box-shadow: 0 0 0.8em rgba(6, 214, 160, 0.3); }
.pass-card.locked .pc-art { filter: grayscale(0.85) brightness(0.7); }
.pass-card.loading { opacity: 0.7; }
.lb-btn.ranked b { font-size: 0.92em; letter-spacing: -0.01em; }
/* Membership benefits: the emblem, whether it is in force, each benefit with its picture; Back only. */
.mb-emblem { display: block; width: 5em; height: 5em; line-height: 0; }
.mb-emblem svg { width: 100%; height: 100%; overflow: visible; }
.mb-sheet:not(.owned) .mb-emblem { filter: grayscale(1) brightness(0.6); }
.mb-state { font-size: 0.82em; font-weight: 800; color: var(--muted); }
.mb-sheet.owned .mb-state { color: #7dfad2; }
.mb-list { list-style: none; margin: 0.2em 0; padding: 0; width: 100%; display: flex; flex-direction: column; gap: 0.45em; text-align: left; }
.mb-list li { display: flex; align-items: center; gap: 0.6em; font-size: 0.85em; font-weight: 700; }
.mb-ico.art-inline { width: 2.2em; height: 2.2em; flex: none; vertical-align: middle; }
.mb-sheet:not(.owned) .mb-ico { filter: grayscale(0.6); }
.mb-note { font-size: 0.72em; }
/* An equipment skill on a piece's page (the Epic Weapon Core's Piercing I): grey until in force; tap for its detail. */
.gp-skill { color: var(--muted); cursor: pointer; text-decoration: underline dotted; text-underline-offset: 0.2em; }
.gp-skill.on { color: #7dfad2; }
/* Owner final directive §2: the Codex's Equipment tab (filters, picture grid; one not owned yet greyed but open) and its detail. */
.gc-filter { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.3em; margin: 0 0 0.45em; }
.gc-filter .gc-f { font-size: 0.78em; padding: 0.3em 0.7em; }
.gc-filter .gc-f.on { border-color: #8fd3ff; color: #8fd3ff; box-shadow: 0 0 0 1px #8fd3ff inset; }
.gc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(3.6em, 1fr)); gap: 0.45em; justify-items: center; }
.gc-item .art-cell { width: 3.5em; height: 3.5em; }
.gc-item.unheld .art-cell .art { filter: grayscale(0.85) brightness(0.7); }
.gc-sheet .sheet-box { max-width: 20em; max-height: calc(100% - 0.4em); overflow-y: auto; overscroll-behavior: contain; }
.gc-hero .art-cell { width: 5em; height: 5em; }
.gc-unheld .gc-hero .art { filter: grayscale(0.85) brightness(0.7); }
.gc-state { font-size: 0.78em; font-weight: 800; color: var(--muted); }
.gc-state.held { color: #7dfad2; }
.gc-src { list-style: none; margin: 0; padding: 0; width: 100%; display: flex; flex-direction: column; gap: 0.35em; font-size: 0.78em; font-weight: 700; text-align: left; }
.gc-src li { padding-left: 0.9em; position: relative; line-height: 1.35; }
.gc-src li::before { content: '›'; position: absolute; left: 0; color: #8fd3ff; }
/* V1.1.2 Codex: the Pieces / Sets views, the set cards, a set's detail, the Coming Soon badge. */
.gc-views { margin-bottom: 0.6em; }
.gc-views .gc-v { font-size: 0.82em; padding: 0.35em 1.1em; }
.gc-views .gc-v.on { border-color: #8fd3ff; color: #8fd3ff; box-shadow: 0 0 0 1px #8fd3ff inset; }
.gc-sets { display: flex; flex-direction: column; gap: 0.55em; }
.gc-sets .gc-set { color: #e8eefc; padding: 0.5em 0.6em 0.55em; border-radius: 0.8em; background: rgba(255, 255, 255, 0.05); box-shadow: inset 0 0 0 1px rgba(214, 222, 239, 0.18); }
.gc-sets .gc-set.rar-rare { box-shadow: inset 0 0 0 1px rgba(92, 178, 255, 0.45); }
.gc-sets .gc-set.rar-epic { box-shadow: inset 0 0 0 1px rgba(176, 124, 255, 0.55); }
.gc-sets .gc-set.rar-legendary { box-shadow: inset 0 0 0 1px rgba(255, 207, 92, 0.65); }
.gc-set-head { display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; width: 100%; padding: 0; margin: 0 0 0.35em; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.gc-set-head b { font-size: 0.92em; }
.gc-set.rar-rare .gc-set-head b { color: #5cb2ff; }
.gc-set.rar-epic .gc-set-head b { color: #d59bff; }
.gc-set.rar-legendary .gc-set-head b { color: #ffcf5c; }
.gc-set-head small { grid-column: 1; font-size: 0.72em; font-weight: 700; color: var(--muted); }
.gc-set-head i { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-style: normal; font-size: 1.2em; color: #8fd3ff; }
.gc-set-pieces { display: flex; justify-content: center; gap: 0.6em; }
.gc-set-pieces .gc-item .art-cell { width: 3.2em; height: 3.2em; }
.gc-set-fx { margin-top: 0.4em; font-size: 0.75em; font-weight: 700; color: var(--muted); text-align: center; }
.gc-set-fx.on { color: #7dfad2; }
.gc-soon { display: inline-block; padding: 0.05em 0.5em; border-radius: 1em; font-size: 0.85em; font-weight: 800; color: #1b1406; background: #ffcf5c; vertical-align: 0.05em; }
.gc-sub { font-size: 0.74em; font-weight: 700; color: var(--muted); }
.gc-set-sheet .gc-set-pieces { margin: 0.4em 0 0.2em; }
.gc-fx .sk-row.on dd { color: #7dfad2; }
/* Owner final mandate §M: the 查看详情 cue after a skill's one-line summary. */
.sk-more { color: #8fd3ff; font-weight: 800; white-space: nowrap; }
/* Owner final mandate §P: the targeting mode on the pause screen (three chips; each one's explanation is its detail). */
.pause-aim { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.4em; max-width: 20em; }
.pause-aim .pa-head { width: 100%; text-align: center; font-size: 0.8em; font-weight: 800; color: var(--muted); }
.pause-aim .pa-opt { display: inline-flex; align-items: center; gap: 0.3em; }
.pause-aim .pa-opt .ico { width: 1.1em; height: 1.1em; }
.pause-aim .pa-opt.sel { border-color: #8fd3ff; color: #8fd3ff; box-shadow: 0 0 0 1px #8fd3ff inset; }
/* Owner final mandate §B2: a short line, and its full text behind 查看详情 (a native disclosure). */
details.more { display: block; margin-top: 0.15em; font-size: 0.92em; }
details.more.inline { display: inline-block; margin: 0 0 0 0.4em; vertical-align: baseline; }
details.more > summary { display: inline; cursor: pointer; color: #8fd3ff; font-weight: 800; list-style: none; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::after { content: ' ›'; }
details.more[open] > summary::after { content: ' ⌄'; }
details.more .more-body { display: block; margin-top: 0.3em; color: var(--muted); font-weight: 700; line-height: 1.4; text-align: left; }
details.more.inline[open] { display: block; margin: 0.3em 0 0; }
.mb-tx { display: flex; flex-direction: column; min-width: 0; }
.wallet-gem { display: inline-flex; align-items: center; gap: 0.25em; margin-left: 0.8em; }
/* The daily login's membership multiplier (C9). */
.d11-mul { font-size: 0.78em; font-weight: 800; color: var(--gold); text-align: center; max-width: 22em; }
/* BLACK's benefits panel: black and gold (owner final round §4). */
.mb-blackcard .sheet-box { background: linear-gradient(165deg, #17171d, #060608 78%); border-color: rgba(212, 175, 85, 0.75); }
.mb-blackcard .title { color: #e8c76a; }
/* Owner final round §15/§16: the product catalog, a product's page and its code panel (src/ui.ts showProducts / showProduct). */
.pr-sheet .sheet-box { max-width: 20em; max-height: calc(100% - 0.4em); overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y; }
.pr-head { align-self: stretch; text-align: left; font-size: 0.78em; font-weight: 900; color: var(--muted); letter-spacing: 0.03em; margin-top: 0.2em; }
.pr-small { font-size: 0.72em; }
.pr-trials { list-style: none; margin: 0; padding: 0; width: 100%; display: flex; flex-direction: column; gap: 0.45em; }
.pr-trial { display: flex; align-items: center; gap: 0.6em; text-align: left; }
.pr-trial .art-cell { width: 2.9em; height: 2.9em; }
.pr-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.1em; font-size: 0.82em; }
.pr-state { font-size: 0.72em; color: var(--muted); font-weight: 700; }
.pr-use { flex: none; }
.pr-grid { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5em; }
.pr-card {
  display: flex; flex-direction: column; align-items: center; gap: 0.15em; min-width: 0; padding: 0.55em 0.4em 0.5em; border-radius: 0.8em; cursor: pointer;
  border: 1px solid rgba(154, 167, 207, 0.3); background: rgba(9, 13, 28, 0.55); color: var(--text); font: inherit;
}
.pr-card.pr-black { background: linear-gradient(165deg, #17171d, #060608); border-color: rgba(212, 175, 85, 0.75); }
.pr-card.pr-done { opacity: 0.62; }
.pr-art { display: block; width: 3.3em; height: 3.3em; line-height: 0; }
.pr-hero { display: block; width: 5em; height: 5em; line-height: 0; }
.pr-art svg, .pr-hero svg { width: 100%; height: 100%; overflow: visible; }
.pr-name { font-size: 0.85em; line-height: 1.2; overflow-wrap: anywhere; }
.pr-price { color: var(--gold); font-weight: 900; font-size: 0.9em; }
.pr-black .pr-price { color: #e8c76a; }
.pr-tag { font-size: 0.68em; color: var(--muted); font-weight: 700; }
.pr-meta { display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 0.2em 0.6em; }
.pr-desc { font-size: 0.78em; }
.pr-cells { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.4em; width: 100%; }
.pr-cells .art-cell { width: 3.5em; height: 3.5em; }
.pr-code { width: 100%; display: flex; flex-direction: column; align-items: stretch; gap: 0.45em; }
.pr-code[hidden], .pr-buy[hidden] { display: none; }
.pr-input {
  width: 100%; box-sizing: border-box; padding: 0.6em 0.7em; border-radius: 0.6em; border: 1px solid rgba(154, 167, 207, 0.45);
  background: rgba(3, 5, 13, 0.6); color: var(--text); font: inherit; font-size: 0.92em; letter-spacing: 0.03em; text-transform: uppercase;
}
.pr-err { min-height: 1.2em; font-size: 0.78em; font-weight: 800; color: var(--muted); }
.pr-err.bad { color: #ff8a7a; }
.pr-test { font-size: 0.7em; font-weight: 800; color: #ffb36b; }
.pr-page.pr-black .sheet-box { background: linear-gradient(165deg, #17171d, #060608 78%); border-color: rgba(212, 175, 85, 0.75); }
.pr-page.pr-black .title { color: #e8c76a; }
/* Daily missions: each with its bar and the Pass XP it gives. */
.dm-art { display: block; width: 3.6em; height: 3.6em; line-height: 0; }
.dm-art svg { width: 100%; height: 100%; overflow: visible; }
.dm-list { list-style: none; margin: 0; padding: 0; width: 100%; display: flex; flex-direction: column; gap: 0.5em; text-align: left; }
.dm-row { display: grid; grid-template-columns: 1fr auto; gap: 0.2em 0.6em; font-size: 0.82em; }
.dm-text { font-weight: 800; }
.dm-prog { grid-column: 1; display: flex; align-items: center; gap: 0.5em; color: var(--muted); font-weight: 800; font-variant-numeric: tabular-nums; }
.dm-xp { grid-column: 2; grid-row: 1 / span 2; align-self: center; display: flex; align-items: center; gap: 0.15em; color: var(--gold); font-weight: 900; }
.dm-row.dm-done .dm-prog b { color: #7dfad2; }
/* V1.1.2 Mailbox (contract §E4): tabs, one row per mail (kind tag, title, age, expiry countdown, attachment pictures), the detail. */
.mb-tabs { display: flex; gap: 0.3em; width: 100%; overflow-x: auto; scrollbar-width: none; }
.mb-tab { flex: 1 1 auto; padding: 0.4em 0.45em; border-radius: 0.7em; background: rgba(255, 255, 255, 0.06); color: var(--muted); font: inherit; font-size: 0.76em; font-weight: 800; white-space: nowrap; }
.mb-tab.on { background: rgba(255, 209, 102, 0.16); color: #ffe7a8; box-shadow: inset 0 0 0 1px rgba(255, 209, 102, 0.5); }
/* V1.1.2 (§L): the 「复活」 tag on a ranked run continued with the official revive. */
.lb-me .lb-me-note { display: block; margin-top: 0.25em; color: var(--muted); font-size: 0.8em; font-weight: 700; line-height: 1.35; }
/* V1.1.2 (§M3): today's member reward at the top of the benefits sheet. */
.md-box { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 0.4em; padding: 0.6em 0.7em; border-radius: 0.9em; background: rgba(255, 209, 102, 0.08); box-shadow: inset 0 0 0 1px rgba(255, 209, 102, 0.35); }
.md-head { font-weight: 900; color: #ffe7a8; }
.md-cells { display: flex; justify-content: center; gap: 0.5em; flex-wrap: wrap; }
.md-state { color: var(--muted); font-size: 0.8em; font-weight: 700; text-align: center; }
.md-box .md-claim { width: auto; min-width: 8em; }
.hr-member { position: relative; }
.hr-member .hr-bang { position: absolute; top: -0.2em; right: -0.2em; }
/* V1.1.2 Cloud Save: the account sheet's section. */
.acct-cloud .sheet-box { max-height: calc(100% - 1.5em); overflow-y: auto; }
.cs-box { width: 100%; display: flex; flex-direction: column; gap: 0.35em; padding: 0.7em 0.8em; border-radius: 0.9em; background: rgba(255, 255, 255, 0.05); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1); text-align: left; }
.cs-head { display: flex; align-items: center; justify-content: space-between; gap: 0.6em; }
.cs-pill { padding: 0.15em 0.6em; border-radius: 1em; font-size: 0.78em; font-weight: 900; white-space: nowrap; }
.cs-pill.cs-synced { background: rgba(6, 214, 160, 0.16); color: #7dfad2; }
.cs-pill.cs-syncing, .cs-pill.cs-pending { background: rgba(155, 231, 255, 0.14); color: #9be7ff; }
.cs-pill.cs-paused { background: rgba(255, 179, 107, 0.16); color: #ffb36b; }
.cs-pill.cs-failed { background: rgba(255, 92, 92, 0.16); color: #ff8a8a; }
.cs-line { color: var(--muted); font-size: 0.8em; font-weight: 700; line-height: 1.35; }
.cs-error { color: #ffb36b; font-size: 0.8em; font-weight: 800; line-height: 1.4; }
.cs-actions { display: flex; gap: 0.45em; flex-wrap: wrap; }
.cs-actions .btn { width: auto; flex: 1 1 8em; padding: 0.55em 0.6em; font-size: 0.9em; }
.cs-actions .btn:disabled { opacity: 0.45; filter: grayscale(0.7); box-shadow: none; }
.cs-details { font-size: 0.76em; color: var(--muted); }
.cs-details summary { cursor: pointer; font-weight: 800; padding: 0.2em 0; }
.cs-details dl { margin: 0.2em 0 0; display: grid; gap: 0.1em; }
.cs-details dl > div { display: flex; justify-content: space-between; gap: 0.8em; }
.cs-details dt, .cs-details dd { margin: 0; }
.cs-details dd { color: var(--text); font-variant-numeric: tabular-nums; text-align: right; overflow-wrap: anywhere; }
@media (orientation: landscape) and (max-height: 500px) { .acct-cloud .sheet-box { max-height: calc(100% - 0.6em); } .cs-box { padding: 0.5em 0.7em; } }
/* V1.1.2 Supply (§G5): the pool page. */
.sp-box { gap: 0.5em; }
.sp-wallet { display: flex; justify-content: center; gap: 0.8em; font-size: 0.85em; }
.sp-have { display: inline-flex; align-items: center; gap: 0.25em; }
.sp-have .mini-art, .sp-cost .mini-art, .sp-odds .mini-art { width: 1.3em; height: 1.3em; display: inline-block; }
.sp-draw { width: auto; display: flex; flex-direction: column; gap: 0.1em; padding: 0.55em 0.4em; }
.sp-draw:disabled { opacity: 0.45; filter: grayscale(0.7); box-shadow: none; }
.sp-draw .sp-cost { display: inline-flex; align-items: center; justify-content: center; gap: 0.2em; font-size: 0.78em; font-weight: 800; }
.sp-why, .sp-closed { color: #ffb36b; font-size: 0.76em; font-weight: 800; line-height: 1.35; text-align: center; }
.sp-odds { width: 100%; font-size: 0.78em; }
.sp-odds-head { color: var(--muted); font-weight: 800; margin-bottom: 0.25em; }
.sp-odds ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.15em; max-height: 9em; overflow-y: auto; }
.sp-odds li { display: flex; align-items: center; gap: 0.4em; }
.sp-odds li span { flex: 1; }
.sp-odds li small { color: var(--muted); }
.sp-odds li b { font-variant-numeric: tabular-nums; }
.sp-odds li.rar-epic span { color: #d59bff; }
.sp-odds li.rar-legendary span { color: #ffcf5c; }
.sp-odds li.rar-rare span { color: #7cc4ff; }
/* V1.1.2 Supply: the fixed grant, chest contents, crates and their opening (owner directive §B/§E). */
.sp-odds .sp-contents { display: block; padding-left: 1.7em; }
.sp-odds .sp-contents summary { cursor: pointer; color: var(--muted); font-size: 0.92em; }
.sp-odds .sp-contents ul { max-height: none; }
.cr-list { list-style: none; margin: 0; padding: 0; width: 100%; display: grid; gap: 0.45em; max-height: 60vh; overflow-y: auto; }
.cr-item { display: grid; grid-template-columns: auto 1fr auto; gap: 0.5em; align-items: start; padding: 0.5em; border-radius: 0.8em; background: rgba(255, 255, 255, 0.05); }
.cr-item.rar-epic { box-shadow: inset 0 0 0 1px rgba(176, 124, 255, 0.55); }
.cr-item.rar-legendary { box-shadow: inset 0 0 0 1px rgba(255, 207, 92, 0.65); }
.cr-item .cr-ico { width: 2.2em; height: 2.2em; }
.cr-tx { display: flex; flex-direction: column; gap: 0.15em; font-size: 0.85em; text-align: left; }
.cr-tx small { color: var(--muted); }
.cr-tx details ul { list-style: none; margin: 0.2em 0 0; padding: 0; display: grid; gap: 0.1em; }
.cr-tx details li { display: flex; justify-content: space-between; gap: 0.6em; }
.cr-item .cr-open { width: auto; padding: 0.45em 0.9em; }
.cr-anim { background: rgba(4, 6, 18, 0.88); }
.cr-stage { position: relative; display: flex; flex-direction: column; align-items: center; gap: 0.8em; }
.cr-box { width: 7em; height: 7em; display: block; animation: crShake 0.5s ease-in-out 3; }
.cr-epic .cr-box { filter: drop-shadow(0 0 14px #b07cff) drop-shadow(0 0 28px #7a3cff); }
.cr-legendary .cr-box { filter: drop-shadow(0 0 16px #ffd166) drop-shadow(0 0 36px #ff9f1c); animation: crShake 0.45s ease-in-out 5; }
.cr-rays { position: absolute; top: 3.5em; left: 50%; width: 16em; height: 16em; margin: -8em 0 0 -8em; border-radius: 50%; opacity: 0; pointer-events: none; }
.cr-legendary .cr-rays { opacity: 0.9; background: repeating-conic-gradient(from 0deg, rgba(255, 209, 102, 0.35) 0 8deg, transparent 8deg 24deg); animation: crSpin 6s linear 1; }
.cr-epic .cr-rays { opacity: 0.7; background: radial-gradient(circle, rgba(176, 124, 255, 0.45), transparent 65%); }
.cr-title { font-weight: 900; font-size: 1.2em; }
.cr-epic .cr-title { color: #d59bff; }
.cr-legendary .cr-title { color: #ffcf5c; }
.cr-skip { margin-top: 1.2em; }
@keyframes crShake { 0%, 100% { transform: rotate(0) scale(1); } 25% { transform: rotate(-6deg) scale(1.04); } 75% { transform: rotate(6deg) scale(1.04); } }
@keyframes crSpin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .cr-box, .cr-rays { animation: none; } }
/* V1.1.2 owner directive (2026-10-31) §5–§7: set-skill links, the Legendary skills' gold names, the skill sheet. */
.gc-links { margin-top: 0.1em; }
.gc-skill-link { border: 0; background: none; padding: 0; margin: 0; font: inherit; font-weight: 800; color: #8fd3ff; cursor: pointer; text-align: left; }
.gc-skill-link i { font-style: normal; color: var(--muted); }
.sk-gold, .gc-skill-link.sk-gold {
  background: linear-gradient(180deg, #fff6d6 0%, #ffd77a 45%, #e09b12 100%); -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent; filter: drop-shadow(0 0 6px rgba(255, 181, 71, 0.45)); font-weight: 900;
}
.sk-gold .gc-soon { -webkit-text-fill-color: #1b1406; color: #1b1406; }
.title.sk-gold { text-shadow: none; }
.sheet-skill .ss-name { font-size: 1.3em; }
/* LEGENDARY-SHIMMER:BEGIN (owner directive §7: a continuous gold shimmer on every Legendary piece; the one motion that loops, by the
   owner's request: a soft light sweep on the piece's frame (::after; ::before stays the buttons' hit area) and a slow sparkle on its
   picture, painted on pseudo-elements, never rebuilt; off with reduced motion, where the static gold edge stays) */
.art-cell.r-legendary, .gear-row.r-legendary .ico, .gear-slot.r-legendary .gs-item, .gp-head.r-legendary .ico { box-shadow: inset 0 0 0.9em rgba(255, 181, 71, 0.45), 0 0 0.6em rgba(255, 181, 71, 0.38); }
.art-cell.r-legendary::after, .gear-row.r-legendary .ico::after, .gp-head.r-legendary .ico::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(115deg, transparent 38%, rgba(255, 236, 180, 0.5) 50%, transparent 62%) no-repeat; background-size: 260% 100%;
  animation: lgSweep 3.8s ease-in-out infinite;
}
.art-cell.r-legendary > .art { position: relative; display: block; }
.art-cell.r-legendary > .art::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background: radial-gradient(circle at 78% 22%, rgba(255, 246, 214, 0.9) 0 1.5px, transparent 2.5px), radial-gradient(circle at 24% 74%, rgba(255, 224, 163, 0.8) 0 1px, transparent 2px);
  animation: lgTwinkle 2.9s ease-in-out infinite;
}
.gear-row.r-legendary .ico, .gp-head.r-legendary .ico { position: relative; }
@keyframes lgSweep { 0%, 55% { background-position: 130% 0; } 100% { background-position: -30% 0; } }
@keyframes lgTwinkle { 0%, 70%, 100% { opacity: 0; } 82% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .art-cell.r-legendary::after, .art-cell.r-legendary > .art::after, .gear-row.r-legendary .ico::after, .gp-head.r-legendary .ico::after { animation: none; opacity: 0; }
}
/* The Bag's +10 badge (2026-11-05, src/bagView.ts): the same kind of loop, a gold-to-rainbow sweep on the badge; off with reduced motion. */
.bt-plus.pt-max {
  color: #3a2400; border-color: #fff6d0; background: linear-gradient(110deg, #ffd166, #fff3c4 22%, #ffb547 40%, #ff8ad8 58%, #8fe9ff 74%, #ffd166 90%);
  background-size: 260% 100%; box-shadow: 0 0 0.45em rgba(255, 209, 102, 0.85), 0 0 0.9em rgba(255, 138, 216, 0.4); animation: bag-shimmer 2.6s linear infinite;
}
@keyframes bag-shimmer { from { background-position: 100% 0; } to { background-position: -160% 0; } }
@media (prefers-reduced-motion: reduce) { .bt-plus.pt-max { animation: none; background-position: 30% 0; } }
.reduce-motion .bt-plus.pt-max { animation: none; background-position: 30% 0; }
/* LEGENDARY-SHIMMER:END */
/* V1.1.2 Supply redesign (owner directive 2026-10-31): the image-first page, its layers and the draw animation. */
/* supply-home-layout hotfix: tabs were flex-shrunk to 0 when the ice event block made the sheet taller
   than the viewport (worse in EN). Keep chrome (title/tabs/buttons/foot) fixed; only the mid body scrolls. */
.sp-home .sheet-box.sp2 { width: min(26em, 100%); max-width: 26em; max-height: calc(100% - 0.4em); padding: 0.7em 0.8em 0.8em; gap: 0.45em; overflow: hidden; overscroll-behavior: contain;
  background: radial-gradient(120% 70% at 50% 28%, #2a1660 0%, #10153a 55%, #070a1c 100%); box-shadow: inset 0 0 0 1px rgba(196, 155, 255, 0.35), 0 0 40px rgba(122, 60, 255, 0.25); }
.sp-home .sheet-box.sp2 > .sp-top,
.sp-home .sheet-box.sp2 > .sp-tabs,
.sp-home .sheet-box.sp2 > .sp-btns2,
.sp-home .sheet-box.sp2 > .sp-sub,
.sp-home .sheet-box.sp2 > .sp-why,
.sp-home .sheet-box.sp2 > .sp-foot { flex-shrink: 0; width: 100%; }
.sp-home .sp-body { flex: 1 1 auto; min-height: 0; width: 100%; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; align-items: center; gap: 0.45em; }
.sp-home .sheet-box.sp2.rar-legendary { background: radial-gradient(120% 70% at 50% 28%, #3a2a08 0%, #141018 55%, #07070c 100%); box-shadow: inset 0 0 0 1px rgba(255, 207, 92, 0.45), 0 0 40px rgba(255, 159, 28, 0.2); }
.sp-top { width: 100%; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 0.5em; }
.sp-title { font-size: 1.15em; font-weight: 900; letter-spacing: 0.08em; }
.sp-top .sp-wallet { justify-content: flex-end; gap: 0.6em; font-size: 0.82em; }
.sp-x { width: 2em; height: 2em; padding: 0; border-radius: 50%; border: 0; background: rgba(255, 255, 255, 0.1); color: var(--text); font-size: 1.25em; line-height: 1; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22); }
.sp-x:hover, .sp-x:focus-visible { background: rgba(255, 255, 255, 0.2); }
/* 累计好礼 (owner brief 2026-11-10, website 0045): the header entry right of 补给 (dark, gold edge, gold words, a red dot while a node is
   ready), its page (the spend, the cycle switch, one cycle's cards; the Legendary box's node in gold) and the choice box's picker. */
.sp-top { grid-template-columns: auto auto minmax(0, 1fr) auto; }
.sp-gift-slot { display: inline-flex; min-width: 0; }
.sp-gift-slot:empty { display: none; }
.sp-gift { position: relative; flex: none; padding: 0.28em 0.6em; border-radius: 0.55em; border: 1px solid #e7b44a; background: linear-gradient(180deg, #2a1d08, #120c04);
  color: #ffd27a; font: inherit; font-size: 0.74em; font-weight: 800; letter-spacing: 0.04em; line-height: 1.2; white-space: nowrap; cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(255, 210, 122, 0.12), 0 0 0.5em rgba(231, 180, 74, 0.25); }
.sp-gift:hover, .sp-gift:focus-visible { background: linear-gradient(180deg, #3a280a, #1a1206); }
.sp-gift:disabled { opacity: 0.7; cursor: default; }
.sp-gift-dot { position: absolute; top: -0.36em; right: -0.36em; width: 0.72em; height: 0.72em; border-radius: 50%; background: #ff3b5c; border: 2px solid #0b1020; pointer-events: none; }
.sp-top .sp-wallet { min-width: 0; flex-wrap: wrap; row-gap: 0.15em; } /* a very long balance on a narrow phone: the second one moves under it, never cut */
.sp-top .sp-have { white-space: nowrap; }
@media (max-width: 360px) { .sp-gift { padding: 0.24em 0.45em; font-size: 0.7em; } .sp-top { gap: 0.35em; } .sp-top .sp-wallet { gap: 0.4em; } }
.sg-sheet .sheet-box.sg-box { width: min(26em, 100%); max-width: 26em; max-height: calc(100% - 0.4em); padding: 0.7em 0.8em 0.8em; gap: 0.5em; overflow: hidden;
  background: radial-gradient(120% 70% at 50% 20%, #2e2108 0%, #141018 55%, #07070c 100%); box-shadow: inset 0 0 0 1px rgba(255, 207, 92, 0.45), 0 0 40px rgba(255, 159, 28, 0.18); }
.sg-box > * { flex-shrink: 0; width: 100%; }
.sg-top { display: grid; grid-template-columns: 1fr auto; align-items: center; }
.sg-top .sp-title { color: #ffd27a; text-align: left; }
.sg-spend { display: flex; align-items: center; justify-content: center; gap: 0.2em; font-size: 0.95em; }
.sg-spend b { font-size: 1.15em; color: #ffe7a8; }
.sg-box .mini-art { width: 1.2em; height: 1.2em; display: inline-block; vertical-align: middle; }
.sg-cycle { display: flex; align-items: center; justify-content: center; gap: 0.8em; }
.sg-cycle b { min-width: 5em; text-align: center; }
.sg-cy { position: relative; width: 2em; height: 2em; border-radius: 50%; border: 1px solid rgba(255, 210, 122, 0.5); background: rgba(255, 255, 255, 0.06); color: #ffd27a; font-size: 1.05em; line-height: 1; cursor: pointer; }
.sg-cy:disabled { opacity: 0.3; cursor: default; }
.sg-boxes { display: grid; gap: 0.35em; }
.sg-boxrow { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 0.5em; padding: 0.35em 0.5em; border-radius: 0.7em; background: rgba(255, 255, 255, 0.06); text-align: left; font-size: 0.9em; }
.sg-boxrow.rar-epic { box-shadow: inset 0 0 0 1px rgba(176, 124, 255, 0.6); }
.sg-boxrow.rar-legendary { box-shadow: inset 0 0 0 1px rgba(255, 207, 92, 0.7); }
.sg-boxpv { display: inline-flex; align-items: center; gap: 0.5em; min-width: 0; padding: 0.1em 0.2em; border: 0; border-radius: 0.5em; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.sg-boxpv:hover, .sg-boxpv:focus-visible { background: rgba(255, 255, 255, 0.08); }
.sg-boxrow { grid-template-columns: minmax(0, 1fr) auto; }
.sg-boxart { width: 2em; height: 2em; display: block; flex: none; }
.sg-boxart svg { width: 100%; height: 100%; display: block; }
.sg-boxrow .sg-open, .sg-card .sg-claim { width: auto; min-width: 4.6em; padding: 0.4em 0.8em; margin: 0; }
.sg-box > .sg-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; list-style: none; margin: 0; padding: 0.1em 0.15em; display: grid; gap: 0.45em; align-content: start; }
.sg-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: 'at st' 'rw st'; align-items: center; gap: 0.3em 0.5em; padding: 0.5em 0.6em;
  border-radius: 0.8em; background: rgba(255, 255, 255, 0.05); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1); text-align: left; }
.sg-at { grid-area: at; font-size: 0.85em; font-weight: 800; color: #ffe7a8; }
.sg-rws { grid-area: rw; display: flex; flex-wrap: wrap; gap: 0.35em 0.3em; }
.sg-rw { display: inline-flex; flex-direction: column; align-items: center; gap: 0.2em; width: 4.9em; min-width: 0; }
.sg-rw .art-cell { width: 2.6em; height: 2.6em; flex: none; }
.sg-rw small { font-size: 0.7em; color: var(--muted); max-width: 100%; line-height: 1.2; text-align: center; }
/* T-GIFTS-BOX-PREVIEW-9: a choice box's picture and name are one button that shows its contents (read-only) */
button.sg-rw.sg-pv { padding: 0.15em 0.1em; border: 0; border-radius: 0.6em; background: none; color: inherit; font: inherit; cursor: pointer; min-height: 3.6em; }
button.sg-rw.sg-pv:hover, button.sg-rw.sg-pv:focus-visible { background: rgba(255, 255, 255, 0.08); }
button.sg-rw.sg-pv small { color: #e8dcff; text-decoration: underline dotted rgba(255, 255, 255, 0.4); text-underline-offset: 0.18em; }
.sg-card.hi button.sg-rw.sg-pv small { color: #ffe7a8; }
.sg-card > .sg-claim, .sg-card > .sg-st { grid-area: st; }
.sg-st { font-size: 0.8em; color: var(--muted); min-width: 4.6em; text-align: center; }
.sg-card.st-ready { box-shadow: inset 0 0 0 1px rgba(255, 210, 122, 0.55); }
.sg-card.st-claimed { opacity: 0.62; }
.sg-card.st-claimed .sg-st::before { content: '✓ '; color: #7ee0a1; }
.sg-card.hi { background: linear-gradient(135deg, rgba(255, 181, 71, 0.2), rgba(255, 209, 102, 0.06) 60%, rgba(255, 255, 255, 0.03));
  box-shadow: inset 0 0 0 1.5px #ffcf5c, 0 0 0.9em rgba(255, 181, 71, 0.35); }
.sg-card.hi .sg-at { color: #ffcf5c; }
/* The box's contents (preview and pick): title and ×, the one-line note, then the sets, each a header and a row of three cards; only the
   sets scroll. */
.sg-box-sheet .sheet-box.sg-pick { width: min(26em, 100%); max-width: 26em; max-height: calc(100% - 0.4em); padding: 0.7em 0.8em 0.8em; gap: 0.4em; overflow: hidden;
  background: radial-gradient(120% 70% at 50% 18%, #1d1440 0%, #10132e 55%, #07091a 100%); }
.sg-pick.rar-legendary { background: radial-gradient(120% 70% at 50% 18%, #2e2108 0%, #141018 55%, #07070c 100%) !important; box-shadow: inset 0 0 0 1px rgba(255, 207, 92, 0.45), 0 0 40px rgba(255, 159, 28, 0.18); }
.sg-pick.rar-epic { box-shadow: inset 0 0 0 1px rgba(196, 155, 255, 0.4), 0 0 40px rgba(122, 60, 255, 0.2); }
.sg-pick > * { flex-shrink: 0; width: 100%; }
.sg-pick-top { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 0.5em; }
.sg-pick-top .title { margin: 0; text-align: left; font-size: 1.1em; }
.sg-pick-note { margin: 0; text-align: left; }
.sg-pick > .sg-pick-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; display: grid; gap: 0.55em; align-content: start; padding: 0.1em 0.05em 0.2em; }
.sg-group { display: grid; gap: 0.3em; }
.sg-group-head { font-size: 0.82em; font-weight: 800; letter-spacing: 0.06em; text-align: left; padding-left: 0.35em; border-left: 3px solid currentColor; }
.sg-pick.rar-legendary .sg-group-head { color: #ffcf5c; }
.sg-pick.rar-epic .sg-group-head { color: #d59bff; }
.sg-pick-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.4em; width: 100%; }
.sg-cand { display: flex; flex-direction: column; align-items: center; gap: 0.15em; min-width: 0; }
.sg-choose { flex: 1 1 auto; display: flex; flex-direction: column; align-items: center; gap: 0.2em; width: 100%; padding: 0.35em 0.2em; border: 0; border-radius: 0.7em; background: rgba(255, 255, 255, 0.05);
  color: inherit; font: inherit; cursor: pointer; }
.sg-choose:hover, .sg-choose:focus-visible { background: rgba(255, 255, 255, 0.12); }
.sg-choose .art-cell { width: 3.2em; height: 3.2em; }
.sg-choose { min-height: 7.2em; }
.sg-choose b { font-size: 0.76em; line-height: 1.2; overflow-wrap: anywhere; word-break: break-word; }
.sg-choose small { font-size: 0.68em; color: var(--muted); line-height: 1.2; }
.sg-cand .sg-info { font-size: 0.72em; }
.sg-pick.rar-legendary .title { color: #ffcf5c; }
.sg-pick.rar-epic .title { color: #d59bff; }
.sp-tabs { width: 100%; flex-shrink: 0; }
/* mb-tabs uses overflow-x:auto which zeroes the flex min-size; keep the pool switch visible. */
.sp-home .sp-tabs.mb-tabs { overflow-x: auto; min-height: 2.2em; }
.sp-show { position: relative; width: 100%; min-height: 14.5em; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 1em; overflow: hidden;
  background: radial-gradient(60% 55% at 50% 45%, rgba(176, 124, 255, 0.35), rgba(176, 124, 255, 0) 70%); }
.sp2.rar-legendary .sp-show { background: radial-gradient(60% 55% at 50% 45%, rgba(255, 181, 71, 0.35), rgba(255, 181, 71, 0) 70%); }
.sp-rays { position: absolute; left: 50%; top: 42%; width: 22em; height: 22em; margin: -11em 0 0 -11em; border-radius: 50%; pointer-events: none; opacity: 0.55;
  background: repeating-conic-gradient(from 0deg, rgba(196, 155, 255, 0.22) 0 6deg, transparent 6deg 22deg); animation: spSpin 40s linear 30; }
.sp2.rar-legendary .sp-rays { background: repeating-conic-gradient(from 0deg, rgba(255, 209, 102, 0.25) 0 6deg, transparent 6deg 22deg); }
.sp-floor { position: absolute; left: 50%; bottom: 3em; width: 13em; height: 2.2em; margin-left: -6.5em; border-radius: 50%; background: radial-gradient(closest-side, rgba(196, 155, 255, 0.55), transparent); pointer-events: none; }
.sp2.rar-legendary .sp-floor { background: radial-gradient(closest-side, rgba(255, 209, 102, 0.6), transparent); }
.sp-crate { position: relative; z-index: 1; border: 0; background: none; padding: 0; color: inherit; font: inherit; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 0.15em; }
.sp-crate-art { width: 8.5em; height: 8.5em; display: block; animation: spFloat 3.2s ease-in-out 40; filter: drop-shadow(0 0 16px rgba(176, 124, 255, 0.8)); }
.sp2.rar-legendary .sp-crate-art { filter: drop-shadow(0 0 18px rgba(255, 181, 71, 0.85)); }
.sp-crate-art svg { width: 100%; height: 100%; display: block; }
.sp-crate-name { font-size: 0.95em; font-weight: 900; color: #d59bff; text-shadow: 0 0 10px rgba(176, 124, 255, 0.8); }
.sp2.rar-legendary .sp-crate-name { color: #ffcf5c; text-shadow: 0 0 10px rgba(255, 181, 71, 0.8); }
.sp-feat { position: relative; z-index: 1; display: flex; justify-content: center; gap: 0.5em; margin-top: 0.45em; }
.sp-feat .art-cell { width: 3.1em; height: 3.1em; }
.sp-show .sp-closed { position: relative; z-index: 1; margin-top: 0.5em; }
/* 极光冰湖 (owner pt104u): the limited box as the 4th showcase tile, framed like the others under its own ice-blue / gold shimmer and
   frost sparkles; a still glow where reduced motion is asked. */
.sp-feat-ice { position: relative; display: inline-flex; flex: none; }
.sp-feat .sp-feat-ice .art-cell { border-color: #8fe3ff; overflow: hidden; isolation: isolate;
  background: radial-gradient(circle at 50% 38%, rgba(143, 227, 255, 0.34), rgba(255, 181, 71, 0.12) 52%, rgba(9, 18, 40, 0.94) 78%), #0b1730;
  box-shadow: inset 0 0 0.8em rgba(143, 227, 255, 0.5), 0 0 0 1px rgba(255, 216, 138, 0.75), 0 0 0.7em rgba(95, 210, 255, 0.75), 0 0 1.3em rgba(255, 181, 71, 0.4);
  animation: spIceGlow 2.4s ease-in-out 120 alternate; }
.sp-feat-ice .art-cell::after { content: ''; position: absolute; inset: -40%; z-index: 2; pointer-events: none;
  background: linear-gradient(115deg, transparent 38%, rgba(255, 255, 255, 0.55) 47%, rgba(191, 244, 255, 0.35) 52%, rgba(255, 216, 138, 0.3) 56%, transparent 64%);
  transform: translateX(-60%); animation: spIceSweep 3.2s ease-in-out 90; }
.sp-feat-ice .art-cell .art { position: relative; z-index: 1; filter: drop-shadow(0 0 3px rgba(95, 210, 255, 0.9)); }
.sp-feat-ice .fd-aurora { animation: spAuroraArc 3.4s ease-in-out 60 alternate; }
.sp-feat-ice .fd-aurora2 { animation-delay: -1.7s; }
.sp-feat-ice .fd-twinkle { animation: spTwinkle 1.8s ease-in-out 80 alternate; }
.sp-feat-ice .fd-twinkle2 { animation-delay: -0.9s; }
.sp-frost { position: absolute; inset: -0.45em; z-index: 3; pointer-events: none;
  background-image: radial-gradient(2.4px 2.4px at 10% 14%, #fff 50%, transparent 55%), radial-gradient(1.6px 1.6px at 88% 8%, #dff8ff 50%, transparent 55%), radial-gradient(2px 2px at 94% 70%, #ffe7a8 50%, transparent 55%), radial-gradient(1.6px 1.6px at 6% 82%, #bff4ff 50%, transparent 55%), radial-gradient(1.4px 1.4px at 52% 2%, #fff 50%, transparent 55%), radial-gradient(1.8px 1.8px at 60% 98%, #dff8ff 50%, transparent 55%);
  animation: spTwinkle 1.5s ease-in-out 120 alternate; }
.sp-frost::before, .sp-frost::after { content: ''; position: absolute; width: 0.62em; height: 0.62em; pointer-events: none;
  background: conic-gradient(from 45deg, transparent 0 20%, #fff 22% 28%, transparent 30% 45%, #fff 47% 53%, transparent 55% 70%, #fff 72% 78%, transparent 80% 95%, #fff 97%);
  -webkit-mask: radial-gradient(circle, #000 18%, transparent 62%); mask: radial-gradient(circle, #000 18%, transparent 62%);
  filter: drop-shadow(0 0 2px #8fe3ff); animation: spFrostStar 2.2s ease-in-out 100 alternate; }
.sp-frost::before { right: 0; top: 0; }
.sp-frost::after { left: 0.05em; bottom: 0.1em; width: 0.48em; height: 0.48em; animation-delay: -1.1s; }
@keyframes spIceGlow { 0% { box-shadow: inset 0 0 0.7em rgba(143, 227, 255, 0.4), 0 0 0 1px rgba(255, 216, 138, 0.6), 0 0 0.5em rgba(95, 210, 255, 0.55), 0 0 1em rgba(255, 181, 71, 0.3); border-color: #8fe3ff; }
  100% { box-shadow: inset 0 0 1em rgba(191, 244, 255, 0.65), 0 0 0 1px rgba(255, 216, 138, 1), 0 0 0.95em rgba(95, 210, 255, 1), 0 0 1.7em rgba(255, 181, 71, 0.6); border-color: #ffd88a; } }
@keyframes spIceSweep { 0%, 55% { transform: translateX(-60%); } 100% { transform: translateX(60%); } }
@keyframes spFrostStar { 0% { opacity: 0.3; transform: scale(0.7) rotate(0deg); } 100% { opacity: 1; transform: scale(1.1) rotate(45deg); } }
@keyframes spAuroraArc { 0% { opacity: 0.35; } 100% { opacity: 0.95; } }
@keyframes spTwinkle { 0% { opacity: 0.25; } 100% { opacity: 1; } }
.sp-pity2 { width: 100%; display: flex; flex-direction: column; gap: 0.25em; font-size: 0.82em; font-weight: 800; color: var(--muted); text-align: center; }
.sp-pity-crate { color: #d59bff; }
.sp2.rar-legendary .sp-pity-crate { color: #ffcf5c; }
.sp-pity2 .sp-bar { height: 0.35em; border-radius: 1em; background: rgba(255, 255, 255, 0.08); overflow: hidden; display: block; }
.sp-pity2 .sp-bar > i { display: block; height: 100%; background: linear-gradient(90deg, #7a3cff, #d59bff); }
.sp2.rar-legendary .sp-pity2 .sp-bar > i { background: linear-gradient(90deg, #c47a00, #ffd166); }
.sp-btns2 { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 0.5em; }
.sp-btns2 .sp-draw { min-height: 3.2em; justify-content: center; }
.sp-sub { color: #c9b8ff; font-size: 0.72em; font-weight: 700; text-align: center; opacity: 0.85; }
.sp2.rar-legendary .sp-sub, .sp-top-legendary .sp-sub { color: #ffe7a8; }
.sp-event { width: 100%; box-sizing: border-box; display: flex; flex-direction: column; gap: 0.15em; padding: 0.4em 0.6em; border: 1px solid rgba(124, 220, 255, 0.45); border-radius: 0.6em; background: linear-gradient(180deg, rgba(40, 110, 170, 0.28), rgba(20, 40, 80, 0.2)); color: #d8f3ff; font-size: 0.72em; font-weight: 700; text-align: center; }
.sp-event-head { color: #8fe3ff; font-size: 1.08em; }
.sp-event-ends { color: #9fb8cc; font-weight: 600; }
.sp-pending { width: 100%; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 0.5em; font-size: 0.78em; font-weight: 800; color: #ffb36b; text-align: center; }
.sp-foot { width: 100%; display: flex; justify-content: space-around; gap: 0.4em; padding-top: 0.2em; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.sp-link { position: relative; border: 0; background: none; color: #bfe9ff; font: inherit; font-size: 0.82em; font-weight: 800; padding: 0.45em 0.3em; cursor: pointer; }
.sp-badge { margin-left: 0.3em; padding: 0 0.4em; border-radius: 0.7em; background: #ff3b5c; color: #fff; font-size: 0.85em; }
.sp-gal-scroll { width: 100%; max-height: 58vh; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 0.4em; }
.sp-gal-note { color: var(--muted); font-size: 0.76em; font-weight: 700; text-align: center; }
.sp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(3.3em, 1fr)); gap: 0.45em; justify-items: center; }
.sp-grid .art-cell { width: 3.1em; height: 3.1em; }
.sp-item-act { width: auto; padding: 0.5em 1.2em; }
.sp-odds2 ul { max-height: none; }
.sp-odds2 .sp-odds-head { display: grid; grid-template-columns: 1fr auto 3.4em; gap: 0.5em; padding-left: 1.7em; }
.sp-odds2 li { display: grid; grid-template-columns: auto 1fr auto 3.4em; align-items: center; gap: 0.5em; }
.sp-odds2 li b, .sp-odds2 .sp-odds-head b { text-align: right; }
.sp-odds2 .sp-contents { display: block; }
.sp-odds2 .sp-contents li { grid-template-columns: auto 1fr 3.4em; }
.sp-anim { background: radial-gradient(circle at 50% 42%, #1a1040 0%, #05060f 70%); flex-direction: column; }
.sp-anim.sp-top-legendary { background: radial-gradient(circle at 50% 42%, #2a1d05 0%, #05050a 70%); }
.sp-top-common { --sp-c: #9fb3d9; }
.sp-top-rare { --sp-c: #5cb2ff; }
.sp-top-epic { --sp-c: #b07cff; }
.sp-top-legendary { --sp-c: #ffb547; }
.sp-anim-stage { position: relative; width: min(26em, 100%); display: flex; flex-direction: column; align-items: center; gap: 0.9em; }
.sp-core { position: absolute; left: 50%; top: 40%; width: 4em; height: 4em; margin: -2em 0 0 -2em; border-radius: 50%; background: radial-gradient(circle, #fff 0%, var(--sp-c) 40%, transparent 70%); opacity: 0; pointer-events: none; }
.sp-ring { position: absolute; left: 50%; top: 40%; width: 12em; height: 12em; margin: -6em 0 0 -6em; border-radius: 50%; border: 3px solid var(--sp-c); opacity: 0; pointer-events: none; }
.sp-flash { position: fixed; inset: 0; background: var(--sp-c); opacity: 0; pointer-events: none; }
.ph-charge .sp-core { animation: spCharge 1.2s ease-in 1 forwards; }
.ph-charge .sp-ring { animation: spRing 1.2s ease-in 1 forwards; }
.ph-react .sp-flash { animation: spFlash 0.6s ease-out 1 forwards; }
.ph-cards .sp-core, .ph-cards .sp-ring { animation: none; opacity: 0; transition: opacity 0.3s; }
.sp-cards { display: grid; grid-template-columns: 1fr; gap: 0.5em; justify-items: center; align-content: center; min-height: 9em; }
.sp-cards.ten { grid-template-columns: repeat(5, 1fr); }
.sp-card { position: relative; width: 6.5em; height: 6.5em; opacity: 0; }
.sp-cards.ten .sp-card { width: 3.6em; height: 3.6em; }
.sp-card-back { position: absolute; inset: 0; border-radius: 0.6em; background: linear-gradient(135deg, #1d2550, #0b0f26); box-shadow: inset 0 0 0 1px rgba(143, 211, 255, 0.35); }
.sp-card-front { position: absolute; inset: 0; opacity: 0; }
.sp-card-front .art-cell { width: 100%; height: 100%; }
.ph-cards .sp-card { animation: spCardIn 0.35s ease-out calc(var(--i) * 60ms) 1 forwards; }
.ph-reveal .sp-card-front { animation: spReveal 0.4s ease-out calc(var(--i) * 70ms) 1 forwards; }
.ph-reveal .sp-card.r-epic .sp-card-back { box-shadow: 0 0 18px #b07cff; }
.ph-reveal .sp-card.r-legendary .sp-card-back { box-shadow: 0 0 22px #ffb547; }
.ph-done .sp-card, .ph-done .sp-card-front { opacity: 1; animation: none; }
.ph-done .sp-card-back, .ph-done .sp-core, .ph-done .sp-ring, .ph-done .sp-flash { display: none; }
.ph-done .sp-card.r-epic .art-cell { box-shadow: 0 0 14px rgba(176, 124, 255, 0.85); }
.ph-done .sp-card.r-legendary .art-cell { box-shadow: 0 0 16px rgba(255, 181, 71, 0.9); }
.sp-res-foot { display: flex; flex-direction: column; align-items: center; gap: 0.4em; opacity: 0; pointer-events: none; }
.ph-done .sp-res-foot { opacity: 1; pointer-events: auto; transition: opacity 0.25s; }
.sp-res-hard { color: #ffcf5c; font-weight: 900; }
.sp-res-name { font-weight: 900; opacity: 0; }
.ph-done .sp-res-name { opacity: 1; transition: opacity 0.25s; }
.sp-res-ok { width: auto; min-width: 8em; }
.sp-skip { position: absolute; top: 0.8em; right: 0.8em; }
.calm .sp-core, .calm .sp-ring, .calm .sp-flash { display: none; }
@keyframes spCharge { 0% { opacity: 0; transform: scale(0.3); } 70% { opacity: 1; transform: scale(1.4); } 100% { opacity: 0.9; transform: scale(1); } }
@keyframes spRing { 0% { opacity: 0; transform: scale(1.6) rotate(0); } 60% { opacity: 0.8; } 100% { opacity: 0.6; transform: scale(0.4) rotate(180deg); } }
@keyframes spFlash { 0% { opacity: 0; } 25% { opacity: 0.55; } 100% { opacity: 0; } }
@keyframes spCardIn { from { opacity: 0; transform: translateY(12px) scale(0.85); } to { opacity: 1; transform: none; } }
@keyframes spReveal { from { opacity: 0; transform: rotateY(90deg) scale(0.9); } to { opacity: 1; transform: none; } }
@keyframes spFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes spSpin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .sp-rays, .sp-crate-art, .sp-feat .sp-feat-ice .art-cell, .sp-feat-ice .fd-aurora, .sp-feat-ice .fd-twinkle, .sp-frost, .sp-frost::before, .sp-frost::after { animation: none; }
  .sp-feat-ice .art-cell::after { display: none; } }

/* 永夜极光 owned pieces + ice-box detail cover (owner pt114u): same ice-gold glow everywhere. */
.art-ice { position: relative; display: inline-flex; flex: none; isolation: isolate; }
.art-ice > .art-cell, .art-ice.bag-tile, .gear-slot.art-ice, .gp-head.art-ice, .en-main.art-ice, .forge-piece-wrap.art-ice {
  border-color: #8fe3ff; overflow: hidden;
  background: radial-gradient(circle at 50% 38%, rgba(143, 227, 255, 0.34), rgba(255, 181, 71, 0.12) 52%, rgba(9, 18, 40, 0.94) 78%), #0b1730;
  box-shadow: inset 0 0 0.8em rgba(143, 227, 255, 0.5), 0 0 0 1px rgba(255, 216, 138, 0.75), 0 0 0.7em rgba(95, 210, 255, 0.75), 0 0 1.3em rgba(255, 181, 71, 0.4);
  animation: spIceGlow 2.4s ease-in-out 120 alternate;
}
.art-ice > .art-cell .art, .art-ice.bag-tile .bt-art, .gp-head.art-ice .ico, .en-main.art-ice .ico, .forge-piece-wrap.art-ice .ico {
  position: relative; z-index: 1; filter: drop-shadow(0 0 3px rgba(95, 210, 255, 0.9));
}
.art-ice > .art-cell::after, .art-ice.bag-tile::after, .gear-slot.art-ice::after, .gp-head.art-ice::after, .en-main.art-ice::after {
  content: ''; position: absolute; inset: -40%; z-index: 2; pointer-events: none;
  background: linear-gradient(115deg, transparent 38%, rgba(255, 255, 255, 0.55) 47%, rgba(191, 244, 255, 0.35) 52%, rgba(255, 216, 138, 0.3) 56%, transparent 64%);
  transform: translateX(-60%); animation: spIceSweep 3.2s ease-in-out 90;
}
.bag-tile.art-ice, .gear-slot.art-ice, .gp-head.art-ice, .en-main.art-ice { position: relative; isolation: isolate; }
.gear-row.art-ice .ico {
  border-radius: 0.55em; box-shadow: 0 0 0 1px rgba(255, 216, 138, 0.75), 0 0 0.7em rgba(95, 210, 255, 0.75);
  animation: spIceGlow 2.4s ease-in-out 120 alternate;
}
.sp-item-cover { position: relative; width: 100%; min-height: 11em; display: flex; align-items: center; justify-content: center;
  border-radius: 1em; overflow: hidden; margin: 0.2em 0 0.55em;
  background: radial-gradient(60% 55% at 50% 45%, rgba(143, 227, 255, 0.32), rgba(255, 181, 71, 0.12) 55%, rgba(255, 181, 71, 0) 75%); }
.sp-item-cover .sp-rays { background: repeating-conic-gradient(from 0deg, rgba(143, 227, 255, 0.22) 0 6deg, rgba(255, 209, 102, 0.18) 6deg 12deg, transparent 12deg 22deg); opacity: 0.65; }
.sp-item-cover .sp-floor { background: radial-gradient(closest-side, rgba(143, 227, 255, 0.55), rgba(255, 209, 102, 0.35), transparent); }
.sp-item-cover-art { position: relative; z-index: 1; width: 7.2em; height: 7.2em; display: flex; align-items: center; justify-content: center;
  border-radius: 1em; border: 2px solid #8fe3ff; isolation: isolate;
  background: radial-gradient(circle at 50% 38%, rgba(143, 227, 255, 0.34), rgba(255, 181, 71, 0.12) 52%, rgba(9, 18, 40, 0.94) 78%), #0b1730;
  box-shadow: inset 0 0 0.8em rgba(143, 227, 255, 0.5), 0 0 0 1px rgba(255, 216, 138, 0.75), 0 0 0.9em rgba(95, 210, 255, 0.85), 0 0 1.5em rgba(255, 181, 71, 0.45);
  animation: spIceGlow 2.4s ease-in-out 120 alternate, spFloat 3.2s ease-in-out 40; }
.sp-item-cover-art .art { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.sp-item-cover-art .art svg { width: 85%; height: 85%; display: block; filter: drop-shadow(0 0 4px rgba(95, 210, 255, 0.95)); }
.sp-item-ice .title { color: #dff8ff; text-shadow: 0 0 10px rgba(95, 210, 255, 0.55), 0 0 16px rgba(255, 181, 71, 0.35); }
@media (prefers-reduced-motion: reduce) {
  .art-ice > .art-cell, .art-ice.bag-tile, .gear-slot.art-ice, .gp-head.art-ice, .en-main.art-ice, .forge-piece-wrap.art-ice,
  .gear-row.art-ice .ico, .sp-item-cover-art { animation: none !important; }
  .art-ice > .art-cell::after, .art-ice.bag-tile::after, .gear-slot.art-ice::after, .gp-head.art-ice::after, .en-main.art-ice::after { display: none; }
  .sp-item-cover .sp-rays { animation: none !important; }
}

/* T420 (Owner t432u): the two new Overcore limited boxes, each under its own look (never 永夜's frost / aurora).
   雷磁天穹限定传说箱: electric blue / violet over deep graphite, crackling arcs and sparks. 菌核裂殖限定传说箱: fungal green / toxic violet
   over dark slate, drifting spores. Finite animation counts (as the ice box); still glows where reduced motion is asked. */
.sp-feat-leici, .sp-feat-junhe, .art-leici-box, .art-junhe-box { position: relative; display: inline-flex; flex: none; isolation: isolate; }
.sp-feat .sp-feat-leici .art-cell, .art-leici-box > .art-cell { border-color: #f5b82e; overflow: hidden; isolation: isolate;
  background: radial-gradient(circle at 50% 38%, rgba(245, 184, 46, 0.32), rgba(139, 92, 246, 0.16) 52%, rgba(21, 20, 23, 0.95) 78%), #151417;
  box-shadow: inset 0 0 0.8em rgba(245, 184, 46, 0.45), 0 0 0 1px rgba(167, 139, 250, 0.8), 0 0 0.7em rgba(245, 184, 46, 0.75), 0 0 1.3em rgba(139, 92, 246, 0.45);
  animation: spLeiciGlow 1.6s steps(6, jump-none) 160 alternate; }
.sp-feat .sp-feat-junhe .art-cell, .art-junhe-box > .art-cell { border-color: #7ecf68; overflow: hidden; isolation: isolate;
  background: radial-gradient(circle at 50% 38%, rgba(126, 207, 104, 0.3), rgba(168, 85, 247, 0.16) 52%, rgba(12, 16, 12, 0.95) 78%), #0d120c;
  box-shadow: inset 0 0 0.8em rgba(126, 207, 104, 0.45), 0 0 0 1px rgba(192, 132, 252, 0.75), 0 0 0.7em rgba(126, 207, 104, 0.7), 0 0 1.3em rgba(168, 85, 247, 0.4);
  animation: spJunheGlow 3s ease-in-out 90 alternate; }
.sp-feat-leici .art-cell .art, .art-leici-box > .art-cell .art { position: relative; z-index: 1; filter: drop-shadow(0 0 3px rgba(245, 184, 46, 0.95)); }
.sp-feat-junhe .art-cell .art, .art-junhe-box > .art-cell .art { position: relative; z-index: 1; filter: drop-shadow(0 0 3px rgba(126, 207, 104, 0.9)); }
.sp-feat-leici .fd-arc, .art-leici-box .fd-arc, .cover-leici .fd-arc { stroke-dasharray: 6 4; animation: spArcRun 0.9s linear 200, spArcFlick 1.3s steps(3, jump-none) 140 alternate; }
.sp-feat-leici .fd-arc2, .art-leici-box .fd-arc2, .cover-leici .fd-arc2 { animation-delay: -0.45s, -0.6s; }
.sp-feat-leici .fd-zap, .art-leici-box .fd-zap, .cover-leici .fd-zap { animation: spArcFlick 0.8s steps(2, jump-none) 220 alternate; }
.sp-feat-leici .fd-zap2, .art-leici-box .fd-zap2, .cover-leici .fd-zap2 { animation-delay: -0.4s; }
.sp-feat-junhe .fd-spore, .art-junhe-box .fd-spore, .cover-junhe .fd-spore { animation: spSporeRise 3.6s ease-in-out 60 alternate; }
.sp-feat-junhe .fd-spore2, .art-junhe-box .fd-spore2, .cover-junhe .fd-spore2 { animation-delay: -1.8s; }
/* the corner effect: two small spark stars (雷磁) or a scatter of spores (菌核), like 永夜's sp-frost */
.sp-zap, .sp-spores { position: absolute; inset: -0.45em; z-index: 3; pointer-events: none; }
.sp-zap { background-image: radial-gradient(2.2px 2.2px at 12% 12%, #fffaf0 50%, transparent 55%), radial-gradient(1.6px 1.6px at 90% 10%, #c4b5fd 50%, transparent 55%), radial-gradient(2px 2px at 92% 72%, #ffd76a 50%, transparent 55%), radial-gradient(1.4px 1.4px at 8% 84%, #a78bfa 50%, transparent 55%);
  animation: spArcFlick 0.9s steps(2, jump-none) 200 alternate; }
.sp-zap::before, .sp-zap::after { content: ''; position: absolute; width: 0.6em; height: 0.6em; pointer-events: none;
  background: linear-gradient(135deg, transparent 42%, #fffaf0 46% 54%, transparent 58%), linear-gradient(45deg, transparent 44%, #ffd76a 47% 53%, transparent 56%);
  filter: drop-shadow(0 0 2px #f5b82e); animation: spArcFlick 0.7s steps(2, jump-none) 240 alternate; }
.sp-zap::before { right: 0; top: 0; }
.sp-zap::after { left: 0.05em; bottom: 0.1em; width: 0.46em; height: 0.46em; animation-delay: -0.35s; }
.sp-spores { background-image: radial-gradient(2.4px 2.4px at 14% 18%, #bef264 50%, transparent 55%), radial-gradient(1.8px 1.8px at 86% 10%, #d8b4fe 50%, transparent 55%), radial-gradient(2.2px 2.2px at 92% 66%, #a3e635 50%, transparent 55%), radial-gradient(1.6px 1.6px at 6% 78%, #c084fc 50%, transparent 55%), radial-gradient(1.4px 1.4px at 50% 4%, #ecfccb 50%, transparent 55%);
  animation: spSporeRise 3.2s ease-in-out 70 alternate; }
/* T422 (Owner t434u): the 雷磁 cover's glow, rays and floor are violet-white (no blue, no gold); the frame stays the gold Legendary one */
.sp-item-cover.cover-leici { background: radial-gradient(60% 55% at 50% 45%, rgba(245, 243, 255, 0.3), rgba(139, 92, 246, 0.16) 55%, rgba(139, 92, 246, 0) 75%); }
.sp-item-cover.cover-leici .sp-rays { background: repeating-conic-gradient(from 0deg, rgba(245, 243, 255, 0.24) 0 5deg, rgba(167, 139, 250, 0.2) 5deg 10deg, transparent 10deg 22deg); }
.sp-item-cover.cover-leici .sp-floor { background: radial-gradient(closest-side, rgba(237, 233, 254, 0.5), rgba(139, 92, 246, 0.3), transparent); }
.sp-item-cover.cover-leici .sp-item-cover-art { border-color: #f5b82e;
  background: radial-gradient(circle at 50% 38%, rgba(245, 184, 46, 0.32), rgba(139, 92, 246, 0.16) 52%, rgba(21, 20, 23, 0.95) 78%), #151417;
  box-shadow: inset 0 0 0.8em rgba(245, 184, 46, 0.45), 0 0 0 1px rgba(167, 139, 250, 0.8), 0 0 0.9em rgba(245, 184, 46, 0.85), 0 0 1.5em rgba(139, 92, 246, 0.5);
  animation: spLeiciGlow 1.6s steps(6, jump-none) 160 alternate, spFloat 3.2s ease-in-out 40; }
.sp-item-cover.cover-leici .sp-item-cover-art .art svg { filter: drop-shadow(0 0 4px rgba(245, 184, 46, 0.95)); }
.sp-item-cover.cover-junhe { background: radial-gradient(60% 55% at 50% 45%, rgba(126, 207, 104, 0.28), rgba(168, 85, 247, 0.14) 55%, rgba(168, 85, 247, 0) 75%); }
.sp-item-cover.cover-junhe .sp-rays { background: repeating-conic-gradient(from 0deg, rgba(126, 207, 104, 0.2) 0 7deg, rgba(192, 132, 252, 0.16) 7deg 14deg, transparent 14deg 24deg); }
.sp-item-cover.cover-junhe .sp-floor { background: radial-gradient(closest-side, rgba(126, 207, 104, 0.5), rgba(168, 85, 247, 0.3), transparent); }
.sp-item-cover.cover-junhe .sp-item-cover-art { border-color: #7ecf68;
  background: radial-gradient(circle at 50% 38%, rgba(126, 207, 104, 0.3), rgba(168, 85, 247, 0.16) 52%, rgba(12, 16, 12, 0.95) 78%), #0d120c;
  box-shadow: inset 0 0 0.8em rgba(126, 207, 104, 0.45), 0 0 0 1px rgba(192, 132, 252, 0.75), 0 0 0.9em rgba(126, 207, 104, 0.8), 0 0 1.5em rgba(168, 85, 247, 0.45);
  animation: spJunheGlow 3s ease-in-out 90 alternate, spFloat 3.2s ease-in-out 40; }
.sp-item-cover.cover-junhe .sp-item-cover-art .art svg { filter: drop-shadow(0 0 4px rgba(126, 207, 104, 0.9)); }
.sp-item-leici .title { color: #fffaf0; text-shadow: 0 0 10px rgba(245, 184, 46, 0.6), 0 0 16px rgba(139, 92, 246, 0.4); }
.sp-item-junhe .title { color: #ecfccb; text-shadow: 0 0 10px rgba(126, 207, 104, 0.55), 0 0 16px rgba(168, 85, 247, 0.4); }
@keyframes spLeiciGlow { 0% { box-shadow: inset 0 0 0.6em rgba(245, 184, 46, 0.35), 0 0 0 1px rgba(167, 139, 250, 0.6), 0 0 0.45em rgba(245, 184, 46, 0.5), 0 0 0.9em rgba(139, 92, 246, 0.3); border-color: #f5b82e; }
  100% { box-shadow: inset 0 0 1em rgba(255, 250, 240, 0.6), 0 0 0 1px rgba(196, 181, 253, 1), 0 0 1em rgba(245, 184, 46, 1), 0 0 1.7em rgba(139, 92, 246, 0.65); border-color: #c4b5fd; } }
@keyframes spJunheGlow { 0% { box-shadow: inset 0 0 0.6em rgba(126, 207, 104, 0.35), 0 0 0 1px rgba(192, 132, 252, 0.55), 0 0 0.45em rgba(126, 207, 104, 0.5), 0 0 0.9em rgba(168, 85, 247, 0.28); border-color: #7ecf68; }
  100% { box-shadow: inset 0 0 1em rgba(190, 242, 100, 0.55), 0 0 0 1px rgba(216, 180, 254, 0.95), 0 0 0.95em rgba(126, 207, 104, 0.95), 0 0 1.6em rgba(168, 85, 247, 0.6); border-color: #c084fc; } }
@keyframes spArcRun { to { stroke-dashoffset: -20; } }
@keyframes spArcFlick { 0% { opacity: 0.25; } 100% { opacity: 1; } }
@keyframes spSporeRise { 0% { opacity: 0.35; transform: translateY(0.12em); } 100% { opacity: 1; transform: translateY(-0.18em); } }
@media (prefers-reduced-motion: reduce) {
  .sp-feat .sp-feat-leici .art-cell, .art-leici-box > .art-cell, .sp-feat .sp-feat-junhe .art-cell, .art-junhe-box > .art-cell,
  .sp-feat-leici .fd-arc, .art-leici-box .fd-arc, .cover-leici .fd-arc, .sp-feat-leici .fd-zap, .art-leici-box .fd-zap, .cover-leici .fd-zap,
  .sp-feat-junhe .fd-spore, .art-junhe-box .fd-spore, .cover-junhe .fd-spore, .sp-zap, .sp-zap::before, .sp-zap::after, .sp-spores,
  .sp-item-cover.cover-leici .sp-item-cover-art, .sp-item-cover.cover-junhe .sp-item-cover-art { animation: none !important; }
}

.mb-tab b { margin-left: 0.3em; padding: 0 0.35em; border-radius: 0.6em; background: #ff3b5c; color: #fff; font-size: 0.85em; }
.mb-note { width: 100%; font-size: 0.78em; font-weight: 800; color: #bfe9ff; text-align: left; }
.mb-note.bad { color: #ffb36b; }
.mb-list { list-style: none; margin: 0; padding: 0; width: 100%; display: flex; flex-direction: column; gap: 0.45em; max-height: 52vh; overflow-y: auto; }
.mb-row { width: 100%; display: flex; flex-direction: column; gap: 0.25em; padding: 0.55em 0.65em; border-radius: 0.7em; text-align: left; font: inherit; color: var(--text);
  background: rgba(255, 255, 255, 0.05); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08); }
.mb-row.unread { background: rgba(120, 200, 255, 0.09); box-shadow: inset 0 0 0 1px rgba(150, 210, 255, 0.3); }
.mb-row.st-claimable { box-shadow: inset 0 0 0 1px rgba(255, 209, 102, 0.55); }
.mb-row.st-claimed, .mb-row.st-expired { opacity: 0.68; }
.mb-top { display: flex; align-items: center; gap: 0.4em; min-width: 0; }
.mb-title { flex: 1; min-width: 0; font-size: 0.86em; font-weight: 900; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mb-tag { flex: none; padding: 0.05em 0.45em; border-radius: 0.5em; font-style: normal; font-size: 0.7em; font-weight: 900; color: #0b1020; background: #9fb4ff; }
.mb-tag.k-compensation, .mb-tag.k-campaign { background: #ffd166; }
.mb-tag.k-event { background: #7dfad2; }
.mb-tag.k-maintenance { background: #ffb36b; }
.mb-tag.k-support { background: #c9a7ff; }
.mb-dot { flex: none; width: 0.55em; height: 0.55em; border-radius: 50%; background: #ff3b5c; }
.mb-meta { display: flex; gap: 0.7em; font-size: 0.72em; font-weight: 800; color: var(--muted); }
.mb-soon { color: #ffb36b; }
.mb-state { margin-left: auto; }
.mb-row.st-claimable .mb-state { color: #ffe7a8; }
.mb-row.st-claimed .mb-state { color: #7dfad2; }
.mb-cells { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3em; }
.mb-cells .art-cell { width: 2.3em; height: 2.3em; font-size: 0.8em; }
.mb-plus { font-style: normal; font-size: 0.75em; font-weight: 900; color: var(--muted); }
.mb-empty { padding: 1.2em 0; }
.mb-more { font-size: 0.85em; }
.mb-detail .sheet-box { text-align: left; }
.mb-from { width: 100%; display: flex; align-items: center; gap: 0.55em; }
.mb-avatar { flex: none; width: 2.4em; height: 2.4em; line-height: 0; }
.mb-avatar svg { width: 100%; height: 100%; }
.mb-who { flex: 1; display: flex; flex-direction: column; min-width: 0; font-size: 0.85em; }
.mb-who small { color: var(--muted); font-weight: 700; font-size: 0.85em; }
.mb-dtitle { width: 100%; text-align: left; font-size: 1.15em; }
.mb-exp { width: 100%; font-size: 0.75em; font-weight: 800; color: #ffb36b; }
.mb-body { width: 100%; box-sizing: border-box; max-height: 34vh; overflow-y: auto; padding: 0.7em 0.8em; border-radius: 0.7em; background: rgba(3, 5, 13, 0.45);
  font-size: 0.86em; line-height: 1.55; color: var(--text); overflow-wrap: anywhere; }
.mb-att { width: 100%; display: flex; flex-wrap: wrap; justify-content: center; gap: 0.45em; margin: 0.2em 0; }
.mb-att .art-cell { width: 3.6em; height: 3.6em; }
.mb-stateword { align-self: center; font-weight: 900; color: var(--muted); }
.mb-stateword.st-claimed { color: #7dfad2; }
.mb-stateword.st-expired { color: #ff8a7a; }
/* V1.1.2 Daily Endless Alloy missions: the Alloy picture and amount on each row, Claim on a reached one, a check once claimed. */
.ea-sec { width: 100%; box-sizing: border-box; display: flex; flex-direction: column; gap: 0.4em; padding: 0.6em 0.7em; border-radius: 0.7em;
  background: linear-gradient(160deg, rgba(120, 200, 255, 0.1), rgba(40, 30, 80, 0.3)); box-shadow: inset 0 0 0 1px rgba(150, 210, 255, 0.25); text-align: left; }
.ea-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.2em 0.4em; font-size: 0.95em; }
.ea-head b { white-space: nowrap; }
.ea-icon { display: inline-block; width: 1.8em; height: 1.8em; line-height: 0; flex: none; }
.ea-icon svg { width: 100%; height: 100%; overflow: visible; }
.ea-reset { margin-left: auto; font-size: 0.72em; font-weight: 800; color: var(--muted); font-variant-numeric: tabular-nums; }
.ea-intro, .ea-lapse { font-size: 0.72em; color: var(--muted); line-height: 1.35; }
.ea-best { font-size: 0.78em; font-weight: 800; color: #bfe9ff; }
.ea-row { grid-template-columns: 1fr auto auto; align-items: center; }
.ea-row .dm-prog { grid-column: 1; }
.ea-reward { grid-column: 2; grid-row: 1 / span 2; display: flex; align-items: center; gap: 0.15em; color: #bfe9ff; font-weight: 900; }
.ea-reward .art-inline { width: 1.6em; height: 1.6em; }
.ea-act { grid-column: 3; grid-row: 1 / span 2; min-width: 4.2em; text-align: center; }
.ea-claim { width: auto; padding: 0.4em 0.85em; font-size: 0.9em; box-shadow: 0 0.18em 0 #b45f00; }
.ea-done { color: #7dfad2; font-size: 0.9em; }
.ea-row.st-locked { opacity: 0.75; }
.ea-row.st-claimable .dm-text { color: #ffe7a8; }
.ea-all { align-self: stretch; }

/* The Season Pass table as picture tiles (owner consolidated request §2): each cell its rewards' pictures. Claimable glows green,
   claimed dims under a check, not reached / not held is grey under a lock, the two Pass columns are premium (warm, a gold edge). */
.p11-row { grid-template-columns: 2em 1fr 1fr 1fr; }
.p11-cell { gap: 0.2em; padding: 0.25em 0.15em; min-height: 3.4em; }
.p11-cell .art-cell { width: 3.2em; height: 3.2em; font-size: 1.05em; }
.p11-cell.two .art-cell { width: 2.55em; height: 2.55em; }
.p11-cell.prem { background: linear-gradient(160deg, rgba(255, 181, 71, 0.12), rgba(60, 30, 80, 0.28)); box-shadow: inset 0 0 0 1px rgba(255, 181, 71, 0.22); }
.p11-cell.locked, .p11-cell.empty { opacity: 1; }
.p11-cell.locked .art-cell, .p11-cell.reached .art-cell { opacity: 0.85; }
.p11-cell.reached { opacity: 1; outline: 1px dashed rgba(255, 181, 71, 0.45); }
.p11-cell.claimed { opacity: 0.9; }
button.p11-cell.ready { border: 1px solid #06d6a0; background: rgba(6, 214, 160, 0.12); }
.p11-none { color: var(--muted); opacity: 0.5; }
.p11-mx { display: inline-flex; align-items: center; gap: 0.1em; }
.p11-mx .art-inline { width: 1.2em; height: 1.2em; }

/* Skills (owner consolidated request §7): every summary is one line (the full text is the detail panel's), and a tap on the picture
   or the line opens the panel: the large picture, name, kind and level, then each mechanic and the next level. */
.sk-line { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.sk-open { flex: none; display: flex; width: auto; height: auto; padding: 0; border-radius: 0.7em; --hit-y: 0.1em; }
.sk-open .ico { display: block; }
.sk-open:active .ico { transform: scale(0.94); }
.sc-wrap { position: relative; }
.sc-wrap .skill-card { width: 100%; }
.sk-info {
  position: absolute; top: 0.35em; right: 0.35em; width: 1.6em; height: 1.6em; border-radius: 50%; font-size: 0.8em; font-weight: 900;
  font-style: italic; font-family: Georgia, serif; color: #cfe2ff; background: rgba(76, 201, 240, 0.18); border: 1px solid rgba(76, 201, 240, 0.5);
}
.sk-sheet .sheet-box { max-width: 20em; gap: 0.4em; }
.sk-art { display: block; width: 5.4em; height: 5.4em; line-height: 0; filter: drop-shadow(0 0.3em 0.7em rgba(0, 0, 0, 0.5)); }
.sk-art svg { width: 100%; height: 100%; overflow: visible; }
.sk-meta { font-size: 0.78em; font-weight: 800; color: var(--muted); }
.sk-sum { font-size: 0.85em; font-weight: 800; color: var(--gold); }
.sk-rows { margin: 0.2em 0 0; width: 100%; display: flex; flex-direction: column; gap: 0.3em; text-align: left; max-height: 46vh; overflow-y: auto; }
.sk-row { display: grid; grid-template-columns: 5.6em 1fr; gap: 0.5em; font-size: 0.76em; line-height: 1.35; }
.sk-row dt { color: var(--muted); font-weight: 800; }
.sk-row dd { margin: 0; font-weight: 600; }
.sk-row.sk-next { padding-top: 0.3em; border-top: 1px solid rgba(255, 255, 255, 0.1); }
.sk-row.sk-next dd { color: #7dfad2; }

/* The V1.1 Challenge briefing, picture first (owner consolidated request §8): enemies and bosses as the battlefield draws them (tap a
   discovered one for its archive file; an undiscovered one is a silhouette), the recommended upgrades as tiles marked +N with your level
   under each, the rewards as pictures with amounts, and S / SS / SSS as emblems with what each asks. */
.stage-info.brief11 { display: flex; flex-direction: column; gap: 0.28em; }
/*
 * Owner final cleanup (Priority 1): the V1.1 challenge page has no big title and a compact card (smaller portraits and pictures, the
 * focus line in the header row), so more of the stage list shows at once. V1.0's page is unchanged (none of these classes is there).
 */
/* Owner final cleanup (Priority 2): a page tag whose words are gone (no test label for players) takes no room. */
.screen .v11-tag:empty, .screen .diff-tag:empty, .diff-sel .diff-left .diff-tag:empty, .run-diff .diff-tag:empty, .screen .shop-note:empty, .screen .gp-note:empty { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.stage-info.brief11 { gap: 0.18em; padding: 0.45em 0.65em 0.45em; }
.brief11 .si-head { display: flex; align-items: baseline; gap: 0.3em; min-width: 0; white-space: nowrap; }
.brief11 .si-head > span:first-child { flex: none; }
.brief11 .si-focus11 { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; font-style: normal; font-size: 0.72em; font-weight: 700; color: var(--muted); }
.brief11 .si-best { flex: none; margin-left: auto; }
.brief11 .bf-dt { font-size: 0.6em; }
.brief11 .bf-sect { gap: 0.1em; }
.brief11 .bf-foe canvas { width: 1.85em; height: 1.85em; }
.brief11 .bf-foe.boss canvas { width: 2.35em; height: 2.35em; }
.brief11 .bf-more { min-width: 1.9em; height: 2.05em; }
.brief11 .bf-up .art-cell, .brief11 .bf-rew .art-cell { width: 2.2em; height: 2.2em; }
.brief11 .bf-drops { gap: 0.22em; }
.brief11 .bf-drops .art-cell { width: 2.05em; height: 2.05em; }
.brief11 .bf-ranks { margin-top: 0; }
.brief11 .bf-grade { width: 1.75em; height: 1.75em; }
.bf-sect { display: flex; flex-direction: column; gap: 0.15em; min-width: 0; }
.bf-dt { font-size: 0.66em; font-weight: 800; color: var(--muted); letter-spacing: 0.04em; }
.bf-foes { display: flex; flex-wrap: wrap; gap: 0.25em; }
.bf-foe { position: relative; display: flex; flex-direction: column; align-items: center; padding: 0.1em; border-radius: 0.55em; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(154, 167, 207, 0.25); --hit-y: 0.05em; }
.bf-foe canvas { width: 2.3em; height: 2.3em; display: block; }
.bf-foe.boss { border-color: rgba(255, 107, 107, 0.5); background: rgba(255, 77, 109, 0.1); }
.bf-foe.boss canvas { width: 3em; height: 3em; }
.bf-grow { flex: 1; }
.bf-more { display: flex; align-items: center; justify-content: center; min-width: 2.3em; height: 2.5em; padding: 0 0.3em; border-radius: 0.55em; font-size: 0.8em; font-weight: 900; color: var(--muted); background: rgba(255, 255, 255, 0.05); border: 1px dashed rgba(154, 167, 207, 0.35); }
.bf-foe.unknown { opacity: 0.75; }
.bf-name { font-size: 0.7em; font-weight: 800; color: #ffb3b3; max-width: 9em; text-align: left; line-height: 1.2; }
.bf-foe:active { transform: scale(0.96); }
.bf-row { display: flex; gap: 0.6em; align-items: flex-end; justify-content: space-between; }
.bf-ups, .bf-rew { display: flex; gap: 0.3em; align-items: flex-start; }
.bf-up { display: flex; flex-direction: column; align-items: center; gap: 0.05em; }
.bf-up .art-cell, .bf-rew .art-cell { width: 2.6em; height: 2.6em; font-size: 0.9em; }
/* Owner final mandate §J4/§J5: the server's drops at the picked difficulty, picture + chance, wrapping. */
.bf-drops { display: flex; flex-wrap: wrap; gap: 0.3em; }
.bf-drops .art-cell { width: 2.35em; height: 2.35em; font-size: 0.86em; }
.bf-up .you { font-size: 0.66em; font-weight: 900; }
.bf-up .you.ok { color: #7dfad2; }
.bf-up .you.low { color: #ff8fa3; }
.bf-kill { font-size: 0.62em; color: var(--muted); font-weight: 700; }
.bf-ranks { display: flex; justify-content: space-between; gap: 0.3em; margin-top: 0.15em; }
.bf-rk { display: flex; align-items: center; gap: 0.25em; font-size: 0.7em; font-weight: 800; line-height: 1.2; white-space: nowrap; cursor: pointer; }
.bf-grade { flex: none; display: inline-block; width: 2.4em; height: 2.4em; line-height: 0; vertical-align: middle; }
.bf-grade svg { width: 100%; height: 100%; overflow: visible; }
.si-best .bf-grade { width: 1.5em; height: 1.5em; vertical-align: -0.45em; }

/* The Arsenal's tabs, upper left (owner consolidated request §9): the main turret's tracks, and the auxiliary turret's own. Locked: the
   auxiliary tab and everything on it grey (still openable and inspectable); its buttons say "not sold" and do nothing. */
.ars-tabs { flex: none; width: 100%; max-width: 20.5em; display: flex; justify-content: flex-start; gap: 0.35em; margin-bottom: -0.3em; }
.ars-tab {
  position: relative; display: flex; align-items: center; gap: 0.25em; padding: 0.35em 0.7em 0.35em 0.45em; border-radius: 0.7em 0.7em 0.2em 0.2em;
  font-size: 0.8em; font-weight: 900; color: var(--muted); background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(154, 167, 207, 0.25); --hit-y: 0.2em;
}
.ars-tab.on { color: var(--text); background: linear-gradient(180deg, rgba(60, 76, 140, 0.95), rgba(28, 36, 80, 0.95)); border-color: rgba(120, 160, 255, 0.45); }
.ars-tab .art-inline { width: 1.5em; height: 1.5em; }
.ars-tab.locked .art-inline { filter: grayscale(1) brightness(0.7); }
.ars-tab .art-st { top: -0.35em; right: -0.35em; font-size: 0.8em; }
/* t231: three tabs (主炮台 / 辅助炮台 / 装备强化) share the one row: each shrinks to its label, none wraps or spills on a 320-wide phone. */
.ars-tabs.three { gap: 0.25em; }
.ars-tabs.three .ars-tab { flex: 1 1 auto; min-width: 0; justify-content: center; gap: 0.2em; padding: 0.35em 0.4em 0.35em 0.3em; white-space: nowrap; }
.ars-tabs.three .art-inline { width: 1.3em; height: 1.3em; }
html:not([lang="zh-CN"]) .ars-tabs.three .ars-tab { white-space: normal; line-height: 1.05; text-align: left; font-size: 0.74em; }
/* t231: the Enhancement page as the 装备强化 tab: the 强化 page's title size, wallet and 完成. */
.v11-enhance.ars-enh .title { font-size: 2.1em; }
.short-frame .v11-enhance.ars-enh .title { font-size: 1.7em; }
.v11-enhance.ars-enh .done { flex: none; padding: 0.7em 1em; }
.aux-head { display: flex; align-items: center; gap: 0.7em; padding: 0.35em 0 0.5em; cursor: pointer; }
.aux-art { flex: none; width: 4.2em; height: 4.2em; line-height: 0; filter: drop-shadow(0 0.25em 0.5em rgba(0, 0, 0, 0.5)); }
.aux-art svg { width: 100%; height: 100%; overflow: visible; }
.aux-name { display: block; font-size: 1.05em; color: #ffc27a; }
.aux-state { display: block; font-size: 0.78em; font-weight: 800; color: #7dfad2; }
.aux-locked .aux-state { color: var(--muted); }
.aux-locked .aux-art, .aux-locked .ico.pic { filter: grayscale(1) brightness(0.62); }
.aux-locked .shop-name { color: var(--muted); }
.aux-row .shop-name { color: #ffc27a; }
.aux-none { margin-top: 0.3em; }

/* Short frames (16:9 phones, wide screens): the homepage rails and the briefing tighten, so the rails stay clear of the Pass card and
   the stage list keeps room under the briefing. */
.short-frame .home-rail { top: calc(var(--safe-top, 0px) + 3.9em); gap: 0.2em; }
.short-frame .hr-btn .art { width: 2.1em; height: 2.1em; }
.short-frame .hr-member { width: 2.6em; height: 2.6em; }
.short-frame .stage-info.brief11 { gap: 0.18em; padding-top: 0.4em; padding-bottom: 0.4em; }
.short-frame .bf-foe canvas { width: 1.85em; height: 1.85em; }
.short-frame .bf-foe.boss canvas { width: 2.3em; height: 2.3em; }
.short-frame .bf-up .art-cell, .short-frame .bf-rew .art-cell { width: 2.2em; height: 2.2em; }
.short-frame .bf-grade { width: 1.9em; height: 1.9em; }

/* The universal reward panel (owner final round §2): what the server credited, as pictures in a grid that wraps and scrolls on a small
   screen; a tap on a picture gives its full name and details. */
.rv-grant { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.45em; width: 100%; max-height: 46vh; overflow-y: auto; padding: 0.3em 0.1em; touch-action: pan-y; }
.rv-grant .art-cell { width: 3.9em; height: 3.9em; }
.k-grant .rv-name { font-size: 1em; color: var(--gold); }

/* The Equipment screen's V1.1 row (owner final round §5, §13): the auxiliary turrets' entry upper left (to the Arsenal's tab) and the
   Title slot beside it (not an ordinary gear slot); the title picker with each title's picture, bonus and time left. */
.gear-extras { flex: none; display: grid; grid-template-columns: 1fr 1fr; gap: 0.35em; width: 100%; max-width: 20.5em; }
.gear-extras > button { display: flex; align-items: center; gap: 0.4em; padding: 0.3em 0.45em; border-radius: 0.7em; text-align: left; min-width: 0;
  background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(154, 167, 207, 0.3); color: var(--text); --hit-y: 0.1em; }
.gear-extras .gx-aux { border-color: rgba(255, 169, 77, 0.45); }
.gear-extras .gx-title { border-color: rgba(155, 92, 255, 0.45); }
.gear-extras .gx-title.empty { border-style: dashed; }
.gx-art { flex: none; width: 2.2em; height: 2.2em; line-height: 0; }
.gx-art svg { width: 100%; height: 100%; overflow: visible; }
.gx-aux.off .gx-art { filter: grayscale(1) brightness(0.65); }
.gear-extras span { display: flex; flex-direction: column; min-width: 0; }
.gear-extras b { font-size: 0.78em; }
.gear-extras small { font-size: 0.62em; color: var(--muted); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* T423: the 辅助炮台 state (未开启 · 随 COMMANDER 或 BLACK 开启) wraps onto a second line instead of being cut off */
.gear-extras .gx-aux small { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; line-height: 1.25; }
/* T423: a [hidden] cell in a stats grid stays hidden (.stats div sets display: flex) */
.stats div[hidden] { display: none; }
.tl-list { list-style: none; margin: 0; padding: 0; width: 100%; display: flex; flex-direction: column; gap: 0.45em; text-align: left; }
.tl-row { display: flex; align-items: center; gap: 0.55em; padding: 0.35em; border-radius: 0.6em; background: rgba(255, 255, 255, 0.05); }
.tl-row.worn { box-shadow: inset 0 0 0 1px rgba(155, 92, 255, 0.7); }
.tl-row.expired .tl-art { filter: grayscale(1) brightness(0.6); }
.tl-art { flex: none; width: 2.6em; height: 2.6em; line-height: 0; }
.tl-art svg { width: 100%; height: 100%; overflow: visible; }
.tl-info { flex: 1; display: flex; flex-direction: column; font-size: 0.8em; min-width: 0; }
.tl-info span { color: #c9b6ff; font-weight: 800; }
.tl-info small { color: var(--muted); font-weight: 700; }
.tl-row.expired small { color: #ff8fa3; }
.tl-note { font-size: 0.7em; }

/* A2 brief (V1.1.4 - V1.1.6): level locks on the home rail, Friends / Profile sheets, the Endless resume card, Co-op, Privacy. Compact,
   icon-led, mobile first (375 px). */
.hr-btn.hr-locked .art { filter: grayscale(1) brightness(0.55) drop-shadow(0 0.15em 0.3em rgba(0, 0, 0, 0.6)); }
.hr-btn.hr-locked .art-lock { position: absolute; top: 1.2em; left: 50%; transform: translate(-50%, -50%); }
.hr-btn.hr-locked .hr-bang { z-index: 1; }
.a2-sheet .sheet-box { max-width: 21em; width: 100%; max-height: calc(100% - 0.4em); overflow-y: auto; overscroll-behavior: contain; gap: 0.45em; }
.a2-sheet .dm-art { width: 2.6em; height: 2.6em; line-height: 0; }
.a2-tabs { display: flex; gap: 0.3em; width: 100%; }
.a2-tab { position: relative; flex: 1 1 0; padding: 0.45em 0.3em; border-radius: 0.7em; background: rgba(255, 255, 255, 0.06); color: var(--muted); font: inherit; font-size: 0.8em; font-weight: 800; white-space: nowrap; }
.a2-tab.on { background: rgba(255, 209, 102, 0.16); color: #ffe7a8; box-shadow: inset 0 0 0 1px rgba(255, 209, 102, 0.5); }
.a2-n { position: absolute; top: -0.35em; right: -0.2em; min-width: 1.3em; padding: 0 0.3em; border-radius: 0.65em; background: #ff3b5c; color: #fff; font-style: normal; font-size: 0.8em; line-height: 1.3em; }
.a2-body { display: flex; flex-direction: column; gap: 0.4em; width: 100%; min-height: 6em; }
.a2-bar { display: flex; gap: 0.35em; width: 100%; }
.a2-input { flex: 1; min-width: 0; padding: 0.5em 0.6em; border-radius: 0.6em; border: 1px solid rgba(255, 255, 255, 0.16); background: rgba(0, 0, 0, 0.3); color: var(--text); font: inherit; font-size: 0.85em; }
.a2-bar .btn { flex: none; width: auto; min-width: 3.6em; padding: 0.45em 0.8em; font-size: 0.85em; }
.a2-meta { display: flex; align-items: center; gap: 0.7em; font-size: 0.75em; font-weight: 800; color: var(--muted); }
.a2-meta .a2-me { margin-left: auto; }
.a2-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.3em; max-height: 16em; overflow-y: auto; }
.a2-row { display: flex; align-items: center; gap: 0.4em; padding: 0.35em 0.5em; border-radius: 0.6em; background: rgba(255, 255, 255, 0.05); }
.a2-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; padding: 0; color: var(--text); font: inherit; font-size: 0.85em; font-weight: 800; }
.a2-heart { font-size: 0.75em; font-weight: 800; color: #ff8fa3; white-space: nowrap; }
.a2-row .chip { flex: none; padding: 0.3em 0.55em; font-size: 0.75em; white-space: nowrap; }
.a2-done { flex: none; min-width: 3.2em; text-align: center; color: var(--green); font-weight: 900; }
.a2-empty { padding: 1.2em 0; text-align: center; color: var(--muted); }
.a2-code { display: flex; align-items: center; justify-content: center; gap: 0.6em; }
.a2-code b { font-size: 1.35em; letter-spacing: 0.12em; color: var(--gold); }
.a2-code .btn { width: auto; padding: 0.4em 0.9em; font-size: 0.85em; }
.a2-rew { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.3em 0.8em; font-size: 0.75em; font-weight: 800; }
.a2-rew .art-inline { display: inline-block; width: 1.1em; height: 1.1em; vertical-align: -0.2em; line-height: 0; }
.a2-goal { color: var(--muted); }
.a2-st { flex: none; font-weight: 900; }
.a2-xp { flex: none; width: 4em; }
.a2-lv { font-size: 0.7em; color: var(--gold); }
.a2-badges { display: flex; justify-content: center; gap: 6px; margin: -2px 0 8px; }
.a2-preview { display: block; width: 100%; max-width: 340px; height: 220px; margin: 0 auto 10px; border-radius: 12px; border: 1px solid rgba(120, 160, 255, 0.25); background: #03050d; }
@media (max-height: 640px) { .a2-preview { height: 170px; } }
.a2-gear { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5em; }
.a2-ups { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0.35em; }
.a2-ups li { display: flex; align-items: center; gap: 0.35em; padding: 0.3em 0.45em; border-radius: 0.55em; background: rgba(255, 255, 255, 0.05); font-size: 0.8em; }
.a2-ups .art-inline { width: 1.6em; height: 1.6em; line-height: 0; }
.a2-ups b { margin-left: auto; color: var(--gold); }
.a2-notice .sheet-box { max-width: 14em; }
/* t139/t140: 敬请期待 can be raised from the 远征篇章 map (z 80) and the Ch2 / 磁暴远征 stage details (z 30): keep it on top. */
.sheet.a2-notice { z-index: 90; }
.en-resume { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 0.4em; width: 100%; max-width: 20em; padding: 0.5em 0.6em; border-radius: 0.8em;
  background: rgba(255, 209, 102, 0.1); box-shadow: inset 0 0 0 1px rgba(255, 209, 102, 0.45); }
.en-r-info { display: flex; flex-wrap: wrap; align-items: center; gap: 0.15em 0.6em; font-size: 0.8em; font-weight: 800; }
.en-r-info b { color: var(--gold); font-size: 1.1em; }
.en-r-at { color: var(--muted); font-size: 0.9em; }
.en-r-tip { font-style: normal; color: var(--muted); cursor: help; }
.en-resume .btn { width: auto; padding: 0.45em 0.9em; font-size: 0.85em; }
.en-resume .chip { padding: 0.35em 0.6em; font-size: 0.75em; }
.ch-play-row { display: flex; gap: 0.45em; width: 100%; align-items: stretch; }
.ch-play-row .play-stage { flex: 1; }
.ch-coop { flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.05em; padding: 0.2em 0.5em; font-size: 0.68em; }
.ch-coop .art { width: 2em; height: 2em; line-height: 0; }
.a2-privacy { display: flex; flex-direction: column; gap: 0.3em; width: 100%; }
.a2-pv-ask { font-size: 0.75em; color: var(--muted); }
.a2-pv-row { display: flex; gap: 0.3em; }
.a2-pv { flex: 1; padding: 0.4em 0.3em; font-size: 0.75em; white-space: nowrap; }
.a2-pv.sel { color: var(--gold); background: rgba(255, 209, 102, 0.12); border-color: rgba(255, 209, 102, 0.5); }
/* A2 real-browser review: every A2 control at least 32 px on a phone (375 px); its invisible tap area (button::before) about 44 px
   (A2 P2: the look unchanged, 6 px more above and below; 2 px at the sides, so neighbours in a row never overlap) */
.a2-tab, .a2-row .chip, .a2-meta .chip, .a2-pv, .a2-code .btn, .a2-bar .btn, .en-resume .chip, .en-resume .btn, .ch-coop { min-height: 32px; --hit-y: 6px; --hit-x: 2px; }
/* Owner request 2026-11-04: the simpler friend row (tags, name#tag, level) and its one action bar. */
.a2-fr { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.a2-frline { border: 1px solid transparent; }
.a2-frline:has(.a2-frow[aria-expanded="true"]) { border-color: rgba(245, 210, 122, 0.45); background: rgba(245, 210, 122, 0.08); }
.a2-frow { flex: 1; min-width: 0; display: flex; align-items: center; gap: 0.4em; padding: 0; border: 0; background: none; color: var(--text); font: inherit; cursor: pointer; text-align: left; min-height: 36px; }
.a2-frline > .chip.a2-gift, .a2-frline > .a2-done { flex: none; }
.a2-frline > .chip.a2-gift { min-width: 2.6em; justify-content: center; }
.a2-done.a2-sent { color: var(--muted, #8a8f98); opacity: 0.6; font-weight: 700; font-size: 0.9em; }
.a2-gpop { position: fixed; z-index: 9999; transform: translate(-50%, 0); pointer-events: none; color: #f5d27a; font-weight: 900; text-shadow: 0 1px 2px #000; animation: a2-gpop 0.9s ease-out forwards; }
@keyframes a2-gpop { from { opacity: 1; transform: translate(-50%, 0); } to { opacity: 0; transform: translate(-50%, -28px); } }
.a2-frow .a2-name { flex: 0 1 auto; }
.a2-lv { flex: 1; font-size: 0.72em; font-weight: 800; color: var(--muted, #9aa4b8); white-space: nowrap; }
.a2-tag { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%; font-style: normal; font-size: 11px; font-weight: 900; line-height: 1; }
.a2-tag-c { background: #2f6fe0; color: #fff; box-shadow: 0 0 0 1px #8fb6ff inset; }
.a2-tag-b { background: #111; color: #f5d27a; box-shadow: 0 0 0 1px #f5d27a inset; }
.a2-acts { display: flex; align-items: center; gap: 6px; padding: 2px 4px 4px 12px; }
.a2-acts[hidden] { display: none; }
.a2-acts .chip { flex: none; min-height: 32px; padding: 0.3em 0.7em; font-size: 0.75em; white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; }
.a2-acts .chip.a2-view { color: var(--gold); border-color: rgba(245, 210, 122, 0.45); }
.a2-acts .chip.a2-x { margin-left: auto; min-width: 32px; }
.a2-row .chip.a2-x { min-width: 32px; display: inline-flex; align-items: center; justify-content: center; }
.a2-row .chip, .a2-meta .chip { display: inline-flex; align-items: center; justify-content: center; }

/*
 * The Bag (背包, V1.1 build, 2026-11-05; src/bagView.ts): the worn gear on top as before, then the 装备 / 材料 tabs, the slot / rarity /
 * sort pickers and a 3-column grid of rounded-square tiles in the rarity's colour, which scrolls inside the frame. "+N" badges by step;
 * a dragged tile leaves a dashed placeholder where it will land.
 */
.gear.bag11 { gap: 0.4em; }
.bag { flex: 1 1 auto; min-height: 10em; width: 100%; max-width: 20.5em; display: flex; flex-direction: column; gap: 0.35em; }
.bag-tabs { flex: none; display: flex; gap: 0.3em; }
.bag-tab {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 0.4em; padding: 0.42em 0.6em; border-radius: 0.75em; font-size: 0.85em; font-weight: 900;
  color: var(--muted); background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.12);
}
.bag-tab i { font-style: normal; font-size: 0.8em; opacity: 0.75; }
.bag-tab.on { color: #06142a; background: linear-gradient(180deg, #bdf1ff, #4cc9f0); border-color: transparent; }
.bag-picks { flex: none; display: flex; gap: 0.3em; }
.bag-pick { position: relative; flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.1em; font-size: 0.62em; font-weight: 800; color: var(--muted); text-align: left; }
.bag-pick > span { padding-left: 0.5em; }
.bag-pick::after { content: '\25BE'; position: absolute; right: 0.7em; bottom: 0.45em; color: var(--muted); font-size: 1.2em; pointer-events: none; }
.bag-pick select {
  -webkit-appearance: none; appearance: none; width: 100%; min-width: 0; font: inherit; font-size: 1.3em; font-weight: 900; color: var(--text);
  padding: 0.32em 1.5em 0.32em 0.6em; border-radius: 0.6em; background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 255, 255, 0.16); cursor: pointer;
}
.bag-pick select option { color: #0b1020; }
.bag-hint { flex: none; padding-left: 0.3em; font-size: 0.62em; font-weight: 700; color: var(--muted); text-align: left; }
.bag-grid {
  position: relative; flex: 1 1 0; min-height: 0; overflow-y: auto; overflow-x: hidden; touch-action: pan-y; overscroll-behavior: contain;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-content: start; gap: 0.55em; padding: 0.4em 0.3em 0.7em;
  -webkit-mask-image: linear-gradient(transparent, #000 0.4em, #000 calc(100% - 0.6em), transparent);
  mask-image: linear-gradient(transparent, #000 0.4em, #000 calc(100% - 0.6em), transparent);
}
.bag.dragging .bag-grid { touch-action: none; }
.bag-none { grid-column: 1 / -1; padding: 0.8em; color: var(--muted); font-size: 0.8em; font-weight: 700; line-height: 1.4; text-align: center; }
.bag-tile {
  --r: #b8c2dc;
  position: relative; aspect-ratio: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.1em;
  padding: 0.4em 0.3em 0.3em; border-radius: 1.1em; color: var(--text); text-align: center;
  background: radial-gradient(circle at 50% 36%, color-mix(in srgb, var(--r) 24%, #1b2344), #0a0f22 78%);
  border: 1.5px solid color-mix(in srgb, var(--r) 70%, transparent);
  box-shadow: inset 0 0 0.9em color-mix(in srgb, var(--r) 22%, transparent), 0 0.15em 0.5em rgba(0, 0, 0, 0.45);
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
}
.bag-tile.r-rare { --r: #5cb2ff; }
.bag-tile.r-epic { --r: #c49bff; }
.bag-tile.r-legendary { --r: #ffb547; }
.bag-tile.r-commem { --r: #f07cff; }
.bag-tile.mat { --r: #7fe3ff; }
.bag-tile.can-drag { cursor: grab; }
.bag-tile:active:not(.mat) { transform: scale(0.97); }
.bt-art { display: block; width: 60%; aspect-ratio: 1; pointer-events: none; }
.bt-art svg { display: block; width: 100%; height: 100%; filter: drop-shadow(0 0.15em 0.2em rgba(0, 0, 0, 0.5)); }
.bt-name {
  max-width: 100%; font-size: 0.6em; font-weight: 800; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  color: color-mix(in srgb, var(--r) 55%, #fff); pointer-events: none;
}
.bt-n { position: absolute; right: 0.4em; bottom: 1.55em; padding: 0 0.3em; border-radius: 0.4em; font-size: 0.68em; font-weight: 900; color: #fff; background: rgba(0, 0, 0, 0.62); }
.bt-eq { position: absolute; left: 0.4em; top: 0.4em; padding: 0.06em 0.3em; border-radius: 0.35em; font-style: normal; font-size: 0.58em; font-weight: 900; color: #04241a; background: var(--green); }
.bag-tile.worn { border-color: color-mix(in srgb, var(--green) 55%, var(--r)); }
.bt-plus {
  position: absolute; right: 0.32em; top: 0.32em; padding: 0.18em 0.34em; border-radius: 0.45em; font-style: normal; font-size: 0.7em; font-weight: 900; line-height: 1;
  color: #e6ebf7; background: rgba(10, 14, 30, 0.8); border: 1px solid rgba(255, 255, 255, 0.28);
}
.pt-blue { color: #d8eeff; background: linear-gradient(180deg, #2f7fe0, #174a9e); border-color: #7cc0ff; }
.pt-purple { color: #f3e8ff; background: linear-gradient(180deg, #9255e6, #4f238f); border-color: #c89bff; }
.pt-gold { color: #3a2400; background: linear-gradient(180deg, #ffe28a, #f0a91c); border-color: #fff1b8; }
/* The Bag's +10 badge shimmer is in the LEGENDARY-SHIMMER block (the one looping motion; off with reduced motion). */
.bag-tile.bag-ph { background: rgba(155, 231, 255, 0.05); border: 2px dashed rgba(155, 231, 255, 0.65); box-shadow: none; }
.bag-tile.bag-ph > * { visibility: hidden; }
.bag-ghost {
  position: fixed; z-index: 1000; margin: 0; pointer-events: none; opacity: 0.96; transform: scale(1.08) rotate(-2deg);
  box-shadow: 0 0.6em 1.4em rgba(0, 0, 0, 0.6), 0 0 1em color-mix(in srgb, var(--r) 60%, transparent);
}

/* The Diamond Shop (商店, V1.1 build, 2026-11-05; src/diamondShopView.ts), and its menu tile in the records tile's place. */
.records.gem-shop-tile { color: #bff3ff; font-size: 0.85em; font-weight: 900; border-color: rgba(127, 227, 255, 0.35); }
.records.gem-shop-tile svg { color: #7fe3ff; }
.acct-records { width: 100%; max-width: 19em; margin: 0.3em auto 0; }
.acct-records b { color: var(--gold); }
.gem-shop { justify-content: flex-start; gap: 0.55em; }
.gem-shop .title { flex: none; font-size: 1.7em; }
.gs-wallet {
  flex: none; display: inline-flex; align-items: center; gap: 0.3em; padding: 0.3em 0.85em 0.3em 0.55em; border-radius: 2em; font-weight: 900; color: #bff3ff;
  background: rgba(0, 0, 0, 0.45); border: 1px solid rgba(127, 227, 255, 0.35);
}
.gs-list { flex: 0 1 auto; min-height: 0; width: 100%; max-width: 21em; margin: 0; padding: 0.2em 0.1em; list-style: none; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 0.45em; }
.gs-row {
  display: grid; grid-template-columns: 3.1em minmax(0, 1fr); gap: 0.35em 0.6em; align-items: center; padding: 0.55em 0.65em; border-radius: 0.9em; text-align: left;
  background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.12);
}
.gs-art { grid-row: 1 / span 2; display: flex; width: 3.1em; height: 3.1em; padding: 0.3em; border-radius: 0.8em; background: radial-gradient(circle, rgba(127, 227, 255, 0.2), rgba(0, 0, 0, 0.35)); }
.gs-art svg { width: 100%; height: 100%; }
.gs-info { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.15em 0.5em; min-width: 0; }
.gs-name { font-size: 0.95em; font-weight: 900; }
.gs-sub { color: var(--muted); font-size: 0.75em; font-weight: 700; }
.gs-unit { margin-left: auto; display: inline-flex; align-items: center; gap: 0.2em; font-size: 0.85em; font-weight: 900; color: #bff3ff; }
.gs-act { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 0.4em; }
.gs-qty { display: inline-flex; align-items: center; gap: 0.2em; margin-right: auto; }
.gs-q { min-width: 1.9em; height: 1.9em; padding: 0 0.3em; border-radius: 0.55em; font-weight: 900; color: var(--text); background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.2); }
.gs-q:disabled { opacity: 0.4; }
.gs-q10 { min-width: 2.4em; font-size: 0.78em; }
.gs-n { min-width: 1.8em; text-align: center; font-weight: 900; }
.gs-total { display: inline-flex; align-items: center; gap: 0.2em; font-size: 0.78em; font-weight: 800; color: var(--muted); }
.gs-total b { color: #bff3ff; }
.gs-buy { padding: 0.45em 1em; border-radius: 0.7em; border: none; font-size: 0.85em; font-weight: 900; color: #2a1a00; background: linear-gradient(180deg, #ffe08a, #ffb020); }
.gs-buy:disabled { cursor: default; }
.gs-buy.gb-short { color: #ffd6dc; background: rgba(239, 71, 111, 0.2); border: 1px solid rgba(239, 71, 111, 0.6); }
.gs-buy.gb-off, .gs-buy.gb-owned { color: var(--muted); background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 255, 255, 0.14); }
.gs-buy.gb-owned { color: var(--green); }
.gs-buy.gb-busy { opacity: 0.75; cursor: progress; }
.gs-row.st-off { opacity: 0.6; }
.gs-row.st-off .gs-art { filter: grayscale(1); }
.gs-note { max-width: 26em; color: var(--muted); font-size: 0.7em; font-weight: 700; line-height: 1.35; }
.gs-msg { max-width: 24em; margin-top: 1em; color: var(--muted); font-size: 0.9em; font-weight: 700; line-height: 1.4; }
.gem-shop .back { flex: none; }
/* t191: the + beside the shop's balance, and the standalone Buy Diamonds page (header × pinned, packs scroll on a short phone). */
.gs-bal { flex: none; display: inline-flex; align-items: center; gap: 0.35em; }
.gs-plus {
  width: 1.9em; height: 1.9em; padding: 0; border-radius: 50%; font-size: 1.05em; font-weight: 900; line-height: 1; cursor: pointer;
  color: #2a1a00; background: linear-gradient(180deg, #ffe08a, #ffb020); border: none; box-shadow: 0 0 0.5em rgba(255, 176, 32, 0.45);
}
.gs-plus:disabled { opacity: 0.45; cursor: default; }
.gem-topup { padding-bottom: 1em; }
.gt-head { flex: none; display: flex; align-items: center; gap: 0.6em; width: 100%; max-width: 21em; }
.gt-head .title { flex: 1; min-width: 0; text-align: left; font-size: 1.7em; }
.gt-list { flex: 1 1 auto; }
.gt-row .gs-info { flex-direction: column; align-items: flex-start; gap: 0.15em; }
.gt-amt { color: #bff3ff; font-size: 1.05em; }
.gt-gift { display: inline-flex; align-items: center; gap: 0.25em; padding: 0.1em 0.5em 0.1em 0.3em; border-radius: 1em; font-size: 0.75em; font-weight: 900; color: #ffe08a; background: rgba(255, 176, 32, 0.14); border: 1px solid rgba(255, 176, 32, 0.4); }
.gt-alloy { display: inline-flex; width: 1.15em; height: 1.15em; }
.gt-alloy svg { width: 100%; height: 100%; }
.gt-price { margin-right: auto; font-size: 1.05em; font-weight: 900; color: var(--text); }
.gt-note { flex: none; text-align: center; }

/* Owner directive 2026-10-28 (Part 2; src/statTone.ts): an after-value's colour is the outcome for the player. Green: better;
   red: worse; gray: unchanged (a price or seconds between shots is better smaller). Last in the file, so it wins its ties. */
/* bug 2026-11-04: a friends act / tab load in flight shows at once (the sheet never looks frozen) */
.a2-friends.a2-busy .a2-body { opacity: .55; pointer-events: none; transition: opacity .15s; }
.a2-friends.a2-busy { cursor: progress; }
/* ---- 极光冰湖 · 破冰远征 (2026 winter limited event) ---- */

/* home-dock hotfix: ice-entry banner added height and clipped Endless Survival under PLAY (worse in EN).
   Sticky bottom dock keeps Play/Endless/version on-screen; content above compresses / scrolls. */
.menu.home11 { overflow-y: auto; overscroll-behavior: contain; min-height: 0; }
.menu.home11 .home-dock { flex: none; position: sticky; bottom: 0; z-index: 3; display: flex; flex-direction: column; align-items: center; gap: 0.15em; width: 100%; margin-top: auto; padding: 0.35em 0 0.15em; min-height: 5.8em; box-sizing: border-box;
  background: linear-gradient(180deg, rgba(3, 5, 13, 0) 0%, rgba(3, 5, 13, 0.92) 28%, rgba(3, 5, 13, 0.97) 100%); }
.menu.home11 .home-dock .play { margin-top: 0; }
.menu.home11 .home-dock .open-endless { margin-top: 0; flex-shrink: 0; padding: 0.4em 0.7em; }
.menu.home11 .home-dock .ver { flex-shrink: 0; }
.menu.home11:has(.ice-entry) { gap: 0.42em; }
.menu.home11:has(.ice-entry) .logo { margin-top: 0.7em; }
.menu.home11:has(.ice-entry) .spacer { flex: 0 1 0.25em; min-height: 0; }
.menu.home11:has(.ice-entry) .ice-entry { height: 36px; }
html.short-frame .menu.home11:has(.ice-entry) { gap: 0.3em; }
html.short-frame .menu.home11:has(.ice-entry) .logo { margin-top: 0.25em; }
html.short-frame .menu.home11:has(.ice-entry) .pass-card { transform: scale(0.96); transform-origin: top center; }
html.short-frame .menu.home11 .home-dock { min-height: 5.2em; gap: 0.06em; padding-top: 0.2em; padding-bottom: 0.2em; }
html:not([lang="zh-CN"]).short-frame .menu.home11 .home-dock { min-height: 5.4em; }
html:not([lang="zh-CN"]) .menu.home11:has(.ice-entry) .logo { margin-top: 0.55em; }
.ice-entry { position: relative; display: flex; align-items: center; gap: 6px; flex-shrink: 0; width: 15.2em; max-width: 100%; height: 42px; margin: 0 auto; padding: 0 10px;
  border: 1px solid rgba(159, 232, 255, 0.75); border-radius: 14px; overflow: hidden; background: #08182c; box-shadow: 0 0 14px rgba(95, 210, 255, 0.4);
  color: #fff; cursor: pointer; font: inherit; flex: 0 0 auto; animation: iceEntryGlow 2.8s ease-in-out 6; }
.ice-entry-art { position: absolute; inset: 0; background-size: cover; background-position: center 62%; }
.ice-entry::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(4, 12, 28, 0.15), rgba(4, 12, 28, 0.55) 55%, rgba(4, 12, 28, 0.85)); }
.ice-entry-tag, .ice-entry-name, .ice-entry-keys { position: relative; z-index: 1; }
.ice-entry-tag { padding: 1px 6px; border-radius: 6px; background: #ff5d73; font-size: 11px; font-weight: 900; }
.ice-entry-name { flex: 1; text-align: left; font-size: 14px; font-weight: 900; letter-spacing: 1px; text-shadow: 0 0 8px #4dc8ff, 0 1px 2px #000; }
.ice-entry-keys { font-size: 12px; color: #bfefff; font-weight: 800; white-space: nowrap; }
.ice-entry .hr-bang { position: absolute; right: 4px; top: 3px; z-index: 2; }
@keyframes iceEntryGlow { 50% { box-shadow: 0 0 26px rgba(120, 255, 210, 0.6); } }

.ice-popup { position: absolute; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; background: rgba(2, 6, 16, 0.78); padding: 14px;
  animation: icePopBg 0.5s ease-out both; }
.ice-popup-box { position: relative; width: min(360px, 94vw); animation: icePopIn 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) both; max-height: 94vh; overflow: auto; border-radius: 18px; background: linear-gradient(180deg, #071a33, #040b18);
  border: 1px solid rgba(159, 232, 255, 0.5); box-shadow: 0 0 40px rgba(77, 200, 255, 0.35); color: #e8f7ff; text-align: center; padding-bottom: 12px; }
.ice-popup-x { position: absolute; right: 8px; top: 8px; z-index: 2; width: 32px; height: 32px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, 0.45); color: #fff; font-size: 16px; }
.ice-popup-poster { position: relative; height: min(46vh, 330px); background-size: cover; background-position: center 35%; }
/* The aurora shimmer: one soft sweep across the poster as it opens. */
.ice-popup-poster::before { content: ""; position: absolute; inset: 0; mix-blend-mode: screen; opacity: 0;
  background: linear-gradient(100deg, rgba(77, 255, 195, 0) 30%, rgba(77, 255, 195, 0.32) 44%, rgba(95, 210, 255, 0.36) 52%, rgba(180, 140, 255, 0.28) 60%, rgba(180, 140, 255, 0) 72%);
  background-size: 260% 100%; background-position: 130% 0; animation: icePopShimmer 1.3s ease-out 0.2s both; }
.ice-popup-poster::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(4, 11, 24, 0) 45%, #071a33 100%); }
.ice-popup-titles { position: absolute; left: 0; right: 0; bottom: 10px; z-index: 1; display: flex; flex-direction: column; gap: 2px; }
.ice-popup-titles b { font-size: 34px; letter-spacing: 6px; text-shadow: 0 0 12px #5fd2ff, 0 0 26px #4dffc3; }
.ice-popup-titles span { font-size: 13px; letter-spacing: 2px; color: #bfefff; }
.ice-popup-copy { padding: 4px 18px; font-size: 13px; line-height: 1.7; color: #cfe9ff; }
.ice-popup-copy p { margin: 0; }
.ice-popup-bullets { list-style: none; margin: 8px 16px 12px; padding: 8px 10px; border-radius: 12px; background: rgba(95, 210, 255, 0.08); text-align: left; font-size: 13px; line-height: 1.8; }
/* The CTA: the info box's width and side margins (16 px), centred; .btn's fixed 15em width and its flex box never left-align it. */
.ice-popup-actions { display: flex; flex-direction: column; align-items: stretch; margin: 0 16px; }
.ice-popup-go { width: 100%; max-width: none; margin: 0; }
.ice-popup-later { align-self: center; margin: 6px 0 0; color: #8fb4cc; }
.ice-popup.ice-popup-out { animation: icePopBgOut 0.25s ease-in forwards; pointer-events: none; }
.ice-popup-out .ice-popup-box { animation: icePopOut 0.25s cubic-bezier(0.4, 0, 1, 1) forwards; }
@keyframes icePopBg { from { background-color: rgba(2, 6, 16, 0); } }
@keyframes icePopBgOut { to { background-color: rgba(2, 6, 16, 0); } }
@keyframes icePopIn { from { opacity: 0; transform: translateY(24px) scale(0.92); } }
@keyframes icePopOut { to { opacity: 0; transform: translateY(24px) scale(0.92); } }
@keyframes icePopShimmer { 0% { opacity: 0; } 20% { opacity: 1; } 100% { opacity: 0; background-position: -60% 0; } }

.ice-page { overflow-y: auto; padding-bottom: 24px; justify-content: flex-start; gap: 0.35em; }
.ice-page > .ice-hero, .ice-page > .ice-keys-row, .ice-page > .ice-tiers, .ice-page > .ice-drops, .ice-page > .ice-res-body { align-self: stretch; flex: 0 0 auto; }
.ice-hero { position: relative; height: 190px; margin: 0 -10px; border-radius: 0 0 16px 16px; background-size: cover; background-position: center 30%; }
.ice-hero-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(4, 11, 24, 0.1), rgba(4, 11, 24, 0.95)); border-radius: inherit; }
.ice-hero-t { position: absolute; left: 0; right: 0; bottom: 10px; display: flex; flex-direction: column; text-align: center; }
.ice-hero-t b { font-size: 24px; letter-spacing: 2px; text-shadow: 0 0 10px #5fd2ff; }
.ice-hero-t span { font-size: 12px; color: #bfefff; }
.ice-ends { margin: 6px 0; text-align: center; font-size: 12px; color: #ffcf8a; }
.ice-keys-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 6px 12px; padding: 8px 10px; border-radius: 12px; background: rgba(95, 210, 255, 0.1); }
.ice-keys { font-weight: 900; color: #bfefff; }
.ice-daily-claim, .ice-gift-claim { padding: 6px 12px !important; font-size: 13px !important; min-height: 0 !important; width: auto !important; }
.ice-daily-done { flex: 0 0 auto; white-space: nowrap; color: #8fdcb0; font-weight: 800; font-size: 13px; }
.ice-tiers { display: flex; flex-direction: column; gap: 8px; margin: 8px 12px; }
.ice-tier { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 12px; border-radius: 14px; border: 1px solid rgba(159, 232, 255, 0.45);
  background: linear-gradient(110deg, rgba(20, 60, 110, 0.85), rgba(10, 24, 48, 0.9)); color: #eaf8ff; font: inherit; text-align: left; cursor: pointer; }
.ice-tier.t2 { border-color: rgba(180, 160, 255, 0.55); background: linear-gradient(110deg, rgba(60, 50, 130, 0.85), rgba(12, 20, 46, 0.92)); }
.ice-tier.t3 { border-color: rgba(255, 140, 160, 0.6); background: linear-gradient(110deg, rgba(110, 40, 80, 0.85), rgba(16, 16, 40, 0.94)); }
.ice-tier[aria-disabled="true"] { opacity: 0.6; }
.ice-tier-name { font-size: 17px; font-weight: 900; }
.ice-tier-hint { font-size: 12px; color: #b8d8ee; }
.ice-tier-meta { font-size: 12px; color: #ffd27a; }
.ice-tier.cleared .ice-tier-meta { color: #8fdcb0; }
.ice-drops { display: flex; flex-direction: column; gap: 2px; margin: 8px 12px; padding: 8px 10px; border-radius: 12px; border: 1px dashed rgba(255, 210, 122, 0.5); font-size: 12px; color: #ffe6b0; }
.ice-sss { font-size: 11px !important; opacity: 0.8; }
.ice-actions { display: flex; justify-content: center; gap: 8px; margin: 6px; }
.ice-start-note { font-size: 12px !important; }
.ice-story-text { margin: 8px 16px; font-size: 14px; line-height: 1.85; color: #d6ecff; text-align: left; }
.ice-story-text p { margin: 0 0 8px; }

.ice-gift { display: flex; align-items: center; gap: 10px; margin: 6px 0 10px; padding: 8px; border-radius: 14px; border: 1px solid rgba(159, 232, 255, 0.55);
  background: linear-gradient(110deg, rgba(20, 60, 110, 0.9), rgba(8, 20, 40, 0.9)); box-shadow: 0 0 14px rgba(95, 210, 255, 0.3); text-align: left; }
.ice-gift-art { flex: 0 0 54px; height: 72px; border-radius: 10px; background-size: cover; background-position: center 30%; }
.ice-gift-tx { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 12px; color: #cfe9ff; }
.ice-gift-tx b { font-size: 15px; color: #fff; }
.ice-gift-held { color: #bfefff; font-weight: 800; }

/* Wave hints (战术 AI): a dialog over the held battle; ~0.4 s hologram open (scanline sweep, flicker, slide), 0.25 s close. */
.ice-hint { position: fixed; inset: 0; z-index: 58; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(2, 8, 20, 0.62);
  animation: iceHintBg 0.4s ease-out both; }
.ice-hint-box { position: relative; width: min(340px, 92vw); padding: 16px 16px 14px; border-radius: 16px; overflow: hidden; text-align: left; color: #e6f6ff;
  background: linear-gradient(180deg, rgba(8, 30, 58, 0.96), rgba(4, 14, 30, 0.96)); border: 1px solid rgba(159, 232, 255, 0.6);
  box-shadow: 0 0 24px rgba(95, 210, 255, 0.35), inset 0 0 18px rgba(95, 210, 255, 0.12); animation: iceHintIn 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.ice-hint-box::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgba(159, 232, 255, 0.05) 0 1px, transparent 1px 3px); }
.ice-hint.boss .ice-hint-box { border-color: rgba(255, 210, 122, 0.75); box-shadow: 0 0 24px rgba(255, 210, 122, 0.3), inset 0 0 18px rgba(255, 210, 122, 0.1); }
.ice-hint-scan { position: absolute; left: 0; right: 0; top: -30%; height: 30%; pointer-events: none;
  background: linear-gradient(180deg, rgba(159, 232, 255, 0), rgba(159, 232, 255, 0.3), rgba(159, 232, 255, 0)); animation: iceHintScan 0.5s ease-out 0.05s both; }
.ice-hint-head { position: relative; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 12px; color: #9fe8ff; }
.ice-hint-head b { font-size: 17px; color: #fff; letter-spacing: 1px; text-shadow: 0 0 8px #5fd2ff; }
.ice-hint.boss .ice-hint-head b { text-shadow: 0 0 8px #ffd27a; }
.ice-hint-line { position: relative; margin: 10px 0 14px; font-size: 14px; line-height: 1.7; color: #d6ecff; }
.ice-hint-ok { width: 100%; max-width: none; }
.ice-hint.ice-hint-out { animation: iceHintBgOut 0.25s ease-in forwards; pointer-events: none; }
.ice-hint-out .ice-hint-box { animation: iceHintOut 0.25s ease-in forwards; }
@keyframes iceHintBg { from { background-color: rgba(2, 8, 20, 0); } }
@keyframes iceHintBgOut { to { background-color: rgba(2, 8, 20, 0); } }
@keyframes iceHintIn { 0% { opacity: 0; transform: translateY(18px) scaleY(0.9); filter: brightness(1.8); } 30% { opacity: 0.6; } 42% { opacity: 0.25; }
  58% { opacity: 0.9; } 100% { opacity: 1; transform: none; filter: none; } }
@keyframes iceHintOut { 0% { opacity: 1; } 30% { opacity: 0.45; } 45% { opacity: 0.85; } 100% { opacity: 0; transform: translateY(-10px) scaleY(0.85); filter: brightness(1.6); } }
@keyframes iceHintScan { from { top: -30%; } to { top: 110%; } }

.ice-finisher { position: fixed; inset: 0; z-index: 55; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at 50% 40%, rgba(10, 40, 70, 0.55), rgba(2, 6, 16, 0.85)); animation: iceFin 2.6s ease-out forwards; }
.ice-fin-aurora { position: absolute; inset: 0; background: linear-gradient(100deg, rgba(77, 255, 195, 0) 20%, rgba(77, 255, 195, 0.25) 40%, rgba(95, 210, 255, 0.3) 55%, rgba(180, 140, 255, 0.25) 70%, rgba(180, 140, 255, 0) 85%);
  background-size: 200% 100%; animation: iceAurora 2.6s linear 1; mix-blend-mode: screen; }
.ice-fin-t { position: relative; display: flex; flex-direction: column; gap: 6px; text-align: center; color: #fff; }
.ice-fin-t b { font-size: 26px; letter-spacing: 3px; text-shadow: 0 0 14px #5fd2ff; }
.ice-fin-t span { font-size: 14px; color: #cfe9ff; }
.ice-fin-skip { position: absolute; bottom: 40px; left: 0; right: 0; text-align: center; color: #8fb4cc; font-size: 12px; }
@keyframes iceAurora { to { background-position: -200% 0; } }
@keyframes iceFin { 0% { opacity: 0; } 12% { opacity: 1; } 88% { opacity: 1; } 100% { opacity: 0.2; } }

.ice-result .title { margin-top: 8px; }
.ice-res-head { margin: 4px 0; text-align: center; font-size: 22px; font-weight: 900; }
.ice-res-head.won { color: #9fe8ff; text-shadow: 0 0 10px #5fd2ff; }
.ice-res-head.lost { color: #ff8a9a; }
.ice-rating { display: flex; align-items: baseline; justify-content: center; gap: 8px; }
.ice-rating span { font-size: 13px; color: #b8d8ee; }
.ice-rating b { font-size: 44px; font-weight: 900; color: #ffd27a; text-shadow: 0 0 14px rgba(255, 210, 122, 0.7); }
.ice-rating.r-sss b { background: linear-gradient(90deg, #ffe08a, #8fffe0, #b48cff, #ffe08a); background-size: 300% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: iceAurora 3s linear 3; }
.ice-res-stats { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 10px; margin: 6px 12px; padding: 0; font-size: 12px; color: #cfe9ff; }
.ice-res-sub { margin: 8px 0 4px; text-align: center; font-size: 13px; color: #ffe6b0; font-weight: 800; }
.ice-drops-got { display: flex; flex-direction: column; gap: 8px; margin: 0 12px; }
.ice-drop { display: grid; grid-template-columns: 56px 1fr; column-gap: 10px; padding: 8px; border-radius: 14px; text-align: left; }
.ice-drop.legendary { border: 1px solid #ffcf5a; background: linear-gradient(110deg, rgba(120, 80, 10, 0.55), rgba(20, 16, 30, 0.9)); box-shadow: 0 0 18px rgba(255, 207, 90, 0.45); }
.ice-drop.epic { border: 1px solid #b48cff; background: linear-gradient(110deg, rgba(70, 40, 130, 0.6), rgba(16, 14, 34, 0.9)); }
.ice-drop-art { grid-row: 1 / 4; width: 56px; height: 56px; display: flex; align-items: center; justify-content: center; }
.ice-drop-art svg, .ice-drop-art img { width: 52px; height: 52px; }
.ice-drop b { font-size: 14px; color: #fff; }
.ice-drop span { font-size: 11px; color: #e6d2ff; }
.ice-drop em { font-size: 11px; color: #cfe9ff; font-style: normal; opacity: 0.85; }
.ice-first { margin: 6px; text-align: center; color: #8fdcb0; font-weight: 800; }
.ice-res-grants { margin: 6px; text-align: center; color: #ffe6b0; font-size: 14px; font-weight: 800; }
.reduce-motion .ice-entry, .reduce-motion .ice-fin-aurora, .reduce-motion .ice-rating.r-sss b { animation: none; }
@media (prefers-reduced-motion: reduce) { .ice-entry, .ice-fin-aurora, .ice-rating.r-sss b { animation: none; } }
/* Reduced motion: the popup and the wave hint only fade (short), no scale, slide, shimmer, flicker or scanline. */
.reduce-motion .ice-popup, .reduce-motion .ice-hint { animation: iceFadeIn 0.2s ease-out both; }
.reduce-motion .ice-popup-box, .reduce-motion .ice-hint-box, .reduce-motion .ice-popup-out .ice-popup-box, .reduce-motion .ice-hint-out .ice-hint-box { animation: none; }
.reduce-motion .ice-popup-poster::before, .reduce-motion .ice-hint-scan { display: none; }
.reduce-motion .ice-popup.ice-popup-out, .reduce-motion .ice-hint.ice-hint-out { animation: iceFadeOut 0.15s ease-in forwards; }
@media (prefers-reduced-motion: reduce) {
  .ice-popup, .ice-hint { animation: iceFadeIn 0.2s ease-out both; }
  .ice-popup-box, .ice-hint-box, .ice-popup-out .ice-popup-box, .ice-hint-out .ice-hint-box { animation: none; }
  .ice-popup-poster::before, .ice-hint-scan { display: none; }
  .ice-popup.ice-popup-out, .ice-hint.ice-hint-out { animation: iceFadeOut 0.15s ease-in forwards; }
}
@keyframes iceFadeIn { from { opacity: 0; } }
@keyframes iceFadeOut { to { opacity: 0; } }



/* Night Expedition overlays (appended into style.css for local demo) */
.nx-page { overflow:hidden; padding:0; }
.nx-head { flex:0 0 auto; padding:10px 14px 0; text-align:center; }
.nx-head .title { text-align:center; font-size:18px; font-weight:900; color:#7ff3ff; text-shadow:0 0 8px rgba(60,200,255,.55); letter-spacing:.04em; line-height:1.25; word-break:break-word; }
.nx-head .nx-keys { opacity:.85; font-size:12px; margin-top:4px; }
.nx-body { flex:1 1 auto; min-height:0; overflow-y:auto; overflow-x:hidden; -webkit-overflow-scrolling:touch; padding:8px 14px 6px; overscroll-behavior:contain; }
.nx-prologue p { margin:6px 0; line-height:1.45; opacity:.92; font-size:13px; }
.nx-sec { font-weight:700; margin:8px 0 6px; color:#9fe8ff; }
.nx-acts { display:flex; flex-direction:column; gap:8px; }
.nx-act { text-align:left; padding:10px 12px; border-radius:12px; border:1px solid rgba(159,232,255,.35); background:rgba(8,24,40,.72); color:#e8f7ff; }
.nx-act b { display:block; margin-bottom:4px; }
.nx-act.locked { opacity:.45; }
.nx-act.done { border-color:rgba(255,210,120,.55); }

/* NX expedition home: visual-first acts (more art, less novel text) */
.nx-prologue.short p { margin: 4px 0 8px; font-size: 12px; line-height: 1.4; opacity: 0.88; }
.nx-prologue.short p + p { display: none; }
.nx-acts.visual { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.nx-act.visual {
  position: relative; overflow: hidden; min-height: 118px; padding: 0;
  display: flex; flex-direction: column; justify-content: flex-end;
}
.nx-act.visual .nx-act-art {
  position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none;
}
.nx-act.visual .nx-act-meta {
  position: relative; z-index: 1; padding: 8px 10px;
  background: linear-gradient(180deg, transparent, rgba(4,12,28,0.88) 35%);
}
.nx-act.visual b { display: block; margin: 0 0 2px; font-size: 13px; color: #9fe8ff; text-shadow: 0 0 8px rgba(60,200,255,.45); }
.nx-act.visual .nx-act-tag { display: block; font-size: 10px; opacity: 0.8; line-height: 1.25; max-height: 2.6em; overflow: hidden; }
.nx-note.compact { font-size: 11px; opacity: 0.7; margin-top: 6px; }
.nx-note.compact br { display: none; }
.nx-note.compact { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.nx-actions { flex:0 0 auto; display:grid; grid-template-columns:1fr 1fr; gap:8px; padding:8px 14px 12px; margin:0; border-top:1px solid rgba(90,200,255,.2); background:rgba(4,8,18,.92); }
.nx-actions .btn {
  width:100%; margin:0; min-height:44px; box-sizing:border-box; padding:0.55em 0.4em; border-radius:0.7em;
  border:1px solid rgba(159,232,255,.4); background:rgba(12,28,52,.88); color:#e8f7ff; font-weight:800; font-size:0.92em;
  box-shadow: inset 0 0 12px rgba(60,160,255,.08);
}
.nx-actions .btn.btn-primary {
  border-color: rgba(255, 200, 90, .65);
  background: linear-gradient(180deg, #ffd166, #ff9f1c);
  color: #1a1204; text-shadow: none;
  box-shadow: 0 0 12px rgba(255, 180, 60, .35);
}
/* One or two footer actions: single column so Back never floats alone. */
.nx-actions:has(> :only-child),
.nx-actions:has(> :nth-child(2):last-child) { grid-template-columns:1fr; }
.nx-note { margin:10px 0 4px; font-size:11px; opacity:.75; line-height:1.4; }
.nx-stages { display:flex; flex-direction:column; gap:8px; margin:8px 0; }
.nx-stage { text-align:left; padding:10px 12px; border-radius:12px; border:1px solid rgba(159,232,255,.3); background:rgba(8,24,40,.65); color:#e8f7ff; }
.nx-stage.locked { opacity:.4; }
.nx-stage.cleared { border-color:rgba(120,220,160,.5); }
.nx-intro-preview p { font-size:12px; margin:4px 0; opacity:.9; }
.ice-tier.picked { outline:2px solid #9fe8ff; }
.nx-log-list, .nx-quests-list { display:flex; flex-direction:column; gap:8px; margin:6px 0 8px; max-height:none; overflow:visible; }
.nx-log-item, .nx-quest { padding:8px 10px; border-radius:10px; background:rgba(8,24,40,.6); border:1px solid rgba(159,232,255,.22); }
.nx-log-item.off { opacity:.35; }
.nx-log-brief { padding:10px; margin-bottom:8px; border-radius:12px; background:rgba(40,20,60,.55); border:1px solid rgba(200,160,255,.35); }
.nx-quest { display:flex; justify-content:space-between; align-items:center; gap:8px; }
.nx-quest span { opacity:.8; font-size:12px; margin-left:8px; }
.nx-act-card-inner { max-width:20em; margin:20vh auto; padding:18px 16px; border-radius:16px; background:rgba(6,18,32,.92); border:1px solid rgba(159,232,255,.4); text-align:center; }
.nx-act-card-inner b { display:block; font-size:1.15em; margin-bottom:8px; }
.nx-dialog .ice-hint-card { max-width:22em; }
/* wolf / sentry tint hints on ice layer badges */
.nx-enemy-wolf { color:#b8e7ff; }
.nx-enemy-sentry { color:#c9b8ff; }


/* ---- Campaign chapter MAPS · HUD style (matches home panels: navy, neon cyan/orange, glow) ---- */
.overlay.campaign-book { position:absolute; inset:0; z-index:80; width:auto; height:auto; max-width:none; max-height:none; margin:0; border-radius:0;
  display:flex; flex-direction:column; padding:10px 10px 14px; overflow:hidden; font-family:var(--font);
  background:radial-gradient(circle at 50% -10%,#101c3a 0%,#060914 60%,#03050b 100%); }
.campaign-book .camp-head .title { text-align:center; font-size:22px; font-weight:900; font-style:italic; letter-spacing:2px;
  background:linear-gradient(#66c4d0,#2288cc); -webkit-background-clip:text; background-clip:text; color:transparent; filter:drop-shadow(0 0 5px rgba(48,160,210,.45)); }
.camp-book-viewport { flex:1; min-height:0; display:flex; align-items:stretch; gap:4px; margin:8px 0; }
.camp-spread { flex:1; position:relative; perspective:1400px; min-height:60vh; }
.camp-page { position:absolute; inset:0; display:flex; flex-direction:column; overflow:hidden; border-radius:14px;
  background:rgba(8,13,28,.94); border:1.5px solid rgba(70,160,210,.34);
  box-shadow:0 0 0 1px rgba(0,0,0,.65), 0 0 14px rgba(32,130,200,.18), inset 0 0 20px rgba(32,110,200,.09);
  transform-origin:left center; transition:transform .5s cubic-bezier(.3,.7,.2,1), opacity .35s; backface-visibility:hidden; }
.camp-page::before, .camp-page::after { content:''; position:absolute; width:18px; height:18px; z-index:6; border:2px solid #3fb0cc; }
.camp-page::before { top:4px; left:4px; border-right:0; border-bottom:0; }
.camp-page::after { bottom:4px; right:4px; border-left:0; border-top:0; }
.camp-page.back { transform:rotateY(-90deg); opacity:0; pointer-events:none; }
.camp-spread.flip-0 .camp-ch2.back, .camp-spread.flip-0 .camp-ch3.back { transform:rotateY(90deg); transform-origin:right center; }
.camp-spread.flip-1 .camp-ch3.back { transform:rotateY(90deg); transform-origin:right center; }
.camp-page.front { transform:none; opacity:1; }
.camp-ch2 { border-color:rgba(96,176,210,.48); }
.camp-cover { display:flex; align-items:center; gap:10px; padding:10px 14px; color:#e6f6ff;
  background:linear-gradient(90deg,rgba(24,48,96,.48),rgba(8,16,32,.2)); border-bottom:1px solid rgba(70,160,210,.28); }
.camp-cover.ice { background:linear-gradient(90deg,rgba(32,88,136,.48),rgba(8,20,36,.2)); }
.camp-cover h2 { margin:0; font-size:17px; font-weight:900; letter-spacing:.5px; } .camp-cover p { margin:2px 0 0; font-size:11px; color:#8fb4d8; }
.camp-ttl { flex:1; min-width:0; }
.camp-badge { width:34px; height:34px; display:grid; place-items:center; font-weight:900; color:#0a1424;
  clip-path:polygon(25% 3%,75% 3%,100% 50%,75% 97%,25% 97%,0 50%); background:linear-gradient(#ffd166,#ff8a1f); }
.camp-cover.ice .camp-badge { background:linear-gradient(#9ad0d8,#2ea0cc); }
.camp-prog { font-weight:900; font-size:15px; padding:4px 10px; border-radius:8px; color:#66c4d0; border:1px solid rgba(70,160,210,.34); background:rgba(0,10,30,.5); }
.cm-scroll { flex:1; overflow-y:auto; overflow-x:hidden; -webkit-overflow-scrolling:touch; }
.cm-board { position:relative; width:100%; aspect-ratio:360/1000; overflow:hidden;
  background-color:#050914;
  background-image:linear-gradient(rgba(55,120,210,.05) 1px,transparent 1px),linear-gradient(90deg,rgba(55,120,210,.05) 1px,transparent 1px),
    radial-gradient(circle at 30% 70%,rgba(48,72,130,.14),transparent 60%);
  background-size:24px 24px,24px 24px,100% 100%; }
.cm-board.ice { background-color:#050d18;
  background-image:linear-gradient(rgba(88,176,210,.065) 1px,transparent 1px),linear-gradient(90deg,rgba(88,176,210,.065) 1px,transparent 1px),
    radial-gradient(circle at 40% 85%,rgba(64,152,210,.16),transparent 55%),radial-gradient(circle at 60% 10%,rgba(96,72,210,.14),transparent 50%); }
.cm-region { position:absolute; left:0; right:0; border-top:1px dashed rgba(70,160,210,.16); pointer-events:none; }
.cm-region span { position:absolute; right:10px; top:6px; font-size:10px; letter-spacing:3px; color:rgba(100,194,210,.42); font-weight:700; }
.cm-route { position:absolute; inset:0; width:100%; height:100%; }
.cm-path-base { fill:none; stroke:rgba(70,136,210,.22); stroke-width:3; stroke-dasharray:6 8; }
.cm-path-lit { fill:none; stroke:#d9943a; stroke-width:4; stroke-linecap:round; filter:drop-shadow(0 0 4px #cc7c22) drop-shadow(0 0 8px rgba(210,110,32,.42)); }
.cm-board.ice .cm-path-lit { stroke:#4bb8cc; filter:drop-shadow(0 0 4px #2ea8cc) drop-shadow(0 0 8px rgba(48,160,210,.42)); }
.cm-path-pulse { fill:none; stroke:#fff; stroke-width:2.5; stroke-linecap:round; stroke-dasharray:14 120; opacity:.85; }
@keyframes cmFlow { to { stroke-dashoffset:-134; } }
.cm-fog { position:absolute; left:0; right:0; top:0; pointer-events:none;
  background:repeating-linear-gradient(0deg,rgba(80,140,220,.06) 0 1px,transparent 1px 3px),linear-gradient(to bottom,rgba(4,6,13,.78) 75%,rgba(4,6,13,0)); }
.cm-node { position:absolute; transform:translate(-50%,-50%); border:0; background:none; padding:0; color:#e6f6ff; display:flex; flex-direction:column; align-items:center; cursor:pointer; z-index:2; font-family:var(--font); }
.cm-hex { --c:#3fb0cc; position:relative; width:42px; height:46px; display:grid; place-items:center;
  clip-path:polygon(50% 0,100% 25%,100% 75%,50% 100%,0 75%,0 25%); background:var(--c); filter:drop-shadow(0 0 4px var(--c)); }
.cm-hex-in { width:calc(100% - 5px); height:calc(100% - 5px); display:grid; place-items:center;
  clip-path:polygon(50% 0,100% 25%,100% 75%,50% 100%,0 75%,0 25%); background:#081028; }
.cm-hex-in b { font-size:16px; font-weight:900; color:#9ad0d8; }
.cm-node.s-done .cm-hex-in { background:radial-gradient(circle,#175880,#092448); }
.cm-node.s-done .cm-hex-in b { color:#fff; text-shadow:0 0 4px #58bbc8; }
.cm-board.main .cm-node.s-done .cm-hex { --c:#d9943a; }
.cm-board.main .cm-node.s-done .cm-hex-in { background:radial-gradient(circle,#703c0d,#2e1805); }
.cm-node.s-cur .cm-hex::after { content:''; }
.cm-node.s-cur::before { content:''; position:absolute; top:-6px; left:50%; width:58px; height:58px; margin-left:-29px; border-radius:50%;
  border:2px solid #66c4d0; box-shadow:0 0 7px #3fb0cc; }
@keyframes cmRing { 0% { transform:scale(.75); opacity:1; } 100% { transform:scale(1.35); opacity:0; } }
.cm-node.s-lock { opacity:.45; filter:saturate(.2); cursor:default; }
.cm-node.s-lock .cm-hex { --c:#2b4466; filter:none; }
.cm-cap { margin-top:4px; font-size:10px; line-height:1.25; text-align:center; max-width:120px; white-space:nowrap; color:#bcd6f0; text-shadow:0 0 3px #000,0 1px 2px #000; }
.cm-cap i { display:block; font-style:normal; font-size:9px; letter-spacing:1.5px; font-weight:800; }
.cm-flag { position:absolute; top:-3px; right:-7px; width:15px; height:15px; display:grid; place-items:center; font-size:10px; font-weight:900;
  color:#04121f; background:#5fffb0; clip-path:polygon(50% 0,100% 25%,100% 75%,50% 100%,0 75%,0 25%); }
.cm-portrait { width:100%; height:100%; display:block; }
/* mini-boss: amber hex + warning chevrons */
.cm-node.k-mini .cm-hex { --c:#d9941a; width:60px; height:66px; }
.cm-node.k-mini .cm-hex-in { background:repeating-linear-gradient(135deg,#1a1206 0 6px,#241708 6px 12px); }
.cm-node.k-mini .cm-cap i { color:#d9a340; }
.cm-chev { position:absolute; top:22px; left:-22px; right:-22px; display:flex; justify-content:space-between; color:#d9941a; font-weight:900; font-size:14px; letter-spacing:-2px; text-shadow:0 0 4px #cc7c00; pointer-events:none; }
.cm-chev::before { content:'‹‹‹'; }
/* boss: red/gold HUD target */
.cm-node.k-boss .cm-hex { --c:#d94040; width:72px; height:80px; }
.cm-node.k-boss .cm-hex-in { background:radial-gradient(circle,#3a0a10,#12030a); }
.cm-node.k-boss .cm-cap i { color:#d9665a; }
.cm-target { position:absolute; top:-8px; left:50%; width:96px; height:96px; margin-left:-48px; pointer-events:none;
  background:
    linear-gradient(#ffd166,#ffd166) top left/16px 2px no-repeat, linear-gradient(#ffd166,#ffd166) top left/2px 16px no-repeat,
    linear-gradient(#ffd166,#ffd166) top right/16px 2px no-repeat, linear-gradient(#ffd166,#ffd166) top right/2px 16px no-repeat,
    linear-gradient(#ffd166,#ffd166) bottom left/16px 2px no-repeat, linear-gradient(#ffd166,#ffd166) bottom left/2px 16px no-repeat,
    linear-gradient(#ffd166,#ffd166) bottom right/16px 2px no-repeat, linear-gradient(#ffd166,#ffd166) bottom right/2px 16px no-repeat;
  filter:drop-shadow(0 0 3px #d9941a); }
/* final boss: largest, rotating reticle */
.cm-node.k-final .cm-hex { --c:#d92b48; width:92px; height:102px; filter:drop-shadow(0 0 10px #d92b48); }
.cm-board.ice .cm-node.k-final .cm-hex { --c:#58bbc8; filter:drop-shadow(0 0 11px #2ea8cc); }
.cm-node.k-final .cm-hex-in { background:radial-gradient(circle,#162a55,#050918); }
.cm-reticle { position:absolute; top:-18px; left:50%; width:138px; height:138px; margin-left:-69px; border-radius:50%; pointer-events:none;
  border:2px dashed rgba(210,72,90,.72); box-shadow:0 0 9px rgba(210,48,72,.4), inset 0 0 9px rgba(210,48,72,.28); }
.cm-reticle::before { content:''; position:absolute; inset:12px; border-radius:50%; border:2px solid transparent; border-top-color:#ffd166; border-bottom-color:#ffd166; }
.cm-board.ice .cm-reticle { border-color:rgba(96,184,210,.68); box-shadow:0 0 9px rgba(64,160,210,.42), inset 0 0 9px rgba(64,160,210,.26); }
@keyframes cmSpin { to { transform:rotate(360deg); } }
.cm-node.k-final .cm-cap { margin-top:22px; font-size:12px; font-weight:800; color:#fff; }
.cm-node.k-final .cm-cap i { color:#d95c70; }
.cm-board.ice .cm-node.k-final .cm-cap i { color:#66c4d0; }
.camp-nav { width:26px; border-radius:10px; border:1px solid rgba(70,160,210,.28); background:rgba(6,16,32,.72); color:#66c4d0; font-size:24px; }
.camp-nav:disabled { opacity:.25; }
.camp-dots { display:flex; justify-content:center; gap:8px; }
.camp-dots span { width:14px; height:4px; border-radius:2px; background:rgba(100,194,210,.2); }
.camp-dots span.on { background:#66c4d0; box-shadow:0 0 4px #3fb0cc; }
.camp-lock { position:absolute; left:10%; right:10%; top:45%; padding:12px; text-align:center; background:rgba(4,8,18,.88); border:1px solid rgba(70,160,210,.32); border-radius:10px; color:#cfe; z-index:5; }
.camp-ch2-actions { display:flex; gap:6px; padding:6px 8px 8px; border-top:1px solid rgba(70,160,210,.2); }
.camp-ch2-actions .btn { flex:1; margin:0; font-size:13px; padding:8px 4px; }
.campaign-book .camp-back { margin-top:6px; align-self:center; }
.nx-epilogue { border-color:#ffd76a !important; }

/* Night Expedition pages mount inside #ui phone frame: column shell, body scrolls, footer pinned. */
.overlay.nx-page, .overlay.nx-act-card { position:absolute; inset:0; z-index:70; display:flex; flex-direction:column; align-items:stretch; gap:0;
  padding:0; overflow:hidden; box-sizing:border-box; font-family:var(--font); color:#e6f6ff;
  background:radial-gradient(circle at 50% -10%,#101c3a 0%,#060914 60%,#03050b 100%); }
.overlay.nx-page > .title { text-align:center; font-size:18px; font-weight:900; color:#7ff3ff; text-shadow:0 0 8px rgba(60,200,255,.6); padding:10px 14px 0; flex:0 0 auto; }
.nx-quest, .nx-log-item, .nx-log-brief, .nx-act, .nx-stage { border:1px solid rgba(90,200,255,.35); border-radius:12px; background:rgba(10,20,44,.75); padding:10px 12px; }
.nx-quest { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:6px; }
.nx-quest b { display:block; } .nx-quest span { font-size:12px; color:#ffd166; }
.nx-quest .btn { margin:0; padding:6px 14px; font-size:14px; width:auto; }
.nx-log-item { margin-bottom:6px; } .nx-log-item.off { opacity:.45; } .nx-log-item p, .nx-log-brief p { margin:4px 0 0; font-size:12px; line-height:1.5; color:#bcd6f0; }
.nx-log-brief { border-color:rgba(255,180,70,.6); }
.overlay.nx-act-card { justify-content:center; align-items:center; background:rgba(2,6,16,.88); }
.nx-act-card-inner { max-width:320px; text-align:center; padding:22px 18px; border:1.5px solid #4fd8ff; border-radius:14px; background:rgba(10,20,44,.92); box-shadow:0 0 20px rgba(40,170,255,.35); }
.nx-act-card-inner b { display:block; font-size:20px; color:#7ff3ff; margin-bottom:10px; } .nx-act-card-inner p { line-height:1.6; }
.nx-dialog .ice-hint-card { max-width:330px; padding:16px; border:1.5px solid #4fd8ff; border-radius:14px; background:rgba(8,16,36,.95); box-shadow:0 0 18px rgba(40,170,255,.35); }
.nx-dialog .ice-hint-line { line-height:1.6; margin-bottom:12px; }
.nx-page .btn { flex:0 0 auto; }


/* V1.1 single-stage challenge sheet (campaign node already picked): no stage list; detail fills the room. */
.challenge.c11 .stage-scroll { display: none !important; }
.challenge.c11 .stage-info.brief11 {
  flex: 1 1 auto; min-height: 0; max-width: none; width: 100%; overflow-y: auto; overflow-x: hidden;
  -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  gap: 0.4em; padding: 0.55em 0.75em 0.65em;
}
.challenge.c11 .brief11 .si-intro {
  margin: 0.1em 0 0.15em; padding: 0.45em 0.55em; border-radius: 0.55em;
  background: rgba(155, 231, 255, 0.06); border: 1px solid rgba(155, 231, 255, 0.18);
  font-size: 0.78em; font-weight: 700; line-height: 1.45; color: #cfe6ff;
}
.challenge.c11 .brief11 .si-intro .si-intro-h { display:block; color:#9be7ff; font-size:0.92em; letter-spacing:0.04em; margin-bottom:0.2em; }
.challenge.c11 .brief11 .bf-foe { min-width: 3.4em; padding: 0.2em 0.25em 0.3em; }
.challenge.c11 .brief11 .bf-foe canvas { width: 2.55em; height: 2.55em; }
.challenge.c11 .brief11 .bf-foe.boss canvas { width: 3.2em; height: 3.2em; }
.challenge.c11 .brief11 .bf-foe .bf-name {
  display: block; max-width: 5.8em; margin-top: 0.15em; font-size: 0.56em; font-weight: 800; line-height: 1.15;
  text-align: center; color: #dce9ff; white-space: normal; overflow: visible; text-overflow: unset;
}
.challenge.c11 .brief11 .bf-foe.boss .bf-name { max-width: 6.4em; color: #ffc9c9; }
.challenge.c11 .brief11 .bf-foe.unknown .bf-name { color: var(--muted); }
.challenge.c11 .brief11 .si-head { flex-wrap: wrap; white-space: normal; gap: 0.25em 0.4em; }
.challenge.c11 .brief11 .si-focus11 { flex: 1 1 100%; overflow: visible; text-overflow: unset; white-space: normal; font-size: 0.78em; color: #b8d4f0; }



/* Stage detail: in-game map with enemies ON the field at the TOP (owner: 地图放到最上面, 怪站在地图上) */
.challenge.c11 {
  display: flex; flex-direction: column; align-items: stretch;
}
.challenge.c11 .stage-info.brief11 {
  flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column;
  max-height: none; gap: 0.28em;
}
.challenge.c11 .brief11 .bf-row,
.challenge.c11 .brief11 .bf-ranks,
.challenge.c11 .brief11 .si-intro,
.challenge.c11 .brief11 .si-head { flex: 0 0 auto; }
.challenge.c11 .brief11 .si-visual {
  position: relative; flex: 0 0 auto; order: -1;
  width: 100%; height: auto; min-height: 0; margin: 0 0 0.15em;
  aspect-ratio: 27 / 16; /* world width : refHeight/3 -- matches canvas, no stretch */
  border-radius: 0.7em; overflow: hidden;
  border: 1px solid rgba(155, 231, 255, 0.28);
  background: rgba(6, 12, 28, 0.85);
  box-shadow: inset 0 0 28px rgba(80, 200, 255, 0.1), 0 0 12px rgba(40, 120, 200, 0.15);
}
.challenge.c11 .brief11 .si-map {
  position: absolute; inset: 0; width: 100%; height: 100%;
  display: block; pointer-events: none;
}

/* 远征篇章 page 3: 雷铸废港·磁暴远征 teaser (home chip removed) */
.camp-spread.flip-2 .camp-ch1.back { transform: rotateY(-90deg); }
.camp-spread.flip-2 .camp-ch2.back { transform: rotateY(-90deg); transform-origin: left center; }
.camp-spread.flip-2 .camp-ch3.front { transform: none; opacity: 1; }
.camp-page.camp-ch3 { border-color: rgba(140, 100, 255, .48); }
.camp-page.camp-ch3.back { transform: rotateY(90deg); transform-origin: right center; opacity: 0; pointer-events: none; }
.camp-cover.mag { background: linear-gradient(90deg, rgba(70,40,140,.55), rgba(12,10,28,.25)); }
.camp-cover.mag .camp-badge { background: linear-gradient(#c9a6ff, #7a5cff); }
/* t139: 磁暴远征 page 3 is the Ch1/Ch2 chapter map (violet board); only stage 1 is open, later nodes say 敬请期待. */
.cm-board.mag { background-color:#0a0716;
  background-image:linear-gradient(rgba(150,110,255,.06) 1px,transparent 1px),linear-gradient(90deg,rgba(150,110,255,.06) 1px,transparent 1px),
    radial-gradient(circle at 35% 85%,rgba(120,80,230,.18),transparent 55%),radial-gradient(circle at 65% 15%,rgba(60,200,230,.10),transparent 50%); }
.cm-board.mag .cm-region { border-top-color:rgba(150,110,255,.18); }
.cm-board.mag .cm-region span { color:rgba(190,160,255,.45); }
.cm-board.mag .cm-path-base { stroke:rgba(150,110,255,.24); }
.cm-board.mag .cm-path-lit { stroke:#a98bff; filter:drop-shadow(0 0 4px #7a5cff) drop-shadow(0 0 8px rgba(120,90,255,.42)); }
.cm-board.mag .cm-node.s-cur .cm-hex, .cm-board.mag .cm-node.s-done .cm-hex { --c:#a98bff; }
.cm-board.mag .cm-node.soon { cursor:pointer; }
.cm-board.mag .cm-node.soon .cm-hex-in b { color:#9d8fc0; }
.camp-cover.mag .camp-prog { color:#c9b8ff; border-color:rgba(150,110,255,.38); }
/* t139: 磁暴远征 stage 1 detail (Chapter 1 layout) */
.screen.mag-detail { z-index: 30; background: radial-gradient(ellipse at 50% 40%, #1a1030, #05040e 92%); }
/* t140: the long ice 出击（消耗 1 把寒晶钥匙） stays on one line beside the co-op chip. */
.nx-detail .ch-play-row .nx-go { white-space: nowrap; font-size: 0.86em; padding-left: 0.5em; padding-right: 0.5em; }

/* 雷铸废港·磁暴远征 (LOCAL testserver) */
.mag-entry { border-color: #7a5cff; color: #d6c7ff; background: linear-gradient(180deg, rgba(70,40,140,0.55), rgba(20,16,40,0.7)); box-shadow: 0 0 12px rgba(122,92,255,0.45); }

.v-up, b.v-up, dd b.v-up { color: var(--green); }
.v-down, b.v-down, dd b.v-down { color: var(--red); }
.v-same, b.v-same, dd b.v-same { color: var(--muted); }


/* T130 (owner pt130u): one non-expanding remaining-clears line, styled as the old 查看详情 label. */
.diff-left .diff-remain { display: inline; color: #8fd3ff; font-weight: 800; font-size: 0.92em; }

/* T130 (owner pt130u): a narrower, centred event bar clear of both home rails (balanced left/right), no "!" on it. */
.menu.home11 .ice-entry { width: min(12.6em, calc(100% - 10.4em)); padding: 0 8px; gap: 5px; }
.menu.home11 .ice-entry-name { font-size: 13px; letter-spacing: 0.5px; white-space: nowrap; overflow: hidden; text-overflow: clip; }
.menu.home11 .ice-entry-keys { font-size: 11px; }

/* T130 E: missions sheet = 主线任务 + 每日任务, one screen, X close top-right. */
.dm-t130 .sheet-box { position: relative; max-height: calc(100% - 1.2em); overflow: hidden; gap: 0.45em; padding-top: 0.9em; }
.dm-t130 .dm-x { position: absolute; top: 0.35em; right: 0.45em; width: 2em; height: 2em; border-radius: 50%; border: 1px solid rgba(255,255,255,0.25);
  background: rgba(10,20,40,0.7); color: #e8f4ff; font-size: 1em; font-weight: 900; line-height: 1; cursor: pointer; }
.dm-t130 .title { margin: 0; }
.dm-t130 .dm-sub { align-self: flex-start; font-weight: 900; font-size: 0.9em; color: #bfe9ff; }
.mq-sec { width: 100%; box-sizing: border-box; display: flex; flex-direction: column; gap: 0.3em; padding: 0.5em 0.7em; border-radius: 0.7em;
  background: rgba(120,90,255,0.12); border: 1px solid rgba(170,150,255,0.35); }
.mq-head { display: flex; align-items: center; gap: 0.4em; font-size: 0.95em; }
.mq-sum { margin-left: auto; font-size: 0.75em; font-weight: 800; color: var(--muted); }
.mq-row { grid-template-columns: 1fr auto auto; align-items: center; }
.mq-rew { font-weight: 900; color: #ffe7a8; font-size: 0.85em; }
.mq-lock { font-style: normal; font-size: 0.78em; color: var(--muted); }
.mq-row.st-locked { opacity: 0.75; }
.dm-t130 .ea-intro, .dm-t130 .ea-lapse { font-size: 0.66em; }
.dm-t130 .dm-list { gap: 0.25em; }
.dm-t130 .dm-row { padding: 0.3em 0.5em; }

/* T130 H: bag tiles at the 补给 size, 4 per row (+N badge and the limited glow unchanged). */
.bag-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.42em; }
.bag-tile { border-radius: 0.85em; padding: 0.3em 0.2em 0.25em; }
.bag-tile .bt-art { width: 58%; }
.bag-tile .bt-name { font-size: 0.52em; }
.bag-tile .bt-plus { font-size: 0.6em; right: 0.22em; top: 0.22em; padding: 0.12em 0.26em; }
.bag-tile .bt-n { font-size: 0.6em; right: 0.25em; bottom: 1.3em; }
.bag-tile .bt-eq { font-size: 0.5em; left: 0.25em; top: 0.25em; }

/* T130 G: first-time mechanic intro (ice-hint dialog). */
.mech-intro .mech-box { max-width: 21em; }
/* t175: the field lights the mechanic (src/render.ts drawSpot): no dim of its own, and the box keeps clear of the lit area. */
.mech-intro.mech-spot { background: transparent; }
.mech-intro.pos-top { align-items: flex-start; padding-top: max(9vh, 56px); }
.mech-intro.pos-bottom { align-items: flex-end; padding-bottom: max(8vh, 48px); }
.mech-icon { font-style: normal; font-size: 1.15em; }
.mech-lines { margin: 0.4em 0 0.7em; padding-left: 1.1em; text-align: left; font-size: 0.86em; line-height: 1.45; color: #e8f4ff; }
.mech-lines li + li { margin-top: 0.25em; }
.mech-intro .ice-hint-head b { color: #ffb35c; }
/* t235: the Endless wave-51 pair (暖炉, 寒潮) a quarter larger: box, picture (sized inline) and text; both cards the same size. */
.mech-intro.mech-big .mech-box { width: min(calc(340px * var(--mech-scale, 1.25)), 94vw); max-width: none; padding: 20px 20px 17px; }
.mech-intro.mech-big .ice-hint-head b { font-size: calc(17px * var(--mech-scale, 1.25)); }
.mech-intro.mech-big .mech-lines { font-size: calc(0.86em * var(--mech-scale, 1.25)); }
.mech-intro.mech-big .mech-ok { font-size: calc(1.12em * var(--mech-scale, 1.25)); }

/* T130 B: the home never scrolls (ZH / EN); no version label; PLAY / Endless sit a little lower, clear of the bottom edge. */
.menu.home11 { overflow: hidden; }
.menu.home11 .home-dock { position: relative; min-height: 0; margin-top: auto; padding: 0.2em 0 max(0.9em, env(safe-area-inset-bottom)); gap: 0.3em; }
html.short-frame .menu.home11 .home-dock { min-height: 0; padding-bottom: 0.7em; }
html:not([lang="zh-CN"]).short-frame .menu.home11 .home-dock { min-height: 0; }

/* T130 D: the Chapter 2 stage detail covers the home (it is mounted beside it, not instead of it). */
.screen.nx-detail { z-index: 30; background: radial-gradient(ellipse at 50% 40%, #0b1430, #03050d 92%); }

/* T131 A: the missions sheet scrolls on its own (title and X stay put; the page behind never moves). */
.dm-t130 .sheet-box { display: flex; flex-direction: column; max-height: calc(100% - 1.2em); overflow: hidden; }
.dm-t130 .dm-scroll { flex: 1 1 auto; min-height: 0; width: 100%; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; touch-action: pan-y;
  -webkit-overflow-scrolling: touch; display: flex; flex-direction: column; gap: 0.45em; padding: 0 0.1em 0.4em; box-sizing: border-box; }
.dm-t130 .dm-scroll > * { flex: none; }

/* t192: bag tiles are rounded squares like the 恒星军备匣 icons (replaces the t131 B name wrap, whose aspect-ratio: auto
   flattened tiles into wide rectangles). Gear tiles show no name (names live on the equipped slots and the piece detail);
   material tiles keep one ellipsised line inside the square. A name can never change the tile's shape. */
.bag-grid { grid-auto-rows: max-content; } /* auto rows let the fixed-height grid squeeze tiles to ~20 px tall */
.bag-tile { aspect-ratio: 1; min-width: 0; justify-content: center; padding: 0.3em 0.2em; overflow: hidden; }
.bag-tile:not(.mat) .bt-name { display: none; }
.bag-tile:not(.mat) .bt-art { width: 66%; }
.bag-tile.mat .bt-art { width: 52%; }
.bag-tile.mat .bt-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.bag-tile.mat .bt-n { top: 0.25em; bottom: auto; } /* the count sits where gear shows +N, clear of the name */
/* t201: Legendary series on bag tiles. Each series has a top-left mark (恒星裁决 gold star, 虚空回响 void ring/eye, 永夜极光 ice
   crescent; colour + shape, no words) and its own shimmer: 恒星 warm gold, 虚空 void amber with deep violet, 永夜 keeps art-ice
   + sp-frost. "装" moves just under the mark; "+N" stays top-right. Marks never change the square (absolute, inside the tile). */
.bt-mark { position: absolute; left: 0.18em; top: 0.18em; z-index: 4; width: 1.15em; height: 1.15em; padding: 0.1em; box-sizing: border-box;
  display: flex; align-items: center; justify-content: center; border-radius: 50%; font-style: normal; pointer-events: none;
  background: rgba(8, 10, 24, 0.82); border: 1px solid var(--mk, #ffb547); box-shadow: 0 0 0.35em color-mix(in srgb, var(--mk, #ffb547) 70%, transparent); }
.bt-mark svg { display: block; width: 100%; height: 100%; }
.bt-mark.mk-stellar { --mk: #ffd166; }
.bt-mark.mk-voidecho { --mk: #e0ac4c; border-radius: 0.3em; background: rgba(20, 14, 8, 0.86); }
.bt-mark.mk-polarnight { --mk: #8fe3ff; }
.bag-tile.has-mark .bt-eq { top: 2.75em; left: 0.36em; z-index: 4; }
.bag-tile.has-mark .bt-plus { z-index: 4; }

.bag-tile.art-stellar, .bag-tile.art-voidecho, .gear-slot.art-stellar, .gear-slot.art-voidecho { position: relative; isolation: isolate; overflow: hidden; }
.bag-tile.art-stellar, .gear-slot.art-stellar {
  border-color: #ffd166;
  background: radial-gradient(circle at 50% 36%, rgba(255, 209, 102, 0.42), rgba(255, 140, 40, 0.14) 52%, rgba(26, 16, 4, 0.95) 80%), #1a1206;
  box-shadow: inset 0 0 0.8em rgba(255, 209, 102, 0.5), 0 0 0 1px rgba(255, 243, 196, 0.7), 0 0 0.7em rgba(255, 181, 71, 0.75);
  animation: t201StellarGlow 2.4s ease-in-out 120 alternate;
}
.bag-tile.art-voidecho, .gear-slot.art-voidecho {
  border-color: #d9a441;
  background: radial-gradient(circle at 50% 36%, rgba(217, 164, 65, 0.3), rgba(120, 72, 22, 0.24) 50%, rgba(14, 9, 4, 0.96) 80%), #140e08;
  box-shadow: inset 0 0 0.8em rgba(0, 0, 0, 0.6), inset 0 0 0.3em rgba(217, 164, 65, 0.45), 0 0 0 1px rgba(243, 208, 138, 0.7), 0 0 0.7em rgba(217, 164, 65, 0.6), 0 0 1.2em rgba(150, 92, 24, 0.45);
  animation: t201VoidGlow 2.8s ease-in-out 100 alternate;
}
.bag-tile.art-stellar .bt-art, .bag-tile.art-voidecho .bt-art { position: relative; z-index: 1; }
.bag-tile.art-stellar .bt-art { filter: drop-shadow(0 0 3px rgba(255, 209, 102, 0.9)); }
.bag-tile.art-voidecho .bt-art { filter: drop-shadow(0 0 3px rgba(224, 172, 76, 0.85)); }
.bag-tile.art-stellar::after, .bag-tile.art-voidecho::after, .gear-slot.art-stellar::after, .gear-slot.art-voidecho::after {
  content: ''; position: absolute; inset: -40%; z-index: 2; pointer-events: none; transform: translateX(-60%);
  animation: spIceSweep 3.4s ease-in-out 90;
}
.bag-tile.art-stellar::after, .gear-slot.art-stellar::after { background: linear-gradient(115deg, transparent 38%, rgba(255, 250, 225, 0.6) 47%, rgba(255, 209, 102, 0.4) 53%, transparent 62%); }
.bag-tile.art-voidecho::after, .gear-slot.art-voidecho::after { background: linear-gradient(115deg, transparent 38%, rgba(255, 228, 170, 0.45) 46%, rgba(217, 164, 65, 0.32) 53%, transparent 62%); animation-duration: 3.9s; }
.sp-stellar, .sp-void { position: absolute; inset: 0; z-index: 3; pointer-events: none; animation: spTwinkle 1.6s ease-in-out 120 alternate; }
.sp-stellar { background-image: radial-gradient(2.2px 2.2px at 84% 30%, #fff8e0 50%, transparent 55%), radial-gradient(1.6px 1.6px at 14% 70%, #ffe28a 50%, transparent 55%), radial-gradient(1.8px 1.8px at 76% 88%, #fff 50%, transparent 55%), radial-gradient(1.4px 1.4px at 40% 12%, #ffd166 50%, transparent 55%); }
.sp-void { background-image: radial-gradient(2.2px 2.2px at 82% 34%, #ffe6a6 50%, transparent 55%), radial-gradient(1.6px 1.6px at 16% 74%, #ffd88a 50%, transparent 55%), radial-gradient(1.8px 1.8px at 72% 86%, #d9a441 50%, transparent 55%), radial-gradient(1.4px 1.4px at 46% 10%, #f3d08a 50%, transparent 55%);
  animation-duration: 2.1s; }
@keyframes t201StellarGlow {
  0% { box-shadow: inset 0 0 0.6em rgba(255, 209, 102, 0.35), 0 0 0 1px rgba(255, 243, 196, 0.55), 0 0 0.45em rgba(255, 181, 71, 0.5); border-color: #f0a91c; }
  100% { box-shadow: inset 0 0 1em rgba(255, 236, 170, 0.65), 0 0 0 1px rgba(255, 243, 196, 1), 0 0 1em rgba(255, 181, 71, 0.95); border-color: #fff1b8; } }
@keyframes t201VoidGlow {
  0% { box-shadow: inset 0 0 0.6em rgba(0, 0, 0, 0.55), inset 0 0 0.25em rgba(217, 164, 65, 0.35), 0 0 0 1px rgba(243, 208, 138, 0.5), 0 0 0.45em rgba(217, 164, 65, 0.45), 0 0 0.9em rgba(150, 92, 24, 0.3); border-color: #b8862f; }
  100% { box-shadow: inset 0 0 1em rgba(224, 172, 76, 0.5), 0 0 0 1px rgba(243, 208, 138, 1), 0 0 0.9em rgba(217, 164, 65, 0.85), 0 0 1.5em rgba(150, 92, 24, 0.7); border-color: #f3d08a; } }
@media (prefers-reduced-motion: reduce) {
  .bag-tile.art-stellar, .bag-tile.art-voidecho, .gear-slot.art-stellar, .gear-slot.art-voidecho, .sp-stellar, .sp-void { animation: none !important; }
  .bag-tile.art-stellar::after, .bag-tile.art-voidecho::after, .gear-slot.art-stellar::after, .gear-slot.art-voidecho::after { display: none; }
}
.reduce-motion .bag-tile.art-stellar, .reduce-motion .bag-tile.art-voidecho, .reduce-motion .gear-slot.art-stellar, .reduce-motion .gear-slot.art-voidecho,
.reduce-motion .sp-stellar, .reduce-motion .sp-void { animation: none !important; }
.reduce-motion .bag-tile.art-stellar::after, .reduce-motion .bag-tile.art-voidecho::after, .reduce-motion .gear-slot.art-stellar::after, .reduce-motion .gear-slot.art-voidecho::after { display: none; }

/* T348 (LOCAL, unreleased): 雷磁天穹 and 菌核裂殖 — each its own mark, glow and sweep (never 永夜's frost): electric blue + violet on
   graphite; toxic green + berry violet on deep ink-green. Finite iterations, off for reduced motion, as the t201 sets. */
.bt-mark.mk-leici { --mk: #f5b82e; background: rgba(29, 28, 33, 0.9); }
.bt-mark.mk-junhe { --mk: #7ecf68; background: rgba(24, 37, 29, 0.9); }
.bag-tile.art-leici, .bag-tile.art-junhe, .gear-slot.art-leici, .gear-slot.art-junhe { position: relative; isolation: isolate; overflow: hidden; }
.bag-tile.art-leici, .gear-slot.art-leici {
  border-color: #f5b82e;
  background: radial-gradient(circle at 50% 36%, rgba(245, 184, 46, 0.34), rgba(139, 92, 246, 0.2) 52%, rgba(29, 28, 33, 0.96) 80%), #1d1c21;
  box-shadow: inset 0 0 0.8em rgba(245, 184, 46, 0.45), 0 0 0 1px rgba(255, 225, 140, 0.7), 0 0 0.7em rgba(139, 92, 246, 0.6);
  animation: t348LeiciGlow 2.2s ease-in-out 120 alternate;
}
.bag-tile.art-junhe, .gear-slot.art-junhe {
  border-color: #7ecf68;
  background: radial-gradient(circle at 50% 36%, rgba(126, 207, 104, 0.32), rgba(180, 93, 166, 0.18) 54%, rgba(24, 37, 29, 0.96) 80%), #18251d;
  box-shadow: inset 0 0 0.8em rgba(126, 207, 104, 0.4), 0 0 0 1px rgba(200, 236, 185, 0.65), 0 0 0.7em rgba(180, 93, 166, 0.5);
  animation: t348JunheGlow 3s ease-in-out 90 alternate;
}
.bag-tile.art-leici .bt-art, .bag-tile.art-junhe .bt-art { position: relative; z-index: 1; }
.bag-tile.art-leici .bt-art { filter: drop-shadow(0 0 3px rgba(245, 184, 46, 0.9)); }
.bag-tile.art-junhe .bt-art { filter: drop-shadow(0 0 3px rgba(126, 207, 104, 0.85)); }
.bag-tile.art-leici::after, .bag-tile.art-junhe::after, .gear-slot.art-leici::after, .gear-slot.art-junhe::after {
  content: ''; position: absolute; inset: -40%; z-index: 2; pointer-events: none; transform: translateX(-60%);
  animation: spIceSweep 3.1s ease-in-out 90;
}
.bag-tile.art-leici::after, .gear-slot.art-leici::after { background: linear-gradient(115deg, transparent 40%, rgba(255, 250, 240, 0.55) 47%, rgba(139, 92, 246, 0.38) 52%, transparent 60%); }
.bag-tile.art-junhe::after, .gear-slot.art-junhe::after { background: linear-gradient(115deg, transparent 38%, rgba(220, 245, 205, 0.42) 46%, rgba(180, 93, 166, 0.3) 53%, transparent 62%); animation-duration: 4.2s; }
.sp-leici, .sp-junhe { position: absolute; inset: 0; z-index: 3; pointer-events: none; animation: spTwinkle 1.3s ease-in-out 140 alternate; }
.sp-leici { background-image: radial-gradient(2px 2px at 82% 30%, #fffaf0 50%, transparent 55%), radial-gradient(1.6px 1.6px at 16% 72%, #a78bfa 50%, transparent 55%), radial-gradient(1.6px 1.6px at 74% 86%, #f5b82e 50%, transparent 55%), radial-gradient(1.2px 1.2px at 42% 12%, #fff 50%, transparent 55%); }
.sp-junhe { background-image: radial-gradient(2.4px 2.4px at 80% 32%, #c8ecb9 50%, transparent 55%), radial-gradient(1.8px 1.8px at 18% 74%, #b45da6 50%, transparent 55%), radial-gradient(1.6px 1.6px at 70% 88%, #7ecf68 50%, transparent 55%), radial-gradient(1.4px 1.4px at 44% 12%, #e9c6e2 50%, transparent 55%);
  animation-duration: 2.4s; }
@keyframes t348LeiciGlow {
  0% { box-shadow: inset 0 0 0.6em rgba(245, 184, 46, 0.3), 0 0 0 1px rgba(255, 225, 140, 0.5), 0 0 0.45em rgba(139, 92, 246, 0.4); border-color: #0ea5e9; }
  100% { box-shadow: inset 0 0 1em rgba(255, 215, 106, 0.6), 0 0 0 1px rgba(255, 250, 240, 1), 0 0 1em rgba(139, 92, 246, 0.85); border-color: #fff1c2; } }
@keyframes t348JunheGlow {
  0% { box-shadow: inset 0 0 0.6em rgba(126, 207, 104, 0.28), 0 0 0 1px rgba(200, 236, 185, 0.45), 0 0 0.45em rgba(180, 93, 166, 0.35); border-color: #4f8a43; }
  100% { box-shadow: inset 0 0 1em rgba(126, 207, 104, 0.55), 0 0 0 1px rgba(200, 236, 185, 0.95), 0 0 0.95em rgba(180, 93, 166, 0.7); border-color: #c8ecb9; } }
@media (prefers-reduced-motion: reduce) {
  .bag-tile.art-leici, .bag-tile.art-junhe, .gear-slot.art-leici, .gear-slot.art-junhe, .sp-leici, .sp-junhe { animation: none !important; }
  .bag-tile.art-leici::after, .bag-tile.art-junhe::after, .gear-slot.art-leici::after, .gear-slot.art-junhe::after { display: none; }
}
.reduce-motion .bag-tile.art-leici, .reduce-motion .bag-tile.art-junhe, .reduce-motion .gear-slot.art-leici, .reduce-motion .gear-slot.art-junhe,
.reduce-motion .sp-leici, .reduce-motion .sp-junhe { animation: none !important; }
.reduce-motion .bag-tile.art-leici::after, .reduce-motion .bag-tile.art-junhe::after, .reduce-motion .gear-slot.art-leici::after, .reduce-motion .gear-slot.art-junhe::after { display: none; }

/* T350 (LOCAL prototype): the chapter 1 / 2 sequel pages (S16–20), their entry under the campaign maps, the local result. */
.camp-seq-entry { position: absolute; right: 0.6em; bottom: 0.6em; z-index: 5; }
.camp-seq-entry .camp-seq { white-space: nowrap; font-size: 0.85em; padding: 0.45em 0.9em; border-color: #ff9f43; color: #ffd8a8; background: rgba(40, 20, 8, 0.85); }
/* T420: a chapter's S16-20 entry stays shut until that chapter's 15 are all cleared (any difficulty) */
.camp-seq-entry.locked .camp-seq { opacity: 0.55; cursor: default; }
.camp-seq-entry .camp-seq-gate { margin-top: 0.25em; max-width: 15em; font-size: 0.66em; line-height: 1.3; text-align: right; color: #ffd8a8; text-shadow: 0 1px 2px #000; }
.screen.seq-screen { z-index: 30; justify-content: flex-start; align-items: stretch; text-align: left; overflow: hidden;
  background: radial-gradient(ellipse at 50% 30%, #1d1430, #05040e 92%); }
.seq-page, .seq-result { display: flex; flex-direction: column; gap: 0.6em; width: 100%; min-height: 0; flex: 1; overflow: hidden; box-sizing: border-box; }
.seq-page .btn, .seq-result .btn { width: auto; min-width: 0; }
.seq-back { align-self: stretch; }
.seq-top h2 { margin: 0; font-size: 1.4em; color: #ffd8a8; }
.seq-ch2 .seq-top h2 { color: #bff4ff; }
.seq-top p { margin: 0.2em 0; color: #b8c2e0; font-size: 0.85em; }
.seq-proto, .seq-tag { display: inline-block; font-size: 0.72em; padding: 0.1em 0.5em; border-radius: 0.6em; background: rgba(255, 159, 67, 0.18); color: #ffb366; border: 1px solid rgba(255, 159, 67, 0.5); }
.seq-list { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 0.7em; padding-bottom: 0.4em; }
.seq-stage { border: 1px solid rgba(255, 159, 67, 0.45); border-radius: 0.8em; padding: 0.7em; background: rgba(20, 14, 30, 0.85); }
.seq-stage.ice { border-color: rgba(159, 232, 255, 0.45); }
.seq-head { display: flex; align-items: center; gap: 0.5em; }
.seq-no { font-size: 1.1em; color: #ffd8a8; }
.seq-stage.ice .seq-no { color: #bff4ff; }
.seq-name { font-weight: 700; flex: 1; }
.seq-kv { display: grid; grid-template-columns: max-content minmax(0, 1fr) max-content minmax(0, 1fr); gap: 0.15em 0.6em; margin: 0.5em 0; font-size: 0.8em; }
.seq-kv dt { color: #8f9bbf; }
.seq-kv dd { margin: 0; }
.seq-mech p, .seq-reward p { margin: 0.2em 0; font-size: 0.8em; color: #d6dcf0; }
.seq-mech b, .seq-reward b { font-size: 0.8em; color: #ffd166; }
.seq-tiers { display: flex; gap: 0.4em; margin-top: 0.5em; }
.seq-tiers .btn { flex: 1; padding: 0.4em 0; }
.seq-result h2 { margin: 0; font-size: 1.6em; }
.seq-result.won h2 { color: #7fffb0; }
.seq-result.lost h2 { color: #ff6b81; }
.seq-result ul { margin: 0; padding-left: 1.2em; }
.seq-settled { font-size: 0.8em; color: #ffb366; }

/* T131 D: one-line story + 查看详情, and its dialog. */
.challenge.c11 .brief11 .si-intro.si-story-one { padding-top: 0.35em; padding-bottom: 0.35em; }
.si-story-row { display: flex; align-items: center; gap: 0.5em; min-width: 0; }
.si-story { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.si-more { flex: none; border: 1px solid rgba(155,231,255,0.45); background: rgba(20,40,70,0.6); color: #9be7ff; border-radius: 0.6em;
  padding: 0.15em 0.55em; font: inherit; font-size: 0.82em; font-weight: 800; cursor: pointer; }
.story-sheet { position: absolute; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; background: rgba(3,5,13,0.72); }
.story-box { position: relative; width: min(21em, calc(100% - 2em)); max-height: 80%; display: flex; flex-direction: column; gap: 0.6em; padding: 1em 1em 0.9em;
  border-radius: 1em; background: linear-gradient(#1c2350, #121733); border: 1px solid rgba(155,231,255,0.3); box-shadow: 0 0.6em 2em rgba(0,0,0,0.6); }
.story-title { font-weight: 900; font-size: 1.05em; color: #ffd36b; padding-right: 2em; }
.story-body { overflow-y: auto; overscroll-behavior: contain; font-size: 0.9em; line-height: 1.55; color: #e8f4ff; }
.story-body p { margin: 0 0 0.5em; }
.story-x { position: absolute; top: 0.5em; right: 0.5em; width: 1.9em; height: 1.9em; border-radius: 50%; border: 1px solid rgba(255,255,255,0.25);
  background: rgba(10,20,40,0.7); color: #e8f4ff; font-weight: 900; cursor: pointer; }
.nx-nodrop { font-size: 0.8em; color: var(--muted); }
.nx-best { margin-left: auto; }

/* T132: set skills explained inline, a looping preview above each explanation. */
.sk-cards { display: grid; gap: 0.5em; margin: 0.5em 0; text-align: left; }
.sk-card { border: 1px solid rgba(143, 211, 255, 0.25); border-radius: 10px; padding: 0.45em; background: rgba(10, 16, 32, 0.55); }
.sk-card.gold { border-color: rgba(255, 211, 107, 0.45); }
.sk-card-k { font-size: 0.78em; color: var(--muted); margin-top: 0.3em; }
.sk-card-desc { font-size: 0.82em; line-height: 1.4; margin-top: 0.2em; }
canvas.sk-preview { display: block; width: 100%; height: 210px; border-radius: 8px; background: #0c1020; }
canvas.sk-preview.big { height: 280px; margin-bottom: 0.5em; }
/* t174: Legendary resonance, pieces (rows) × enhancement tier (columns). */
.lr-desc { text-align: left; margin: 0.4em 0; }
.lr-grid { width: 100%; border-collapse: separate; border-spacing: 3px; margin: 0.4em 0 0.1em; font-size: 0.85em; }
.lr-grid caption { font-size: 0.85em; color: var(--muted); text-align: left; padding-bottom: 0.15em; }
.lr-grid th { font-weight: 600; color: #e4ddc8; padding: 0.15em; }
.lr-cell { display: block; box-sizing: border-box; width: 100%; text-align: center; padding: 0.3em 0.1em; border-radius: 6px; border: 1px solid rgba(143, 211, 255, 0.22); background: rgba(10, 16, 32, 0.6); color: inherit; font: inherit; line-height: 1.2; }
.lr-cell small { display: block; font-size: 0.78em; color: var(--muted); }
.lr-cell.on { border-color: #6cf0b1; box-shadow: inset 0 0 0 1px #6cf0b1; }
.lr-cap { color: #ffd37c; text-align: left; }
.lr-now { color: #9fe6ff; text-align: left; }

/* t149 远征篇章 page IV: sporeTide (LOCAL demo, dev-tools build only since T402) — greenhouse teal-lime board + ultraviolet accents. */
.camp-spread.flip-0 .camp-ch4.back, .camp-spread.flip-1 .camp-ch4.back, .camp-spread.flip-2 .camp-ch4.back { transform:rotateY(90deg); transform-origin:right center; }
.camp-spread.flip-3 .camp-ch1.back, .camp-spread.flip-3 .camp-ch2.back { transform:rotateY(-90deg); transform-origin:left center; }
.camp-spread.flip-3 .camp-ch3.back { transform:rotateY(-90deg); transform-origin:left center; opacity:0; pointer-events:none; }
.camp-spread.flip-3 .camp-ch4.front { transform:none; opacity:1; }
.camp-page.camp-ch4 { border-color: rgba(140, 230, 120, .45); }
.camp-page.camp-ch4.back { opacity:0; pointer-events:none; }
.camp-cover.spore { background: linear-gradient(90deg, rgba(40,120,80,.55), rgba(10,24,18,.25)); }
.camp-cover.spore .camp-badge { background: linear-gradient(#d6ff8a, #3fbf7a); color:#0b2014; }
.camp-cover.spore .camp-prog { color:#c8ff9a; border-color:rgba(160,240,110,.38); }
.cm-board.spore { background-color:#06120d;
  background-image:linear-gradient(rgba(140,240,190,.06) 1px,transparent 1px),linear-gradient(90deg,rgba(140,240,190,.06) 1px,transparent 1px),
    radial-gradient(circle at 30% 82%,rgba(150,240,80,.16),transparent 55%),radial-gradient(circle at 70% 18%,rgba(190,110,255,.12),transparent 50%);
  background-size:40px 40px,40px 40px,auto,auto; }
.cm-board.spore .cm-region { border-top-color:rgba(160,240,110,.18); }
.cm-board.spore .cm-region span { color:rgba(190,255,150,.45); }
.cm-board.spore .cm-path-base { stroke:rgba(150,240,110,.22); }
.cm-board.spore .cm-path-lit { stroke:#b6ff5c; filter:drop-shadow(0 0 4px #5fd060) drop-shadow(0 0 8px rgba(212,140,255,.35)); }
.cm-board.spore .cm-node.s-cur .cm-hex, .cm-board.spore .cm-node.s-done .cm-hex { --c:#b6ff5c; }
.cm-board.spore .cm-node.soon { cursor:pointer; }
.cm-board.spore .cm-node.soon .cm-hex-in b { color:#8fb09a; }
/* Stage 1 (菌蚀温室) detail, Chapter 1 layout */
.screen.spore-detail { z-index: 30; background: radial-gradient(ellipse at 50% 35%, #0f2a1c, #030a06 92%); }
.spore-detail .brief11 .si-visual { border-color: rgba(160,240,110,.35); box-shadow: inset 0 0 28px rgba(150,240,80,.1), 0 0 12px rgba(190,110,255,.18); }
.spore-detail .brief11 .si-intro { background: rgba(160,240,110,.06); border-color: rgba(160,240,110,.2); }
.spore-detail .brief11 .si-intro .si-intro-h { color:#c8ff9a; }
.spore-detail .diff-chip.on { border-color:#b6ff5c; color:#eaffd6; box-shadow:0 0 8px rgba(182,255,92,.45); }
.spore-detail .spore-note, .spore-result .spore-note { color:#9fc8a8; font-size:0.78em; text-align:center; }
/* Result (no server: local demo) */
.screen.spore-result { z-index: 30; display:flex; flex-direction:column; align-items:center; gap:10px; padding:18px 14px;
  background: radial-gradient(ellipse at 50% 30%, #12301f, #030a06 92%); }
.spore-result .title { color:#c8ff9a; text-shadow:0 0 8px rgba(150,240,80,.5); }
.spore-result .ice-res-stats { list-style:none; padding:0; margin:0; display:grid; grid-template-columns:1fr 1fr; gap:4px 14px; font-size:0.86em; color:#d8f2e0; }
.spore-granted { display:flex; flex-direction:column; align-items:center; gap:4px; padding:8px 12px; border:1px solid rgba(212,140,255,.4); border-radius:10px; background:rgba(30,12,40,.45); color:#f0dcff; font-size:0.86em; text-align:center; }
.spore-granted b { color:#d48cff; }
.spore-res-btns { display:flex; gap:10px; }
.spore-res-btns .btn { width:auto; padding-left:1.2em; padding-right:1.2em; }
/* t177 LOCAL resonantSands: 远征篇章 page V (amber night, copper resonator traces) + stage 1 detail / result */
.camp-spread.flip-4 .camp-ch1.back, .camp-spread.flip-4 .camp-ch2.back, .camp-spread.flip-4 .camp-ch3.back, .camp-spread.flip-4 .camp-ch4.back { transform:rotateY(-90deg); transform-origin:left center; opacity:0; pointer-events:none; }
.camp-spread.flip-4 .camp-ch5.front { transform:none; opacity:1; }
.camp-page.camp-ch5 { border-color: rgba(224,150,90,.45); }
.camp-page.camp-ch5.back { opacity:0; pointer-events:none; }
.camp-cover.sand { background: linear-gradient(90deg, rgba(130,76,34,.6), rgba(24,14,8,.25)); }
.camp-cover.sand .camp-badge { background: linear-gradient(#ffd6a0, #c8783a); color:#2a1406; }
.camp-cover.sand .camp-prog { color:#ffc48a; border-color:rgba(224,150,90,.4); }
.cm-board.sand { background-color:#120a05;
  background-image:linear-gradient(90deg,rgba(224,138,74,.07) 1px,transparent 1px),linear-gradient(rgba(224,138,74,.05) 1px,transparent 1px),
    radial-gradient(ellipse 70% 18% at 50% 72%,rgba(200,130,60,.16),transparent 70%),radial-gradient(ellipse 60% 14% at 40% 30%,rgba(224,138,74,.12),transparent 70%);
  background-size:46px 46px,46px 46px,auto,auto; }
.cm-board.sand .cm-region { border-top-color:rgba(224,150,90,.18); }
.cm-board.sand .cm-region span { color:rgba(255,200,150,.45); }
.cm-board.sand .cm-path-base { stroke:rgba(224,150,90,.22); }
.cm-board.sand .cm-path-lit { stroke:#ffb06a; filter:drop-shadow(0 0 4px #e08a4a) drop-shadow(0 0 8px rgba(255,200,140,.35)); }
.cm-board.sand .cm-node.s-cur .cm-hex, .cm-board.sand .cm-node.s-done .cm-hex { --c:#ffb06a; }
.cm-board.sand .cm-node.soon { cursor:pointer; }
.cm-board.sand .cm-node.soon .cm-hex-in b { color:#b09078; }
.screen.sand-detail { z-index: 30; background: radial-gradient(ellipse at 50% 35%, #2a170a, #0a0503 92%); }
.sand-detail .brief11 .si-visual { border-color: rgba(224,150,90,.4); box-shadow: inset 0 0 28px rgba(224,138,74,.12), 0 0 12px rgba(255,190,120,.16); }
.sand-detail .brief11 .si-intro { background: rgba(224,150,90,.06); border-color: rgba(224,150,90,.22); }
.sand-detail .brief11 .si-intro .si-intro-h { color:#ffc48a; }
.sand-detail .diff-chip.on { border-color:#ffb06a; color:#fff0dc; box-shadow:0 0 8px rgba(255,176,106,.45); }
.sand-detail .sand-note, .sand-result .sand-note { color:#d0b090; font-size:0.78em; text-align:center; }
.screen.sand-result { z-index: 30; display:flex; flex-direction:column; align-items:center; gap:10px; padding:18px 14px;
  background: radial-gradient(ellipse at 50% 30%, #2e1a0c, #0a0503 92%); }
.sand-result .title { color:#ffc48a; text-shadow:0 0 8px rgba(224,138,74,.5); }
.sand-result .ice-res-stats { list-style:none; padding:0; margin:0; display:grid; grid-template-columns:1fr 1fr; gap:4px 14px; font-size:0.86em; color:#f2e2cc; }
.sand-granted { display:flex; flex-direction:column; align-items:center; gap:4px; padding:8px 12px; border:1px solid rgba(224,150,90,.45); border-radius:10px; background:rgba(40,22,10,.5); color:#ffe6c8; font-size:0.86em; text-align:center; }
.sand-granted b { color:#ffb06a; }
.sand-res-btns { display:flex; gap:10px; }
.sand-res-btns .btn { width:auto; padding-left:1.2em; padding-right:1.2em; }
/* t178 LOCAL sealArchive: 远征篇章 page VI (dim paperboard, ink, vermilion seals) + stage 1 detail / result */
.camp-spread.flip-5 .camp-ch1.back, .camp-spread.flip-5 .camp-ch2.back, .camp-spread.flip-5 .camp-ch3.back, .camp-spread.flip-5 .camp-ch4.back, .camp-spread.flip-5 .camp-ch5.back { transform:rotateY(-90deg); transform-origin:left center; opacity:0; pointer-events:none; }
.camp-spread.flip-5 .camp-ch6.front { transform:none; opacity:1; }
.camp-page.camp-ch6 { border-color: rgba(210,70,56,.45); }
.camp-page.camp-ch6.back { opacity:0; pointer-events:none; }
.camp-cover.seal { background: linear-gradient(90deg, rgba(92,30,24,.62), rgba(22,18,14,.3)); }
.camp-cover.seal .camp-badge { background: linear-gradient(#efe6d2, #b8a888); color:#8a1e16; }
.camp-cover.seal .camp-prog { color:#ffb4a8; border-color:rgba(210,70,56,.4); }
.cm-board.seal { background-color:#15120f;
  background-image:linear-gradient(90deg,rgba(200,185,160,.06) 1px,transparent 1px),linear-gradient(rgba(200,185,160,.05) 1px,transparent 1px),
    radial-gradient(ellipse 70% 18% at 50% 72%,rgba(200,53,42,.10),transparent 70%),radial-gradient(ellipse 60% 14% at 40% 30%,rgba(200,185,160,.08),transparent 70%);
  background-size:54px 40px,54px 40px,auto,auto; }
.cm-board.seal .cm-region { border-top-color:rgba(210,70,56,.18); }
.cm-board.seal .cm-region span { color:rgba(240,220,200,.45); }
.cm-board.seal .cm-path-base { stroke:rgba(200,185,160,.22); }
.cm-board.seal .cm-path-lit { stroke:#ff6a54; filter:drop-shadow(0 0 4px #c8352a) drop-shadow(0 0 8px rgba(255,180,168,.3)); }
.cm-board.seal .cm-node.s-cur .cm-hex, .cm-board.seal .cm-node.s-done .cm-hex { --c:#ff6a54; }
.cm-board.seal .cm-node.soon { cursor:pointer; }
.cm-board.seal .cm-node.soon .cm-hex-in b { color:#a89888; }
.screen.seal-detail { z-index: 30; background: radial-gradient(ellipse at 50% 35%, #2a201a, #0b0907 92%); }
.seal-detail .brief11 .si-visual { border-color: rgba(210,70,56,.4); box-shadow: inset 0 0 28px rgba(200,53,42,.12), 0 0 12px rgba(239,230,210,.12); }
.seal-detail .brief11 .si-intro { background: rgba(210,70,56,.06); border-color: rgba(210,70,56,.22); }
.seal-detail .brief11 .si-intro .si-intro-h { color:#ffb4a8; }
.seal-detail .diff-chip.on { border-color:#ff6a54; color:#fff0ea; box-shadow:0 0 8px rgba(255,106,84,.45); }
.seal-detail .seal-note, .seal-result .seal-note { color:#d8c4b0; font-size:0.78em; text-align:center; }
.seal-nb { white-space:nowrap; }
.screen.seal-result { z-index: 30; display:flex; flex-direction:column; align-items:center; gap:10px; padding:18px 14px;
  background: radial-gradient(ellipse at 50% 30%, #2e221a, #0b0907 92%); }
.seal-result .title { color:#ffb4a8; text-shadow:0 0 8px rgba(200,53,42,.5); }
.seal-result .ice-res-stats { list-style:none; padding:0; margin:0; display:grid; grid-template-columns:1fr 1fr; gap:4px 14px; font-size:0.86em; color:#f2e6d8; }
.seal-granted { display:flex; flex-direction:column; align-items:center; gap:4px; padding:8px 12px; border:1px solid rgba(210,70,56,.45); border-radius:10px; background:rgba(40,24,18,.5); color:#ffe8e0; font-size:0.86em; text-align:center; }
.seal-granted b { color:#ff8a74; }
.seal-res-btns { display:flex; gap:10px; }
.seal-res-btns .btn { width:auto; padding-left:1.2em; padding-right:1.2em; }
/* t179 LOCAL loomWorks: 远征篇章 page VII (charcoal, wine-brown loom frames, berry fibre) + stage 1 detail / result / demo */
.camp-spread.flip-6 .camp-ch1.back, .camp-spread.flip-6 .camp-ch2.back, .camp-spread.flip-6 .camp-ch3.back, .camp-spread.flip-6 .camp-ch4.back, .camp-spread.flip-6 .camp-ch5.back, .camp-spread.flip-6 .camp-ch6.back { transform:rotateY(-90deg); transform-origin:left center; opacity:0; pointer-events:none; }
.camp-spread.flip-6 .camp-ch7.front { transform:none; opacity:1; }
.camp-page.camp-ch7 { border-color: rgba(230,162,183,.4); }
.camp-page.camp-ch7.back { opacity:0; pointer-events:none; }
.camp-cover.loom { background: linear-gradient(90deg, rgba(48,33,39,.8), rgba(21,19,22,.3)); }
.camp-cover.loom .camp-badge { background: linear-gradient(#e6a2b7, #71414f); color:#1a1014; }
.camp-cover.loom .camp-prog { color:#f2c4d2; border-color:rgba(230,162,183,.4); }
.cm-board.loom { background-color:#151316;
  background-image:linear-gradient(90deg,rgba(48,33,39,.9) 0 7%,transparent 7% 93%,rgba(48,33,39,.9) 93%),
    repeating-linear-gradient(0deg,transparent 0 46px,rgba(230,162,183,.07) 46px 47px,transparent 47px 58px),
    repeating-linear-gradient(90deg,rgba(113,65,79,.08) 0 1px,transparent 1px 8px),
    radial-gradient(ellipse 70% 30% at 50% 20%,rgba(113,65,79,.22),transparent 70%); }
.cm-board.loom .cm-region { border-top-color:rgba(230,162,183,.16); }
.cm-board.loom .cm-region span { color:rgba(242,196,210,.45); }
.cm-board.loom .cm-path-base { stroke:rgba(230,162,183,.2); }
.cm-board.loom .cm-path-lit { stroke:#e6a2b7; filter:drop-shadow(0 0 3px rgba(113,65,79,.9)); }
.cm-board.loom .cm-node.s-cur .cm-hex, .cm-board.loom .cm-node.s-done .cm-hex { --c:#e6a2b7; }
.cm-board.loom .cm-node.soon { cursor:pointer; }
.cm-board.loom .cm-node.soon .cm-hex-in b { color:#9a8a90; }
.screen.loom-detail { z-index: 30; background: radial-gradient(ellipse at 50% 35%, #2a1d22, #0b090a 92%); }
.loom-detail .brief11 .si-visual { border-color: rgba(230,162,183,.35); box-shadow: inset 0 0 28px rgba(113,65,79,.2); }
.loom-detail .brief11 .si-intro { background: rgba(113,65,79,.12); border-color: rgba(230,162,183,.2); }
.loom-detail .brief11 .si-intro .si-intro-h { color:#f2c4d2; }
.loom-detail .diff-chip.on { border-color:#e6a2b7; color:#fff0f4; box-shadow:0 0 6px rgba(230,162,183,.35); }
.loom-detail .loom-note, .loom-result .loom-note { color:#d9c6cc; font-size:0.78em; text-align:center; }
.loom-detail .loom-rew-note .loom-note { text-align:left; margin-top:4px; font-size:0.74em; color:#f2c4d2; }
.loom-look { display:flex; flex-direction:column; gap:2px; margin-top:6px; padding:6px 8px; border:1px dashed rgba(230,162,183,.4); border-radius:8px; font-size:0.74em; color:#e8d8dd; }
.loom-look em { font-style:normal; color:#f2c4d2; }
.loom-nb, .loom-detail .bf-name .loom-nb { white-space:nowrap; display:inline-block; }
.loom-replay { font-size:0.8em; color:#f2c4d2; }
.screen.loom-result { z-index: 30; display:flex; flex-direction:column; align-items:center; gap:10px; padding:18px 14px;
  background: radial-gradient(ellipse at 50% 30%, #2e2026, #0b090a 92%); }
.loom-result .title { color:#f2c4d2; }
.loom-result .ice-res-stats { list-style:none; padding:0; margin:0; display:grid; grid-template-columns:1fr 1fr; gap:4px 14px; font-size:0.86em; color:#f0e4e8; }
.loom-granted { display:flex; flex-direction:column; align-items:center; gap:4px; padding:8px 12px; border:1px solid rgba(230,162,183,.4); border-radius:10px; background:rgba(40,26,32,.5); color:#ffe8ef; font-size:0.86em; text-align:center; }
.loom-granted b { color:#f2a6bd; }
.loom-granted.loom-first { border-style:dashed; }
.loom-res-btns { display:flex; gap:10px; }
.loom-res-btns .btn { width:auto; padding-left:1.2em; padding-right:1.2em; }
.ice-hint.loom-demo { pointer-events:none; }
.ice-hint.loom-demo .ice-hint-box { pointer-events:auto; border-color: rgba(230,162,183,.5); }
.loom-demo .ice-hint-head { color:#f2c4d2; }
.loom-demo-step { position:relative; margin:8px 0 6px; padding:6px 8px; border-radius:8px; background:rgba(255,154,60,.12); color:#ffd6b0; font-size:13px; font-weight:700; }
.loom-demo-foot { position:relative; display:flex; align-items:center; justify-content:space-between; gap:8px; font-size:11px; color:#cbb8be; }
.loom-demo-foot .btn { width:auto; padding:0.35em 1.1em; }
/* t180 LOCAL page VIII (graphite grey-green, old enamel, blunt silver, a little signal lemon): its map, stage detail / result / demo (V11 build only) */
.camp-spread.flip-7 .camp-ch1.back, .camp-spread.flip-7 .camp-ch2.back, .camp-spread.flip-7 .camp-ch3.back, .camp-spread.flip-7 .camp-ch4.back, .camp-spread.flip-7 .camp-ch5.back, .camp-spread.flip-7 .camp-ch6.back, .camp-spread.flip-7 .camp-ch7.back { transform:rotateY(-90deg); transform-origin:left center; opacity:0; pointer-events:none; }
.camp-spread.flip-7 .camp-ch8.front { transform:none; opacity:1; }
.camp-page.camp-ch8 { border-color: rgba(204,209,201,.4); }
.camp-page.camp-ch8.back { opacity:0; pointer-events:none; }
.camp-cover.range { background: linear-gradient(90deg, rgba(54,70,64,.85), rgba(29,38,34,.3)); }
.camp-cover.range .camp-badge { background: linear-gradient(#ccd1c9, #364640); color:#141a17; }
.camp-cover.range .camp-prog { color:#e3e6df; border-color:rgba(204,209,201,.4); }
.cm-board.range { background-color:#1d2622;
  background-image:repeating-linear-gradient(0deg,transparent 0 62px,rgba(149,158,154,.08) 62px 63px),
    repeating-linear-gradient(90deg,transparent 0 119px,rgba(149,158,154,.07) 119px 120px),
    radial-gradient(ellipse 90% 26% at 50% 4%,rgba(54,70,64,.9),transparent 70%),
    linear-gradient(90deg,rgba(42,52,48,.9) 0 4%,transparent 4% 96%,rgba(42,52,48,.9) 96%); }
.cm-board.range .cm-region { border-top-color:rgba(204,209,201,.16); }
.cm-board.range .cm-region span { color:rgba(227,230,223,.45); }
.cm-board.range .cm-path-base { stroke:rgba(204,209,201,.2); }
.cm-board.range .cm-path-lit { stroke:#ccd1c9; filter:drop-shadow(0 0 2px rgba(54,70,64,.9)); }
.cm-board.range .cm-node.s-cur .cm-hex, .cm-board.range .cm-node.s-done .cm-hex { --c:#ccd1c9; }
.cm-board.range .cm-node.soon { cursor:pointer; }
.cm-board.range .cm-node.soon .cm-hex-in b { color:#8d968f; }
.screen.range-detail { z-index: 30; background: radial-gradient(ellipse at 50% 35%, #26322d, #0c100e 92%); }
.range-detail .brief11 .si-visual { border-color: rgba(204,209,201,.35); box-shadow: inset 0 0 28px rgba(54,70,64,.3); }
.range-detail .brief11 .si-intro { background: rgba(54,70,64,.18); border-color: rgba(204,209,201,.2); }
.range-detail .brief11 .si-intro .si-intro-h { color:#e3e6df; }
.range-detail .diff-chip.on { border-color:#ccd1c9; color:#f4f6f1; box-shadow:0 0 6px rgba(204,209,201,.3); }
.range-detail .diff-chip.tuning small { color:#e0cb55; font-size:0.72em; }
.range-detail .range-go.locked { opacity:.5; }
.range-detail .range-note, .range-result .range-note { color:#d3d8d0; font-size:0.78em; text-align:center; }
.range-detail .range-rew-note .range-note { text-align:left; margin-top:4px; font-size:0.74em; color:#e3e6df; }
.range-detail .range-rew-note .range-first { color:#f1e7b4; }
.range-look { display:flex; flex-direction:column; gap:4px; margin-top:6px; padding:6px 8px; border:1px dashed rgba(204,209,201,.4); border-radius:8px; font-size:0.74em; color:#e3e6df; }
.range-look-row { display:flex; gap:6px; justify-content:space-between; }
.range-look-item { margin:0; flex:1 1 0; min-width:0; display:flex; flex-direction:column; align-items:center; gap:2px; text-align:center; }
.range-look-item canvas { width:100%; max-width:96px; height:auto; border-radius:6px; border:1px solid rgba(149,158,154,.35); }
.range-look-item small { display:block; color:#a8b0aa; font-size:0.86em; line-height:1.2; }
.range-look em { font-style:normal; color:#f1e7b4; text-align:center; }
.range-nb, .range-detail .bf-name .range-nb { white-space:nowrap; display:inline-block; }
.range-replay { font-size:0.8em; color:#e3e6df; }
.screen.range-result { z-index: 30; display:flex; flex-direction:column; align-items:center; gap:10px; padding:18px 14px;
  background: radial-gradient(ellipse at 50% 30%, #2a3631, #0c100e 92%); }
.range-result .title { color:#e3e6df; }
.range-endline { color:#c9cfc6; font-size:0.82em; text-align:center; max-width:30em; }
.range-result .ice-res-stats { list-style:none; padding:0; margin:0; display:grid; grid-template-columns:1fr 1fr; gap:4px 14px; font-size:0.86em; color:#eef0ea; }
.range-granted { display:flex; flex-direction:column; align-items:center; gap:4px; padding:8px 12px; border:1px solid rgba(204,209,201,.4); border-radius:10px; background:rgba(38,50,45,.55); color:#f4f6f1; font-size:0.86em; text-align:center; }
.range-granted b { color:#e0cb55; }
.range-granted.range-first { border-style:dashed; }
.range-res-btns { display:flex; gap:10px; }
.range-res-btns .btn { width:auto; padding-left:1.2em; padding-right:1.2em; }
.ice-hint.range-demo { pointer-events:none; }
.ice-hint.range-demo .ice-hint-box { pointer-events:auto; border-color: rgba(204,209,201,.5); }
.range-demo .ice-hint-head { color:#e3e6df; }
.range-demo-step { position:relative; margin:8px 0 6px; padding:6px 8px; border-radius:8px; background:rgba(224,203,85,.12); color:#f1e7b4; font-size:13px; font-weight:700; }
.range-demo-foot { position:relative; display:flex; align-items:center; justify-content:space-between; gap:8px; font-size:11px; color:#b9c0b9; }
.range-demo-foot .btn { width:auto; padding:0.35em 1.1em; }
.screen.range-replay { z-index: 40; display:flex; align-items:center; justify-content:center; padding:12px; background:rgba(8,10,9,.82); }
.range-replay-box { width:min(92vw, 360px); display:flex; flex-direction:column; gap:6px; padding:12px; border:1px solid rgba(204,209,201,.45); border-radius:12px; background:#151c19; color:#e3e6df; font-size:0.84em; }
.range-replay-box .mech-lines { margin:0; padding-left:1.1em; }
.range-replay-cv { width:100%; height:auto; border-radius:8px; border:1px solid rgba(149,158,154,.35); touch-action:manipulation; }
.range-replay-btns { display:flex; gap:8px; justify-content:flex-end; }
.range-replay-btns .btn { width:auto; padding:0.35em 1.2em; }
.mech-intro.range-demo.pos-top { padding-top: 4px; }
.range-demo .ice-hint-box { padding: 8px 12px; font-size: 12px; max-width: 360px; }
.range-demo .mech-lines { margin: 4px 0 0; }
.range-demo .mech-lines li { line-height: 1.32; margin: 1px 0; }
.range-demo .range-demo-step { margin: 5px 0 4px; padding: 4px 8px; font-size: 12px; }
/* t181 LOCAL page IX (ebony, carved chestnut, matte brass; mint only for the baton feedback): its map, stage detail / result / demo (V11 build only) */
.camp-spread.flip-8 .camp-ch1.back, .camp-spread.flip-8 .camp-ch2.back, .camp-spread.flip-8 .camp-ch3.back, .camp-spread.flip-8 .camp-ch4.back, .camp-spread.flip-8 .camp-ch5.back, .camp-spread.flip-8 .camp-ch6.back, .camp-spread.flip-8 .camp-ch7.back, .camp-spread.flip-8 .camp-ch8.back { transform:rotateY(-90deg); transform-origin:left center; opacity:0; pointer-events:none; }
.camp-spread.flip-8 .camp-ch9.front { transform:none; opacity:1; }
.camp-page.camp-ch9 { border-color: rgba(233,223,201,.4); }
.camp-page.camp-ch9.back { opacity:0; pointer-events:none; }
.camp-cover.orch { background: linear-gradient(90deg, rgba(104,76,53,.85), rgba(32,28,24,.3)); }
.camp-cover.orch .camp-badge { background: linear-gradient(#e9dfc9, #684C35); color:#201C18; }
.camp-cover.orch .camp-prog { color:#efe6d4; border-color:rgba(233,223,201,.4); }
.cm-board.orch { background-color:#201C18;
  background-image:repeating-linear-gradient(0deg,transparent 0 62px,rgba(168,138,83,.08) 62px 63px),
    repeating-linear-gradient(90deg,transparent 0 119px,rgba(168,138,83,.07) 119px 120px),
    radial-gradient(ellipse 90% 26% at 50% 4%,rgba(104,76,53,.9),transparent 70%),
    linear-gradient(90deg,rgba(47,38,30,.9) 0 4%,transparent 4% 96%,rgba(47,38,30,.9) 96%); }
.cm-board.orch .cm-region { border-top-color:rgba(233,223,201,.16); }
.cm-board.orch .cm-region span { color:rgba(227,230,223,.45); }
.cm-board.orch .cm-path-base { stroke:rgba(233,223,201,.2); }
.cm-board.orch .cm-path-lit { stroke:#e9dfc9; filter:drop-shadow(0 0 2px rgba(104,76,53,.9)); }
.cm-board.orch .cm-node.s-cur .cm-hex, .cm-board.orch .cm-node.s-done .cm-hex { --c:#e9dfc9; }
.cm-board.orch .cm-node.soon { cursor:pointer; }
.cm-board.orch .cm-node.soon .cm-hex-in b { color:#9a8a74; }
.screen.orch-detail { z-index: 30; background: radial-gradient(ellipse at 50% 35%, #2b231c, #0d0b09 92%); }
.orch-detail .brief11 .si-visual { border-color: rgba(233,223,201,.35); box-shadow: inset 0 0 28px rgba(104,76,53,.3); }
.orch-detail .brief11 .si-intro { background: rgba(104,76,53,.18); border-color: rgba(233,223,201,.2); }
.orch-detail .brief11 .si-intro .si-intro-h { color:#efe6d4; }
.orch-detail .diff-chip.on { border-color:#e9dfc9; color:#f8f2e4; box-shadow:0 0 6px rgba(233,223,201,.3); }
.orch-detail .diff-chip.tuning small { color:#A88A53; font-size:0.72em; }
.orch-detail .orch-go.locked { opacity:.5; }
.orch-detail .orch-note, .orch-result .orch-note { color:#ddd2bd; font-size:0.78em; text-align:center; }
.orch-detail .orch-rew-note .orch-note { text-align:left; margin-top:4px; font-size:0.74em; color:#efe6d4; }
.orch-detail .orch-rew-note .orch-first { color:#f3e2b8; }
.orch-look { display:flex; flex-direction:column; gap:4px; margin-top:6px; padding:6px 8px; border:1px dashed rgba(233,223,201,.4); border-radius:8px; font-size:0.74em; color:#efe6d4; }
.orch-look-row { display:flex; gap:6px; justify-content:space-between; }
.orch-look-item { margin:0; flex:1 1 0; min-width:0; display:flex; flex-direction:column; align-items:center; gap:2px; text-align:center; }
.orch-look-item canvas { width:100%; max-width:96px; height:auto; border-radius:6px; border:1px solid rgba(168,138,83,.35); }
.orch-look-item small { display:block; color:#b4a690; font-size:0.86em; line-height:1.2; }
.orch-look em { font-style:normal; color:#f3e2b8; text-align:center; }
.orch-nb, .orch-detail .bf-name .orch-nb { white-space:nowrap; display:inline-block; }
.orch-replay { font-size:0.8em; color:#efe6d4; }
.screen.orch-result { z-index: 30; display:flex; flex-direction:column; align-items:center; gap:10px; padding:18px 14px;
  background: radial-gradient(ellipse at 50% 30%, #2e251d, #0d0b09 92%); }
.orch-result .title { color:#efe6d4; }
.orch-endline { color:#d6c9b2; font-size:0.82em; text-align:center; max-width:30em; }
.orch-result .ice-res-stats { list-style:none; padding:0; margin:0; display:grid; grid-template-columns:1fr 1fr; gap:4px 14px; font-size:0.86em; color:#f3ece0; }
.orch-granted { display:flex; flex-direction:column; align-items:center; gap:4px; padding:8px 12px; border:1px solid rgba(233,223,201,.4); border-radius:10px; background:rgba(52,40,30,.55); color:#f8f2e4; font-size:0.86em; text-align:center; }
.orch-granted b { color:#A88A53; }
.orch-granted.orch-first { border-style:dashed; }
.orch-res-btns { display:flex; gap:10px; }
.orch-res-btns .btn { width:auto; padding-left:1.2em; padding-right:1.2em; }
.ice-hint.orch-demo { pointer-events:none; }
.ice-hint.orch-demo .ice-hint-box { pointer-events:auto; border-color: rgba(233,223,201,.5); }
.orch-demo .ice-hint-head { color:#efe6d4; }
.orch-demo-step { position:relative; margin:8px 0 6px; padding:6px 8px; border-radius:8px; background:rgba(168,138,83,.12); color:#f3e2b8; font-size:13px; font-weight:700; }
.orch-demo-foot { position:relative; display:flex; align-items:center; justify-content:space-between; gap:8px; font-size:11px; color:#c0b29b; }
.orch-demo-foot .btn { width:auto; padding:0.35em 1.1em; }
.screen.orch-replay { z-index: 40; display:flex; align-items:center; justify-content:center; padding:12px; background:rgba(10,8,6,.82); }
.orch-replay-box { width:min(92vw, 360px); display:flex; flex-direction:column; gap:6px; padding:12px; border:1px solid rgba(233,223,201,.45); border-radius:12px; background:#17130f; color:#efe6d4; font-size:0.84em; }
.orch-replay-box .mech-lines { margin:0; padding-left:1.1em; }
.orch-replay-cv { width:100%; height:auto; border-radius:8px; border:1px solid rgba(168,138,83,.35); touch-action:manipulation; }
.orch-replay-btns { display:flex; gap:8px; justify-content:flex-end; }
.orch-replay-btns .btn { width:auto; padding:0.35em 1.2em; }
.mech-intro.orch-demo.pos-top { padding-top: 4px; }
.orch-demo .ice-hint-box { padding: 8px 12px; font-size: 12px; max-width: 360px; }
.orch-demo .mech-lines { margin: 4px 0 0; }
.orch-demo .mech-lines li { line-height: 1.32; margin: 1px 0; }
.orch-demo .orch-demo-step { margin: 5px 0 4px; padding: 4px 8px; font-size: 12px; }
.orch-detail .orch-noeffect { color:#B6DEC4; }
/* t223 (port of ff8466e, owner 2026-11-06): the missions sheet pops in, its head (Pass chip, title, ×) stays fixed above the scrolling
   body, and the Endless Alloy card folds to one line (open while a milestone is claimable). */
.dm-t130 .dm-box { animation: dmPop 0.28s cubic-bezier(.2, .9, .3, 1.2) both; }
@keyframes dmPop { from { opacity: 0; transform: translateY(0.8em) scale(0.96); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .dm-t130 .dm-box { animation: none; } }
.dm-t130 .dm-head { flex: none; width: 100%; box-sizing: border-box; display: flex; align-items: center; justify-content: center; min-height: 2.1em; padding: 0 2.3em; }
.dm-t130 .dm-head .title { white-space: nowrap; }
.dm-t130 .dm-pass { position: absolute; top: 0.4em; left: 0.5em; padding: 0.3em 0.65em; font-size: 0.72em; font-weight: 900; color: #ffe7a8;
  border: 1px solid rgba(255, 209, 102, 0.55); background: rgba(255, 209, 102, 0.12); max-width: 7.5em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dm-t130 .dm-head:has(.dm-pass) { padding: 0 5.8em; }
.ea-fold > summary { list-style: none; cursor: pointer; }
.ea-fold > summary::-webkit-details-marker { display: none; }
.ea-chev { flex: none; width: 0.55em; height: 0.55em; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg);
  margin: 0 0.15em 0.2em 0.2em; transition: transform 0.2s; }
.ea-fold[open] .ea-chev { transform: rotate(-135deg); margin-bottom: -0.15em; }
.ea-line { flex-basis: 100%; text-align: left; }

/* t223 (owner t208u): each Codex set card shows the set's own logo left of its name (cap-height, one line; the tag line and › stay). */
.gc-set-head { grid-template-columns: auto minmax(0, 1fr) auto; column-gap: 0.32em; }
.gc-set-head > b { grid-column: 2; grid-row: 1; align-self: center; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gc-set-head > small { grid-column: 1 / span 2; grid-row: 2; }
.gc-set-head > i[aria-hidden]:last-child { grid-column: 3; grid-row: 1 / span 2; }
.gc-set-head > i.gc-set-logo { grid-column: 1; grid-row: 1; align-self: center; display: block; width: 0.9em; height: 0.9em; line-height: 0; font-size: 1em; }
.gc-set-head > i.gc-set-logo svg { display: block; width: 100%; height: 100%; }


/* t182 LOCAL page X (deep indigo shadow, wet dark rock; salt white only on rims and crust; warm rock orange): its map, stage detail / result / demo (V11 build only) */
.camp-spread.flip-9 .camp-ch1.back, .camp-spread.flip-9 .camp-ch2.back, .camp-spread.flip-9 .camp-ch3.back, .camp-spread.flip-9 .camp-ch4.back, .camp-spread.flip-9 .camp-ch5.back, .camp-spread.flip-9 .camp-ch6.back, .camp-spread.flip-9 .camp-ch7.back, .camp-spread.flip-9 .camp-ch8.back, .camp-spread.flip-9 .camp-ch9.back { transform:rotateY(-90deg); transform-origin:left center; opacity:0; pointer-events:none; }
.camp-spread.flip-9 .camp-ch10.front { transform:none; opacity:1; }
.camp-page.camp-ch10 { border-color: rgba(238,229,212,.4); }
.camp-page.camp-ch10.back { opacity:0; pointer-events:none; }
.camp-cover.salt { background: linear-gradient(90deg, rgba(186,89,53,.82), rgba(25,33,60,.35)); }
.camp-cover.salt .camp-badge { background: linear-gradient(#EEE5D4, #BA5935); color:#19213C; }
.camp-cover.salt .camp-prog { color:#f1ebdf; border-color:rgba(238,229,212,.4); }
.cm-board.salt { background-color:#19213C;
  background-image:radial-gradient(ellipse 40% 10% at 30% 30%,rgba(38,44,66,.9),transparent 70%),
    radial-gradient(ellipse 36% 9% at 70% 62%,rgba(38,44,66,.9),transparent 70%),
    radial-gradient(ellipse 90% 26% at 50% 4%,rgba(186,89,53,.55),transparent 70%),
    linear-gradient(90deg,rgba(16,21,42,.95) 0 4%,rgba(238,229,212,.25) 4% 4.4%,transparent 4.4% 95.6%,rgba(238,229,212,.25) 95.6% 96%,rgba(16,21,42,.95) 96%); }
.cm-board.salt .cm-region { border-top-color:rgba(238,229,212,.16); }
.cm-board.salt .cm-region span { color:rgba(238,229,212,.45); }
.cm-board.salt .cm-path-base { stroke:rgba(238,229,212,.2); }
.cm-board.salt .cm-path-lit { stroke:#EEE5D4; filter:drop-shadow(0 0 2px rgba(186,89,53,.9)); }
.cm-board.salt .cm-node.s-cur .cm-hex, .cm-board.salt .cm-node.s-done .cm-hex { --c:#EEE5D4; }
.cm-board.salt .cm-node.soon { cursor:pointer; }
.cm-board.salt .cm-node.soon .cm-hex-in b { color:#8a8fa3; }
.screen.salt-detail { z-index: 30; background: radial-gradient(ellipse at 50% 35%, #232a44, #0a0d1a 92%); }
.salt-detail .brief11 .si-visual { border-color: rgba(238,229,212,.35); box-shadow: inset 0 0 28px rgba(186,89,53,.25); }
.salt-detail .brief11 .si-intro { background: rgba(186,89,53,.14); border-color: rgba(238,229,212,.2); }
.salt-detail .brief11 .si-intro .si-intro-h { color:#f1ebdf; }
.salt-detail .diff-chip.on { border-color:#EEE5D4; color:#fbf7ef; box-shadow:0 0 6px rgba(238,229,212,.3); }
.salt-detail .diff-chip.tuning small { color:#E88A63; font-size:0.72em; }
.salt-detail .salt-go.locked { opacity:.5; }
.salt-detail .salt-note, .salt-result .salt-note { color:#ddd6c8; font-size:0.78em; text-align:center; }
.salt-detail .salt-rew-note .salt-note { text-align:left; margin-top:4px; font-size:0.74em; color:#f1ebdf; }
.salt-detail .salt-rew-note .salt-first { color:#f6dcc8; }
.salt-look { display:flex; flex-direction:column; gap:4px; margin-top:6px; padding:6px 8px; border:1px dashed rgba(238,229,212,.4); border-radius:8px; font-size:0.74em; color:#f1ebdf; }
.salt-look-row { display:flex; gap:6px; justify-content:space-between; }
.salt-look-item { margin:0; flex:1 1 0; min-width:0; display:flex; flex-direction:column; align-items:center; gap:2px; text-align:center; }
.salt-look-item canvas { width:100%; max-width:96px; height:auto; border-radius:6px; border:1px solid rgba(186,89,53,.4); }
.salt-look-item small { display:block; color:#a9adbd; font-size:0.86em; line-height:1.2; }
.salt-look em { font-style:normal; color:#f6dcc8; text-align:center; }
.salt-nb, .salt-detail .bf-name .salt-nb { white-space:nowrap; display:inline-block; }
.salt-replay { font-size:0.8em; color:#f1ebdf; }
.screen.salt-result { z-index: 30; display:flex; flex-direction:column; align-items:center; gap:10px; padding:18px 14px;
  overflow-y:auto; background: radial-gradient(ellipse at 50% 30%, #232a44, #0a0d1a 92%); }
.salt-result .title { color:#f1ebdf; }
.salt-endline { color:#d3cdc1; font-size:0.82em; text-align:center; max-width:30em; }
.salt-result .ice-res-stats { list-style:none; padding:0; margin:0; display:grid; grid-template-columns:1fr 1fr; gap:4px 14px; font-size:0.86em; color:#f4efe6; }
.salt-granted { display:flex; flex-direction:column; align-items:center; gap:4px; padding:8px 12px; border:1px solid rgba(238,229,212,.4); border-radius:10px; background:rgba(38,44,66,.6); color:#fbf7ef; font-size:0.86em; text-align:center; }
.salt-granted b { color:#E88A63; }
.salt-granted.salt-first { border-style:dashed; }
.salt-res-btns { display:flex; gap:10px; }
.salt-res-btns .btn { width:auto; padding-left:1.2em; padding-right:1.2em; }
.ice-hint.salt-demo { pointer-events:none; }
.ice-hint.salt-demo .ice-hint-box { pointer-events:auto; border-color: rgba(238,229,212,.5); }
.salt-demo .ice-hint-head { color:#f1ebdf; }
.salt-demo-step { position:relative; margin:8px 0 6px; padding:6px 8px; border-radius:8px; background:rgba(186,89,53,.16); color:#f6dcc8; font-size:13px; font-weight:700; }
.salt-demo-foot { position:relative; display:flex; align-items:center; justify-content:space-between; gap:8px; font-size:11px; color:#b6b9c6; }
.salt-demo-btns { display:flex; gap:6px; }
.salt-demo-foot .btn { width:auto; min-height:44px; padding:0.35em 0.9em; }
.screen.salt-replay { z-index: 40; display:flex; align-items:center; justify-content:center; padding:12px; background:rgba(6,8,16,.84); }
.salt-replay-box { width:min(92vw, 360px); display:flex; flex-direction:column; gap:6px; padding:12px; border:1px solid rgba(238,229,212,.45); border-radius:12px; background:#141a30; color:#f1ebdf; font-size:0.84em; }
.salt-replay-box .mech-lines { margin:0; padding-left:1.1em; }
.salt-replay-cv { width:100%; height:auto; border-radius:8px; border:1px solid rgba(186,89,53,.35); touch-action:manipulation; }
.salt-replay-btns { display:flex; gap:8px; justify-content:flex-end; }
.salt-replay-btns .btn { width:auto; min-height:44px; padding:0.35em 1em; }
.mech-intro.salt-demo.pos-top { padding-top: 4px; }
.salt-demo .ice-hint-box { padding: 8px 12px; font-size: 12px; max-width: 360px; }
.salt-demo .mech-lines { margin: 4px 0 0; }
.salt-demo .mech-lines li { line-height: 1.32; margin: 1px 0; }
.salt-demo .salt-demo-step { margin: 5px 0 4px; padding: 4px 8px; font-size: 12px; }

/* Endless balance 2026-11-10 LOCAL: 战区整备, the zone card (src/events/zonePick.ts): three choice buttons, one card at a time. */
.zone-pick .zp-box { width: min(360px, 94vw); max-width: none; }
.zp-sub { position: relative; margin: 0.25em 0 0.6em; font-size: 0.82em; color: #b9cde0; }
.zp-opts { position: relative; display: flex; flex-direction: column; gap: 8px; }
.zp-opt { position: relative; display: grid; grid-template-columns: 2em 1fr auto; grid-template-rows: auto auto; align-items: center; column-gap: 8px;
  min-height: 56px; padding: 8px 10px; border-radius: 12px; border: 1px solid rgba(255,210,122,0.45); background: rgba(16,28,52,0.85);
  color: #f2f7ff; text-align: left; font: inherit; cursor: pointer; }
.zp-opt:hover, .zp-opt:focus-visible { border-color: #ffd27a; background: rgba(40,48,72,0.95); outline: none; }
.zp-icon { grid-row: 1 / 3; font-style: normal; font-size: 1.4em; text-align: center; }
.zp-opt b { font-size: 0.98em; color: #ffd27a; }
.zp-opt span { grid-column: 2; font-size: 0.8em; line-height: 1.35; color: #dce8f5; }
.zp-opt kbd { grid-row: 1 / 3; grid-column: 3; font: 600 0.72em sans-serif; color: #8fa6bf; border: 1px solid rgba(143,166,191,0.45); border-radius: 4px; padding: 0 5px; }
.zp-ember b { color: #ffb35c; }
.zp-patch b { color: #7fffb0; }
.zp-box:focus { outline: none; }
/* Round 2 (P0): the card locked on a pick while the server confirms it; the failure line with 重试 / 暂不整备 (no new choice). */
.zp-locked .zp-opt { opacity: 0.45; cursor: default; }
.zp-locked .zp-opt.zp-chosen { opacity: 1; border-color: #ffd27a; box-shadow: inset 0 0 0 1px #ffd27a; }
.zp-status { position: relative; margin: 0.55em 0 0; font-size: 0.82em; color: #ffd27a; text-align: center; }
.zp-status:empty { display: none; }
.zp-fail { position: relative; display: flex; gap: 8px; justify-content: center; margin-top: 0.5em; }
.zp-fail[hidden] { display: none; }
.zp-fail .btn { width: auto; min-height: 44px; padding: 0.35em 1.1em; }
/* T354-B2 (website 0051): the sweep-tickets sheet (inside the Missions sheet's frame) */
.sw-sheet .mq-head { justify-content: space-between; flex-wrap: wrap; }
.sw-sheet .mq-head .btn { width: auto; min-height: 36px; padding: 0.25em 0.9em; font-size: 0.9em; }
.sw-sheet .sw-top { margin: 0.2em 0 0.4em; }
.sw-sheet .sw-msg { color: #ffd27a; margin: 0 0 0.4em; }
.sw-sheet .sw-row .btn, .sw-sheet .sw-shard .btn { width: auto; min-height: 34px; padding: 0.2em 0.9em; }
.sw-sheet .sw-chances { list-style: none; margin: 0.4em 0 0; padding: 0; }
.sw-sheet .sw-chances li { margin: 0.15em 0; font-size: 0.82em; opacity: 0.85; text-align: left; }

/* t355 LOCAL page XI (warm gold, wax white, caramel; deep amber shadow): its map, stage page and result (dev-tools build only) */
.camp-spread.flip-10 .camp-ch1.back, .camp-spread.flip-10 .camp-ch2.back, .camp-spread.flip-10 .camp-ch3.back, .camp-spread.flip-10 .camp-ch4.back, .camp-spread.flip-10 .camp-ch5.back, .camp-spread.flip-10 .camp-ch6.back, .camp-spread.flip-10 .camp-ch7.back, .camp-spread.flip-10 .camp-ch8.back, .camp-spread.flip-10 .camp-ch9.back, .camp-spread.flip-10 .camp-ch10.back { transform:rotateY(-90deg); transform-origin:left center; opacity:0; pointer-events:none; }
.camp-spread.flip-10 .camp-ch11.front { transform:none; opacity:1; }
/* T417: on the staging pack (no local pages IV-X) 琥珀蜂城 is page IV (index 3), right after page III */
.camp-spread.flip-0 .camp-ch11.back, .camp-spread.flip-1 .camp-ch11.back, .camp-spread.flip-2 .camp-ch11.back { transform:rotateY(90deg); transform-origin:right center; }
.camp-spread.flip-3 .camp-ch11.front { transform:none; opacity:1; }
.camp-page.camp-ch11 { border-color: rgba(255,201,74,.45); }
.camp-page.camp-ch11.back { opacity:0; pointer-events:none; }
.camp-cover.hive { background: linear-gradient(90deg, rgba(201,122,26,.85), rgba(42,22,6,.4)); }
.camp-cover.hive .camp-badge { background: linear-gradient(#f4e6c2, #c97a1a); color:#2a1606; }
.camp-cover.hive .camp-prog { color:#fdf1d6; border-color:rgba(255,201,74,.45); }
.cm-board.hive { background-color:#2a1606;
  background-image:radial-gradient(ellipse 90% 26% at 50% 4%,rgba(242,182,60,.45),transparent 70%),
    linear-gradient(0deg,transparent 45%,rgba(255,201,74,.12) 45% 49%,transparent 49%),
    linear-gradient(90deg,rgba(107,58,18,.95) 0 4%,rgba(244,230,194,.25) 4% 4.4%,transparent 4.4% 95.6%,rgba(244,230,194,.25) 95.6% 96%,rgba(107,58,18,.95) 96%); }
.cm-board.hive .cm-region { border-top-color:rgba(244,230,194,.16); }
.cm-board.hive .cm-region span { color:rgba(244,230,194,.5); }
.cm-board.hive .cm-path-base { stroke:rgba(244,230,194,.2); }
.cm-board.hive .cm-path-lit { stroke:#ffc94a; }
.cm-board.hive .cm-node.s-cur .cm-hex, .cm-board.hive .cm-node.s-done .cm-hex { --c:#ffc94a; }
.cm-board.hive .cm-node.soon { cursor:pointer; }
.cm-board.hive .cm-node.soon .cm-hex-in b { color:#9a8466; }
.screen.hive-detail { z-index: 30; background: radial-gradient(ellipse at 50% 35%, #3a1f08, #120802 92%); }
.hive-detail .hive-map { margin: 4px 0 2px; color:#ffc94a; font-weight:700; font-size:.9em; }
.hive-detail .hive-line { margin: 4px 0 8px; color:#fdf1d6; font-size:.9em; line-height:1.45; }
.hive-detail .hive-rules { margin:4px 0 0; padding-left:1.1em; color:#f4e6c2; font-size:.82em; line-height:1.45; text-align:left; }
.hive-detail .hive-rules li { margin:2px 0; }
.hive-note { color:#e8d2a6; font-size:.8em; line-height:1.4; margin-top:6px; }
.hive-result .hive-preview span { color:#e8d2a6; }

/* T302U 第三章 stages 2–5: the detail page's tabs and foe cards, its medals, the result page, and the map's 待开发 tag. Static only (no loops). */
.screen.ch3-detail .brief11 .si-visual { border-color: rgba(169,139,255,.4); box-shadow: inset 0 0 28px rgba(120,90,255,.12); }
.ch3-detail .diff-chip.on { border-color:#a98bff; color:#efe6ff; box-shadow:0 0 8px rgba(169,139,255,.5); }
.ch3-rec { display:flex; align-items:center; gap:0.5em; min-width:0; }
.ch3-boss-tag { margin-left:auto; font-size:0.62em; font-weight:800; color:#ffb3c8; padding:0.15em 0.5em; border-radius:0.6em; border:1px solid rgba(255,107,140,.45); background:rgba(255,77,120,.1); white-space:nowrap; }
.ch3-tabs { display:flex; gap:0.15em; padding:0.18em; border-radius:0.75em; background:rgba(255,255,255,.06); }
.ch3-tab { flex:1; min-width:0; min-height:2.3em; border:0; background:transparent; border-radius:0.6em; font-size:0.72em; font-weight:800; color:var(--muted); cursor:pointer; }
.ch3-tab.on { color:#1a0d36; background:linear-gradient(180deg,#d9c8ff,#a98bff); }
.ch3-pane[hidden] { display:none; }
.ch3-foes { display:grid; grid-template-columns:repeat(4, minmax(0,1fr)); gap:0.25em; }
.ch3-foe { position:relative; display:flex; flex-direction:column; align-items:center; gap:0.05em; min-width:0; padding:0.2em 0.15em; border-radius:0.55em; background:rgba(255,255,255,.05); border:1px solid rgba(154,167,207,.25); }
.ch3-foe canvas { width:2.1em; height:2.1em; display:block; }
.ch3-foe b { max-width:100%; font-size:0.6em; font-weight:800; line-height:1.15; color:#e8dcff; text-align:center; overflow-wrap:anywhere; }
.ch3-foe small { max-width:100%; font-size:0.5em; line-height:1.2; color:var(--muted); text-align:center; overflow-wrap:anywhere; }
.ch3-foe.fresh { border-color:rgba(255,211,106,.55); }
.ch3-foe.boss { border-color:rgba(255,107,107,.55); background:rgba(255,77,109,.12); }
.ch3-foe.boss b { color:#ffc2cf; }
.ch3-new { position:absolute; top:0.15em; right:0.2em; padding:0 0.35em; border-radius:0.5em; font-style:normal; font-size:0.48em; font-weight:900; color:#1a1206; background:#ffd36a; }
.ch3-rew { display:flex; gap:0.6em; justify-content:space-around; align-items:flex-end; padding:0.4em 0; }
.ch3-rew .art-cell { width:3.2em; height:3.2em; font-size:1em; }
.ch3-medals { justify-content:space-around; padding:0.4em 0; }
.ch3-medals .bf-grade { width:2.3em; height:2.3em; }
.ch3-medals .bf-rk { opacity:.55; }
.ch3-medals .bf-rk.got { opacity:1; }
.ch3-detail .ch3-note, .ch3-result .ch3-note { color:#b9a8e0; font-size:0.74em; text-align:center; }
.screen.ch3-result { z-index:30; display:flex; flex-direction:column; align-items:center; gap:10px; padding:18px 14px; background:radial-gradient(ellipse at 50% 30%, #1d1240, #05040e 92%); }
.ch3-result .title { color:#d9c8ff; text-shadow:0 0 8px rgba(169,139,255,.5); text-align:center; }
.ch3-result .ice-res-stats { list-style:none; padding:0; margin:0; display:grid; grid-template-columns:1fr 1fr; gap:4px 14px; font-size:0.86em; color:#e6defa; }
.ch3-res-medals { display:flex; gap:12px; }
.ch3-medal { display:flex; flex-direction:column; align-items:center; gap:2px; opacity:.35; filter:grayscale(1); }
.ch3-medal.got { opacity:1; filter:none; }
.ch3-medal .bf-grade { width:2.4em; height:2.4em; }
.ch3-medal small { font-size:0.72em; color:#cfc2ee; }
.ch3-best { color:#ffd36a; font-weight:900; font-size:0.86em; }
.cm-plan { display:inline; margin-left:3px; font-style:normal; font-size:8px; font-weight:800; color:#9d8fc0; }
.cm-board.mag .cm-node.locked-live { cursor:pointer; }
/* T313U: 磁暴 stage 9 sits just above stage 8 on the shared path; its caption goes above its hex so it never covers 8 (the hex keeps its place). */
.cm-board.mag .cm-node[data-id="9"] { transform:translate(-50%,calc(-50% - 8px)); }
.cm-board.mag .cm-node[data-id="9"] .cm-cap { position:absolute; bottom:calc(100% + 2px); left:50%; transform:translateX(-50%); margin-top:0; }
/* T315U R3: S14 II / III gear advice: one compact line under the difficulty chips (the detail panel stays as tall as before). */
.ch3-detail .ch3-gear-hint { font-size:0.7em; line-height:1.2; margin:2px 0 0; padding:0; opacity:0.92; }
