html { line-height: 1.5; -webkit-text-size-adjust: 100%; }
[hidden] { display: none !important; }
button { font: inherit; display: inline-flex; align-items: center; justify-content: center; background: transparent; color: inherit; line-height: 1; padding: 0; }
button:disabled { opacity: .45; cursor: default; }
svg { display: inline-block; vertical-align: middle; flex-shrink: 0; pointer-events: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
:root { --background: #e7efe8; --foreground: #253f36; --primary: #ffd056; --primary-foreground: #253f36; --muted: #d8e5db; --muted-foreground: #546a5f; --border: #29473b; --ring: #1b7655; --card: #f8faf2; --radius: .6rem; }
* { box-sizing: border-box; }
body { margin: 0; color: var(--foreground); background-color: var(--background); background-image: radial-gradient(#becfc0 0.7px, transparent 0.7px); background-size: 9px 9px; font-family: Arial, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif; }
button, canvas { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:focus-visible, canvas:focus-visible { outline: 3px solid #277b61; outline-offset: 4px; }
.arcade { width: min(1060px, calc(100% - 80px)); margin: 0 auto; padding: 34px 0 25px; }
.topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 29px; }
.wordmark { display: flex; gap: 11px; align-items: center; font: 900 19px/1.2 'Courier New', monospace; letter-spacing: -.6px; }
.brand-icon { display: grid; place-items: center; width: 42px; height: 42px; border: 2px solid var(--border); background: var(--primary); border-radius: 11px; box-shadow: 2px 2px 0 var(--border); }
.edition { display: block; font: 700 12px/1.8 'Courier New', monospace; letter-spacing: 1.1px; }
.arcade-tag { display: flex; gap: 8px; align-items: center; border: 1px solid #a6b9a9; border-radius: 20px; padding: 8px 12px; font: 700 12px 'Courier New', monospace; letter-spacing: 1px; }
.arcade-tag > span, .status-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #52886b; }
.game-shell { border: 2px solid var(--border); border-radius: 14px; overflow: hidden; background: var(--card); box-shadow: 0 7px 0 var(--border), 0 14px 0 #293f3610; }
.game-toolbar { min-height: 68px; display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 10px 23px; border-bottom: 2px solid var(--border); }
.game-label { display: flex; align-items: center; gap: 11px; font-size: 15px; font-weight: 800; }
.secret-button { border: 0; border-radius: 4px; min-height: 44px; font-weight: inherit; white-space: nowrap; user-select: none; touch-action: manipulation; }
.secret-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 8px 16px; background: #f8edc9; border-bottom: 2px solid var(--border); font-size: 12px; }
.secret-controls > span { font-weight: 700; margin-right: 4px; }
.secret-toggle { min-height: 44px; padding: 0 12px; border: 1px solid #b5ad85; border-radius: 6px; font-weight: 700; background: #fffaf0; }
.secret-toggle[aria-pressed="true"] { background: #ffd056; border-color: var(--border); box-shadow: inset 0 -2px 0 #c69d3d; }
.game-number { font: 700 12px 'Courier New', monospace; background: #e6eadd; border: 1px solid #c1cebb; padding: 4px 5px; border-radius: 4px; }
.pixel-label { font: 12px 'Courier New', monospace; letter-spacing: .7px; color: #6c7c6c; margin-left: 7px; }
.toolbar-actions { display: flex; align-items: center; gap: 9px; }
.best-score { display: flex; gap: 8px; align-items: center; font-size: 14px; color: #526550; white-space: nowrap; }
.best-score svg { color: #8a671a; }.best-score strong { color: var(--foreground); font: 900 20px 'Courier New', monospace; margin-left: 3px; }
.toolbar-divider { width: 1px; height: 24px; background: #d6ded0; margin: 0 5px 0 9px; }
.icon-button { min-width: 44px; min-height: 44px; color: var(--foreground); border: 1px solid transparent; border-radius: 7px; }.icon-button svg { width: 19px; height: 19px; }.icon-button:hover { background: #e7eddf; border-color: #c4d0bf; }
.game-stage { position: relative; height: min(55vw, 552px); min-height: 410px; background: #a3dcd9; isolation: isolate; }
canvas { display: block; width: 100%; height: 100%; touch-action: none; }
.start-screen { position: absolute; inset: 0; pointer-events: none; text-align: center; }
.game-title { position: absolute; top: 10.2%; left: 0; right: 0; }
.title-overline { font-size: 14px; font-weight: 700; letter-spacing: 2px; color: #35625a; }
h1 { font: 1000 clamp(46px, 6.2vw, 75px)/.95 'Courier New', monospace; letter-spacing: -5px; margin: 16px 0 0; color: #fff7cf; -webkit-text-stroke: 2px #29493d; text-shadow: 0 5px 0 #29493d; }h1 > span { display: block; color: #ffd056; }.title-dot { color: #f69050; }
.start-action { position: absolute; top: 59.2%; left: 0; right: 0; }
.play-button { height: 53px; min-width: 198px; gap: 18px; border: 2px solid var(--border); border-radius: 8px; box-shadow: 0 4px 0 var(--border); background: #ffd056; color: #253f36; font-size: 16px; font-weight: 800; padding: 0 24px; pointer-events: auto; transition: transform .12s, box-shadow .12s, background .12s; }.play-button svg { width: 19px; height: 19px; }.play-button:hover { background: #ffdc79; transform: translateY(-2px); box-shadow: 0 6px 0 var(--border); }.play-button:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--border); }
.start-action p { margin: 20px 0 0; font-size: 14px; color: #356256; }
kbd { display: inline-block; padding: 3px 7px; border: 1px solid #739082; border-bottom-width: 2px; border-radius: 4px; font: 700 12px 'Courier New', monospace; letter-spacing: .5px; background: #f3f7e699; }.start-action kbd { margin-left: 3px; }
.live-hud { position: absolute; top: 24px; left: 0; right: 0; display: flex; flex-direction: column; align-items: center; gap: 10px; pointer-events: none; }
.live-score { font: 900 58px/1 'Courier New', monospace; text-align: center; color: #fffdf0; -webkit-text-stroke: 2px #29473b; text-shadow: 0 4px 0 #29473b; }
.live-lives { display: flex; gap: 7px; }
.live-lives svg { width: 24px; height: 23px; fill: #ed6e64; stroke: #713e39; stroke-width: 1.2; stroke-linejoin: round; filter: drop-shadow(0 2px 0 #fff5d8); }
.infinite-lives { height: 23px; font: 900 34px/.7 'Courier New', monospace; color: #ffe176; -webkit-text-stroke: 1px #71552e; }
.scene-label { position: absolute; bottom: 17px; left: 0; right: 0; text-align: center; font: 700 12px 'Courier New', monospace; letter-spacing: 2px; color: #746f4e; pointer-events: none; }
.phase-paused .scene-label, .phase-over .scene-label { display: none; }
.game-bottom { min-height: 47px; display: flex; justify-content: space-between; align-items: center; padding: 10px 23px; font-size: 12px; border-top: 2px solid var(--border); color: #64725e; }.game-bottom > span:first-child { display: flex; align-items: center; gap: 7px; }.game-bottom strong { color: #42623d; font-family: 'Courier New', monospace; }
.status-dot { width: 6px; height: 6px; background: #a1af94; }.status-dot.active { background: #438961; }
.instructions { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 29px 3px 25px; }.instruction-main { display: flex; align-items: center; gap: 13px; }.instruction-icon { width: 41px; height: 41px; border: 1px solid #acbeb0; border-radius: 11px; background: #e0eadf; display: grid; place-items: center; }.instruction-main strong { font-size: 16px; display: block; margin-bottom: 5px; }.instruction-detail { font-size: 14px; color: #657565; }
.control-legend, .control-legend > span { display: flex; align-items: center; gap: 9px; white-space: nowrap; font-size: 14px; color: #536c5b; }.control-legend { gap: 12px; }.control-legend .or { color: #798676; font-size: 12px; }
footer { border-top: 1px solid #c7d3c4; padding: 19px 3px 0; display: flex; justify-content: space-between; gap: 16px; font-size: 12px; color: #70806f; }footer > span:last-child { display: flex; align-items: center; gap: 7px; }
.overlay { position: absolute; inset: 0; background: #233f3730; backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; padding: 20px; pointer-events: none; }
.result-card { width: 360px; max-width: 100%; padding: 30px 25px 25px; text-align: center; background: #f8faf0; border: 2px solid var(--border); border-radius: 13px; box-shadow: 0 6px 0 #29473b; }
.card-eyebrow { font: 700 12px 'Courier New', monospace; letter-spacing: 1px; color: #738161; }.result-card h2 { font-size: 25px; letter-spacing: -1px; margin: 12px 0 18px; font-weight: 850; }.result-card p { font-size: 14px; color: #66735d; margin: 0 0 26px; }.result-card .play-button { width: 100%; }
.result-scores { display: grid; grid-template-columns: 1fr 1fr; padding: 16px 0; margin: 0 0 22px; background: #e9efdf; border-radius: 7px; }.result-scores > div + div { border-left: 1px solid #c5d0bb; }.result-scores span { display: flex; align-items: center; justify-content: center; gap: 5px; font-size: 14px; color: #637254; }.result-scores strong { display: block; font: 900 42px 'Courier New', monospace; padding-top: 5px; }.small-hint { display: block; font-size: 12px; color: #6f7b64; margin-top: 20px; }
@media (min-width: 1400px) { .arcade { padding-top: 46px; }.topbar { margin-bottom: 35px; } }
@media (max-width: 850px) { .arcade { width: calc(100% - 40px); padding-top: 23px; }.pixel-label { display: none; }.instructions { gap: 10px; }.control-legend { gap: 8px; }.control-legend svg { display: none; } }
@media (max-width: 600px) {
  .arcade { width: calc(100% - 28px); padding: 20px 0; }.topbar { margin-bottom: 23px; }.wordmark { font-size: 17px; }.edition { font-size: 12px; letter-spacing: 0; }.brand-icon { width: 37px; height: 37px; }.arcade-tag { font-size: 12px; padding: 7px 9px; }
  .game-toolbar { min-height: 60px; padding: 8px 12px; gap: 5px; }.game-label { font-size: 14px; gap: 6px; }.game-number { display: none; }.best-score { gap: 5px; }.best-score > span { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }.best-score strong { font-size: 20px; }.toolbar-actions { gap: 3px; }.toolbar-divider { margin: 0 4px; }
  .game-stage { height: min(132vw, 560px); min-height: 420px; }.title-overline { letter-spacing: 1.2px; font-size: 14px; }h1 { font-size: clamp(3rem, 15vw, 3.8125rem); margin-top: 15px; }.game-title { top: 10%; }
  .game-bottom { padding: 10px 12px; font-size: 12px; }.instructions { padding: 25px 2px 22px; }.instruction-icon { display: none; }.instruction-detail { font-size: 14px; }.instruction-main strong { font-size: 16px; }.control-legend { display: none; }footer { font-size: 12px; padding-top: 16px; gap: 8px; }.result-card { padding: 26px 22px; }
}
@media (max-width: 380px) { .arcade-tag { display: none; }footer { flex-direction: column; } }
@media (max-height: 500px) and (orientation: landscape) {
  .arcade { width: calc(100% - 24px); padding: 8px 0 15px; }
  .topbar, .instructions, footer { display: none; }
  .game-toolbar { min-height: 50px; padding: 2px 14px; }
  .game-bottom { min-height: 30px; padding: 5px 14px; }
  .game-stage { height: calc(100svh - 111px); min-height: 175px; }
  .game-title { top: 17%; left: 3%; right: auto; width: 40%; }
  .title-overline { font-size: 12px; letter-spacing: 0; }
  h1 { font-size: clamp(2.4rem, 7vh, 3rem); letter-spacing: -3px; margin-top: 10px; }
  .start-action { top: 32%; left: 57%; right: 3%; }
  .start-action p { margin-top: 12px; font-size: 12px; }
  .play-button { min-width: 160px; height: 46px; }
  .scene-label { font-size: 12px; bottom: 7px; }
  .result-card { width: 400px; padding: 12px 20px; }
  .result-card h2 { font-size: 21px; margin: 5px 0 8px; }
  .result-card p { margin-bottom: 14px; }
  .card-eyebrow { font-size: 12px; }
  .result-scores { padding: 5px 0; margin-bottom: 10px; }
  .result-scores strong { font-size: 28px; }
  .small-hint { margin-top: 10px; }
}
@media (max-height: 360px) and (orientation: landscape) {
  .result-card { padding: 10px 16px; }
  .result-card .card-eyebrow, .result-card .small-hint { display: none; }
  .result-card h2 { margin: 0 0 6px; }
  .result-scores { margin-bottom: 8px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
