/* Keep the approved desktop/mobile layout; only add opening and end-of-game controls. */
body .hand-actions.end-actions{display:flex;flex-direction:column;gap:10px;justify-content:center;align-self:center}
body .end-actions .button{width:100%;min-height:44px;font-size:16px}
.next-ready-note{font-size:11px;line-height:1.5;color:#b5c1a9;text-align:center;overflow-wrap:anywhere}
.opening-overlay{position:fixed;inset:0;z-index:175;background:rgba(4,18,14,.82);backdrop-filter:blur(7px);display:flex;align-items:center;justify-content:center;padding:14px}
.opening-card{width:min(620px,100%);max-height:calc(100dvh - 28px);overflow:auto;border:1px solid #b9a26b;border-radius:20px;background:linear-gradient(155deg,#213e31,#0e271f);box-shadow:0 25px 100px #0008;padding:25px 30px;color:#e9e3c6;text-align:center}
.opening-card header small{color:#cdb67e;font-size:12px;letter-spacing:.12em}.opening-card h2{font-size:27px;margin:8px 0}.opening-card header p{font-size:12px;line-height:1.6;color:#a9b99d;margin:0}
.dice-thrower{display:flex;gap:8px;justify-content:center;align-items:center;margin:15px auto 0;min-height:32px}.dice-thrower .avatar{width:32px;height:32px}.dice-thrower b{max-width:230px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.dice-thrower>span{font-size:11px;color:#c2bc92}
.dice-tray{position:relative;display:flex;align-items:center;justify-content:center;gap:32px;height:158px;perspective:650px;margin:0 auto;overflow:hidden;background:radial-gradient(ellipse at 50% 85%,#adc99614,transparent 65%)}
.dice-token{position:relative;width:77px;z-index:2;transform-origin:50% 60%;will-change:transform}.dice-token .die{display:block;width:100%;height:auto;filter:drop-shadow(0 10px 8px #0005)}
.dice-shadow{position:absolute;bottom:24px;left:calc(50% - 102px);width:95px;height:14px;border-radius:50%;background:#0005;filter:blur(5px)}.dice-shadow.shadow-b{left:calc(50% + 10px)}
.is-rolling .token-0{animation:diceTossA 1600ms both cubic-bezier(.15,.4,.25,1);animation-delay:var(--elapsed,0ms)}
.is-rolling .token-1{animation:diceTossB 1600ms both cubic-bezier(.15,.4,.25,1);animation-delay:var(--elapsed,0ms)}
.dice-result{min-height:53px;display:flex;flex-direction:column;gap:7px;justify-content:center}.dice-result strong{font-size:21px;color:#f1d48a}.dice-result small{font-size:13px;color:#bbcfad;line-height:1.5}
.dice-seat-ring{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px;margin:18px 0}.dice-seat-ring>div{border:1px solid #96a77730;border-radius:10px;padding:9px 5px;display:flex;flex-direction:column;align-items:center;gap:5px;transition:background .12s,border-color .12s,transform .12s;min-width:0}.dice-seat-ring .avatar{width:34px;height:34px}.dice-seat-ring span{width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:13px}.dice-seat-ring i{font-size:10px;min-height:13px;font-style:normal;color:#c2b789}.dice-seat-ring .counted-seat{background:#cbba5530;border-color:#d7b975;transform:translateY(-3px)}.dice-seat-ring .first-seat{box-shadow:0 0 18px #efc75e44;background:#bdb35035}
.opening-card footer{display:flex;flex-direction:column;align-items:center;gap:9px}.opening-card footer .button{min-height:46px;min-width:230px;font-size:16px}.opening-card footer small,.opening-card footer p{color:#94ab93;font-size:11px;margin:0;line-height:1.5}
@keyframes diceTossA{0%{transform:translate(-70px,-76px) rotateX(300deg) rotateY(-480deg) rotateZ(-220deg) scale(.6);opacity:.3}40%{transform:translate(15px,22px) rotateX(-90deg) rotateY(95deg) rotateZ(80deg) scale(1.05);opacity:1}62%{transform:translate(-10px,-35px) rotateX(50deg) rotateY(-60deg) rotateZ(-45deg)}80%{transform:translate(5px,8px) rotateX(-15deg) rotateZ(15deg)}91%{transform:translate(-2px,-8px) rotateZ(-5deg)}100%{transform:translate(0,4px) rotate(0)}}
@keyframes diceTossB{0%{transform:translate(76px,-94px) rotateX(-340deg) rotateY(560deg) rotateZ(280deg) scale(.6);opacity:.3}44%{transform:translate(-18px,20px) rotateX(75deg) rotateY(-90deg) rotateZ(-80deg) scale(1.05);opacity:1}66%{transform:translate(12px,-26px) rotateX(-40deg) rotateY(50deg) rotateZ(35deg)}83%{transform:translate(-5px,9px) rotateX(10deg) rotateZ(-13deg)}94%{transform:translate(2px,-6px) rotateZ(4deg)}100%{transform:translate(0,4px) rotate(0)}}
@media(max-width:760px) and (orientation:portrait){body .hand-actions.end-actions{display:grid;grid-template-columns:1fr 1.3fr;width:100%;gap:5px}body .end-actions .button{min-height:38px;font-size:14px}.next-ready-note{grid-column:1/-1;font-size:10px}.opening-card{padding:18px 13px}.opening-card h2{font-size:22px}.dice-tray{height:135px}.dice-token{width:65px}.dice-seat-ring{gap:4px;margin:12px 0}.dice-seat-ring span{font-size:11px}.dice-seat-ring .avatar{width:29px;height:29px}.opening-card footer .button{min-width:190px}}
@media(max-height:600px) and (orientation:landscape){.opening-card{width:610px;padding:10px 20px;display:grid;grid-template-columns:1fr 1fr;gap:4px 15px}.opening-card header{grid-column:1/-1}.opening-card h2{font-size:20px;margin:3px 0}.opening-card header p{font-size:10px}.dice-thrower{margin:0;grid-column:1;grid-row:2}.dice-tray{height:115px;grid-column:1;grid-row:3/5;width:100%}.dice-token{width:57px}.dice-result{grid-column:2;grid-row:2/4}.dice-result strong{font-size:18px}.dice-result small{font-size:11px}.dice-seat-ring{grid-column:2;grid-row:4;margin:0}.dice-seat-ring>div{padding:5px 2px}.dice-seat-ring .avatar{width:25px;height:25px}.dice-seat-ring span{font-size:10px}.opening-card footer{grid-column:1/-1;gap:3px}.opening-card footer .button{min-height:35px;padding:5px 15px}body .hand-actions.end-actions{gap:4px}body .end-actions .button{font-size:11px;min-height:27px;padding:4px}.next-ready-note{font-size:9px}}
@media(prefers-reduced-motion:reduce){.is-rolling .dice-token{animation:none;transform:translateY(4px)}.dice-seat-ring>div{transition:none}}
html[data-motion=reduced] .is-rolling .dice-token{animation:none;transform:translateY(4px)}
