.arcade {
  background: radial-gradient(circle at 1px 1px, #4b327a22 1px, transparent 1.5px) 0 0 / 10px 10px, var(--purple);
  border-bottom: 2px solid var(--ink);
  padding-block: clamp(27px, 5vw, 65px);
  scroll-margin-top: 0;
}
.arcade-top { display: flex; justify-content: space-between; align-items: end; gap: 16px; }
.arcade-top h2 { margin-top: 9px; font-size: clamp(40px, 6.5vw, 76px); }
.arcade-caption { padding-bottom: 2px; color: var(--ink); font-size: 17px; font-weight: 700; line-height: 1.45; }
.arcade-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, .37fr); grid-template-areas: "console side"; gap: clamp(20px, 3.5vw, 43px); align-items: start; margin-top: 20px; }
.arcade-side { grid-area: side; display: grid; gap: 15px; min-width: 0; }
.arcade-intro, .arcade-share { padding: clamp(13px, 1.5vw, 19px); color: var(--ink); border: 2px solid var(--ink); background: var(--cream); box-shadow: var(--shadow); }
.arcade-side h3 { font: 800 clamp(21px, 2.2vw, 27px)/1.15 var(--display); letter-spacing: -.02em; }
.arcade-share { background: #f8efff; }
.arcade-share > p:not(.feedback) { margin: 6px 0 11px; }
.arcade-share .button { min-height: 44px; }
.mission-instructions { list-style: none; padding: 0; margin: 12px 0 0; counter-reset: step; display: grid; gap: 9px; }
.mission-instructions li { counter-increment: step; position: relative; padding-left: 31px; color: var(--ink); font-size: 16px; line-height: 1.5; }
.mission-instructions li::before { content: '0' counter(step); position: absolute; inset: 2px auto auto 0; font: bold 12px/1.3 var(--mono); padding: 1px 3px; border: 1px solid var(--ink); background: var(--yellow); color: var(--ink); }
.mission-instructions strong { color: var(--ink); }
.mission-instructions kbd { font: inherit; font-weight: 750; }

.console { grid-area: console; background: var(--ink); border: 3px solid var(--ink); box-shadow: 5px 6px 0 #685397; color: var(--cream); min-width: 0; }
.console-header { min-height: 39px; padding: 7px 13px; display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; font-weight: bold; color: var(--yellow); }
.console-header strong { color: #fff6e4; }
.camera-label { display: inline-flex; gap: 6px; align-items: center; }
#mission-stage { color: #f9eed8; text-align: center; }
.game-scene { position: relative; isolation: isolate; overflow: hidden; border-block: 1px solid #aa92cd; background: #243a3b; }
.game-scene > svg { display: block; width: 100%; height: auto; }
.camera-corner { position: absolute; top: 8px; height: 12px; width: 12px; border: 1px solid #fff2cb; pointer-events: none; z-index: 2; }
.camera-corner-left { left: 8px; border-width: 1px 0 0 1px; }
.camera-corner-right { right: 8px; border-width: 1px 1px 0 0; }
.scene-signal { position: absolute; top: 12px; left: 13px; display: flex; align-items: center; gap: 5px; padding: 5px 7px; background: #142037; color: #fff1d5; font-weight: bold; font-size: 12px; pointer-events: none; z-index: 2; }
[data-gaze="safe"] .scene-signal { background: #194732; color: #e5ffe5; }
[data-gaze="safe"] .scene-signal i { background: #a4efac; }
[data-gaze="danger"] .scene-signal { background: #632e37; color: #fff2e2; }
[data-gaze="safe"] .game-scene > svg { outline: 2px solid #a4efac; outline-offset: -2px; }
.scene-action { position: absolute; z-index: 1; inset: 0; width: 100%; border: 0; padding: 0; background: transparent; cursor: pointer; touch-action: pan-y; user-select: none; }
.scene-action:disabled { cursor: default; }
.drop-target { position: absolute; bottom: 11%; right: 5%; padding: 6px 9px; border: 1px solid #e7ba79; background: #172237e8; color: #fff3da; box-shadow: 2px 2px #101725; font-size: clamp(13px, 1.6vw, 16px); font-weight: bold; }
[data-state="ready"] .drop-target { right: 50%; bottom: 10%; transform: translateX(50%); white-space: nowrap; background: var(--yellow); color: #1c2638; }
[data-gaze="safe"] .drop-target { background: #c8f7bd; border-color: #ddffd3; color: #233a2b; }
[data-state="win"] .drop-target, [data-state="caught"] .drop-target { display: none; }
[data-moving="true"] .drop-target { opacity: .72; }
.game-result { position: absolute; z-index: 2; pointer-events: none; display: grid; justify-items: end; gap: 3px; top: 12px; right: 16px; max-width: 49%; padding: 5px 8px 6px; transform: rotate(2deg); background: #142037; color: #f7d28f; border: 2px solid currentColor; box-shadow: 2px 3px #0f1725; text-align: right; animation: file-stamp .18s ease-out both; }
.game-result[hidden] { display: none; }
.game-result span { font-size: 12px; font-weight: bold; }
.game-result strong { font: 800 clamp(14px, 1.9vw, 22px)/1.15 var(--display); }
[data-state="caught"] .game-result { color: #ffad98; }
@keyframes file-stamp { from { transform: translateY(-4px) rotate(5deg) scale(1.04); } }
.deposit-stamp { display: none; position: absolute; z-index: 2; top: 12px; right: 15px; padding: 4px 7px; color: #ffebb7; background: #8b3838; border: 1px solid #ffebb7; font-weight: bold; font-size: clamp(8px, 1.2vw, 13px); pointer-events: none; }
[data-state="escape"] .deposit-stamp { display: block; animation: deposit-stamp 1.25s ease-out both; }
@keyframes deposit-stamp {
  0% { opacity: 0; transform: scale(1.1) rotate(4deg); }
  16%, 78% { opacity: 1; transform: rotate(2deg); }
  100% { opacity: 0; transform: rotate(2deg); }
}

.console-controls { min-height: 84px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 7px 13px 2px; }
.game-status { color: #f9d8a5; font: 750 16px/1.3 var(--sans); }
[data-gaze="danger"] .game-status, [data-state="caught"] .game-status { color: #ffae9b; }
[data-gaze="safe"] .game-status { color: #c7f1bd; }
.game-hint { margin-top: 4px; font-size: 15px; color: #ede1cf; line-height: 1.4; }
.game-actions { display: grid; min-width: 148px; }
.game-button { min-height: 46px; padding: 6px 10px; border: 1px solid var(--yellow); background: var(--yellow); color: #202638; font: 800 15px/1.2 var(--sans); cursor: pointer; box-shadow: 0 2px #a4802a; touch-action: none; user-select: none; }
.game-button:hover { filter: brightness(1.07); }
.game-button:active { transform: translateY(1px); }
[data-gaze="danger"] .game-button { background: #643641; color: #fff0db; border-color: #a46d6e; box-shadow: 0 2px #362638; }
[data-gaze="safe"] .game-button { background: #ccf2bf; border-color: #a4d09c; box-shadow: 0 2px #5b805e; }
.game-button:disabled { cursor: default; opacity: .65; }
.console :focus-visible { outline: 2px solid #ffefb3; outline-offset: 2px; }
.result-share { display: flex; align-items: center; justify-content: center; gap: 5px; padding: 0; min-height: 31px; background: transparent; border: 0; color: #ffe4b7; cursor: pointer; font-weight: bold; font-size: 14px; }
.result-share[hidden] { display: flex; visibility: hidden; }
.result-share:hover { text-decoration: underline; }
.mission-meters { display: grid; grid-template-columns: 1.2fr 1fr; gap: 15px; padding: 0 13px 14px; }
.mission-meters p { display: flex; justify-content: space-between; gap: 6px; margin-bottom: 4px; color: #efdbb6; font-size: 12px; font-weight: bold; }
.mission-meter { height: 6px; background: #53506b; }
.mission-meter span { display: block; width: 100%; height: 100%; background: #a3dcac; transform: scaleX(0); transform-origin: left; }
#risk-meter { background: #f39c85; }
.share-feedback { font-size: 13px; color: #ffe2b2; padding: 0 13px 8px; }
.share-feedback:empty { display: none; }
@media (max-width: 830px) {
  .arcade-grid { grid-template-columns: 1fr; grid-template-areas: "console" "side"; gap: 19px; }
  .arcade-side { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
  .mission-instructions { margin-top: 8px; gap: 6px; }
}
@media (max-width: 580px) { .arcade-side { grid-template-columns: 1fr; } }
@media (max-width: 460px) {
  .arcade-top { align-items: start; flex-direction: column; gap: 9px; }
  .arcade-caption { font-size: 16px; }
  .console-header { font-size: 12px; padding-inline: 8px; }
  .console-controls { min-height: 79px; padding-inline: 8px; gap: 7px; }
  .game-actions { min-width: 110px; }
  .game-button { padding-inline: 6px; font-size: 14px; }
  .game-hint { font-size: 14px; }
  .game-result { top: auto; bottom: 9px; right: 9px; }
  .result-share { font-size: 12px; }
  .mission-meters { padding-inline: 8px; gap: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .game-result { animation: none; }
  [data-state="escape"] .deposit-stamp { display: none; }
}
