/* Tap Tiles — 4-lane falling-note rhythm game */
#game-stage { display: flex; flex-direction: column; align-items: center; width: 100%; }

.tt-hud { width: 100%; max-width: 360px; display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.tt-hud .lbl { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 1px; }
.tt-val { font-size: 28px; font-weight: 900; line-height: 1.1; font-variant-numeric: tabular-nums; }
.tt-combo { font-size: 18px; color: var(--neon); min-height: 22px; }

.tt-stage-wrap { position: relative; width: 100%; max-width: 360px; aspect-ratio: 360/560; }
.tt-canvas { width: 100%; height: 100%; display: block; border: 1px solid var(--border);
  border-radius: 14px; touch-action: none; background: #060916; }

/* Overlay (start / game over) — hidden via .tt-hidden so it shows by default */
.tt-overlay { position: absolute; inset: 0; z-index: 5; display: flex; align-items: center; justify-content: center;
  background: rgba(5,6,15,.82); border-radius: 14px; backdrop-filter: blur(2px); text-align: center; }
.tt-overlay.tt-hidden { display: none; }
.tt-overlay-inner { padding: 20px; }
.tt-ov-title { font-size: 38px; font-weight: 900; color: var(--neon); text-shadow: 0 0 16px rgba(0,245,212,.5); margin: 0 0 6px; }
.tt-ov-title.lose { color: var(--neon2); text-shadow: 0 0 16px rgba(255,46,151,.5); }
.tt-ov-sub { color: var(--muted); margin: 0 0 18px; font-size: 16px; }
.tt-overlay .gbtn { margin: 4px; }
.tt-hide { display: none !important; }

/* Difficulty selector on the start overlay */
.tt-diff-row { display: inline-flex; background: var(--panel); border: 1px solid var(--border);
  border-radius: 12px; padding: 4px; gap: 4px; margin-bottom: 16px; }
.tt-seg-btn { background: none; border: none; color: var(--muted); font-family: inherit; font-size: 14px;
  font-weight: 600; padding: 8px 13px; border-radius: 9px; cursor: pointer; touch-action: manipulation; transition: background .12s, color .12s; }
.tt-seg-btn.active { background: var(--neon3); color: #fff; box-shadow: 0 0 14px rgba(123,92,255,.5); }

/* Lane pads (below the canvas) — big touch targets */
.tt-pads { width: 100%; max-width: 360px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 10px; }
.tt-pad { height: 66px; border-radius: 12px; border: 1px solid var(--border); background: var(--panel);
  color: var(--text); font-size: 20px; font-weight: 800; cursor: pointer; touch-action: manipulation;
  display: flex; align-items: center; justify-content: center; transition: transform .06s, background .06s, box-shadow .06s; }
.tt-pad .k { font-size: 12px; color: var(--muted); font-weight: 600; margin-top: 2px; }
.tt-pad0 { border-color: rgba(0,245,212,.5); }
.tt-pad1 { border-color: rgba(123,92,255,.5); }
.tt-pad2 { border-color: rgba(255,46,151,.5); }
.tt-pad3 { border-color: rgba(255,210,63,.5); }
.tt-pad.on { transform: translateY(2px); background: #1a2140; box-shadow: 0 0 16px rgba(0,245,212,.4); }
.tt-pad-inner { display: flex; flex-direction: column; align-items: center; line-height: 1.1; }

.tt-toprow { width: 100%; max-width: 360px; display: flex; justify-content: flex-end; margin-bottom: 4px; }
.sound-btn { background: var(--panel); border: 1px solid var(--border); color: var(--text);
  border-radius: 10px; padding: 6px 10px; font-size: 16px; cursor: pointer; touch-action: manipulation; }

.ctrl-hint { color: var(--muted); font-size: 13px; text-align: center; margin: 12px 0 0; }
