/* UI surfaces only: card artwork and the game data keep their own styles. */
body.approved-site :is(#soloDraftSetupPanel,#auctionSetupPanel,#draftSetupPanel){
  width:min(760px,calc(100% - 32px))!important;
  max-width:760px!important;
  box-sizing:border-box!important;
  padding:24px!important;
  margin:24px auto!important;
  max-height:calc(100dvh - 168px);
  overflow-y:auto;
}
body.approved-site #roomScreen{width:min(1120px,calc(100% - 32px))!important;max-width:1120px!important;box-sizing:border-box!important}
body.approved-site :is(#soloDraftSetupPanel,#auctionSetupPanel,#draftSetupPanel) .form-group{margin-bottom:18px!important}
body.approved-site #soloDraftSetupPanel>p{margin-bottom:20px!important}
body.approved-site #soloDraftSetupPanel .neon-pill-group{gap:8px!important}
body.approved-site #soloDraftSetupPanel .neon-pill{flex:0 1 auto!important;padding:9px 15px!important}
body.approved-site .hub-dialog-card{width:min(620px,calc(100vw - 32px))!important;box-sizing:border-box!important}
body.approved-site #historyResModal{top:68px!important;box-sizing:border-box;max-height:calc(100dvh - 136px);overflow:auto}

html[data-fc-theme=light] body.approved-site{
  --hub-text:#302015;
  --hub-muted:#645548;
  --hub-bronze:#83501f;
  --hub-line:#986e4145;
  --hub-surface:#faf5ec;
  --hub-panel:#f3eadb;
  --text:var(--hub-text);
  --muted:var(--hub-muted);
  --surface:var(--hub-surface);
  --surface2:var(--hub-panel);
  --hub:var(--hub-bronze);
  --accent:var(--hub-bronze);
  --blue:var(--hub-bronze);
}
/* Remove the dark-only backgrounds from light dialogs and their nested panels. */
html[data-fc-theme=light] body.approved-site :is(
  .login-card,.feedback-card,.site-confirm-card,.profile-modal,.profiles-modal,
  .modal-box,.modal-content,.draft-modal-content,.patchnotes-modal,.guide-container,
  .db-modal,.hub-dialog-card,#historyResModal,.account-panel,.activity-widget,
  .active-users-widget,#hostControlsWidget,.chat-widget,.manager-sneak-window,.ut-test-gate-card
){background:var(--hub-surface)!important;color:var(--hub-text)!important;border-color:var(--hub-line)!important;box-shadow:0 12px 36px #28170825!important}
html[data-fc-theme=light] body.approved-site :is(
  .guide-section,.guide-card,.patchnotes-card,.db-list,.db-item,.profiles-card,
  .profiles-mini-stat,.profile-public-stat,.profile-public-panel,.profile-public-hero,
  .profile-section,.profile-stat,.profile-preview,.profile-field,.chat-context,
  .chat-group-tools,.chat-group-panel,.chat-input-row,.chat-tabs,.chat-channel-tabs,.history-day-nav,
  .active-user-row,.mode-choice-card,.draft-category-group,.hub-room-info,
  .hub-room-roster,.hub-draft-roster,.draft-continue-panel,.draft-presence-panel,
  .bid-controls,.auction-area,.player-card,.inventory,.hold-squad-panel,
  .profiles-sort-menu,.profiles-sort-option,.profile-board-row,.profile-security,
  .leaderboard-row,.leaderboard-table,.manager-sneak-titlebar,.profile-public-board,.profile-row
){background:var(--hub-panel)!important;color:var(--hub-text)!important;border-color:var(--hub-line)!important}

/* Legacy inline white/grey labels must not override the theme's text palette.
   Never apply this reset to a player card, photo avatar, or image caption. */
html[data-fc-theme=light] body.approved-site :where(
  .login-card,.feedback-card,.site-confirm-card,.profile-modal,.profiles-modal,
  .modal-box,.modal-content,.draft-modal-content,.patchnotes-modal,.guide-container,
  .db-modal,.hub-dialog-card,#historyResModal,.account-panel,.activity-widget,
  .active-users-widget,#hostControlsWidget,.chat-widget,.container,.hub-page-source,
  .manager-sneak-window,.ut-test-gate-card
) :is(h1,h2,h3,h4,p,li,label,strong,b,small,span,em,td,th,a,[style*="color:"],
  .act-text,.history-day-label,.chat-message,.chat-text,.chat-author,.chat-header,
  .login-title,.login-subtitle,.auth-note,.mode-title,.mode-desc,.guide-h2,.guide-p,
  .profiles-card-name,.profiles-mini-value,.profile-public-name,.profile-public-bio,
  .profile-public-section-title,.profile-public-stat-value,.db-item,.neon-pill,div:not(:has(*))
):not(.approved-card,.approved-card *, .pack-card,.pack-card *,
  .profiles-avatar,.profiles-avatar *, .profile-public-avatar,.profile-public-avatar *,
  .card-image-wrap *, .profile-public-owner-tag,.profiles-card-badge){
  color:var(--hub-text)!important;text-shadow:none!important;
}
html[data-fc-theme=light] body.approved-site :is(
  .act-time,.history-day-counter,.account-panel-meta,.chat-char-count,
  .chat-context,.chat-time,.login-subtitle,.auth-note,.profiles-card-meta,
  .profiles-mini-label,.profiles-empty,.profile-public-meta,.profile-public-stat-label,
  .profile-meta,.profile-stat-label,.profiles-head-sub,.profiles-count,.leaderboard-explainer,.leaderboard-empty,
  .guide-subtitle,.mode-desc,.filter-label,.chat-msg-time
){color:var(--hub-muted)!important;text-shadow:none!important}
html[data-fc-theme=light] body.approved-site :is(
  .chat-header,.chat-tabs,.activity-widget-header,.active-users-header,.act-item,
  .guide-header-sticky,.patchnotes-header,.profiles-header,.profile-header,
  .db-item,.profile-public-panel
){border-color:var(--hub-line)!important}
html[data-fc-theme=light] body.approved-site :is(.chat-header,.guide-header-sticky,.patchnotes-header,.profiles-header){background:var(--hub-surface)!important;color:var(--hub-text)!important}
html[data-fc-theme=light] body.approved-site :is(
  .auth-tab,.password-toggle,.profile-tab,.profiles-tab,.chat-tab,.chat-channel-tab,.chat-group-tools button,
  .history-day-arrow,.active-users-widget button,.account-panel button,
  .db-modal button,.hub-page-source button,.modal-box button,.site-confirm-card button
){background:var(--hub-panel)!important;color:var(--hub-text)!important;border-color:var(--hub-line)!important}
html[data-fc-theme=light] body.approved-site :is(.auth-tab.active,.chat-tab.active,.chat-channel-tab.active,.profile-tab.active,.profiles-tab.active,.neon-pill.active){background:#e6d1ad!important;color:#382515!important;border-color:#83501f!important;box-shadow:inset 0 0 0 1px #83501f25!important}
html[data-fc-theme=light] body.approved-site :is(.container,.hub-dialog-card,.login-card,.feedback-card,.profile-modal,.profiles-modal) :is(button.primary,.btn-enter-server,button[type=submit]){background:#83501f!important;color:#fffaf3!important;text-shadow:none!important}
html[data-fc-theme=light] body.approved-site :is(.container,.hub-dialog-card) button{background:var(--hub-panel)!important;color:#302015!important;text-shadow:none!important;border-color:var(--hub-line)!important}
html[data-fc-theme=light] body.approved-site :is(.container,.hub-dialog-card) :is(button.primary,button[type=submit],.bronze-action-btn,#startAuctionBtn,#startMultiplayerDraftBtn,#createLobbySection>button){background:#83501f!important;color:#fffaf3!important}
html[data-fc-theme=light] body.approved-site .container button[style*="var(--danger)"]{background:#9c2823!important;color:#fffaf3!important}
html[data-fc-theme=light] body.approved-site :is(input,textarea,select):not([type=range]){color:#302015!important;background:#fffdf8!important;border-color:#96734f!important}
html[data-fc-theme=light] body.approved-site :is(input,textarea)::placeholder{color:#706052!important;opacity:1!important}
html[data-fc-theme=light] body.approved-site :is(.auth-error,.feedback-error){color:#9c2823!important;background:#fff0eb!important}
html[data-fc-theme=light] body.approved-site :is(.mode-status-badge,.profiles-online,.profile-public-role){color:#315331!important;background:#e7eddf!important;border-color:#708366!important}
html[data-fc-theme=light] body.approved-site :is(.profiles-offline,.profile-public-owner-tag,.profiles-card-badge){color:#fffaf3!important;background:#453728!important}
html[data-fc-theme=light] body.approved-site .login-card::after{display:none!important}
html[data-fc-theme=light] body.approved-site .card-toolbar button{background:var(--hub-panel)!important;color:var(--hub-text)!important;border-color:var(--hub-line)!important}
html[data-fc-theme=light] body.approved-site .community-panel .archive{background:#83501f!important;color:#fffaf3!important}
html[data-fc-theme=light] body.approved-site :is(.profile-close,.feedback-close,.site-confirm-close,.manager-sneak-close,.ut-test-gate-close,.hub-dialog-close,.patchnotes-close,.guide-close,.db-close){background:var(--hub-panel)!important;color:var(--hub-text)!important;border-color:var(--hub-line)!important}
html[data-fc-theme=light] body.approved-site :is(.manager-sneak-submit,.ut-test-gate-submit){background:#83501f!important;color:#fffaf3!important}
html[data-fc-theme=light] body.approved-site #draftOptionsModal #packTitle{color:var(--hub-text)!important;text-shadow:none!important}
/* The collapsed chat dock is intentionally black in both themes. */
html[data-fc-theme=light] body.approved-site .hub-footer-left .visitors,
html[data-fc-theme=light] body.approved-site .hub-footer-left .visitors span{color:#d0c4b4!important}
html[data-fc-theme=light] body.approved-site .hub-footer-left .visitors b{color:#e4b478!important}
@media(min-width:1001px) and (max-width:1750px){
  body.approved-site :is(#soloDraftSetupPanel,#auctionSetupPanel,#draftSetupPanel){max-height:calc(100dvh - 188px)}
  body.approved-site #historyResModal{top:108px!important;max-height:calc(100dvh - 176px)}
}
@media(max-width:1000px){
  body.approved-site :is(#soloDraftSetupPanel,#auctionSetupPanel,#draftSetupPanel){max-height:calc(100dvh - 212px)}
  body.approved-site #historyResModal{top:144px!important;right:8px!important;width:min(320px,calc(100vw - 16px))!important;max-height:calc(100dvh - 216px)}
}
@media(max-width:650px){
  body.approved-site :is(#soloDraftSetupPanel,#auctionSetupPanel,#draftSetupPanel){width:calc(100% - 16px)!important;padding:16px!important;margin:12px auto!important}
  body.approved-site #soloDraftSetupPanel .form-group>div:first-child{gap:8px!important;flex-wrap:wrap!important}
  body.approved-site #soloDraftSetupPanel .mode-choice-card{padding:14px!important;min-width:0!important}
}

/* Play lobby actions are independent cards, with no shared painted surface. */
body.approved-site #hubPlay .lobby-bar{
  display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:16px!important;background:transparent!important;border:0!important;
  box-shadow:none!important;overflow:visible!important;padding:0!important;
}
body.approved-site #hubPlay .lobby-bar>button{
  border:1px solid var(--hub-line)!important;border-radius:10px!important;
  background:var(--hub-panel)!important;color:var(--hub-text)!important;
  transition:border-color .15s,box-shadow .15s!important;
}
body.approved-site #hubPlay .lobby-bar>button:hover,
body.approved-site #hubPlay .lobby-bar>button:focus-visible{
  border-color:var(--hub-bronze)!important;box-shadow:inset 0 0 0 1px var(--hub-bronze)!important;
}
body.approved-site #hubPlay .lobby-bar>button[data-modal="Create Lobby"]{
  background:linear-gradient(115deg,#ad793d,#744821)!important;color:#fffaf0!important;
}
body.approved-site #hubPlay .lobby-bar>button[data-modal="Create Lobby"] :is(b,strong,small,em){color:#fffaf0!important}
@media(max-width:650px){body.approved-site #hubPlay .lobby-bar{grid-template-columns:1fr!important;gap:12px!important}}
body.approved-site #hubPlay .mode.m1{background-image:url('/assets/approved-ui/mode-auction-color-v1.png')!important}
body.approved-site #hubPlay .mode.m2{background-image:url('/assets/approved-ui/mode-draft-color-v1.png')!important}
body.approved-site #hubPlay .mode.m3{background-image:url('/assets/approved-ui/mode-team-color-v1.png')!important}
body.approved-site #hubPlay .mode.m4{background-image:url('/assets/approved-ui/mode-solo-color-v1.png')!important}
body.approved-site #hubPlay .lobby-bar{flex-shrink:0!important;min-height:70px!important}
@media(min-width:651px) and (max-height:850px){
  body.approved-site #hubPlay{padding-top:20px!important;padding-bottom:24px!important}
  body.approved-site #hubPlay .mode{padding:14px 18px!important}
  body.approved-site #hubPlay .lobby-bar{margin-top:16px!important}
}
