/* MINI 게임천국 공통 스타일 */
:root {
  --bg: #0d1611;
  --panel: #15241b;
  --panel2: #1c3024;
  --line: #2a4232;
  --text: #e8f3ec;
  --muted: #8fa898;
  --primary: #03c75a;
  --primary-d: #006e2e;
  --accent: #79fd92;
  --danger: #ff6b6b;
  --gold: #ffd166;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: Inter, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  min-height: 100vh;
  -webkit-tap-highlight-color: transparent;
}
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px;
  background: rgba(13, 22, 17, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.back { color: var(--muted); text-decoration: none; font-weight: 600; font-size: 14px; white-space: nowrap; }
.back:hover { color: var(--accent); }
.title { font-weight: 800; font-size: 16px; text-align: center; }
.title b { color: var(--primary); margin-right: 4px; }
.tag { font-size: 12px; color: var(--muted); background: var(--panel2); padding: 4px 10px; border-radius: 999px; white-space: nowrap; }

.wrap {
  max-width: 1000px; margin: 0 auto; padding: 20px 16px 40px;
  display: flex; flex-wrap: wrap; gap: 20px; justify-content: center; align-items: flex-start;
}
.col { display: flex; flex-direction: column; gap: 12px; align-items: center; max-width: 100%; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.side { display: flex; flex-direction: column; gap: 12px; width: 220px; max-width: 100%; }
.label { font-size: 12px; font-weight: 800; color: var(--muted); letter-spacing: .08em; margin-bottom: 6px; }
.stat { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 14px; color: var(--muted); padding: 3px 0; }
.stat strong { color: var(--text); font-size: 18px; }
.stat strong.hi { color: var(--gold); }

.btn {
  background: var(--primary); color: #002109; border: 0; border-radius: 8px;
  padding: 10px 16px; font: 800 14px/1 inherit; font-family: inherit; cursor: pointer;
  transition: background .15s, transform .1s;
}
.btn:hover { background: var(--accent); }
.btn:active { transform: scale(.97); }
.btn.ghost { background: var(--panel2); color: var(--text); border: 1px solid var(--line); }
.btn.ghost:hover { background: var(--line); }
.btn.on { background: var(--primary); color: #002109; border-color: var(--primary); }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }

.help { font-size: 13px; color: var(--muted); line-height: 1.9; }
.help kbd {
  background: var(--panel2); border: 1px solid var(--line); border-radius: 4px;
  padding: 1px 6px; font-family: inherit; color: var(--text); font-size: 12px;
}

canvas.screen {
  display: block; background: #050a07; border: 1px solid var(--line); border-radius: 10px;
  max-width: 100%; touch-action: none; user-select: none;
}
.stage { position: relative; max-width: 100%; }
.overlay {
  position: absolute; inset: 0; z-index: 3;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  background: rgba(5, 10, 7, .8); border-radius: 10px; text-align: center; padding: 16px;
}
.overlay.hidden { display: none; }
.overlay h2 { margin: 0; font-size: 26px; color: var(--accent); }
.overlay p { margin: 0; color: var(--muted); font-size: 14px; white-space: pre-line; }

/* 모바일 터치 패드 */
.pad { display: none; gap: 8px; width: 100%; max-width: 360px; }
.pad button {
  background: var(--panel2); color: var(--text); border: 1px solid var(--line); border-radius: 10px;
  font-size: 20px; padding: 14px 0; touch-action: none; user-select: none; font-family: inherit;
}
.pad button:active { background: var(--primary); color: #002109; }
@media (pointer: coarse) { .pad { display: grid; } }
.touch .pad { display: grid; }
