/* DESIGN.md heritage arcade tokens; all game surfaces use these aliases. */
:root {
  --ink: rgb(10 10 10);
  --slab: rgb(29 29 31);
  --paper: rgb(249 248 242);
  --ocher: rgb(179 139 109);
  --action: rgb(162 35 29);
  --celadon: rgb(43 75 99);
  --pine: oklch(0.48 0.08 155);
  --rose: oklch(0.72 0.12 20);
  --gold: oklch(0.81 0.12 85);
  --muted: color-mix(in srgb, var(--paper) 65%, var(--ink));
  --line: color-mix(in srgb, var(--ocher) 35%, var(--ink));
  font-family:
    Pretendard,
    -apple-system,
    BlinkMacSystemFont,
    system-ui,
    sans-serif;
  color: var(--paper);
  background: var(--ink);
  font-variant-numeric: tabular-nums;
  color-scheme: dark;
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
}
main {
  position: fixed;
  inset: 0;
  background: var(--ink);
}
#battle {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  outline-offset: -4px;
}
button,
a {
  touch-action: manipulation;
}
button {
  font: inherit;
  color: inherit;
  background: var(--slab);
  border: 1px solid var(--line);
  border-radius: 4px;
  min-height: 44px;
  padding: 8px 14px;
  cursor: pointer;
}
button:disabled {
  opacity: 0.5;
  cursor: default;
}
button:focus-visible,
a:focus-visible,
canvas:focus-visible {
  outline: 2px solid var(--ocher);
  outline-offset: 3px;
}
button:active {
  transform: translateY(1px);
}
a {
  color: var(--muted);
  text-decoration: none;
  font-size: 12px;
  min-height: 44px;
  display: flex;
  align-items: center;
}
header {
  position: absolute;
  inset: max(12px, env(safe-area-inset-top)) 20px auto;
  display: flex;
  gap: 12px;
  align-items: center;
}
header .brand {
  flex: 1;
  text-align: center;
  font-size: 15px;
  font-weight: 600;
}
.brand small {
  display: block;
  color: var(--ocher);
  font-size: 9px;
  font-weight: 400;
  margin-top: 4px;
}
header button {
  font-size: 11px;
  padding: 6px 10px;
}
#pause {
  font-size: 18px;
}
.hud {
  position: absolute;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 24px;
  white-space: nowrap;
  padding: 10px 20px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--ink) 70%, transparent);
  font-size: 12px;
}
#health {
  color: var(--rose);
}
#coins {
  color: var(--gold);
}
#combo {
  color: var(--ocher);
}
#announcement {
  position: absolute;
  left: 20px;
  right: 20px;
  top: 124px;
  text-align: center;
  font-size: 11px;
  color: var(--muted);
  pointer-events: none;
  margin: 0;
  text-shadow: 0 1px 2px var(--ink);
}
.weapon-bar {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: max(16px, env(safe-area-inset-bottom));
  width: min(680px, calc(100% - 32px));
  display: flex;
  align-items: center;
  gap: 16px;
  background: color-mix(in srgb, var(--ink) 94%, transparent);
  border: 1px solid var(--line);
  padding: 12px 18px;
  border-radius: 0 8px 0 8px;
  min-height: 112px;
}
.weapon-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.weapon-info small {
  color: var(--ocher);
  font-size: 10px;
}
.weapon-info strong {
  font-size: 21px;
  font-weight: 500;
}
.weapon-info > span {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.5;
}
#power {
  color: var(--gold);
}
#tree-toggle {
  font-size: 12px;
  line-height: 1.8;
  border-color: var(--ocher);
}
#tree-toggle small {
  font-size: 9px;
  color: var(--muted);
}
#scabbard {
  position: relative;
  align-self: stretch;
  flex: 0 0 80px;
  padding: 0;
  border: 0;
  background: transparent;
  touch-action: none;
  min-height: 85px;
  --pull: 0px;
}
.grip {
  position: absolute;
  width: 16px;
  height: 30px;
  background: repeating-linear-gradient(
    45deg,
    var(--ocher) 0 4px,
    var(--ink) 4px 7px
  );
  border: 1px solid var(--ocher);
  left: 32px;
  top: calc(0px - var(--pull));
  border-radius: 3px;
  transform: rotate(-12deg);
}
.guard {
  position: absolute;
  left: 20px;
  top: calc(27px - var(--pull));
  width: 40px;
  height: 7px;
  background: var(--gold);
  transform: rotate(-12deg);
}
.sheath {
  position: absolute;
  width: 22px;
  height: 47px;
  background: var(--action);
  border: 2px solid var(--ocher);
  left: 31px;
  top: 34px;
  transform: rotate(-12deg);
  border-radius: 2px 2px 8px 8px;
}
.pull-label {
  position: absolute;
  left: -6px;
  right: -6px;
  bottom: -7px;
  font-size: 9px;
  white-space: nowrap;
  color: var(--ocher);
}
kbd {
  font: inherit;
  color: var(--ocher);
}
.curtain {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: color-mix(in srgb, var(--ink) 80%, transparent);
  backdrop-filter: blur(5px);
}
.notice {
  width: min(480px, 100%);
  text-align: center;
  padding: 32px;
  border: 1px solid var(--ocher);
  background: var(--ink);
  box-shadow: 12px 12px 0 color-mix(in srgb, var(--ocher) 12%, transparent);
  border-radius: 0 16px 0 16px;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--ocher);
}
h1 {
  font-weight: 500;
  font-size: clamp(32px, 6vw, 58px);
  line-height: 1.15;
  letter-spacing: -0.05em;
  margin: 24px 0;
}
.notice p {
  font-size: 13px;
  line-height: 1.9;
  color: var(--muted);
}
.notice > small {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 16px;
}
.how {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--ocher);
  margin: 24px 0;
}
.primary {
  background: var(--action);
  border-color: var(--action);
  min-height: 50px;
  width: 100%;
  font-size: 15px;
}
.muted {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
}
dialog {
  width: min(660px, calc(100% - 24px));
  max-height: calc(100dvh - 24px);
  overflow: auto;
  padding: 24px;
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ocher);
  border-radius: 0 8px 0 8px;
}
dialog::backdrop {
  background: color-mix(in srgb, var(--ink) 80%, transparent);
}
.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.drawer-head h2 {
  font-weight: 500;
  font-size: 24px;
}
#tree-wallet {
  color: var(--gold);
}
.skill-tree {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.branch-label {
  font-size: 11px;
  color: var(--ocher);
}
.skill-node {
  display: block;
  width: 100%;
  text-align: left;
  margin: 10px 0;
  min-height: 90px;
  position: relative;
}
.skill-node b {
  font-size: 13px;
  display: block;
}
.skill-node small {
  display: block;
  font-size: 10px;
  line-height: 1.6;
  color: var(--muted);
  margin-top: 5px;
}
.skill-node em {
  display: block;
  font-size: 11px;
  color: var(--gold);
  font-style: normal;
  margin-top: 8px;
}
.skill-node[data-owned="true"] {
  border-color: var(--pine);
  background: color-mix(in srgb, var(--pine) 20%, var(--ink));
}
.odds {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.odds > div {
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
  display: flex;
  justify-content: space-between;
  font-size: 11px;
}
.odds .locked {
  color: var(--muted);
  opacity: 0.6;
}
h3 {
  font-size: 15px;
  font-weight: 500;
  margin-top: 30px;
}
[hidden] {
  display: none !important;
}
@media (max-width: 600px) {
  header {
    left: 12px;
    right: 12px;
    gap: 6px;
  }
  header .brand {
    font-size: 11px;
  }
  header a {
    font-size: 10px;
  }
  header button {
    font-size: 10px;
    padding: 4px 7px;
    min-width: 44px;
  }
  .hud {
    top: 72px;
    width: calc(100% - 24px);
    justify-content: space-between;
    gap: 4px;
    padding: 9px 10px;
    font-size: 10px;
  }
  #announcement {
    top: 115px;
    font-size: 10px;
    left: 12px;
    right: 12px;
  }
  .weapon-bar {
    width: calc(100% - 20px);
    padding: 10px;
    gap: 10px;
    bottom: max(10px, env(safe-area-inset-bottom));
    min-height: 110px;
  }
  #scabbard {
    flex-basis: 60px;
  }
  .grip {
    left: 22px;
  }
  .guard {
    left: 10px;
  }
  .sheath {
    left: 21px;
  }
  .pull-label {
    font-size: 8px;
  }
  .weapon-info strong {
    font-size: 17px;
  }
  .weapon-info > span {
    font-size: 10px;
  }
  #tree-toggle {
    padding: 6px 8px;
    font-size: 10px;
  }
  #tree-toggle small {
    font-size: 8px;
  }
  .notice {
    padding: 24px 18px;
  }
  .how {
    font-size: 9px;
  }
  .skill-tree {
    gap: 8px;
  }
  dialog {
    padding: 16px;
  }
  .odds {
    grid-template-columns: 1fr;
  }
}
@media (max-height: 500px) {
  header {
    top: 8px;
  }
  .hud {
    top: 60px;
    padding: 5px 12px;
  }
  #announcement {
    top: 94px;
  }
  .weapon-bar {
    min-height: 90px;
    padding: 6px 14px;
    bottom: 8px;
  }
  .notice {
    padding: 14px 24px;
    max-width: 530px;
  }
  .notice h1 {
    font-size: 30px;
    margin: 8px;
  }
  .notice p {
    font-size: 11px;
    margin: 8px;
  }
  .how {
    margin: 12px 0;
  }
  .notice > small {
    margin-top: 8px;
  }
  .weapon-info strong {
    font-size: 18px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
  .curtain {
    backdrop-filter: none;
  }
}
header {
  background: color-mix(in srgb, var(--ink) 94%, transparent);
  border: 1px solid var(--line);
  padding: 6px 12px;
  border-radius: 0 8px 0 8px;
}
#announcement {
  display: table;
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  max-width: calc(100% - 32px);
  width: max-content;
  padding: 5px 10px;
  background: color-mix(in srgb, var(--ink) 85%, transparent);
  border-radius: 4px;
  color: var(--paper);
}
@media (max-width: 600px) {
  header {
    padding: 3px 6px;
  }
  .hud {
    top: 78px;
  }
  #announcement {
    top: 118px;
    font-size: 9px;
    line-height: 1.5;
    width: calc(100% - 32px);
  }
}

/* Stage-start focus keeps the scabbard action central before enemies move. */
#draw-gate { position:absolute; inset:150px 0 140px; display:grid; place-items:center; pointer-events:none; }
#draw-gate > div { pointer-events:auto; width:min(390px,calc(100% - 40px)); text-align:center; padding:24px; border:1px solid var(--ocher); background:color-mix(in srgb,var(--ink) 94%,transparent); border-radius:0 16px; }
#draw-gate h2 { font-size:24px; font-weight:500; }
#draw-gate p { color:var(--muted); font-size:12px; line-height:1.7; }
#draw-gate small { display:block; color:var(--gold); font-size:11px; margin:10px 0; }
.swipe-status { position:absolute; left:50%; transform:translateX(-50%); bottom:134px; width:min(420px,calc(100% - 40px)); display:flex; gap:8px; align-items:center; color:var(--paper); text-shadow:0 1px 3px var(--ink); font-size:10px; pointer-events:none; }
#swipe-meter { width:100px; height:10px; accent-color:var(--gold); }
#tutorial-start { margin-top:10px; width:100%; }
#tutorial-bar { position:absolute; top:155px; left:50%; transform:translateX(-50%); width:min(650px,calc(100% - 24px)); background:var(--ink); border:1px solid var(--gold); padding:8px; text-align:center; font-size:12px; z-index:2; }
#tutorial-bar button { font-size:11px; margin:4px; }
@media(max-width:600px) {
  .weapon-bar { min-height:88px; padding:7px; gap:6px; }
  #scabbard { min-height:76px; }
  .weapon-info { gap:3px; }
  .weapon-info strong { font-size:15px; }
  #power { display:none; }
  .swipe-status { bottom:108px; font-size:9px; width:calc(100% - 24px); }
  #draw-gate { inset:150px 0 120px; }
  #tutorial-bar { top:145px; font-size:10px; }
}
@media(max-height:500px) {
  .swipe-status { bottom:103px; }
  #draw-gate { inset:105px 0 105px; }
  #draw-gate > div { padding:8px 16px; }
  #draw-gate h2 { margin:4px; font-size:18px; }
  #draw-gate small { margin:4px; }
  #draw-gate p { margin:4px; }
  #tutorial-bar { top:105px; width:min(760px,calc(100% - 24px)); padding:3px; }
}

.gate-glyph { display:block; width:80px; height:88px; position:relative; margin:8px auto; --pull:0px; }
@media(max-height:500px) { .gate-glyph { display:none; } }

/* Desktop edition: bundled Korean type, illustration-led title and discovery. */
:root {font-family:Pretendard,-apple-system,BlinkMacSystemFont,"Noto Sans KR",system-ui,sans-serif;--reveal-glow:color-mix(in srgb,var(--gold) 35%,transparent)}
header {z-index:12}
header .brand {letter-spacing:.05em}
button {font-size:13px}
#chapters {position:absolute;top:124px;left:50%;transform:translateX(-50%);display:flex;gap:6px;pointer-events:none}
#chapters span {font-size:11px;padding:4px 20px;background:var(--ink);border-bottom:2px solid var(--line);color:var(--muted)}
#chapters [data-status=current] {color:var(--gold);border-color:var(--gold)}
#chapters [data-status=done] {color:var(--paper);border-color:var(--pine)}
#announcement {top:158px;font-size:12px}
.hud {font-size:14px;gap:38px}
.weapon-info > span {font-size:12px}
.swipe-status {font-size:12px;width:min(560px,calc(100% - 40px))}
#swipe-meter {width:160px;height:14px}
.curtain[data-screen=title] {background:linear-gradient(90deg,transparent 20%,var(--ink) 79%),url('./art/title.jpg') center/cover;backdrop-filter:none;place-items:center end;padding:88px 7vw 32px}
.curtain[data-screen=title] .notice {background:color-mix(in srgb,var(--ink) 92%,transparent);width:470px;padding:36px;text-align:left;box-shadow:18px 18px 0 color-mix(in srgb,var(--ink) 28%,transparent)}
.notice h1 {font-weight:800;font-size:clamp(38px,4vw,62px);letter-spacing:-.045em}
.notice p {font-size:14px}
.notice > small {font-size:11px}
#retry {margin-top:12px;width:100%}
#collection-panel {width:min(1000px,calc(100% - 60px))}
#collection-grid {display:grid;grid-template-columns:repeat(4,1fr);gap:14px}
#collection-grid article {padding:16px;background:var(--slab);border:1px solid var(--line)}
#collection-grid img {width:100%;height:170px;object-fit:contain}
#collection-grid h3 {font-size:16px;margin:12px 0 8px}
#collection-grid p {font-size:11px;line-height:1.8;color:var(--muted)}
#collection-grid [data-found=false] img {filter:brightness(0);opacity:.3}
#save-status {font-size:11px;color:var(--ocher)}
#draw-gate {inset:188px 0 145px}
#draw-gate > div {box-shadow:12px 12px 0 color-mix(in srgb,var(--ink) 40%,transparent)}
#reveal {position:absolute;inset:0;display:grid;place-items:center;z-index:10;background:radial-gradient(ellipse at center,var(--reveal-glow),transparent 56%),color-mix(in srgb,var(--ink) 92%,transparent);pointer-events:none;overflow:hidden}
.reveal-card {position:relative;text-align:center;width:min(700px,90vw);animation:reveal-arrive 2.15s both}
.reveal-card > span {font-size:14px;letter-spacing:.2em;color:var(--gold)}
.reveal-card img {display:block;height:clamp(230px,37vh,410px);width:100%;object-fit:contain;filter:drop-shadow(0 0 28px var(--reveal-glow));margin:22px auto}
.reveal-card h2 {font-size:clamp(28px,4vw,52px);margin:4px;font-weight:800}
.reveal-card p {font-size:16px;color:var(--paper)}
.reveal-card small {font-size:12px;color:var(--gold)}
.reveal-rays {position:absolute;width:110vmax;height:110vmax;border-radius:50%;background:repeating-conic-gradient(from 0deg,transparent 0deg 12deg,var(--reveal-glow) 12deg 14deg,transparent 14deg 28deg);animation:reveal-spin 18s linear infinite;opacity:.4}
@keyframes reveal-arrive {0%{opacity:0;transform:translateY(110px) rotate(-14deg) scale(.5)}22%{opacity:1;transform:translateY(-12px) rotate(3deg) scale(1.04)}40%,85%{opacity:1;transform:none}100%{opacity:0;transform:translateY(-25px)}}
@keyframes reveal-spin {to{transform:rotate(360deg)}}
[data-motion=reduced] *,[data-motion=reduced] *::before {animation:none!important;transition:none!important}
@media(max-width:1100px) {.curtain[data-screen=title]{padding-right:4vw}.curtain[data-screen=title] .notice{width:420px;padding:28px}.hud{gap:24px}}
@media(max-height:760px) {.reveal-card img{height:220px;margin:12px auto}.reveal-card h2{font-size:34px}.notice h1{font-size:42px;margin:16px 0}.notice p{font-size:12px}.curtain[data-screen=title] .notice{padding:22px}}

/* A scrollable armory and two clear currencies keep all 32 weapons readable. */
.upgrade-tabs {display:flex;gap:10px;margin:20px 0}
.upgrade-tabs button {flex:1;padding:14px 10px}
.upgrade-tabs [aria-pressed=true] {border-color:var(--gold);color:var(--gold);background:var(--slab)}
#weapon-select {display:block;width:100%;margin:10px 0 18px;padding:12px;background:var(--ink);color:var(--paper);border:1px solid var(--ocher);font:inherit}
#mastery-wallet {color:var(--gold);font-weight:700}
.weapon-upgrade-card {display:grid;grid-template-columns:180px 1fr;gap:24px;padding:18px;background:var(--slab);border:1px solid var(--line)}
#weapon-preview {width:100%;height:220px;object-fit:contain}
#weapon-detail,#weapon-next {font-size:13px;line-height:1.9}
#weapon-upgrade {padding:14px 20px;border-color:var(--gold)}
#odds {max-height:280px;overflow-y:auto;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 20px}
#odds > div {display:flex;justify-content:space-between;gap:8px;min-width:0;font-size:12px;white-space:normal}
details summary {cursor:pointer;padding:14px 0;color:var(--gold)}
@media(max-width:700px){.weapon-upgrade-card{grid-template-columns:110px 1fr;gap:12px}#weapon-preview{height:160px}#odds{grid-template-columns:1fr}}

/* Round breaks leave the existing skill tree one tap away. */
#round-gate{position:absolute;inset:0;z-index:12;display:grid;place-items:center;background:color-mix(in srgb,var(--ink) 35%,transparent);padding:18px}
#round-gate[hidden],#boss-status[hidden]{display:none}
#round-gate>div{max-width:480px;padding:24px;background:var(--paper);border:2px solid var(--ink);box-shadow:7px 8px 0 var(--ink);text-align:center}
#round-gate p{line-height:1.65}#round-gate button{display:block;width:100%;margin-top:12px;min-height:44px}
#boss-status{position:absolute;top:148px;left:50%;transform:translateX(-50%);width:min(90%,440px);z-index:5;display:grid;gap:3px;background:var(--paper);border:2px solid var(--ink);padding:7px 12px;pointer-events:none;text-align:center;font-size:12px}
#boss-health{width:100%;height:10px;accent-color:var(--pine)}
@media(max-width:600px){#boss-status{top:136px;font-size:11px;padding:4px 8px}#round-gate>div{padding:18px}}
@media(max-height:500px){#boss-status{top:91px;width:min(48%,440px);font-size:10px;padding:2px 6px}#round-gate>div{max-width:560px;padding:12px}#round-gate h2{margin:6px}#round-gate p{margin:6px;line-height:1.35}}

/* Paper cards explicitly override the surrounding dark interface text. */
#boss-status,#round-gate{color:var(--ink)}
#round-gate button{color:var(--paper)}
#announcement[data-boss=true]{clip-path:inset(50%);width:1px;height:1px;overflow:hidden;white-space:nowrap}

#ability-hud{position:absolute;bottom:154px;left:50%;transform:translateX(-50%);display:flex;flex-wrap:wrap;justify-content:center;gap:4px 14px;max-width:calc(100% - 24px);width:max-content;background:var(--ink);color:var(--paper);border:1px solid var(--line);padding:7px 12px;font-size:11px;pointer-events:none}
#ability-cooldown{color:var(--gold)}#effect-section{border:1px solid var(--line);padding:16px;margin:18px 0}#effect-section p{font-size:12px;line-height:1.65}#effect-upgrade{width:100%;color:var(--paper);background:var(--action)}
@media(max-width:600px){#ability-hud{bottom:137px;width:calc(100% - 24px);font-size:10px}}
@media(max-height:500px){#ability-hud{bottom:104px;font-size:9px;padding:3px 8px;width:calc(100% - 24px)}}

#ability-hud[hidden]{display:none}
/* Web arena: edge controls share a compact, predictable HUD band. */
header {right:112px;gap:8px}
header .brand {font-size:13px}
.hud {top:60px;gap:20px;padding:6px 14px;font-size:12px}
#chapters {top:94px}
#chapters span {padding:2px 12px;font-size:10px}
#announcement {top:121px;font-size:11px}
#announcement[data-boss=true] {visibility:hidden}
#boss-status {top:92px;font-size:12px;max-width:510px;width:calc(100% - 32px);padding:5px 10px;color:var(--ink)}
#boss-status[data-counter-ready=true] {border-color:var(--pine);box-shadow:0 0 0 3px var(--gold)}
.weapon-bar {min-height:82px;padding:7px 12px;bottom:max(8px,env(safe-area-inset-bottom));gap:10px}
.weapon-info {gap:3px}
.weapon-info strong {font-size:17px}
.weapon-info>span {font-size:10px}
#scabbard {transform:scale(.75);width:58px;margin:-10px 0}
.swipe-status {bottom:96px;font-size:10px}
#ability-hud {bottom:116px;font-size:10px;padding:4px 8px}
#draw-gate {inset:150px 0 138px}
#battle {touch-action:none}
#collection-grid img {height:140px}
@media(max-width:600px){
 header{inset:8px 112px auto 8px}header .brand{display:none}header button{padding:4px 8px}
 .hud{top:58px;width:calc(100% - 16px);justify-content:space-around;gap:5px;font-size:10px;padding:5px}
 #chapters{top:87px;gap:3px}#chapters span{padding:2px 8px;font-size:9px}
 #announcement{top:112px;font-size:10px}
 #boss-status{top:88px;font-size:10px;padding:4px 6px}
 .weapon-bar{width:calc(100% - 12px);min-height:78px;padding:5px;gap:5px}
 .weapon-info strong{font-size:14px}.weapon-info>span{font-size:9px}.weapon-info small{font-size:9px}
 #tree-toggle{font-size:11px;padding:6px;min-width:68px}
 #ability-hud{bottom:110px;width:calc(100% - 16px);font-size:9px;gap:2px 8px}.swipe-status{bottom:91px;font-size:9px}
 .curtain[data-screen=title]{padding:68px 14px 16px;place-items:center;background-position:36% center}
 .curtain[data-screen=title] .notice{width:min(100%,390px);padding:20px;max-height:calc(100dvh - 88px);overflow:auto}
 .notice h1{font-size:36px}.notice p{font-size:12px}.notice>small{font-size:10px}
 #collection-panel{width:calc(100% - 20px)}#collection-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 #collection-grid article{padding:8px}#collection-grid img{height:110px}
 .weapon-upgrade-card{grid-template-columns:90px minmax(0,1fr);gap:10px;padding:10px}#weapon-preview{height:130px}
 #tree-panel{width:calc(100% - 16px);padding:14px}.upgrade-tabs{gap:5px}.upgrade-tabs button{font-size:11px;padding:10px 4px}
 #odds{grid-template-columns:1fr}#reveal-art{height:220px}.reveal-card p{font-size:13px}
}
@media(max-height:500px){
 header{top:6px}.hud{top:54px;padding:3px}#chapters{display:none}#announcement{top:84px}
 #boss-status{top:82px;font-size:10px;line-height:1.1;padding:2px 7px;max-width:500px}
 .weapon-bar{min-height:60px;height:60px;bottom:5px;width:min(620px,calc(100% - 16px))}
 #scabbard{transform:scale(.55);margin:-24px 0}.weapon-info>span{display:none}.weapon-info strong{font-size:14px}
 #tree-toggle{padding:4px 8px;font-size:11px}#tree-toggle small{display:none}
 .swipe-status{bottom:70px}#ability-hud{bottom:87px;font-size:9px;padding:2px 6px}
 .curtain[data-screen=title]{padding:12px 20px;place-items:center end}.curtain[data-screen=title] .notice{max-height:calc(100dvh - 24px);overflow:auto;width:400px;padding:16px}
 .notice h1{font-size:28px;margin:8px 0}.notice p{font-size:11px;margin:8px 0}.how{display:none}
 #draw-gate{inset:90px 0 90px}#draw-gate>div{padding:10px}#draw-gate h2{font-size:22px;margin:4px}
}
@media(prefers-reduced-motion:reduce){*,*::before{animation:none!important;transition:none!important}}
#game[data-combat=true] #chapters {display:none}
#game[data-combat=true] .brand {visibility:hidden}
#game[data-combat=true] #announcement:not([data-boss=true]) {top:99px}
@media(min-width:900px) {#boss-status{top:7px;width:460px;max-height:49px;font-size:11px;line-height:1.05}#boss-status meter{height:8px}}
@media(max-height:500px){
 #boss-status{top:78px;max-height:33px;display:grid;grid-template-columns:auto 80px;gap:1px 8px;align-items:center}
 #boss-warning{grid-column:1/-1}
 #ability-hud{bottom:84px;max-width:650px;white-space:nowrap;flex-wrap:nowrap;font-size:9px}
 .swipe-status{bottom:67px;font-size:9px}
 #announcement{display:none}
}
.mobile-settings {display:none}
@media(max-width:600px){
 header {justify-content:flex-start;gap:6px}
 header #sound,header #motion {display:none}
 #collection-open{font-size:0;min-width:44px;padding:5px}#collection-open::after{content:'도감';font-size:11px}
 header a{font-size:10px;min-width:44px}#pause{min-width:44px}
 .mobile-settings{display:flex;gap:8px;margin:12px 0}
}
/* A centered live boss card remains above the header's opaque surface. */
#boss-status {z-index:13}
@media(min-width:900px) and (max-width:1199px){#boss-status{top:94px;max-height:none}}
@media(max-height:500px){
 header{height:44px;overflow:hidden;align-items:center}
 .hud{top:54px;z-index:12;line-height:14px;min-height:22px}
 #boss-status{top:78px;z-index:13}
}
@media(max-height:500px) and (min-width:700px){
 header {left:8px;right:auto;width:146px;gap:6px;height:44px}
 header .brand,header #sound,header #motion{display:none}
 header a{font-size:10px;min-width:44px}#collection-open{font-size:0;min-width:44px;padding:4px}#collection-open::after{content:'도감';font-size:10px}#pause{min-width:44px;padding:4px}
 .mobile-settings{display:flex;gap:8px;margin:12px 0}
 .hud{top:6px;left:164px;right:112px;transform:none;width:auto;min-height:24px;justify-content:space-between;font-size:10px;padding:3px 6px;gap:8px}
 #boss-status{top:34px;left:164px;right:112px;transform:none;width:auto;max-width:none;max-height:28px;padding:1px 5px;grid-template-columns:auto 80px;font-size:9px;line-height:10px}
 #boss-status strong{font-size:10px}#boss-status meter{height:7px}#boss-warning{grid-column:1/-1;white-space:nowrap}
 .weapon-bar{height:60px;min-height:60px;bottom:5px;left:8px;right:8px;width:auto;transform:none;padding:4px 8px}
 .weapon-info{align-self:flex-start;padding-bottom:20px;gap:2px}.weapon-info small{font-size:8px}.weapon-info strong{font-size:13px}
 #ability-hud{bottom:10px;left:84px;right:auto;transform:none;width:calc(100% - 390px);font-size:8px;border:0;background:transparent;padding:0;justify-content:flex-start;gap:4px;overflow:hidden}
 #ability-chance{display:none}
 .swipe-status{left:auto;right:90px;bottom:10px;transform:none;width:180px;font-size:8px;gap:5px}
 #swipe-meter{width:55px;height:10px;flex:none}#swipe-hint{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
 #draw-gate{inset:68px 0 70px}
}
