:root {
  --bg: #17213a;
  --panel: #fff3d6;
  --ink: #231b2e;
  --muted: #6d6174;
  --line: #3a2848;
  --blue: #2f8cff;
  --blue-dark: #1c4f9e;
  --purple: #9154e8;
  --purple-dark: #4a2b84;
  --yellow: #ffd45c;
  --red: #ef476f;
  --green: #4ecb71;
  --desk: #b96f3c;
  --shadow: rgba(19, 13, 34, 0.35);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 212, 92, 0.22), transparent 26rem),
    radial-gradient(circle at 80% 0%, rgba(47, 140, 255, 0.2), transparent 22rem),
    linear-gradient(135deg, #101827, #253157 54%, #16192d);
  overflow: hidden;
}

button {
  border: 3px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  background: #fffaf0;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 5px 0 var(--line);
  transition: transform 0.08s ease, box-shadow 0.08s ease, filter 0.12s ease;
}

button:hover {
  filter: brightness(1.05);
}

button:active {
  transform: translateY(4px);
  box-shadow: 0 1px 0 var(--line);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  filter: grayscale(0.6);
}

.screen {
  display: none;
  min-height: 100vh;
  padding: 26px;
}

.screen.active {
  display: grid;
  place-items: center;
}

.pixel-card {
  position: relative;
  width: min(920px, calc(100vw - 36px));
  border: 5px solid var(--line);
  border-radius: 22px;
  padding: 32px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.28) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.22) 1px, transparent 1px),
    var(--panel);
  background-size: 18px 18px;
  box-shadow: 0 18px 0 var(--line), 0 28px 48px var(--shadow);
}

.title-card {
  position: relative;
  text-align: center;
}

.help-btn {
  position: absolute;
  right: 18px;
  top: 18px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #fff06d;
  font-size: 26px;
  line-height: 1;
}

.game-title {
  display: inline-block;
  margin: 8px 0 10px;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 1;
  letter-spacing: 1px;
  color: #ffe65a;
  -webkit-text-stroke: 3px var(--line);
  text-shadow: 0 5px 0 #ff9f43, 0 9px 0 var(--line), 6px 12px 0 rgba(58, 40, 72, 0.24);
  transform-origin: center;
  animation: title-bounce 1.8s ease-in-out infinite;
}

@keyframes title-bounce {
  0%, 100% { transform: translateY(0) rotate(-1deg) scale(1); }
  45% { transform: translateY(-5px) rotate(1deg) scale(1.025); }
  60% { transform: translateY(1px) rotate(0deg) scale(0.995); }
}

h2 {
  margin: 0 0 20px;
  font-size: 34px;
}

h3 {
  margin: 0 0 10px;
  font-size: 18px;
}

.subtitle {
  width: min(640px, 100%);
  margin: 0 auto;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.6;
}

.title-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 26px;
}

.title-actions button,
.menu-card button,
.result-card button {
  padding: 13px 20px;
}

button.primary {
  background: #6dff9f;
}

button.danger {
  background: #ef476f;
  color: white;
}

.hint {
  color: var(--muted);
  font-size: 13px;
}

.title-art {
  position: relative;
  width: min(860px, 92vw);
  aspect-ratio: 16 / 9;
  margin: 30px auto 0;
  border: 0;
  border-radius: 18px;
  background: #f3e1b4;
  box-shadow: none;
  overflow: hidden;
}

.title-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: auto;
}

.confirm-overlay {
  position: absolute;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 18px;
  border-radius: 18px;
  background: rgba(20, 16, 28, 0.55);
}

.confirm-card {
  width: min(420px, 100%);
  padding: 22px;
  border: 5px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: 0 9px 0 var(--line);
  text-align: center;
}

.confirm-card h2 {
  margin-bottom: 10px;
  font-size: 26px;
}

.confirm-card p {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.5;
}

.confirm-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.menu-card {
  max-width: 820px;
}

.tutorial-card {
  line-height: 1.75;
}

.tutorial-card li {
  margin: 8px 0;
}

.tutorial-card .backTitle {
  width: 100%;
}

.tutorial-demo {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin: 18px 0;
}

.badge,
.shirt-chip {
  border: 3px solid var(--line);
  border-radius: 8px;
  padding: 10px 15px;
  font-weight: 900;
  color: white;
  box-shadow: 0 5px 0 var(--line);
}

.badge.blue {
  background: var(--blue);
}

.badge.purple {
  background: var(--purple);
}

.shirt-chip {
  width: 52px;
  height: 45px;
  padding: 8px 0;
  text-align: center;
  background: #ffb65c;
  color: var(--ink);
}

.level-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  max-height: min(62vh, 560px);
  padding: 4px 8px 10px 4px;
  margin-bottom: 22px;
  overflow-y: auto;
  scrollbar-color: var(--purple) #fffaf0;
  scrollbar-width: thin;
}

.level-grid::-webkit-scrollbar {
  width: 10px;
}

.level-grid::-webkit-scrollbar-track {
  border: 3px solid var(--line);
  border-radius: 999px;
  background: #fffaf0;
}

.level-grid::-webkit-scrollbar-thumb {
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--purple);
}

.level-card {
  position: relative;
  overflow: hidden;
  padding: 14px;
  text-align: left;
  min-height: 104px;
  background: #fffaf0;
}

.level-card.completed {
  padding-right: 58px;
  background: linear-gradient(90deg, #fffaf0, #fff5c7);
}

.complete-ribbon {
  position: absolute;
  right: -34px;
  top: 14px;
  width: 118px;
  padding: 4px 0;
  border: 3px solid var(--line);
  background: var(--green);
  color: var(--ink);
  text-align: center;
  font-size: 12px;
  font-weight: 900;
  transform: rotate(38deg);
}

.level-card strong {
  display: block;
  font-size: 17px;
  margin-bottom: 6px;
}

.level-card small {
  display: block;
  color: var(--muted);
  line-height: 1.35;
}

.level-stars {
  display: inline-block;
  margin-top: 10px;
  padding: 4px 9px;
  border: 3px solid var(--line);
  border-radius: 999px;
  background: #fffaf0;
  color: #f5b700;
  font-weight: 900;
  letter-spacing: 1px;
}

#screen-game.active {
  display: grid;
  grid-template-rows: auto 1fr auto;
  align-items: stretch;
  justify-items: center;
  gap: 12px;
  padding: 18px;
  position: relative;
}

.settings-btn {
  position: absolute;
  right: 22px;
  top: 20px;
  z-index: 100;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #fff06d;
  font-size: 22px;
}

.settings-menu {
  position: absolute;
  right: 22px;
  top: 78px;
  z-index: 100;
  display: grid;
  gap: 10px;
  width: 180px;
  padding: 12px;
  border: 4px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: 0 8px 0 var(--line);
}

.settings-menu button {
  padding: 10px;
}

.hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: min(1180px, 100%);
  padding: 12px 16px;
  border: 4px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: 0 7px 0 var(--line);
}

#levelName {
  display: block;
  font-size: 22px;
  font-weight: 900;
}

#levelGoal {
  color: var(--muted);
}

.hud-stats {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
  font-weight: 800;
}

.hud-stats span {
  padding: 7px 10px;
  border: 3px solid var(--line);
  border-radius: 999px;
  background: #fffaf0;
}

.game-stage {
  display: grid;
  grid-template-columns: minmax(720px, 1fr) 245px;
  gap: 14px;
  width: min(1180px, 100%);
  min-height: 0;
}

.game-stage.paused {
  filter: saturate(0.75) brightness(0.88);
}

.game-stage.show-side {
  grid-template-columns: minmax(720px, 1fr) 245px;
}

.desk-zone,
.side-controls,
.event-log {
  border: 4px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 243, 214, 0.97);
  box-shadow: 0 8px 0 var(--line);
}

.desk-zone {
  display: grid;
  grid-template-rows: minmax(360px, 1fr) 96px 170px;
  min-height: 0;
  overflow: hidden;
  background: #efdcab;
}

.belt-panel {
  position: relative;
  overflow: hidden;
  border-bottom: 5px solid var(--line);
  background: repeating-linear-gradient(0deg, #f4dfaa 0 26px, #ead19b 26px 52px);
}

.belt-gate {
  position: absolute;
  z-index: 2;
  left: 42px;
  right: 42px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 4px solid var(--line);
  background: #fffaf0;
  font-weight: 900;
  writing-mode: horizontal-tb;
  letter-spacing: 2px;
}

.belt-gate.gate-left {
  justify-content: flex-start;
  padding: 0 10px 0 14px;
}

.belt-gate.gate-left .inline-hold {
  margin-left: auto;
}

.belt-gate small {
  padding: 2px 8px;
  border: 2px solid var(--line);
  border-radius: 999px;
  color: var(--line);
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0;
}

.belt-gate small.scan-ok {
  background: var(--green);
}

.belt-gate small.scan-warn {
  background: var(--yellow);
}

.belt-gate small.scan-bad {
  background: var(--red);
  color: white;
}

.inline-hold {
  padding: 5px 14px;
  border-width: 3px;
  border-radius: 999px;
  background: #fff06d;
  font-size: 13px;
  line-height: 1.1;
  letter-spacing: 0;
  box-shadow: none;
}

.inline-hold:disabled {
  opacity: 0.55;
}

.hold-status {
  padding: 2px 9px;
  border: 2px solid var(--line);
  border-radius: 999px;
  color: var(--line);
  font-size: 12px;
  line-height: 1.1;
  letter-spacing: 0;
  box-shadow: 0 2px 0 var(--line);
}

.hold-status.active {
  background: var(--green);
}

.hold-status.paused {
  background: var(--red);
  color: white;
}

.gate-left {
  top: 0;
  border-top: 0;
}

.gate-right {
  bottom: 0;
  border-bottom: 0;
}

.belt-header {
  position: absolute;
  right: 16px;
  top: 12px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  pointer-events: none;
}

.flow-layer {
  position: absolute;
  left: 0;
  right: 0;
  top: 32px;
  bottom: 32px;
  z-index: 1;
  pointer-events: none;
}

.section3-queue {
  position: absolute;
  left: 50%;
  bottom: 36px;
  z-index: 3;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
  width: min(260px, 76%);
  height: 46px;
  padding: 4px 8px;
  transform: translateX(-50%);
  border: 3px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 250, 240, 0.82);
  box-shadow: 0 5px 0 rgba(58, 40, 72, 0.55);
  pointer-events: none;
}

.section3-queue.congested {
  background: rgba(239, 71, 111, 0.2);
}

.queue-person {
  position: relative;
  width: 22px;
  height: 34px;
  flex: 0 0 auto;
}

.queue-person::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 0;
  width: 12px;
  height: 12px;
  border: 2px solid var(--line);
  border-radius: 5px;
  background: #ffc587;
}

.queue-person::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 13px;
  width: 16px;
  height: 19px;
  border: 2px solid var(--line);
  border-radius: 5px 5px 3px 3px;
  background: var(--blue);
  box-shadow: inset 0 -7px 0 rgba(58, 40, 72, 0.18);
}

.queue-person.purple::after {
  background: var(--purple);
}

.queue-person.gray::after {
  background: #8c7b86;
}

.queue-person.orange::after {
  background: #ff9f43;
}

.queue-person.green::after {
  background: #25b870;
}

.queue-person.yellow::after {
  background: #ffd45c;
}

.walker {
  position: absolute;
  width: 64px;
  height: 86px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  pointer-events: auto;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 5px 0 rgba(58, 40, 72, 0.45));
}

.walker:active {
  transform: translate(-50%, calc(-50% + 4px));
  box-shadow: none;
}

.walker-sprite {
  width: 64px;
  height: 86px;
  background: transparent;
  image-rendering: pixelated;
}

.walker-head {
  position: absolute;
  left: 13px;
  top: 0;
  width: 32px;
  height: 32px;
  border: 4px solid var(--line);
  border-radius: 11px;
  background: #ffc587;
}

.walker-head::before {
  content: "";
  position: absolute;
  left: -4px;
  top: -7px;
  width: 32px;
  height: 12px;
  border: 4px solid var(--line);
  border-bottom: 0;
  border-radius: 9px 9px 0 0;
  background: #2b1b25;
}

.walker-head.hair-1::before { background: #5d3427; }
.walker-head.hair-2::before { background: #34506f; }
.walker-head.hair-3::before { background: #1f273a; }
.walker-head.skin-1 { background: #f0a562; }
.walker-head.skin-2 { background: #d8875d; }
.walker-head.skin-3 { background: #f6c9a3; }
.walker-head.style-1::before {
  left: -6px;
  width: 36px;
  border-radius: 12px 12px 4px 4px;
}
.walker-head.style-2::before {
  top: -4px;
  height: 18px;
  border-radius: 11px 11px 7px 2px;
}
.walker-head.style-3::before {
  left: 2px;
  top: -10px;
  width: 24px;
  height: 16px;
  border-radius: 50% 50% 3px 3px;
}
.walker-head.style-4::before {
  left: -6px;
  top: -5px;
  width: 38px;
  height: 18px;
  border-radius: 8px 14px 4px 4px;
}
.walker-head.style-5::before {
  left: -2px;
  top: -9px;
  width: 30px;
  height: 20px;
  border-radius: 14px 14px 2px 8px;
}
.walker-head.style-6::before {
  left: 0;
  top: -4px;
  width: 24px;
  height: 10px;
  border-radius: 4px;
}
.walker-head.style-7::before {
  left: -4px;
  top: -6px;
  width: 34px;
  height: 17px;
  border-radius: 12px 12px 0 0;
}
.walker-head.style-8::before {
  left: 1px;
  top: -3px;
  width: 24px;
  height: 8px;
  border-radius: 2px;
}

.walker-body {
  position: absolute;
  left: 7px;
  top: 30px;
  width: 44px;
  height: 46px;
  border: 4px solid var(--line);
  border-radius: 15px 15px 9px 9px;
  background: var(--blue);
}

.walker-body.purple { background: var(--purple); }
.walker-body.green { background: #2fc0a3; }
.walker-body.gray { background: #8c7b86; }

.walker-icon {
  position: absolute;
  left: 18px;
  top: 43px;
  width: 22px;
  height: 20px;
  border: 3px solid rgba(58, 40, 72, 0.85);
  border-radius: 7px;
  background: #fffaf0;
  color: transparent;
  font-size: 0;
  line-height: 0;
}

.walker-icon::before,
.walker-icon::after {
  content: "";
  position: absolute;
  background: currentColor;
}

.walker-icon.badge::before {
  left: 4px;
  top: 4px;
  width: 8px;
  height: 5px;
  background: #fffaf0;
  border: 2px solid rgba(58, 40, 72, 0.7);
  border-radius: 3px;
}

.walker-icon.badge::after {
  left: 7px;
  top: 11px;
  width: 8px;
  height: 3px;
  background: rgba(58, 40, 72, 0.75);
}

.walker-icon.laptop::before {
  left: 4px;
  top: 4px;
  width: 10px;
  height: 7px;
  background: #d9f1ff;
  border: 2px solid rgba(58, 40, 72, 0.7);
}

.walker-icon.laptop::after {
  left: 2px;
  top: 13px;
  width: 16px;
  height: 3px;
  background: rgba(58, 40, 72, 0.75);
}

.walker-icon.glasses::before {
  left: 2px;
  top: 6px;
  width: 5px;
  height: 5px;
  border: 2px solid rgba(58, 40, 72, 0.78);
  background: transparent;
}

.walker-icon.glasses::after {
  left: 12px;
  top: 6px;
  width: 5px;
  height: 5px;
  border: 2px solid rgba(58, 40, 72, 0.78);
  background: transparent;
}

.walker-icon.cap::before {
  left: 3px;
  top: 5px;
  width: 12px;
  height: 7px;
  background: #ffd45c;
  border: 2px solid rgba(58, 40, 72, 0.7);
  border-radius: 6px 6px 2px 2px;
}

.walker-icon.cap::after {
  left: 12px;
  top: 10px;
  width: 7px;
  height: 3px;
  background: rgba(58, 40, 72, 0.75);
}

.walker-icon.headset::before {
  left: 4px;
  top: 3px;
  width: 12px;
  height: 10px;
  border: 3px solid rgba(58, 40, 72, 0.78);
  border-bottom: 0;
  border-radius: 9px 9px 0 0;
  background: transparent;
}

.walker-icon.headset::after {
  left: 13px;
  top: 11px;
  width: 6px;
  height: 3px;
  background: rgba(58, 40, 72, 0.78);
}

.walker-icon.scarf::before {
  left: 3px;
  top: 6px;
  width: 14px;
  height: 5px;
  background: #ef476f;
  border: 2px solid rgba(58, 40, 72, 0.7);
}

.walker-icon.scarf::after {
  left: 11px;
  top: 11px;
  width: 5px;
  height: 7px;
  background: #ef476f;
}

.walker-icon.tie::before {
  left: 7px;
  top: 4px;
  width: 7px;
  height: 6px;
  background: #ffd45c;
  transform: rotate(45deg);
}

.walker-icon.tie::after {
  left: 8px;
  top: 10px;
  width: 6px;
  height: 8px;
  background: #ffd45c;
}

.walker-icon.pen::before {
  left: 8px;
  top: 3px;
  width: 5px;
  height: 15px;
  background: #2f8cff;
  transform: rotate(18deg);
}

.walker-icon.pen::after {
  left: 10px;
  top: 2px;
  width: 4px;
  height: 4px;
  background: #ffd45c;
}

.walker-icon.camera::before {
  left: 3px;
  top: 6px;
  width: 14px;
  height: 10px;
  background: #2b1b25;
  border: 2px solid rgba(58, 40, 72, 0.7);
}

.walker-icon.camera::after {
  left: 8px;
  top: 9px;
  width: 5px;
  height: 5px;
  background: #d9f1ff;
  border-radius: 50%;
}

.walker-icon.bag::before {
  left: 4px;
  top: 6px;
  width: 12px;
  height: 9px;
  background: #f0c36a;
  border: 2px solid rgba(58, 40, 72, 0.7);
  border-radius: 2px;
}

.walker-icon.bag::after {
  left: 7px;
  top: 3px;
  width: 6px;
  height: 5px;
  border: 2px solid rgba(58, 40, 72, 0.7);
  border-bottom: 0;
  background: transparent;
}

.walk-alert {
  padding: 8px 13px;
  border: 3px solid var(--line);
  border-radius: 999px;
  background: var(--red);
  color: white;
  font-weight: 900;
  animation: blink 0.6s steps(2) infinite;
}

.hidden {
  display: none !important;
}

@keyframes blink {
  50% { filter: brightness(1.25); }
}

.interaction-panel {
  display: grid;
  grid-template-columns: minmax(360px, 1fr);
  align-items: center;
  gap: 12px;
  padding: 8px 14px;
  border-bottom: 5px solid var(--line);
  background: #ffe7bb;
}

.surface-toggle {
  background: #fff06d;
  min-width: 128px;
  padding: 10px 12px;
}

.dialog-surface-toggle {
  justify-self: stretch;
  width: 100%;
}

.interaction-card {
  display: grid;
  grid-template-columns: 78px 1fr;
  align-items: center;
  gap: 12px;
  min-height: 82px;
}

.avatar-wrap {
  position: relative;
  width: 72px;
  height: 72px;
  overflow: visible;
}

#avatar {
  width: 72px;
  height: 72px;
  border: 4px solid var(--line);
  border-radius: 16px;
  background: #ffe3b5;
  image-rendering: pixelated;
  box-shadow: 0 5px 0 var(--line);
}

.badge-drop-zone {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 104px;
  height: 66px;
  border: 4px dashed transparent;
  border-radius: 12px;
  background: transparent;
  color: transparent;
  font-size: 13px;
  font-weight: 900;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(0.62);
  transform-origin: center;
  opacity: 0;
}

.badge-drop-zone.drop-target {
  border-color: rgba(109, 255, 159, 0.95);
  border-style: solid;
  background: rgba(109, 255, 159, 0.45);
  opacity: 1;
}

.visitor-name {
  display: inline-block;
  padding: 6px 14px;
  border: 3px solid var(--line);
  border-radius: 999px;
  background: #fffaf0;
  font-size: 16px;
  font-weight: 900;
}

.visitor-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.badge-status {
  display: inline-block;
  padding: 5px 10px;
  border: 3px solid var(--line);
  border-radius: 999px;
  background: #fffaf0;
  color: var(--line);
  font-size: 13px;
  font-weight: 900;
}

.badge-status.issued {
  background: #6dff9f;
}

.desk-timer {
  display: inline-block;
  min-width: 54px;
  padding: 5px 10px;
  border: 3px solid var(--line);
  border-radius: 999px;
  background: #fff06d;
  color: var(--line);
  font-size: 13px;
  font-weight: 900;
  text-align: center;
}

.desk-timer.warning {
  background: var(--red);
  color: white;
  animation: timer-pulse 0.35s ease-in-out infinite alternate;
}

@keyframes timer-pulse {
  from { transform: scale(1); }
  to { transform: scale(1.06); }
}

.speech {
  width: 100%;
  min-height: 42px;
  padding: 8px 11px;
  border: 3px solid var(--line);
  border-radius: 14px;
  background: #fffaf0;
  font-weight: 800;
  line-height: 1.35;
}

.extra-actions,
.dialog-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  max-width: 620px;
}

.desk-item {
  min-height: 42px;
  padding: 8px 12px;
  font-size: 14px;
}

.question { background: #b6efff; }
.redirect { background: #ffce7b; }
.shirt { background: #ffb65c; }
.onward { background: #6dff9f; }

.shirt-drawer,
.supply-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(90px, 1fr));
  gap: 7px;
  align-items: center;
  padding: 7px;
  border: 3px solid var(--line);
  border-radius: 12px;
  background: #714329;
  color: #fff3d6;
  font-weight: 900;
}

.supply-actions {
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  background: #8a5634;
}

.shirt-drawer button {
  min-height: 62px;
  padding: 0;
  background: #ffdf78;
}

.supply-card {
  display: grid;
  place-items: center;
  gap: 6px;
  min-height: 78px;
  padding: 8px;
  color: white;
}

.supply-card.blue { background: var(--blue); }
.supply-card.purple { background: var(--purple); }

.supply-card small {
  padding: 3px 7px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: #fffaf0;
  color: var(--ink);
}

.tabletop-area,
.under-table-area {
  display: grid;
  grid-template-columns: minmax(116px, 0.8fr) minmax(116px, 0.8fr) minmax(260px, 1.35fr);
  gap: 12px;
  padding: 10px 16px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(#cf8752, var(--desk));
  background-size: 24px 24px, 100% 100%;
}

.under-table-area {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
}

.dialog-column {
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 8px;
  min-height: 128px;
}

.dialog-box,
.shirt-shelf,
.badge-supply-box {
  display: grid;
  gap: 10px;
  align-content: start;
  justify-items: center;
  min-height: 128px;
  padding: 8px;
  border: 3px dashed rgba(58, 40, 72, 0.45);
  border-radius: 16px;
  background: rgba(255, 250, 240, 0.18);
}

.dialog-box {
  grid-template-rows: auto 1fr;
  min-height: 0;
}

.under-surface-toggle {
  grid-column: 1 / -1;
  justify-self: stretch;
  width: 100%;
}

.dialog-box h3,
.shirt-shelf h3,
.badge-supply-box h3 {
  margin: 0;
  align-self: start;
  color: #fff3d6;
  text-shadow: 2px 2px 0 var(--line);
}

.shirt-shelf p,
.badge-supply-box p {
  margin: 0;
  color: #fff3d6;
  font-weight: 800;
  text-align: center;
  text-shadow: 1px 1px 0 var(--line);
}

.shirt-card {
  position: relative;
  display: grid;
  grid-template-rows: 1fr auto;
  place-items: center;
  gap: 2px;
  border-color: var(--line);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.28), transparent 40%),
    #ffb65c;
}

.shirt-card::before {
  content: none;
}

.shirt-card span {
  position: static;
  font-size: 20px;
  font-weight: 900;
}

.shirt-card small {
  position: static;
  font-weight: 900;
}

.badge-pile-zone {
  position: relative;
  display: grid;
  grid-template-rows: auto 82px auto;
  justify-items: center;
  min-height: 128px;
  padding: 4px 12px 8px;
  border: 3px dashed rgba(58, 40, 72, 0.45);
  border-radius: 16px;
  background: rgba(255, 250, 240, 0.16);
}

.badge-pile-zone h3 {
  margin: 0 82px 0 0;
  color: #fff3d6;
  text-shadow: 2px 2px 0 var(--line);
}

.badge-pile {
  position: relative;
  width: 150px;
  height: 82px;
  margin-top: 8px;
}

.badge-card {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  gap: 5px;
  width: 110px;
  height: 68px;
  padding: 7px 10px 7px 7px;
  transform: translate(-50%, -50%);
  border: 4px solid var(--line);
  border-radius: 12px;
  color: white;
  font-weight: 900;
  text-align: center;
  cursor: grab;
  box-shadow: 0 7px 0 rgba(58, 40, 72, 0.85);
  user-select: none;
}

.badge-card:active {
  cursor: grabbing;
}

.badge-card.blue {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.25), transparent 34%), var(--blue);
}

.badge-card.purple {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.25), transparent 34%), var(--purple);
}

.badge-mini-person {
  position: relative;
  display: block;
  width: 30px;
  height: 42px;
  justify-self: start;
  border: 3px solid var(--line);
  border-radius: 9px;
  background: #fffaf0;
  box-shadow: inset 0 -10px 0 rgba(58, 40, 72, 0.12);
}

.badge-mini-head {
  position: absolute;
  left: 7px;
  top: 5px;
  width: 14px;
  height: 14px;
  border: 2px solid var(--line);
  border-radius: 5px;
  background: #ffd0a3;
  box-shadow: inset 0 3px 0 #3a2848;
}

.badge-mini-body {
  position: absolute;
  left: 5px;
  bottom: 5px;
  width: 18px;
  height: 16px;
  border: 2px solid var(--line);
  border-radius: 5px 5px 3px 3px;
}

.badge-card.blue .badge-mini-body {
  background: var(--blue);
}

.badge-card.purple .badge-mini-body {
  background: var(--purple);
}

.badge-info {
  display: grid;
  gap: 2px;
  justify-items: start;
  text-align: left;
  line-height: 1;
  text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.22);
}

.badge-info strong {
  font-size: 17px;
}

.badge-info small {
  padding: 2px 4px;
  border: 2px solid rgba(255, 255, 255, 0.86);
  border-radius: 999px;
  font-size: 8px;
  letter-spacing: 0.5px;
  background: rgba(255, 255, 255, 0.16);
}

.badge-empty {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 104px;
  height: 66px;
  padding: 8px;
  transform: translate(-50%, -50%);
  border: 4px dashed rgba(255, 243, 214, 0.86);
  border-radius: 12px;
  background: rgba(58, 40, 72, 0.22);
  color: #fff3d6;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.2;
  text-align: center;
}

.stock-text {
  position: absolute;
  right: 12px;
  top: 8px;
  z-index: 20;
  margin: 0;
  padding: 5px 10px;
  border: 3px solid var(--line);
  border-radius: 999px;
  background: #fffaf0;
  color: var(--ink);
  font-weight: 900;
  text-shadow: none;
}

.side-controls {
  display: grid;
  gap: 14px;
  align-content: start;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.side-controls.locked {
  visibility: hidden;
  pointer-events: none;
}

.station {
  padding: 16px;
  border: 4px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 8px 0 var(--line);
  overflow: hidden;
}

.left-station {
  background:
    linear-gradient(rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.16)),
    repeating-linear-gradient(0deg, #ffedb2 0 18px, #ffe49b 18px 36px);
}

.right-station {
  background:
    linear-gradient(rgba(255, 255, 255, 0.46), rgba(255, 255, 255, 0.12)),
    repeating-linear-gradient(90deg, #dff4ff 0 18px, #cdeeff 18px 36px);
}

.lamp {
  width: 58px;
  height: 58px;
  margin: 18px auto 10px;
  border: 4px solid var(--line);
  border-radius: 50%;
  background: var(--green);
  box-shadow: inset -8px -8px 0 rgba(0, 0, 0, 0.18), 0 0 0 6px rgba(78, 203, 113, 0.2);
}

.lamp.red {
  background: var(--red);
  box-shadow: inset -8px -8px 0 rgba(0, 0, 0, 0.18), 0 0 0 6px rgba(239, 71, 111, 0.22);
}

#holdText,
#scanText {
  font-weight: 900;
  text-align: center;
}

.meter {
  width: 100%;
  height: 30px;
  border: 4px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  background: #fffaf0;
}

#scanFill {
  height: 100%;
  width: 0%;
  background: var(--green);
  transition: width 0.18s ease, background 0.18s ease;
}

.scan-queue {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  min-height: 110px;
  margin: 18px 0;
  align-content: start;
}

.scan-dot {
  display: block;
  width: 34px;
  height: 34px;
  border: 3px solid var(--line);
  border-radius: 12px;
  background: #ffc587;
  box-shadow: inset 0 -12px 0 var(--blue);
}

.control-btn {
  width: 100%;
  padding: 12px 8px;
  background: #fff06d;
}

.event-log {
  height: 72px;
  padding: 9px 12px;
  overflow: hidden;
  background: #fffaf0;
  font-size: 14px;
  line-height: 1.45;
}

.event-log .bad {
  color: #b51f48;
  font-weight: 900;
}

.event-log .good {
  color: #1e8a45;
  font-weight: 900;
}

.briefing-overlay {
  position: absolute;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(16, 24, 39, 0.48);
}

.briefing-card {
  position: relative;
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 16px;
  width: min(680px, calc(100vw - 40px));
  padding: 20px;
  border: 5px solid var(--line);
  border-radius: 20px;
  background: var(--panel);
  box-shadow: 0 12px 0 var(--line), 0 22px 40px var(--shadow);
}

.briefing-skip {
  position: absolute;
  right: 12px;
  top: 12px;
  z-index: 2;
  padding: 7px 11px;
  border-width: 3px;
  border-radius: 999px;
  background: #fffaf0;
  font-size: 13px;
}

.briefing-speaker,
.briefing-copy {
  min-width: 0;
}

.briefing-copy {
  display: grid;
}

.briefing-speaker {
  display: grid;
  gap: 8px;
  align-content: start;
  justify-items: start;
}

.briefing-avatar {
  width: 64px;
  height: 64px;
  border: 4px solid var(--line);
  border-radius: 16px;
  background: #ffd45c;
  image-rendering: pixelated;
  box-shadow: 0 6px 0 var(--line);
}

.briefing-name {
  display: inline-block;
  padding: 5px 10px;
  border: 3px solid var(--line);
  border-radius: 999px;
  background: #fffaf0;
  font-weight: 900;
}

.briefing-card h2 {
  margin: 10px 0 8px;
  font-size: 24px;
}

.briefing-card p {
  margin: 0 0 14px;
  font-size: 16px;
  line-height: 1.65;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.text-blue {
  color: var(--blue);
  font-weight: 900;
}

.text-purple {
  color: var(--purple);
  font-weight: 900;
}

.text-gray {
  color: #6d6174;
  font-weight: 900;
}

.text-red {
  color: var(--red);
  font-weight: 900;
}

.briefing-nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.briefing-nav button {
  padding: 8px 12px;
  font-size: 14px;
}

.briefing-nav button:first-child {
  justify-self: start;
}

.briefing-nav button:last-child {
  justify-self: end;
}

.briefing-nav span {
  min-width: 46px;
  text-align: center;
  font-weight: 900;
}

#briefingStart {
  width: 100%;
  justify-self: stretch;
  padding: 13px 18px;
  font-size: 18px;
}

.result-card {
  text-align: center;
  max-width: 720px;
}

#resultSummary {
  white-space: pre-line;
}

.stars {
  margin: 18px 0 8px;
  font-size: 42px;
  letter-spacing: 6px;
  color: #f5b700;
  text-shadow: 3px 3px 0 var(--line);
}

.shake {
  animation: shake 0.2s linear 2;
}

@keyframes shake {
  25% {
    transform: translateX(-5px);
  }
  75% {
    transform: translateX(5px);
  }
}

@media (max-width: 980px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }

  #app {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }

  #screen-game.active {
    place-items: stretch center;
    justify-items: center;
    grid-template-columns: minmax(0, 1fr);
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0;
    min-height: 100vh;
    height: 100vh;
    grid-template-rows: auto 1fr 42px;
    gap: 6px;
    padding: 7px;
  }

  #screen-game.active > *,
  #screen-game.active * {
    min-width: 0;
  }

  .settings-btn {
    right: 8px;
    left: auto;
    top: 8px;
    width: 38px;
    height: 38px;
    border-width: 2px;
    font-size: 18px;
    box-shadow: 0 3px 0 var(--line);
  }

  .settings-menu {
    right: 8px;
    left: auto;
    top: 52px;
    width: 150px;
    padding: 8px;
  }

  .hud {
    justify-self: center;
    width: 100% !important;
    max-width: 390px !important;
    min-width: 0;
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
    padding: 7px 46px 7px 8px;
    border-width: 3px;
    border-radius: 12px;
    box-shadow: 0 4px 0 var(--line);
  }

  #levelName {
    font-size: 16px;
  }

  #levelGoal {
    display: none;
  }

  .hud-stats {
    width: 100%;
    gap: 5px;
    justify-content: flex-start;
    font-size: 12px;
  }

  .hud-stats span {
    padding: 4px 6px;
    border-width: 2px;
  }

  .game-stage {
    justify-self: center;
    width: 100% !important;
    max-width: 390px !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 6px;
    min-height: 0;
  }

  .game-stage.show-side {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .side-controls,
  .side-controls.locked {
    display: none;
  }

  .desk-zone {
    box-sizing: border-box;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0;
    grid-template-rows: minmax(330px, 1fr) 82px 148px;
    min-height: 0;
    border-width: 3px;
    border-radius: 14px;
    box-shadow: 0 5px 0 var(--line);
  }

  .belt-panel {
    min-width: 0;
    border-bottom-width: 3px;
  }

  .belt-gate {
    left: 24px;
    right: 24px;
    height: 30px;
    gap: 5px;
    border-width: 3px;
    font-size: 10px;
    letter-spacing: 0;
  }

  .belt-gate.gate-left {
    padding: 0 5px 0 7px;
  }

  .belt-gate small {
    padding: 1px 5px;
    border-width: 2px;
    font-size: 9px;
  }

  .inline-hold {
    max-width: 92px;
    padding: 3px 7px;
    border-width: 2px;
    font-size: 10px;
    white-space: nowrap;
  }

  .hold-status {
    padding: 1px 5px;
    border-width: 2px;
    font-size: 9px;
    white-space: nowrap;
  }

  .flow-layer {
    left: 0;
    right: 0;
    top: 30px;
    bottom: 30px;
  }

  .section3-queue {
    bottom: 33px;
    width: min(210px, 78%);
    height: 34px;
    padding: 3px 6px;
    gap: 2px;
    border-width: 2px;
    border-radius: 10px;
    box-shadow: 0 3px 0 rgba(58, 40, 72, 0.55);
  }

  .queue-person {
    width: 16px;
    height: 26px;
  }

  .queue-person::before {
    left: 4px;
    width: 8px;
    height: 8px;
    border-width: 2px;
    border-radius: 4px;
  }

  .queue-person::after {
    left: 2px;
    top: 10px;
    width: 12px;
    height: 14px;
    border-width: 2px;
    border-radius: 4px 4px 3px 3px;
  }

  .belt-header {
    right: 8px;
    top: 8px;
  }

  .walk-alert {
    padding: 5px 8px;
    border-width: 2px;
    font-size: 12px;
  }

  .walk-alert {
    display: none !important;
  }

  .walker {
    width: 48px;
    height: 64px;
  }

  .walker-sprite {
    width: 48px;
    height: 64px;
  }

  .walker-head {
    left: 10px;
    width: 25px;
    height: 25px;
    border-width: 3px;
  }

  .walker-head::before {
    left: -3px;
    top: -6px;
    width: 25px;
    height: 10px;
    border-width: 3px;
  }

  .walker-body {
    left: 5px;
    top: 24px;
    width: 34px;
    height: 36px;
    border-width: 3px;
    border-radius: 11px 11px 7px 7px;
  }

  .walker-icon {
    left: 13px;
    top: 33px;
    width: 18px;
    height: 17px;
    border-width: 2px;
    font-size: 10px;
    line-height: 13px;
  }

  .interaction-panel {
    min-width: 0;
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 5px 8px;
    border-bottom-width: 3px;
  }

  .interaction-card {
    min-width: 0;
    grid-template-columns: 56px 1fr;
    gap: 7px;
    min-height: 54px;
  }

  .avatar-wrap {
    width: 52px;
    height: 52px;
  }

  #avatar {
    width: 52px;
    height: 52px;
    border-width: 3px;
    border-radius: 10px;
    box-shadow: 0 3px 0 var(--line);
  }

  .badge-drop-zone {
    width: 58px;
    height: 40px;
    border-width: 3px;
    border-radius: 9px;
    font-size: 9px;
    transform: translate(-50%, -50%);
  }

  .visitor-name {
    padding: 3px 8px;
    border-width: 2px;
    font-size: 12px;
  }

  .visitor-meta {
    gap: 4px;
    margin-bottom: 3px;
  }

  .badge-status {
    padding: 3px 6px;
    border-width: 2px;
    font-size: 10px;
  }

  .desk-timer {
    min-width: 44px;
    padding: 3px 6px;
    border-width: 2px;
    font-size: 10px;
  }

  .speech {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    min-height: 28px;
    padding: 5px 7px;
    border-width: 2px;
    border-radius: 10px;
    font-size: 12px;
    line-height: 1.25;
  }

  .surface-toggle {
    min-width: 76px;
    justify-self: center;
    margin-left: 0;
    padding: 5px 7px;
    border-width: 2px;
    border-radius: 8px;
    box-shadow: 0 3px 0 var(--line);
    font-size: 11px;
  }

  .surface-toggle::first-line {
    font-size: 10px;
  }

  .extra-actions,
  .dialog-actions {
    max-width: none;
    justify-content: flex-start;
    gap: 4px;
  }

  .desk-item {
    min-height: 28px;
    padding: 3px 2px;
    border-width: 2px;
    border-radius: 8px;
    box-shadow: 0 3px 0 var(--line);
    font-size: 9px;
  }

  .shirt-drawer,
  .supply-actions {
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    padding: 4px;
    border-width: 2px;
    font-size: 11px;
  }

  .supply-actions {
    grid-template-columns: repeat(2, 1fr);
  }

  .shirt-drawer button {
    min-height: 56px;
    border-width: 2px;
    box-shadow: 0 2px 0 var(--line);
    font-size: 11px;
  }

  .tabletop-area,
  .under-table-area {
    grid-template-columns: minmax(0, 0.7fr) minmax(0, 0.7fr) minmax(92px, 1.45fr);
    gap: 3px;
    padding: 4px;
    min-width: 0;
  }

  .under-table-area {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: stretch;
  }

  .dialog-box,
  .shirt-shelf,
  .badge-supply-box {
    min-height: 112px;
    padding: 4px 2px;
    gap: 4px;
    border-width: 2px;
    border-radius: 12px;
  }

  .dialog-box h3,
  .shirt-shelf h3,
  .badge-supply-box h3 {
    font-size: 11px;
  }

  .shirt-shelf p,
  .badge-supply-box p {
    display: none;
  }

  .under-table-area .supply-actions {
    grid-template-columns: repeat(2, 1fr);
  }

  .under-table-area .shirt-drawer {
    width: min(150px, 96%);
    justify-self: center;
    grid-template-columns: repeat(2, minmax(58px, 1fr));
    gap: 3px;
    padding: 3px;
  }

  .under-table-area .shirt-drawer button {
    min-height: 34px;
    padding: 0;
  }

  .under-table-area .shirt-card span {
    font-size: 13px;
  }

  .under-table-area .shirt-card small {
    font-size: 8px;
  }

  .badge-pile-zone {
    min-width: 0;
    overflow: hidden;
    min-height: 112px;
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr auto;
    align-items: center;
    padding: 4px 4px 6px;
    border-width: 2px;
    border-radius: 12px;
  }

  .badge-pile-zone h3 {
    margin-right: 0;
    padding-right: 0;
    font-size: 11px;
    justify-self: center;
  }

  .badge-pile {
    width: 74px;
    height: 46px;
    margin-top: 0;
    grid-column: auto;
    justify-self: center;
  }

  .badge-card {
    grid-template-columns: 20px 1fr;
    gap: 3px;
    width: 64px;
    height: 40px;
    padding: 3px 5px 3px 3px;
    border-width: 3px;
    border-radius: 9px;
    box-shadow: 0 4px 0 rgba(58, 40, 72, 0.85);
  }

  .badge-mini-person {
    width: 18px;
    height: 27px;
    border-width: 2px;
    border-radius: 6px;
  }

  .badge-mini-head {
    left: 3px;
    top: 3px;
    width: 10px;
    height: 9px;
    border-width: 1px;
    border-radius: 3px;
  }

  .badge-mini-body {
    left: 2px;
    bottom: 3px;
    width: 12px;
    height: 10px;
    border-width: 1px;
    border-radius: 3px;
  }

  .badge-info strong {
    font-size: 10px;
  }

  .badge-info small {
    padding: 1px 2px;
    border-width: 1px;
    font-size: 5px;
  }

  .badge-empty {
    width: 58px;
    height: 40px;
    padding: 4px;
    border-width: 3px;
    border-radius: 9px;
    font-size: 9px;
  }

  .stock-text {
    position: static;
    grid-column: auto;
    justify-self: center;
    padding: 2px 5px;
    border-width: 2px;
    font-size: 10px;
  }

  .event-log {
    justify-self: start;
    width: calc(100vw - 82px) !important;
    max-width: calc(100vw - 82px) !important;
    min-width: 0;
    height: 42px;
    padding: 5px 8px;
    border-width: 3px;
    border-radius: 10px;
    box-shadow: 0 3px 0 var(--line);
    font-size: 11px;
    line-height: 1.25;
  }

  .briefing-overlay {
    padding: 10px;
    overflow: hidden;
  }

  .briefing-card {
    grid-template-columns: 1fr;
    gap: 10px;
    width: 100%;
    max-width: 360px;
    padding: 12px;
    border-width: 4px;
    border-radius: 16px;
    box-shadow: 0 8px 0 var(--line);
  }

  .briefing-skip {
    right: 8px;
    top: 8px;
    padding: 5px 9px;
    border-width: 2px;
    font-size: 12px;
  }

  .briefing-avatar {
    width: 42px;
    height: 42px;
    border-width: 3px;
    border-radius: 12px;
    font-size: 22px;
    box-shadow: 0 4px 0 var(--line);
  }

  .briefing-speaker {
    display: flex;
    align-items: center;
    gap: 9px;
  }

  .briefing-name {
    padding: 3px 8px;
    border-width: 2px;
    font-size: 12px;
  }

  .briefing-card h2 {
    margin: 6px 0 5px;
    font-size: 18px;
  }

  .briefing-card p {
    margin-bottom: 10px;
    font-size: 13px;
    line-height: 1.5;
  }
}

@media (max-width: 520px) {
  .screen {
    padding: 10px;
  }

  .screen.active {
    place-items: center;
    justify-items: center;
  }

  .pixel-card {
    justify-self: center;
    width: 100%;
    max-width: 390px;
    padding: 18px;
    border-width: 4px;
    border-radius: 18px;
    box-shadow: 0 10px 0 var(--line), 0 16px 28px var(--shadow);
  }

  .help-btn {
    left: auto;
    right: 10px;
    top: 10px;
    width: 40px;
    height: 40px;
    border-width: 3px;
    font-size: 22px;
  }

  .game-title {
    margin-top: 14px;
    font-size: 24px;
    white-space: normal;
    overflow-wrap: anywhere;
    -webkit-text-stroke-width: 2px;
    text-shadow: 0 3px 0 #ff9f43, 0 5px 0 var(--line);
  }

  .subtitle {
    font-size: 14px;
  }

  .title-art {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    margin-top: 18px;
    overflow: hidden;
  }

  .title-actions {
    margin-top: 18px;
  }

  .title-actions button,
  .menu-card button,
  .result-card button {
    padding: 10px 14px;
  }
}
@media (max-width: 640px) {
  button, .badge, .control-btn { min-height: 46px; }
  .guest-progress-note { font-size: 12px; line-height: 1.55; }
}
