:root {
  --lcd-bg: #c7d6a0;
  --lcd-bg-deep: #b7c78d;
  --lcd-ink: #2e3d20;
  --lcd-ink-soft: #435a2e;
  --lcd-dim: rgba(46, 61, 32, 0.16);
  --accent: #9c3b26;
  --bezel: #322f2c;
  --bezel-hi: #4d4945;
  --bezel-lo: #201e1c;
  --text-muted: #aaa49c;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  width: 100%;
  background: var(--bezel-lo);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  font-family: ui-monospace, "SFMono-Regular", "Courier New", monospace;
}

button { font: inherit; }

.device {
  min-height: 100vh;
  padding: 24px 20px 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, var(--bezel-hi), var(--bezel) 40%, var(--bezel-lo) 100%);
}

.game-shell { width: min(100%, 430px); }

.brand {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 0 6px 12px;
}

.brand-kicker, .brand-mark { display: block; }
.brand-kicker { color: var(--text-muted); font-size: 9px; letter-spacing: 2px; }
.brand-mark { color: #d4d0c9; font-size: 21px; font-weight: 800; letter-spacing: 6px; text-shadow: 0 1px 0 rgba(0,0,0,.7); }
.brand-status { width: 8px; height: 8px; margin-bottom: 5px; border-radius: 50%; background: #5ecb6a; box-shadow: 0 0 7px #5ecb6a, inset 0 0 2px rgba(0,0,0,.4); }

.screen-frame {
  padding: 14px 14px 10px;
  border: 1px solid rgba(255,255,255,.05);
  border-radius: 8px;
  background: linear-gradient(145deg, #16150f, #0a0906);
  box-shadow: inset 0 3px 10px rgba(0,0,0,.8), inset 0 0 0 2px #050403, 0 14px 32px rgba(0,0,0,.2);
}

.screen { position: relative; overflow: hidden; border-radius: 2px; background: linear-gradient(165deg, var(--lcd-bg), var(--lcd-bg-deep)); box-shadow: inset 0 0 18px rgba(0,0,0,.25); touch-action: none; }
.screen::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(to bottom, rgba(0,0,0,.05) 0, rgba(0,0,0,.05) 1px, transparent 1px, transparent 3px); mix-blend-mode: multiply; }
canvas { display: block; width: 100%; height: auto; image-rendering: pixelated; }

.hud { display: flex; justify-content: space-between; padding: 10px 3px 1px; color: var(--lcd-ink); }
.hud-stat { display: flex; flex-direction: column; gap: 2px; }
.hud-stat-right { align-items: flex-end; }
.hud-label { color: var(--lcd-ink-soft); font-size: 10px; letter-spacing: 2px; opacity: .8; }
.hud-value { font-size: 20px; letter-spacing: 1px; line-height: 1; }

.overlay { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 13px; padding: 20px; color: var(--lcd-ink); text-align: center; background: rgba(199,214,160,.95); opacity: 1; transition: opacity .2s ease; }
.overlay.hidden { opacity: 0; pointer-events: none; }
.overlay-eyebrow { font-size: 9px; letter-spacing: 2px; color: var(--lcd-ink-soft); opacity: .8; }
.overlay h1 { margin: 0; font-size: 25px; letter-spacing: 5px; font-weight: 800; }
.overlay p { max-width: 240px; margin: 0; color: var(--lcd-ink-soft); font-size: 12px; letter-spacing: 1.5px; line-height: 1.7; }
.btn { padding: 11px 25px; border: 0; border-radius: 3px; background: var(--lcd-ink); color: var(--lcd-bg); cursor: pointer; font-size: 12px; font-weight: 700; letter-spacing: 2px; box-shadow: 0 3px 0 rgba(0,0,0,.25); }
.btn:hover, .btn:focus-visible { background: var(--lcd-ink-soft); }
.btn:active { transform: translateY(2px); box-shadow: none; }

.step-dots { display: flex; gap: 6px; margin-top: 2px; }
.step-dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(46,61,32,.25); }
.step-dot.active { background: var(--lcd-ink); }

.controls { display: grid; grid-template-columns: repeat(3, 54px); grid-template-rows: repeat(3, 46px); gap: 7px; justify-content: center; margin: 19px auto 0; }
.dpad { display: flex; align-items: center; justify-content: center; border: 0; border-radius: 10px; background: linear-gradient(160deg, #4d4945, #262421); color: #b8b4ae; cursor: pointer; font-size: 15px; box-shadow: 0 3px 0 rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.08); }
.dpad:hover, .dpad:focus-visible { color: #e0dcd5; background: linear-gradient(160deg, #5d5853, #302d2a); }
.dpad:active { transform: translateY(2px); box-shadow: inset 0 1px 4px rgba(0,0,0,.5); }
.up { grid-column: 2; grid-row: 1; } .left { grid-column: 1; grid-row: 2; } .select { grid-column: 2; grid-row: 2; border-radius: 50%; font-size: 10px; letter-spacing: 1px; } .right { grid-column: 3; grid-row: 2; } .down { grid-column: 2; grid-row: 3; }

.ad-slot { min-height: 46px; margin: 20px 0 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border: 1px dashed rgba(170,164,156,.25); border-radius: 4px; color: rgba(170,164,156,.62); }
.ad-slot span { font-size: 9px; letter-spacing: 2px; }
.ad-slot small { font-size: 10px; letter-spacing: .5px; }
.help-text { color: rgba(170,164,156,.62); font-size: 9px; letter-spacing: 1px; text-align: center; }
.help-text span { padding: 0 4px; }

@media (max-height: 700px) and (min-width: 600px) { .device { padding-block: 14px; } .controls { margin-top: 10px; } .ad-slot { margin-block: 10px 6px; min-height: 34px; } }
@media (max-width: 420px) { .device { padding: 18px 12px 14px; } .screen-frame { padding-inline: 10px; } .controls { margin-top: 15px; } .ad-slot { margin-top: 15px; } }
@media (max-width: 350px) { .brand-mark { font-size: 18px; } .controls { grid-template-columns: repeat(3, 48px); grid-template-rows: repeat(3, 42px); } }
