/* Allocate the screen to the game; cards and actions retain their own space. */
@media (min-width:901px) {
  :root{--bar-height:80px;--hand-face-height:clamp(112px,18dvh,158px)}
  .topbar{height:var(--bar-height);min-height:var(--bar-height);padding-block:7px}
  .game-layout{height:calc(100dvh - var(--bar-height));min-height:0;overflow:hidden}
  .sidebar{min-height:0;overflow-y:auto}
  .play-area{height:100%;min-height:0;display:grid;grid-template-rows:90px minmax(148px,1fr) 44px auto 44px;gap:7px;padding:10px 22px 8px;overflow:hidden}
  .opponents{grid-row:1;align-self:start;margin:0;min-height:0;padding-top:0}
  .opponents:has(.role-president){padding-top:12px}
  .opponent{padding-top:0;padding-bottom:0;gap:2px}
  .avatar{width:47px;height:47px;border-radius:16px}
  .opponent-name{margin-top:3px;min-height:17px;font-size:14px;line-height:1.15}
  .opponent-info{font-size:12px;line-height:1.2;min-height:14px}
  .opponent .turn-badge,.mini-cards{display:none}
  .felt,.felt:has(.pile-cards){grid-row:2;align-self:stretch;width:100%;height:100%;min-height:0;max-height:none;flex:none;overflow:hidden;border-radius:90px}
  .pile-area,.pile-area:has(.pile-cards){min-height:0;padding:7px 10px;gap:7px}
  .pile-cards{min-height:0;max-height:calc(100% - 28px)}
  .pile-cards .playing-card.rogue-card{height:clamp(112px,18dvh,176px);width:clamp(78px,12.5dvh,122px)}
  .pile-caption{font-size:14px;line-height:1.35}
  .felt-wordmark{display:none}
  .empty-pile{min-height:0;gap:8px}
  .empty-symbol{height:46px;width:39px;font-size:27px}
  .table-feedback{grid-row:3;margin:0;width:100%;min-height:0;gap:9px}
  .table-feedback .last-action.table-status,.table-feedback .banter-bubble{min-height:0;height:44px;max-height:44px;padding:6px 10px;font-size:14px;line-height:1.35}
  .human-zone{grid-row:4;width:100%;min-height:0;margin:0}
  .hand-heading{min-height:28px;padding-block:0;gap:9px}
  .hand-heading .session-label,.hand-meta{font-size:14px}
  .hand-heading .autoplay-control{min-height:26px;font-size:13px}
  .coach-tip{display:none!important}
  .hand-cards,.human-zone:has(.coach-tip:not([hidden])) .hand-cards{height:calc(var(--hand-face-height) + 26px);min-height:0;padding:18px 9px 8px;gap:9px}
  .hand-cards .playing-card.rogue-card{height:var(--hand-face-height);width:calc(var(--hand-face-height)*.696)}
  .action-bar{position:static;display:flex;flex-direction:row;align-items:center;flex-wrap:nowrap;gap:12px;padding:3px 0 0;min-height:48px;background:none;border:0;box-shadow:none}
  .selection-help{flex:1 1 auto;text-align:left;font-size:14px;line-height:1.35;min-height:0}
  .play-actions{flex:0 0 auto;gap:8px}
  .play-actions button{min-height:44px}
  .social-bar{grid-row:5;min-height:0;margin:0;padding:0;justify-content:center;gap:10px}
  .reaction-bar{margin:0;gap:6px}.reaction-bar button{width:40px;min-height:40px;height:40px;font-size:21px}
  .table-footer{display:none}
  .felt:has(.waiting-panel){grid-row:2/5;min-height:310px;height:auto;border-radius:42px;overflow:auto}
  .play-area:has(.waiting-panel) .table-feedback,.play-area:has(.waiting-panel) .human-zone{visibility:hidden}
}
@media (min-width:601px) and (max-width:900px) {
  :root{--bar-height:74px;--hand-face-height:112px}
  .topbar{height:var(--bar-height);min-height:var(--bar-height)}
  .game-layout{height:calc(100dvh - var(--bar-height));min-height:0;display:block;overflow:hidden}
  .sidebar{display:none}
  .play-area{height:100%;min-height:0;display:grid;grid-template-rows:90px minmax(145px,1fr) 44px auto 42px;gap:6px;padding:8px 16px;overflow:hidden}
  .opponents{grid-row:1;margin:0;padding-top:0}.opponents:has(.role-president){padding-top:12px}
  .opponent{padding:0;gap:2px}.avatar{width:43px;height:43px}.opponent-name{font-size:13px;line-height:1.15;min-height:17px;margin-top:3px}.opponent-info{font-size:12px;line-height:1.2}
  .mini-cards,.opponent .turn-badge{display:none}
  .felt,.felt:has(.pile-cards){grid-row:2;min-height:0;height:100%;max-height:none;align-self:stretch;border-radius:65px;overflow:hidden}
  .pile-area,.pile-area:has(.pile-cards){min-height:0;padding:7px 10px;gap:7px}.pile-cards{min-height:0}.pile-cards .playing-card.rogue-card{width:83px;height:119px}.pile-caption{font-size:14px}
  .felt-wordmark{display:none}.empty-pile{min-height:0;gap:7px}.empty-symbol{height:44px;width:37px;font-size:26px}
  .table-feedback{grid-row:3;margin:0;gap:8px}.table-feedback .last-action.table-status,.table-feedback .banter-bubble{height:44px;min-height:0;max-height:44px;font-size:13px;padding:6px 9px;line-height:1.35}
  .human-zone{grid-row:4;margin:0;min-height:0}.hand-heading{min-height:26px}.coach-tip{display:none!important}
  .hand-cards,.human-zone:has(.coach-tip:not([hidden])) .hand-cards{height:138px;min-height:0;padding:17px 9px 9px;gap:8px}.hand-cards .playing-card.rogue-card{width:78px;height:112px}
  .action-bar{position:static;display:flex;flex-direction:row;flex-wrap:nowrap;align-items:center;gap:9px;min-height:47px;padding:3px 0 0;background:none;border:0;box-shadow:none}.selection-help{flex:1 1 auto;min-height:0;text-align:left;font-size:13px}.play-actions{flex:0 0 auto}.play-actions button{min-height:44px}
  .social-bar{grid-row:5;min-height:0;padding:0;margin:0;gap:8px;justify-content:center}.reaction-bar{margin:0}.reaction-bar button{width:36px;min-height:36px;height:36px;font-size:20px}.table-footer{display:none}
  .felt:has(.waiting-panel){grid-row:2/5;min-height:300px;height:auto;overflow:auto}.play-area:has(.waiting-panel) .table-feedback,.play-area:has(.waiting-panel) .human-zone{visibility:hidden}
}
@media (max-width:600px) {
  :root{--bar-height:104px;--hand-face-height:clamp(98px,15dvh,124px)}
  .topbar{height:var(--bar-height);min-height:var(--bar-height);padding:5px 12px 7px}.brand .party-logo{height:44px;width:150px}
  .game-layout{height:calc(100dvh - var(--bar-height));min-height:0;display:block;overflow:hidden}.sidebar{display:none}
  .play-area{height:100%;min-height:0;display:grid;grid-template-rows:auto minmax(112px,1fr) 42px auto 42px;gap:5px;padding:7px 10px;overflow:hidden}
  .opponents{grid-row:1;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px 3px;margin:0;padding:0}.opponents:has(.role-president){padding-top:13px}
  .opponent{padding:0;gap:1px}.avatar{width:39px;height:39px;border-radius:14px}.opponent-name{font-size:12px;line-height:1.12;min-height:26px;margin-top:3px;display:flex;align-items:center;justify-content:center;white-space:normal;overflow:hidden;text-wrap:balance}.opponent-info{font-size:11px;line-height:1.1;min-height:12px;margin:0}
  .mini-cards,.opponent .turn-badge{display:none}.opponent:has(.role-president) .opponent-name{margin-top:9px}
  .felt,.felt:has(.pile-cards){grid-row:2;min-height:0;height:100%;max-height:none;border-radius:48px;border-width:4px;overflow:hidden}.felt-wordmark{display:none}
  .pile-area,.pile-area:has(.pile-cards){min-height:0;padding:4px 7px;gap:5px}.pile-cards{min-height:0}.pile-cards .playing-card.rogue-card{width:78px;height:112px}.pile-cards .playing-card.rogue-card+.playing-card.rogue-card{margin-left:-25px}.pile-caption{font-size:12px;line-height:1.25}.empty-pile{min-height:0;gap:6px;font-size:14px}.empty-symbol{height:37px;width:32px;font-size:23px}.empty-pile small{font-size:12px}
  .table-feedback{grid-row:3;grid-template-columns:1fr;min-height:0;margin:0;gap:0}.table-feedback .last-action.table-status,.table-feedback .banter-bubble{min-height:0;height:42px;max-height:42px;font-size:13px;line-height:1.3;padding:5px 9px}.table-feedback:has(.banter-bubble:not([hidden])) .last-action{display:none}
  .human-zone{grid-row:4;margin:0;min-height:0}.hand-heading{min-height:24px;padding:0 2px;gap:5px}.hand-heading>div{gap:6px}.hand-heading .session-label,.hand-meta{font-size:12px}.hand-heading .turn-badge{font-size:10px;padding:3px 5px}.your-avatar .standing-avatar{width:25px;height:25px}.autoplay-control{font-size:11px!important;min-height:23px!important}.coach-tip{display:none!important}
  .hand-cards,.human-zone:has(.coach-tip:not([hidden])) .hand-cards{height:calc(var(--hand-face-height) + 23px);min-height:0;padding:16px 7px 7px;gap:7px}.hand-cards .playing-card.rogue-card{height:var(--hand-face-height);width:calc(var(--hand-face-height)*.696)}
  .action-bar{position:static;min-height:64px;padding:2px 0 0;display:flex;flex-direction:column;justify-content:start;flex-wrap:nowrap;gap:4px;background:none;border:0;box-shadow:none}.selection-help{flex:0 0 auto;font-size:12px;line-height:1.25;min-height:15px;text-align:center}.play-actions{width:100%;gap:7px;justify-content:center}.play-actions button{min-height:44px;height:44px;padding-block:7px}.play-actions .primary-button{flex:1}.play-actions .secondary-button{min-width:68px}.play-actions .text-button{padding-inline:9px}
  .social-bar{grid-row:5;min-height:0;flex-wrap:nowrap;gap:5px;padding:0;margin:0;justify-content:center}.social-bar .reaction-bar{display:none}.social-bar .text-button{min-height:40px;padding:5px 12px;font-size:13px}.social-bar #mobile-scores{display:inline-flex}.table-footer{display:none}
  .felt:has(.waiting-panel){grid-row:2/5;min-height:275px;height:auto;overflow:auto;border-radius:32px}.play-area:has(.waiting-panel) .table-feedback,.play-area:has(.waiting-panel) .human-zone{visibility:hidden}
}
@media(max-width:600px) and (max-height:720px){
  :root{--bar-height:94px;--hand-face-height:98px}.topbar{padding-top:2px;padding-bottom:4px}.brand .party-logo{height:36px;width:134px}.header-actions button,.header-actions .theme-select{min-height:40px;height:40px}.play-area{grid-template-rows:auto minmax(100px,1fr) 37px auto 36px;gap:3px;padding:5px 9px}.avatar{width:31px;height:31px;border-radius:11px}.opponent-name{font-size:11px;min-height:24px}.opponent-info{display:none}.opponents{gap:3px}.table-feedback .last-action.table-status,.table-feedback .banter-bubble{height:37px;max-height:37px;font-size:12px}.pile-cards .playing-card.rogue-card{width:66px;height:95px}.pile-caption{font-size:11px}.social-bar .text-button{min-height:34px;font-size:12px}.hand-heading{min-height:21px}.action-bar{min-height:62px}
}
@media(max-height:500px) and (min-width:601px){
  :root{--bar-height:54px}.topbar{height:54px;min-height:54px;padding:3px 12px}.brand .party-logo{height:46px;width:145px}.header-actions button,.header-actions .theme-select{min-height:40px;height:40px}.game-layout{height:calc(100dvh - 54px);display:block}.sidebar{display:none}.play-area{display:grid;grid-template-columns:45% minmax(0,1fr);grid-template-rows:55px minmax(110px,1fr) 36px;gap:5px;padding:5px 10px}.opponents{grid-row:1;grid-column:1/-1;grid-template-columns:repeat(var(--opponents),minmax(0,1fr));padding:0}.avatar{width:28px;height:28px;border-radius:9px}.opponent-name{font-size:11px;line-height:1;min-height:13px;white-space:nowrap;overflow:hidden}.opponent-info,.opponent .turn-badge,.mini-cards{display:none}.felt,.felt:has(.pile-cards){grid-column:1;grid-row:2;min-height:0;height:100%;border-radius:40px}.pile-cards .playing-card.rogue-card{width:66px;height:95px}.pile-caption{font-size:11px}.table-feedback{grid-column:1;grid-row:3}.table-feedback .last-action.table-status,.table-feedback .banter-bubble{height:36px;max-height:36px;font-size:11px;line-height:1.2;padding:5px}.table-feedback:has(.banter-bubble:not([hidden])) .last-action{display:none}.table-feedback{grid-template-columns:1fr}.human-zone{grid-column:2;grid-row:2/4;align-self:start}.hand-heading{min-height:20px}.hand-cards,.human-zone:has(.coach-tip:not([hidden])) .hand-cards{height:115px;padding:13px 7px 5px}.hand-cards .playing-card.rogue-card{height:98px;width:68px}.action-bar{min-height:64px;flex-direction:column;gap:4px}.selection-help{font-size:11px;text-align:center}.play-actions button{min-height:40px;height:40px;padding-top:6px;padding-bottom:6px}.coach-tip,.social-bar,.table-footer{display:none!important}.opponents:has(.role-president){padding-top:0}
}
/* Final cascade: flow labels and keep every interaction inside its grid track. */
body:has(.scene-backdrop) .hand-heading{padding:0 8px;min-height:30px}
.hand-heading #your-turn{position:static;inset:auto;flex:0 0 auto;box-shadow:none}
.action-bar{margin:0;max-width:100%}
.hand-cards{margin:0}
.felt:not(:has(.waiting-panel)){container-type:size}
.pile-area:has(.pile-cards){height:100%;display:flex;flex-direction:column;justify-content:center}
.pile-area .pile-cards{flex:0 1 auto;min-height:0;max-height:none}
.felt .pile-cards .playing-card.rogue-card{height:clamp(66px,calc(100cqh - 48px),176px);width:auto;aspect-ratio:110/158}
.pile-caption{flex:0 0 auto;max-width:100%}
@media(min-width:901px){.game-layout{grid-template-columns:250px minmax(0,1fr)}.sidebar{padding-inline:18px}.standing-name{white-space:normal;overflow:visible;line-height:1.2}.standing-info{gap:4px}.standing-row{gap:9px}.standing-rank-icon{width:23px;flex:0 0 23px}.standing-meta{font-size:12px}}
@media(max-width:600px){body:has(.scene-backdrop) .hand-heading{padding:0 2px;min-height:28px}.hand-heading>div{min-width:0}.hand-heading #your-turn{font-size:9px;padding:3px 5px;letter-spacing:0}.hand-heading .hand-meta{font-size:11px}.felt .pile-cards .playing-card.rogue-card{height:clamp(66px,calc(100cqh - 38px),132px)}.action-bar{width:100%}.play-actions .primary-button{min-width:0;width:auto;flex:1}}
@media(max-height:500px) and (min-width:601px){body:has(.scene-backdrop) .hand-heading{min-height:26px}.felt:has(.waiting-panel){grid-column:1/-1;grid-row:2/4;height:100%;min-height:0;overflow:auto}.play-area:has(.waiting-panel) .human-zone,.play-area:has(.waiting-panel) .table-feedback{display:none}.felt .pile-cards .playing-card.rogue-card{height:clamp(66px,calc(100cqh - 42px),115px)}}
/* Legible two-line feedback and proportional engraving at small card sizes. */
.rogue-pip{width:36%;height:auto;aspect-ratio:1}
.table-feedback .last-action.table-status,.table-feedback .banter-bubble{height:100%;max-height:none;line-height:1.3}
@media(min-width:901px){.play-area{grid-template-rows:90px minmax(148px,1fr) 52px auto 44px}}
@media(min-width:601px) and (max-width:900px){.play-area{grid-template-rows:90px minmax(145px,1fr) 52px auto 42px}}
@media(max-width:600px){.play-area{grid-template-rows:auto minmax(112px,1fr) 50px auto 42px}}
@media(max-width:600px) and (max-height:720px){.play-area{grid-template-rows:auto minmax(100px,1fr) 44px auto 36px}}
@media(max-height:500px) and (min-width:601px){.play-area{grid-template-rows:62px minmax(100px,1fr) 44px}.opponents:has(.role-president){padding-top:9px}.opponents .role-president .rank-accessory{top:-14px}}
/* The larger-type preference can use page scrolling instead of squeezing copy. */
body.text-large .game-layout{height:auto;min-height:calc(100dvh - var(--bar-height));overflow:visible}
body.text-large .play-area{height:auto;min-height:calc(100dvh - var(--bar-height));overflow:visible;grid-template-rows:auto minmax(220px,1fr) minmax(64px,auto) auto auto}
body.text-large .table-feedback{height:auto;min-height:64px}
body.text-large .table-feedback .last-action.table-status,body.text-large .table-feedback .banter-bubble{font-size:17px;line-height:1.45;min-height:64px;padding:7px 10px;overflow:visible;-webkit-line-clamp:unset}
body.text-large .selection-help{font-size:17px;line-height:1.4;white-space:normal}
body.text-large .action-bar{height:auto;min-height:70px}
@media(max-width:900px){body.text-large .action-bar{flex-direction:column}body.text-large .play-area{padding-bottom:20px}}
/* A physical table: layered timber rail, cloth, inset stitching and cast depth. */
body{--table-felt-top:#286858;--table-felt-bottom:#143d34;--table-wood:#684424;--table-trim:#c7a16a}
body[data-theme=saloon]{--table-felt-top:#566448;--table-felt-bottom:#293e2d;--table-wood:#754b2f;--table-trim:#cda36d}
body[data-theme=penthouse]{--table-felt-top:#3e5664;--table-felt-bottom:#203641;--table-wood:#343e44;--table-trim:#c8b581}
body[data-theme=cosmic]{--table-felt-top:#485b87;--table-felt-bottom:#263453;--table-wood:#37496b;--table-trim:#a2ceec}
body:has(.scene-backdrop) .play-area .felt{border:12px solid var(--table-wood);border-bottom-width:19px;outline:1px solid var(--table-trim);background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Cpath d='M0 0h140v140H0z' filter='url(%23n)' opacity='.15'/%3E%3C/svg%3E"),radial-gradient(ellipse at 45% 20%,var(--table-felt-top),var(--table-felt-bottom));box-shadow:0 2px 0 2px var(--table-trim),0 8px 0 #362617,0 12px 0 #18150f,0 21px 28px #0008,inset 0 3px 3px #08120d88,inset 0 0 0 2px #e9d5a522,inset 0 -18px 40px #0004;overflow:hidden}
body:has(.scene-backdrop) .play-area .felt::before{inset:10px;border:1px dashed #eeddb650;border-radius:inherit;box-shadow:inset 0 0 0 5px #00000008,0 0 0 1px #101c1422}
body:has(.scene-backdrop) .play-area .felt::after{content:"";position:absolute;inset:0;pointer-events:none;border-radius:inherit;background:radial-gradient(ellipse at 40% 8%,#ffffd41c,transparent 45%);z-index:0}
.pile-area{position:relative;z-index:1}
@media(min-width:901px){:root{--hand-face-height:clamp(154px,21dvh,188px)}.play-area>.felt,.play-area>.felt:has(.pile-cards){grid-row:1/3}.play-area>.opponents{position:relative;z-index:3;padding:10px 18px 0}.play-area>.felt .pile-area{padding-top:var(--seat-band,90px)}.felt .pile-cards .playing-card.rogue-card{height:clamp(88px,calc(100cqh - var(--seat-band,90px) - 34px),176px)}.felt:has(.waiting-panel){grid-row:1/5!important}.play-area:has(.waiting-panel)>.opponents{display:none}}
@media(min-width:601px) and (max-width:900px) and (min-height:501px){:root{--hand-face-height:154px}.hand-cards,.human-zone:has(.coach-tip:not([hidden])) .hand-cards{height:180px}.hand-cards .playing-card.rogue-card{width:107px;height:154px}.play-area>.felt,.play-area>.felt:has(.pile-cards){grid-row:1/3}.play-area>.opponents{position:relative;z-index:3;padding:9px 15px 0}.play-area>.felt .pile-area{padding-top:var(--seat-band,90px)}.felt .pile-cards .playing-card.rogue-card{height:clamp(80px,calc(100cqh - var(--seat-band,90px) - 32px),154px)}}
@media(max-width:600px){:root{--hand-face-height:154px}.game-layout{height:auto;min-height:calc(100dvh - var(--bar-height));overflow:visible}.play-area{height:auto;min-height:calc(100dvh - var(--bar-height));grid-template-rows:auto minmax(132px,1fr) 50px auto 42px;overflow:visible;padding-bottom:12px}.play-area>.felt,.play-area>.felt:has(.pile-cards){grid-row:1/3}.play-area>.opponents{position:relative;z-index:3;padding:9px 6px 0}.play-area>.felt .pile-area{padding-top:var(--seat-band,145px)}.felt .pile-cards .playing-card.rogue-card{height:clamp(85px,calc(100cqh - var(--seat-band,145px) - 32px),154px)}body:has(.scene-backdrop) .play-area .felt{border-width:8px;border-bottom-width:14px;border-radius:44px}.hand-cards{scroll-padding-inline:12px}.action-bar{position:sticky;bottom:6px;z-index:5;padding:5px 6px;background:#101b24f5!important;border:1px solid #cfbd8d33;box-shadow:0 5px 18px #0007}.selection-help{padding-inline:3px}.hand-heading{min-height:30px}.play-area:has(.waiting-panel)>.opponents{display:none}.felt:has(.waiting-panel){grid-row:1/5!important;min-height:340px}.social-bar{margin-top:2px}}
@media(max-height:500px) and (min-width:601px){.play-area>.felt,.play-area>.felt:has(.pile-cards){grid-row:2;grid-column:1}.play-area>.opponents{padding:0;z-index:3}.play-area>.felt .pile-area{padding-top:4px}.hand-cards,.human-zone:has(.coach-tip:not([hidden])) .hand-cards{height:151px}.hand-cards .playing-card.rogue-card{height:130px;width:90.5px}.felt .pile-cards .playing-card.rogue-card{height:clamp(80px,calc(100cqh - 40px),132px)}.play-area:has(.waiting-panel)>.felt{grid-row:1/4!important;grid-column:1/-1}.play-area:has(.waiting-panel)>.opponents{display:none}}
/* Menus keep a readable close-button gutter and scroll inside the viewport. */
.modal{max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px);overflow:auto;overscroll-behavior:contain;scroll-padding-block:18px}
.modal .modal-title{padding-right:24px;overflow-wrap:normal;hyphens:none}
.modal .modal-close{width:44px;height:44px;min-width:44px;min-height:44px;top:12px;right:12px}
button,.theme-select,.field{touch-action:manipulation}
@media(max-width:600px){.modal:not(.lobby-modal){padding:26px 20px}.modal .modal-title{font-size:clamp(26px,7.3vw,36px);line-height:1.12;padding-right:28px;letter-spacing:-.035em}.modal-eyebrow{padding-right:34px;line-height:1.4}.quick-taunts{flex-wrap:wrap}.quick-taunts button{min-height:44px}.header-actions .theme-select{font-size:12px;max-width:126px}.topbar .header-actions{justify-content:space-between;gap:5px}.theme-select{padding-inline:8px}.play-actions .primary-button{min-width:0}.soundboard-voice-controls{flex-wrap:wrap}}
.music-settings{padding-block:8px;border-top:1px solid #b6bec522}.music-volume-label{display:flex;justify-content:space-between;align-items:center;padding:8px 0;font-size:15px}.music-settings input[type=range]{width:100%;min-height:44px;accent-color:var(--gold);touch-action:pan-x}
@media(max-width:600px){.soundboard-voice-controls{display:grid!important;grid-template-columns:minmax(0,1fr)!important}.soundboard-voice-controls select,.soundboard-voice-controls button{width:100%;min-width:0;min-height:48px}.meme-sound-button{min-height:110px}.modal .field{font-size:16px}.settings-grid strong{font-size:16px}.settings-grid p{font-size:14px;line-height:1.45}}
/* Place overlapping arena rows in the same column, never an implicit side track. */
@media(min-height:501px),(max-width:600px){.play-area{grid-template-columns:minmax(0,1fr)}.play-area>.opponents,.play-area>.felt,.play-area>.table-feedback,.play-area>.human-zone,.play-area>.social-bar{grid-column:1}}
.effect-content{width:min(680px,100%);max-width:100%}#celebration .celebration-banner{width:min(600px,100%);max-width:100%}
.hand-cards{margin-inline:auto;max-width:100%}
@media(max-width:600px){.action-bar{position:static;bottom:auto;min-height:72px}.selection-help{min-height:28px;line-height:1.3}.hand-heading .hand-meta{font-size:11px}.social-bar{padding-bottom:env(safe-area-inset-bottom)}}
@media(max-width:600px){.hand-heading{flex-wrap:nowrap;min-height:44px;gap:6px}.hand-heading>div{display:flex;flex-direction:column;align-items:flex-start;gap:1px}.hand-heading #your-turn{margin-left:auto}.hand-heading .autoplay-control{margin-left:auto;min-height:44px!important;flex:0 0 auto}.hand-heading:has(#your-turn:not([hidden])) .autoplay-control{margin-left:0}.hand-heading .session-label{font-size:12px;letter-spacing:.06em}.hand-heading .hand-meta{font-size:11px;white-space:nowrap}}
body.text-large .play-area{grid-template-columns:minmax(0,1fr)}body.text-large .play-area>.opponents{grid-column:1;grid-row:1}body.text-large .play-area>.felt{grid-column:1;grid-row:2}body.text-large .play-area>.table-feedback{grid-column:1;grid-row:3}body.text-large .play-area>.human-zone{grid-column:1;grid-row:4}body.text-large .play-area>.social-bar{grid-column:1;grid-row:5}
@media(max-height:500px) and (min-width:601px){.game-layout{height:auto;min-height:calc(100dvh - 54px);overflow:visible}.play-area{height:auto;min-height:calc(100dvh - 54px);grid-template-rows:62px minmax(207px,1fr) 44px;overflow:visible}.hand-heading{flex-wrap:nowrap;min-height:34px;gap:5px}.hand-heading>div{display:flex;flex-direction:column;align-items:flex-start;gap:1px}.hand-heading .session-label{font-size:11px}.hand-heading .hand-meta{font-size:10px;white-space:nowrap}.hand-heading #your-turn{font-size:9px;padding:3px 5px;margin-left:auto}.hand-heading .autoplay-control{font-size:11px;min-height:34px!important;margin-left:0}.hand-cards,.human-zone:has(.coach-tip:not([hidden])) .hand-cards{height:144px}.hand-cards .playing-card.rogue-card{height:126px;width:87.7px}.play-actions :is(.primary-button,.secondary-button,.text-button){height:44px;min-height:44px;padding-block:8px}.action-bar{gap:3px}.selection-help{min-height:15px}.human-zone{min-width:0}}
.standing-avatar .rank-sash{display:none}.results-list .standing-avatar .rank-accessory{font-size:22px;top:-10px}
.rogue-card .rogue-foil::before{animation:living-foil 11s ease-in-out infinite;animation-delay:calc(var(--card-index,0)*-.8s)}
@keyframes living-foil{0%,70%{left:-100%;opacity:0}76%{opacity:.26}89%{left:150%;opacity:0}100%{left:150%;opacity:0}}
body[data-motion=reduced] .rogue-card .rogue-foil::before{animation:none!important}

/* Reachable close controls, even halfway down a long library or credits dialog. */
.modal:not(#lobby)>.modal-close,.moods-dialog>.moods-close{
 position:sticky!important;top:0!important;right:auto!important;left:auto!important;bottom:auto!important;float:none!important;clear:both;z-index:30;
 display:grid;place-items:center;flex:0 0 44px;width:44px!important;height:44px!important;min-width:44px;min-height:44px;
 margin:-14px 0 12px auto!important;padding:0!important;border:1px solid var(--menu-border,#a5b8c477);border-radius:50%;
 background:var(--menu-surface,#192b38)!important;color:var(--text,#fff7e8)!important;box-shadow:0 3px 9px #0007;line-height:1;
}
.modal:not(#lobby)>.modal-close:hover,.moods-dialog>.moods-close:hover{background:var(--panel-soft,#304554)!important}
.modal:not(#lobby)>.modal-close:focus-visible,.moods-dialog>.moods-close:focus-visible{outline:3px solid var(--gold-light,#fff0bd)!important;outline-offset:3px}
.modal:not(#lobby)>:is(.modal-title,.modal-eyebrow,h2){clear:both;padding-inline:0!important;overflow-wrap:break-word;text-wrap:balance}
.modal:not(#lobby)>.modal-description{clear:both}
.moods-dialog>.moods-heading{clear:both;padding-inline:0!important}

/* Labels belong inside their controls, including with any of the twelve fonts. */
:is(.primary-button,.secondary-button,.quiet-button,.text-button,.icon-button,.stepper-btn,.mode-tab){
 text-align:center;white-space:normal!important;overflow-wrap:break-word;text-wrap:balance;line-height:1.25;
 align-items:center;justify-content:center;min-width:0;min-height:44px;
}
:is(.primary-button,.secondary-button,.quiet-button,.icon-button,.stepper-btn,.mode-tab){display:inline-flex}
.icon-button,.stepper-btn{min-width:44px;flex-shrink:0}
.modal :is(.primary-button,.secondary-button,.quiet-button,.text-button){height:auto;max-width:100%;padding-block:10px}
.modal :is(.modal-title,.modal-description,.rules-callout,.credit-row strong,.credit-row p,.soundboard-description,.voice-preview-status){overflow-wrap:break-word}
.mood-description,.mood-description strong,.mood-tag,.mood-copy,.mood-selection-text{text-align:center}
.mood-description strong{overflow-wrap:break-word;text-wrap:balance;line-height:1.2}
.meme-sound-button strong,.meme-sound-duration,.score-player-name strong,.score-podium-name{text-wrap:balance;overflow-wrap:break-word}
.field,select.field,.theme-select{line-height:1.3;min-height:44px}
@media(max-width:600px){
 .modal:not(#lobby)>.modal-close,.moods-dialog>.moods-close{margin:-14px 0 12px auto!important}
 .modal:not(#lobby)>:is(.modal-title,.modal-eyebrow,h2){clear:both;padding-inline:0!important}
 .modal .join-row{align-items:stretch;min-width:0}
 .modal .join-row>:is(.field,input){min-width:0}
 .modal .join-row>button{flex-shrink:0;min-width:64px}
 .modal :is(.quick-taunts,.soundboard-actions,.settings-shortcuts){flex-wrap:wrap}
}
@media(prefers-reduced-motion:reduce){.rogue-card .rogue-foil::before{animation:none}}
/* Give the expanded cast enough space to read their expressions. */
.topbar{position:sticky;top:0;z-index:30}
@media(min-width:901px) and (min-height:501px){.game-layout{height:auto;min-height:calc(100dvh - 80px);overflow:visible}.play-area{height:auto;min-height:calc(100dvh - 80px);grid-template-rows:112px minmax(180px,1fr) 52px auto 44px;overflow:visible}.avatar{width:68px;height:68px;border-radius:21px}.opponent-name{font-size:14px;margin-top:5px}.opponent-info{font-size:12px}.sidebar{max-height:calc(100dvh - 80px)}}
@media(min-width:601px) and (max-width:900px) and (min-height:501px){.game-layout{height:auto;min-height:calc(100dvh - 74px);overflow:visible}.play-area{height:auto;min-height:calc(100dvh - 74px);grid-template-rows:110px minmax(180px,1fr) 52px auto 42px;overflow:visible}.avatar{width:62px;height:62px;border-radius:20px}}
@media(max-width:600px){.avatar{width:52px;height:52px;border-radius:17px}.opponent-name{font-size:12px;min-height:26px}.opponents{gap:6px 3px}.opponents .opponent-info{font-size:11px}.your-avatar,.your-avatar .standing-avatar{width:34px;height:34px}.hand-heading{padding-inline:2px;gap:5px}.hand-heading .hand-meta{font-size:10px}}
@media(max-height:500px) and (min-width:601px){.avatar{width:38px;height:38px;border-radius:12px}.opponent-name{font-size:11px}.play-area{grid-template-rows:69px minmax(207px,1fr) 44px}}
.results-list .standing-avatar{width:46px;height:46px}.result-row{min-height:72px}.result-row .result-rank{min-width:30px}
.score-podium .score-avatar{width:86px;height:86px;border-radius:24px}.score-ranking .score-row-avatar{width:56px;height:56px;border-radius:18px}.score-podium-player{min-height:250px}
@media(max-width:600px){.score-podium .score-avatar{width:64px;height:64px;border-radius:20px}.score-podium-player{min-height:232px}.score-ranking .score-row-avatar{width:44px;height:44px;border-radius:14px}.music-track-name{font-size:13px;color:var(--muted);line-height:1.4}}
