:root {
  color-scheme: dark;
  --ink: #25352a;
  --paper: #f3e8c9;
  --copper: #a66222;
  --gold: #f3c469;
  --mint: #a5d6ae;
  --border: #9f9f74;
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--paper);
  background: #19261c;
}
* { box-sizing: border-box; }
html, body, #app { width: 100%; height: 100%; height: 100dvh; margin: 0; overflow: hidden; }
body { -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; }
button, select, input { font: inherit; }
button { color: inherit; cursor: pointer; touch-action: manipulation; }
button:focus-visible, select:focus-visible, input:focus-visible { outline: 3px solid #f8e79b; outline-offset: 2px; }
[hidden] { display: none !important; }
#app {
  position: absolute; top: 0; left: 0; isolation: isolate; container: game / size;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
}
/* The game, including its touch controls and dialogs, shares one logical screen. */
#app[data-turn] { width: 100dvh; height: 100vw; transform-origin: top left; }
#app[data-turn="cw"] {
  transform: translateX(100vw) rotate(90deg);
  --safe-top: env(safe-area-inset-right, 0px);
  --safe-right: env(safe-area-inset-bottom, 0px);
  --safe-bottom: env(safe-area-inset-left, 0px);
  --safe-left: env(safe-area-inset-top, 0px);
}
#app[data-turn="ccw"] {
  transform: translateY(100dvh) rotate(-90deg);
  --safe-top: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-right, 0px);
  --safe-left: env(safe-area-inset-bottom, 0px);
}
#app[data-framed="true"] { left: 50%; top: 50%; transform: translate(-50%, -50%); }
#app[data-framed="true"][data-layout="portrait"] { width: min(100vw, max(56.25dvh, min(340px, 88dvh))); }
#app[data-framed="true"][data-layout="landscape"] { height: min(100dvh, max(56.25vw, min(340px, 88vw))); }
#menu, #arena, #overlay { position: absolute; inset: 0; }
#menu { display: flex; align-items: center; overflow: hidden; isolation: isolate; background: #2d3828; }
.cover { position: absolute; inset: 0; z-index: -2; background: #677051 url("assets/arena.webp") 56% center / cover no-repeat; }
.cover::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, #18271ef5 2%, #233024ea 31%, #25352644 65%, #21302442),
    linear-gradient(0deg, #1c281fd6, transparent 32%, transparent 78%, #1c281e6e);
}
.cover-hero {
  position: absolute; z-index: -1; right: 9%; bottom: 13%; width: min(36cqw, 58cqh, 500px); height: auto;
  transform: rotate(-4deg); filter: drop-shadow(8px 12px 0 #26332558);
}
.menu-tools { position: absolute; top: max(16px, var(--safe-top)); right: max(18px, var(--safe-right)); display: flex; gap: 7px; }
.tool, .secondary, select {
  min-height: 44px; border: 1px solid #aaa37ad1; border-radius: 5px; background: #29382aee; color: var(--paper); padding: 6px 13px; font-weight: 700;
}
.tool { min-width: 44px; }
.tool:hover, .secondary:hover, .card:hover { background: #45513a; }
#sound { font-size: 21px; }
#sound[aria-pressed="false"] { text-decoration: line-through; color: #babda6; }
.menu-copy { margin: 0 0 0 max(7cqw, var(--safe-left)); width: min(42cqw, 545px); }
.place { display: flex; align-items: center; gap: 9px; color: #f4d68e; font-weight: 750; font-size: clamp(14px, 1.8cqw, 21px); letter-spacing: .24em; }
.place i { width: 22px; height: 2px; background: currentColor; }
h1, h2, .rank { font-family: "Songti SC", "STSong", "Source Han Serif SC", serif; }
h1 { margin: .055em 0 .08em -.04em; font-size: clamp(48px, 8.1cqw, 104px); font-weight: 900; letter-spacing: -.065em; line-height: 1.08; text-shadow: 0 2px #263327; }
h1 span { color: var(--gold); }
.pitch { line-height: 1.6; margin: 0 0 16px; font-size: clamp(14px, 1.3cqw, 18px); max-width: 28em; }
.mission { display: flex; flex-wrap: wrap; align-items: center; margin: 10px 0 clamp(12px, 3cqh, 26px); font-size: 13px; color: #d9d6b7; }
.mission span + span::before { content: "·"; margin: 0 8px; color: var(--gold); }
fieldset { min-width: 0; border: 0; margin: 0 0 12px; padding: 0; }
legend { padding: 0 0 6px; font-size: 13px; letter-spacing: .12em; font-weight: 700; }
.weapons { display: flex; gap: 6px; }
.weapons button { display: flex; flex: 1 1 0; max-width: 163px; align-items: center; gap: 8px; min-height: 46px; border: 1px solid #9c9b7596; background: #26352aef; border-radius: 4px; padding: 6px 9px; text-align: left; font-weight: 700; }
.weapons i { display: grid; place-content: center; width: 28px; aspect-ratio: 1; border: 1px solid #8d916b; border-radius: 50%; color: #dfbc77; font: 700 22px/1 Georgia, serif; }
.weapons small { display: block; margin-top: 2px; color: #dad7bc; font-size: 11px; font-weight: 500; }
.weapons button[aria-pressed="true"] { border-color: var(--gold); background: #4c4930; box-shadow: inset 0 -2px #c4994c; }
.orientation-options { display: grid; grid-template-columns: 1.12fr 1fr; gap: 8px; max-width: 370px; }
.orientation-options button {
  display: flex; align-items: center; min-width: 0; min-height: 62px; gap: 9px; padding: 9px 11px;
  border: 1px solid #aba47b; border-radius: 5px; background: #29382aef; text-align: left;
}
.orientation-options button[data-orientation="landscape"] {
  color: #283425; background: #f2c572; border-color: #ffe6a5; box-shadow: 0 3px #98672c;
}
.orientation-options button:hover { filter: brightness(1.08); }
.orientation-options strong { display: flex; align-items: center; gap: 5px; line-height: 1.2; }
.orientation-options em { flex: none; border: 1px solid #7e692f; padding: 1px 3px; border-radius: 3px; font: 650 10px/1.2 system-ui, sans-serif; }
.orientation-options small { display: block; margin-top: 4px; font-size: 12px; line-height: 1.3; }
.screen-icon { position: relative; flex: none; width: 25px; height: 16px; border: 2px solid currentColor; border-radius: 4px; }
.screen-icon::after { content: ""; position: absolute; top: 4px; bottom: 4px; left: 2px; width: 2px; background: currentColor; border-radius: 1px; }
[data-orientation="portrait"] .screen-icon { width: 16px; height: 25px; margin-inline: 4px 5px; }
[data-orientation="portrait"] .screen-icon::after { inset: 2px 3px auto; width: auto; height: 2px; }
.primary { min-height: 44px; background: #f2c572; color: #2a3525; border: 1px solid #ffe6a5; border-radius: 4px; padding: 8px 22px; font-weight: 850; box-shadow: 0 3px #98672c; }
.primary:hover { background: #ffdc91; }
#start { display: flex; align-items: center; justify-content: center; gap: 14px; width: min(100%, 332px); font-size: 17px; letter-spacing: .12em; }
#start span { font: 700 24px/1 serif; }
#loadStatus { min-height: 1.4em; margin: 10px 0 0; color: #e8d9ab; font-size: 13px; }
#arena {
  --action-size: 84px;
  --edge-x: max(16px, var(--safe-right), var(--safe-left));
  --edge-y: max(14px, 4cqh, var(--safe-bottom));
  display: grid; place-items: center; background: #253427; touch-action: none; overflow: hidden;
}
#viewport { position: relative; width: min(100%, 186.37993cqh); aspect-ratio: 1040 / 558; overflow: hidden; background: #697052; }
#world { display: block; width: 100%; height: 100%; touch-action: none; }
.hud {
  position: absolute; z-index: 1; inset: max(4px, var(--safe-top)) max(8px, var(--safe-right)) auto max(8px, var(--safe-left));
  display: grid; grid-template-columns: 1fr minmax(170px, 29%) 1fr 44px; grid-template-areas: "level level level level" "vitals progress timer pause" "build . streak streak";
  align-items: start; gap: 4px 7px; pointer-events: none; font-variant-numeric: tabular-nums;
}
.level { grid-area: level; display: flex; align-items: center; gap: 6px; color: #f4e9ca; font: 700 12px/1.1 ui-monospace, monospace; text-shadow: 0 1px 2px #192b22; }
.track { display: block; position: relative; overflow: hidden; height: 5px; border-radius: 2px; background: #48543ee8; }
.track i { display: block; position: absolute; inset: 0; transform: scaleX(0); transform-origin: left; }
.track.xp { flex: 1; height: 5px; box-shadow: 0 0 0 1px #21322688; }
#xpBar { background: #a5dcba; }
#hpBar { background: #f08c70; }
.hud-box, #pause { background: #253529ed; border: 1px solid #b4ac7aaf; border-radius: 5px; color: var(--paper); }
.vitals { grid-area: vitals; justify-self: start; display: grid; grid-template-columns: auto auto; align-items: center; column-gap: 5px; padding: 4px 8px; font-size: 13px; }
.vitals .track { grid-column: 1 / -1; height: 4px; margin: 2px 0 1px; }
#heart { color: #ff9c78; }
#heart.spent { color: #8b9383; }
.progress { grid-area: progress; align-self: start; padding: 3px 8px 5px; }
.progress > div:first-child { display: flex; justify-content: space-between; gap: 4px; align-items: baseline; font-size: 12px; line-height: 1.5; }
#progressValue { color: #f7d58a; }
#progressBar { background: #efba67; }
#hpTrail { background: #fff3d8; }
#progressTrack::after { content: ""; position: absolute; inset: 0; background: var(--ticks, repeating-linear-gradient(to right, transparent 0 calc(25% - 1px), #273529cc calc(25% - 1px) 25%)); }
.progress.boss #progressBar { background: #e78365; }
.clock { grid-area: timer; justify-self: end; padding: 5px 9px; color: #ffe1a2; font: bold 17px/1.2 ui-monospace, monospace; }
#pause { grid-area: pause; pointer-events: auto; padding: 3px; width: 44px; height: 44px; font-size: 16px; }
#build { grid-area: build; justify-self: start; }
.slots { display: flex; align-items: center; gap: 3px; }
.slots + .slots { margin-top: 2px; }
.slot { display: inline-grid; place-content: center; position: relative; height: 21px; min-width: 24px; border: 1px solid #d8ca9790; border-radius: 4px; background: var(--tint, #304334e6); color: #fff0bf; font: 700 15px/1 Georgia, serif; }
.slot.empty { opacity: .45; min-width: 13px; height: 13px; }
.slot small { position: absolute; right: -1px; bottom: -1px; padding: 1px 2px; border-radius: 2px; background: #2b3629; font: 700 9px/1 ui-monospace, monospace; }
#streak { font-size: var(--streak-size, 15px); line-height: 1.1; font-weight: 900; color: var(--streak-ink, #f2eacc); text-shadow: 0 1px 4px #13251c, 1px 1px 1px #17271b; }
#moveArea { display: none; position: absolute; left: 0; bottom: 0; width: 50%; height: 65%; z-index: 1; touch-action: none; }
#stick { width: 78px; height: 78px; display: grid; place-items: center; position: absolute; left: var(--edge-x); bottom: var(--edge-y); pointer-events: none; border: 2px solid #e6e3b6b0; border-radius: 50%; background: #293c2b75; box-shadow: inset 0 0 0 4px #49614844; }
#stick.drag { border-color: #f8db93; }
#stick i { width: 31px; height: 31px; background: #e2d7aba3; border: 1px solid #324632c2; border-radius: 50%; }
.actions-pad { position: absolute; z-index: 1; right: var(--edge-x); bottom: var(--edge-y); display: flex; gap: 9px; align-items: flex-end; pointer-events: none; }
.action-button {
  --meter: 0%; display: grid; place-content: center; align-content: center; justify-items: center; gap: 2px; position: relative; isolation: isolate; border: 1px solid #b4b591; border-radius: 50%;
  touch-action: none; pointer-events: auto; background: conic-gradient(var(--gold) var(--meter), #5c6250 var(--meter)); color: var(--paper);
}
.action-button::before { content: ""; position: absolute; z-index: -1; inset: 4px; border: 1px solid #a3a0788a; background: #304132; border-radius: inherit; }
.action-button:active::before { background: #526044; }
#dash { width: 55px; height: 55px; font-size: 13px; }
#overload { width: var(--action-size); height: var(--action-size); color: #ffe2a1; font-size: 17px; }
#chargeLabel { font: 650 10px/1 ui-monospace, monospace; }
kbd { font: 11px/1 ui-monospace, monospace; color: #e1dbb8; }
#overload.ready { animation: glow .85s ease-in-out infinite alternate; }
#overload.ready::before, #overload.burst::before { background: #8b5d2c; }
@keyframes glow { to { box-shadow: 0 0 0 4px #ffd78370; } }
#arena[data-hand="left"] #moveArea { left: auto; right: 0; }
#arena[data-hand="left"] #stick { left: auto; right: var(--edge-x); }
#arena[data-hand="left"] .actions-pad { right: auto; left: var(--edge-x); flex-direction: row-reverse; }
.hint { display: inline-block; padding: 4px 9px; border: 1px solid #bdb38a8a; border-radius: 5px; background: #2c3d2ef0; color: #f9ecc3; font-size: 12px; line-height: 1.3; white-space: nowrap; pointer-events: none; }
#tutorial { position: absolute; left: 50%; bottom: 8%; transform: translateX(-50%); }
#shieldTip { position: absolute; transform: translateY(-100%); }
#shieldTip[data-side="left"] { transform: translate(-100%, -100%); }
#readyTip { position: absolute; bottom: calc(100% + 6px); right: 0; color: #ffe19a; }
#arena[data-hand="left"] #readyTip { left: 0; right: auto; }
#overlay { z-index: 4; display: grid; place-items: center; padding: max(10px, var(--safe-top)) max(12px, var(--safe-right)) max(10px, var(--safe-bottom)) max(12px, var(--safe-left)); background: #14231cbb; }
#panel { position: relative; width: min(600px, 100%); max-height: 100%; overflow: auto; overscroll-behavior: contain; border: 1px solid #b5ab7a; border-top: 3px solid #e2bb6c; border-radius: 8px; padding: clamp(15px, 2.7cqh, 26px); background: #2b3c2e; box-shadow: 0 8px 30px #13231866; }
#panel h2 { margin: 0 0 7px; font-size: clamp(23px, 3cqw, 34px); color: #f7e9c7; }
#panel p { margin: 0 0 12px; color: #d5d8bd; line-height: 1.45; font-size: 14px; }
.dialog-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.choices { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 7px; }
.card { min-width: 0; display: grid; align-content: start; justify-items: start; gap: 5px; padding: 10px; border: 1px solid #899775; border-radius: 5px; color: var(--paper); text-align: left; background: #364835; animation: enter-card .12s ease-out; }
@keyframes enter-card { from { transform: translateY(5px); opacity: .65; } }
.card .slot { min-width: 34px; min-height: 34px; font-size: 22px; }
.card em { color: #e8c583; font: 700 11px/1.25 ui-monospace, monospace; }
.card small { font-size: 12px; line-height: 1.4; color: #e0e1c9; }
.card.evolved { border: 2px solid var(--gold); }
@media (pointer: coarse), (hover: none) { #moveArea { display: block; } .actions-pad kbd { display: none; } }
@container game (orientation: portrait) {
  .cover { background-position: 53% 40%; }
  .cover::after { background: linear-gradient(0deg, #1b2b20fc 2%, #243327f5 35%, #253526a9 61%, #26362936 86%); }
  .cover-hero { bottom: auto; top: max(8%, var(--safe-top)); right: 6%; width: min(61cqw, 37cqh); }
  #menu { align-items: flex-end; }
  .menu-copy { margin: 0 7cqw max(4cqh, var(--safe-bottom)); width: 86cqw; }
  h1 { font-size: clamp(48px, 14cqw, 80px); }
  #arena { --deck: clamp(102px, 17cqh, 150px); grid-template: auto minmax(0,1fr) calc(var(--deck) + var(--safe-bottom)) / minmax(0,1fr); }
  #viewport { grid-area: 2/1; width: 100%; height: min(100%, 99.6cqw); aspect-ratio: auto; box-shadow: 0 -1px #aea97e80, 0 1px #aea97e80; }
  #world { position: absolute; left: 0; top: 0; width: auto; transform: translateX(var(--camera-x, calc((100cqw - 100%) / 2))); }
  .hud { grid-area: 1/1; position: static; align-self: start; justify-self: stretch; grid-template-columns: minmax(62px, 1fr) minmax(83px, 1.5fr) auto 44px; grid-template-areas: "level level level level" "vitals progress timer pause" "build build streak streak"; align-items: start; gap: 5px; margin: max(6px, var(--safe-top)) max(7px, var(--safe-right)) 4px max(7px, var(--safe-left)); }
  .vitals { font-size: 12px; padding: 4px; }
  .clock { padding: 6px; font-size: 15px; }
  #build { display: flex; gap: 5px; }
  .slots + .slots { margin-top: 0; border-left: 1px solid #a4a784; padding-left: 4px; }
  #moveArea { height: 46%; }
  #arena { --edge-y: max(23px, calc((var(--deck) - 72px) / 2 + var(--safe-bottom))); }
  #tutorial { bottom: 3%; }
  .choices { grid-template-columns: 1fr; }
  .card { grid-template-columns: 36px 1fr auto; align-items: center; column-gap: 8px; row-gap: 3px; }
  .card .slot { grid-row: 1 / 3; }
  .card small { grid-column: 2 / 4; }
}
@container game (max-height: 500px) and (orientation: landscape) {
  .menu-copy { width: min(49cqw, 390px); margin-left: max(5cqw, var(--safe-left)); }
  #menu:has(#orientationChoice:not([hidden])) .menu-copy { width: min(60cqw, 390px); }
  .place { font-size: 13px; }
  h1 { font-size: clamp(42px, 13cqh, 68px); }
  .pitch { font-size: 13px; line-height: 1.3; }
  .mission { margin: 6px 0 9px; font-size: 12px; }
  fieldset { margin-bottom: 8px; }
  #loadStatus { margin: 6px 0 0; min-height: 0; }
  .cover-hero { bottom: 6%; }
  #panel { padding: 12px 16px; }
  #panel h2 { margin-bottom: 5px; }
  .setting { min-height: 40px; }
}
@container game (max-width: 345px) {
  .orientation-options button { gap: 6px; padding-inline: 6px; }
}
@container game (max-height: 350px) and (max-width: 520px) {
  #menu { display: block; overflow-y: auto; }
  #menu .menu-copy { width: 90%; margin: max(70px, calc(var(--safe-top) + 62px)) 5% max(12px, var(--safe-bottom)); }
  .menu-tools { top: max(8px, var(--safe-top)); }
  .menu-copy .mission { display: none; }
  .menu-copy h1 { font-size: 38px; }
  .menu-copy .pitch { margin-bottom: 8px; font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0s !important; transition-duration: 0s !important; } }

#debugPanel { position: absolute; right: 0; top: 100%; white-space: pre; margin: 2px 0; padding: 4px; background: #19291edd; color: #e9ecd2; font: 10px/1.3 ui-monospace, monospace; }
#start:disabled { opacity: .66; cursor: default; }


#best { margin: 8px 0 0; font-size: 13px; color: #efd99e; }
.counts { grid-area: streak; justify-self: end; display: grid; gap: 3px; justify-items: end; }
#killCount { color: var(--paper); text-shadow: 0 1px 2px #243324; font-size: 12px; font-weight: 750; }
#bellBanner { position: absolute; left: 50%; top: 23%; transform: translateX(-50%); pointer-events: none; padding: 5px 19px; background: #344131ed; border: 1px solid #cda75f; border-radius: 3px; color: #ffe3a3; font: 750 clamp(14px, 2.3cqw, 24px)/1.4 "Songti SC", serif; white-space: nowrap; }
.settings-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 18px; margin: 0 0 14px; }
.setting { display: flex; align-items: center; justify-content: space-between; min-height: 44px; gap: 8px; border-bottom: 1px solid #b5bb9466; }
.setting input { width: 21px; height: 21px; accent-color: var(--gold); }
.setting select { min-height: 38px; }
@container game (max-width: 500px) { .settings-list { grid-template-columns: 1fr; } }
.rank { float: right; color: var(--gold); font-size: 56px; font-weight: 900; font-style: italic; line-height: 1; }
.result-build { margin: 9px 0 14px; }
#panel .new-record { color: var(--gold); font-weight: 750; }

#dash[aria-disabled="true"]::before { background: #364234; opacity: .8; }
#readyTip::after { content: ""; position: absolute; right: 25px; top: 100%; border: 5px solid transparent; border-top-color: #e1c37c; }
#arena[data-hand="left"] #readyTip::after { right: auto; left: 25px; }
@container game (max-width: 355px) and (orientation: portrait) {
  #build .slot { min-width: 18px; height: 18px; }
  #build .slot.empty { min-width: 10px; height: 10px; }
  #arena { --edge-x: max(9px, var(--safe-left), var(--safe-right)); }
}

#heart { position: relative; }
#heart.broken::before, #heart.broken::after { content: "♥"; position: absolute; left: 0; top: 0; color: #ffad8f; animation: heart-chip .48s ease-out both; }
#heart.broken::before { --chip-x: -5px; --chip-r: -20deg; clip-path: polygon(0 0, 60% 0, 43% 44%, 56% 62%, 38% 100%, 0 100%); }
#heart.broken::after { --chip-x: 5px; --chip-r: 20deg; clip-path: polygon(60% 0, 100% 0, 100% 100%, 38% 100%, 56% 62%, 43% 44%); }
@keyframes heart-chip { to { transform: translate(var(--chip-x), 5px) rotate(var(--chip-r)); opacity: 0; } }

#bossCard {
  position: absolute; left: 50%; top: 21%; display: grid; justify-items: center; gap: 2px;
  width: max-content; max-width: 86%; min-width: min(178px,65%); padding: 6px 22px;
  transform: translateX(-50%); pointer-events: none; text-align: center; color: #f9edca;
  background: linear-gradient(90deg, transparent, #293a2cf2 12%, #293a2cf2 88%, transparent);
  border-block: 1px solid #e4bd75; animation: boss-card-in .22s ease-out;
}
#bossCard small { font-size: 11px; color: #f1c979; letter-spacing: .16em; }
#bossCard strong { font: 850 clamp(21px,3.7cqw,34px)/1.1 "Songti SC",serif; letter-spacing: .06em; }
#bossCard span { font-size: 12px; }
@keyframes boss-card-in { from { opacity: 0; transform: translateX(-65%); } }
#bossDamage { position: absolute; transform: translate(-50%,-100%); font: bold clamp(12px,1.6cqw,19px)/1 ui-monospace,monospace; text-shadow: 0 1px 2px #253529, 1px 0 #253529; pointer-events: none; color: #fff5d9; }
#bossTotal { display: block; color: #e1d5b8; font-size: 10px; margin-top: 2px; font-variant-numeric: tabular-nums; }
.progress.boss { width: min(360px, 100%); justify-self: center; }
@container game (orientation: landscape) { .hud:has(.progress.boss) { grid-template-columns: 1fr min(360px,40%) 1fr 44px; } }
@container game (orientation: portrait) { .progress.boss { min-width: 0; } .progress.boss strong { font-size: 11px; } }

#arena.ending #moveArea, #arena.ending .actions-pad { visibility: hidden; }

.weapons .slot { width: 32px; height: 32px; flex-shrink: 0; border: 0; }
.slot canvas { display: block; width: 100%; height: 100%; }
.slot:has(canvas) { display: inline-flex; align-items: center; justify-content: center; }
.slot.evolved, .card.evolved .slot { outline: 1px solid #f5ca70; outline-offset: -1px; }
.card.evolved em { color: #ffe198; }
.confetti { position: absolute; inset: 0; overflow: hidden; border-radius: inherit; pointer-events: none; }
.confetti i {
  position: absolute; top: -12px; left: calc(2% + var(--i) * 5.5%); width: 4px; height: 8px; background: #e3a947;
  animation: confetti-drop 1.35s ease-in both; animation-delay: calc(var(--i) * 33ms);
}
.confetti i:nth-child(3n) { width: 6px; background: #fff0a9; }
.confetti i:nth-child(2n) { --drift: -13px; }
@keyframes confetti-drop { to { top: 96%; transform: translateX(var(--drift,13px)) rotate(210deg); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .confetti { display: none; } }

@container game (orientation: portrait) {
  #arena {
    background:
      linear-gradient(180deg, #1d3025e8, #25372bcc 27%, #26382bc9 67%, #1a2a20f0),
      #26382b url("assets/arena.webp") center / auto 100% no-repeat;
  }
  #viewport { box-shadow: 0 -1px #d5c49183, 0 1px #d5c49183, 0 6px 15px #14231959; }
}
