/* Cool light surfaces for the independent LoL site. Media and grade colours
 * retain their own meaning; no reference stylesheets or assets are changed. */
:root {
  --ui-font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}
body, button, input, select, textarea { font-family: var(--ui-font); }

/* The palette lives in experience.css; these rules cover older literal colours. */
:root[data-theme="light"] { color-scheme: light; accent-color: var(--accent); }
:root[data-theme="light"] body { color: var(--text); background: var(--bg); }
:root[data-theme="light"] :is(h1,h2,h3) { letter-spacing: 0; }
:root[data-theme="light"] .site-header {
  color: var(--text);
  background: color-mix(in srgb,var(--header) 94%,transparent);
  border-bottom-color: var(--line);
  backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 #ffffffb3,0 4px 20px #193c5e05;
}
:root[data-theme="light"] .site-header::after { display: none; }
:root[data-theme="light"] .site-header .brand > span { letter-spacing: .035em; }
:root[data-theme="light"] .site-header .brand { color: var(--text); }
:root[data-theme="light"] .site-header .main-nav > a { color: var(--muted); }
:root[data-theme="light"] .site-header .main-nav > a:is(:hover,[aria-current=page]) { color: var(--text); }
:root[data-theme="light"] .site-header .brand:hover svg { filter: none; }
:root[data-theme="light"] :is(.account-panel,.site-header .season-switcher ul) {
  border-color: var(--line);
  border-top-color: var(--accent);
  box-shadow: 0 12px 30px #18253414;
}
:root[data-theme="light"] .site-header .season-switcher li a[aria-current="true"] {
  background: #edf3f9;
  color: var(--accent);
}
:root[data-theme="light"] .account-avatar {
  background: #edf2f7;
  color: var(--accent);
  border-color: #c9d6e3;
  box-shadow: none;
}
:root[data-theme="light"] .account-avatar::after { display: none; }
:root[data-theme="light"] .account-menu > summary:hover .account-avatar,
:root[data-theme="light"] .account-menu[open] > summary .account-avatar {
  border-color: var(--accent);
  box-shadow: none;
}
:root[data-theme="light"] .navigation-progress::after { background: var(--accent); }

/* A blue action must have a light foreground in every public and organizer form. */
:root[data-theme="light"] .button.primary {
  background: linear-gradient(180deg,#3276ae,var(--accent));
  border-color: var(--accent);
  color: #fff;
  box-shadow: inset 0 1px 0 #ffffff24,0 2px 5px #234b721a;
}
:root[data-theme="light"] .button.primary:hover {
  background: #1c5382;
  border-color: #1c5382;
  color: #fff;
  filter: none;
}
:root[data-theme="light"] .button.outline {
  background: var(--surface);
  border-color: #b8c2ce;
  color: var(--text);
}
:root[data-theme="light"] .button.outline:hover { background: var(--surface-2); border-color: var(--accent); color: var(--accent); }
:root[data-theme="light"] :is(.site-form,.catalog-filter) :is(input,select,textarea)::placeholder { color: #6d7783; opacity: 1; }
:root[data-theme="light"] :is(.support-choice,.support-help):focus-visible { outline-color: var(--accent); }

/* White list rows carry results through their edge and badge, not a gradient. */
:root[data-theme="light"] :is(.history-record,.account-history-record,.profile-event-record) { background: var(--surface); }
:root[data-theme="light"] :is(.history-record,.account-history-record,.profile-event-record):hover { background: #fafbfc; }
:root[data-theme="light"] :is(.match-scoreboard,.team-live,.team-live-avatar,.ms-entrant-face) { background: var(--surface-2); }
:root[data-theme="light"] .battle-report .br-side { background: color-mix(in srgb,var(--side) 3%,var(--surface)); }
:root[data-theme="light"] .rm-workflows > a[aria-current="page"] { background: #edf3f9; }
:root[data-theme="light"] .workspace-navigation > a[aria-current="page"] { background: #edf3f9; }
:root[data-theme="light"] .workspace-task-icon { background: #edf3f9; }

/* Dark photographs remain media surfaces, with neutral labels and blue actions. */
:root[data-theme="light"] .event-hero { border-color: #334553; }
:root[data-theme="light"] .hero-event-label { color: #d2dfeb; }
:root[data-theme="light"] .hero-stage .status-dot { background: #88b4d8; box-shadow: none; }
:root[data-theme="light"] .event-hero .button.outline { color: #f0f4f8; background: #16232f80; border-color: #b7c7d080; }
:root[data-theme="light"] .event-hero .button.outline:hover { background: #243849; border-color: #d2dce5; }
:root[data-theme="light"] .event-tile-art { background: #e9eef3; }
:root[data-theme="light"] .event-tile-art::after { border-color: #d5dde5; }
:root[data-theme="light"] .event-tile-art > svg { color: #728aa0; }
:root[data-theme="light"] .event-tile-art > .result-tag { color: var(--muted); background: var(--surface); border-color: var(--line); }
:root[data-theme="light"] .event-tile-art > .result-tag.qualified { color: var(--win); border-color: color-mix(in srgb,var(--win) 30%,var(--line)); }
:root[data-theme="light"] .event-tile-number { color: #77889a1a; }
:root[data-theme="light"] .live-strip--main { --strip-accent: #8ab4d5; border-color: #8ab4d566; }
:root[data-theme="light"] .live-main-label { color: #dce8f1; border-left-color: #8ab4d5; }
:root[data-theme="light"] .live-strip--main .live-room-enter { color: #dce8f1; }
:root[data-theme="light"] .live-reference-badge { color: #dce8f1; background: #172733b8; border-color: #8ab4d566; }
:root[data-theme="light"] .live-strip:focus-visible { outline-color: #8ab4d5; }

/* Compact grade badges keep S/A/B/C/D hues while fitting the light surfaces. */
:root[data-theme="light"] .grade-badge[data-grade] {
  --grade-fg: #606a76;
  --grade-edge: #bac3cd;
  background: color-mix(in srgb,var(--grade-fg) 7%,var(--surface));
  border-color: var(--grade-edge);
  color: var(--grade-fg);
  box-shadow: none;
}
:root[data-theme="light"] .grade-badge[data-grade="s-plus"] { --grade-fg: #806019; --grade-edge: #c4aa68; }
:root[data-theme="light"] .grade-badge[data-grade="s"] { --grade-fg: #86641d; --grade-edge: #c6ac72; }
:root[data-theme="light"] .grade-badge[data-grade="a"] { --grade-fg: #77479d; --grade-edge: #b399c9; }
:root[data-theme="light"] .grade-badge[data-grade="b"] { --grade-fg: #176e85; --grade-edge: #81b2be; }
:root[data-theme="light"] .grade-badge[data-grade="c"] { --grade-fg: #505e6e; --grade-edge: #a1adb9; }
:root[data-theme="light"] .grade-badge[data-grade="d"] { --grade-fg: #925c2d; --grade-edge: #c9a582; }
:root[data-theme="light"] .grade-badge[data-grade="neutral"] { --grade-fg: #606a76; --grade-edge: #bac3cd; }

/* The player trace is blue; comparison traces remain distinct in the legend. */
:root[data-theme="light"] .profile-radar-layer.is-player { --radar-color: #1767b2; }
:root[data-theme="light"] .profile-radar-layer.is-position { --radar-color: #3a806d; }
:root[data-theme="light"] .profile-radar-legend .is-player { --legend-color: #1767b2; }
:root[data-theme="light"] .profile-radar-legend .is-position { --legend-color: #3a806d; }
:root[data-theme="light"] :is(.profile-preview-dialog,.audience-rating-dialog,.profile-room-preview) { box-shadow: 0 18px 60px #172b4630; }
:root[data-theme="light"] :is(.profile-preview-dialog,.audience-rating-dialog)::backdrop { background: #26384b66; }

/* Match the dark shell to the steel-blue light theme without recolouring media. */
:root[data-theme="dark"] .button.primary { background: #a5c9ea; border-color: #a5c9ea; color: #142b40; box-shadow: inset 0 1px 0 #ffffff33; }
:root[data-theme="dark"] .button.primary:hover { background: #c0dcf3; border-color: #c0dcf3; color: #142b40; }
:root[data-theme="dark"] .button.outline { background: #142335; border-color: #526e89; color: #dce9f5; }
:root[data-theme="dark"] .button.outline:hover { background: #20374c; border-color: #94b8d9; }
.site-header .theme-toggle { transition: background .2s,border-color .2s,box-shadow .2s; }
.site-header .theme-toggle:hover { transform: none; }
.theme-toggle:hover { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb,var(--accent) 10%,transparent); }
.theme-toggle svg { transition: transform .3s ease; }
.theme-toggle:hover svg { transform: rotate(30deg); }
@media(prefers-reduced-motion:reduce) {
  html { scroll-behavior: auto; }
  .site-header .theme-toggle,.theme-toggle svg { transition: none; }
  .theme-toggle:hover svg { transform: none; }
}

@media (forced-colors:active) {
  :root[data-theme="light"] :is(.button.primary,.button.outline,.grade-badge[data-grade]) { border-color: ButtonText; }
}
