/* BONKBOUND milestone 1: portrait layout, flat controls, debug sheet.
   Palette tokens match docs/design-guide.md. */

:root {
  --ink: #17243A;
  --floor: #26364D;
  --stone: #D9DFE8;
  --steel: #91A4B7;
  --steel-shade: #66778B;
  --cream: #FFF3D6;
  --teal: #43D6B5;
  --coral: #FF786B;
  --gold: #FFC857;
  --magic: #AA8CFF;
  --wood: #B98255;
  --font: ui-rounded, "SF Pro Rounded", "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--font);
  font-weight: 800;
  overscroll-behavior: none;
  -webkit-text-size-adjust: 100%;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

html, body { overflow: hidden; }

/* Fixed to the visible viewport. js/viewport.js sets --app-h and --app-top from
   window.visualViewport; 100dvh is only the pre-script fallback. Being fixed,
   the page has no scrollable content, so a restored or stray scroll offset
   cannot push the game down. */
.app {
  position: fixed;
  top: var(--app-top, 0px);
  left: 0; right: 0;
  height: var(--app-h, 100dvh);
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  padding: calc(var(--safe-top) + 16px) 8px calc(var(--safe-bottom) + 14px);
  gap: 8px;
}

button { font: inherit; color: inherit; touch-action: manipulation; }
svg { display: block; }

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

.hud { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 0 8px; }
.hud-top { width: 100%; display: flex; align-items: center; gap: 10px; }
.room-name { flex: 1; min-width: 0; margin: 0; font-size: 18px; font-weight: 900; color: var(--cream); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.btn-round.btn-pause { width: 44px; height: 44px; }

.hearts { display: flex; gap: 6px; flex: none; }
.hud-actions { display: flex; align-items: center; gap: 8px; }
.btn-round.btn-sound { width: 44px; height: 44px; }
.btn-round.btn-sound svg { width: 22px; height: 22px; fill: none; stroke: var(--stone); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.btn-round.btn-sound .spk { fill: var(--stone); }
.btn-round.btn-sound .i-off { display: none; }
.btn-round.btn-sound.is-off { border-color: var(--steel-shade); }
.btn-round.btn-sound.is-off svg { stroke: var(--steel); }
.btn-round.btn-sound.is-off .spk { fill: var(--steel); }
.btn-round.btn-sound.is-off .i-on { display: none; }
.btn-round.btn-sound.is-off .i-off { display: block; }
.heart { width: 26px; height: 24px; }
.heart path { fill: var(--coral); stroke: var(--ink); stroke-width: 1.5; }
.heart.empty path { fill: var(--floor); stroke: var(--steel); stroke-dasharray: 2 2; }
.heart.lost { animation: heart-lost 0.4s ease-out; }
@keyframes heart-lost {
  0% { transform: scale(1.35); }
  40% { transform: scale(0.85) rotate(-8deg); }
  100% { transform: none; }
}

/* Reset affordance after the room is cleared or the knight is knocked out */
.btn.nudge { border-color: var(--gold); color: var(--gold); animation: nudge 1.4s ease-in-out infinite; }
@keyframes nudge {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 200, 87, 0.55); }
  50% { box-shadow: 0 0 0 6px rgba(255, 200, 87, 0); }
}
/* Visual effects (pause panel): data-motion on <html> follows the device's
   Reduce Motion setting unless the player chose Full or Reduced; set at boot
   (index.html) and by main.js. Presentation only. */
:root[data-motion="reduced"] .heart.lost, :root[data-motion="reduced"] .btn.nudge { animation: none; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 0 16px;
  border-radius: 12px;
  font-size: 17px;
  cursor: pointer;
}
.btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.btn svg .i-head { stroke-width: 1.2; }
.btn-quiet { background: var(--ink); border: 2px solid var(--steel); color: var(--stone); }
.btn-small { min-height: 36px; padding: 0 12px; font-size: 14px; }

.seg {
  flex: 1;
  display: flex;
  border: 2px solid var(--steel);
  border-radius: 12px;
  overflow: hidden;
  background: var(--ink);
}
.seg button {
  flex: 1;
  min-height: 42px;
  border: 0;
  background: transparent;
  color: var(--stone);
  font-size: 16px;
  white-space: nowrap;
  padding: 0 6px;
  cursor: pointer;
}
.seg button[aria-pressed="true"] { background: var(--teal); color: var(--ink); }
.seg button:disabled { cursor: not-allowed; }
.seg button:disabled:not([aria-pressed="true"]) { color: var(--steel-shade); }
.seg button:disabled[aria-pressed="true"] { opacity: 0.7; }

.hud-status { justify-content: center; gap: 10px; }
.hud-status .spacer { flex: 1; display: flex; }
.hud-status .spacer-end { justify-content: flex-end; }
.hud-status .spacer-start { justify-content: flex-end; }

.btn-round {
  width: 42px; height: 42px; flex: none;
  border-radius: 50%;
  border: 2px solid var(--steel);
  background: var(--ink);
  display: grid; place-items: center;
  cursor: pointer;
}
.btn-round svg { width: 20px; height: 20px; fill: var(--stone); }
.btn-round .i-play { display: none; }
.btn-round.is-paused { border-color: var(--teal); }
.btn-round.is-paused .i-play { display: block; fill: var(--teal); }
.btn-round.is-paused .i-pause { display: none; }

/* Status pill: the state (filled) and a short hint. */
.chip {
  --kind: var(--teal);
  margin: 0; display: inline-flex; align-items: center; max-width: 100%;
  border: 2px solid var(--kind); border-radius: 999px; overflow: hidden;
  font-size: 14px; white-space: nowrap;
}
.chip b { padding: 4px 12px; background: var(--kind); color: var(--ink); letter-spacing: 0.06em; font-weight: 900; }
.chip span { padding: 4px 12px; color: var(--stone); overflow: hidden; text-overflow: ellipsis; }
.chip span:empty { display: none; }
.chip[data-kind="motion"], .chip[data-kind="explore"] { --kind: var(--gold); }
.chip[data-kind="transform"] { --kind: var(--magic); }
.chip[data-kind="danger"] { --kind: var(--coral); }
.chip[data-kind="paused"] { --kind: var(--steel); }

.btn-debug {
  min-height: 32px; padding: 0 10px;
  border-radius: 8px;
  border: 2px solid var(--steel-shade);
  background: transparent;
  color: var(--steel);
  font-size: 12px;
  letter-spacing: 0.05em;
  cursor: pointer;
}
.btn-debug[aria-expanded="true"] { border-color: var(--gold); color: var(--gold); }

/* ---- stage ---------------------------------------------------------------- */

.stage { flex: 0 1 auto; width: 100%; aspect-ratio: 408 / 448; min-height: 0; position: relative; }
#room { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; }

/* Two lines are always reserved (single lines are centred in them), so a hint
   that wraps never moves the room or the sling pad. */
.helper {
  margin: 0;
  text-align: center;
  font-size: 15px;
  line-height: 1.25;
  color: var(--stone);
  height: 2.5em;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  text-wrap: balance;
  overflow: hidden;
}

/* ---- sling pad -------------------------------------------------------------- */

/* Shell switch, inset at the pad's top right: exactly 44 x 44 CSS px, clear
   of the centred aiming circle. The current shell's circle sits in front,
   larger and outlined; the other is smaller and dimmed behind it. */
.btn-switch {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  width: 44px; height: 44px; padding: 0;
  border: 0; border-radius: 50%; background: var(--ink);
  cursor: pointer; touch-action: none;
}
.btn-switch svg { width: 44px; height: 44px; }
.btn-switch .sw-track { fill: none; stroke: var(--steel-shade); stroke-width: 2; }
.btn-switch .sw-ring { fill: none; stroke: var(--gold); stroke-width: 3; stroke-linecap: round; }
.btn-switch .sw-rubber { fill: var(--teal); }
.btn-switch .sw-lead { fill: var(--steel); }
.btn-switch .is-current { stroke: var(--cream); stroke-width: 2; }
.btn-switch .is-other { opacity: 0.55; }
.btn-switch .sw-arrow { fill: none; stroke: var(--stone); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.btn-switch:disabled { cursor: default; }
.btn-switch:disabled:not(.is-transforming) svg { opacity: 0.4; }
.btn-switch:focus { outline: none; }
.btn-switch:focus-visible { outline: 3px solid var(--cream); outline-offset: 2px; }
.pad.has-action .btn-switch { display: none; }

.pad {
  position: relative;
  flex: 1 1 auto;
  min-height: 110px;
  margin: 0 4px;
  border: 2px solid var(--steel-shade);
  border-radius: 26px;
  background: var(--floor);
  touch-action: none;
  cursor: grab;
}
.pad > svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.sling-zone { fill: none; stroke: var(--steel); stroke-width: 2; stroke-dasharray: 5 6; }
.sling-line { stroke: var(--steel); stroke-width: 6; stroke-linecap: round; }
.sling-ring { fill: var(--ink); stroke: var(--teal); stroke-width: 5; }
.sling-handle { fill: var(--steel-shade); stroke: var(--stone); stroke-width: 3; }

.pad.disabled { cursor: default; border-color: rgba(102, 119, 139, 0.5); background: rgba(38, 54, 77, 0.55); }
.pad.disabled > svg { opacity: 0.45; filter: grayscale(1); }

.pad-note {
  position: absolute; right: 18px; top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  color: var(--steel); font-size: 13px; text-align: center; max-width: 88px;
  pointer-events: none;
}
.pad-note svg { width: 26px; height: 26px; fill: none; stroke: var(--steel); stroke-width: 2.2; stroke-linecap: round; }
.pad-note[hidden] { display: none; }

/* Bottom action (knockout Reset): fills the pad, flat Gold primary with Ink
   text, the whole area is the touch target. After a clear the pad shows a
   non-interactive "Next room / Finishing" status while the game advances
   on its own. */
.pad.has-action > svg, .pad.has-action .pad-note { display: none; }
.pad-action {
  position: absolute; inset: 10px;
  display: flex; align-items: center; justify-content: center; gap: 12px;
  border: 0; border-radius: 18px;
  background: var(--gold); color: var(--ink);
  font-size: 24px; letter-spacing: 0.02em;
  cursor: pointer; touch-action: manipulation;
}
.pad-action[hidden] { display: none; }
.pad-action svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.pad-action svg .i-head { stroke-width: 1.2; }
.pad-action:focus-visible { outline: 3px solid var(--cream); outline-offset: 3px; }
.pad.has-action { cursor: default; }
.pad-advance { cursor: default; background: transparent; color: var(--gold); border: 2px dashed rgba(255, 200, 87, 0.45); pointer-events: none; }

/* ---- results (menu-results reference, real counters only) ------------------- */

.results {
  position: fixed; inset: 0; z-index: 40;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  padding: calc(var(--safe-top) + 20px) 20px calc(var(--safe-bottom) + 18px);
  background: var(--ink); color: var(--cream);
  overflow-y: auto; outline: none;
  /* Scrolling a control into view (focus, scrollIntoView) keeps it inside the safe area. */
  scroll-padding: calc(var(--safe-top) + 10px) 0 calc(var(--safe-bottom) + 10px);
  animation: results-in 0.2s ease-out;
}
.results[hidden] { display: none; }
@keyframes results-in { from { opacity: 0; } to { opacity: 1; } }
.results-heading { margin: 0; font-size: clamp(30px, 9vw, 42px); line-height: 1.05; text-align: center; color: var(--cream); font-weight: 900; }
.results-sub { margin: 0; color: var(--steel); font-size: 16px; }
.results-knight { width: min(46vw, 190px); height: min(40vw, 160px); flex: none; }
.results-stats { width: min(100%, 360px); margin: 0; padding: 4px 14px; border: 2px solid var(--steel-shade); border-radius: 18px; background: var(--floor); }
.results-stats > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 2px; }
.results-stats > div + div { border-top: 2px solid rgba(145, 164, 183, 0.25); }
.results-stats dt { display: flex; align-items: center; gap: 12px; font-size: 17px; color: var(--stone); }
.results-stats dd { margin: 0; font-size: 22px; font-variant-numeric: tabular-nums; color: var(--cream); }
.results-stats svg { width: 24px; height: 24px; flex: none; fill: none; stroke: var(--steel); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.results-stats svg .fill { fill: var(--steel); stroke: none; }
.results-stats svg .star { fill: var(--gold); }
.results-stats svg .wood { fill: var(--wood); stroke: var(--ink); }
.results-stats svg .heart { fill: var(--coral); stroke: var(--ink); stroke-width: 1.5; }
.results-actions { display: flex; flex-direction: column; align-items: center; gap: 10px; width: min(100%, 320px); margin-top: 4px; }
.menu-btn { width: 100%; min-height: 56px; border-radius: 18px; font: inherit; font-size: 24px; font-weight: 900; cursor: pointer; touch-action: manipulation; }
.menu-primary { border: 0; background: var(--gold); color: var(--ink); }
.menu-quiet { min-height: 48px; font-size: 18px; border: 2px solid var(--steel); background: var(--ink); color: var(--stone); }
.menu-btn:focus { outline: none; }
.menu-btn:focus-visible { outline: 3px solid var(--cream); outline-offset: 3px; }
:root[data-motion="reduced"] .results { animation: none; }
@media (max-height: 800px) {
  .results { gap: 9px; padding-top: calc(var(--safe-top) + 10px); padding-bottom: calc(var(--safe-bottom) + 10px); }
  .results-knight { height: min(32vw, 118px); }
  .results-stats > div { padding: 7px 2px; }
}
@media (max-height: 700px) {
  .results { gap: 8px; }
  .results-knight { height: 80px; }
  .results-stats > div { padding: 5px 2px; }
  .menu-btn { min-height: 48px; font-size: 20px; }
}

/* ---- M3: title extras, scrap, forge, intro, save data ------------------------ */

.menu-secondary { border: 0; background: var(--teal); color: var(--ink); }
.menu-link {
  min-height: 44px; padding: 0 12px; border: 0; background: transparent;
  color: var(--stone); font: inherit; font-size: 16px; font-weight: 800;
  text-decoration: underline; text-decoration-color: var(--steel-shade); text-underline-offset: 4px;
  cursor: pointer; touch-action: manipulation;
}
.menu-link:focus { outline: none; }
.menu-link:focus-visible { outline: 3px solid var(--cream); outline-offset: 2px; border-radius: 8px; }
.title-more { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%; }
.title-more .menu-btn { min-height: 52px; font-size: 22px; }
.title-links { display: flex; justify-content: center; align-items: center; gap: 6px; flex-wrap: wrap; }
.title-notice { margin: 0; max-width: 340px; text-align: center; font-size: 13px; line-height: 1.3; color: var(--gold); }
.title-notice[hidden] { display: none; }

.scrap-icon { width: 26px; height: auto; flex: none; }
.results-stats .scrap-icon { width: 26px; }
.results-stats .rs-scrap dd { color: var(--gold); }
.results-total { margin: 0; color: var(--stone); font-size: 16px; }
.results-total strong { color: var(--gold); font-size: 20px; margin-left: 6px; font-variant-numeric: tabular-nums; }

.screen {
  position: fixed; inset: 0; z-index: 55;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: calc(var(--safe-top) + 14px) 16px calc(var(--safe-bottom) + 16px);
  background: var(--ink); color: var(--cream);
  overflow-y: auto; outline: none; -webkit-overflow-scrolling: touch;
  scroll-padding: calc(var(--safe-top) + 10px) 0 calc(var(--safe-bottom) + 10px);
}
.screen[hidden] { display: none; }
.screen > * { width: min(100%, 420px); flex: none; }
.screen-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.screen-head h1 { margin: 0; font-size: clamp(28px, 8vw, 36px); font-weight: 900; color: var(--cream); }
.screen-head-spacer { width: 52px; }
.btn-back {
  width: 52px; height: 48px; flex: none; border: 2px solid var(--steel); border-radius: 14px;
  background: var(--ink); color: var(--cream); cursor: pointer; touch-action: manipulation;
  display: grid; place-items: center;
}
.btn-back svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.btn-back:focus { outline: none; }
.btn-back:focus-visible { outline: 3px solid var(--cream); outline-offset: 2px; }
.scrap-pill {
  margin: 0; display: flex; align-items: center; gap: 6px; min-width: 52px; padding: 6px 12px;
  border: 2px solid var(--gold); border-radius: 999px; color: var(--gold); font-size: 20px; font-variant-numeric: tabular-nums;
}

.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; }
.forge-h2, .save-block h2 { margin: 4px 0 0; font-size: 22px; font-weight: 900; color: var(--cream); }
/* Shown in place of a menu icon that failed to load (never a broken-image box). */
.icon-fallback { display: inline-grid; place-items: center; aspect-ratio: 1; flex: none; border: 2px solid var(--steel-shade); border-radius: 12px; background: var(--ink); color: var(--stone); font-weight: 900; line-height: 1; }
.icon-fallback.scrap-icon { width: 26px; border-radius: 50%; font-size: 11px; }

/* Forge (M3.6, simplified 6 October 2026). One scrolling area (the screen):
   a sticky top (header and shell selector, so the shell being changed is
   always visible) and a sticky Done footer that sits after the last card in
   the flow, so it never covers it. No transforms anywhere in it. */
.forge { gap: 10px; scroll-padding: calc(var(--safe-top) + 128px) 0 calc(var(--safe-bottom) + 112px); }
.forge-top {
  position: sticky; top: calc(-1 * (var(--safe-top) + 14px)); z-index: 2;
  margin-top: calc(-1 * (var(--safe-top) + 14px)); padding: calc(var(--safe-top) + 10px) 0 10px;
  display: flex; flex-direction: column; gap: 8px; background: var(--ink); box-shadow: 0 10px 10px -6px var(--ink);
}
.forge-head h1 { font-size: clamp(26px, 7.6vw, 34px); }
.forge .scrap-pill { border: 0; padding: 6px 2px 6px 8px; }
.forge-shell { width: 100%; }
.forge-shell button { min-height: 46px; font-size: 18px; }
.forge-card { border-radius: 16px; background: var(--floor); }
.forge-current { display: flex; align-items: center; gap: 12px; padding: 8px 14px; }
.forge-knight { width: 64px; height: 64px; flex: none; }
.forge-current-side { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.forge-loadout-title { margin: 0; font-size: 19px; font-weight: 900; color: var(--cream); }
.forge-slot { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 16px; line-height: 1.25; color: var(--stone); }
.forge-slot img, .forge-slot .icon-fallback { width: 28px; height: auto; flex: none; }
.forge-slot .icon-fallback { border-radius: 8px; font-size: 11px; }
/* Tabs: underlined, the open one in Gold. */
.forge-tabs { display: flex; border-bottom: 2px solid var(--steel-shade); }
.forge-tabs button {
  flex: 1; min-width: 0; min-height: 48px; margin-bottom: -2px; padding: 0 4px; border: 0; border-bottom: 3px solid transparent; background: transparent;
  color: var(--steel); font: inherit; font-size: clamp(16px, 4.8vw, 19px); font-weight: 900; white-space: nowrap; cursor: pointer; touch-action: manipulation;
}
.forge-tabs button[aria-selected="true"] { color: var(--cream); border-bottom-color: var(--gold); }
.forge-tabs button:focus { outline: none; }
.forge-tabs button:focus-visible { outline: 3px solid var(--cream); outline-offset: -3px; border-radius: 8px; }
.forge-panel[hidden] { display: none; }
.forge-intro { margin: 0 0 10px; font-size: 14px; line-height: 1.35; color: var(--steel); }
.forge-items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.forge-item { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px 14px; border-radius: 16px; background: var(--floor); }
.forge-item p { margin: 0; }
.fc-head { display: flex; align-items: center; gap: 12px; }
.fc-icon { width: 52px; height: 52px; flex: none; display: grid; place-items: center; }
.fc-icon img { max-width: 52px; max-height: 52px; width: auto; height: auto; }
.fc-icon .icon-fallback { width: 52px; font-size: 18px; }
.fc-title { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; }
.fc-title h3 { margin: 0; font-size: 19px; font-weight: 900; color: var(--cream); }
.fc-badge { font-size: 13px; font-weight: 900; padding: 2px 8px; border-radius: 8px; background: var(--teal); color: var(--ink); }
.fc-title .fc-level { flex-basis: 100%; font-size: 14px; font-weight: 800; color: var(--steel); }
.fc-blurb { font-size: 15px; line-height: 1.3; color: var(--stone); }
.fc-compare { display: flex; align-items: center; gap: 10px; }
/* The comparison wraps inside itself (label above values when narrow), so Details stays on the right. */
.forge-item .item-effect { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 0 8px; flex-wrap: wrap; font-size: 17px; color: var(--cream); }
.fx-label { font-size: 14px; font-weight: 800; color: var(--steel); }
.fx-values { font-weight: 900; font-variant-numeric: tabular-nums; }
.fx-values strong { color: var(--teal); font-weight: 900; }
.fx-arrow { color: var(--steel); }
.fc-more {
  flex: none; min-height: 44px; padding: 0 2px 0 8px; border: 0; background: transparent; color: var(--teal); font: inherit; font-size: 15px; font-weight: 800;
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer; touch-action: manipulation;
}
.fc-chev { display: inline-block; margin-left: 4px; text-decoration: none; }
.fc-more[aria-expanded="true"] .fc-chev { visibility: hidden; }
.fc-more:focus { outline: none; }
.fc-more:focus-visible { outline: 3px solid var(--cream); outline-offset: 2px; border-radius: 8px; }
.fc-details { padding: 10px 12px; border-radius: 12px; background: var(--ink); font-size: 14px; font-weight: 600; line-height: 1.4; color: var(--stone); }
.fc-details[hidden] { display: none; }
.forge-item .item-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.item-btn {
  flex: 1 1 140px; min-height: 48px; padding: 0 10px; border: 0; border-radius: 14px; font: inherit; font-size: 17px; font-weight: 900; white-space: nowrap;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; touch-action: manipulation;
}
.item-btn.buy { background: var(--gold); color: var(--ink); }
.item-btn .btn-scrap { width: 22px; height: auto; margin-left: 6px; }
.item-btn .icon-fallback.btn-scrap { display: none; }
.item-btn.equip { background: var(--teal); color: var(--ink); }
.item-btn.quiet { background: var(--ink); color: var(--stone); border: 2px solid var(--steel-shade); }
.item-btn:disabled { background: var(--ink); color: var(--steel); border: 2px dashed var(--steel-shade); cursor: not-allowed; }
.item-btn:disabled .btn-scrap { opacity: 0.6; }
.item-btn:focus { outline: none; }
.item-btn:focus-visible { outline: 3px solid var(--cream); outline-offset: 2px; }
.fc-need { font-size: 14px; font-weight: 800; color: var(--gold); }
.forge-msg { margin: 0; text-align: center; font-size: 15px; color: var(--gold); }
.forge-msg:empty { display: none; }
.forge-foot {
  position: sticky; bottom: calc(-1 * (var(--safe-bottom) + 16px)); z-index: 2; margin-top: auto;
  display: flex; flex-direction: column; gap: 6px;
  padding: 10px 0 calc(var(--safe-bottom) + 12px); background: var(--ink);
  box-shadow: 0 -12px 12px -4px var(--ink);
}
.forge-foot-note { margin: 0; text-align: center; font-size: 13px; color: var(--steel); }

.intro { z-index: 60; justify-content: center; gap: 14px; }
.intro > * { width: min(100%, 560px); }
.intro-skip { position: absolute; top: calc(var(--safe-top) + 8px); right: 12px; width: auto; z-index: 1; }
.intro-figure { margin: 0; display: flex; flex-direction: column; gap: 14px; }
.intro-frame {
  position: relative; width: 100%; aspect-ratio: 4 / 3; max-height: 56vh; margin: 0 auto;
  border-radius: 18px; overflow: hidden; background: var(--floor); border: 2px solid var(--steel-shade);
}
.intro-img { display: block; width: 100%; height: 100%; object-fit: contain; animation: intro-in 0.25s ease-out; }
.intro-img.is-hidden { visibility: hidden; }
.intro-fallback { position: absolute; inset: 0; margin: 0; display: grid; place-items: center; padding: 20px; text-align: center; color: var(--steel); font-size: 16px; }
.intro-fallback[hidden] { display: none; }
.intro-caption { margin: 0; min-height: 2.6em; text-align: center; font-size: clamp(19px, 5.4vw, 24px); line-height: 1.3; color: var(--cream); font-weight: 900; }
.intro-dots { display: flex; justify-content: center; gap: 8px; }
.intro-dots span { width: 9px; height: 9px; border-radius: 50%; background: var(--steel-shade); }
.intro-dots span.on { background: var(--gold); }
.intro-next { width: min(100%, 320px) !important; }
@keyframes intro-in { from { opacity: 0; } to { opacity: 1; } }
:root[data-motion="reduced"] .intro-img { animation: none; }

.savedata { z-index: 58; }
.save-status { margin: 0; font-size: 15px; line-height: 1.35; color: var(--stone); }
.save-status.warn { color: var(--gold); }
.save-summary { margin: 0; font-size: 15px; color: var(--steel); }
.save-block { display: flex; flex-direction: column; gap: 8px; padding: 12px; border: 2px solid var(--steel-shade); border-radius: 18px; background: var(--floor); }
.save-block[hidden] { display: none; }
.save-help { margin: 0; font-size: 14px; line-height: 1.3; color: var(--stone); }
.save-row { display: flex; gap: 8px; }
.save-btn { flex: 1; min-height: 46px; font-size: 18px; display: grid; place-items: center; text-align: center; }
.save-btn[hidden] { display: none; }
.save-file { position: relative; overflow: hidden; }
.save-file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; font-size: 16px; }
.save-text {
  width: 100%; resize: vertical; border: 2px solid var(--steel-shade); border-radius: 12px; padding: 8px;
  background: var(--ink); color: var(--cream); font: 13px/1.3 ui-monospace, "SF Mono", Menlo, monospace;
  -webkit-user-select: text; user-select: text;
}

.confirm { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 20px; background: rgba(10, 16, 28, 0.78); }
.confirm[hidden] { display: none; }
.confirm-box { width: min(100%, 360px); padding: 18px; border: 2px solid var(--gold); border-radius: 20px; background: var(--ink); display: flex; flex-direction: column; gap: 14px; }
.confirm-text { margin: 0; font-size: 17px; line-height: 1.4; color: var(--cream); white-space: pre-line; }
.confirm-actions { display: flex; flex-direction: column; gap: 8px; }

@media (max-height: 700px) {
  .title-more .menu-btn { min-height: 46px; font-size: 20px; }
  .forge-foot .menu-btn { min-height: 50px; }
  .forge-current { padding: 6px 12px; }
  .forge-knight { width: 52px; height: 52px; }
  .intro-caption { font-size: 18px; }
}

/* ---- debug sheet --------------------------------------------------------------- */

.debug {
  position: absolute;
  left: 8px; right: 8px;
  bottom: calc(var(--safe-bottom) + 8px);
  max-height: 62dvh;
  overflow: auto;
  padding: 12px 14px 14px;
  background: var(--ink);
  border: 2px solid var(--gold);
  border-radius: 18px;
  z-index: 10;
  touch-action: pan-y;
  font-size: 13px;
}
.debug[hidden] { display: none; }
.debug-head { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.debug-head strong { font-size: 16px; color: var(--gold); }
.debug-head .btn { margin-left: auto; }
.dbg-check { display: flex; align-items: center; gap: 6px; color: var(--stone); }
.dbg-check input { width: 20px; height: 20px; accent-color: var(--teal); }

.dbg-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 8px;
  padding: 6px 0;
  color: var(--stone);
}
.dbg-value { color: var(--teal); font-variant-numeric: tabular-nums; }
.dbg-row input { grid-column: 1 / -1; width: 100%; height: 28px; accent-color: var(--teal); touch-action: pan-x; }

.dbg-motion { display: flex; align-items: center; gap: 10px; padding: 4px 0 6px; color: var(--stone); }
.dbg-motion .seg { flex: 1; }
.seg-small button { min-height: 36px; font-size: 13px; }

.debug-readout {
  margin: 8px 0 0;
  padding: 10px;
  border-radius: 10px;
  background: var(--floor);
  color: var(--cream);
  font: 600 12px/1.5 ui-monospace, "SF Mono", Menlo, monospace;
  white-space: pre;
}

/* ---- narrow phones (320-360 CSS px) ---------------------------------------- */

@media (max-width: 360px) {
  .hud { padding: 0 4px; }
  .hud-row { gap: 8px; }
  .seg { min-width: 0; }
  .seg button { font-size: 14px; padding: 0 2px; }
  .hud-status { gap: 6px; }
  .chip { width: 150px; padding: 8px 8px; font-size: 13px; }
  .btn-debug { padding: 0 6px; font-size: 11px; }
  .helper { font-size: 13px; }
}

/* ---- M3.5: castle map, room details, room result ------------------------------ */

.title-row { display: flex; gap: 8px; width: 100%; }
.title-row .menu-btn { flex: 1; padding: 0 6px; font-size: 20px; }
.results-stars { margin-left: 10px; color: var(--gold); }
.results-stars:empty { display: none; }

.castle { z-index: 54; }
.star { display: inline-grid; place-items: center; width: 22px; height: 22px; flex: none; }
.star svg { width: 100%; height: 100%; fill: none; stroke: var(--steel); stroke-width: 2; stroke-linejoin: round; }
.star.on svg { fill: var(--gold); stroke: var(--gold); }
.star.big { width: 40px; height: 40px; }
.star.is-new svg { stroke: var(--cream); stroke-width: 2.4; }

.map-sub { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; }
.map-sub strong { font-size: 17px; color: var(--gold); }
.map-sub span { font-size: 14px; color: var(--steel); }
.map-rooms { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.map-card {
  width: 100%; min-height: 104px; display: flex; align-items: center; gap: 12px; padding: 10px;
  border: 2px solid var(--steel-shade); border-radius: 18px; background: var(--floor); color: var(--cream);
  font: inherit; text-align: left; cursor: pointer; touch-action: manipulation;
}
.map-card.is-new, .map-card.is-improve, .map-card.is-legacy { border-color: var(--gold); }
.map-card:disabled { cursor: default; opacity: 1; background: var(--ink); }
.map-card:focus { outline: none; }
.map-card:focus-visible { outline: 3px solid var(--cream); outline-offset: 2px; }
.map-thumb { width: 78px; height: 86px; flex: none; border-radius: 8px; }
.map-card-body { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.map-card-title { display: flex; align-items: baseline; gap: 8px; font-size: 19px; font-weight: 900; }
.map-num { font-size: 24px; color: var(--gold); }
.map-card:disabled .map-card-title, .map-card:disabled .map-num { color: var(--steel); }
.map-stars { display: flex; gap: 4px; min-height: 22px; }
.map-state { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; padding: 4px 12px; border-radius: 999px; background: var(--teal); color: var(--ink); font-size: 15px; }
.map-card.is-improve .map-state, .map-card.is-new .map-state, .map-card.is-legacy .map-state { background: var(--gold); }
.map-card:disabled .map-state { background: transparent; color: var(--steel); padding: 0; }
.map-state svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; }
.map-total { margin: 0; text-align: center; font-size: 15px; color: var(--steel); }

.loadout { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 2px solid var(--steel-shade); border-radius: 18px; background: var(--floor); }
.loadout-knight { width: 64px; height: 64px; flex: none; }
.loadout-text { flex: 1; min-width: 0; }
.loadout-text p { margin: 0; }
.loadout-label { font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--steel); }
.loadout-item { font-size: 16px; line-height: 1.3; color: var(--cream); white-space: pre-line; }
.loadout-note { font-size: 12px; line-height: 1.3; color: var(--steel); }
.menu-btn.loadout-btn { width: auto; flex: none; min-height: 48px; padding: 0 14px; font-size: 17px; }

.ri-head { text-align: center; }
.ri-head h2 { margin: 0; font-size: clamp(26px, 8vw, 34px); font-weight: 900; }
.ri-head p { margin: 2px 0 0; font-size: 15px; color: var(--steel); }
#room-info .screen-head h1 { flex: 1; min-width: 0; text-align: center; font-size: clamp(19px, 6.4vw, 30px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ri-thumb { width: auto !important; height: min(26vh, 220px); aspect-ratio: 408 / 448; align-self: center; }
/* Play and Back stay reachable at the bottom of the scrolling details screen. */
.ri-actions {
  position: sticky; bottom: calc(-1 * (var(--safe-bottom) + 16px)); margin-top: auto;
  display: flex; flex-direction: column; gap: 8px;
  padding: 10px 0 calc(var(--safe-bottom) + 16px); background: var(--ink);
  box-shadow: 0 -12px 12px -4px var(--ink);
}
.ri-actions .menu-btn { min-height: 52px; font-size: 21px; }
.ri-actions .menu-quiet { min-height: 44px; font-size: 17px; }
.ri-summary { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.ri-stars { display: flex; justify-content: center; gap: 10px; }
.ri-count { margin: 0; font-size: 14px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--steel); }
.ri-card { display: flex; flex-direction: column; gap: 6px; padding: 12px; }
.ri-card h3 { margin: 0; font-size: 18px; font-weight: 900; text-transform: uppercase; letter-spacing: 0.04em; }
.ri-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.ri-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.ri-row + .ri-row { border-top: 2px solid rgba(145, 164, 183, 0.25); }
.ri-row .star { width: 30px; height: 30px; }
.ri-text { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ri-text strong { font-size: 16px; font-weight: 900; color: var(--cream); }
.ri-text span { font-size: 13px; line-height: 1.3; color: var(--steel); }
.ri-check, .ri-badge { width: 30px; flex: none; display: grid; place-items: center; color: var(--teal); font-size: 12px; font-weight: 900; }
.ri-check svg, .ri-badge svg { width: 26px; height: 26px; fill: none; stroke: var(--teal); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.ri-badge:not(:has(svg, img)):not(:empty) { width: auto; padding: 2px 8px; border-radius: 999px; background: var(--gold); color: var(--ink); }
.ri-note, .ri-bonus { margin: 0; font-size: 13px; line-height: 1.3; color: var(--steel); text-align: center; }
.ri-bonus { color: var(--gold); }

.room-result { gap: 8px; }
.room-result .rr-stars .star.big { width: 34px; height: 34px; }
.rr-caption { margin: 0 0 -4px; font-size: 13px; font-weight: 900; letter-spacing: 0.06em; text-transform: uppercase; color: var(--stone); }
.room-result .rr-list { width: min(100%, 360px); padding: 2px 14px; border: 2px solid var(--steel-shade); border-radius: 18px; background: var(--floor); }
.room-result .rr-list .ri-row { padding: 4px 0; }
.room-result .rr-stats > div { padding: 6px 2px; }
.rr-stats dt { font-size: 16px; }
.rr-stats dd { font-size: 20px; }
@media (max-height: 760px) {
  .room-result { gap: 6px; }
  .room-result .heading, .room-result .results-heading { font-size: 30px; }
  .room-result .rr-list .ri-row { padding: 2px 0; }
  .room-result .rr-stats > div { padding: 4px 2px; }
}
@media (max-height: 700px) {
  .room-result .results-heading { font-size: 26px; }
  .room-result .results-sub { font-size: 14px; }
  .room-result .rr-stars .star.big { width: 28px; height: 28px; }
}

/* ---- pause panel (combat iteration): Reset, Aim Assist, sound, motion, Debug ---- */

.pp-row { display: flex; gap: 8px; width: 100%; }
.pp-row .menu-btn { flex: 1; min-width: 0; padding: 0 8px; white-space: nowrap; font-size: 17px; }
.pp-row .with-icon { gap: 6px; }
.pp-row .menu-btn .ui-icon { width: 20px; height: 20px; }
@media (max-width: 369px) { .pp-row .menu-btn .ui-icon { display: none; } }   /* the label always fits */
.pause-panel {
  position: absolute; inset: 0; z-index: 9;
  display: flex; justify-content: center; align-items: flex-start;
  padding: calc(var(--safe-top) + 12px) 12px calc(var(--safe-bottom) + 12px);
  background: rgba(23, 36, 58, 0.86);
  overflow-y: auto; -webkit-overflow-scrolling: touch; outline: none; touch-action: pan-y;
}
.pause-panel[hidden] { display: none; }
.pause-sheet {
  width: min(100%, 380px); margin: auto 0; display: flex; flex-direction: column; gap: 10px;
  padding: 16px; border: 2px solid var(--teal); border-radius: 20px; background: var(--ink);
}
.pause-sheet h2 { margin: 0; text-align: center; font-size: 26px; font-weight: 900; color: var(--cream); }
.pause-sheet .menu-btn { min-height: 50px; font-size: 21px; }
.pp-group { display: flex; flex-direction: column; gap: 6px; padding-top: 4px; border-top: 2px solid rgba(145, 164, 183, 0.25); }
.pp-label { margin: 0; font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--steel); }
.pp-note { margin: 0; font-size: 13px; line-height: 1.3; color: var(--stone); }
.pp-row { display: flex; gap: 8px; }
.pp-toggle {
  flex: 1; min-height: 44px; border-radius: 12px; border: 2px solid var(--steel-shade); background: var(--ink); color: var(--steel);
  font-size: 16px; cursor: pointer;
}
.pp-toggle[aria-pressed="true"] { border-color: var(--teal); background: var(--teal); color: var(--ink); }
.pp-check { min-height: 44px; }
.pause-sheet .btn-debug { align-self: center; min-height: 44px; padding: 0 18px; }
@media (max-height: 640px) {
  .pause-sheet { gap: 7px; padding: 12px; }
  .pause-sheet .menu-btn { min-height: 46px; font-size: 19px; }
}

.dbg-copy { display: flex; align-items: center; gap: 8px; margin: 2px 0 6px; }

/* ---- UI icon set (img/ui-*.png from assets/sprites/ui-icons.png) ---------------- */
.ui-icon { display: block; width: 24px; height: 24px; flex: none; object-fit: contain; }
.with-icon { display: inline-flex; align-items: center; justify-content: center; gap: 10px; }
.menu-btn.with-icon { display: flex; }
.menu-btn .ui-icon { width: 28px; height: 28px; }
.menu-quiet .ui-icon, .loadout-btn .ui-icon { width: 24px; height: 24px; }
.menu-link.with-icon .ui-icon { width: 22px; height: 22px; }
.results-stats dt .ui-icon { width: 26px; height: 26px; }
.btn-back .ui-icon { width: 24px; height: 24px; }
.btn-round .ui-icon { width: 26px; height: 26px; }
.btn-sound .i-off, .btn-sound.is-off .i-on { display: none; }
.btn-sound.is-off .i-off { display: block; }
.pp-toggle .ui-icon { width: 22px; height: 22px; }
.pp-toggle[aria-pressed="true"] .i-off, .pp-toggle[aria-pressed="false"] .i-on { display: none; }
.star .ui-icon, .star .icon-fallback-svg { width: 100%; height: 100%; }
.star.is-new .ui-icon { filter: drop-shadow(0 0 2px var(--cream)) drop-shadow(0 0 1px var(--cream)); }
.map-state .ui-icon { width: 18px; height: 18px; }
.ri-check .ui-icon, .ri-badge .ui-icon { width: 24px; height: 24px; }
.icon-fallback-svg { display: inline-grid; place-items: center; width: 24px; height: 24px; flex: none; }
.icon-fallback-svg svg { width: 100%; height: 100%; }

/* ---- Campaign (6 October 2026): goal line, chapters, loot summary, Customise, completion ---- */
.title-goal { margin: -4px 0 0; max-width: 340px; text-align: center; font-size: 13px; line-height: 1.25; color: var(--gold); }
.title-goal:empty { display: none; }
.title-row-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.title-more .title-row-3 .menu-btn { flex-direction: column; gap: 2px; padding: 4px 2px; min-height: 56px; font-size: 15px; line-height: 1.1; }
.title-row-3 .menu-btn .ui-icon, .title-row-3 .cos-btn-icon { width: 24px; height: 24px; }
.title-row-3 .menu-btn span { white-space: nowrap; }
@media (max-width: 360px) { .title-more .title-row-3 .menu-btn { font-size: 13px; } .title-links { gap: 2px; } .title-links .menu-link { font-size: 15px; } }
.title-row-3 .menu-btn .ui-icon { width: 22px; height: 22px; }
.cos-btn-icon { display: block; width: 26px; height: 26px; flex: none; object-fit: contain; }
.cos-dt-icon { display: block; width: 26px; height: 26px; flex: none; object-fit: contain; }
.title-links .menu-link[hidden] { display: none; }

.map-chapter { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-top: 6px; padding: 0 4px; }
.map-chapter h2 { margin: 0; font-size: 15px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--stone); }
.map-chapter span { font-size: 13px; color: var(--steel); font-variant-numeric: tabular-nums; }
.map-card.is-boss { border-style: solid; box-shadow: inset 0 0 0 2px rgba(255, 120, 107, 0.35); }
.map-boss { align-self: flex-start; padding: 1px 8px; border-radius: 999px; background: var(--coral); color: var(--ink); font-size: 12px; font-weight: 900; letter-spacing: 0.06em; text-transform: uppercase; }

.found-list { list-style: none; margin: 0; padding: 6px 14px; width: min(100%, 360px); border: 2px solid var(--gold); border-radius: 16px; background: var(--floor); }
.found-list[hidden] { display: none; }
.found-list li { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 6px 0; font-size: 15px; }
.found-list li + li { border-top: 2px solid rgba(145, 164, 183, 0.25); }
.found-list strong { color: var(--cream); font-weight: 900; }
.found-list span { flex: none; color: var(--steel); font-size: 13px; }
.found-list .found-item strong, .found-list .found-cosmetic strong { color: var(--gold); }

.fc-found { margin: 0; font-size: 14px; line-height: 1.3; color: var(--steel); }
.forge-foot-row { display: flex; gap: 8px; }
.forge-foot-row .menu-btn { flex: 1; }
.forge-foot-row .menu-quiet { flex: 0.8; font-size: 20px; }

.customise { gap: 10px; scroll-padding: calc(var(--safe-top) + 230px) 0 calc(var(--safe-bottom) + 100px); }
.cz-top {
  position: sticky; top: calc(-1 * (var(--safe-top) + 14px)); z-index: 2;
  margin-top: calc(-1 * (var(--safe-top) + 14px)); padding: calc(var(--safe-top) + 10px) 0 6px;
  display: flex; flex-direction: column; gap: 8px; background: var(--ink); box-shadow: 0 10px 10px -6px var(--ink);
}
.cz-preview { display: flex; align-items: center; gap: 12px; padding: 6px 12px; border-radius: 16px; background: var(--floor); }
.cz-knight { width: 150px; height: 150px; flex: none; margin: -10px -8px -14px -10px; }
.cz-preview-side { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.cz-preview-side .seg button { min-height: 44px; font-size: 16px; }
.cz-note { margin: 0; font-size: 13px; line-height: 1.3; color: var(--stone); }
.cz-tabs { display: grid; grid-template-columns: repeat(6, 1fr); border-bottom: 2px solid var(--steel-shade); }
.cz-tabs button {
  min-height: 44px; padding: 0 2px; border: 0; border-bottom: 3px solid transparent; background: none; color: var(--steel);
  font: inherit; font-size: 15px; font-weight: 900; cursor: pointer; touch-action: manipulation;
}
.cz-tabs button[aria-selected="true"] { color: var(--cream); border-bottom-color: var(--gold); }
.cz-tabs button:focus { outline: none; }
.cz-tabs button:focus-visible { outline: 3px solid var(--cream); outline-offset: -3px; border-radius: 8px; }
.cz-items { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.cz-item {
  width: 100%; min-height: 128px; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 8px;
  border: 2px solid var(--steel-shade); border-radius: 16px; background: var(--floor); color: var(--cream);
  font: inherit; text-align: center; cursor: pointer; touch-action: manipulation;
}
.cz-item.is-worn { border-color: var(--teal); box-shadow: inset 0 0 0 2px var(--teal); }
.cz-item.is-locked { background: var(--ink); color: var(--steel); }
.cz-item.is-locked .cz-art { opacity: 0.45; filter: grayscale(0.6); }
.cz-item:focus { outline: none; }
.cz-item:focus-visible { outline: 3px solid var(--cream); outline-offset: 2px; }
.cz-art { display: grid; place-items: center; width: 64px; height: 56px; }
.cz-icon { width: 60px; height: 56px; object-fit: contain; }
.cz-art .icon-fallback { width: 48px; font-size: 12px; }
.cz-name { font-size: 16px; font-weight: 900; line-height: 1.15; }
.cz-sub { font-size: 13px; line-height: 1.25; color: var(--steel); }
.cz-item.is-worn .cz-sub { color: var(--teal); }
.cz-swatch { display: block; width: 44px; height: 44px; border: 3px solid var(--ink); border-radius: 50%; box-shadow: 0 0 0 2px var(--steel-shade); }
.cz-swatch.is-cape { width: 46px; height: 30px; border-radius: 4px 50% 50% 4px; clip-path: polygon(0 0, 100% 40%, 100% 100%, 0 100%); }
.cz-swatch.is-none { background: transparent; border-style: dashed; border-color: var(--steel); box-shadow: none; }
.cz-swatch.is-starry { background-image: radial-gradient(circle at 30% 30%, var(--gold) 0 3px, transparent 4px), radial-gradient(circle at 68% 58%, var(--gold) 0 3px, transparent 4px), radial-gradient(circle at 40% 76%, var(--gold) 0 2px, transparent 3px); }
.cz-swatch.is-patch { background-image: linear-gradient(135deg, var(--coral) 0 30%, transparent 30%), linear-gradient(315deg, var(--teal) 0 28%, transparent 28%); }

.complete { z-index: 58; }
.cp-note { margin: 0; color: var(--steel); font-size: 14px; text-align: center; }
