/* Shared game look: a dark stage against lighter controls, raised tiles, hit feedback.
   Games build on these classes; js/fx.js drives the effects. */
:root {
  --stage: #0e0d0c;        /* game picture ground: clearly darker than the controls */
  --tile: #423d35;         /* raised tile face */
  --tile-hi: #575146;      /* pressed face, and tiles of the row or board in play */
  --tile-edge: #22201c;    /* bottom edge of a raised tile */
  --sunk: #090807;         /* an opened tile sits in a well */
}
.gframe { background: var(--stage); box-shadow: inset 0 0 0 1px rgba(255,255,255,.035); }
.gctl { box-shadow: inset 0 1px 0 rgba(255,255,255,.05); }

/* Raised tile: a face over a 5 px bottom edge. A press sinks it 3 px; opened, it sits in a well.
   The tile moves with `top`, so a game is free to tween `transform` on it. */
.kt { position: relative; top: 0; border-radius: 10px; background: var(--tile); box-shadow: 0 5px 0 var(--tile-edge); display: grid; place-items: center; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.kt:not(:disabled):not(.kt-open):active { top: 3px; background: var(--tile-hi); box-shadow: 0 2px 0 var(--tile-edge); }
.kt.kt-open { top: 5px; background: var(--sunk); box-shadow: inset 0 0 0 1px rgba(255,255,255,.05); }
.kt-grid { padding-bottom: 5px; } /* room for the edge of the last row */

/* fx.js nodes */
.fx-ring { position: absolute; inset: 0; z-index: 8; border-radius: inherit; pointer-events: none; }
.fx-p { position: absolute; left: 0; top: 0; z-index: 8; border-radius: 2px; pointer-events: none; will-change: transform, opacity; }
.fx-float { position: absolute; z-index: 9; height: 26px; padding: 0 10px; border-radius: 13px; display: inline-flex; align-items: center; gap: 4px; background: var(--win); color: var(--on-accent); font-size: 13px; font-weight: 900; white-space: nowrap; pointer-events: none; box-shadow: 0 8px 18px rgba(0,0,0,.45); transform: translate(-50%, -50%); }
.fx-float.loss { background: var(--loss); color: #fff; }
.fx-float img { width: 15px !important; height: 15px !important; }

/* result card over the frame */
.result { min-width: 164px; padding: 14px 18px; border-radius: 18px; background: rgba(18,17,15,.94); box-shadow: inset 0 0 0 2px var(--win), 0 0 34px rgba(242,193,78,.22), 0 20px 44px rgba(0,0,0,.65); }
.result.lose { box-shadow: inset 0 0 0 2px var(--s4), 0 20px 44px rgba(0,0,0,.65); }
.result .big { font-size: 30px; line-height: 1.05; letter-spacing: -.5px; }
.result .small { font-size: 14px; }

/* history chips sit on the dark stage */
.hchip { background: #312e28; color: var(--fg); }

/* main action: a raised button that sinks on press */
.gctl .play { margin-bottom: 4px; }
.gctl .play.btn-accent:not([disabled]), .gctl .play.btn-win:not([disabled]) { box-shadow: 0 4px 0 #a87b1f, 0 12px 24px rgba(242,193,78,.14); }
.gctl .play.btn-sec:not([disabled]) { box-shadow: 0 4px 0 #22201c; }
.gctl .play[disabled] { box-shadow: 0 4px 0 #22201c; }
.gctl .play:not([disabled]):active { transform: translateY(3px); }
.gctl .play.btn-accent:not([disabled]):active, .gctl .play.btn-win:not([disabled]):active { box-shadow: 0 1px 0 #a87b1f; }
.gctl .play.btn-sec:not([disabled]):active { box-shadow: 0 1px 0 #22201c; }
