/* v66 · Choose your table: Quick Play leads; the other four ways to play are
   grouped by where the other players are. Uses the existing card, well and
   heading vocabulary; no new artwork. */
#playHubOverlay .play-hub-grid{display:flex!important;flex-direction:column;gap:14px!important;}
#playHubOverlay #btnQuickPlay{margin:0!important;}
#playHubOverlay .play-hub-groups{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;}
#playHubOverlay .play-hub-group{display:flex;flex-direction:column;gap:10px;min-width:0;margin:0;padding:12px;border:1px solid var(--chrome-border);border-radius:12px;background:var(--chrome-well);}
#playHubOverlay .play-hub-group h3{margin:0 2px;color:var(--chrome-muted);font:700 15px/1.2 var(--ui-display);letter-spacing:.04em;text-align:left;}
#playHubOverlay .play-hub-group-cards{display:flex;flex-direction:column;gap:10px;}
#playHubOverlay .play-hub-group .play-mode-card{min-height:60px!important;margin:0;}
@media(max-width:600px){
 #playHubOverlay .play-hub-grid{gap:12px!important;}
 #playHubOverlay .play-hub-groups{grid-template-columns:1fr;gap:12px;}
 #playHubOverlay .play-hub-group{padding:10px;gap:8px;}
 #playHubOverlay .play-hub-group h3{font-size:14px;}
 #playHubOverlay .play-hub-group-cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;}
 #playHubOverlay .play-hub-group .play-mode-card{min-height:62px!important;flex-direction:column!important;justify-content:center;gap:5px!important;padding:8px 6px!important;}
 #playHubOverlay .play-hub-group .play-mode-card strong{font-size:15px!important;white-space:nowrap;}
 #playHubOverlay .play-hub-group .play-mode-card img{width:28px!important;height:28px!important;flex-basis:28px!important;}
}
/* Short landscape phones keep both groups side by side, each in one row. */
@media(max-height:550px) and (min-width:620px){
 #playHubOverlay .play-hub-grid{gap:10px!important;}
 #playHubOverlay .play-hub-group{padding:8px 10px;gap:6px;}
 #playHubOverlay .play-hub-group-cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;}
 #playHubOverlay .play-hub-group .play-mode-card{min-height:54px!important;flex-direction:column!important;justify-content:center;gap:3px!important;padding:5px 6px!important;}
 #playHubOverlay .play-hub-group .play-mode-card strong{font-size:14px!important;white-space:nowrap;}
 #playHubOverlay .play-hub-group .play-mode-card img{width:24px!important;height:24px!important;flex-basis:24px!important;}
}

/* v66 · One type scale for windows and menus. Size follows importance:
   window title > section heading > action button > control/row > body >
   label > caption. The game table, cards and title screen keep their own
   tuned typography. Doubled ids/classes outrank the older layered rules. */
:root{--t-title:34px;--t-lead:24px;--t-heading:20px;--t-button:20px;--t-control:16px;--t-body:16px;--t-label:14px;--t-caption:12px;}
@media(max-width:760px){:root{--t-title:26px;--t-lead:19px;--t-heading:17px;--t-button:17px;--t-control:15px;--t-body:15px;--t-label:13px;--t-caption:11px;}}
@media(max-height:560px) and (min-width:620px){:root{--t-title:24px;--t-lead:18px;--t-heading:16px;--t-button:16px;--t-control:14px;--t-body:14px;--t-label:13px;--t-caption:11px;}}

/* Window titles */
#playHubTitle#playHubTitle,#joinOverlayTitle#joinOverlayTitle,#releaseTitle#releaseTitle,#roundModalTitle#roundModalTitle,#gameoverTitle#gameoverTitle,
#deleteAccountTitle#deleteAccountTitle,#chooseTitle#chooseTitle,#passDeviceName#passDeviceName,#profileName#profileName,#screen-progress-title#screen-progress-title,
:is(#modal-menu,#modal-diag,#modal-confirm-leave,#modal-operator,#modal-inactivity,#modal-help,#screen-quickplay,#screen-lobby-host,#screen-local-setup,#screen-lobby-guest)#placeholder-never,
#modal-menu#modal-menu h2.section-title,#modal-diag#modal-diag h2.section-title,#modal-confirm-leave#modal-confirm-leave h2.section-title,#modal-operator#modal-operator h2.section-title,
#modal-inactivity#modal-inactivity h2.section-title,#modal-help#modal-help h2.section-title,#screen-quickplay#screen-quickplay h2.section-title,#screen-lobby-host#screen-lobby-host h2.section-title,
#screen-local-setup#screen-local-setup h2.section-title,#screen-lobby-guest#screen-lobby-guest h2.section-title,
#modal-settings#modal-settings .modal h2,#modal-social#modal-social .modal h2{font-size:var(--t-title)!important;}

/* Section headings */
#modal-settings#modal-settings .settings-group-v12 h3,#modal-profile#modal-profile h3,#modal-profile#modal-profile .profile-account-head strong,
#modal-release#modal-release .support-copy-v64 h3,#screen-progress#screen-progress h3,#modal-help#modal-help .guide-lesson h3,#modal-help#modal-help h3{font-size:var(--t-heading)!important;line-height:1.2!important;}

/* Action buttons */
#modal-menu#modal-menu .btn,#modal-release#modal-release #releaseActions .btn,#modal-social#modal-social .btn-primary,#modal-profile#modal-profile .btn-primary,
#modal-help#modal-help .btn-primary,#screen-lobby-host#screen-lobby-host .btn,#screen-lobby-guest#screen-lobby-guest .btn,#screen-local-setup#screen-local-setup .btn,
#screen-quickplay#screen-quickplay .btn,#modal-round#modal-round .btn,#modal-gameover#modal-gameover .btn,#modal-confirm-leave#modal-confirm-leave .btn,
#modal-inactivity#modal-inactivity .btn,#modal-diag#modal-diag .btn,#modal-choose#modal-choose .btn,#joinOverlay#joinOverlay .btn,#modal-delete-account#modal-delete-account .btn,
#modal-settings#modal-settings .btn-primary,#screen-progress#screen-progress #btnProgressDone,#playHubOverlay#playHubOverlay .play-hub-group .play-mode-card strong{font-size:var(--t-button)!important;line-height:1.2!important;}
#playHubOverlay#playHubOverlay #btnQuickPlay strong{font-size:calc(var(--t-button) * 1.4)!important;}

/* Controls, tabs and rows */
.seg.seg.game-picker button,.seg.seg.help-game-tabs button,#modal-help#modal-help [data-guide-view],#modal-help#modal-help .guide-pager .btn,#modal-help#modal-help .btn-utility,
#modal-settings#modal-settings .btn-ghost,#modal-settings#modal-settings .seg button,#modal-settings#modal-settings .settings-diagnostic-button strong,#modal-settings#modal-settings .range-val,
#modal-settings#modal-settings .toggle-row,#modal-settings#modal-settings .toggle-row span,#modal-settings#modal-settings .range-row span:not(.range-val),
#modal-social#modal-social .social-tab,#modal-social#modal-social .social-tab span,#modal-social#modal-social .btn-secondary,#modal-release#modal-release .support-menu-v64>.btn,
#screen-lobby-host#screen-lobby-host .setup-label,#screen-lobby-host#screen-lobby-host .seg button,#screen-lobby-host#screen-lobby-host .seat-name,#screen-lobby-guest#screen-lobby-guest .seat-name,
#screen-local-setup#screen-local-setup .setup-label,#screen-local-setup#screen-local-setup .seg button,#screen-local-setup#screen-local-setup .local-seat-v64>span,
#modal-profile#modal-profile #profileLevel,#modal-profile#modal-profile td,#modal-profile#modal-profile tbody th,#modal-profile#modal-profile .profile-fold summary span:not(.profile-fold-chevron),
#screen-progress#screen-progress .progress-tabs-v12 button,#screen-progress#screen-progress .progress-tabs-v12 button span,#screen-progress#screen-progress .progress-locker-name,
#screen-progress#screen-progress .progress-collection-card strong,#screen-progress#screen-progress .progress-collection-card span{font-size:var(--t-control)!important;}
#modal-social#modal-social .text-input,#modal-release#modal-release .text-input,#screen-local-setup#screen-local-setup .text-input,#modal-profile#modal-profile .text-input{font-size:max(16px,var(--t-control))!important;}

/* Body copy */
#modal-release#modal-release #releaseBody>p,#modal-release#modal-release .support-copy-v64 p,#modal-help#modal-help .guide-copy,.lobby-copy.lobby-copy,
#screen-progress#screen-progress #progressNext,#screen-progress#screen-progress .progress-locker-intro,#screen-progress#screen-progress #progressLockerView>p{font-size:var(--t-body)!important;line-height:1.45!important;}
#modal-help#modal-help .guide-goal{font-size:var(--t-lead)!important;line-height:1.25!important;}

/* Labels */
#playHubOverlay#playHubOverlay .play-hub-group h3,#modal-settings#modal-settings .settings-tabs-v12 button span,#modal-settings#modal-settings .settings-diagnostic-button small,
#modal-settings#modal-settings .settings-preview-label,.game-context.game-context,#inviteLink#inviteLink,.lobby-rules-v64.lobby-rules-v64 small,
#modal-profile#modal-profile .profile-edit-link,#modal-profile#modal-profile .profile-account p,#modal-profile#modal-profile .profile-equipped strong,#modal-profile#modal-profile .profile-activity-label,
#screen-progress#screen-progress #progressLevel,#screen-progress#screen-progress #progressXp,#screen-progress#screen-progress .founder-current,#screen-progress#screen-progress .progress-node-level,
#screen-progress#screen-progress .progress-node-name,#screen-progress#screen-progress #progressCollectionCount,#modal-help#modal-help .guide-chapters button span,#modal-help#modal-help .guide-facts span{font-size:var(--t-label)!important;}

/* Captions: the smallest text anywhere in a window. */
.seat-tag.seat-tag,#modal-settings#modal-settings .theme-swatch span,#modal-settings#modal-settings .deck-option small,#modal-settings#modal-settings button small,
#modal-social#modal-social .social-tab small,#modal-profile#modal-profile #profileStatus,#modal-profile#modal-profile #profileXpText,#modal-profile#modal-profile .profile-progress-link,
#modal-profile#modal-profile #profileAccountStatus,#modal-profile#modal-profile thead th,#modal-profile#modal-profile .profile-equipped small,#modal-profile#modal-profile .profile-activity-empty,
#screen-progress#screen-progress .progress-title-v12>span,#screen-progress#screen-progress .progress-next-label,#screen-progress#screen-progress .founder-next-preview span,
#screen-progress#screen-progress .progress-earn-v12 span,#screen-progress#screen-progress .progress-earn-v12 b,#screen-progress#screen-progress .progress-node-state,
#screen-progress#screen-progress .progress-more-rewards,#screen-progress#screen-progress .progress-locker-state{font-size:var(--t-caption)!important;}
/* Remaining rows and labels found by measuring every window. */
#modal-settings#modal-settings .settings-profile-v12 span,#screen-lobby-host#screen-lobby-host .toggle-row span,#screen-progress#screen-progress #btnProgressBack span{font-size:var(--t-control)!important;}
#screen-progress#screen-progress #btnProgressDone span{font-size:var(--t-button)!important;}
#modal-profile#modal-profile #profileAccount#profileAccount .profile-account-head strong,#modal-profile#modal-profile .profile-activity-head strong{font-size:var(--t-heading)!important;}
#screen-progress#screen-progress .locker-top-v12 p{font-size:var(--t-body)!important;}
#modal-settings#modal-settings .theme-swatch strong,#modal-settings#modal-settings .settings-preview-label span,#modal-help#modal-help .guide-chapters b,#modal-help#modal-help .guide-pager span{font-size:var(--t-label)!important;}
#modal-settings#modal-settings .theme-swatch strong{font-size:var(--t-caption)!important;}
#modal-profile#modal-profile .profile-equipped small,#modal-profile#modal-profile .profile-equipped strong,#modal-profile#modal-profile [class*="equip"] small{font-size:var(--t-caption)!important;}
#modal-profile#modal-profile [class*="equip"] strong{font-size:var(--t-label)!important;}
#modal-profile#modal-profile .profile-loadout-items small{font-size:var(--t-caption)!important;}
#modal-profile#modal-profile .profile-loadout-items strong{font-size:var(--t-label)!important;}
.lobby-rules-v64[hidden]{display:none!important;}
/* Profile: the content scrolls inside the window; Done stays in a fixed footer. */
#modal-profile#modal-profile .profile-modal{overflow:hidden!important;}
#modal-profile#modal-profile .profile-body-v66{display:flex;flex-direction:column;gap:14px;flex:1 1 auto!important;min-height:0;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;margin:-4px!important;padding:4px;width:auto!important;}
#modal-profile#modal-profile .profile-body-v66>*{min-width:0;flex:0 0 auto;width:100%;margin-top:0!important;margin-bottom:0!important;}
/* v68 · A new meld's frame and caption fade in as its first card lands;
   the cards themselves are never faded. */
#tableMelds .meld-group-wrap>.meld-group{transition:background-color .18s ease-out,border-color .18s ease-out,outline-color .2s ease;}
#tableMelds .meld-group-wrap>.meld-caption{transition:opacity .18s ease-out;}
/* Hiding is instant (no transition while arriving); revealing uses the fade above. */
#tableMelds .meld-arriving>.meld-group{background-color:transparent!important;border-color:transparent!important;outline-color:transparent!important;transition:none!important;}
#tableMelds .meld-arriving>.meld-caption{opacity:0!important;transition:none!important;}
@media(prefers-reduced-motion:reduce){#tableMelds .meld-group-wrap>:is(.meld-group,.meld-caption){transition:none;}}

/* v69: the Settings body fills exactly the space under the header and tabs
   (a fixed height calculation cut the end of longer tabs such as Style off
   behind the cabinet's bottom edge once the v66 title grew). */
#modal-settings .settings-v12{display:flex!important;flex-direction:column!important;}
#modal-settings .settings-v12>.settings-v12-head,#modal-settings .settings-v12>.settings-tabs-v12{flex:0 0 auto!important;}
#modal-settings .settings-v12>.settings-pane-v12:not(.hidden){flex:1 1 auto!important;min-height:0!important;max-height:none!important;overflow-y:auto!important;overscroll-behavior:contain;padding-bottom:max(22px,env(safe-area-inset-bottom))!important;}
/* Short screens (a phone turned sideways): slimmer header and tabs, and the
   style preview scrolls with the options instead of covering the space. */
@media (max-height:520px){
 #modal-settings .settings-v12>.settings-v12-head{padding-top:6px!important;padding-bottom:6px!important;min-height:0!important;}
 #modal-settings .settings-v12>.settings-tabs-v12{padding-top:5px!important;padding-bottom:5px!important;}
 #modal-settings .settings-tabs-v12 button{flex-direction:row!important;min-height:42px!important;gap:8px!important;padding:4px 8px!important;}
 #modal-settings .settings-tabs-v12 button img{width:22px!important;height:22px!important;}
 #modal-settings .settings-pane-v12[data-settings-pane="style"]{scroll-padding-top:0!important;}
 #modal-settings #settingsStylePreview{position:relative!important;top:auto!important;}
}
/* Short screens: Social keeps its header, tabs and Done button on screen;
   only the middle area scrolls. */
@media (max-height:520px){
 #modal-social .social-modal-v2{gap:8px!important;padding-top:12px!important;padding-bottom:12px!important;}
 #modal-social .social-modal-v2>:not(.social-stage){flex:0 0 auto!important;}
 #modal-social .social-stage{flex:1 1 auto!important;min-height:0!important;overflow-y:auto!important;overscroll-behavior:contain;}
}
/* Short screens: the in-game Menu uses two columns so Leave stays on screen. */
@media (max-height:520px){
 #modal-menu .modal{padding:14px 22px 18px!important;max-height:calc(100dvh - 16px)!important;overflow-y:auto!important;}
 #modal-menu .modal>h2{margin-bottom:10px!important;}
 #modal-menu .menu-buttons{display:grid!important;grid-template-columns:1fr 1fr!important;gap:10px!important;}
 #modal-menu .menu-buttons>.btn{margin:0!important;width:100%!important;}
 #modal-menu .menu-buttons>#btnCloseMenu{grid-column:1/-1;}
 #modal-menu .menu-buttons>.hidden{display:none!important;}
 /* Online tables have no Save & exit: Leave then takes the full row. */
 #modal-menu .menu-buttons:not(:has(#btnSaveLocal:not(.hidden))) #btnLeave{grid-column:1/-1;}
}

/* v70: the move hint above the hand ("Select 1 to discard…") always keeps
   its slot. It used to be removed from the layout when hidden, so the whole
   table jumped ~47px every time a card was selected or played. Phones
   and short touch screens already reserve the slot (platform-v62.css);
   this covers desktops, laptops and tablets. Very short mouse windows keep
   the hint out of the layout so the hand stays on screen. One line, fixed height; long hints shrink to fit
   (fitEvaluatorBanner) instead of wrapping. It fades in and out. */
@media (min-width:761px) and (min-height:561px){
 body[data-game="kounga"] #screen-game #evaluatorBanner{--eval-base:clamp(9px,2.2vw,13px);box-sizing:border-box!important;display:flex!important;align-items:center;justify-content:center;flex:0 0 auto!important;width:max-content;max-width:calc(100% - 12px);height:calc(var(--eval-base) + 2 * clamp(7px,1.8vw,10px) + 4px)!important;min-height:0!important;max-height:none!important;padding-top:0!important;padding-bottom:0!important;line-height:1!important;white-space:nowrap!important;overflow:hidden;text-overflow:ellipsis;opacity:1;transition:opacity .16s ease-out,visibility 0s linear 0s;}
 body[data-game="kounga"] #screen-game #evaluatorBanner.hidden{display:flex!important;visibility:hidden!important;opacity:0;transition:opacity .12s ease-in,visibility 0s linear .12s;}
}
@media (prefers-reduced-motion:reduce){body[data-game="kounga"] #screen-game #evaluatorBanner{transition:none!important;}}
