/* Imported game presentation; every selector is confined to the playfield root. */
#arcade-game {
  color-scheme: dark;
  --mint: #c6fac6;
  --mint-dim: #84ba9a;
  --bg: #080e0b;
  --panel: #101b15;
  --panel-deep: #070f0b;
  --line: #294136;
  --muted: #8b9d91;
  --text: #eff8ee;
}
#arcade-game * { box-sizing: border-box; }
#arcade-game html { min-width: 300px; background: var(--bg); }
#arcade-game body {
  margin: 0;
  min-height: 100svh;
  color: var(--text);
  background: radial-gradient(ellipse at 30% 36%, rgba(65, 123, 77, .09), transparent 48%),
              radial-gradient(ellipse at 88% 90%, rgba(34, 78, 59, .13), transparent 48%),
              var(--bg);
  font-family: var(--mono);
  -webkit-font-smoothing: antialiased;
}
#arcade-game body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: linear-gradient(rgba(154, 196, 166, .02) 1px, transparent 1px), linear-gradient(90deg, rgba(154, 196, 166, .02) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(180deg, transparent 0%, #000 25%, #000 100%);
}
#arcade-game button, #arcade-game a { -webkit-tap-highlight-color: transparent; }
#arcade-game button { font: inherit; cursor: pointer; }
#arcade-game button:focus-visible, #arcade-game a:focus-visible { outline: 2px solid var(--mint); outline-offset: 4px; }
#arcade-game .site-shell { max-width: 1410px; margin: 0 auto; padding: 0 clamp(18px, 4.5vw, 66px) 28px; }
#arcade-game .masthead { height: 93px; display: flex; align-items: center; gap: 22px; justify-content: space-between; border-bottom: 1px solid var(--line); }
#arcade-game .identity { color: var(--mint); text-decoration: none; display: flex; align-items: center; gap: 15px; }
#arcade-game .identity-word { font-family: var(--mono); font-size: 27px; line-height: 1; font-weight: 850; letter-spacing: -.085em; }
#arcade-game .cursor { color: var(--mint); }
#arcade-game .identity-caption { color: var(--muted); font-size: 9px; letter-spacing: .08em; border-left: 1px solid #3d5144; padding-left: 15px; line-height: 1.6; max-width: 100px; }
#arcade-game .masthead-center { color: #6f8475; letter-spacing: .14em; font-size: 10px; }
#arcade-game .exit-link { color: var(--text); text-decoration: none; font-size: 10px; white-space: nowrap; letter-spacing: .05em; transition: color .15s; }
#arcade-game .exit-link:hover { color: var(--mint); }
#arcade-game .layout { display: grid; grid-template-columns: minmax(240px, 1fr) minmax(430px, 650px); align-items: start; gap: clamp(32px, 7vw, 110px); padding: clamp(35px, 5vw, 78px) 0 0; }
#arcade-game .briefing { padding-top: 11px; }
#arcade-game .eyebrow { color: var(--mint-dim); font-size: 11px; letter-spacing: .045em; line-height: 1.6; display: flex; gap: 12px; align-items: center; }
#arcade-game .eyebrow-square { width: 7px; height: 7px; flex: 0 0 auto; background: var(--mint); box-shadow: 0 0 15px #8fd99977; }
#arcade-game h1 { font-size: clamp(51px, 5.2vw, 82px); letter-spacing: -.09em; font-weight: 800; line-height: .92; margin: 31px 0 35px; }
#arcade-game .briefing-rule { height: 1px; max-width: 310px; background: linear-gradient(to right, var(--mint), transparent); }
#arcade-game .premise { font-size: 11px; letter-spacing: .08em; margin: 32px 0 13px; color: var(--mint); }
#arcade-game .description { font-family: var(--mono); color: #afc4b4; font-size: 13px; line-height: 1.95; max-width: 325px; margin: 0; }
#arcade-game .controls-guide { border-top: 1px solid #233c2d; padding-top: 24px; margin-top: 53px; max-width: 330px; }
#arcade-game .guide-heading { color: var(--mint); font-size: 11px; margin-bottom: 18px; }
#arcade-game .guide-row { display: flex; justify-content: space-between; align-items: center; margin: 0 0 13px; color: var(--muted); font-size: 10px; letter-spacing: .07em; min-height: 30px; }
#arcade-game .key-set { display: inline-flex; align-items: center; gap: 5px; color: #bdcdc2; }
#arcade-game kbd { border: 1px solid #355343; min-width: 29px; height: 29px; padding: 4px; display: inline-flex; justify-content: center; align-items: center; font: 12px var(--mono); background: #101d15; }
#arcade-game kbd.wide { padding: 0 12px; font-size: 10px; }
#arcade-game .or { margin: 0 5px; color: #658573; font-size: 9px; }
#arcade-game .touch-guide { margin: 23px 0 0; line-height: 1.9; color: #789080; font-size: 10px; }
#arcade-game .design-note { font-size: 9px; line-height: 1.9; color: #718c78; letter-spacing: .025em; margin-top: 55px; }
#arcade-game .note-signal { color: var(--mint); margin-right: 7px; }
#arcade-game .terminal { border: 1px solid #395346; background: #08100c; box-shadow: 0 26px 100px rgba(0,0,0,.26), 0 0 60px rgba(78,154,96,.065); min-width: 0; }
#arcade-game .terminal-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 49px; padding: 0 17px; background: #111d16; border-bottom: 1px solid #365240; font-size: 10px; letter-spacing: .035em; }
#arcade-game .runtime-indicator { display: inline-flex; align-items: center; gap: 11px; color: #bbd1bf; white-space: nowrap; }
#arcade-game .live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 14px var(--mint); }
#arcade-game .terminal-actions { display: flex; align-items: center; gap: 12px; }
#arcade-game .text-button { color: #b0c9b5; padding: 7px 2px; border: 0; background: none; font-size: 10px; letter-spacing: .04em; }
#arcade-game .text-button:hover { color: var(--mint); }
#arcade-game .button-divider { color: #4b7056; }
#arcade-game .game-area { position: relative; width: 100%; overflow: hidden; background: #070f0b; touch-action: none; }
#arcade-game #game { display: block; width: 100%; height: auto; aspect-ratio: 8 / 9; image-rendering: pixelated; touch-action: none; outline: none; }
#arcade-game .game-area::after {
  content: "";
  pointer-events: none;
  position: absolute;
  inset: 0;
  z-index: 1;
  background: repeating-linear-gradient(to bottom, transparent 0, transparent 3px, rgba(0,0,0,.085) 4px, transparent 5px);
  opacity: .64;
}
#arcade-game .screen-topline { position: absolute; z-index: 2; inset: 20px 25px auto; font-size: 9px; letter-spacing: .02em; display: flex; justify-content: space-between; color: #6b9777; pointer-events: none; }
#arcade-game .corner { position: absolute; z-index: 2; pointer-events: none; width: 17px; height: 17px; border-color: rgba(152, 224, 157, .55); border-style: solid; }
#arcade-game .corner-tl { left: 10px; top: 10px; border-width: 1px 0 0 1px; }
#arcade-game .corner-tr { right: 10px; top: 10px; border-width: 1px 1px 0 0; }
#arcade-game .corner-bl { left: 10px; bottom: 10px; border-width: 0 0 1px 1px; }
#arcade-game .corner-br { right: 10px; bottom: 10px; border-width: 0 1px 1px 0; }
#arcade-game .screen-overlay { position: absolute; z-index: 4; inset: 0; background: rgba(4, 11, 7, .79); display: grid; place-items: center; padding: 32px 16px; text-align: center; }
#arcade-game .screen-overlay[hidden], #arcade-game .wave-announcement[hidden] { display: none !important; }
#arcade-game .overlay-content { width: 100%; max-width: 490px; }
#arcade-game .overlay-eyebrow { color: var(--mint-dim); font-size: 12px; letter-spacing: .13em; margin-bottom: 31px; }
#arcade-game .overlay-illustration { margin: 0 auto 22px; width: 96px; height: 72px; position: relative; display: none; }
#arcade-game .overlay-content h2 { color: var(--text); letter-spacing: -.067em; font-size: clamp(39px, 5.2vw, 68px); line-height: .98; margin: 0 0 21px; font-weight: 800; }
#arcade-game .overlay-content p { font-family: var(--mono); font-size: clamp(10px, 1.1vw, 13px); color: #b0c8b4; line-height: 1.9; margin: 0 auto 30px; }
#arcade-game .start-button { background: var(--mint); color: #0c2517; border: 1px solid var(--mint); min-height: 55px; padding: 14px 27px; font: 800 12px var(--mono); letter-spacing: .05em; transition: background .12s, box-shadow .12s, transform .12s; }
#arcade-game .start-button:hover { background: #e4ffe0; box-shadow: 0 0 24px #9bdea444; }
#arcade-game .start-button:active { transform: scale(.975); }
#arcade-game .overlay-content .overlay-hint { margin: 24px 0 0; color: #779580; font-size: 9px; letter-spacing: .09em; }
#arcade-game .wave-announcement { position: absolute; z-index: 3; pointer-events: none; display: flex; flex-direction: column; align-items: center; left: 0; right: 0; top: 38%; color: var(--mint); text-align: center; text-shadow: 0 0 20px #c6fac640; }
#arcade-game .wave-announcement span { letter-spacing: .17em; font-size: 10px; }
#arcade-game .wave-announcement strong { letter-spacing: -.05em; font-size: clamp(32px, 5vw, 50px); margin-top: 7px; }
#arcade-game .hud { display: grid; grid-template-columns: 1.1fr 1.25fr .65fr .9fr; background: #14221a; border-top: 1px solid #2e4836; border-bottom: 1px solid #2e4836; }
#arcade-game .hud-cell { min-width: 0; padding: 14px 16px 13px; border-right: 1px solid #2a4332; display: flex; flex-direction: column; gap: 6px; }
#arcade-game .hud-cell:last-child { border-right: 0; }
#arcade-game .hud-label { font-size: 9px; letter-spacing: .06em; white-space: nowrap; color: #95b39c; }
#arcade-game .hud-value { color: var(--mint); font-size: clamp(16px, 1.7vw, 22px); font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; letter-spacing: -.04em; }
#arcade-game #lives-value { letter-spacing: -.08em; }
#arcade-game .touch-controls { display: flex; align-items: center; justify-content: space-between; padding: 14px 17px; gap: 13px; background: #0b160f; }
#arcade-game .direction-controls { display: flex; gap: 9px; }
#arcade-game .touch-button { touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; color: var(--mint); background: #152a1b; border: 1px solid #497655; display: inline-flex; align-items: center; justify-content: center; transition: background .08s, border-color .08s; }
#arcade-game .touch-button:active, #arcade-game .touch-button.is-held { color: #08160c; background: var(--mint); border-color: var(--mint); }
#arcade-game .direction-button { width: 60px; height: 53px; font-size: 29px; line-height: 1; }
#arcade-game .fire-button { min-width: 132px; height: 53px; font-size: 13px; font-weight: 700; letter-spacing: .06em; gap: 14px; }
#arcade-game .fire-button span { font-size: 20px; }
#arcade-game .touch-helper { color: #688b72; font-size: 9px; letter-spacing: .045em; text-align: center; }
#arcade-game .terminal-bottom { display: flex; justify-content: space-between; padding: 0 17px; height: 33px; align-items: center; color: #6b8471; letter-spacing: .02em; font-size: 8px; }
#arcade-game .sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
#arcade-game .noscript { text-align: center; margin: 10px; color: var(--mint); }
@media (max-width: 1080px) {
  #arcade-game .layout { grid-template-columns: minmax(185px, .86fr) minmax(420px, 1.55fr); gap: 31px; }
  #arcade-game h1 { font-size: clamp(46px, 5vw, 65px); }
  #arcade-game .description { font-size: 12px; }
  #arcade-game .hud-cell { padding-left: 10px; padding-right: 10px; }
}
@media (max-width: 760px) {
  #arcade-game .site-shell { padding-left: 14px; padding-right: 14px; }
  #arcade-game .masthead { height: 64px; }
  #arcade-game .identity-word { font-size: 24px; }
  #arcade-game .identity-caption, #arcade-game .masthead-center { display: none; }
  #arcade-game .exit-link { font-size: 10px; }
  #arcade-game .layout { display: flex; flex-direction: column; gap: 15px; padding-top: 21px; }
  #arcade-game .briefing { padding: 0; width: 100%; }
  #arcade-game .eyebrow { font-size: 9px; }
  #arcade-game h1 { font-size: clamp(31px, 9vw, 49px); margin: 10px 0 0; letter-spacing: -.08em; line-height: 1; }
  #arcade-game h1 br { display: none; }
  #arcade-game .briefing-rule, #arcade-game .premise, #arcade-game .description, #arcade-game .controls-guide, #arcade-game .design-note { display: none; }
  #arcade-game .terminal { width: 100%; max-width: 600px; align-self: center; }
  #arcade-game .terminal-top { min-height: 42px; padding: 0 11px; }
  #arcade-game .terminal-actions { gap: 8px; }
  #arcade-game .terminal-top, #arcade-game .text-button { font-size: 9px; }
  #arcade-game .screen-topline { inset: 15px 18px auto; font-size: 7px; }
  #arcade-game .hud-cell { padding: 10px 9px 10px; gap: 5px; }
  #arcade-game .hud-label { font-size: 8px; }
  #arcade-game .hud-value { font-size: clamp(15px, 4.6vw, 23px); }
  #arcade-game .touch-controls { padding: 11px; }
  #arcade-game .direction-button { width: 58px; height: 56px; }
  #arcade-game .fire-button { height: 56px; min-width: 121px; }
  #arcade-game .touch-helper { display: none; }
  #arcade-game .terminal-bottom { font-size: 7px; height: 26px; }
  #arcade-game .overlay-content h2 { font-size: clamp(41px, 10vw, 61px); }
  #arcade-game .overlay-content p { font-size: 11px; }
}
@media (max-width: 375px) {
  #arcade-game .site-shell { padding-left: 9px; padding-right: 9px; }
  #arcade-game .layout { padding-top: 17px; }
  #arcade-game h1 { font-size: 8.7vw; }
  #arcade-game .hud-cell { padding-left: 7px; padding-right: 7px; }
  #arcade-game .hud-label { font-size: 7px; }
  #arcade-game .hud-value { font-size: 15px; }
  #arcade-game .terminal-bottom { font-size: 6px; }
  #arcade-game .direction-button { width: 54px; }
  #arcade-game .fire-button { min-width: 112px; }
}
@media (prefers-reduced-motion: reduce) {
  #arcade-game *, #arcade-game *::before, #arcade-game *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
/* Preserve access to the actual controls on short mobile screens. */
@media (max-width: 440px) and (max-height: 700px) and (orientation: portrait) {
  #arcade-game .site-shell { padding: 0; }
  #arcade-game .masthead, #arcade-game .briefing { display: none; }
  #arcade-game .layout { padding: 0; gap: 0; }
  #arcade-game .terminal { max-width: none; border-left: 0; border-right: 0; }
  #arcade-game .terminal-top { min-height: 34px; }
  #arcade-game .terminal-bottom { height: 22px; }
}
/* Short landscape phones: put the game to the left and HUD/touch inputs to the right. */
