/* games/games.css — shared shell for the canvas mini-games on /games/. */

:root {
  --bg: #161a18;
  --panel: #1f2623;
  --panel-2: #252e2a;
  --line: rgba(255, 255, 255, 0.08);
  --ink: #ede7dc;
  --ink-dim: #9aa39d;
  --accent: #b96b28;
  --accent-soft: #f5c98a;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  -webkit-text-size-adjust: 100%;
}

.game-shell {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.game-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}

.game-back {
  color: var(--ink-dim);
  text-decoration: none;
  font-size: 14px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
}
.game-back:hover { color: var(--ink); background: rgba(255, 255, 255, 0.05); }

.game-title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.game-spacer { flex: 1 1 auto; }

.game-status {
  display: flex;
  gap: 8px;
  align-items: center;
  font-variant-numeric: tabular-nums;
}

.game-chip {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 13px;
  color: var(--ink);
}
.game-chip b { color: var(--accent-soft); font-weight: 600; }

.game-btn {
  border: 1px solid var(--line);
  background: var(--accent);
  color: #fff8ef;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 999px;
  cursor: pointer;
}
.game-btn:hover { filter: brightness(1.08); }
.game-btn.ghost { background: var(--panel-2); color: var(--ink); }

.game-stage {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  overflow: hidden;
}

.game-stage canvas {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  touch-action: none; /* we handle swipes/taps ourselves */
  max-width: 100%;
}

.game-hint {
  margin: 0;
  padding: 10px 16px 16px;
  text-align: center;
  color: var(--ink-dim);
  font-size: 13px;
  line-height: 1.5;
}
.game-hint kbd {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 5px;
  padding: 1px 6px;
  font-size: 12px;
  color: var(--ink);
}

.game-banner {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
  z-index: 10;
}
.game-banner.show { display: flex; }
.game-banner .card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 26px 30px;
  text-align: center;
  max-width: 320px;
}
.game-banner .card h2 { margin: 0 0 6px; font-size: 24px; }
.game-banner .card p { margin: 0 0 18px; color: var(--ink-dim); }
