/* 4.26.22 — space is responsive; text and touch targets remain usable. */
:root {
  --fit-width: 100vw; --fit-height: 100dvh; --fit-top: 0px; --fit-left: 0px;
  --fit-gap: 10px;
  --fit-safe-top: env(safe-area-inset-top, 0px);
  --fit-safe-right: env(safe-area-inset-right, 0px);
  --fit-safe-bottom: env(safe-area-inset-bottom, 0px);
  --fit-safe-left: env(safe-area-inset-left, 0px);
}
.ui-fit-short { --fit-gap: 6px; }
html.ui-fit-mobile body[class] dialog.ui-fit-dialog:is(#game-dialog, [id])[open] {
  position: fixed !important; inset: auto !important;
  top: var(--fit-top) !important; left: var(--fit-left) !important;
  display: flex !important; align-items: center !important; justify-content: center !important;
  width: var(--fit-width) !important; height: var(--fit-height) !important;
  min-width: 0 !important; min-height: 0 !important; max-width: none !important; max-height: none !important;
  padding: calc(var(--fit-safe-top) + var(--fit-gap)) calc(var(--fit-safe-right) + var(--fit-gap)) calc(var(--fit-safe-bottom) + var(--fit-gap)) calc(var(--fit-safe-left) + var(--fit-gap)) !important;
  margin: 0 !important; border: 0 !important; background: transparent !important;
  overflow: hidden !important; transform: none !important; box-sizing: border-box !important;
}
html.ui-fit-mobile body[class] dialog.ui-fit-dialog:is(#game-dialog, [id])[open] > .ui-fit-shell {
  position: relative !important; inset: auto !important;
  display: flex !important; flex-direction: column !important; gap: 0 !important;
  width: min(680px, 100%) !important; min-width: 0 !important; max-width: 100% !important;
  height: auto !important; min-height: 0 !important; max-height: 100% !important;
  margin: 0 !important; padding: 10px !important; overflow: hidden !important;
  border: 1px solid var(--line) !important; border-radius: 14px !important;
  background: linear-gradient(155deg, #10392c, #061b15) !important; transform: none !important;
}
html.ui-fit-mobile body[class] dialog.ui-fit-dialog:is(#game-dialog, [id])[open] .ui-fit-head { flex: 0 0 auto; min-width: 0; min-height: 44px; padding: 2px 46px 8px 2px; }
html.ui-fit-mobile body[class] dialog.ui-fit-dialog:is(#game-dialog, [id])[open] .ui-fit-head:empty, html.ui-fit-mobile body[class] dialog.ui-fit-dialog:is(#game-dialog, [id])[open] .ui-fit-foot:empty { display: none !important; }
html.ui-fit-mobile body[class] dialog.ui-fit-dialog:is(#game-dialog, [id])[open] .ui-fit-head > :is(header, .dialog-hero) { min-height: 0 !important; padding: 0 !important; margin: 0 !important; gap: 8px !important; }
html.ui-fit-mobile body[class] dialog.ui-fit-dialog:is(#game-dialog, [id])[open] .ui-fit-head h2 { font-size: 20px !important; line-height: 1.2 !important; margin: 0 !important; padding: 0 !important; overflow-wrap: anywhere; }
html.ui-fit-mobile body[class] dialog.ui-fit-dialog:is(#game-dialog, [id])[open] .ui-fit-head :is(.eyebrow, .admin-kicker, .academy-kicker) { display: none !important; }
html.ui-fit-mobile body[class] dialog.ui-fit-dialog:is(#game-dialog, [id])[open] .ui-fit-head :is(p, .rules-dialog-icon) { display: none !important; }
html.ui-fit-mobile body[class] dialog.ui-fit-dialog:is(#game-dialog, [id])[open] .ui-fit-shell > :is(.dialog-close, .dialog-x, .academy-summary-close) {
  position: absolute !important; inset: 6px 6px auto auto !important;
  width: 44px !important; height: 44px !important; min-width: 44px !important; min-height: 44px !important;
  margin: 0 !important; padding: 0 !important; z-index: 5 !important; font-size: 24px !important;
  display: grid !important; place-items: center; border-radius: 10px !important;
}
html.ui-fit-mobile body[class] dialog.ui-fit-dialog:is(#game-dialog, [id])[open] .ui-fit-scroll {
  flex: 1 1 auto !important; min-width: 0 !important; min-height: 0 !important;
  overflow: auto !important; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y; scrollbar-width: thin; scrollbar-color: #9b874d transparent;
  scroll-padding: 8px; padding: 2px 3px 4px 2px;
  font-size: 14px; line-height: 1.4;
}
html.ui-fit-mobile body[class] dialog.ui-fit-dialog:is(#game-dialog, [id])[open] .ui-fit-scroll :is(label, fieldset, section, .form-grid, .buy-checkout-content, .sell-confirm-content) { min-width: 0; }
html.ui-fit-mobile body[class] dialog.ui-fit-dialog:is(#game-dialog, [id])[open] .ui-fit-scroll label { gap: 5px !important; margin-bottom: 10px !important; font-size: 13px !important; }
html.ui-fit-mobile body[class] dialog.ui-fit-dialog:is(#game-dialog, [id])[open] .ui-fit-scroll :is(input:not([type=checkbox]):not([type=radio]), select, textarea) {
  min-width: 0 !important; max-width: 100% !important; min-height: 44px !important;
  font-size: 16px !important; padding: 8px 10px !important;
}
html.ui-fit-mobile body[class] dialog.ui-fit-dialog:is(#game-dialog, [id])[open] .ui-fit-scroll input[type=range] { padding: 0 !important; }
html.ui-fit-mobile body[class] dialog.ui-fit-dialog:is(#game-dialog, [id])[open] .ui-fit-scroll textarea { height: 100px; }
html.ui-fit-mobile body[class] dialog.ui-fit-dialog:is(#game-dialog, [id])[open] .ui-fit-scroll :is(p, .field-note) { font-size: 13px !important; line-height: 1.45 !important; margin-block: 6px 10px !important; }
html.ui-fit-mobile body[class] dialog.ui-fit-dialog:is(#game-dialog, [id])[open] .ui-fit-scroll h3 { margin-block: 8px !important; font-size: 16px !important; }
html.ui-fit-mobile body[class] dialog.ui-fit-dialog:is(#game-dialog, [id])[open] .ui-fit-scroll .switch-column { gap: 2px !important; }
html.ui-fit-mobile body[class] dialog.ui-fit-dialog:is(#game-dialog, [id])[open] .ui-fit-scroll .switch-column label { min-height: 44px; margin: 0 !important; }
html.ui-fit-mobile body[class] dialog.ui-fit-dialog:is(#game-dialog, [id])[open] .ui-fit-scroll :is(.create-basics, .create-settings-section, .create-toggle-list, .ranked-minimum-panel) { padding: 8px !important; margin: 0 0 8px !important; gap: 8px !important; }
html.ui-fit-mobile body[class] dialog.ui-fit-dialog:is(#game-dialog, [id])[open] .ui-fit-scroll .create-settings-grid { grid-template-columns: repeat(2,minmax(0,1fr)) !important; gap: 0 10px !important; }
html.ui-fit-mobile body[class] dialog.ui-fit-dialog:is(#game-dialog, [id])[open] .ui-fit-scroll .create-toggle-list { display: grid !important; grid-template-columns: repeat(2,minmax(0,1fr)) !important; }
html.ui-fit-mobile body[class] dialog.ui-fit-dialog:is(#game-dialog, [id])[open] .ui-fit-scroll .toggle-card { min-height: 52px !important; padding: 8px !important; margin: 0 !important; }
html.ui-fit-mobile body[class] dialog.ui-fit-dialog:is(#game-dialog, [id])[open] .ui-fit-scroll .toggle-card small { display: none; }
html.ui-fit-mobile body[class] dialog.ui-fit-dialog:is(#game-dialog, [id])[open] .ui-fit-scroll .toggle-card strong { font-size: 13px !important; }
html.ui-fit-mobile body[class] dialog.ui-fit-dialog:is(#game-dialog, [id])[open] .ui-fit-scroll .segmented span { min-height: 44px !important; padding: 10px !important; }
html.ui-fit-mobile body[class] dialog.ui-fit-dialog:is(#game-dialog, [id])[open] .ui-fit-scroll .create-table-legal { margin: 4px 0 !important; }
html.ui-fit-mobile body[class] dialog.ui-fit-dialog:is(#game-dialog, [id])[open] .ui-fit-foot { flex: 0 0 auto; padding: 8px 0 0; border-top: 1px solid var(--line); margin-top: 4px; }
html.ui-fit-mobile body[class] dialog.ui-fit-dialog:is(#game-dialog, [id])[open] .ui-fit-foot > :is(div, form) {
  display: flex !important; flex-flow: row wrap !important; align-items: stretch !important;
  position: static !important; inset: auto !important; width: 100% !important; height: auto !important;
  min-height: 0 !important; gap: 6px !important; padding: 0 !important; margin: 0 !important;
  border: 0 !important; background: none !important;
}
html.ui-fit-mobile body[class] dialog.ui-fit-dialog:is(#game-dialog, [id])[open] .ui-fit-foot :is(button, a) {
  flex: 1 1 100px !important; width: auto !important; min-width: 0 !important; max-width: 100% !important;
  min-height: 44px !important; height: auto !important; margin: 0 !important; padding: 8px 10px !important;
  font-size: 13px !important; line-height: 1.2 !important; white-space: normal !important;
}
html.ui-fit-mobile body[class] dialog.ui-fit-dialog:is(#game-dialog, [id])[open] .ui-fit-foot > button { width: 100% !important; }
html.ui-fit-mobile body[class] dialog.ui-fit-dialog:is(#game-dialog, [id])[open] .ui-fit-scroll .compact-menu-tools { display: grid !important; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; margin: 8px 0; }
html.ui-fit-mobile body[class] dialog.ui-fit-dialog:is(#game-dialog, [id])[open] .ui-fit-scroll .compact-menu-tools button { min-height: 44px !important; padding: 6px !important; font-size: 13px !important; }
html.ui-fit-mobile body[class] dialog.ui-fit-dialog:is(#game-dialog, [id])[open] .ui-fit-scroll .menu-info-box { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 4px 12px; margin: 0; padding: 8px; }
html.ui-fit-mobile body[class] dialog.ui-fit-dialog:is(#game-dialog, [id])[open] .ui-fit-scroll .menu-info-row { display: flex; flex-wrap: wrap; min-width: 0; padding: 3px 0; font-size: 12px; gap: 3px 8px; }
html.ui-fit-mobile body[class] dialog.ui-fit-dialog:is(#game-dialog, [id])[open] .ui-fit-scroll .menu-info-row strong { overflow-wrap: anywhere; }
html.ui-fit-mobile body[class] dialog.ui-fit-dialog:is(#game-dialog, [id])[open] .ui-fit-scroll .rules-dialog-facts { margin: 0 0 10px; padding: 10px; }
html.ui-fit-mobile body[class] dialog.ui-fit-dialog:is(#game-dialog, [id])[open] .ui-fit-scroll .rules-dialog-list { padding-left: 18px; margin: 8px 0; font-size: 13px; }
html.ui-fit-mobile body[class] dialog.ui-fit-dialog:is(#game-dialog, [id])[open] .ui-fit-scroll .rules-pdf-link { padding: 10px; min-width: 0; }
html.ui-fit-mobile body[class] dialog.ui-fit-dialog:is(#game-dialog, [id])[open] .ui-fit-scroll .rules-pdf-link__copy { min-width: 0; }
html.ui-fit-mobile body[class] dialog.ui-fit-dialog:is(#game-dialog, [id])[open] .ui-fit-scroll .rules-pdf-link__copy strong { font-size: 14px; }
html.ui-fit-mobile body[class] dialog.ui-fit-dialog:is(#game-dialog, [id])[open] .ui-fit-scroll :is(.buy-checkout-layout, .sell-confirm-layout) { display: block !important; }
html.ui-fit-mobile body[class] dialog.ui-fit-dialog:is(#game-dialog, [id])[open] .ui-fit-scroll :is(.buy-showcase, .sell-confirm-showcase) { padding: 6px !important; min-height: 0 !important; }
html.ui-fit-mobile body[class] dialog.ui-fit-dialog:is(#game-dialog, [id])[open] .ui-fit-scroll .buy-preview { height: 90px !important; min-height: 0 !important; }
html.ui-fit-mobile body[class] dialog.ui-fit-dialog:is(#game-dialog, [id])[open] .ui-fit-scroll .buy-preview img { max-height: 90px !important; width: auto; object-fit: contain; }
html.ui-fit-mobile body[class] dialog.ui-fit-dialog:is(#game-dialog, [id])[open] .ui-fit-scroll :is(.buy-checkout-content, .sell-confirm-content) { padding: 8px !important; gap: 8px !important; }
html.ui-fit-mobile body[class] dialog.ui-fit-dialog:is(#game-dialog, [id])[open] .ui-fit-scroll :is(.buy-wallet-summary, .sell-confirm-financials) { padding: 8px !important; gap: 6px !important; margin: 8px 0 !important; }
html.ui-fit-mobile body[class] dialog.ui-fit-dialog:is(#game-dialog, [id])[open] .ui-fit-scroll :is(.buy-checkout-content, .sell-confirm-content) > .eyebrow { display: none; }
html.ui-fit-mobile body[class] dialog.ui-fit-dialog:is(#game-dialog, [id])[open] .ui-fit-scroll .open-hand-dialog-cards { max-height: none !important; overflow: visible !important; }
html.ui-fit-mobile body[class] dialog.ui-fit-dialog:is(#game-dialog, [id])[open] .ui-fit-head .open-hand-dialog-header { padding-right: 0 !important; }
html.ui-fit-mobile body[class] dialog.ui-fit-dialog:is(#game-dialog, [id])[open] .ui-fit-head:has(.open-hand-dialog-header) { padding-right: 0; }
.ui-fit-mobile .open-hand-dialog-x { min-width: 44px !important; min-height: 44px !important; }
html.ui-fit-wide body[class] dialog.ui-fit-dialog:is(#game-dialog, [id])[open] .ui-fit-scroll :is(.support-form-grid, .form-grid.two, .form-grid.three) { grid-template-columns: repeat(2,minmax(0,1fr)) !important; }
html.ui-fit-wide body[class] dialog.ui-fit-dialog:is(#game-dialog, [id])[open] .ui-fit-scroll :is(.buy-checkout-layout, .sell-confirm-layout) { display: grid !important; grid-template-columns: 130px minmax(0,1fr) !important; gap: 8px; }
html.ui-fit-short body[class] dialog.ui-fit-dialog:is(#game-dialog, [id])[open] .ui-fit-head { min-height: 38px; padding-bottom: 6px; }
html.ui-fit-short body[class] dialog.ui-fit-dialog:is(#game-dialog, [id])[open] .ui-fit-head h2 { font-size: 18px !important; }
html.ui-fit-short body[class] dialog.ui-fit-dialog:is(#game-dialog, [id])[open] > .ui-fit-shell { padding: 8px !important; }
html.ui-fit-short body[class] dialog.ui-fit-dialog:is(#game-dialog, [id])[open] .ui-fit-foot { padding-top: 6px; margin-top: 2px; }
.ui-fit-widehtml.ui-fit-short body[class] dialog.ui-fit-dialog:is(#game-dialog, [id])[open] .ui-fit-scroll .compact-menu-tools { grid-template-columns: repeat(4,minmax(0,1fr)); }
.ui-fit-widehtml.ui-fit-short body[class] dialog.ui-fit-dialog:is(#game-dialog, [id])[open] .ui-fit-scroll .menu-info-box { grid-template-columns: repeat(3,minmax(0,1fr)); }

/* Lobby density: tables first, secondary sections below, stable touch targets. */
.ui-fit-mobile body.lobby-page:not(.profile-page) .lobby-app-shell { padding-top: 12px !important; }
.ui-fit-mobile .app-intro { gap: 10px; margin-bottom: 12px; }
.ui-fit-mobile .app-intro p { margin-bottom: 0; }
.ui-fit-mobile body.lobby-page .app-intro h1 { font-size: 25px; line-height: 1.1; }
.ui-fit-mobile body.lobby-page .lobby-card { padding: 10px 12px !important; }
.ui-fit-mobile body.lobby-page .lobby-card h3 { margin-bottom: 6px !important; }
.ui-fit-mobile .app-table-top { margin-bottom: 6px; }
.ui-fit-mobile .app-table-facts { margin-bottom: 8px; }
.ui-fit-mobile body.lobby-page .lobby-card footer { padding-top: 8px !important; }
.ui-fit-mobile .app-kind-filter { min-width: 0; }
.ui-fit-mobile .app-filters { flex-wrap: wrap; }
.ui-fit-mobile .app-mode-filter { min-width: 0; }
.ui-fit-mobile .app-kind-filter select { min-height: 44px !important; }
.ui-fit-mobile body.lobby-page .room-head { gap: 6px; }
.ui-fit-mobile body.lobby-page .room-head h2 { font-size: 22px; margin: 0; }
.ui-fit-mobile body.lobby-page .room-controls { display: flex; flex-wrap: wrap; gap: 6px; }
.ui-fit-mobile body.lobby-page .room-controls > * { flex: 1; min-height: 44px; }
.ui-fit-mobile body.lobby-page .seat-grid { margin-block: 10px !important; }
.ui-fit-short body.lobby-page:not(.profile-page) .lobby-bar { position: relative !important; }
.ui-fit-short body.lobby-page .lobby-app-shell { padding-top: 8px !important; }
.ui-fit-short .app-intro { margin-bottom: 8px; }
.ui-fit-short .app-intro p, .ui-fit-short .app-intro .app-kicker { display: none; }
.ui-fit-short body.lobby-page .seat-card { min-height: 80px !important; padding: 6px !important; }
.ui-fit-short body.lobby-page .seat-avatar { width: 28px !important; height: 28px !important; }
.ui-fit-short body.lobby-page .room-footer { flex-direction: row !important; }
.ui-fit-short body.lobby-page .room-footer > * { min-width: 0; flex: 1; min-height: 44px !important; }

/* Shared navigation and secondary surfaces keep their own appearance. */
.ui-fit-mobile :is(.profile-tabs, .profile-tab-nav, .academy-book-tabs, .academy-module-tabs) { min-width: 0; max-width: 100%; overflow-x: auto; scroll-padding-inline: 8px; }
.ui-fit-mobile :is(.profile-tabs, .profile-tab-nav) button { min-height: 44px !important; }
.ui-fit-mobile body.profile-page .profile-top-nav > a[href="lobby"],
.ui-fit-mobile body.profile-page .profile-top-nav .profile-nav-icon { min-height: 44px !important; height: 44px !important; }
.ui-fit-mobile body.profile-page .profile-top-nav .profile-nav-icon { min-width: 44px !important; width: 44px !important; }
.ui-fit-mobile :is(.pack-opening-mobile-layer, .inventory-card-viewer-mobile-layer) {
  top: var(--fit-top) !important; left: var(--fit-left) !important; right: auto !important; bottom: auto !important;
  width: var(--fit-width) !important; height: var(--fit-height) !important; max-height: var(--fit-height) !important;
  overflow-y: auto !important; overscroll-behavior: contain;
}
.ui-fit-mobile :is(.pack-opening-shell, .inventory-card-viewer-shell) { max-width: 100% !important; max-height: calc(var(--fit-height) - 16px) !important; overflow-y: auto !important; }
.ui-fit-mobile .toast-stack { max-width: calc(var(--fit-width) - 20px); }
html.ui-fit-mobile body.game-page #game-dialog .ui-fit-menu-connection { margin: 6px 0; border: 1px solid var(--line); border-radius: 10px; }
html.ui-fit-mobile body.game-page #game-dialog .ui-fit-menu-connection > summary { min-height: 44px; padding: 12px 10px; font-size: 13px; cursor: pointer; color: var(--gold-bright); }
html.ui-fit-mobile body.game-page #game-dialog .ui-fit-menu-recovery { display: flex; gap: 6px; padding: 8px; }
html.ui-fit-mobile body.game-page #game-dialog .ui-fit-menu-recovery button { flex: 1; min-height: 44px; padding: 6px; font-size: 13px; }
html.ui-fit-wide.ui-fit-short body.game-page #game-dialog.ui-fit-dialog .ui-fit-scroll .compact-menu-tools { grid-template-columns: repeat(4,minmax(0,1fr)) !important; }

/* The gift picker has the same hierarchy: context, recipient, list, action. */
html.ui-fit-mobile body.game-page .gift-picker-backdrop {
  position: fixed !important; inset: auto !important; top: var(--fit-top) !important; left: var(--fit-left) !important;
  width: var(--fit-width) !important; height: var(--fit-height) !important;
  display: flex !important; align-items: center !important; justify-content: center !important;
  padding: calc(var(--fit-safe-top) + var(--fit-gap)) calc(var(--fit-safe-right) + var(--fit-gap)) calc(var(--fit-safe-bottom) + var(--fit-gap)) calc(var(--fit-safe-left) + var(--fit-gap)) !important;
}
html.ui-fit-mobile body.game-page .gift-picker-sheet {
  display: flex !important; flex-direction: column !important; width: min(620px,100%) !important;
  min-width: 0 !important; max-width: 100% !important; height: auto !important; min-height: 0 !important; max-height: 100% !important;
  padding: 8px !important; gap: 6px !important; overflow: hidden !important;
}
html.ui-fit-mobile body.game-page .gift-picker-sheet > :is(header,footer),
html.ui-fit-mobile body.game-page .gift-picker-scope { flex: 0 0 auto; padding: 0 !important; margin: 0 !important; }
html.ui-fit-mobile body.game-page .gift-picker-sheet h3 { font-size: 18px; margin: 0; }
html.ui-fit-mobile body.game-page .gift-picker-sheet header p { font-size: 13px; margin: 4px 0; }
html.ui-fit-mobile body.game-page .gift-picker-close { min-width: 44px !important; min-height: 44px !important; }
html.ui-fit-mobile body.game-page .gift-picker-scope { gap: 6px; }
html.ui-fit-mobile body.game-page .gift-picker-scope button { min-height: 44px !important; padding: 6px 8px !important; font-size: 13px; }
html.ui-fit-mobile body.game-page .gift-picker-items { flex: 1 1 auto; min-height: 0 !important; max-height: none !important; overflow: auto !important; overscroll-behavior: contain; padding: 2px !important; gap: 6px; }
html.ui-fit-mobile body.game-page .gift-picker-item { min-height: 60px !important; padding: 6px !important; }
html.ui-fit-mobile body.game-page .gift-picker-item__visual { width: 42px; height: 42px; }
html.ui-fit-mobile body.game-page .gift-picker-sheet footer { display: flex !important; flex-flow: row nowrap !important; align-items: center; gap: 8px; }
html.ui-fit-mobile body.game-page .gift-picker-sheet footer small { flex: 1; font-size: 11px; line-height: 1.3; }
html.ui-fit-mobile body.game-page .gift-picker-send { flex: 1; min-width: 0; min-height: 44px !important; padding: 6px 8px !important; font-size: 13px; white-space: normal; }
html.ui-fit-short body.game-page .gift-picker-sheet header :is(p, [data-gift-mode-kicker]) { display: none; }
html.ui-fit-short body.game-page .gift-picker-scope button { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 4px; }
html.ui-fit-wide body.game-page .gift-picker-items { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
html.ui-fit-mobile body.game-page .player-social-menu { max-width: calc(var(--fit-width) - 24px); max-height: calc(var(--fit-height) - 80px); overflow-y: auto; }
html.ui-fit-mobile body.game-page .player-social-menu__actions button { min-height: 44px; }
html.ui-fit-mobile body.lobby-page .app-account-menu {
  position: fixed; top: calc(var(--fit-top) + var(--fit-safe-top) + 58px); right: max(10px,var(--fit-safe-right));
  max-width: calc(var(--fit-width) - 20px); max-height: calc(var(--fit-height) - var(--fit-safe-top) - var(--fit-safe-bottom) - 68px);
  overflow-y: auto; overscroll-behavior: contain;
}
html.ui-fit-mobile body.game-page :is(#talon-review-overlay, #live-scoreboard.score-open) {
  position: fixed !important; inset: auto !important; top: var(--fit-top) !important; left: var(--fit-left) !important;
  width: var(--fit-width) !important; height: var(--fit-height) !important; min-height: 0 !important; max-height: none !important;
  display: flex !important; align-items: center !important; justify-content: center !important; transform: none !important;
  padding: calc(var(--fit-safe-top) + var(--fit-gap)) calc(var(--fit-safe-right) + var(--fit-gap)) calc(var(--fit-safe-bottom) + var(--fit-gap)) calc(var(--fit-safe-left) + var(--fit-gap)) !important;
}
html.ui-fit-mobile body.game-page :is(.talon-review-dialog, #live-scoreboard .mobile-score-sheet) {
  display: flex !important; flex-direction: column !important; position: relative !important; inset: auto !important;
  width: min(720px,100%) !important; min-width: 0 !important; max-width: 100% !important;
  height: auto !important; min-height: 0 !important; max-height: 100% !important;
  padding: 8px !important; gap: 6px !important; overflow: hidden !important; transform: none !important;
}
html.ui-fit-mobile body.game-page :is(.talon-review-header, .mobile-score-head) { flex: 0 0 auto; min-height: 44px !important; padding: 0 !important; margin: 0 !important; }
html.ui-fit-mobile body.game-page :is(.talon-review-close, .talon-review-done, .mobile-score-close) { min-height: 44px !important; min-width: 44px !important; padding: 6px 10px !important; font-size: 14px !important; flex-shrink: 0; }
html.ui-fit-mobile body.game-page :is(.talon-review-packs, .talon-review-dialog > .talon-review-cards, .mobile-score-body) { flex: 1 1 auto; min-height: 0 !important; max-height: none !important; overflow: auto !important; overscroll-behavior: contain; padding: 2px !important; margin: 0 !important; }
html.ui-fit-mobile body.game-page .talon-review-copy { font-size: 13px; margin: 0 0 4px; }
html.ui-fit-mobile body.game-page .talon-review-pack { padding: 6px !important; min-width: 0 !important; }
html.ui-fit-mobile body.game-page .talon-review-cards figure { min-width: 0; }
html.ui-fit-mobile body.game-page .talon-review-cards img { width: auto !important; height: clamp(64px,calc(var(--fit-height) - 185px),150px) !important; max-width: 100%; object-fit: contain; }
html.ui-fit-short body.game-page .talon-review-copy, html.ui-fit-short body.game-page .talon-review-header small { display: none; }
html.ui-fit-short body.game-page .talon-review-pack__header { padding: 0 !important; margin-bottom: 4px; font-size: 11px; }
html.ui-fit-mobile body.game-page .talon-review-done { margin: 0 !important; }
html.ui-fit-short body.game-page .talon-review-header h3 { font-size: 18px !important; margin: 0 !important; }
html.ui-fit-short body.game-page .talon-review-packs { grid-template-columns: repeat(2,minmax(0,1fr)) !important; gap: 6px !important; }
html.ui-fit-short body.game-page .talon-review-packs[data-pack-count="3"] { grid-template-columns: repeat(3,minmax(0,1fr)) !important; }
html.ui-fit-short body.game-page .talon-review-packs[data-pack-count="6"] { grid-template-columns: repeat(6,minmax(0,1fr)) !important; }
html.ui-fit-short body.game-page .talon-review-pack { min-height: 0 !important; height: auto !important; padding: 4px !important; }
html.ui-fit-short body.game-page .talon-review-pack__header { min-height: 0 !important; flex-direction: row !important; margin: 0 0 3px !important; }
html.ui-fit-short body.game-page .talon-review-pack__title { font-size: 12px !important; line-height: 1.2; }
html.ui-fit-short body.game-page .talon-review-pack__badge { display: none; }
html.ui-fit-short body.game-page .talon-review-cards.is-pack-view { display: flex !important; align-items: center; justify-content: center; gap: 4px !important; padding: 2px !important; }
html.ui-fit-short body.game-page .talon-review-cards figcaption { display: none; }
html.ui-fit-mobile body.game-page #live-scoreboard .scorepad { height: auto !important; max-height: none !important; }
html.ui-fit-mobile body.game-page #live-scoreboard .scorepad-scroll { height: auto !important; max-height: none !important; overflow: visible !important; }
html.ui-fit-mobile body.game-page #live-scoreboard .mobile-score-head { min-height: 44px !important; padding: 0 !important; }
html.ui-fit-mobile body.game-page #live-scoreboard .mobile-score-close { min-height: 44px !important; padding: 6px 10px !important; font-size: 14px !important; }
html.ui-fit-mobile #certificate-dialog, html.ui-fit-mobile .tt-certificate-lightbox__viewport { max-width: calc(var(--fit-width) - 16px) !important; max-height: calc(var(--fit-height) - var(--fit-safe-top) - var(--fit-safe-bottom) - 16px) !important; }
html.ui-fit-mobile #certificate-dialog .tt-certificate-lightbox__close { position: sticky !important; top: 4px !important; float: right; width: 44px !important; height: 44px !important; margin: 4px 4px -48px 0 !important; z-index: 5; }
@media (max-width: 359px) {
  .ui-fit-mobile .app-filters { gap: 6px; }
  .ui-fit-mobile .app-kind-filter select { width: 112px; padding-left: 6px; }
  .ui-fit-mobile .app-seat-line { flex-wrap: wrap; gap: 4px; }
  html.ui-fit-mobile body[class] dialog.ui-fit-dialog:is(#game-dialog, [id])[open] .ui-fit-scroll .create-toggle-list { grid-template-columns: 1fr !important; }
}

/* One compact setup form in landscape. No duplicate controls or hidden panes. */
@media (orientation:landscape) and (max-height:500px) and (max-width:1180px) {
  html.ui-fit-mobile body.lobby-page #create-dialog #create-form { width:min(940px,100%)!important; height:auto!important; padding:8px!important; }
  html.ui-fit-mobile body.lobby-page #create-dialog #create-form .ui-fit-head { min-height:36px; padding:0 42px 6px 0; }
  html.ui-fit-mobile body.lobby-page #create-dialog #create-form .ui-fit-head h2 { font-size:18px!important; }
  html.ui-fit-mobile body.lobby-page #create-dialog #create-form .ui-fit-scroll { align-content:start; display:grid!important; grid-template-columns:repeat(4,minmax(0,1fr)); grid-auto-rows:max-content; gap:10px 12px; padding:2px 0 8px; align-items:end; }
  html.ui-fit-mobile body.lobby-page #create-dialog #create-form :is(.create-basics,.create-settings-section,.create-settings-grid,.create-toggle-list) { display:contents!important; }
  html.ui-fit-mobile body.lobby-page #create-dialog #create-form :is(.create-settings-section > h3,.create-table-legal,.toggle-card small,.ranked-minimum-copy) { display:none!important; }
  html.ui-fit-mobile body.lobby-page #create-dialog #create-form label { margin:0!important; gap:3px!important; font-size:12px!important; line-height:14px!important; }
  html.ui-fit-mobile body.lobby-page #create-dialog #create-form :is(.setting-field,.create-name-field) { display:grid!important; grid-template-columns:minmax(0,1fr); padding:0!important; }
  html.ui-fit-mobile body.lobby-page #create-dialog #create-form :is(.setting-field,.create-name-field) > span:first-child { font-size:12px!important; line-height:14px!important; margin:0!important; padding:0!important; min-height:0!important; }
  html.ui-fit-mobile body.lobby-page #create-dialog #create-form .segmented label { min-height:36px!important; }
  html.ui-fit-mobile body.lobby-page #create-dialog #create-form .create-name-field { grid-column:1 / 3; }
  html.ui-fit-mobile body.lobby-page #create-dialog #create-form .player-count-fieldset { grid-column:3 / 5; grid-row:1; padding:0!important; margin:0!important; }
  html.ui-fit-mobile body.lobby-page #create-dialog #create-form:has(#ranked-toggle-input:checked) .player-count-fieldset { grid-column:3; }
  html.ui-fit-mobile body.lobby-page #create-dialog #create-form .player-count-fieldset legend { font-size:12px; margin:0 0 3px; padding:0; }
  html.ui-fit-mobile body.lobby-page #create-dialog #create-form .ranked-minimum-panel:not([hidden]) { display:block!important; grid-column:4; grid-row:1; padding:0!important; margin:0!important; border:0; background:none; }
  html.ui-fit-mobile body.lobby-page #create-dialog #create-form :is(input:not([type=checkbox]):not([type=radio]),select,.segmented span) { min-height:36px!important; height:36px!important; padding:5px 7px!important; }
  html.ui-fit-mobile body.lobby-page #create-dialog #create-form .segmented { padding:0!important; gap:3px!important; }
  html.ui-fit-mobile body.lobby-page #create-dialog #create-form .segmented span { font-size:12px!important; }
  html.ui-fit-mobile body.lobby-page #create-dialog #create-form .toggle-card { min-height:36px!important; height:36px!important; padding:4px 7px!important; border:1px solid #395244; border-radius:8px; }
  html.ui-fit-mobile body.lobby-page #create-dialog #create-form .toggle-card strong { font-size:12px!important; }
  html.ui-fit-mobile body.lobby-page #create-dialog #create-form .ui-fit-foot { padding-top:6px!important; margin-top:0; }
  html.ui-fit-mobile body.lobby-page #create-dialog #create-form .ui-fit-foot button { min-height:36px!important; padding:6px!important; }
}
@media (orientation:landscape) and (max-height:280px) {
  html.ui-fit-mobile body.lobby-page #create-dialog #create-form { padding:4px!important; }
  html.ui-fit-mobile body.lobby-page #create-dialog #create-form .ui-fit-head { min-height:24px; padding-bottom:2px; }
  html.ui-fit-mobile body.lobby-page #create-dialog #create-form .dialog-close { min-width:32px!important; min-height:32px!important; width:32px!important; height:32px!important; top:2px!important; right:4px!important; }
  html.ui-fit-mobile body.lobby-page #create-dialog #create-form .ui-fit-scroll { gap:2px 8px; padding:0; }
  html.ui-fit-mobile body.lobby-page #create-dialog #create-form label { gap:1px!important; font-size:11px!important; }
  html.ui-fit-mobile body.lobby-page #create-dialog #create-form .player-count-fieldset legend { font-size:11px; margin-bottom:1px; }
}
