/* Edge-to-edge room shell, with gesture-enabled browser fullscreen on mobile. */
html:has(.room-immersive){overscroll-behavior:none}
html:fullscreen{width:100%;height:100%;background:#142d4b}
#app .room-immersive .side-panel{padding-bottom:env(safe-area-inset-bottom,0px);box-sizing:border-box}
body:has(.room-immersive){overflow:hidden}
#app:has(.room-immersive)>.bga-header{display:none}
#app .room-container.room-immersive{position:fixed;inset:0;width:100dvw;height:100dvh;min-width:0;min-height:0;margin:0;z-index:200;background:#142d4b;overflow:hidden}
#app .room-immersive.is-rotated{inset:auto;left:50%;top:50%;width:100dvh;height:100dvw;transform:translate(-50%,-50%) rotate(90deg)}
#app .room-immersive .room-main{display:flex;flex:1;width:100%;height:100%;min-height:0;overflow:hidden;flex-direction:row}
#app .room-immersive .game-slot{display:contents}
#app .room-container.room-immersive[data-chat] .game-slot.is-playing{
  display:grid;grid-template:auto / auto;place-content:center;position:relative;flex:1 1 0;
  min-width:0;min-height:0;height:100%;container-type:size;overflow:clip;isolation:isolate;
}
#app .room-container.room-immersive[data-chat='bottom'] .game-slot.is-playing{
  flex:0 0 var(--room-frame-area-height,50dvh);
  width:100%;height:var(--room-frame-area-height,50dvh);
}
#app .room-container.room-immersive[data-chat] .game-slot.is-playing>.game-area{
  grid-area:1 / 1;
  box-sizing:border-box;width:min(100cqw,160cqh);height:auto;aspect-ratio:8 / 5;
  min-width:0;min-height:0;max-width:none;max-height:none;border:0;
}
#app .room-immersive :is(.room-main,.game-slot)>.game-area{position:relative;display:block;flex:1;min-width:0;min-height:0;padding:0!important;margin:0;overflow:hidden;background:#142d4b!important;background-image:none!important}
#app .room-immersive .game-stage{width:100%;height:100%;max-width:none;position:relative}
/* The 8:5 surface defines placement and scale. The slot defines the visible play space. */
#app .room-container.room-immersive[data-chat] .game-slot.is-playing>.game-area,
#app .room-immersive[data-unified-game-controls=true] :is(.game-stage,.room-round-review,.shared-table-scene.has-game){
  overflow:visible;
}
#app .room-immersive:not([data-unified-game-controls=true]) .game-stage:not(:has(.mj-table)){overflow:auto}
#app .room-immersive .shared-table-scene,#app .room-immersive .scene-play{height:100%;min-height:0;aspect-ratio:auto;padding:0}
#app .room-immersive.mahjong-room .shared-table-scene:has(.mj-table),#app .room-immersive.mahjong-room .scene-play:has(.mj-table){height:100%;min-height:0}
#app .room-immersive .mj-table{position:absolute;left:var(--room-board-left,0px);top:50%;transform:translateY(-50%);margin:0;gap:0;max-width:none;flex:none}
#app .room-immersive .mj-arena{padding:0;max-width:none}
#app .room-immersive .mj-table-surface{aspect-ratio:1672/941}
#app .room-immersive .mj-head,#app .room-immersive .mj-hint,#app .room-immersive .mj-table-tools,#app .room-immersive .mj-table-chat{display:none}
#app .room-immersive[data-view='portrait'] .mj-table-chat{right:var(--room-crop-right,0px)}
#app .room-immersive .chat-toggle:not([hidden]){display:inline-flex}
#app .room-immersive .chat-toggle[hidden]{display:none!important}
#app .room-immersive .mj-table[data-claim-waiting='true']>.mj-hint{display:block;position:absolute;bottom:17%;left:25%;right:25%;z-index:12;margin:0;padding:5px;border-radius:6px;background:#10273ee8;color:#e6edf6;text-align:center;font-size:clamp(9px,1cqw,16px)}
#app .room-immersive .mj-result:empty{display:none}
.room-game-dock{position:absolute;right:8px;top:8px;z-index:40;display:flex;gap:6px;align-items:flex-start}
.room-game-dock>.room-rotate,.room-game-dock>.chat-toggle,.room-game-menu>summary{display:grid;place-items:center;width:36px;height:36px;min-height:0;padding:0;border:1px solid #778ca9;border-radius:7px;background:#112438e8;color:#ebeff5;cursor:pointer;list-style:none;font:24px/1 system-ui}
.room-game-menu>summary::-webkit-details-marker{display:none}
.room-game-dock>.room-game-help{display:grid;place-items:center;width:36px;height:36px;min-height:0;padding:0;border:1px solid #778ca9;border-radius:7px;background:#112438e8;color:#ebeff5;font:700 21px/1 system-ui;cursor:pointer}
.game-help{z-index:1200}
.game-help .game-help-dialog{box-sizing:border-box;width:min(640px,100%);max-width:100%;max-height:calc(100dvh - 32px);padding:22px;overflow:auto}
.game-help-heading{position:sticky;top:0;z-index:1;display:flex;align-items:center;justify-content:space-between;gap:16px;background:var(--bga-panel)}
.game-help-heading h2{margin:0;font-size:20px}
.game-help-close{flex:none}
.game-help-body{line-height:1.7;overflow-wrap:anywhere}
.game-help-rule{margin-top:18px}
.game-help-rule h3{margin:0 0 6px;font-size:16px}
.game-help-rule p{margin:6px 0}
.game-help-example{padding:8px 12px;border-radius:7px;background:var(--surface-2);color:var(--text-2);font-size:13px}
.game-help-note{padding-top:14px;border-top:1px solid var(--border);font-size:13px;color:var(--text-2)}
@media(max-width:700px){.room-game-dock>.room-game-help{width:28px;height:28px;font-size:18px}.game-help .game-help-dialog{padding:16px;max-height:calc(100dvh - 24px)}.game-help-heading h2{font-size:18px}}
/* A second toolbar row preserves the north portrait's existing clearance. */
.mahjong-room[data-layout='split'] .room-game-dock>.room-game-help{position:absolute;right:42px;top:44px}
@media(max-width:700px){.mahjong-room[data-layout='split'] .room-game-dock>.room-game-help{right:32px;top:34px}}
.room-game-dock>.room-rotate>span{display:none}
.room-menu-content{position:absolute;right:0;top:44px;display:flex;flex-direction:column;gap:10px;width:min(340px,calc(100vw - 24px));max-height:calc(100% - 60px);max-height:calc(100dvh - 68px);padding:14px;overflow:auto;border:1px solid #6c87a5;border-radius:10px;background:#12263df7;box-shadow:0 12px 35px #0007;color:#edf3ff}
#app .room-immersive[data-view='portrait'] .room-menu-content{max-height:calc(var(--room-board-height,50dvh) - 52px)}
#app .room-immersive .room-header{display:flex;flex-direction:column;align-items:stretch;gap:12px;padding:0;border:0;background:none}
#app .room-immersive .room-header>.row{flex-wrap:wrap;justify-content:flex-start}
#app .room-immersive .room-actions{padding:0;display:flex;gap:8px;flex-wrap:wrap;border:0;background:none;flex:none}
#app .room-immersive .room-actions:empty{display:none}
#app .room-immersive .scene-toolbar{padding:0!important;background:none;border:0;display:flex!important;flex-wrap:wrap!important;gap:8px!important}
#app .room-immersive .scene-badge{width:100%}
.room-ready-controls{position:absolute;left:5%;right:5%;bottom:4%;z-index:35;display:flex;justify-content:center}
.room-ready-controls:empty{display:none}
#app .room-ready-controls .room-actions{padding:12px;border:1px solid #8ca7bc66;background:#10273eeb;border-radius:10px;justify-content:center;max-width:100%}
#app .room-immersive .afk-banner,#app .room-immersive .turn-bar{position:absolute;left:20%;right:20%;top:15%;z-index:32}
#app .room-immersive .game-area>.turn-bar{top:50px;left:auto;right:8px;width:260px;max-width:calc(100% - 16px);height:26px;box-sizing:border-box;font-size:11px}
#app .room-immersive .side-panel>.turn-bar{position:relative;inset:auto;flex:none;height:28px;min-height:28px;margin:0 0 10px;box-sizing:border-box;font-size:11px}
#app .room-immersive .room-main>.side-panel{display:none;flex:none;min-height:0;overflow:hidden;flex-direction:column;background:var(--surface);z-index:50}
#app .room-immersive[data-chat='docked'] .room-main>.side-panel{display:flex;position:relative;inset:auto;flex:0 0 300px;width:300px;height:100%;border:0;border-left:1px solid var(--border);border-radius:0;box-shadow:none}
#app .room-immersive[data-chat='bottom'] .room-main{flex-direction:column}
#app .room-immersive[data-chat='bottom'] :is(.room-main,.game-slot)>.game-area{flex:none;height:var(--room-board-height,50dvh);width:100%}
#app .room-immersive[data-chat='bottom'] .room-main>.side-panel{display:flex;position:relative;inset:auto;flex:1;width:100%;height:auto;min-height:0;border:0;border-top:1px solid var(--border);border-radius:0;box-shadow:none}
#app.chat-open .room-immersive[data-chat='drawer'] .room-main>.side-panel{display:flex;position:absolute;right:0;top:0;bottom:0;left:auto;width:min(340px,90%);height:100%;border-radius:0;z-index:60}
#app:has(.room-immersive) .panel-scrim{display:none!important}
#app .room-immersive .side-panel>.drawer-heading{flex:none;padding:10px}
#app .room-immersive .side-panel>[hidden]{display:none!important}
#app .room-immersive .room-info-tabs{display:flex;flex:none;gap:5px;padding:8px;border-bottom:1px solid var(--border)}
#app .room-immersive .room-info-tabs>button{flex:1;min-height:34px;padding:6px;border:0;border-radius:6px;background:var(--surface-2);color:var(--text-2)}
#app .room-immersive .room-info-tabs>button[aria-selected='true']{color:var(--text);background:var(--brand-soft)}
#app .room-immersive .side-panel>.panel-section{max-height:none;min-height:0;flex:1;overflow:auto}
#app .room-immersive .side-panel .chat-area{display:flex;flex-direction:column;min-height:0}
#app .room-immersive .side-panel .chat-messages{min-height:0;max-height:none;flex:1;overflow:auto}
#app .room-immersive .side-panel .players-list{max-height:none}
#app .room-immersive .side-panel[data-tab='chat']>.panel-section:not(.chat-area),#app .room-immersive .side-panel[data-tab='round']>.panel-section,#app .room-immersive .side-panel[data-tab='players']>.chat-area{display:none}
#app .room-immersive .side-panel[data-tab='round']>.room-round-info{display:block;flex:1;min-height:0}
@media(max-width:700px){.room-game-dock{right:6px;top:6px;gap:4px}.room-game-dock>.room-rotate,.room-game-dock>.chat-toggle,.room-game-menu>summary{width:28px;height:28px;font-size:20px}.room-menu-content{top:35px}}
#app .room-immersive.is-rotated .room-menu-content{max-height:calc(100dvw - 68px);width:min(340px,calc(100dvh - 24px))}
#app .room-container.room-immersive.is-rotated .room-main{flex:1;flex-direction:row;height:100%}
#app .room-container.room-immersive.is-rotated :is(.room-main,.game-slot)>.game-area{flex:1;height:100%;overflow:hidden}
#app .room-container.room-immersive.is-rotated[data-chat='bottom'] .room-main{flex-direction:column}
#app .room-container.room-immersive.is-rotated[data-chat='bottom'] :is(.room-main,.game-slot)>.game-area{flex:none;height:var(--room-board-height,50dvh)}
#app .room-container.room-immersive.is-rotated[data-chat='docked'] .room-main>.side-panel,#app .room-container.room-immersive.is-rotated[data-chat='bottom'] .room-main>.side-panel{display:flex}
#app .room-container.room-immersive.is-rotated .chat-toggle:not([hidden]){display:inline-flex}
#app .room-immersive .turn-draft-host{position:absolute;left:12%;right:12%;bottom:10px;z-index:35;max-height:40%;overflow:auto}
#app .room-immersive .turn-draft-host:empty{display:none}
.room-game-dock>.room-leave{display:flex;align-items:center;justify-content:center;gap:4px;min-height:36px;padding:5px 8px;background:#112438e8;border:1px solid #778ca9;border-radius:7px;color:#ebeff5;font-size:12px}
.room-game-dock>.room-leave img,.room-game-dock>.room-leave svg{width:17px;height:17px}
#app .room-immersive .room-chat-button:not([hidden]){position:absolute;right:44px;top:6px;transform:none;z-index:90;display:grid;place-items:center;width:32px;height:32px;min-height:0;padding:0;border:1px solid #9aafc6;border-radius:5px;background:#112438e8;color:#ebeff5}
.room-chat-button>span{position:relative;display:block;box-sizing:border-box;width:24px;height:19px;border:2px solid currentColor;border-radius:4px;font:700 18px/10px system-ui;letter-spacing:1px;text-align:center}
.room-chat-button>span::after{content:'';position:absolute;left:3px;bottom:-6px;width:6px;height:6px;border-left:2px solid currentColor;background:#112438;transform:skewY(-35deg)}
#app .room-immersive[data-chat='docked'] .room-chat-button,#app .room-immersive[data-chat='bottom'] .room-chat-button{display:none!important}
@media(max-width:700px){.room-game-dock>.room-leave{min-height:28px;padding:3px 6px;font-size:11px}#app .room-immersive .room-chat-button:not([hidden]){width:clamp(24px,7vw,32px);height:clamp(24px,7vw,32px);right:calc(10px + clamp(24px,7vw,32px));top:4px}}
@media(max-width:700px){.room-game-dock>.room-leave{width:28px;padding:0}.room-leave-label{display:none}}

/* Waiting and playing share an outer frame; only their table contents change. */
#app .room-container.room-immersive[data-chat] .room-main{display:flex;height:100%;min-height:0;overflow:hidden;flex-direction:row}
#app .room-container.room-immersive[data-chat] :is(.room-main,.game-slot)>.game-area{flex:1 1 0;width:0;height:100%;min-width:0;min-height:0;max-height:none;overflow:hidden}
#app .room-container.room-immersive[data-chat] .room-main>.side-panel{flex:none;min-height:0;max-height:none;box-sizing:border-box;overflow:hidden}
#app .room-container.room-immersive[data-chat='docked'] .room-main>.side-panel{display:flex;position:relative;inset:auto;flex:0 0 var(--room-chat-width,300px);width:var(--room-chat-width,300px);height:100%;border:0;border-left:1px solid var(--border);border-radius:0;box-shadow:none}
#app .room-container.room-immersive[data-chat='bottom'] .room-main{flex-direction:column}
#app .room-container.room-immersive[data-chat='bottom'] :is(.room-main,.game-slot)>.game-area{flex:0 0 var(--room-frame-area-height,50dvh);width:100%;height:var(--room-frame-area-height,50dvh);max-height:none}
#app .room-container.room-immersive[data-chat='bottom'] .room-main>.side-panel{display:flex;position:relative;inset:auto;flex:1 1 0;width:100%;height:0;border:0;border-top:1px solid var(--border);border-radius:0;box-shadow:none}
#app .room-container.room-immersive[data-chat='drawer'] .room-main>.side-panel{display:none}
#app.chat-open .room-container.room-immersive[data-chat='drawer'] .room-main>.side-panel{display:flex;position:absolute;right:0;top:0;bottom:0;left:auto;width:min(340px,90%);height:100%;border-radius:0;z-index:60}
#app .room-container.room-immersive[data-chat] .game-area>.turn-bar{position:absolute;top:50px;left:auto;right:8px;width:260px;max-width:calc(100% - 16px);height:26px;min-height:26px;margin:0;z-index:45;box-sizing:border-box;font-size:11px}

/* Status stays in the table frame, so it never pushes the conversation. */
#app .room-container .waiting-mobile-status{display:none}
#app .room-container.waiting-room[data-chat='bottom'] .room-title-section{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:0}
#app .room-container.waiting-room[data-chat='bottom'] .room-title-section .room-game-name{flex:none;width:100%}
#app .room-container.waiting-room[data-chat='bottom'] .room-title-section>.waiting-mobile-status{display:block;flex:none;min-width:0;max-width:100%;margin:0;font-size:11px;line-height:14px;font-weight:500;color:var(--wait-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#app .room-container .room-title-section>.waiting-mobile-status.is-reconnecting{display:block;min-width:0;color:var(--wait-text,#663b0b);font-size:11px;line-height:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;pointer-events:none}
#app .room-container.room-immersive[data-chat] .game-area>.turn-bar{display:flex;align-items:center;justify-content:center;isolation:isolate;overflow:hidden;top:50px;height:32px;min-height:32px;padding:5px 10px;border-radius:8px;border:1px solid #b8c9d8;background:#12263df5;color:#f5f7fb;box-shadow:0 2px 8px #0003;font-size:13px;line-height:20px}
#app .room-container.room-immersive[data-chat] .turn-bar[hidden]{display:none}
#app .room-container.room-immersive .turn-bar .turn-bar-text{display:flex;align-items:center;justify-content:center;gap:10px;min-width:0;max-width:100%;width:100%;font-size:inherit}
#app .room-container.room-immersive .turn-bar-primary{overflow:hidden;min-width:0;text-overflow:ellipsis;white-space:nowrap;font-weight:700}
#app .room-container.room-immersive .turn-bar-secondary{flex:none;font-weight:600;font-variant-numeric:tabular-nums}
#app .room-container.room-immersive .turn-bar-fill{z-index:-1;opacity:.35;background:#8ca8c7}
#app .room-container.room-immersive .turn-bar.is-mine{border:2px solid #c9dfae;background:#183c2ef5;color:#f1f9e8}
#app .room-container.room-immersive .turn-bar.is-mine .turn-bar-fill{background:#71a768}
#app .room-container.room-immersive .turn-bar.is-urgent{border-color:#ffb29a;background:#512e29f5;color:#fff2e9}
#app .room-container.room-immersive .turn-bar.is-urgent .turn-bar-fill{background:#b7503b}
#app .room-container.room-immersive .turn-bar[style*='display: none']{display:none!important}
@media(max-width:700px){
 #app .room-container.room-immersive[data-chat] .game-area>.turn-bar{top:40px;right:6px;width:224px;max-width:calc(100% - 12px);height:30px;min-height:30px;font-size:12px;padding:4px 8px}
 #app .room-container.room-immersive .turn-bar .turn-bar-text{gap:8px}
}

#app .room-container.room-immersive .turn-bar.turn-bar-compact{padding:3px 5px;font-size:10px;line-height:14px;pointer-events:none}
#app .room-container.room-immersive .turn-bar.turn-bar-compact .turn-bar-text{flex-direction:column;gap:0;align-items:flex-start;line-height:14px}
#app .room-container.room-immersive .turn-bar.turn-bar-compact .turn-bar-primary{max-width:100%}

#app .room-container.room-immersive .turn-bar{pointer-events:none}
.round-hands-panel{position:absolute;left:50%;bottom:25%;transform:translate(-50%,50%);z-index:49;width:max-content;color:#f2f5fa}
.room-showing-room .round-hands-panel,.game-area:has(>.room-round-review:not(.is-settlement-review))>.round-hands-panel{visibility:hidden}
.round-hands-content{min-height:0;display:flex;flex-direction:column}
.round-hands-heading,.round-ready-count{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.round-scores{display:flex;flex:none;gap:12px;overflow-x:auto;padding:3px 10px;font-size:11px;line-height:1.4;scrollbar-width:thin}
.round-score{display:flex;flex:none;gap:4px;white-space:nowrap}
.round-score>span{color:#c6d7e4}
.round-hands-actions{flex:none;display:grid;grid-template-columns:repeat(2,max-content);gap:6px}
.round-hands-actions button{white-space:nowrap}
.round-hands-actions .round-start{display:flex;flex-direction:column;justify-content:center;gap:1px;line-height:1.15}
.round-start-status{font-size:10px;font-weight:400}
.round-hands-panel .round-roster-changed{position:absolute;inset:auto 0 100%;width:auto;height:auto;margin:0;padding:4px 8px;clip-path:none;background:#142d4bf2;color:#fff;text-align:center;white-space:normal;font-size:12px}
.round-seats{padding:4px 8px;background:#142d4bf2;border-radius:8px;color:#fff;font-size:12px}
.round-seats[open]{max-height:min(35dvh,180px);overflow:auto}
.round-seats summary{min-height:32px;padding:6px 0;cursor:pointer}
.round-seat-row{display:flex;align-items:center;flex-wrap:wrap;gap:4px;padding:2px 0}
.round-seat-row>span{flex:1 1 auto;overflow-wrap:anywhere}
.room-round-review{position:absolute;inset:0;z-index:51;background:var(--room-felt,#153127)}
.room-round-review>.room-review-board{pointer-events:auto}
.game-area:has(>.is-settlement-review)>.round-hands-panel{z-index:53}
#app .is-settlement-review :is(.player-identity-avatar,.mj-player-avatar)[aria-pressed=true]:not(:focus-visible){outline:none}
#app .waiting-room .has-oval-seats .waiting-player.is-replaying>.waiting-player-state{display:block;position:absolute;top:0;right:0;padding:2px 4px;border-radius:4px;background:#233b54;color:#fff;z-index:5}
.game-area:has(>.room-round-review)>:is(.game-stage,.shared-table-scene,.duel-player-rail){visibility:hidden}
.room-review-controls{position:absolute;bottom:8px;left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:5px;flex-wrap:wrap;justify-content:center;max-width:calc(100% - 8px);width:max-content;background:#142d4bf2;color:#fff;border-radius:8px;padding:5px;z-index:2;font-size:12px}
.room-review-controls>span{flex:1 0 100%;text-align:center}.room-review-controls input{width:90px;min-width:40px}.room-review-controls button{min-height:36px;font-size:12px;padding:4px 8px}
.room-game-dock>.room-rotate,.room-game-menu>summary{width:40px;height:40px;font-size:20px}.room-game-dock>.room-leave{width:auto;min-height:40px;padding:4px 8px;font-size:12px}.room-game-dock>.room-leave .room-leave-label{display:inline}.room-game-dock>.room-rotate{display:flex;width:auto;gap:4px;padding:4px 7px}.room-game-dock>.room-rotate>span{display:inline;font-size:12px}
.room-game-dock{z-index:70}
#app .concealed-card>.replay-inline-card{display:block;width:100%;height:100%;border-radius:inherit}

/* Transparent input shield below chat and room chrome, above game content. */
#app .room-immersive .room-chat-shield{position:absolute;inset:0;z-index:59;touch-action:none;background:transparent}
#app .room-immersive .room-chat-shield[hidden]{display:none}

/* The minimum game aspect is independent of the outpaint image bounds. */
#app .room-immersive.mahjong-room :is(.room-main,.game-slot)>.game-area{min-height:0;max-height:var(--room-board-height);isolation:isolate}

/* Chat and its picker paint above every game-local effect and control. */
#app .room-container.room-immersive :is(.room-main,.game-slot)>.game-area{isolation:isolate;z-index:0}
#app .room-container.room-immersive[data-chat] .room-main>.side-panel{z-index:100;overflow:visible}
#app.chat-open .room-container.room-immersive[data-chat=drawer] .room-main>.side-panel{z-index:100}
#app .room-container.room-immersive .side-panel>.chat-area{overflow:visible}
#app .room-container.room-immersive .side-panel .chat-input-area{z-index:2}
.room-last-action{
  position:absolute;z-index:110;top:max(8px,env(safe-area-inset-top,0px));
  inset-inline:auto;left:50%;right:auto;transform:translateX(-50%);margin:0;
  box-sizing:border-box;width:max-content;max-width:min(36rem,calc(100% - 2 * var(--action-gutter,124px)));min-height:30px;
  padding:4px 14px;border:1px solid #a8bcae;border-radius:999px;
  color:#173d33;background:#edf5e9;
  box-shadow:0 2px 8px #102c263d;
  text-align:center;pointer-events:none;
  font:600 13px/1.35 system-ui,sans-serif;
}
.room-last-action>span:not([hidden]){display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.room-last-action .room-action-summary{font-weight:700}
.room-last-action.is-urgent .room-action-summary{color:#ac1724}
#app .game-area[data-hand-status]{
  --hand-status-height:clamp(28px,calc(var(--game-surface-height) * .055),38px);
  --hand-status-gap:clamp(1px,calc(var(--game-surface-height) * .002),2px);
}
#app .game-area[data-hand-status]>.room-last-action{
  top:auto;bottom:calc((100% - var(--game-surface-height)) / 2 + var(--hand-status-gap));
  max-width:min(36rem,calc(100% - 24px));min-height:0;height:var(--hand-status-height);
  padding-inline:clamp(10px,calc(var(--game-surface-height) * .025),18px);padding-block:0;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
  font-size:clamp(12px,calc(var(--game-surface-height) * .023),16px);
  line-height:calc(var(--hand-status-height) - 2px);
}
#app .game-area[data-hand-status]>.room-last-action>span:not([hidden]){display:inline}
#app .game-area[data-hand-status]>.room-last-action>.room-action-summary:not([hidden])+span:not([hidden])::before{content:" · "}
#app .local-play .room-last-action{--action-gutter:152px}
#app .local-play .local-undo-button[hidden]{display:none}
#app .local-play .local-undo-button:disabled{opacity:.55;cursor:default}
@media(max-width:440px){
  #app :where(.room-immersive:not(.is-rotated)) .game-area:not([data-hand-status])>.room-last-action{
    top:calc(max(8px,env(safe-area-inset-top,0px)) + var(--room-control-height,40px) + 4px);
    max-width:calc(100% - 24px);min-height:26px;padding:3px 9px;font-size:12px;
  }
}
