#poker-scene{width:min(1040px,calc(100% - 24px));max-height:calc(100svh - 24px);overflow:auto;background:#f4e8cd;color:#27493c;border:1px solid #baa371;border-radius:20px}#poker-scene::backdrop{background:#142e2bdf;backdrop-filter:blur(5px)}.poker-nav{position:sticky;top:0;z-index:30;display:flex;justify-content:space-between;align-items:center;gap:8px;padding:7px 14px;background:#f4e8cd;border-bottom:1px solid #c8b78c;font:13px system-ui}.poker-nav button{background:none;border:0;padding:8px;color:#315941;min-height:42px;cursor:pointer}.poker-content{text-align:center;padding:10px 20px}.poker-content h1{font:600 clamp(21px,2.8vw,28px)/1.1 Georgia;margin:5px 0 10px}.poker-stage{position:relative;width:min(100%,calc(max(180px,100svh - 290px)*1.5));aspect-ratio:3/2;margin:auto;overflow:hidden;border-radius:14px;background:#b99468;isolation:isolate}.poker-stage [hidden]{display:none}.poker-room{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}.poker-agy{position:absolute;left:82%;top:116%;width:39%;height:88%;transform:translate(-50%,-100%);z-index:3}.poker-agy img{width:100%;height:100%;object-fit:contain}.poker-table-lip{position:absolute;left:5%;top:65%;width:89%;height:7%;border-radius:0 0 50% 50%;background:linear-gradient(#765037,#452f23);border-bottom:3px solid #b28a57;z-index:7}.poker-felt{display:none;position:absolute;left:5%;top:42%;width:89%;height:26%;border-radius:50%;background:radial-gradient(ellipse at 40% 35%,#4c8262,#315b43);border:6px solid #9a754a;z-index:4;box-sizing:border-box}.poker-cards{position:absolute;left:35%;top:60%;display:flex;gap:clamp(3px,.7vw,8px);transform:translate(-50%,-50%);z-index:12}.poker-card{position:relative;width:clamp(43px,6vw,64px);height:clamp(63px,8.8vw,94px);padding:0;border:0;background:none;color:#293c31;cursor:pointer;touch-action:manipulation;transition:transform .15s}.poker-card[aria-pressed=false]{transform:translateY(9px);filter:saturate(.65)}.poker-card-face,.poker-card-back{display:block;position:absolute;inset:0;border:2px solid #a58b60;border-radius:6px;background:#fff5d9;box-shadow:0 3px 3px #23392755}.poker-card-face.red{color:#b2463b}.poker-card-corner{position:absolute;left:5px;top:3px;font:700 clamp(15px,2.1vw,22px)/1 Georgia}.poker-card-corner small{display:block;font-size:.8em}.poker-card-suit{position:absolute;left:50%;top:54%;transform:translate(-50%,-50%);font:30px Georgia}.poker-card-bottom{position:absolute;right:4px;bottom:4px;font:700 16px Georgia;transform:rotate(180deg)}.poker-card-back{background:repeating-linear-gradient(45deg,#7c5343 0 4px,#966c51 4px 8px);border:3px solid #e5ca95;color:#f4d497;font:35px/1.5 Georgia}.poker-card-label{position:absolute;bottom:-22px;left:50%;transform:translateX(-50%);font:700 10px system-ui;background:#f7e6bd;border-radius:5px;padding:3px 5px;white-space:nowrap}.poker-opponent{position:absolute;left:53%;top:49%;display:flex;gap:3px;transform:translate(-50%,-50%);z-index:9}.poker-opponent .poker-card{width:clamp(28px,4vw,43px);height:clamp(41px,6vw,62px);cursor:default}.poker-opponent .poker-card-suit{font-size:20px}.poker-opponent .poker-card-corner{font-size:13px;left:3px;top:3px}.poker-opponent .poker-card-bottom{font-size:12px}.poker-opponent .poker-card-back{font-size:23px}.poker-chips{position:absolute;left:70%;top:54%;width:14%;height:14%;transform:translate(-50%,-50%);z-index:11}.poker-chips svg{width:100%;height:100%}.poker-speech{position:absolute;left:64%;top:5%;max-width:32%;padding:7px 9px;border:2px solid #b3966d;border-radius:14px;background:#fff1ce;font:600 clamp(13px,1.8vw,20px)/1.2 Georgia;z-index:15;margin:0}.poker-result{position:absolute;left:4%;top:6%;max-width:52%;margin:0;padding:6px 9px;background:#fff1cedf;border:1px solid #bda270;border-radius:10px;font:700 clamp(12px,1.7vw,18px)/1.2 system-ui;z-index:13}.poker-name{position:absolute;z-index:8;background:#fff0c5dd;border:1px solid #ac8d5d;border-radius:5px;padding:2px 5px;font:600 clamp(9px,1.3vw,13px) system-ui}.poker-guide{height:44px;margin:9px 0 4px;font:13px/1.3 system-ui}.poker-controls{min-height:44px;display:flex;gap:10px;justify-content:center}.poker-controls button{min-height:44px;padding:10px 16px;border:1px solid #a5946d;border-radius:10px;background:#315941;color:#fff5df;font:600 14px system-ui;cursor:pointer}.poker-stop svg{width:54%;height:54%;filter:drop-shadow(0 3px 3px #353d3655)}.poker-content.is-loading .poker-stage,.poker-content.is-loading .poker-guide,.poker-content.is-loading .poker-controls{visibility:hidden;pointer-events:none}@media(max-width:600px){.poker-content{padding:8px 12px}.poker-nav{padding:5px 7px}.poker-guide{font-size:12px}.poker-card{width:43px;height:63px}.poker-opponent .poker-card{width:28px;height:41px}.poker-result{max-width:50%;padding:5px;font-size:12px}.poker-card-suit{font-size:25px}.poker-speech{left:65%;top:3%;padding:5px;font-size:12px}.poker-cards{top:61%}.poker-name{padding:1px 3px}}

.poker-pants{position:absolute;left:79%;top:73%;width:14%;height:19%;z-index:6;pointer-events:none}.poker-pants svg{width:100%;height:100%}.poker-opponent-label{position:absolute;left:53%;top:42%;transform:translateX(-50%);background:#fff0c5dd;border-radius:5px;padding:2px 4px;font:600 clamp(9px,1.3vw,13px) system-ui;z-index:10}

.poker-table-lip{inset:0;width:100%;height:100%;background:none;border:0;border-radius:0;pointer-events:none}.poker-table-lip svg{width:100%;height:100%}

.poker-opponent{left:49%}.poker-opponent-label{left:49%;top:40.5%}.poker-result{top:83%}.poker-speech{left:40%;top:1%;max-width:56%}@media(max-width:600px){.poker-opponent-label{left:3%;top:47%;transform:none}.poker-speech{left:40%;top:1%;max-width:56%}}

.poker-opponent-label{top:38%}.poker-result{top:77%}.poker-stage[data-phase=choose] .poker-result{top:86%}@media(max-width:600px){.poker-opponent-label{top:47%}.poker-result{max-width:58%}}

/* Headroom keeps every adult face distinct and each name directly above its owner. */
.poker-stage{aspect-ratio:5/4;width:min(100%,calc(max(180px,100svh - 290px)*1.25));background:linear-gradient(110deg,#654832,#80583b 55%,#654731)}
.poker-room{top:16.667%;height:83.333%;object-fit:contain}
.poker-table-lip{top:16.667%;height:83.333%;bottom:auto}
.poker-agy{left:78.5%;top:119.5%;height:73.333%;width:39%}
.poker-name{transform:translateX(-50%);z-index:14;white-space:nowrap}
.poker-name:after{content:'';position:absolute;left:50%;top:100%;height:6px;border-left:1px solid #dfcda9}
.poker-cards{top:66.667%}.poker-opponent{top:57.5%}.poker-opponent-label{top:47%}
.poker-chips{top:61.667%;height:11.667%}.poker-result{top:80.833%}
.poker-stage[data-phase=choose] .poker-result{top:88.333%}
.poker-pants{left:78.5%;top:82%;height:16%}
.poker-speech{left:40%;top:2%;max-width:56%}
@media(max-width:600px){.poker-cards{top:67.5%}.poker-opponent-label{top:55.833%}.poker-name{padding:1px 2px;font-size:9px}.poker-speech{top:2%}}
.poker-opponent{left:47%}.poker-opponent-label{left:47%}@media(max-width:600px){.poker-opponent-label{left:3%}}

/* Agy occupies the near-side chair: the table rim must pass behind his torso,
   never slice through his chest. Cards and labels remain above the actor. */
.poker-agy{z-index:8}

/* Keep the existing desktop containing block; on phones, give the illustration
   its own unchanged 5:4 coordinates and put both card hands in a separate tray. */
.poker-illustration,.poker-hand-tray,.poker-opponent-hand{display:contents}
@media(max-width:600px){
  .poker-stage{aspect-ratio:auto;min-width:min(100%,252px)}
  .poker-illustration{display:block;position:relative;aspect-ratio:5/4;overflow:hidden;isolation:isolate}
  .poker-hand-tray{display:flex;flex-direction:column;align-items:center;gap:12px;padding:12px 8px 36px;border-top:1px solid #baa371;background:#ead9b4}
  /* Keep the raking chips on the felt; top overrides the desktop animation’s inline drift. */
  .poker-chips{margin-left:-10%;top:59%!important}
  .poker-opponent-hand{display:flex;align-items:center;justify-content:center;gap:8px}
  .poker-opponent-label{position:static;transform:none;font-size:11px;white-space:nowrap}
  .poker-opponent{position:static;transform:none}
  .poker-result,.poker-stage[data-phase=choose] .poker-result{position:static;max-width:100%;margin:0;overflow-wrap:anywhere}
  .poker-cards{position:relative;left:auto;top:auto;gap:4px;transform:none}
  .poker-cards .poker-card{width:44px;height:64px;flex:0 0 44px}
  .poker-guide{height:auto;min-height:44px}
  .poker-nav button{min-width:44px;min-height:44px}
}
