/* Optional light palette. Dark remains the default when no preference is stored. */
html[data-theme="light"] {
  color-scheme: light;
  --bg: #f2f6fa;
  --bg2: #e8eff5;
  --panel: #ffffff;
  --panel2: #edf4f8;
  --line: rgba(35, 66, 92, .18);
  --text: #182b3d;
  --muted: #586d80;
  --cyan: #087d9c;
  --green: #087a5e;
  --blue: #176bd2;
  --danger: #b52f48;
  --shadow: 0 18px 48px rgba(31, 55, 74, .12);
  background: var(--bg);
  color: var(--text);
}

html[data-theme="light"] body { background: var(--bg); color: var(--text); }
html[data-theme="light"] .site-header { background: rgba(248, 251, 253, .94); }
html[data-theme="light"] .main-nav a,
html[data-theme="light"] .nav-login { color: #52677a; }
html[data-theme="light"] .main-nav a:hover,
html[data-theme="light"] .main-nav a.active,
html[data-theme="light"] .nav-login:hover { color: #102337; }
html[data-theme="light"] .menu-toggle { color: #183247; }
html[data-theme="light"] .site-footer { background: #e9f0f5; }
html[data-theme="light"] .hero { background: radial-gradient(circle at 76% 40%, rgba(14, 111, 184, .08), transparent 38%); }
html[data-theme="light"] .hero h1 em { background-image: linear-gradient(105deg, #183247 5%, #087d9c 48%, #087a5e); }
html[data-theme="light"] .hero-copy > p,
html[data-theme="light"] .trust-row { color: #586d80; }
html[data-theme="light"] .hero-visual { background: #e1edf4; }
html[data-theme="light"] .visual-badge { background: rgba(248, 251, 253, .94); color: #182b3d; }
html[data-theme="light"] .workflow-section,
html[data-theme="light"] .video-section { background: #eaf1f6; }
html[data-theme="light"] .step-icon { background: #fff; }
html[data-theme="light"] .cta,
html[data-theme="light"] .product-card,
html[data-theme="light"] .feature-list > div,
html[data-theme="light"] .faq-list details,
html[data-theme="light"] .contact-card,
html[data-theme="light"] .auth-card,
html[data-theme="light"] .login-callout,
html[data-theme="light"] .panel,
html[data-theme="light"] .stat-grid > div,
html[data-theme="light"] .admin-question,
html[data-theme="light"] .legal,
html[data-theme="light"] .calendar-section,
html[data-theme="light"] .calendar-card,
html[data-theme="light"] .calendar-empty,
html[data-theme="light"] .clan-card,
html[data-theme="light"] .clan-panel,
html[data-theme="light"] .clan-stat,
html[data-theme="light"] .clan-column-picker,
html[data-theme="light"] .clan-adjustment-form,
html[data-theme="light"] .clan-area-panel,
html[data-theme="light"] .clan-donut-card,
html[data-theme="light"] .clan-insight-card,
html[data-theme="light"] .clan-access-card,
html[data-theme="light"] .clan-event-full,
html[data-theme="light"] .clan-event-top,
html[data-theme="light"] .account-clan-card,
html[data-theme="light"] .account-download-card,
html[data-theme="light"] .account-list-panel,
html[data-theme="light"] .account-license-row,
html[data-theme="light"] .account-trial-row,
html[data-theme="light"] .activation-card,
html[data-theme="light"] .activation-path,
html[data-theme="light"] .checkout-form,
html[data-theme="light"] .promo-banner,
html[data-theme="light"] .promo-rewards > section,
html[data-theme="light"] .chestmaster-plan-card,
html[data-theme="light"] .chestmaster-advantage-grid article {
  background: #fff;
  color: var(--text);
}
html[data-theme="light"] .product-body p,
html[data-theme="light"] .feature-list p,
html[data-theme="light"] .calendar-card p,
html[data-theme="light"] .clan-card p,
html[data-theme="light"] .clan-panel p,
html[data-theme="light"] .panel-empty h3 { color: var(--muted); }
html[data-theme="light"] .product-body h3,
html[data-theme="light"] .calendar-card h3,
html[data-theme="light"] .clan-panel h2,
html[data-theme="light"] .clan-panel h3,
html[data-theme="light"] .panel-head h2,
html[data-theme="light"] .panel-empty h3 { color: var(--text); }
html[data-theme="light"] .hero-visual,
html[data-theme="light"] .product-image,
html[data-theme="light"] .video-placeholder,
html[data-theme="light"] .auth-section,
html[data-theme="light"] .dashboard { background-color: #eaf1f6; }
html[data-theme="light"] .question-list article,
html[data-theme="light"] .answer,
html[data-theme="light"] .calendar-timeline,
html[data-theme="light"] .clan-client,
html[data-theme="light"] .clan-former-section,
html[data-theme="light"] .clan-gift-groups,
html[data-theme="light"] .clan-metric-card,
html[data-theme="light"] .clan-access-list,
html[data-theme="light"] .clan-check-grid,
html[data-theme="light"] .account-state,
html[data-theme="light"] .account-activation,
html[data-theme="light"] .account-bind,
html[data-theme="light"] .account-help-grid article,
html[data-theme="light"] .activation-help,
html[data-theme="light"] .admin-row,
html[data-theme="light"] .admin-order-row,
html[data-theme="light"] .admin-license-row,
html[data-theme="light"] .admin-repeater,
html[data-theme="light"] .admin-table-wrap {
  background-color: #f5f8fb;
  color: var(--text);
}
html[data-theme="light"] input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]),
html[data-theme="light"] textarea,
html[data-theme="light"] select,
html[data-theme="light"] .question-form textarea,
html[data-theme="light"] .auth-form input,
html[data-theme="light"] .admin-row input,
html[data-theme="light"] .admin-row select,
html[data-theme="light"] .admin-question textarea,
html[data-theme="light"] .admin-question select,
html[data-theme="light"] .site-language select {
  border-color: #bdcbd7;
  background-color: #fff;
  color: #182b3d;
}
html[data-theme="light"] input::placeholder,
html[data-theme="light"] textarea::placeholder { color: #718497; }
html[data-theme="light"] .button-ghost { border-color: #bdcbd7; background: #f5f8fb; color: #263d51; }
html[data-theme="light"] .site-language { border-color: #bdcbd7; background: rgba(248, 251, 253, .97); color: #344c60; box-shadow: 0 10px 35px rgba(31, 55, 74, .18); }
html[data-theme="light"] .site-language select,
html[data-theme="light"] .site-theme-toggle { border-color: #bdcbd7; background: #fff; color: #243a4e; }
html[data-theme="light"] .clan-table,
html[data-theme="light"] table { background: #fff; color: var(--text); }
html[data-theme="light"] .clan-table th { background: #e8f0f5; color: #425b70; }
html[data-theme="light"] th,
html[data-theme="light"] td { border-color: rgba(35, 66, 92, .14); }
html[data-theme="light"] th { color: #52677a; }
html[data-theme="light"] .clan-progress,
html[data-theme="light"] .clan-horizontal i { background: #dce6ee; }
html[data-theme="light"] .empty-state > span { color: rgba(8, 125, 156, .18); }
html[data-theme="light"] .admin-sidebar,
html[data-theme="light"] .admin-main,
html[data-theme="light"] .admin-shell { background: #f2f6fa; color: var(--text); }
html[data-theme="light"] .admin-status,
html[data-theme="light"] .status { background: #edf3f7; }
html[data-theme="light"] .cookie-notice { border-color: #bdcbd7; background: rgba(255, 255, 255, .98); color: var(--text); box-shadow: 0 24px 70px rgba(31, 55, 74, .2); }

/* Higher contrast for the clan statistics controls and summary cards. */
html[data-theme="light"] {
  --bg: #f3f6fa;
  --bg2: #eaf0f5;
  --panel2: #f6f9fc;
  --line: #d3dee7;
  --text: #183247;
  --muted: #52697d;
  --cyan: #126b8b;
  --green: #08745b;
  --blue: #2563a6;
  --danger: #b02e45;
}
html[data-theme="light"] .clan-stats-rich .clan-stat small,
html[data-theme="light"] .clan-stats-rich .clan-stat em { color: #52697d; }
html[data-theme="light"] .clan-stats-rich .clan-stat strong,
html[data-theme="light"] .clan-summary-content strong,
html[data-theme="light"] .clan-summary-card strong { color: #183247; }
html[data-theme="light"] .clan-selected-period strong { color: #234a64; }
html[data-theme="light"] .clan-selected-period small,
html[data-theme="light"] .clan-toolbar-status,
html[data-theme="light"] .clan-toolbar-status small,
html[data-theme="light"] .clan-toolbar label,
html[data-theme="light"] .clan-last-update,
html[data-theme="light"] .clan-last-update time,
html[data-theme="light"] .clan-date-filter label,
html[data-theme="light"] .clan-date-filter > small { color: #52697d; }
html[data-theme="light"] .clan-toolbar .button-ghost {
  border-color: #bfccd7;
  background: #f7f9fc;
  color: #29445b !important;
  -webkit-text-fill-color: #29445b !important;
}
html[data-theme="light"] .clan-toolbar .button-ghost:disabled,
html[data-theme="light"] .clan-toolbar .button-ghost[aria-disabled="true"] {
  border-color: #d3dde6;
  background: #edf2f6;
  color: #52697d !important;
  -webkit-text-fill-color: #52697d !important;
  opacity: 1;
}
html[data-theme="light"] .clan-collapsible > .clan-collapsible-summary,
html[data-theme="light"] .clan-top-row a,
html[data-theme="light"] .clan-category-row a { color: #203b52; }
html[data-theme="light"] .clan-collapsible > .clan-collapsible-summary::marker { color: #126b8b; }
html[data-theme="light"] .clan-collapsible[open] > .clan-collapsible-summary { border-color: #d3dee7; background: #f1f6fa; }
html[data-theme="light"] .clan-top-row > strong,
html[data-theme="light"] .clan-category-row > strong,
html[data-theme="light"] .clan-event-full > summary { color: #126b8b; }
html[data-theme="light"] .clan-top-row small,
html[data-theme="light"] .clan-area-labels,
html[data-theme="light"] .clan-dual-day small,
html[data-theme="light"] .chart-legend,
html[data-theme="light"] .clan-summary-card small,
html[data-theme="light"] .clan-summary-card > span { color: #52697d; }
html[data-theme="light"] .clan-date-filter { border-color: #cfdae4; background: #edf3f7; }
html[data-theme="light"] .clan-date-filter input,
html[data-theme="light"] .clan-toolbar input,
html[data-theme="light"] .clan-toolbar select { border-color: #bdcbd7; background: #fff; color: #183247; }
html[data-theme="light"] .clan-role { border: 1px solid #c7d7e3; background: #e9f2f8; color: #34566e; }
html[data-theme="light"] .button:disabled,
html[data-theme="light"] .button[aria-disabled="true"] { opacity: 1; }
html[data-theme="light"] .clan-panel h2,
html[data-theme="light"] .clan-panel h3,
html[data-theme="light"] .clan-card h2,
html[data-theme="light"] .clan-collapsible-title { color: #183247; }
html[data-theme="light"] .clan-metric-delta.rise,
html[data-theme="light"] .clan-top-row > strong,
html[data-theme="light"] .clan-category-row > strong { color: #08745b; }
html[data-theme="light"] .clan-metric-delta.fall { color: #b02e45; }
html[data-theme="light"] .clan-metric-delta.flat { color: #52697d; }
html[data-theme="light"] .clan-table a,
html[data-theme="light"] .clan-panel a:not(.button) { color: #126b8b; }

/* Keep numeric data dark on pale cards and table rows. */
html[data-theme="light"] .player-stats-rich .clan-stat strong,
html[data-theme="light"] .clan-metric-card strong,
html[data-theme="light"] .donut-list strong,
html[data-theme="light"] .clan-toolbar > strong,
html[data-theme="light"] .clan-table td strong,
html[data-theme="light"] .clan-horizontal strong,
html[data-theme="light"] .player-contribution-value strong {
  color: #183247 !important;
  -webkit-text-fill-color: #183247 !important;
}
html[data-theme="light"] .player-metric-grid .clan-metric-card small,
html[data-theme="light"] .player-metric-grid .clan-metric-card .clan-metric-delta.flat,
html[data-theme="light"] .clan-metric-range,
html[data-theme="light"] .player-contribution-value small,
html[data-theme="light"] .player-contribution-item time,
html[data-theme="light"] .player-contribution-item em {
  color: #52697d;
}
html[data-theme="light"] .donut-list span { color: #344c60; }
html[data-theme="light"] .clan-public-events-heading h2 { color: #183247 !important; -webkit-text-fill-color: #183247 !important; }
