/* Package styles: dice. See /mnt/data/personas/carmack/research/audit-2026-09-26/REPORT.md. */

/* ---------- Hot Dice (/loyalty/hot-dice): a dice cabinet. Header, LCD, felt tray, ROLL, house board. ----------
   Every rule is scoped under .hot-dice-screen so it beats the legacy loyalty.css/house.css dice rules. */
.hot-dice-screen { box-sizing: border-box; color: var(--arcade-cream); display: flex; flex-direction: column; font-family: 'VT323', monospace; gap: 12px; margin: 0 auto; max-width: 26rem; padding: 8px 0 7rem; position: relative; }
.hot-dice-screen::before { background: radial-gradient(90% 28% at 50% 0%, rgba(255,58,84,.14), transparent 70%), radial-gradient(80% 30% at 50% 40%, rgba(83,224,255,.07), transparent 70%); content: ''; inset: -8px 0 0; pointer-events: none; position: absolute; z-index: -1; }

/* Header: < ARCADE, the neon sign, RULES. */
.hot-dice-screen .hot-dice-head { align-items: center; display: grid; gap: 4px; grid-template-columns: 1fr auto 1fr; margin: 0; }
.hot-dice-screen .hot-dice-head .arcade-back-link { color: var(--arcade-cyan); font-family: 'VT323', monospace; font-size: 1.25rem; justify-self: start; min-height: 44px; text-decoration: none; text-shadow: 0 0 6px rgba(83,224,255,.6); white-space: nowrap; }
.hot-dice-screen .hot-dice-head h1.arcade-neon-sign { font-family: 'Yellowtail', cursive; font-size: 2.75rem; font-weight: 400; line-height: 1; margin: 0; padding: 0 .15em .08em 0; text-transform: none; white-space: nowrap; }
.hot-dice-screen .hot-dice-rules { display: flex; inset: auto; justify-content: flex-end; pointer-events: auto; position: static; }
.loyalty-main .hot-dice-screen button.hot-dice-rules-button { background: none; border: 0; border-radius: 0; box-shadow: none; color: var(--arcade-cyan); font-family: 'VT323', monospace; font-size: 1.25rem; font-weight: 400; letter-spacing: .04em; margin: 0; min-height: 44px; min-width: 44px; padding: 0 0 0 .25rem; text-shadow: 0 0 6px rgba(83,224,255,.6); text-transform: uppercase; transform: none; }
.loyalty-main .hot-dice-screen button.hot-dice-rules-button:hover { background: none; color: #d6f7ff; }
.loyalty-main .hot-dice-screen button.hot-dice-rules-button:focus-visible { background: none; outline: 2px solid var(--arcade-cyan); outline-offset: 2px; }

/* LCD strip: YOUR BEST in red LEDs, tonight's turn status on the right. */
.hot-dice-screen .hot-dice-lcd { align-items: center; background: #060202; border-radius: 6px; box-shadow: inset 0 0 0 1.5px rgba(255,74,58,.55), 0 0 14px rgba(255,74,58,.22); display: grid; gap: 10px; grid-template-columns: auto auto 1fr; min-height: 52px; padding: 2px 12px; }
.hot-dice-screen .hot-dice-lcd-label { color: #ff8a98; font-family: 'Silkscreen', monospace; font-size: 11px; letter-spacing: .06em; line-height: 1.15; }
.hot-dice-screen .hot-dice-lcd-value { color: #ff4a3a; font-size: 2.75rem; line-height: 1; min-width: 3ch; text-shadow: 0 0 8px rgba(255,74,58,.95), 0 0 20px rgba(255,74,58,.5); }
.hot-dice-screen .hot-dice-lcd-value.is-flashing { animation: hot-dice-lcd-flash .9s steps(2) 3; }
.hot-dice-screen .hot-dice-lcd-status { color: var(--arcade-amber); display: flex; flex-direction: column; font-size: 1.2rem; line-height: 1; text-align: right; text-shadow: 0 0 6px rgba(255,191,63,.55); text-transform: uppercase; }
.hot-dice-screen .hot-dice-lcd-status small { color: var(--arcade-cyan); font-size: 1.05rem; text-shadow: 0 0 6px rgba(83,224,255,.55); }
.hot-dice-screen .hot-dice-lcd-status small[hidden] { display: none; }
@keyframes hot-dice-lcd-flash { 50% { color: #fff4d6; text-shadow: 0 0 10px #ff4a3a, 0 0 26px #ff4a3a; } }

/* ---------- The 3D table (hot_dice_table.js): a felt tray on the bar, a leather cup, real dice. ---------- */
.dice-table { --charge: 0; display: flex; flex-direction: column; gap: 10px; margin: 0 -12px; }
.dice-stage { aspect-ratio: 390 / 400; background: #05070d; border-bottom: 1px solid rgba(255,191,63,.18); border-top: 1px solid rgba(255,191,63,.18); overflow: hidden; position: relative; touch-action: none; user-select: none; -webkit-user-select: none; }
.dice-canvas { cursor: grab; display: block; height: 100%; width: 100%; }
.dice-table.is-shaking .dice-canvas { cursor: grabbing; }
.dice-stage::after { background: repeating-linear-gradient(0deg, rgba(0,0,0,.14) 0 1px, transparent 1px 3px); content: ''; inset: 0; pointer-events: none; position: absolute; }
/* No WebGL: plain numbered dice instead of the table. */
.dice-flat { display: none; }
.dice-table.is-flat .dice-canvas { display: none; }
.dice-table.is-flat .dice-flat { align-items: center; display: flex; gap: 14px; height: 100%; justify-content: center; }
.dice-flat .dice-face { align-items: center; background: #c8102e; border-radius: 12px; box-shadow: inset 0 -4px 0 rgba(0,0,0,.3); color: #fff; display: flex; font-family: 'VT323', monospace; font-size: 2.4rem; height: 64px; justify-content: center; width: 64px; }
/* HOT ×N and the BANKED stamp over the felt. */
.dice-chain { animation: dice-chain 1s ease-in-out infinite alternate; background: rgba(40,3,10,.8); border: 2px solid #ff4a5e; border-radius: 999px; box-shadow: 0 0 14px rgba(255,48,72,.7); color: #ffe0da; font-family: 'Silkscreen', monospace; font-size: .8rem; left: 12px; letter-spacing: .12em; padding: .3rem .7rem; position: absolute; top: 12px; }
.dice-chain[hidden] { display: none; }
@keyframes dice-chain { to { box-shadow: 0 0 22px rgba(255,48,72,1); } }
.dice-stamp { animation: dice-stamp .5s cubic-bezier(.2,1.6,.4,1) both; background: rgba(6,9,16,.72); border: 3px solid var(--arcade-amber); border-radius: 10px; box-shadow: 0 0 22px rgba(255,191,63,.6); color: #fff4d6; font-family: 'VT323', monospace; font-size: 2.6rem; left: 50%; letter-spacing: .06em; line-height: 1; padding: .35rem 1rem; pointer-events: none; position: absolute; text-shadow: 0 0 10px rgba(255,191,63,.9); top: 76%; transform: translateX(-50%) rotate(-6deg); white-space: nowrap; }
.dice-stamp[hidden] { display: none; }
.dice-stamp.is-best { border-color: #ff4a5e; box-shadow: 0 0 30px rgba(255,48,72,.9); color: #fff; text-shadow: 0 0 12px #ff4a5e; }
@keyframes dice-stamp { from { opacity: 0; transform: translateX(-50%) rotate(-6deg) scale(1.8); } }
/* HUD: TURN in big LEDs, the call on the right. */
.dice-hud { align-items: center; background: #050608; border-radius: 8px; box-shadow: inset 0 0 0 1px rgba(255,191,63,.3); display: grid; gap: 12px; grid-template-columns: auto 1fr; margin: 0 12px; min-height: 64px; padding: 6px 12px; }
.dice-turn { align-items: baseline; display: flex; gap: 8px; }
.dice-turn small { color: #ff8a98; font-family: 'Silkscreen', monospace; font-size: 10px; letter-spacing: .1em; }
.dice-turn b { color: #ff4a3a; font-family: 'VT323', monospace; font-size: 3.2rem; font-weight: 400; line-height: 1; min-width: 2ch; text-shadow: 0 0 10px rgba(255,74,58,.9); }
.dice-call { color: #c9a55a; font-family: 'VT323', monospace; font-size: 1.3rem; line-height: 1.05; margin: 0; text-align: right; text-transform: uppercase; }
.dice-call[data-tone=hot] { color: #fff4d6; text-shadow: 0 0 10px rgba(255,74,94,.9); }
.dice-call[data-tone=gold] { color: var(--arcade-amber); text-shadow: 0 0 10px rgba(255,191,63,.9); }
.dice-call[data-tone=cold] { color: #8b9ab0; }
.dice-call[data-tone=cool] { color: #8ff0ff; }
.dice-call.is-new { animation: dice-call .35s ease-out; }
@keyframes dice-call { from { opacity: 0; transform: translateY(6px); } }
/* ROLL: hold to shake. The fill shows how hard you'll throw. */
.loyalty-main button.dice-roll { align-items: center; border-radius: 36px; display: flex; flex-direction: column; gap: 4px; justify-content: center; margin: 0 12px; min-height: 72px; overflow: hidden; position: relative; touch-action: none; user-select: none; -webkit-user-select: none; }
.loyalty-main button.dice-roll::before { background: linear-gradient(90deg, rgba(255,255,255,.0), rgba(255,255,255,.28)); bottom: 0; content: ''; left: 0; position: absolute; top: 0; transition: width .08s linear; width: calc(var(--charge) * 100%); }
.dice-table:not(.is-shaking) button.dice-roll::before { width: 0; }
.dice-roll b { font-family: 'Silkscreen', monospace; font-size: 22px; letter-spacing: .12em; line-height: 1; position: relative; }
.dice-roll small { font-family: 'VT323', monospace; font-size: 16px; letter-spacing: .04em; opacity: .9; position: relative; }
.dice-table.is-shaking button.dice-roll { background: #ff5a6e; transform: scale(.98); }
.loyalty-main button.dice-roll:disabled { background: #22080d; box-shadow: inset 0 0 0 1px rgba(255,74,94,.4); color: #ff8a98; }
.loyalty-main button.dice-roll:disabled b { font-size: 17px; }

/* House board: the Games lobby's high-score list, one row per player. */
.hot-dice-screen .hot-dice-board { background: none; border: 0; border-radius: 0; box-shadow: none; margin: 8px 0 0; padding: 0; }
.hot-dice-screen .hot-dice-board .arcade-score-heading { align-items: baseline; gap: 8px; }
.hot-dice-screen .hot-dice-board h2 { color: var(--arcade-cyan); font-family: 'Silkscreen', monospace; font-size: 11px; font-weight: 400; letter-spacing: .12em; margin: 0; text-shadow: 0 0 6px rgba(83,224,255,.5); white-space: nowrap; }
.hot-dice-screen .hot-dice-board .arcade-score-heading > .hot-dice-board-prize { color: #8a6a2a; font-family: 'VT323', monospace; font-size: 1.15rem; letter-spacing: .02em; text-align: right; white-space: nowrap; }
.hot-dice-screen .hot-dice-board-prize b { color: var(--arcade-amber); font-weight: 400; text-shadow: 0 0 6px rgba(255,191,63,.5); }
.hot-dice-screen .hot-dice-board-slices { gap: 1.6rem; margin: 2px 0 4px; }
.hot-dice-screen .hot-dice-board-slices .arcade-score-period { align-items: center; cursor: pointer; display: inline-flex; font-size: 1.25rem; min-height: 44px; padding: 0; text-decoration: none; }
.hot-dice-screen .hot-dice-board-slices input:checked + .arcade-score-period { color: var(--arcade-cream) !important; text-decoration: underline; text-decoration-color: var(--arcade-cyan); text-decoration-thickness: 2px; text-underline-offset: .35rem; }
.hot-dice-screen .hot-dice-board-slices input:focus-visible + .arcade-score-period { outline: 2px solid var(--arcade-cyan); outline-offset: 2px; }
.hot-dice-screen .hot-dice-board:has(#hot-dice-board-tonight:checked) .hot-dice-board-slice[data-slice="all"],
.hot-dice-screen .hot-dice-board:has(#hot-dice-board-all:checked) .hot-dice-board-slice[data-slice="tonight"] { display: none; }
.hot-dice-screen ol.hot-dice-board-list { list-style: none; margin: 0; padding: 0; }
.hot-dice-screen .hot-dice-board-list li.arcade-score-row { align-items: center; border: 0; display: grid; font-size: 1.4rem; gap: .5rem; grid-template-columns: 1.4rem 1fr auto; line-height: 1; min-height: 34px; padding: 0 .4rem; }
.hot-dice-screen .hot-dice-board-list li.arcade-score-row > span { color: inherit; font-size: inherit; }
.hot-dice-screen .hot-dice-board-list li.arcade-score-row strong { font-weight: 400; overflow: hidden; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.hot-dice-screen .hot-dice-board-list li.arcade-score-row b { color: var(--arcade-cream); font-weight: 400; }
.hot-dice-screen .hot-dice-board-list li.arcade-score-you { background: var(--arcade-amber); box-shadow: 0 0 12px rgba(255,191,63,.45); color: #11151e; }
.hot-dice-screen .hot-dice-board-list li.arcade-score-you b { color: #11151e; }
.hot-dice-screen .hot-dice-board-list li.is-climb { animation: hot-dice-climb .9s steps(2) 2; }
.hot-dice-screen .hot-dice-board-list li.is-climb strong, .hot-dice-screen .hot-dice-board-list li.is-climb > span { animation: none; }
@keyframes hot-dice-climb { 50% { background: #fff4d6; box-shadow: 0 0 22px rgba(255,191,63,.9); } }
.hot-dice-screen .hot-dice-board .arcade-score-empty { color: var(--arcade-muted); font-size: 1.2rem; margin: .4rem 0; text-transform: uppercase; }
.hot-dice-screen .hot-dice-board .arcade-score-empty[hidden] { display: none; }
.hot-dice-screen .hot-dice-prize { align-items: baseline; border-top: 1px solid rgba(83,224,255,.2); color: var(--arcade-cream); display: flex; flex-wrap: wrap; font-size: 1.2rem; gap: 4px 10px; margin: 10px 0 0; padding: 8px 0 0; text-transform: uppercase; }
.hot-dice-screen .hot-dice-prize[hidden] { display: none; }
.hot-dice-screen .hot-dice-prize > span:first-child { color: var(--arcade-cyan); font-family: 'Silkscreen', monospace; font-size: 11px; letter-spacing: .08em; }
.hot-dice-screen .hot-dice-prize b { color: var(--arcade-amber); font-weight: 400; }

/* Rules: a bottom sheet over the dimmed page. */
.hot-dice-rules-card.hot-dice-rules-card { background: #0a0f1c; border: 0; border-radius: 20px 20px 0 0; border-top: 2px solid var(--arcade-cyan); bottom: 0; box-shadow: 0 -10px 30px rgba(0,0,0,.7), 0 0 20px rgba(83,224,255,.35); box-sizing: border-box; color: var(--arcade-cream); inset: auto 0 0 0; margin: 0 auto; max-height: 88vh; max-width: 26rem; overflow: auto; padding: 0; pointer-events: auto; position: fixed; top: auto; width: 100%; }
.hot-dice-rules-card[open] { animation: hot-dice-sheet .28s cubic-bezier(.2,.9,.3,1); }
.hot-dice-rules-card::backdrop { background: rgba(3,5,10,.72); }
@keyframes hot-dice-sheet { from { transform: translateY(100%); } }
.hot-dice-rules-sheet:focus { outline: none; }
.hot-dice-rules-sheet { background: repeating-linear-gradient(0deg, rgba(0,0,0,.26) 0 1px, transparent 1px 3px); padding: 18px 20px calc(20px + env(safe-area-inset-bottom)); }
.hot-dice-rules-card h2.arcade-neon-sign { color: #ffe6e9; font-family: 'Yellowtail', cursive; font-size: 2.4rem; font-weight: 400; line-height: 1.1; margin: 0 0 10px; text-align: center; }
.hot-dice-rules-list { counter-reset: rule; display: grid; gap: 10px; list-style: none; margin: 0; padding: 0; }
.hot-dice-rules-list li { align-items: baseline; color: var(--arcade-cream); counter-increment: rule; display: grid; font-family: 'VT323', monospace; font-size: 1.35rem; gap: 10px; grid-template-columns: 28px 1fr; line-height: 1.1; }
.hot-dice-rules-list li::before { align-items: center; border: 1.5px solid var(--arcade-cyan); border-radius: 6px; box-shadow: 0 0 6px rgba(83,224,255,.5); color: var(--arcade-cyan); content: counter(rule); display: flex; font-size: 1.2rem; height: 26px; justify-content: center; width: 26px; }
.hot-dice-rules-list b { color: var(--arcade-amber); font-weight: 400; }
.hot-dice-rules-fine { color: var(--arcade-muted); font-family: 'VT323', monospace; font-size: 1.15rem; line-height: 1.15; margin: 14px 0 16px; text-transform: uppercase; }
.hot-dice-rules-card form { margin: 0; }
.loyalty-main .hot-dice-rules-card button.arcade-pill-primary { background: var(--arcade-red); border: 0; box-shadow: 0 0 8px rgba(255,48,72,.8), 0 0 18px rgba(255,48,72,.45); color: #fff; text-shadow: 1px 1px 0 #6a0010; font-family: 'Silkscreen', monospace; font-size: 16px; font-weight: 700; height: 52px; letter-spacing: .12em; margin: 0; min-height: 52px; padding: 0; width: 100%; }

@media (prefers-reduced-motion: reduce) {
  .hot-dice-screen .hot-dice-chain, .hot-dice-screen .hot-dice-faces > .hot-die.is-matching, .hot-dice-screen .hot-dice-tray.is-landed .hot-dice-felt, .hot-dice-screen .hot-dice-lcd-value.is-flashing, .hot-dice-screen .hot-dice-board-list li.is-climb, .hot-dice-rules-card[open] { animation: none; }
  .hot-dice-screen .hot-dice-keep-it.is-lit, .hot-dice-screen .hot-dice-pb-banner.is-lit { animation: none; transform: translate(-50%,-50%); }
}
