/* COIN PUSH!! — スタイル(ダーク筐体・縦持ち第一) */
:root {
  --bg: #171a22;
  --panel: #232836;
  --line: #3a4152;
  --text: #f2f4f8;
  --dim: #98a0b4;
  --gold: #ffd23f;
  --gold-d: #c98a12;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; height: 100%; background: var(--bg); color: var(--text); font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Hiragino Sans", "Noto Sans JP", sans-serif; overscroll-behavior: none; }
body { position: fixed; inset: 0; overflow: hidden; }
.app { display: flex; flex-direction: column; height: 100%; height: 100dvh; max-width: min(100%, calc(100dvh * 0.62)); margin: 0 auto; padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }

.hud { display: flex; align-items: center; gap: 8px; padding: 6px 8px; background: var(--panel); border-bottom: 1px solid var(--line); flex: 0 0 auto; }
.hud-item { display: flex; align-items: baseline; gap: 4px; white-space: nowrap; }
.hud-label { font-size: 11px; color: var(--dim); }
.hud-num { font-size: 22px; font-weight: 900; color: var(--gold); font-variant-numeric: tabular-nums; }
.hud-num.small { font-size: 15px; color: var(--text); }
.hud-timer { font-size: 12px; color: var(--dim); font-variant-numeric: tabular-nums; margin-left: auto; }

.btn { font: inherit; font-weight: 700; color: var(--text); background: #2f3547; border: 1px solid var(--line); border-radius: 10px; padding: 8px 14px; cursor: pointer; user-select: none; font-size: 16px; }
.btn:active { transform: translateY(1px); filter: brightness(1.15); }
.btn:disabled { opacity: 0.45; cursor: default; }
.btn-icon { padding: 6px 9px; }
.btn-get { background: linear-gradient(#ffe37a, var(--gold)); color: #3a2a00; border-color: var(--gold-d); font-weight: 900; padding: 6px 12px; }
.btn-get.pulse { animation: glow 1.2s ease-in-out infinite; }
@keyframes glow { 0%, 100% { box-shadow: 0 0 0 0 rgba(255,210,63,0.0); } 50% { box-shadow: 0 0 0 6px rgba(255,210,63,0.35); } }
.btn-primary { background: linear-gradient(#ffe37a, var(--gold)); color: #3a2a00; border-color: var(--gold-d); }
.btn-wide { width: 100%; margin-top: 8px; padding: 12px; }

.board-wrap { flex: 1 1 auto; position: relative; min-height: 0; }
.board { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; display: block; }
.hint { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); background: rgba(0,0,0,0.6); border: 1px solid rgba(255,210,63,0.5); border-radius: 12px; padding: 12px 18px; text-align: center; font-weight: 700; pointer-events: none; animation: pulse 1.6s ease-in-out infinite; }
.hint small { color: var(--dim); font-weight: 400; }
@keyframes pulse { 0%, 100% { opacity: 0.85; } 50% { opacity: 1; } }

.overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.6); display: flex; align-items: center; justify-content: center; z-index: 10; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 18px; width: min(92vw, 360px); text-align: center; }
.panel h2 { margin: 0 0 8px; font-size: 20px; }
.panel-stock { font-size: 15px; margin: 4px 0; }
.panel-stock b { color: var(--gold); font-size: 22px; }
.panel-text { font-size: 13px; color: var(--dim); margin: 6px 0; }
.panel-text a { color: var(--dim); }
.dim { opacity: 0.8; }
.hidden { display: none !important; }

.btn-col { position: relative; padding: 6px 8px; }
.col-badge { font-size: 10px; color: var(--gold); margin-left: 3px; font-weight: 900; }
.panel-col { max-height: 92vh; overflow: auto; }
.col-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 10px 0; }
.col-cell { background: #1c2030; border: 1px solid var(--line); border-radius: 10px; padding: 6px 2px; text-align: center; }
.col-cell img { width: 100%; max-width: 64px; aspect-ratio: 1; display: block; margin: 0 auto; }
.col-cell.r-uncommon { border-color: #3cc9a3; }
.col-cell.r-rare { border-color: var(--gold); box-shadow: 0 0 0 1px rgba(255,210,63,0.4) inset; }
.col-cell.col-missing { opacity: 0.6; }
.col-name { font-size: 10px; font-weight: 700; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.col-count { font-size: 11px; color: var(--gold); font-weight: 900; }
.col-missing .col-count { color: var(--dim); font-weight: 400; }
