/* One browser preference across public pages and the application shell. */
html[data-theme="light"] {
  color-scheme: light;
  --fn-bg: #eff5ed;
  --fn-canvas: #eff5ed;
  --fn-sidebar: #e0eee2;
  --fn-surface: #ffffff;
  --fn-surface-elevated: #f8fcf8;
  --fn-surface-subtle: #e6f1e8;
  --fn-border: #b7cebd;
  --fn-border-strong: #8fb19a;
  --fn-line: #b7cebd;
  --fn-text: #172d1e;
  --fn-text-secondary: #365441;
  --fn-text-muted: #526e5b;
  --fn-text-disabled: #769482;
  --fn-text-inverse: #ffffff;
  --fn-muted: #526e5b;
  --fn-accent: #187b4c;
  --fn-accent-hover: #11663e;
  --fn-brand: #187b4c;
  --fn-brand-hover: #11663e;
  --fn-brand-pressed: #0e5534;
  --fn-brand-soft: #d7edde;
  --fn-brand-border: #8fbea0;
  --fn-interactive: #176c46;
  --fn-focus: #187b4c;
  --fn-info: #245e9b;
  --fn-info-soft: #e0edf9;
  --fn-warning: #8b5a12;
  --fn-warning-soft: #f9edd5;
  --fn-danger: #b53037;
  --fn-danger-soft: #fae3e4;
  --fn-success: #187b4c;
  --fn-success-soft: #d7edde;
  --fn-shadow-menu: 0 12px 32px rgb(28 61 38 / 15%);
  --fn-shadow-dialog: 0 24px 64px rgb(28 61 38 / 22%);
}

.app-theme-toggle,.app-mobile-theme,.site-floating-theme {
  display:flex;align-items:center;justify-content:center;gap:10px;min-height:38px;
  border:1px solid var(--fn-border,#395345);border-radius:8px;
  color:var(--fn-text,#f1f6f3);background:var(--fn-surface-subtle,#1b2621);
  font:700 12px/1.2 var(--fn-font-ui,system-ui);cursor:pointer;
}
.app-theme-toggle{width:calc(100% - 20px);margin:auto 10px 10px;padding:9px 11px;justify-content:flex-start;min-height:42px;border-color:transparent;background:transparent;color:var(--shell-muted);font:600 14px/1.2 var(--fn-font-ui,system-ui)}
.app-theme-toggle>span:first-child{display:inline-flex;flex:0 0 20px;justify-content:center;font-size:18px;line-height:1;color:var(--shell-accent)}
.app-theme-toggle .app-sidebar-label{white-space:nowrap}
.app-mobile-theme{width:38px;min-width:38px;margin-left:auto;font-size:17px}
.site-floating-theme{position:fixed;right:16px;bottom:16px;z-index:1200;padding:9px 13px;box-shadow:var(--fn-shadow-menu,0 12px 32px #0005)}
.fn-auth .site-floating-theme{width:auto;margin:0}
.theme-toggle:hover,.theme-toggle[aria-pressed="true"]{border-color:var(--fn-brand,#55dc9c);background:var(--fn-brand-soft,#193526)}
.theme-toggle:focus-visible{outline:2px solid var(--fn-focus,#75eab4);outline-offset:3px}
body.shell-collapsed .app-theme-toggle{width:40px;justify-content:center;margin-inline:auto}
.app-sidebar .app-theme-toggle:hover,.app-sidebar .app-theme-toggle[aria-pressed="true"]:hover{border-color:transparent;color:var(--shell-text);background:var(--shell-hover)}
.app-sidebar .app-theme-toggle[aria-pressed="true"]{border-color:transparent;background:transparent}
@media(max-width:860px){body.shell-collapsed .app-theme-toggle{width:calc(100% - 20px);justify-content:flex-start;margin-inline:10px}}
@media(min-width:861px){.app-mobile-theme{display:none}}

html[data-theme="light"] body:has(.app-sidebar){color:var(--fn-text);background:var(--fn-canvas)}
html[data-theme="light"] :is(.container,.shell,.page-shell,.fn-main):has(.app-sidebar){color:var(--fn-text);background:var(--fn-canvas)}
html[data-theme="light"] .app-sidebar .app-membership-reminder--warning{color:#67420a;background:#fbefd7}
html[data-theme="light"] .app-sidebar .app-membership-reminder--urgent{color:#88272b;background:#fae5e5}
html[data-theme="light"] .app-membership-status{color:#167348}
html[data-theme="light"] .app-membership-status--warning{color:#93600f}
html[data-theme="light"] .app-membership-status--urgent{color:#a72b32}

/* Older trainer and analysis panels still use literal dark colors. */
html[data-theme="light"] body:has(.app-sidebar) :is(.panel,.card,.card-section,.stat-box,.summary-section,.hand-header,.bot-card,.filter-row,.tab-bar,.tab-btn,.pagination a){color:var(--fn-text);border-color:var(--fn-border);background:var(--fn-surface)}
html[data-theme="light"] body:has(.app-sidebar) :is(.muted,.sub,.hint,.form-row label){color:var(--fn-text-muted)}
html[data-theme="light"] body:has(.app-sidebar) :is(.panel,.card,.card-section,.fn-main,.container>main) :is(h1,h2,h3,h4){color:var(--fn-text)}
html[data-theme="light"] body:has(.app-sidebar) :is(.form-row,.filter-row,.panel,.card,.card-section) :is(input,select,textarea),
html[data-theme="light"] body:has(.app-sidebar) :is(.copy-input,.trait-input){color:var(--fn-text);border-color:var(--fn-border);background:var(--fn-surface-elevated);color-scheme:light}
html[data-theme="light"] body:has(.app-sidebar) :is(.trait,.pill){color:var(--fn-text-secondary);border-color:var(--fn-border);background:var(--fn-surface-subtle)}
html[data-theme="light"] body:has(.app-sidebar) .fn-home .shell{color:var(--fn-text);border-color:var(--fn-border);background:var(--fn-canvas)}
html[data-theme="light"] body:has(.app-sidebar) .fn-home .card{color:var(--fn-text);border-color:var(--fn-border);background:var(--fn-surface)}
html[data-theme="light"] table :where(tr:nth-child(even)) td{background:rgb(33 94 54 / 4%)}

/* Standalone sign-in, setup, and account pages. */
html[data-theme="light"] .fn-auth{color:var(--fn-text);background:radial-gradient(circle at 18% 10%,rgb(42 151 82 / 14%),transparent 30rem),var(--fn-canvas)}
html[data-theme="light"] .fn-auth .card{color:var(--fn-text);border-color:var(--fn-border);background:#fff;box-shadow:0 24px 65px rgb(24 75 39 / 12%)}
html[data-theme="light"] .fn-auth :is(label,.sub,.hint,.foot,.card>p){color:var(--fn-text-secondary)}
html[data-theme="light"] .fn-auth :is(input,select,textarea){color:var(--fn-text);border-color:var(--fn-border);background:var(--fn-surface-elevated);color-scheme:light}
html[data-theme="light"] .fn-auth :is(.eyebrow,a){color:var(--fn-brand)}
html[data-theme="light"] .fn-auth button:not(.site-floating-theme){color:#fff;background:var(--fn-brand)}
html[data-theme="light"] .fn-auth button:not(.site-floating-theme):hover{background:var(--fn-brand-hover)}
html[data-theme="light"] .fn-auth .success{color:#176c43;background:var(--fn-brand-soft)}

/* Public pricing and local administration pages use separate style sheets. */
html[data-theme="light"] .pricing-page{color:var(--fn-text);background:var(--fn-canvas);color-scheme:light}
html[data-theme="light"] .pricing-page a{color:var(--fn-brand)}
html[data-theme="light"] .pricing-nav .pricing-brand{color:var(--fn-text)}
html[data-theme="light"] .pricing-brand span,html[data-theme="light"] .pricing-eyebrow,html[data-theme="light"] .pricing-checklist li::before{color:var(--fn-brand)}
html[data-theme="light"] .pricing-page :is(.pricing-hero>p:last-child,.pricing-features>p:not(.pricing-eyebrow),.pricing-small,.pricing-plan-note){color:var(--fn-text-secondary)}
html[data-theme="light"] .pricing-plan{color:var(--fn-text);border-color:var(--fn-border);background:#fff}
html[data-theme="light"] .pricing-plan-yearly{border-color:var(--fn-brand-border);background:#e0f1e5}
html[data-theme="light"] .pricing-test{color:var(--fn-text-secondary);border-color:var(--fn-border)}
html[data-theme="light"] body:has(.beta-shell):not(:has(.app-sidebar)){color:var(--fn-text);background:var(--fn-canvas)}
html[data-theme="light"] .beta-shell :is(.beta-card,.beta-tester){color:var(--fn-text);border-color:var(--fn-border);background:var(--fn-surface)}
html[data-theme="light"] .beta-shell :is(input,select,textarea){color:var(--fn-text);border-color:var(--fn-border);background:var(--fn-surface-elevated);color-scheme:light}
html[data-theme="light"] .beta-shell :is(.beta-eyebrow,a,summary){color:var(--fn-brand)}
html[data-theme="light"] .beta-shell :is(.beta-note,dt){color:var(--fn-text-secondary)}

/* The playing surface and advice need their own light treatment. */
html[data-theme="light"] .table-wrap .felt{background:radial-gradient(ellipse at center,#d8edda 0%,#add5b5 75%);border-color:#408e59;box-shadow:inset 0 0 26px rgb(20 78 39 / 12%),0 0 0 2px rgb(31 111 53 / 10%)}
html[data-theme="light"] .table-wrap .seat{color:var(--fn-text);background:#fff;border-color:#8fb19a;box-shadow:0 3px 12px rgb(24 70 37 / 16%)}
html[data-theme="light"] .table-wrap .seat.hero{background:#fff8eb;border-color:#b76a21}
html[data-theme="light"] .table-wrap .seat :is(.s-name,.s-stack){color:var(--fn-text)}
html[data-theme="light"] .table-wrap .seat.hero .s-name{color:#8b480e}
html[data-theme="light"] .table-wrap .seat .seat-avatar{border-color:#9db9a4;background:#e8f2e9}
html[data-theme="light"] .table-wrap .seat.s-folded{background:#ccd7cf;border-color:#84998a}
html[data-theme="light"] .table-wrap .seat.s-folded>:not(.s-action){opacity:.48;filter:grayscale(.9)}
html[data-theme="light"] .table-wrap .seat.s-folded .s-action{background:#657b6d;color:#fff}
html[data-theme="light"] .trainer-session-active .table-wrap .seat.is-acting{background:#fff3dc;border-color:#ad641d;box-shadow:0 0 0 2px rgb(173 100 29 / 18%),0 0 18px rgb(173 100 29 / 25%)}
html[data-theme="light"] .trainer-session-active .table-wrap .seat.is-acting .s-name{color:#874710}
html[data-theme="light"] .board-row{background:rgb(237 248 238 / 88%);border-color:#408e59}
html[data-theme="light"] .board-slot{border-color:#56986b}
html[data-theme="light"] .table-wrap .pot-row{color:#35240a;background:#fff6da}
html[data-theme="light"] .table-wrap .seat-chip .chip-amt{color:#35240a;text-shadow:0 1px 2px #fff,0 0 4px #fff}
html[data-theme="light"] .table-wrap .seat[data-trait]::after{color:var(--fn-text);background:#fff;border-color:var(--fn-brand);box-shadow:var(--fn-shadow-menu)}
html[data-theme="light"] .trainer-session-active .play-layout>.context-panel.advice-current .coaching-eyebrow,
html[data-theme="light"] .trainer-session-active .play-layout>.context-panel.advice-current .coaching-available-label{color:var(--fn-brand);text-shadow:none}
html[data-theme="light"] .trainer-session-active .play-layout>.context-panel.advice-current .coaching-recommendation{color:var(--fn-text);border-left-color:var(--fn-brand);background:linear-gradient(110deg,#e6f3e9,#f8fcf8 70%);box-shadow:none}
html[data-theme="light"] .trainer-session-active .play-layout>.context-panel.advice-current .coaching-recommendation.action-fold{border-left-color:var(--fn-danger);background:linear-gradient(110deg,#fae9e8,#fffaf8 70%)}
html[data-theme="light"] .trainer-session-active .coaching-recommendation :is(strong,p,.coaching-recommendation-label){color:var(--fn-text)}
html[data-theme="light"] .trainer-session-active .play-layout.coaching-pinned>.context-panel.is-pinned{color:var(--fn-text);background:var(--fn-surface);box-shadow:var(--fn-shadow-menu)}
html[data-theme="light"] .trainer-session-active .play-layout.coaching-pinned>.context-panel.is-pinned .coaching-scroll{background:var(--fn-surface)}
html[data-theme="light"] .trainer-session-active .play-layout>.context-panel.advice-held{color:var(--fn-text);border-color:var(--fn-border);background:var(--fn-surface-elevated)}
html[data-theme="light"] .trainer-session-active .play-layout>.context-panel.advice-held .trainer-card-head{background:var(--fn-surface-subtle);border-bottom-color:var(--fn-border)}
html[data-theme="light"] .trainer-session-active .play-layout>.context-panel.advice-held .coaching-available-label{color:var(--fn-brand);border-color:var(--fn-brand-border);background:var(--fn-brand-soft);box-shadow:none;text-shadow:none}
html[data-theme="light"] .trainer-session-active .play-layout>.context-panel .coaching-pin[aria-pressed="true"]{color:var(--fn-brand);border-color:var(--fn-brand);background:var(--fn-brand-soft)}
html[data-theme="light"] .trainer-session-active .table-tool-trigger.coaching-trigger{color:#155d3e;border-color:#86b99a;background:#e8f4eb;box-shadow:0 4px 12px rgb(24 70 37 / 16%)}
html[data-theme="light"] .trainer-session-active .table-tool-trigger.coaching-trigger:hover,
html[data-theme="light"] .trainer-session-active .table-tool-trigger.coaching-trigger[aria-expanded="true"]{color:#104e33;border-color:#4b9870;background:#d7eddd}
html[data-theme="light"] .trainer-session-active .table-tool-trigger.knowledge-check-trigger{color:#79500c;border-color:#d4b873;background:#fff4db;box-shadow:0 4px 12px rgb(92 67 20 / 16%)}
html[data-theme="light"] .trainer-session-active .table-tool-trigger.knowledge-check-trigger:hover,
html[data-theme="light"] .trainer-session-active .table-tool-trigger.knowledge-check-trigger[aria-expanded="true"]{color:#654006;border-color:#be913f;background:#ffe9b8}
html[data-theme="light"] .trainer-session-active .play-layout>.table-knowledge-check.is-answered>.knowledge-check-correct{color:#176b3e;text-shadow:none}
html[data-theme="light"] .trainer-toast.trainer-toast-warning{color:#69420a;background:#fff6da;box-shadow:0 12px 32px rgb(72 51 13 / 18%),inset 4px 0 var(--fn-warning)}
html[data-theme="light"] .trainer-controls{color:var(--fn-text);border-color:var(--fn-border-strong);background:rgb(248 252 248 / 96%);box-shadow:0 4px 16px rgb(24 70 37 / 16%)}
html[data-theme="light"] .trainer-controls summary{color:var(--fn-text-secondary)}
html[data-theme="light"] .trainer-controls summary:hover{color:var(--fn-brand)}
html[data-theme="light"] .trainer-controls .auto-continue-box{color:var(--fn-text)}
html[data-theme="light"] .trainer-controls input[type="checkbox"]{accent-color:var(--fn-brand)}
html[data-theme="light"] .coaching-assistance-note,
html[data-theme="light"] .coaching-report-hand{color:#76500d;border-color:#d8ad58;background:#fff5dc;box-shadow:0 4px 12px rgb(92 67 20 / 16%)}
html[data-theme="light"] .coaching-report-hand:hover,
html[data-theme="light"] .coaching-report-hand:focus-visible{color:#654006;border-color:#be913f;background:#ffe9b8}
html[data-theme="light"] .lock-btn{color:var(--fn-text);border-color:var(--fn-border-strong);background:var(--fn-surface-subtle);box-shadow:0 4px 12px rgb(24 70 37 / 12%)}
html[data-theme="light"] .fn-confirm-accept{color:#8f2028;background:var(--fn-danger-soft)}
html[data-theme="light"] .fn-confirm-accept:hover{color:#fff;background:var(--fn-danger)}
html[data-theme="light"] .page-shell .btn-danger:hover{color:#fff;background:var(--fn-danger)}
