* { box-sizing: border-box; }
:root { color-scheme: dark; font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", sans-serif; color: #eff3ff; background: #090d18; }
body { margin: 0; }
.game-nav-header { color-scheme: light; }
button { font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:focus-visible, canvas:focus-visible, summary:focus-visible { outline: 3px solid #8bffe2; outline-offset: 3px; }
button:disabled { cursor: default; }
[hidden] { display: none !important; }
.reflect-shell { max-width: 450px; padding: 12px 12px max(20px, env(safe-area-inset-bottom)); margin: auto; }
#pauseButton { border: 1px solid #344158; border-radius: 50%; background: #151e30; color: #fff; width: 42px; height: 42px; }
#pauseButton:disabled { opacity: .35; }
.hud { display: grid; grid-template-columns: 1fr .7fr 1fr auto; gap: 8px; padding: 0 4px 12px; align-items: center; }
.hud div { display: flex; align-items: center; gap: 5px; }
.hud div:nth-child(3) { justify-content: flex-end; }
.hud span { color: #8c9bb7; font-size: 16px; }
.hud strong { font-size: 22px; font-variant-numeric: tabular-nums; }
.hud .timer { justify-content: center; }
.timer strong { color: #83ebd3; }
#lifeValue { color: #ff80bb; font-size: clamp(13px, 4vw, 19px); letter-spacing: 1px; }
.arena { width: min(100%, var(--arena-width, 100%)); margin-inline: auto; position: relative; border: 1px solid #2c4254; border-radius: 18px; overflow: hidden; background: #0c1324; isolation: isolate; }
canvas { width: 100%; height: auto; display: block; touch-action: none; }
.overlay { position: absolute; inset: 0; background: #090f20db; display: flex; overflow-y: auto; overscroll-behavior: contain; padding: 18px; }
.panel { width: 100%; max-width: 340px; flex-shrink: 0; margin: auto; text-align: center; }
h2 { font-size: clamp(24px, 6vw, 34px); line-height: 1.5; margin: 12px 0; letter-spacing: .04em; }
.panel p { color: #b8c5db; font-size: 12px; line-height: 1.9; margin: 10px 0 18px; }
.start-tips { margin: 8px 0 22px; font-size: 12px; color: #b8c5db; }
.primary { border: 0; border-radius: 12px; background: #89f5d7; color: #082a2a; width: 100%; padding: 16px; font-size: 14px; font-weight: 800; display: flex; justify-content: center; align-items: center; }
.controls { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 16px 12px 2px; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.move-pad { position: relative; width: 116px; height: 116px; flex-shrink: 0; border-radius: 50%; background: #111c30; border: 1px solid #34445e; touch-action: none; }
.pad-ring { position: absolute; inset: 16px; border: 1px dashed #3a4962; border-radius: 50%; }
.stick { position: absolute; width: 42px; height: 42px; left: calc(50% - 21px); top: calc(50% - 21px); border-radius: 50%; background: #304361; border: 1px solid #69809e; pointer-events: none; }
.pad-label { position: absolute; bottom: 7px; width: 100%; text-align: center; color: #8c9bb7; font-size: 8px; letter-spacing: .16em; pointer-events: none; }
.slash-button { --charge: 100%; position: relative; isolation: isolate; width: 100px; height: 100px; border-radius: 50%; flex-shrink: 0; padding: 6px; border: 0; background: conic-gradient(#89f5d7 var(--charge), #243247 0); color: #a8ffe7; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 4px; box-shadow: inset 0 0 0 5px #0b1221, inset 0 0 0 8px #233b45; touch-action: none; }
.slash-button::before { content: ""; position: absolute; inset: 8px; border-radius: inherit; background: #132d36; z-index: -1; }
.slash-button strong { font-size: 19px; position: relative; }
.slash-button:active:not(:disabled) { color: #082a2a; transform: scale(.97); }
.slash-button:active:not(:disabled)::before { background: #89f5d7; }
.slash-button:disabled { opacity: .55; }
.how-to { color: #9baac1; margin-top: 12px; padding: 0 4px; font-size: 11px; line-height: 1.9; }
.how-to summary { cursor: pointer; }
.result-stats { margin: 12px 0 20px; text-align: left; }
.result-stats div { display: flex; justify-content: space-between; border-bottom: 1px solid #2a354b; padding: 9px 0; font-size: 12px; }
.result-stats dt { color: #a6b3ca; }
.result-stats dd { margin: 0; color: #89f5d7; font-weight: 800; font-variant-numeric: tabular-nums; }
@media (max-width: 360px) { .controls { padding-inline: 0; } .move-pad { width: 104px; height: 104px; } .slash-button { width: 88px; height: 88px; } .slash-button strong { font-size: 17px; } .panel p { margin-bottom: 8px; } .start-tips { margin: 12px 0 16px; } }
/* The partner uses the existing space between touch controls. */
.reflect-shell { padding: 6px 8px max(8px, env(safe-area-inset-bottom)); }
.hud { padding-bottom: 6px; }
.controls { padding: 8px 0 0; gap: 4px; }
.partner { flex: 1; min-width: 0; max-width: 148px; align-self: stretch; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; text-align: center; border-bottom: 1px solid #b39457; background: radial-gradient(ellipse at 50% 40%, #28465a99, transparent 72%); }
.partner img { width: 76px; height: 54px; object-fit: cover; object-position: 50% 0; }
.partner strong { color: #ffe1a0; font-size: 11px; line-height: 1.4; }
.partner span { color: #89f5d7; font-size: 10px; font-variant-numeric: tabular-nums; }
.partner p { min-height: 28px; font-size: 10px; line-height: 1.4; margin: 3px 0 0; color: #fff1d7; }
.partner[data-mood="chain"], .partner[data-mood="clear"], .partner[data-mood="record"] { border-color: #ffe3a4; background: radial-gradient(ellipse at 50% 40%, #98773799, transparent 75%); }
.partner[data-mood="damage"] { border-color: #ff80bb; }
.panel-character { display: flex; align-items: center; justify-content: center; flex-direction: column; }
.panel-character img { height: clamp(84px, 21svh, 156px); width: 156px; object-fit: contain; filter: drop-shadow(0 0 14px #79e1dc66); }
.panel-character strong { color: #ffe1a0; font-size: 13px; letter-spacing: .12em; }
.panel .panel-talk { color: #fff1d7; font-size: 13px; margin: 6px 0; line-height: 1.5; }
.panel h2 { font-size: clamp(20px, 5vw, 28px); margin: 6px 0; }
.panel .result-stats { margin: 6px 0 12px; }
.result-stats div { padding: 6px 0; }
.primary { background: linear-gradient(125deg, #fff0bf, #89f5d7); box-shadow: inset 0 0 0 1px #f9df96; }
.arena { border-color: #8a7853; box-shadow: 0 0 14px #5ccab619; }
@media (max-width: 360px) { .partner img { width: 60px; height: 46px; } .partner strong { font-size: 10px; } .partner p { font-size: 9px; } }
@media (prefers-reduced-motion: reduce) { .slash-button:active:not(:disabled) { transform: none; } .panel-character img { filter: none; } }

/* Compact in-arena progress; no additional header or touch target. */
.arena-status { position: absolute; top: 6px; left: 8px; right: 8px; z-index: 1; pointer-events: none; display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; padding: 5px 8px; border: 1px solid #819d9c66; border-radius: 7px; background: #091323d9; font-size: 10px; font-weight: 700; color: #c9e5ef; font-variant-numeric: tabular-nums; }
#burstValue { color: #ffe1a0; }
.burst-meter { grid-column: 1 / -1; height: 3px; background: #294354; border-radius: 3px; overflow: hidden; }
.burst-meter i { display: block; height: 100%; width: var(--burst-fill, 0%); background: linear-gradient(90deg, #89f5d7, #ffe1a0); }
canvas[data-burst="true"] { box-shadow: inset 0 0 0 2px #f2d18e; }
.overlay { z-index: 2; }
.partner[data-mood="burst"], .partner[data-mood="perfect"] { border-color: #ffe3a4; background: radial-gradient(ellipse at 50% 40%, #98773799, transparent 75%); }

.slash-button small { position: relative; font-size: 10px; font-weight: 600; line-height: 1.4; }

/* Information lives in the arena frame, never above moving enemies. */
.arena-toolbar { padding: 4px 8px 5px; background: #091323; border-bottom: 1px solid #8a785366; }
.arena-playfield { position: relative; }
.hud { grid-template-columns: 1fr auto 1fr auto; gap: 6px; padding: 0; }
.hud strong { font-size: 16px; }
#scoreValue { color: #b8c5db; font-size: 13px; }
#lifeValue { font-size: clamp(12px, 3.5vw, 16px); letter-spacing: 0; white-space: nowrap; }
#pauseButton { width: 44px; height: 44px; }
.arena-status { position: static; padding: 0; border: 0; background: none; gap: 3px 6px; font-size: 10px; }
.burst-meter { position: relative; height: 5px; }
.burst-meter::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent 0 calc(100% / 12 - 1px), #091323 calc(100% / 12 - 1px) calc(100% / 12)); }
.burst-meter[data-state="active"]::after { display: none; }
.burst-meter[data-state="active"] i { background: #ffe1a0; }
.slash-icon { font-size: 24px; line-height: .8; pointer-events: none; }
.slash-button { gap: 3px; }
.slash-button[data-state="ready"] { outline: 2px solid #89f5d7; outline-offset: -3px; }
.slash-button[data-state="perfect"] { outline: 3px solid #ffe1a0; outline-offset: -10px; color: #ffe1a0; }
.slash-button[data-state="cooldown"] .slash-icon { opacity: .45; }
.slash-button:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
