/* Тайник: the round total on top, a 6 × 5 board of raised tiles, a legend of the risk table under it. */
.g-stash .g-stage { padding: 40px 12px 12px; }

/* header: picks before the round, the running total during it */
.stash-head { height: 50px; margin-bottom: 8px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.stash-hl { min-width: 0; overflow: hidden; display: flex; align-items: baseline; gap: 10px; white-space: nowrap; }
.stash-hl b { display: inline-block; font-size: min(40px, 10.6vw); font-weight: 900; line-height: 1; letter-spacing: -1px; color: var(--fg); transform-origin: 0 70%; }
.stash-hl span { display: inline-flex; align-items: center; gap: 4px; font-size: 15px; font-weight: 800; color: var(--fg2); }
.stash-hl span img { width: 15px; height: 15px; }
.stash-head:not(.stash-run):not(.stash-won):not(.stash-lost):not(.stash-push) .stash-hl b { font-size: 30px; letter-spacing: -.5px; }
.stash-head.stash-run .stash-hl span { color: var(--fg); }
.stash-head.stash-won .stash-hl b, .stash-head.stash-won .stash-hl span { color: var(--win); }
.stash-head.stash-gold .stash-hl b, .stash-head.stash-gold .stash-hl span { color: #ffc337; }
.stash-head.stash-lost .stash-hl b { color: var(--loss); }
.stash-head.stash-push .stash-hl span { color: var(--fg); }
.stash-reset { position: relative; top: 0; flex: none; height: 40px; padding: 0 16px; border-radius: 20px; background: var(--tile); box-shadow: 0 4px 0 var(--tile-edge); color: var(--fg); font-size: 14px; font-weight: 800; -webkit-tap-highlight-color: transparent; }
.stash-reset:not(:disabled):active { top: 3px; background: var(--tile-hi); box-shadow: 0 1px 0 var(--tile-edge); }
.stash-reset:disabled { opacity: .4; }
.stash-reset.stash-gone { visibility: hidden; }

/* the board */
.stash-board { position: relative; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 7px 6px; }
.stash-t { height: 48px; min-width: 0; padding: 0; background: var(--tile-hi); overflow: visible; }
.stash-t .stash-v { font-size: 17px; font-weight: 900; line-height: 1; letter-spacing: -.4px; white-space: nowrap; opacity: 0; }
.stash-t.stash-on { background: var(--pick); box-shadow: 0 5px 0 #4f41c0, 0 0 14px rgba(139,123,255,.28); }
.stash-t.stash-on:not(.kt-open):active { background: #7a6af0; box-shadow: 0 2px 0 #4f41c0; }
.stash-mk { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.stash-mk i { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.95); color: #3b2fb0; font-size: 12.5px; font-weight: 900; font-style: normal; box-shadow: 0 2px 0 rgba(40,30,130,.55); }
.stash-t.kt-open .stash-mk i { position: absolute; right: -4px; top: -4px; width: 14px; height: 14px; font-size: 8.5px; z-index: 1; box-shadow: none; background: var(--pick); color: #fff; }

/* opened tiles: a sunken well with the value, coloured by size */
.stash-t.kt-open { background: var(--sunk); }
.stash-t.kt-open.stash-on { box-shadow: inset 0 0 0 2px var(--pick), 0 0 12px rgba(139,123,255,.3); }
.stash-k-zero .stash-v { color: #4b4f6b; }
.stash-k-low .stash-v { color: #c8cad7; }
.stash-k-one .stash-v { color: var(--fg); }
.stash-k-lime .stash-v { color: var(--win); }
.stash-k-gold .stash-v { color: #ffc337; }
.stash-t.kt-open.stash-on.stash-k-lime { background: #1a2108; box-shadow: inset 0 0 0 2px var(--win), 0 0 16px rgba(212,255,58,.4); }
.stash-t.kt-open.stash-on.stash-k-gold { background: #271c06; box-shadow: inset 0 0 0 2px #ffc337, 0 0 22px rgba(255,195,55,.55); }
.stash-t.kt-open.stash-on.stash-k-gold .stash-mk i { background: #ffc337; color: #2b1a00; }
.stash-t.kt-open.stash-on.stash-k-lime .stash-mk i { background: var(--win); color: #0b0c10; }
.stash-t.stash-dim { opacity: .42; }
.stash-t.stash-dim .stash-v { font-size: 14px; }
.stash-board .fx-p { z-index: 6; }

/* legend: the table as raised chips; the values just hit lit */
.stash-leg { margin-top: 10px; padding-bottom: 4px; display: grid; grid-template-columns: repeat(var(--k, 5), minmax(0, 1fr)); gap: 5px; }
.stash-li { height: 44px; min-width: 0; border-radius: 10px; background: var(--tile); box-shadow: 0 4px 0 var(--tile-edge), inset 0 1px 0 rgba(255,255,255,.06); display: grid; place-content: center; justify-items: center; gap: 3px; color: var(--fg); }
.stash-li b { font-size: 14px; font-weight: 900; line-height: 1; white-space: nowrap; }
.stash-li small { font-size: 11px; font-weight: 700; line-height: 1; color: var(--fg2); white-space: nowrap; }
.stash-li.stash-k-lime { box-shadow: 0 4px 0 #8fb012, inset 0 1px 0 rgba(255,255,255,.06); }
.stash-li.stash-k-gold { box-shadow: 0 4px 0 #b9861a, inset 0 1px 0 rgba(255,255,255,.06); }
.stash-li.stash-k-zero b { color: #8a8ea6; }
.stash-li.on { background: #e6e8f2; color: #0b0c10; box-shadow: 0 4px 0 #9da3b4; }
.stash-li.on.stash-k-lime { background: var(--win); box-shadow: 0 4px 0 #8fb012, 0 0 16px rgba(212,255,58,.3); }
.stash-li.on.stash-k-gold { background: #ffc337; box-shadow: 0 4px 0 #b9861a, 0 0 18px rgba(255,195,55,.4); }
.stash-li.on.stash-k-zero { background: #3a3d4f; color: var(--fg); box-shadow: 0 4px 0 #1d1f2d; }
.stash-li.on b { color: inherit; }
.stash-li.on small { color: inherit; opacity: .72; }

/* risk: raised segmented chips */
.stash-seg { padding: 3px; gap: 3px; }
.stash-seg button { height: 40px; padding: 0; font-size: 13.5px; min-width: 0; }
.stash-seg button.on { background: var(--tile-hi); box-shadow: 0 3px 0 var(--tile-edge); color: #fff; }
.stash-seg button:disabled { opacity: .55; }

/* lobby tile: a 3 × 3 corner of the board, three marked, a gold ×50 and a lime ×5 open */
.stash-tile { overflow: hidden; }
.stash-tglow { position: absolute; left: 4cqw; right: 4cqw; top: 6cqw; height: 86cqw; border-radius: 50%; background: radial-gradient(closest-side, rgba(255,195,55,.42), rgba(255,195,55,.1) 60%, rgba(139,123,255,0)); }
.stash-tgrid { position: absolute; left: 13cqw; right: 13cqw; top: 16cqw; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4cqw; transform: rotate(-7deg); }
.stash-tc { aspect-ratio: 1; border-radius: 4.5cqw; background: #3d4160; box-shadow: 0 2.4cqw 0 #181a26; display: grid; place-items: center; }
.stash-tc-p { background: #8b7bff; box-shadow: 0 2.4cqw 0 #4f41c0, 0 0 5cqw rgba(139,123,255,.35); }
.stash-tc-g { position: relative; z-index: 1; background: #271c06; box-shadow: inset 0 0 0 1cqw #ffc337, 0 0 9cqw rgba(255,195,55,.85); transform: scale(1.16); }
.stash-tc-l { background: #1a2108; box-shadow: inset 0 0 0 1cqw #d4ff3a, 0 0 6cqw rgba(212,255,58,.5); }
.stash-tc b { font-family: Figtree, Inter, sans-serif; font-size: 9.5cqw; font-weight: 900; letter-spacing: -.4cqw; color: #ffc337; }
.stash-tc-l b { color: #d4ff3a; font-size: 10cqw; }
