:root {
  color-scheme: dark;
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  color: #fff4de;
  background: #140c07;
  --display: "Songti SC", "Noto Serif CJK SC", SimSun, serif;
  --pixel-font: "Fusion Pixel", "PingFang SC", "Microsoft YaHei", sans-serif;
  --bg-void: #140c07;
  --wood-dark: #25150c;
  --wood-mid: #3e2415;
  --wood-light: #5c3720;
  --wood-edge: #150b05;
  --brass: #e0a63a;
  --brass-bright: #ffe28a;
  --brass-dim: #8a5a1c;
  --parchment: #f6e7c8;
  --parchment-mid: #e6cfa4;
  --parchment-border: #9c6c31;
  --ink: #2a170b;
  --ink-sub: #5c3c24;
  --ember: #e34f2b;
  --jade: #2eb886;
  --arcane: #3b82f6;
  --mythic: #f5b92a;
  --text-main: #fff4de;
  --text-sub: #dfc7a3;
  --text-gold: #ffe08a;
  --gold: #e0a63a;
  --paper: #faf0d8;
  --line: rgba(224, 166, 58, 0.34);
  --svg-parchment-frame: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Crect x='2' y='2' width='116' height='116' rx='6' fill='%23edd8ad' stroke='%234a2b13' stroke-width='3'/%3E%3Crect x='7' y='7' width='106' height='106' rx='3' fill='%23faf0d8' stroke='%23b5813d' stroke-width='1.5'/%3E%3Ccircle cx='14' cy='14' r='3' fill='%23d99b38' stroke='%23593315' stroke-width='1.2'/%3E%3Ccircle cx='106' cy='14' r='3' fill='%23d99b38' stroke='%23593315' stroke-width='1.2'/%3E%3Ccircle cx='14' cy='106' r='3' fill='%23d99b38' stroke='%23593315' stroke-width='1.2'/%3E%3Ccircle cx='106' cy='106' r='3' fill='%23d99b38' stroke='%23593315' stroke-width='1.2'/%3E%3C/svg%3E");
  --svg-journal-frame: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Crect x='2' y='2' width='116' height='116' rx='8' fill='%232e190d' stroke='%23120803' stroke-width='4'/%3E%3Crect x='14' y='14' width='92' height='92' rx='4' fill='none' stroke='%2399672a' stroke-width='1.5' stroke-dasharray='4 3'/%3E%3Cpath d='M6 26 V6 H26 M94 6 H114 V26 M6 94 V114 H26 M94 114 H114 V94' fill='none' stroke='%23dca23e' stroke-width='5' stroke-linecap='square'/%3E%3Ccircle cx='13' cy='13' r='2.5' fill='%232b160a'/%3E%3Ccircle cx='107' cy='13' r='2.5' fill='%232b160a'/%3E%3Ccircle cx='13' cy='107' r='2.5' fill='%232b160a'/%3E%3Ccircle cx='107' cy='107' r='2.5' fill='%232b160a'/%3E%3C/svg%3E");
  --svg-journal-border: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Crect x='2' y='2' width='116' height='116' rx='8' fill='none' stroke='%23241208' stroke-width='16'/%3E%3Cpath d='M6 26 V6 H26 M94 6 H114 V26 M6 94 V114 H26 M94 114 H114 V94' fill='none' stroke='%23dca23e' stroke-width='5' stroke-linecap='square'/%3E%3Ccircle cx='13' cy='13' r='2.5' fill='%23ffe08a'/%3E%3Ccircle cx='107' cy='13' r='2.5' fill='%23ffe08a'/%3E%3Ccircle cx='13' cy='107' r='2.5' fill='%23ffe08a'/%3E%3Ccircle cx='107' cy='107' r='2.5' fill='%23ffe08a'/%3E%3C/svg%3E");
  --svg-brass-plaque: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Crect x='2' y='2' width='116' height='116' rx='7' fill='%232b180e' stroke='%23d99f3c' stroke-width='3.5'/%3E%3Crect x='8' y='8' width='104' height='104' rx='4' fill='none' stroke='%238c5a20' stroke-width='1.5'/%3E%3Ccircle cx='13' cy='13' r='2.5' fill='%23ffe08a' stroke='%234a2b13' stroke-width='1'/%3E%3Ccircle cx='107' cy='13' r='2.5' fill='%23ffe08a' stroke='%234a2b13' stroke-width='1'/%3E%3Ccircle cx='13' cy='107' r='2.5' fill='%23ffe08a' stroke='%234a2b13' stroke-width='1'/%3E%3Ccircle cx='107' cy='107' r='2.5' fill='%23ffe08a' stroke='%234a2b13' stroke-width='1'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; }
body, h1, h2, h3, p, ol, ul { margin: 0; }
button, select, textarea { color: inherit; font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
button, select { touch-action: manipulation; }
button:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2.5px solid var(--brass-bright);
  outline-offset: 2px;
  z-index: 2;
}
.hidden { display: none !important; }

#app {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 50% 45%, #2b180d, #0f0804);
}

#stage-wrapper {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  container-type: inline-size;
  width: min(100vw, 177.7778vh);
  width: min(100vw, 177.7778dvh);
  aspect-ratio: 16 / 9;
  background: var(--bg-void);
  font-size: clamp(12px, 1.3cqw, 24px);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.85);
}

#mine-field {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

#game-canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: manipulation;
  user-select: none;
}

kbd {
  display: inline-block;
  min-width: 1.5em;
  padding: .13em .4em;
  border: 1.5px solid #593318;
  border-radius: 4px;
  background: #231209;
  color: var(--brass-bright);
  font: 800 .76em/1.15 ui-monospace, monospace;
  text-align: center;
  white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255, 224, 150, 0.2);
}

.screen {
  position: absolute;
  inset: 0;
  z-index: 5;
}
.screen:not(.hidden) {
  animation: screen-in 210ms cubic-bezier(.16, 1, .3, 1) both;
}
@keyframes screen-in {
  from { opacity: 0; transform: scale(0.99); }
  to { opacity: 1; transform: none; }
}

.title-screen {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  overflow: hidden;
  background: var(--bg-void);
  color: var(--text-main);
}
.menu-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.title-content {
  position: relative;
  z-index: 2;
  width: 45%;
  align-self: center;
  padding: 2% 2% 0.8% 5.4%;
}
.title-lockup { margin-bottom: 1.2cqw; }
.title-lockup h1 {
  font: 950 clamp(42px, 7.2cqw, 130px)/.94 var(--display);
  letter-spacing: -.06em;
  white-space: nowrap;
  background: linear-gradient(180deg, #fff9e6 0%, #ffd56b 48%, #c97d1c 100%);
  -webkit-background-clip: text;
  color: transparent;
  filter: drop-shadow(0 5px 0 #3a1b07) drop-shadow(0 10px 18px rgba(0, 0, 0, 0.85));
}
.title-lockup h1 span { display: block; }
.title-menu { display: grid; gap: .36em; width: min(100%, max(12em, 21cqw)); }
.title-menu #btn-open-codex { margin-top: .4em; }
#continue-floor { font-size: .82em; font-variant-numeric: tabular-nums; }

.menu-choice {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .8em;
  min-height: 2em;
  padding: .34em .9em;
  border: 2px solid #b57e36;
  border-radius: 7px;
  background: linear-gradient(180deg, #5d3922 0%, #3d2415 58%, #2b180d 100%);
  color: var(--text-main);
  text-align: left;
  font-size: clamp(12px, 1.18cqw, 20px);
  font-weight: 800;
  white-space: nowrap;
  text-shadow: 0 1.5px 0 rgba(18, 9, 4, 0.85);
  box-shadow: 0 0 0 1.5px #180b04, 0 3px 0 #150b05, inset 0 1px 0 rgba(255, 232, 175, 0.28);
  transition: transform .13s ease, border-color .13s ease, background .13s ease, box-shadow .13s ease, color .13s ease;
}
.pause-menu .menu-choice:is(:hover, :focus-visible),
.pause-menu:not(:has(button:is(:hover, :focus-visible))) #btn-resume {
  border-color: #ffe28a;
  background: linear-gradient(180deg, #7a4b2b 0%, #52301a 60%, #382011 100%);
  color: #fff9e6;
  transform: translate(4px, -1px);
  box-shadow: 0 0 0 1.5px #180b04, 0 5px 0 #150b05, inset 0 1px 0 rgba(255, 240, 190, 0.48);
}

.title-menu .menu-choice:not(#btn-play):not(#btn-continue) {
  border: 0;
  border-radius: 4px;
  background: transparent;
  box-shadow: none;
  padding: .3em .9em .3em 1.5em;
  color: #ebd6b2;
  font-size: clamp(12px, 1.24cqw, 21px);
  font-weight: 800;
  text-shadow: 0 2px 6px rgba(10, 5, 2, 0.95);
}
.title-menu .menu-choice:not(#btn-play):not(#btn-continue)::before {
  content: "";
  position: absolute;
  left: .25em;
  width: .4em;
  height: .4em;
  background: #ffe28a;
  opacity: 0;
  transform: translateX(-4px) rotate(45deg);
  transition: opacity .14s ease, transform .14s ease;
}
.title-menu .menu-choice:not(#btn-play):not(#btn-continue):is(:hover, :focus-visible) {
  border: 0;
  box-shadow: none;
  background: linear-gradient(90deg, rgba(235, 168, 56, 0.28), rgba(235, 168, 56, 0.05) 78%, transparent);
  color: #fff8e2;
  transform: translateX(8px);
}
.title-menu .menu-choice:not(#btn-play):not(#btn-continue):is(:hover, :focus-visible)::before {
  opacity: 1;
  transform: rotate(45deg);
}

.title-menu #btn-continue {
  border: 0;
  border-radius: 0;
  clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 10px 100%, 0 50%);
  padding: .36em 1.25em;
  background: linear-gradient(180deg, #2cb67d 0%, #1c8559 58%, #125639 100%);
  color: #f4fff9;
  font-weight: 900;
  box-shadow: inset 0 2px 0 rgba(200, 255, 232, 0.45), inset 0 -2px 0 rgba(7, 34, 22, 0.72);
}
.title-menu #btn-continue:is(:hover, :focus-visible) {
  background: linear-gradient(180deg, #35ce8f 0%, #229967 60%, #166e49 100%);
  color: #ffffff;
  transform: translateX(6px);
}

.title-menu #btn-play {
  position: relative;
  overflow: hidden;
  min-height: 2.35em;
  margin-bottom: .16em;
  border: 0;
  border-radius: 0;
  clip-path: polygon(11px 0, calc(100% - 11px) 0, 100% 50%, calc(100% - 11px) 100%, 11px 100%, 0 50%);
  padding: .4em 1.35em;
  background: linear-gradient(180deg, #ff7048 0%, #cf341b 55%, #8f1b0a 100%);
  color: #fff8e6;
  font-size: clamp(13px, 1.38cqw, 24px);
  font-weight: 950;
  text-shadow: 0 2px 0 rgba(50, 10, 4, 0.78);
  box-shadow: inset 0 2px 0 rgba(255, 224, 180, 0.55), inset 0 -2px 0 rgba(40, 8, 3, 0.75);
}
.title-menu #btn-play::before {
  content: "";
  position: absolute;
  inset: -20% -60%;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 244, 210, 0.34) 50%, transparent 65%);
  transform: translateX(-85%);
  transition: transform .45s ease;
}
.title-menu #btn-play:is(:hover, :focus-visible)::before { transform: translateX(85%); }
.title-menu #btn-play:is(:hover, :focus-visible) {
  background: linear-gradient(180deg, #ff8159 0%, #e64124 58%, #ab220f 100%);
  color: #ffffff;
  transform: translateX(6px);
}

.title-footer {
  position: relative;
  z-index: 2;
  width: 100%;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: .65em;
  flex-wrap: nowrap;
  padding: .45em 4.8% .8em;
  color: var(--text-sub);
  font-size: clamp(8.5px, .84cqw, 14px);
}
.title-footer .menu-keys { white-space: nowrap; margin-right: .45em; }
.title-footer .text-action {
  padding: .3em .78em;
  border: 1.5px solid rgba(224, 166, 58, 0.55);
  border-radius: 999px;
  background: rgba(24, 13, 7, 0.78);
  color: var(--brass-bright);
}
.title-footer .text-action:is(:hover, :focus-visible) {
  border-color: var(--brass-bright);
  background: rgba(48, 26, 14, 0.92);
}
.menu-keys kbd { margin-inline: .15em; }

.text-action {
  border: 0;
  padding: .42em .55em;
  background: transparent;
  color: var(--brass-bright);
  font-weight: 800;
  text-align: left;
  white-space: nowrap;
  text-shadow: 0 2px 4px rgba(18, 9, 4, 0.9);
  transition: color .14s ease, transform .12s ease;
}
.text-action:is(:hover, :focus-visible) { color: #ffffff; transform: translateY(-1px); }

.ledger-screen, .expedition-screen {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: .95cqw;
  overflow: hidden;
  padding: 2.2% 4.8% 2%;
  background:
    radial-gradient(ellipse at 50% 10%, rgba(235, 150, 52, 0.2), transparent 60%),
    linear-gradient(180deg, rgba(28, 15, 8, 0.65), rgba(18, 10, 5, 0.85)),
    url("assets/pixel/bg_guild_pixel.png") center / cover;
  color: var(--text-main);
}
.screen-head, .screen-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.2em;
  min-width: 0;
}
.screen-head {
  padding: .15em .2em .55em;
  background: none;
  border: 0;
  border-bottom: 1.5px solid transparent;
  border-image: linear-gradient(90deg, transparent, rgba(224, 166, 58, 0.55) 20%, rgba(224, 166, 58, 0.55) 80%, transparent) 1;
  box-shadow: none;
}
.screen-head h2, .pause-panel h2, .expedition-head h2 {
  font-family: var(--display);
  font-size: clamp(20px, 2.75cqw, 46px);
  font-weight: 950;
  line-height: 1.12;
  background: linear-gradient(180deg, #fff8e4 0%, #ffd46c 55%, #cc8120 100%);
  -webkit-background-clip: text;
  color: transparent;
  filter: drop-shadow(0 3px 0 #2b1305);
}
.screen-head > p, .screen-foot > p { color: #ffe3b0; font-size: .9em; font-weight: 700; text-shadow: 0 2px 6px #120904; }
.back-action { padding: .28em .65em; margin-bottom: .2em; border-radius: 999px; border: 1.5px solid rgba(224, 166, 58, 0.48); background: rgba(26, 14, 7, 0.72); font-size: .84em; }

.choice-strip { display: flex; gap: .42em; flex-wrap: wrap; }
.mode-choice {
  padding: .4em .88em;
  border: 2px solid #b57e36;
  border-radius: 7px;
  background: linear-gradient(180deg, #54331e, #361f12);
  color: #f4dfc0;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 0 0 1.5px #180b04, 0 3px 0 #150b05, inset 0 1px 0 rgba(255, 232, 175, 0.24);
  transition: transform .12s ease, border-color .12s ease, background .12s ease, color .12s ease;
}
.mode-choice[aria-pressed="true"] {
  border-color: #733407;
  background: linear-gradient(180deg, #ffe484 0%, #f2a924 55%, #cf740e 100%);
  color: #2b1304;
  font-weight: 900;
  box-shadow: 0 0 0 1px #2b1203, 0 4px 0 #733407, inset 0 1.5px 0 rgba(255, 252, 220, 0.85);
}
.mode-choice:hover:not([aria-pressed="true"]) { border-color: var(--brass-bright); color: #ffffff; transform: translateY(-1px); }

.screen-foot {
  min-height: 2.4em;
  padding: .55em .1em .1em;
  background: none;
  border: 0;
  border-top: 1.5px solid transparent;
  border-image: linear-gradient(90deg, transparent, rgba(224, 166, 58, 0.45) 20%, rgba(224, 166, 58, 0.45) 80%, transparent) 1;
  box-shadow: none;
}
.action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .65em;
  padding: .44em 1.05em;
  border: 2px solid #b57e36;
  border-radius: 7px;
  background: linear-gradient(180deg, #5d3922, #382013);
  color: #ffe8b8;
  font-weight: 850;
  white-space: nowrap;
  box-shadow: 0 0 0 1.5px #180b04, 0 3px 0 #150b05, inset 0 1px 0 rgba(255, 232, 175, 0.28);
  transition: transform .1s ease, border-color .12s ease, background .12s ease, box-shadow .1s ease;
}
.action:hover:not(:disabled) {
  border-color: var(--brass-bright);
  background: linear-gradient(180deg, #74472a, #492a19);
  transform: translateY(-1px);
}
.action:active:not(:disabled) {
  transform: translateY(2px);
  box-shadow: 0 0 0 1.5px #180b04, 0 1px 0 #150b05;
}
.action.primary {
  border: 2px solid #733407;
  background: linear-gradient(180deg, #ffe484 0%, #f2a924 55%, #cf740e 100%);
  box-shadow: 0 0 0 1px #2b1203, 0 4px 0 #733407, 0 8px 18px rgba(0, 0, 0, 0.48), inset 0 1.5px 0 rgba(255, 252, 220, 0.85);
  color: #2b1304;
  font-weight: 950;
}
.action.primary:hover:not(:disabled) {
  background: linear-gradient(180deg, #ffed9e 0%, #f7b836 55%, #dd8014 100%);
  border-color: #8f420a;
}
.action.primary:active:not(:disabled) {
  transform: translateY(2px);
  box-shadow: 0 0 0 1px #2b1203, 0 1.5px 0 #733407;
}
.action:disabled { opacity: .48; filter: grayscale(0.35); }

#in-game-hud-bar {
  --hud-inset: clamp(5px, 1.25cqw, 18px);
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(172px, 25cqw, 320px) minmax(0, 1fr);
  align-items: start;
  gap: clamp(4px, .85cqw, 12px);
  padding: var(--hud-inset);
  pointer-events: none;
  font-size: clamp(12px, 1.1cqw, 19px);
}
.round-readout {
  min-width: 0;
  justify-self: start;
  display: grid;
  gap: .25em;
  padding: .33em .56em;
  line-height: 1.19;
  border: 0;
  border-radius: 0 8px 8px 0;
  background: linear-gradient(90deg, rgba(28, 16, 9, 0.88), rgba(28, 16, 9, 0.38));
  color: var(--text-main);
  box-shadow: inset 3.5px 0 0 #e5ae49, 0 4px 12px rgba(0, 0, 0, 0.35);
}
.mining-readout {
  padding: .32em .52em;
  border: 1px solid #8a6544;
  background: #1c1510ed;
}
.round-heading, .round-details { display: flex; align-items: baseline; flex-wrap: wrap; gap: .16em .65em; }
.round-details { font-size: max(11px, .8em); }
.round-details:not(:has(> :not(.hidden))) { display: none; }
#hud-round-label { color: var(--brass-bright); font-weight: 900; white-space: nowrap; }
#hud-mine-label { font-size: max(11px, .9em); color: #fff5e0; }
#hud-shards { color: #ffd970; font-size: clamp(12px, 1.27cqw, 21px); white-space: nowrap; }
.hud-center {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: .3em .4em;
}
.hud-center:not(:has(.haul-objective:not(.hidden), .boss-bar:not(.hidden))) .mine-clock { grid-column: 1 / -1; justify-self: center; }
.haul-objective {
  --haul-ink: #ffd278;
  min-width: 0;
  padding: .24em .48em .29em;
  color: #fff4d8;
  background: linear-gradient(180deg, #3d2515f7, #190f0bf7);
  border: 1px solid #c48951;
  border-radius: .6em;
  box-shadow: 0 3px 12px #100904c9, inset 0 1px #ffdfa63d;
}
.haul-objective.met { --haul-ink: #bcf59f; }
.haul-objective.complete {
  border-color: #92c680;
  animation: haul-complete .64s ease-out;
}
@keyframes haul-complete {
  0%, 38% { box-shadow: 0 0 1.1em #afe98c96, inset 0 0 1.05em #d2ff9229; }
}
.haul-tally {
  display: flex;
  justify-content: center;
  align-items: baseline;
  flex-wrap: wrap;
  gap: .04em .33em;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.haul-tally > :first-child {
  color: #f0cf9e;
  font-weight: 850;
}
.haul-values { display: inline-flex; align-items: baseline; gap: .3em; }
#hud-haul-current {
  color: var(--haul-ink);
  font: 950 clamp(17px, 2.2cqw, 36px)/1 var(--display);
  text-shadow: 0 2px #231106;
}
#hud-haul-target {
  font: 850 clamp(12px, 1.25cqw, 24px)/1 var(--display);
}
.haul-meter {
  height: clamp(4px, .54cqw, 8px);
  margin: .19em 0 .12em;
  overflow: hidden;
  background: #100a07;
  border-radius: 99px;
  box-shadow: inset 0 0 0 1px #bc955844;
}
#hud-haul-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #cf8036, var(--haul-ink) 72%, #fff4c9);
  transform: scaleX(var(--haul-progress, 0));
  transform-origin: left;
  transition: transform .28s cubic-bezier(.14, .83, .3, 1);
}
.haul-objective.met #hud-haul-fill { background: linear-gradient(90deg, #5d9c64, #c8f5a8); }
#hud-haul-status {
  color: #f3d5a8;
  font-size: max(11px, .83em);
  font-weight: 800;
  text-align: center;
  white-space: nowrap;
}
.haul-objective.complete #hud-haul-status { color: var(--haul-ink); }

#hud-lower {
  position: absolute;
  inset: auto var(--hud-inset) var(--hud-inset);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: .5em;
}
#hud-lower > * { min-width: 0; max-inline-size: min(46cqw, 390px); }
.match-notices { margin-inline-start: auto; }

#ore-feedback {
  --feedback-top: 18.6%;
  position: absolute;
  inset: 0;
  display: grid;
}
#in-game-hud-bar:has(.boss-bar:not(.hidden)) #ore-feedback { --feedback-top: 20%; }
#ore-feedback[data-duo] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#ore-feedback:not([data-duo]) > .ore-feedback-slot + .ore-feedback-slot { display: none; }
.ore-feedback-slot { position: relative; }
.ore-feedback {
  --amount-size: clamp(22px, min(3.25cqw, calc(var(--feedback-width) * .165)), 52px);
  --multiplier-size: clamp(19px, min(2.7cqw, calc(var(--feedback-width) * .13)), 43px);
  position: absolute;
  inset-block-start: var(--feedback-top);
  inset-inline-start: var(--feedback-edge);
  display: grid;
  gap: .22em;
  inline-size: max-content;
  max-inline-size: var(--feedback-width);
  justify-items: start;
}
.ore-feedback[data-side="left"] {
  inset-inline: auto calc(100% - var(--feedback-edge));
  justify-items: end;
  text-align: right;
}
.ore-feedback > * { min-inline-size: 0; max-inline-size: 100%; }
#haul-receipt-0:empty, #haul-receipt-1:empty { display: none; }
.haul-receipt {
  --receipt-ink: #ffe3a5;
  --ore-outline: -2px 0 #180f16, 2px 0 #180f16, 0 -2px #180f16, 0 2px #180f16,
    -1px -1px #180f16, 1px -1px #180f16, -1px 1px #180f16, 1px 1px #180f16;
  display: grid;
  gap: .2em;
  color: var(--receipt-ink);
  text-shadow: var(--ore-outline);
  animation: haul-receipt 1.85s both;
}
.haul-receipt[data-impact="chain"] {
  --receipt-ink: #ddf9ad;
  animation-duration: 2.15s;
}
.haul-receipt[data-impact="jackpot"], .haul-receipt[data-impact="charge"] {
  --receipt-ink: #ffde88;
  animation-duration: 2.55s;
}
.receipt-label {
  color: #fff0af;
  font-size: clamp(12px, 1.36cqw, 22px);
  font-weight: 800;
}
.receipt-tally {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .24em .58em;
  color: var(--receipt-ink);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.ore-feedback[data-side="left"] :is(.receipt-tally, #hud-mining-streak) { justify-content: flex-end; }
.receipt-tally strong {
  font: 950 var(--amount-size)/1 var(--display);
  text-shadow: var(--ore-outline), 0 5px #774821;
  animation: haul-number-in .26s both;
}
.receipt-tally b {
  padding: .08em .19em;
  border-radius: .26em;
  border: 1px solid #442921;
  background: var(--receipt-ink);
  color: #241409;
  text-shadow: none;
  font: 950 var(--multiplier-size)/1.08 var(--display);
  animation: haul-number-in .34s .07s both;
}
.haul-receipt[data-impact="jackpot"] b, .haul-receipt[data-impact="charge"] b {
  background: linear-gradient(180deg, #fff0ad 67%, #ffcb6d 67%);
  box-shadow: 0 2px #6a4225, 0 0 .52em #fbb34860;
}
.receipt-pattern, .receipt-discovery {
  font-size: max(11px, .96em);
  font-weight: 850;
  overflow-wrap: anywhere;
}
.receipt-discovery { color: #c7e9ad; }
.haul-receipt:has(.receipt-discovery) { animation-duration: 2.65s; }
@keyframes haul-receipt {
  0% { opacity: 1; transform: translateY(.25em); }
  8%, 80% { opacity: 1; transform: none; }
  100% { opacity: 0; visibility: hidden; }
}
@keyframes haul-number-in {
  0% { transform: scale(.81); }
  55% { transform: scaleY(1.13); }
  100% { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  #hud-haul-fill { transition: none; }
  .haul-objective.complete { animation: none; }
  .haul-receipt { animation-name: haul-receipt-fade; }
  .receipt-tally > * { animation: none; }
}
@keyframes haul-receipt-fade {
  0%, 75% { opacity: 1; }
  100% { opacity: 0; visibility: hidden; }
}
#hud-mining-streak {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: .2em .6em;
  color: #ffc675;
  font-size: max(12px, .94em);
  font-weight: 850;
  line-height: 1.16;
}
#hud-mining-chain {
  display: inline-flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: .2em .4em;
  padding: .18em .28em;
  color: #ffe3a1;
  background: #201917ed;
}
#hud-streak-time { font-size: .83em; color: #e4cfa0; }
#hud-streak-multiplier, #hud-next-multiplier { font-size: max(14px, 1.3cqw); }
#hud-next-multiplier {
  padding: .08em .25em;
  background: #ffd681;
  color: #301807;
  text-shadow: none;
  white-space: nowrap;
}
.ore-feedback:has(.haul-receipt[data-impact="charge"]) #hud-next-multiplier { display: none; }
#hud-pattern {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: .18em .45em;
  color: #dcf1b4;
  font-size: max(11px, .82em);
  font-weight: 850;
}
#hud-pattern-readout { min-width: 0; overflow-wrap: anywhere; }
#btn-pattern-discard {
  padding: 0;
  border: 0;
  background: none;
  color: #dec7a2;
  font: inherit;
  white-space: nowrap;
  pointer-events: auto;
}
#btn-pattern-discard:disabled { opacity: .5; }
#hud-kills { color: #ffb38e; }
#hud-wave { color: #ffe0a3; white-space: nowrap; }
#hud-wave.danger { color: #ffb38e; }

.descent-screen {
  isolation: isolate;
  overflow: hidden;
  background: #17100d;
}
#screen-descent:not(.hidden) { animation: none; }
.descent-shaft, .descent-streaks {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.descent-shaft::after {
  position: absolute;
  inset: 0;
  content: "";
  opacity: var(--scene-ink, 1);
  background: linear-gradient(0deg, #160c08c9, transparent 38%, #0a07094f),
    radial-gradient(ellipse at 50% 46%, transparent 29%, #09050692 87%);
}
.descent-rock {
  position: absolute;
  inset: 0;
  transform: translateY(var(--shaft-y, 0%));
}
.descent-rock canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}
#descent-to { top: 176%; }
.descent-shaft-wall {
  position: absolute;
  inset: 100% 0 auto;
  height: 76%;
  background: linear-gradient(180deg, #12100c 0%, #12100c30 15% 84%, #12100c 100%),
    url("assets/pixel/bg_drill_cage_pixel.png") center / 100% auto;
}
.descent-streaks {
  background: radial-gradient(ellipse 1px 7% at 21% 55%, #fcdb9fbb, transparent),
    radial-gradient(ellipse 2px 6% at 78% 73%, #ffe2aaac, transparent),
    radial-gradient(ellipse 1px 5% at 67% 88%, #f7b46ddc, transparent),
    radial-gradient(ellipse 1px 8% at 32% 91%, #ffe5bfaf, transparent),
    radial-gradient(ellipse 2px 4% at 61% 45%, #ffb58fa2, transparent);
  opacity: var(--rush, 0);
  transform: translateY(var(--spark-y, 0%));
}
.descent-rig {
  position: absolute;
  top: 15%;
  left: 50%;
  width: 22%;
  opacity: var(--scene-ink, 1);
  transform: translate(-50%, var(--rig-y, 0)) rotate(var(--rig-tilt, 0deg));
}
.descent-rig::before {
  content: "";
  position: absolute;
  left: calc(50% - 2px);
  width: 5px;
  bottom: calc(100% - .55cqw);
  height: 180%;
  background: repeating-linear-gradient(0deg, #382825 0 3px, #a97b55 3px 5px, #674637 5px 9px);
}
.descent-passengers {
  position: absolute;
  inset: 32% 34% 51%;
  display: flex;
  justify-content: center;
}
.descent-passengers img {
  width: 50%;
  object-fit: contain;
  object-position: center bottom;
}
.descent-passengers img:only-child { width: 72%; }
.descent-rig > img {
  position: relative;
  display: block;
  width: 100%;
  filter: drop-shadow(0 1.4cqw 1.6cqw #100704cf);
}
.descent-dust {
  position: absolute;
  left: 50%;
  top: 45%;
  width: 49%;
  height: 38%;
  background:
    radial-gradient(ellipse at 52% 78%, #e39d5dce, transparent 59%),
    radial-gradient(ellipse at 65% 52%, #b46e45ad, transparent 43%),
    radial-gradient(ellipse at 34% 48%, #d7986b88, transparent 36%);
  opacity: var(--dust, 0);
  transform: translateX(-50%);
}
.descent-readout {
  position: absolute;
  inset: auto auto 9% 6%;
  padding-left: .85em;
  border-left: 2px solid #d69651;
  color: #ffefd4;
  text-shadow: 0 3px 18px #130805;
  opacity: var(--title-ink, 0);
}
.descent-readout p {
  margin: 0 0 .25em;
  color: #e8b57a;
  font: 850 .9em/1.2 ui-monospace, monospace;
  letter-spacing: .1em;
}
.descent-readout h2 {
  margin: 0;
  font: 950 clamp(19px, 4.3cqw, 63px)/1.05 var(--display);
}
#btn-skip-descent {
  position: absolute;
  right: 5%;
  bottom: 8%;
  opacity: var(--scene-ink, 1);
}
.descent-screen.reduced .descent-rock { transform: none; }
.descent-screen.reduced #descent-to { top: 0; opacity: var(--arrival, 0); }
.descent-screen.reduced .descent-streaks, .descent-screen.reduced .descent-dust,
.descent-screen.reduced .descent-shaft-wall { display: none; }
.descent-screen.reduced .descent-rig { transform: translate(-50%, 15%); }
.descent-screen.reduced .descent-readout { opacity: var(--scene-ink, 0); }
.descent-screen.reduced #btn-skip-descent { opacity: 1; }
.mine-clock {
  grid-column: 2;
  position: relative;
  min-width: 2.65em;
  padding: .22em .45em .31em;
  text-align: center;
  font-variant-numeric: tabular-nums;
  border: 2.5px solid #d9a03d;
  border-radius: 999px;
  background: radial-gradient(circle at 50% 28%, #472a16, #1a0d06 82%);
  color: var(--text-main);
  box-shadow: 0 0 0 2px #1c0d06, 0 5px 14px rgba(0, 0, 0, 0.6), inset 0 1.5px 0 rgba(255, 235, 175, 0.45);
}
.mine-clock::before {
  content: "";
  position: absolute;
  top: -7px;
  left: 50%;
  transform: translateX(-50%);
  width: 14px;
  height: 5px;
  border: 2px solid #d9a03d;
  border-bottom: 0;
  border-radius: 6px 6px 0 0;
  background: #2b170c;
}
.mine-clock::after {
  position: absolute;
  content: "";
  left: 16%;
  bottom: 2px;
  width: calc(var(--time-left, 100%) * 0.68);
  height: 2.5px;
  border-radius: 999px;
  background: linear-gradient(90deg, #f29d1f, #ffe68a);
}
#hud-timer {
  display: block;
  font: 950 clamp(17px, 1.9cqw, 34px)/1 ui-monospace, monospace;
  color: #ffe68e;
  text-shadow: 0 2px 0 #1f0e05;
}
#hud-timer.urgent { color: #ff815e; }
#hud-timer.settling { min-width: 3.4em; color: #ffe49c; font-family: inherit; font-size: clamp(10px, 1.25cqw, 20px); font-weight: 850; line-height: 1.65; }
#hud-coop-goal { display: block; margin-top: .18em; font-size: .7em; color: #f4dfc0; }
#hud-coop-current { color: #ffe07d; font-weight: 850; }

.hud-actions {
  display: flex;
  align-items: start;
  justify-self: end;
  gap: .35em;
}
.hud-relic-strip {
  list-style: none;
  padding: 0;
  display: flex;
  align-items: center;
  gap: .36em;
  flex-wrap: wrap;
  background: transparent;
  border: 0;
  box-shadow: none;
}
.hud-relic-chip {
  position: relative;
  width: 2.3em;
  height: 2.3em;
  padding: 0;
  border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--relic-ink, #e0a63a) 82%, #241208);
  background: radial-gradient(circle, #382012, #180c06);
  box-shadow: 0 0 0 1.5px #140904, 0 3px 8px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}
.hud-relic-chip img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hud-relic-chip strong {
  position: absolute;
  right: 2px;
  bottom: 0;
  padding: 0 3px;
  border-radius: 4px 0 0 0;
  background: rgba(24, 12, 6, 0.94);
  color: #ffe28a;
  font: 850 .6em/1.15 ui-monospace, monospace;
}

.mine-pause {
  pointer-events: auto;
  padding: .22em .48em;
  display: flex;
  align-items: center;
  gap: .48em;
  border: 2px solid #c9923e;
  border-radius: 999px;
  background: radial-gradient(circle at 50% 28%, #472a16, #1a0d06 85%);
  color: var(--text-main);
  box-shadow: 0 0 0 1.5px #180b04, 0 3px 10px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 232, 175, 0.35);
}
.mine-pause:hover {
  background: linear-gradient(180deg, #6b4127, #412516);
  border-color: var(--brass-bright);
}
.mine-pause > span { font-weight: 950; color: var(--brass-bright); }

.boss-bar {
  grid-column: 1 / -1;
  min-width: 0;
  padding: .18em .5em;
  border: 1px solid #bb8549;
  background: #25170ff0;
  pointer-events: none;
  font-size: clamp(12px, 1.06cqw, 17px);
}
.boss-bar-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: .35em;
  margin-bottom: .18em;
}
#hud-boss-name {
  font-family: var(--display);
  color: #ffefd6;
  font-size: 1em;
  font-weight: 950;
  letter-spacing: .04em;
  text-shadow: 0 2px 4px #120603, 0 0 10px rgba(0, 0, 0, 0.85);
}
#hud-boss-health { color: #ffe3b0; white-space: nowrap; }
#hud-boss-hint {
  margin-top: .15em;
  color: #ffdc98;
  font-size: max(11px, .88em);
  line-height: 1.16;
}
.boss-hp-track {
  position: relative;
  height: clamp(5px, .67cqw, 10px);
  background: #220d0a;
  border: 2px solid #d99b38;
  border-radius: 999px;
  box-shadow: 0 0 0 2px #1a0904, 0 6px 16px rgba(0, 0, 0, 0.72);
  overflow: hidden;
}
#hud-boss-trail {
  position: absolute;
  inset: 0 auto 0 0;
  width: 100%;
  background: rgba(255, 232, 195, 0.8);
  transition: width .42s ease-out;
}
#hud-boss-fill {
  position: relative;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #a61919, #ef4444 58%, #f59e0b);
  transition: width .12s ease-out;
}

#round-intro {
  position: absolute;
  z-index: 2;
  inset: 39% 0 auto;
  display: grid;
  grid-template-columns: auto auto;
  justify-content: center;
  gap: .25em 2.2em;
  align-items: center;
  justify-items: start;
  padding: 1.05em 4em;
  background: linear-gradient(90deg, transparent, rgba(46, 22, 11, 0.92) 18%, rgba(62, 30, 15, 0.96) 50%, rgba(46, 22, 11, 0.92) 82%, transparent);
  border-block: 2px solid transparent;
  border-image: linear-gradient(90deg, transparent, #e6a944 18%, #e6a944 82%, transparent) 1;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.65);
  pointer-events: none;
}
#round-intro-name { font-family: var(--display); font-size: clamp(16px, 2.5cqw, 38px); color: var(--brass-bright); font-weight: 950; letter-spacing: .04em; text-shadow: 0 3px 0 #261005; }
#round-intro-count { grid-area: 1 / 2 / 3 / 3; color: #fff6dc; font: 950 clamp(26px, 4.8cqw, 68px)/1 ui-monospace, monospace; text-shadow: 0 4px 0 #2c1205; }
#round-intro-rule { color: #f6e0ba; font-size: clamp(11px, 1.08cqw, 18px); font-weight: 700; }
#in-game-hud-bar[data-countdown] .match-notices { display: none; }

.match-notices {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .25em;
  font-size: clamp(11px, .99cqw, 17px);
}
.match-notices:not(:has(> :not(.hidden))) { display: none; }
.match-notice {
  min-width: 0;
  max-width: 100%;
  padding: .17em .42em;
  border: 1.5px solid #c9923e;
  border-radius: 4px;
  background: rgba(34, 19, 10, 0.9);
  line-height: 1.16;
  overflow-wrap: anywhere;
}
.match-notice strong { display: block; color: var(--brass-bright); }
.match-notice span { color: var(--text-main); }

.touch-actions { display: none; }
@media (pointer: coarse) {
  #mine-field:has(.touch-actions:not(.hidden)) .match-notices { margin-bottom: 46px; }
  .touch-actions {
    position: absolute;
    z-index: 4;
    right: 2%;
    bottom: 2%;
    display: flex;
    gap: .35em;
    font-size: clamp(10px, 1.35cqw, 18px);
  }
  .touch-actions button {
    min-height: 36px;
    padding: .4em .55em;
    border: 2px solid #b57e36;
    border-radius: 7px;
    background: linear-gradient(180deg, #5d3922, #382013);
    box-shadow: 0 0 0 1px #180b04, 0 3px 0 #150b05;
  }
  .touch-actions button:disabled { opacity: .45; }
}

@container (max-width: 1050px) {
  #in-game-hud-bar:has(.boss-bar:not(.hidden)) #ore-feedback { --feedback-top: 33%; }
  .ore-feedback {
    --amount-size: clamp(19px, min(3.25cqw, calc(var(--feedback-width) * .165)), 52px);
    --multiplier-size: clamp(16px, min(2.7cqw, calc(var(--feedback-width) * .13)), 43px);
  }
}

@container (max-width: 640px) {
  #in-game-hud-bar { grid-template-columns: minmax(0, 1fr) minmax(150px, 42%) auto; }
  .round-readout { gap: .19em; padding: .24em .32em; }
  .round-heading, .round-details { gap: .12em .43em; }
  .round-heading { flex-wrap: nowrap; }
  #hud-mine-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .hud-center { column-gap: .22em; }
  .haul-objective { padding-inline: .27em; }
  .haul-tally { column-gap: .25em; }
  .haul-tally > :first-child { font-size: .83em; }
  .hud-actions kbd { display: none; }
  .hud-actions .mine-pause { padding: .32em .43em; }
  .match-notice { padding-inline: .32em; }
  .match-notice strong { display: inline; margin-inline-end: .24em; }
  .mining-readout { padding: .23em .38em; }
}

@container (max-width: 540px) {
  .haul-label-prefix { display: none; }
  .haul-objective, .boss-bar { line-height: 1.18; }
  #hud-haul-target { font-size: 11px; }
  .ore-feedback[data-side] {
    --compact-width: min(44cqw, 190px);
    --amount-size: clamp(22px, 3.25cqw, 52px);
    --multiplier-size: clamp(19px, 2.7cqw, 43px);
    inset-block-start: 46%;
    inset-inline: clamp(calc(var(--hud-inset) + var(--compact-width) / 2), var(--miner-position), calc(100% - var(--hud-inset) - var(--compact-width) / 2)) auto;
    inline-size: var(--compact-width);
    max-inline-size: none;
    translate: -50% 0;
    justify-items: center;
    text-align: center;
  }
  .ore-feedback[data-side] :is(.receipt-tally, #hud-mining-streak) { justify-content: center; }
  .haul-receipt:has(.receipt-discovery) .receipt-pattern { display: none; }
  :is(.receipt-pattern, .receipt-discovery, .match-notice, #hud-pattern-readout, #hud-boss-hint) {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }
  #hud-pattern { flex-wrap: nowrap; }
}

#danmaku-layer {
  position: absolute;
  z-index: 1;
  inset: 42% 0 25%;
  overflow: hidden;
  pointer-events: none;
}
.danmaku-item {
  position: absolute;
  left: 100%;
  white-space: nowrap;
  color: #fff7e6;
  font-size: clamp(11px, 1.23cqw, 21px);
  font-weight: 750;
  text-shadow: 0 2px 4px #1c0d05, 0 0 2px #1c0d05;
}
.dm-gold { color: #ffde84; }
.dm-red { color: #ffb299; }
.dm-cyan { color: #b0f3f9; }
.dm-pink { color: #ffd0e3; }
.dm-big { font-size: 1.2em; }

#screen-shop[data-expedition] {
  background:
    radial-gradient(ellipse at 50% 24%, rgba(168, 92, 28, 0.28), rgba(20, 10, 5, 0.62) 74%),
    linear-gradient(180deg, rgba(36, 17, 7, 0.42), rgba(18, 9, 4, 0.72)),
    url("assets/pixel/bg_market_pixel.png") center / cover;
}
.shop-layout, .results-layout {
  min-height: 0;
  overflow: hidden;
  display: grid;
  gap: 1.6cqw;
  grid-template-columns: minmax(0, 24%) minmax(0, 1fr);
}
.shop-counter {
  min-height: 0;
  overflow: hidden;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
}
.shopkeeper-img {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
  object-position: bottom;
  filter: drop-shadow(0 .5em .85em rgba(15, 7, 3, 0.88));
}
.shop-standings-wrap {
  padding: .25em .45em;
  margin-top: .25em;
  border: 12px solid transparent;
  border-image: var(--svg-parchment-frame) 24 fill / 12px / 0 stretch;
  color: var(--ink);
  font-size: .92em;
  filter: drop-shadow(0 8px 16px rgba(10, 5, 2, 0.65));
}
.shop-standings-wrap h3 { font-size: .86em; color: #7c3810; font-weight: 900; margin-bottom: .2em; }
#shop-standings { padding-left: 0; list-style: none; font-size: .82em; color: var(--ink-sub); display: grid; gap: .22em; }
#shop-standings li > div { display: flex; justify-content: space-between; align-items: center; gap: .4em; }
#shop-standings strong { color: #2a170b; font-weight: 900; white-space: nowrap; }
#shop-standings small { margin-left: .3em; color: #166534; font-weight: 800; }

.shop-inventory { display: grid; grid-template-rows: auto minmax(0, 1fr); min-width: 0; min-height: 0; overflow: hidden; }
.buyer-bar {
  min-height: 2.1em;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .5em;
  padding: 0 0 .42em;
  margin-bottom: .35em;
  border: 0;
  background: none;
  box-shadow: none;
  color: #f4dfc0;
  font-size: .88em;
}
.buyer-tab {
  border: 2px solid #b57e36;
  border-radius: 7px;
  padding: .28em .72em;
  background: linear-gradient(180deg, #5c3822, #382012);
  color: #f8e5c4;
  font-weight: 800;
  box-shadow: 0 0 0 1px #180b04, 0 3px 0 #150b05;
}
.buyer-tab[aria-pressed="true"] {
  border-color: #733407;
  background: linear-gradient(180deg, #ffe484, #f2a924 55%, #cf740e);
  color: #2b1304;
  font-weight: 900;
  box-shadow: 0 0 0 1px #2b1203, 0 3px 0 #733407, inset 0 1.5px 0 rgba(255, 252, 220, 0.85);
}
.market-wallet { margin-right: auto; font-weight: 850; color: #ffe3b0; text-shadow: 0 2px 6px #120904; }
.market-wallet strong { margin-inline: .2em; font: 950 1.7em/1 ui-monospace, monospace; color: var(--brass-bright); text-shadow: 0 2px 0 #241105; }

.shop-list {
  list-style: none;
  padding: .15em .2em .35em;
  overflow: auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: auto;
  align-content: start;
  gap: .75em .85em;
}
.shop-item {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  justify-items: center;
  gap: .36em;
  min-width: 0;
  padding: .42em .58em .58em;
  border: 0;
  border-bottom: 7px solid #593016;
  border-radius: 8px 8px 3px 3px;
  background: linear-gradient(180deg, rgba(20, 10, 5, 0.22) 0%, rgba(28, 15, 8, 0.72) 72%, #3d2110 73%);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.52);
  text-align: center;
  transition: transform .13s ease;
}
.shop-item:hover { transform: translateY(-3px); }
.shop-item img {
  width: 3.7em;
  height: 3.7em;
  object-fit: cover;
  padding: .08em;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--item-ink, #e0a63a) 28%, #23130a), #190d07 76%);
  border: 2px solid color-mix(in srgb, var(--item-ink, #e0a63a) 82%, #2b160a);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.65);
}
.shop-item > div {
  width: 100%;
  padding: .42em .5em;
  border: 1.5px solid #9c6c31;
  border-radius: 5px;
  background: linear-gradient(180deg, #faf0d8, #ecd6ad);
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}
.shop-item h3 { font-size: .88em; line-height: 1.2; color: #2a170b; font-weight: 900; }
.shop-item p { margin-top: .16em; font-size: .71em; line-height: 1.3; color: #5c3c24; font-weight: 600; }
.shop-buy {
  width: 82%;
  padding: .36em .6em;
  border: 0;
  border-radius: 0;
  clip-path: polygon(8px 0, calc(100% - 8px) 0, 100% 50%, calc(100% - 8px) 100%, 8px 100%, 0 50%);
  background: linear-gradient(180deg, #ffe484 0%, #f2a924 55%, #cf740e 100%);
  color: #2b1304;
  font-size: .84em;
  font-weight: 950;
  box-shadow: inset 0 1.5px 0 rgba(255, 252, 220, 0.85), inset 0 -2px 0 rgba(115, 52, 7, 0.72);
}
.shop-buy:hover:not(:disabled) { background: linear-gradient(180deg, #ffed9e, #f7b836 55%, #dd8014); }
.shop-buy:active:not(:disabled) { transform: translateY(2px); }
.shop-buy:disabled {
  background: #42140d;
  color: #ffaaa0;
  box-shadow: inset 0 0 0 1.5px #993224;
}
.shop-buy small { display: block; color: inherit; font-size: .74em; font-weight: 700; opacity: .92; }

.results-layout { grid-template-columns: minmax(0, 29%) minmax(0, 1fr); align-items: stretch; }
.result-portrait {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  justify-items: center;
  align-content: center;
  padding: 4% 2%;
  border: 0;
  background: radial-gradient(circle at 50% 55%, rgba(245, 180, 72, 0.24), transparent 68%);
  box-shadow: none;
}
.result-portrait img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: bottom;
  filter: drop-shadow(0 .5em .85em #120904);
}
.result-portrait strong { color: var(--brass-bright); font-size: .95em; margin-top: .5em; text-align: center; font-weight: 900; text-shadow: 0 2px 6px #120904; }
.result-table-wrap {
  overflow: auto;
  padding: .6em .8em;
  border: 14px solid transparent;
  border-image: var(--svg-parchment-frame) 24 fill / 14px / 0 stretch;
  color: var(--ink);
  filter: drop-shadow(0 12px 26px rgba(0, 0, 0, 0.65));
}
.result-table { border-collapse: collapse; width: 100%; color: var(--ink); }
.result-table th, .result-table td { padding: .62em .55em; border-bottom: 1.5px solid rgba(156, 108, 49, 0.35); }
.result-table th { font-size: .82em; color: #7c3810; border-top: 1.5px solid rgba(156, 108, 49, 0.45); text-align: left; white-space: nowrap; font-weight: 900; }
.result-table td { font-variant-numeric: tabular-nums; font-weight: 700; }
.result-table tr.winner { background: rgba(242, 169, 36, 0.24); color: #2a1405; }
.result-table td:nth-child(3) { font-weight: 950; color: #9a3412; }
.results-actions { justify-content: flex-end; gap: .6em; }

.result-badges {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: .45em;
  margin-block: .45em;
}
.result-badges li {
  padding: .25em .7em;
  border: 1.5px solid #3a1a06;
  border-radius: 5px;
  background: linear-gradient(180deg, #5d3922, #361f12);
  color: #ffe49c;
  font-size: .78em;
  font-weight: 850;
  box-shadow: 0 2px 0 #180b04;
}

.pause-screen {
  display: grid;
  place-items: center;
  background: rgba(16, 9, 4, 0.78);
  backdrop-filter: blur(4px);
  padding: 4%;
}
.pause-panel {
  width: min(83%, 59cqw);
  max-height: 100%;
  overflow: auto;
  padding: 1.5cqw 1.9cqw;
  border: 16px solid transparent;
  border-image: var(--svg-journal-frame) 26 fill / 16px / 0 stretch;
  filter: drop-shadow(0 20px 44px rgba(0, 0, 0, 0.85));
}
.pause-main {
  margin-top: 1em;
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 1.4em;
}
.pause-menu { display: grid; gap: .5em; align-self: start; }
.pause-menu .menu-choice { font-size: 1em; }
.pause-keys {
  align-self: start;
  padding: .45em .65em;
  border: 12px solid transparent;
  border-image: var(--svg-parchment-frame) 24 fill / 12px / 0 stretch;
  color: var(--ink);
}
.pause-keys h3 { font-size: .95em; margin-bottom: .38em; color: #7c3810; font-weight: 900; }
#pause-keys-info { color: var(--ink-sub); font-size: .83em; line-height: 1.6; font-weight: 600; }
#pause-keys-info p + p { margin-top: .4em; }
#pause-seed { margin-top: .55em; color: #9cf2c7; font-size: max(11px, .75em); }
#pause-loadout {
  display: flex;
  align-items: baseline;
  gap: .52em;
  margin-top: .7em;
}
#pause-loadout h3 { font-size: max(12px, .82em); flex: none; }
.pause-settings {
  display: flex;
  gap: 1.3em;
  margin-top: 1em;
  padding-top: .65em;
  border-top: 1.5px solid var(--line);
  font-size: .9em;
}

#screen-codex, #screen-records {
  background:
    radial-gradient(ellipse at 50% 15%, rgba(176, 98, 32, 0.24), rgba(22, 12, 6, 0.76) 72%),
    linear-gradient(180deg, rgba(36, 18, 8, 0.56), rgba(18, 10, 5, 0.84)),
    url("assets/pixel/bg_guild_pixel.png") center / cover;
}
#screen-codex { grid-template-rows: auto minmax(0, 1fr); gap: 0; }
#screen-codex .screen-head {
  align-items: flex-end;
  padding-bottom: 0;
  border-bottom: 0;
  border-image: none;
}
#screen-codex .choice-strip { gap: .3em; padding-right: 1em; }
#screen-codex .mode-choice {
  border-radius: 9px 9px 0 0;
  border-bottom: 0;
  padding: .42em .88em .52em;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.45);
}
#screen-codex .mode-choice[aria-pressed="true"] {
  background: linear-gradient(180deg, #faf0d8, #ecd6ad);
  color: var(--ink);
  border-color: #9c6c31;
  box-shadow: none;
}
.codex-grid {
  overflow: auto;
  padding: .65em .85em .85em;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: .8em;
  border: 16px solid transparent;
  border-image: var(--svg-journal-frame) 26 fill / 16px / 0 stretch;
  filter: drop-shadow(0 16px 36px rgba(0, 0, 0, 0.75));
}
.codex-grid.codex-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.codex-section-head {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .35em .6em;
  border: 0;
  border-bottom: 1.5px solid rgba(224, 166, 58, 0.45);
  background: none;
  color: var(--brass-bright);
  font-family: var(--display);
  font-size: 1.08em;
  font-weight: 900;
  box-shadow: none;
}
.codex-entry {
  display: flex;
  align-items: center;
  gap: .85em;
  padding: .72em .88em;
  border: 2px solid #9c6c31;
  border-radius: 8px;
  background: linear-gradient(180deg, #faf0d8 0%, #ecd6ad 100%);
  color: var(--ink);
  box-shadow: 0 4px 0 #4d2e14, inset 5px 0 0 color-mix(in srgb, var(--entry-ink, #9a3412) 68%, #5c2e10), inset 0 1px 0 rgba(255, 255, 255, 0.78);
}
.codex-entry img {
  width: 3.7em;
  height: 3.7em;
  flex: none;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid #7d4e1f;
  background: #22130a;
  padding: .12em;
  box-shadow: 0 3px 6px rgba(42, 23, 11, 0.35);
}
.codex-entry h3 { color: #2a170b; font-size: .98em; font-weight: 900; margin-bottom: .22em; }
#stage-wrapper.pixel-ui .codex-entry h3 { color: #ffe1a6; }
.codex-entry h3 small { color: #8c4a18; font-weight: 700; font-size: .82em; }
.codex-entry p { color: #4f331e; line-height: 1.48; font-size: .84em; font-weight: 600; }
.codex-entry strong { color: #8b2500; font-weight: 850; }
.pattern-entry { align-items: flex-start; }
.pattern-icons { display: flex; gap: .28em; margin: .38em 0; }
.pattern-icons img { width: 2em; height: 2em; border-radius: 0; padding: 0; box-shadow: none; }
.pattern-entry .pattern-effect { margin-top: .3em; color: #587235; }
#stage-wrapper.pixel-ui .pattern-entry .pattern-effect { color: #c7e9ad; }
.codex-locked { opacity: .62; filter: grayscale(0.45); }
.codex-badge-tag {
  display: inline-block;
  margin-left: .4em;
  padding: .12em .5em;
  border: 1px solid #2b160a;
  background: #331c0f;
  color: var(--entry-ink, #ffe28a);
  font-size: .72em;
  font-weight: 850;
  border-radius: 4px;
  vertical-align: middle;
}
.fusion-recipe-card {
  display: grid;
  gap: .5em;
  padding: .55em .65em;
  border: 12px solid transparent;
  border-image: var(--svg-brass-plaque) 22 fill / 12px / 0 stretch;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.55));
}
.fusion-recipe-icons {
  display: flex;
  align-items: center;
  gap: .45em;
}
.fusion-recipe-icons img {
  width: 2.75em;
  height: 2.75em;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid #e0a63a;
  background: #1f1109;
  padding: .08em;
}
.fusion-recipe-icons span { color: var(--brass-bright); font-weight: 950; }
.fusion-recipe-card h3 { font-size: .98em; color: #ffe58f; font-weight: 900; }
.fusion-recipe-card p { font-size: .81em; color: #f4dfc0; line-height: 1.42; }
.codex-progress {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 1em;
  padding: .55em .85em;
  border: 2px solid #9c6c31;
  border-radius: 8px;
  background: linear-gradient(180deg, #faf0d8, #ecd6ad);
  color: var(--ink);
  font-weight: 850;
  box-shadow: 0 4px 0 #4d2e14;
}
.codex-progress-track { flex: 1; height: 10px; background: #3b2214; border: 1px solid #221209; border-radius: 999px; overflow: hidden; }
.codex-progress-fill { height: 100%; background: linear-gradient(90deg, #f29d1f, #ffe68a); }
.guide-keys { border-collapse: collapse; margin-top: .5em; width: 100%; color: var(--ink); }
.guide-keys td, .guide-keys th { padding: .3em .6em; border-bottom: 1px solid rgba(156, 108, 49, 0.35); text-align: left; font-size: .84em; }
.guide-keys thead { color: #7c3810; font-weight: 900; }
.guide-party { margin-top: .65em; }
.event-screen {
  background:
    radial-gradient(ellipse at 50% 25%, rgba(168, 96, 30, 0.34), rgba(22, 12, 6, 0.68) 74%),
    linear-gradient(180deg, rgba(36, 18, 8, 0.46), rgba(18, 10, 5, 0.78)),
    var(--event-scene, url("assets/pixel/bg_event_mystic_pixel.png")) center / cover;
}
.event-room-body {
  display: grid;
  grid-template-columns: minmax(0, .94fr) minmax(0, 1.06fr);
  gap: 2em;
  align-items: center;
  min-height: 0;
  overflow: auto;
  padding: .7em 1.15em;
  border: 14px solid transparent;
  border-image: var(--svg-journal-border) 24 / 14px / 0 stretch;
  background: linear-gradient(90deg, #e7d1a3 0%, #faf0d8 44%, #d6b681 49.4%, #8f6330 50%, #d6b681 50.6%, #faf0d8 56%, #e7d1a3 100%);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.78), inset 0 0 24px rgba(108, 68, 28, 0.25);
}
.event-art-frame {
  position: relative;
  margin: 0;
  aspect-ratio: 4 / 3;
  width: 100%;
  overflow: hidden;
  border: 2.5px solid #8c5c26;
  border-radius: 5px;
  background: #1a0f08;
  box-shadow: 0 6px 16px rgba(42, 23, 11, 0.35), 0 0 0 1px #4a2b13;
}
.event-art-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 28px rgba(20, 10, 5, 0.55);
}
.event-art-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.event-shrine-card {
  width: 100%;
  display: grid;
  gap: .82em;
  padding: .2em .1em;
  border: 0;
  background: none;
  box-shadow: none;
}
.event-story {
  padding: .1em .15em .55em;
  border: 0;
  border-bottom: 1.5px dashed rgba(140, 92, 38, 0.58);
  border-radius: 0;
  background: none;
  color: var(--ink);
  font-size: .94em;
  font-weight: 700;
  line-height: 1.55;
  box-shadow: none;
}
.event-choices { display: grid; gap: .5em; }
.event-choice-btn {
  display: grid;
  grid-template-columns: 2.9em 1fr;
  align-items: center;
  gap: .75em;
  text-align: left;
  padding: .55em .88em;
  border: 2px solid #8c5c26;
  border-radius: 8px;
  background: linear-gradient(180deg, #5d3922, #382013);
  color: var(--text-main);
  box-shadow: 0 0 0 1.5px #221006, 0 4px 0 #1b0c04, inset 4px 0 0 var(--brass);
  transition: transform .12s ease, border-color .12s ease, background .12s ease;
}
.event-choice-btn[data-tag="risk"] {
  box-shadow: 0 0 0 1.5px #221006, 0 4px 0 #1b0c04, inset 4px 0 0 #ff7a45;
}
.event-choice-btn[data-tag="reward"] {
  box-shadow: 0 0 0 1.5px #221006, 0 4px 0 #1b0c04, inset 4px 0 0 #ffe07d;
}
.event-choice-btn[data-tag="safe"] {
  box-shadow: 0 0 0 1.5px #221006, 0 4px 0 #1b0c04, inset 4px 0 0 #6ef2c4;
}
.event-choice-btn:hover:not(:disabled) {
  border-color: var(--brass-bright);
  transform: translate(3px, -1px);
  background: linear-gradient(180deg, #74472a, #492a19);
}
.event-choice-btn:disabled { opacity: .48; filter: grayscale(0.35); }
.event-choice-icon {
  width: 3.1em;
  height: 3.1em;
  border-radius: 50%;
  border: 2px solid #d9a042;
  background: #21120a;
  overflow: hidden;
  display: grid;
  place-items: center;
}
.event-choice-icon img { width: 100%; height: 100%; object-fit: cover; display: block; }
.event-choice-copy { display: grid; gap: .2em; min-width: 0; }
.event-choice-copy strong { color: var(--brass-bright); font-size: .98em; font-weight: 900; }
.event-choice-copy span { color: #f4dfc0; font-size: .82em; line-height: 1.42; }
.event-outcome {
  padding: .75em 1em;
  border: 1.5px solid #9c6c31;
  border-radius: 6px;
  background: rgba(180, 134, 72, 0.16);
  color: #2a170b;
  font-size: .95em;
  font-weight: 850;
  line-height: 1.5;
  box-shadow: inset 4px 0 0 #1f8a5b;
}

.records-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .75em;
  margin-bottom: 1em;
}
.record-stat-tile {
  padding: .55em .75em;
  border: 12px solid transparent;
  border-image: var(--svg-brass-plaque) 22 fill / 12px / 0 stretch;
}
.record-stat-tile span { display: block; color: #f0d7b1; font-size: .78em; font-weight: 700; margin-bottom: .18em; }
.record-stat-tile strong { color: var(--brass-bright); font: 900 1.25em/1.2 ui-monospace, monospace; }
.save-code-box {
  margin-top: 1em;
  padding-top: .9em;
  border-top: 1.5px solid rgba(156, 108, 49, 0.35);
  display: grid;
  gap: .5em;
}
.save-code-box label { font-size: .92em; color: #7c3810; font-weight: 900; }
.save-code-box textarea {
  width: 100%;
  padding: .55em .75em;
  border: 2px solid #8c5c26;
  border-radius: 6px;
  background: #fff9ec;
  color: var(--ink);
  font: .8em/1.4 ui-monospace, monospace;
  resize: vertical;
}
.save-code-actions { display: flex; align-items: center; gap: .7em; flex-wrap: wrap; }
#save-code-status { color: #166534; font-size: .85em; font-weight: 800; }

.intermission-actions { display: flex; align-items: center; gap: .9em; flex: 0 0 auto; }
.intermission-actions .text-action { font-size: .87em; }
.round-end-screen { display: grid; place-items: center; background: rgba(16, 9, 4, 0.78); }
.round-end-paper {
  width: min(76%, 48cqw);
  max-height: 94%;
  overflow: auto;
  padding: 1.5cqw 1.9cqw;
  display: grid;
  gap: .9em;
  justify-items: center;
  border: 16px solid transparent;
  border-image: var(--svg-journal-frame) 26 fill / 16px / 0 stretch;
  filter: drop-shadow(0 18px 46px rgba(0, 0, 0, 0.8));
}
.round-end-paper h2 { font-family: var(--display); color: var(--brass-bright); font-size: clamp(18px, 3cqw, 44px); text-shadow: 0 3px 0 #261005; }
#round-end-tallies { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); list-style: none; padding: 0; gap: .6em; }
#round-end-tallies li {
  display: flex;
  justify-content: space-between;
  gap: .41em;
  border: 2px solid #9c6c31;
  border-radius: 7px;
  padding: .55em .75em;
  background: linear-gradient(180deg, #faf0d8, #ecd6ad);
  color: var(--ink);
  font-size: .86em;
  font-weight: 800;
  box-shadow: inset 5px 0 0 var(--seat-color);
}
#round-end-tallies strong { font-variant-numeric: tabular-nums; color: #9a3412; font-weight: 950; }
#round-end-next { color: #f4dfc0; font-size: .88em; font-weight: 700; }

#stage-wrapper.pixel-ui {
  --display: var(--pixel-font);
  --px-ink: #101113;
  --px-dark: #171b1b;
  --px-slate: #252e2d;
  --px-steel: #596460;
  --px-bronze: #9e7850;
  --px-gold: #f4cd89;
  --px-jade: #a6e6bf;
  --px-graphite: #bdb7ac;
  --px-paper: #f4ead6;
  --px-control-face: #26352e;
  --px-control-edge: #748477;
  --px-control-light: #596a5c;
  --px-control-shadow: #121c17;
  --px-control-hover: #3c5548;
  --px-control-text: var(--px-paper);
  --px-well: #101815;
  --px-meter-rim: #7e876e;
  --px-cut: polygon(4px 0, calc(100% - 4px) 0, calc(100% - 4px) 2px,
    calc(100% - 2px) 2px, calc(100% - 2px) 4px, 100% 4px, 100% calc(100% - 4px),
    calc(100% - 2px) calc(100% - 4px), calc(100% - 2px) calc(100% - 2px),
    calc(100% - 4px) calc(100% - 2px), calc(100% - 4px) 100%, 4px 100%,
    4px calc(100% - 2px), 2px calc(100% - 2px), 2px calc(100% - 4px), 0 calc(100% - 4px),
    0 4px, 2px 4px, 2px 2px, 4px 2px);
  --px-instrument: url("assets/pixel/ui/instrument.png");
  --px-iron: url("assets/pixel/ui/iron.png");
  --px-case: url("assets/pixel/ui/case.png");
  --px-rail: url("assets/pixel/ui/rail.png");
  --px-pointer: url("assets/pixel/ui/pointer.png");
  font-variant-numeric: tabular-nums;
  color: var(--px-paper);
  scrollbar-color: #866447 #211d1a;
}

#stage-wrapper.pixel-ui :is(h1, h2, h3, button, select, kbd, #in-game-hud-bar, #round-intro, #pause-seed, .market-wallet strong, #relic-owned strong, #result-build strong) {
  font-family: var(--pixel-font);
  font-synthesis: none;
}
#stage-wrapper.pixel-ui :is(#hud-timer, #round-intro-count, .hud-relic-chip strong) {
  font-family: var(--pixel-font);
  font-synthesis: none;
}
#stage-wrapper.pixel-ui :is(canvas:not(#game-canvas), img) {
  image-rendering: pixelated;
}
#stage-wrapper.pixel-ui :focus-visible {
  outline: 2px solid var(--px-gold);
  outline-offset: 2px;
}
#stage-wrapper.pixel-ui kbd {
  min-height: 1.35em;
  border: 1px solid #6b7567;
  border-radius: 0;
  background: #111718;
  color: var(--px-jade);
  box-shadow: inset 0 -2px #080b0b;
}
#stage-wrapper.pixel-ui :is(.expedition-head h2, .draft-head h2, .screen-head h2, .entrance-head h2, .round-end-paper h2, .relic-head h2, .pause-panel h2) {
  background: none;
  color: var(--px-gold);
  filter: none;
  text-shadow: 0 2px var(--px-ink), 0 4px #321e17;
}

#stage-wrapper.pixel-ui .pixel-button {
  border: 1px solid var(--px-control-edge);
  border-radius: 0;
  background: var(--px-control-face);
  color: var(--px-control-text);
  box-shadow: inset 1px 2px var(--px-control-light), inset -2px -3px var(--px-control-shadow), 0 3px 0 -1px var(--px-ink);
  text-shadow: 0 1px var(--px-ink);
  transform: none;
  transition: background-color .09s linear, border-color .09s linear;
}
#stage-wrapper.pixel-ui .pixel-button:is(:hover, :focus-visible):not(:disabled) {
  background: var(--px-control-hover);
  border-color: #a9cca9;
}
#stage-wrapper.pixel-ui .pixel-button[aria-pressed="true"] {
  border-color: #a7c49a;
  background: #304b3c;
  color: #e4f0c9;
  box-shadow: inset 2px 2px #122019, inset -1px -1px #65816a;
}
#stage-wrapper.pixel-ui .pixel-button:active:not(:disabled) {
  translate: 0 2px;
  box-shadow: inset 2px 3px var(--px-control-shadow), inset -1px -1px var(--px-control-light);
}
#stage-wrapper.pixel-ui .pixel-button:disabled {
  border-color: #606358;
  background: #282e29;
  color: #c2bbae;
  box-shadow: inset 0 2px #141b16;
}
#stage-wrapper.pixel-ui .pixel-button.primary {
  --px-control-edge: #e9bb77;
  --px-control-face: #7d4e31;
  --px-control-light: #ba8856;
  --px-control-shadow: #382019;
  --px-control-hover: #9f693f;
  --px-control-text: #fff0d0;
}
#stage-wrapper.pixel-ui .pixel-button.primary:is(:hover, :focus-visible):not(:disabled) {
  border-color: #ffe1a4;
}
#stage-wrapper.pixel-ui .setting-toggle {
  display: inline-flex;
  align-items: center;
  gap: .45em;
}
#stage-wrapper.pixel-ui .setting-toggle::before {
  content: "";
  width: 1.1em;
  height: .66em;
  min-width: 12px;
  min-height: 8px;
  border: 1px solid #80917f;
  background: linear-gradient(#b9b8a3 0 0) left 1px center / 34% calc(100% - 2px) no-repeat, var(--px-well);
}
#stage-wrapper.pixel-ui .setting-toggle[aria-pressed="true"]::before {
  background: linear-gradient(var(--px-jade) 0 0) right 1px center / 34% calc(100% - 2px) no-repeat, #14251c;
}
#stage-wrapper.pixel-ui #btn-pattern-discard {
  padding: 0 .18em;
  color: var(--px-gold);
  border-radius: 0;
  font-size: 1em;
}

#stage-wrapper.pixel-ui .title-content {
  width: min(95%, 44cqw);
  padding: 1.5% 2% .4% 5.8%;
}
#stage-wrapper.pixel-ui .title-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(90deg, #090e10bf 0%, #090e1059 36%, transparent 65%);
  pointer-events: none;
}
#stage-wrapper.pixel-ui .title-lockup {
  margin-bottom: clamp(.7em, 2cqw, 1.5em);
}
#stage-wrapper.pixel-ui .title-lockup h1 {
  font: 400 clamp(36px, 6.25cqw, 112px)/.98 var(--pixel-font);
  letter-spacing: -.015em;
  white-space: nowrap;
  color: #ffdd9b;
  background: none;
  filter: none;
  text-shadow: 0 3px #8f5d3b, 0 6px #291e1b, 3px 6px #151415;
}
#stage-wrapper.pixel-ui .title-lockup h1 span { display: inline; }
#stage-wrapper.pixel-ui .title-menu { gap: .22em; width: min(100%, max(13.5em, 24cqw)); }
#stage-wrapper.pixel-ui .title-menu .menu-choice {
  position: relative;
  min-height: 1.75em;
  padding: .27em .75em .27em 1.45em;
  margin: 0;
  border: 1px solid transparent;
  border-radius: 0;
  clip-path: none;
  background: none;
  color: #ecdcc0;
  box-shadow: none;
  text-shadow: 0 2px var(--px-ink);
  font: 400 clamp(12px, 1.35cqw, 23px)/1.12 var(--pixel-font);
  transition: background-color .12s steps(2, end), color .12s steps(2, end);
}
#stage-wrapper.pixel-ui .title-menu .menu-choice::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 .25em;
  width: .87em;
  background: var(--px-pointer) left center / contain no-repeat;
  transform: none;
  opacity: 0;
  transition: none;
}
#stage-wrapper.pixel-ui .title-menu .menu-choice:is(:hover, :focus-visible) {
  transform: none;
  border-color: #b88d55;
  background: #4b3825e8;
  color: #ffe2a3;
}
#stage-wrapper.pixel-ui .title-menu .menu-choice:is(:hover, :focus-visible)::before { opacity: 1; }
#stage-wrapper.pixel-ui .title-menu .menu-choice:active { translate: 0 2px; }
@media (hover: hover) {
  #stage-wrapper.pixel-ui .title-menu:has(.menu-choice:hover) .menu-choice:not(:hover)::before { opacity: 0; }
}
#stage-wrapper.pixel-ui .title-menu #btn-play {
  min-height: 2.35em;
  border-color: #c48d4d;
  background: #593528;
  box-shadow: inset 0 2px #a16a43, inset 0 -3px #341f1a;
  color: #ffe3ad;
  font-size: clamp(15px, 1.72cqw, 28px);
}
#stage-wrapper.pixel-ui .title-menu #btn-play:is(:hover, :focus-visible) {
  border-color: #ffdda0;
  background: #784b33;
}
#stage-wrapper.pixel-ui .title-menu #btn-continue {
  border-color: #516954;
  background: #22362de8;
  color: #dcebbc;
}
#stage-wrapper.pixel-ui .title-menu #btn-continue:is(:hover, :focus-visible) {
  border-color: #a3c37f;
  background: #344d38;
}
#stage-wrapper.pixel-ui .title-menu #btn-open-codex { margin-top: .4em; }
#stage-wrapper.pixel-ui .title-footer {
  padding: .6em 5.8%;
  gap: .4em .7em;
  background: #101616e8;
  border-top: 1px solid #776144;
  font-size: clamp(10px, .89cqw, 15px);
}
#stage-wrapper.pixel-ui .title-footer .text-action { padding: .24em .48em; }

#stage-wrapper.pixel-ui :is(.round-readout, .haul-objective, .boss-bar, .mine-clock, .mining-readout) {
  border: 1px solid #7a8370;
  border-radius: 0;
  background: #18201eeb;
  box-shadow: inset 0 1px #bdccb52e, 0 2px #101113b3;
  text-shadow: 0 1px var(--px-ink);
}
#stage-wrapper.pixel-ui .round-heading {
  box-shadow: 0 1px #71745775;
  padding-bottom: .18em;
}
#stage-wrapper.pixel-ui :is(#round-intro, .hud-relic-chip) {
  border: 7px solid transparent;
  border-image: var(--px-instrument) 8 fill / 7px / 0 stretch;
  border-radius: 0;
  background: #151716;
  box-shadow: none;
}
#stage-wrapper.pixel-ui .match-notice {
  border: 1px solid #7d6c53;
  border-left: 3px solid var(--receipt-ink, #b9a17b);
  border-radius: 0;
  background: #1b271ff5;
  clip-path: var(--px-cut);
  box-shadow: inset 0 -2px #131a15;
  text-shadow: 0 1px var(--px-ink);
}
#stage-wrapper.pixel-ui .receipt-tally b {
  border: 0;
  border-radius: 0;
  clip-path: var(--px-cut);
  box-shadow: inset 0 2px #fff3c679, inset 0 -3px #a8764280;
  text-shadow: none;
}
#stage-wrapper.pixel-ui #hud-streak-multiplier {
  padding: .03em .25em;
  background: #b5dcab;
  color: #172019;
  text-shadow: none;
}
#stage-wrapper.pixel-ui #hud-round-label { color: var(--px-jade); }
#stage-wrapper.pixel-ui #hud-shards,
#stage-wrapper.pixel-ui .haul-objective #hud-haul-status { color: var(--px-gold); }
#stage-wrapper.pixel-ui .haul-objective.met #hud-haul-status { color: var(--px-jade); }
#stage-wrapper.pixel-ui :is(.haul-meter, .boss-hp-track, .codex-progress-track) {
  border-radius: 0;
  border: 1px solid var(--px-meter-rim);
  background: var(--px-well);
  box-shadow: inset 0 2px #090e0c, 0 1px var(--px-ink);
  overflow: hidden;
}
#stage-wrapper.pixel-ui :is(#hud-haul-fill, #hud-boss-fill, .codex-progress-fill) {
  border-radius: 0;
  background: repeating-linear-gradient(90deg, transparent 0 6px, var(--meter-gap, #101815) 6px 8px),
    linear-gradient(180deg, var(--meter-light) 0 70%, var(--meter-dark) 70%);
}
#stage-wrapper.pixel-ui #hud-haul-fill { --meter-light: #f2c46c; --meter-dark: #a16a3d; }
#stage-wrapper.pixel-ui .haul-objective.met #hud-haul-fill { --meter-light: #9be0b1; --meter-dark: #468367; }
#stage-wrapper.pixel-ui #hud-boss-fill { --meter-light: #f58c73; --meter-dark: #973e3a; }
#stage-wrapper.pixel-ui .codex-progress-fill { --meter-light: #a6d8a9; --meter-dark: #486f53; height: 100%; }
#stage-wrapper.pixel-ui .mine-clock {
  background: #192420f2;
  border-color: #a38458;
  box-shadow: inset 1px 2px #726247, inset -1px -2px #0d1510, 0 2px #0b110e;
}
#stage-wrapper.pixel-ui .mine-clock:has(#hud-timer.urgent) { border-color: #e38f65; }
#stage-wrapper.pixel-ui .mine-clock::before,
#stage-wrapper.pixel-ui .mine-clock::after { display: none; }

#stage-wrapper.pixel-ui :is(.pause-panel, .round-end-paper) {
  border: 14px solid transparent;
  border-image: var(--px-iron) 12 fill / 14px / 0 stretch;
  border-radius: 0;
  background: none;
  box-shadow: none;
  filter: drop-shadow(0 12px 16px #080a09b8);
}
#stage-wrapper.pixel-ui .pause-screen {
  background: #09120dbd;
  backdrop-filter: none;
}
#stage-wrapper.pixel-ui .pause-menu #btn-resume {
  --px-control-edge: #b9ce9c;
  --px-control-face: #365443;
}
#stage-wrapper.pixel-ui .pause-keys {
  border: 0;
  border-left: 2px solid #6c7b65;
  border-image: none;
  border-radius: 0;
  background: #121b16;
}
#stage-wrapper.pixel-ui :is(.records-sheet, .event-shrine-card, .shop-standings-wrap, .result-table-wrap, #round-end-tallies li) {
  border: 6px solid transparent;
  border-image: var(--px-case) 10 fill / 6px / 0 stretch;
  border-radius: 0;
  background: none;
  box-shadow: none;
  color: var(--px-paper);
}
#stage-wrapper.pixel-ui .event-art-frame {
  border: 8px solid transparent;
  border-image: var(--px-instrument) 8 fill / 8px / 0 stretch;
  border-radius: 0;
  background: none;
}
#stage-wrapper.pixel-ui :is(.codex-grid, .record-stat-tile) {
  border: 1px solid #7d7b62;
  border-image: none;
  background: #1b261fea;
  box-shadow: inset 0 2px #55634e, inset 0 -2px #101912;
}
#stage-wrapper.pixel-ui .record-stat-tile strong {
  display: block;
  color: var(--px-gold);
  font: 400 clamp(15px, 1.65cqw, 28px)/1.1 var(--pixel-font);
  overflow-wrap: anywhere;
}
#stage-wrapper.pixel-ui .codex-grid {
  filter: none;
  gap: .3em .9em;
}
#stage-wrapper.pixel-ui :is(.codex-entry, .fusion-recipe-card) {
  min-width: 0;
  padding: .6em .4em;
  border: 0;
  border-bottom: 1px solid #545b48;
  border-image: none;
  border-radius: 0;
  background: none;
  box-shadow: none;
  filter: none;
  color: var(--px-paper);
  overflow-wrap: anywhere;
}
#stage-wrapper.pixel-ui :is(.codex-entry, .fusion-recipe-card) img {
  object-fit: contain;
  border: 1px solid #6e6954;
  border-radius: 0;
  background: #101914;
  box-shadow: none;
}
#stage-wrapper.pixel-ui [data-discovery] h3::before {
  display: inline-block;
  width: .54em;
  height: .54em;
  margin-right: .42em;
  border: 1px solid var(--entry-ink, #b6ca92);
  content: "";
  vertical-align: .12em;
}
#stage-wrapper.pixel-ui [data-discovery="known"] h3::before {
  background: var(--entry-ink, #b6ca92);
}
#stage-wrapper.pixel-ui .event-art-frame::after { background: none; }
#stage-wrapper.pixel-ui :is(.shop-standings-wrap h3, .pause-keys h3, .codex-section-head, .save-code-box label, .result-table th, .guide-keys thead) {
  color: var(--px-gold);
}
#stage-wrapper.pixel-ui :is(.event-story, .event-outcome, .result-table, .guide-keys, #round-end-tallies li) {
  color: var(--px-paper);
}
#stage-wrapper.pixel-ui :is(#pause-keys-info, .codex-entry p, .fusion-recipe-card p, #shop-standings, .codex-entry h3 small, #records-empty) {
  color: #e2d2bc;
}
#stage-wrapper.pixel-ui :is(.codex-entry strong, .result-table td:nth-child(3), #round-end-tallies strong, #shop-standings small) { color: var(--px-gold); }
#stage-wrapper.pixel-ui #shop-standings strong { color: var(--px-jade); }
#stage-wrapper.pixel-ui #save-code-status { color: var(--px-jade); }
#stage-wrapper.pixel-ui :is(.result-table th, .result-table td, .guide-keys th, .guide-keys td) { border-color: #776650; }
#stage-wrapper.pixel-ui .result-table tr.winner { background: #434831; }
#stage-wrapper.pixel-ui .result-table :is(th, td) {
  padding: .54em .46em;
  text-align: left;
}
#stage-wrapper.pixel-ui .result-table tbody tr:nth-child(even):not(.winner) { background: #29342b; }
#stage-wrapper.pixel-ui .result-table td:first-child { color: var(--px-jade); }
#stage-wrapper.pixel-ui .results-metrics {
  list-style: none;
  margin-block: 0 .7em;
  padding: 0;
}
#stage-wrapper.pixel-ui .results-metrics:empty,
#stage-wrapper.pixel-ui #results-subtitle:empty { display: none; }
#stage-wrapper.pixel-ui .result-badges li {
  display: inline-flex;
  align-items: center;
  gap: .35em;
  border: 1px solid #987548;
  border-radius: 0;
  background: #352d20;
  box-shadow: inset 0 1px #9a7750, 0 2px var(--px-ink);
  color: #f4d999;
}
#stage-wrapper.pixel-ui .result-badges img {
  width: 1.35em;
  height: 1.35em;
  object-fit: contain;
}
#stage-wrapper.pixel-ui :is(.save-code-box textarea, .codex-progress, .codex-badge-tag) {
  background: #242a26;
  border: 1px solid #857055;
  border-radius: 0;
  color: var(--px-paper);
}
#stage-wrapper.pixel-ui .event-choice-btn.pixel-button {
  --px-control-edge: #89795c;
  --px-control-face: #293127;
  --px-control-light: #505c48;
  --px-control-hover: #414b37;
  border-left: 4px solid var(--event-ink, #c7a874);
}
#stage-wrapper.pixel-ui .event-choice-btn[data-tag="risk"] { --event-ink: #ea9872; }
#stage-wrapper.pixel-ui .event-choice-btn[data-tag="safe"] { --event-ink: #a8d5ad; }
#stage-wrapper.pixel-ui .event-choice-btn[data-picked] {
  opacity: 1;
  filter: none;
  border-color: var(--event-ink, #c7a874);
  background: #293b2c;
}
#stage-wrapper.pixel-ui :is(.event-outcome, #shop-feedback:not(:empty)) {
  min-width: 0;
  padding: .46em .72em;
  border: 1px solid #8da380;
  border-left: 3px solid #b4d6a0;
  border-radius: 0;
  background: #1d2c22;
  box-shadow: inset 0 2px #3e5645;
  clip-path: var(--px-cut);
  color: #e0efce;
  text-shadow: 0 1px #141d15;
}
#stage-wrapper.pixel-ui .event-choice-icon { border-radius: 0; background: #171b16; box-shadow: none; }
#stage-wrapper.pixel-ui .event-choice-copy strong { color: var(--px-gold); }
#stage-wrapper.pixel-ui .pause-settings { flex-wrap: wrap; gap: .4em .6em; margin-top: .65em; }
#stage-wrapper.pixel-ui #pause-loadout {
  padding: .42em .52em;
  background: #121715;
  border-top: 1px solid #6c765f;
}

#stage-wrapper.pixel-ui .danmaku-item {
  border-radius: 0 !important;
  border: 1.5px solid #080914;
  text-shadow: 0 2px 0 #080914;
}

#stage-wrapper.pixel-ui #screen-shop {
  background: linear-gradient(180deg, #100b08bf, #21171061 35%, #120d09db), url("assets/pixel/bg_market_pixel.png") center / cover;
  image-rendering: pixelated;
}
#stage-wrapper.pixel-ui :is(#screen-modes, #screen-codex, #screen-records, #screen-results) {
  background: linear-gradient(180deg, #111816b5, #14191591 40%, #111813e8), url("assets/pixel/bg_guild_pixel.png") center / cover;
  image-rendering: pixelated;
}
#stage-wrapper.pixel-ui #screen-event {
  background: linear-gradient(180deg, #171213bf, #131b19db), var(--event-scene, url("assets/pixel/bg_event_mystic_pixel.png")) center / cover;
  image-rendering: pixelated;
}

#stage-wrapper.pixel-ui .market-wallet strong { color: var(--px-gold); }
#stage-wrapper.pixel-ui .buyer-bar {
  border-bottom: 1px solid #9a7952;
}
#stage-wrapper.pixel-ui .shop-item {
  border: 1px solid #9a734a;
  border-top: 2px solid var(--item-ink, #d2a767);
  border-radius: 0;
  padding: .42em .62em .85em;
  background: var(--px-rail) left bottom / 34px 10px repeat-x, #282019ee;
  box-shadow: inset 0 1px #806647, 0 3px #100b0a;
}
#stage-wrapper.pixel-ui .shop-item img {
  object-fit: contain;
  border-radius: 0;
  background: #211a15;
  box-shadow: inset 0 0 0 2px #100d0c;
}
#stage-wrapper.pixel-ui .shop-item > div {
  border: 0;
  padding: .18em .12em;
  border-radius: 0;
  background: none;
  box-shadow: none;
}
#stage-wrapper.pixel-ui .shop-item h3 { color: var(--px-gold); }
#stage-wrapper.pixel-ui .shop-item p { color: #e8d7bd; font-size: max(11px, .73em); }
#stage-wrapper.pixel-ui .shop-buy.pixel-button {
  --px-control-edge: #ccaa70;
  --px-control-face: #a57749;
  --px-control-light: #dfb983;
  --px-control-shadow: #573822;
  --px-control-hover: #c19865;
  --px-control-text: #1a170f;
  width: min(100%, 10em);
  clip-path: none;
  font-size: max(11px, .86em);
  text-shadow: none;
}
#stage-wrapper.pixel-ui .shop-buy.pixel-button:disabled {
  border-color: #84604f;
  background: #43332a;
  color: #efc9a8;
  box-shadow: inset 0 1px #795747;
}

#stage-wrapper.pixel-ui .descent-readout {
  max-inline-size: 66%;
  padding: .55em .9em .6em;
  border: 1px solid #9d845f;
  border-left: 3px solid #dfb881;
  background: #1b241ded;
  box-shadow: inset 0 2px #5a614e;
  clip-path: var(--px-cut);
}
#stage-wrapper.pixel-ui .descent-readout p {
  font: 400 max(11px, .86em)/1.16 var(--pixel-font);
  letter-spacing: .06em;
  color: var(--px-jade);
}
#stage-wrapper.pixel-ui .descent-readout h2 {
  font-size: clamp(18px, 3.5cqw, 52px);
  color: #ffdfaa;
}

@media (max-width: 910px) {
  #stage-wrapper.pixel-ui .shop-list { gap: .44em; }
  #stage-wrapper.pixel-ui .shop-item {
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) auto;
    align-items: start;
    justify-items: stretch;
    padding: .38em .4em .78em;
    gap: .35em .47em;
    text-align: left;
  }
  #stage-wrapper.pixel-ui .shop-item img { width: 2.5em; height: 2.5em; }
  #stage-wrapper.pixel-ui .shop-item > div { padding: 0; }
  #stage-wrapper.pixel-ui .shop-item h3 { font-size: max(11px, .91em); }
  #stage-wrapper.pixel-ui .shop-item p { line-height: 1.23; }
  #stage-wrapper.pixel-ui .shop-buy {
    grid-column: 1 / -1;
    justify-self: center;
    padding: .25em .4em;
  }
}

#stage-wrapper.pixel-ui .descent-rig {
  width: 20%;
}

#stage-wrapper.pixel-ui .descent-passengers {
  inset: 34% 35.5% 49%;
}

#stage-wrapper.pixel-ui .descent-screen.reduced .descent-rig {
  transform: translate(-50%, 15%);
}

#stage-wrapper.pixel-ui .descent-streaks {
  background: none;
}

#stage-wrapper.pixel-ui .descent-shaft-wall {
  image-rendering: pixelated;
}

#stage-wrapper.pixel-ui .descent-streaks::before {
  position: absolute;
  inset: 53% auto auto 49%;
  width: .28cqw;
  height: 2.8cqw;
  content: "";
  background: #ffdd84;
  box-shadow: -12cqw 4cqw #db7c3a, 11cqw 3cqw #ffd087, -21cqw 13cqw #ecaa59,
    23cqw 10cqw #ecaa59, -30cqw 8cqw #886357, 31cqw 4cqw #886357;
}

#stage-wrapper.pixel-ui .descent-dust {
  background: none;
}

#stage-wrapper.pixel-ui .descent-dust::before {
  position: absolute;
  inset: 50% auto auto 50%;
  width: .8cqw;
  height: .7cqw;
  content: "";
  background: #d08554;
  box-shadow: -.8cqw .7cqw #734650, 1.6cqw -.7cqw #f7bf74, -5cqw 2cqw #ac6553,
    4cqw 1cqw #e7a766, -10cqw 2.6cqw #794c50, 9cqw 2.5cqw #945d54,
    -13cqw 5cqw #714557, 12cqw 4cqw #aa6958, 17cqw 7cqw #724859, -17cqw 7cqw #aa6958;
}

@media (max-width: 780px) {
  #stage-wrapper.pixel-ui .title-footer { flex-wrap: wrap; row-gap: .25em; }
  #round-intro { padding-inline: 1.8em; gap: .25em 1.2em; }
}

@media (max-width: 700px) {
  #stage-wrapper:has(> .screen:not(.hidden, #screen-entrance, #screen-descent)) {
    height: min(100dvh, 48rem);
  }
  #stage-wrapper:has(> :is(#screen-pause, #screen-round-end):not(.hidden)) #mine-field {
    inset-block: 50% auto;
    height: 56.25cqw;
    translate: 0 -50%;
  }
  #stage-wrapper.pixel-ui .title-content {
    align-self: end;
    width: min(100%, 24em);
    padding: 0 7% 1.5em;
  }
  #stage-wrapper.pixel-ui .title-screen::after {
    background: linear-gradient(0deg, #080d10ee 0%, #080d10ad 32%, #080d1010 78%);
  }
  #stage-wrapper.pixel-ui .title-lockup h1 { font-size: clamp(34px, 9cqw, 60px); }
  #stage-wrapper.pixel-ui .title-menu { width: min(100%, 17em); }
  #stage-wrapper.pixel-ui .title-menu .menu-choice { min-height: 2.45em; font-size: 14px; }
  #stage-wrapper.pixel-ui .title-menu #btn-play { font-size: 17px; }
  #stage-wrapper.pixel-ui .title-footer { font-size: 11px; }
  #stage-wrapper.pixel-ui .title-footer .text-action { min-height: 2.65em; }

  #stage-wrapper.pixel-ui :is(.screen-head, .screen-foot) { gap: .5em; }
  #stage-wrapper.pixel-ui :is(#screen-shop, #screen-event) .screen-foot,
  #stage-wrapper.pixel-ui .results-actions { flex-wrap: wrap; }
  #stage-wrapper.pixel-ui #shop-feedback:not(:empty) { flex: 1 0 100%; }
  #stage-wrapper.pixel-ui .intermission-actions { margin-left: auto; }

  #screen-codex .screen-head { flex-direction: column; align-items: stretch; }
  #screen-codex .screen-head > div:first-child { display: flex; align-items: center; gap: .8em; }
  #screen-codex .choice-strip { padding: 0 0 .48em; }
  #screen-codex .mode-choice { padding: .36em .5em; }
  .codex-grid, .codex-grid.codex-grid-3 { grid-template-columns: minmax(0, 1fr); }
  #stage-wrapper.pixel-ui .records-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .shop-layout, .results-layout, .event-room-body {
    grid-template-columns: minmax(0, 1fr);
    gap: .55em;
  }
  .shop-layout, .results-layout { grid-template-rows: auto minmax(0, 1fr); }
  .shop-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shop-counter {
    grid-template-columns: 4em minmax(0, 1fr);
    grid-template-rows: auto;
    align-items: center;
    gap: .5em;
  }
  .shopkeeper-img { height: 4em; }
  .result-portrait {
    height: auto;
    grid-template: auto / 5.5em minmax(0, 1fr);
    align-items: center;
    justify-items: start;
    padding: 0;
    background: none;
  }
  .result-portrait img { height: 5.5em; }
  .event-room-body { align-content: start; }
  .event-art-frame { aspect-ratio: 3 / 1; max-height: 10em; }

  #stage-wrapper.pixel-ui :is(.pause-panel, .round-end-paper) { width: min(100%, 34em); }
  .pause-main { grid-template-columns: minmax(0, 1fr); gap: .7em; }
}

@media (prefers-reduced-motion: no-preference) {
  #stage-wrapper.pixel-ui .haul-receipt { animation-timing-function: steps(6, end); }
}
@media (prefers-reduced-motion: reduce) {
  #stage-wrapper.pixel-ui .pixel-button { transition: none; }
}
