/* Chip centres match visible cell centroids; stacks share one position. */
.chip.stack-bottom{z-index:3}
.chip.stack-top{z-index:4;transform:translate(-50%,calc(-50% - 4px)) scaleY(.83)}
/* A covered, highlighted stuck chip remains selectable through the winner. */
.chip:disabled{pointer-events:none}
.header-right{display:flex;align-items:center;gap:6px}
#menu-button{width:36px;height:36px;border:1px solid #ffffff30;border-radius:10px;background:#111b18b3;display:flex;flex-direction:column;gap:4px;align-items:center;justify-content:center}
#menu-button span{display:block;width:16px;height:2px;background:#ffffffd9;border-radius:1px}
.settings-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:15px}.settings-head h2{margin:0;font-size:23px}
#settings-close{border:0;background:transparent;color:white;font-size:30px;width:40px;height:40px}
#volume-tab{background:#ffffff15;color:#ffe193;border:0;border-bottom:2px solid #ffe193;padding:10px 16px;font-size:16px}
#volume-panel{padding-top:25px}#volume-panel label{font-size:16px;display:flex;align-items:center;justify-content:space-between;gap:16px}#volume-value{color:#d9bd77}
#master-volume{display:block;width:100%;margin:18px 0 28px;accent-color:#eec86f;height:28px}#dice-audio{width:23px;height:23px;accent-color:#eec86f}
#duel-screen{position:fixed;inset:0;z-index:7;display:grid;place-items:center;padding:20px;background:#07100ddd;backdrop-filter:blur(4px)}
.duel-totals{display:flex;justify-content:space-around;gap:30px;margin:20px 0;color:#9bffb7;font-size:13px;font-weight:800}.duel-totals>div:last-child{color:#a8caff}.duel-totals strong{display:block;font-size:45px;margin:7px}
#duel-dice{display:flex;justify-content:center;gap:15px;margin:24px 0}#duel-dice.blue .battle-die{background:linear-gradient(135deg,#447fe8,#2049b3);box-shadow:0 5px 0 #122d72,0 9px 14px #0005}
#duel-note{min-height:45px;font-size:16px;line-height:1.4}#duel-roll{width:100%;padding:16px;border:1px solid #ffffff66;border-radius:12px;background:#087a40;color:white;font-size:23px;font-weight:800}#duel-roll.blue{background:#2459c8}#duel-roll:disabled{opacity:.5}
/* Alpha 0.8: fixed player view, visible silhouettes and pulsing destinations. */
.chip .silhouette{position:absolute;left:50%;top:50%;width:74%;height:83%;object-fit:contain;transform:translate(-50%,-50%);pointer-events:none;backface-visibility:hidden}
.chip.blue .silhouette{transform:translate(-50%,-50%) rotate(180deg)}
.blue-turn .chip.blue .silhouette{transform:translate(-50%,-50%)}
.blue-turn .chip.green .silhouette{transform:translate(-50%,-50%) rotate(180deg)}
.chip.defeated .silhouette{visibility:hidden}
.move-outline{animation:movePulse 1.2s ease-in-out infinite}
.chip.battle-target{animation:battlePulse 1.2s ease-in-out infinite}
@keyframes movePulse{0%,100%{fill:#ffc03050;stroke:#ffd84f;filter:drop-shadow(0 0 3px #ffd34788)}50%{fill:#ffdf7799;stroke:#fff6bd;filter:drop-shadow(0 0 9px #fff08c)}}
@keyframes battlePulse{0%,100%{filter:brightness(1.15) drop-shadow(0 0 7px #ffc030aa)}50%{filter:brightness(1.5) drop-shadow(0 0 14px #fff08c)}}
#lobby,#stats-screen{position:fixed;inset:0;z-index:15;display:grid;place-items:center;padding:24px;background:#071510b8;backdrop-filter:blur(7px);overflow:auto}
.lobby-card,.stats-card{width:min(100%,420px);padding:30px;border:1px solid #ffe19b66;border-radius:24px;background:linear-gradient(145deg,#1a392d,#111f1b);box-shadow:0 24px 70px #0008}
.lobby-card h1{font-size:32px;margin:10px 0 22px}.lobby-card p{font-size:16px;line-height:1.5;color:#c6d8ce}.lobby-card .eyebrow,.stats-card .eyebrow{font-size:12px;color:#e8cc89}
#lobby-note:empty{display:none}#lobby-note{color:#ffe29b}#invite-link{width:100%;font:inherit;font-size:14px;border:1px solid #ffffff44;border-radius:8px;background:#ffffff10;color:white;padding:12px}#invite-title{font-size:24px}
#stats-screen{z-index:16}.stats-card h1{font-size:36px;margin:8px 0 20px}.elapsed{display:flex;align-items:center;justify-content:space-between;font-size:16px;padding:18px 0;border-top:1px solid #ffffff24}.elapsed strong{font-size:26px;color:#ffe4a2}
.stats-card table{width:100%;border-collapse:collapse;font-size:16px}.stats-card td,.stats-card th{padding:14px 6px;border-bottom:1px solid #ffffff15;text-align:center}.stats-card th:first-child{text-align:left;font-weight:500}.stats-card td{font-variant-numeric:tabular-nums;font-weight:bold}.stats-card .stats-note{color:#aec2b6;font-size:14px;line-height:1.5}.green-text{color:#97ffbb}.blue-text{color:#9ccaff}
#battle-firework{position:fixed;inset:0;z-index:14;pointer-events:none;color:#66ffaa}#battle-firework.blue{color:#75b6ff}
.rocket{position:absolute;left:50%;top:40%;width:4px;height:22px;border-radius:50%;background:currentColor;box-shadow:0 0 12px currentColor;animation:rocketUp .5s ease-out both}
.battle-burst{position:absolute;left:50%;top:40%;width:1px;height:1px}.battle-burst span{position:absolute;left:50%;top:50%;color:inherit;font-size:25px;text-shadow:0 0 12px currentColor;animation:starBurst 1s calc(.48s + var(--star-delay)) both}
@keyframes rocketUp{0%{opacity:0;transform:translateY(55vh) scaleY(2)}20%{opacity:1}90%{opacity:1}100%{opacity:0;transform:translateY(0) scaleY(.2)}}
@media(prefers-reduced-motion:reduce){.move-outline,.chip.battle-target{animation:none}.rocket,.battle-burst span{display:none}}
@media(max-width:380px){.lobby-card,.stats-card{padding:22px}#turn-badge{padding:8px;font-size:12px}#version{display:none}}
