:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  color: #25163c;
  background: #f6f4fb;
  --purple: #291544;
  --ink-light: #625571;
  --border: #e8e1f1;
  --yellow: #ffdf54;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 280px; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .55; }
:focus-visible { outline: 3px solid #8752d7; outline-offset: 3px; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: 230px; padding: 26px 16px 18px;
  background: radial-gradient(ellipse at 0% 100%, #48226f, transparent 56%), var(--purple);
  color: white; display: flex; flex-direction: column; overflow: auto;
}
.brand { display: grid; width: fit-content; margin: 0 0 27px 12px; line-height: .94; }
.brand-name { font-weight: 950; letter-spacing: -.09em; font-size: 2.9rem; }
.brand-name span { color: var(--yellow); margin-left: .08em; }
.brand-caption { margin-top: 8px; color: #d8c5ed; font-size: .72rem; font-weight: 800; letter-spacing: .16em; }
nav { display: grid; gap: 4px; }
nav a { display: flex; align-items: center; gap: 12px; border-radius: 10px; padding: 11px 12px; font-weight: 650; font-size: .94rem; color: #eee3fa; }
nav a:hover { background: #493463; }
nav a[aria-current="page"] { background: var(--yellow); color: #291544; }
.nav-icon { width: 1.15em; text-align: center; font-size: 1.15em; line-height: 1; }
.mascot { width: 165px; height: auto; align-self: center; margin-top: auto; padding-top: 16px; }
.sidebar-footer { display: flex; justify-content: space-between; border-top: 1px solid #5c447a; padding: 12px 6px 0; font-size: .78rem; color: #eadcf9; }
main { margin-left: 230px; padding: clamp(20px, 3.6vw, 54px); max-width: 1700px; }
.page-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(1.9rem, 3vw, 2.75rem); line-height: 1.1; letter-spacing: -.045em; }
h2 { font-size: 1.15rem; letter-spacing: -.02em; }
p { line-height: 1.55; }
.page-header p, .muted { color: var(--ink-light); }
.page-header p { margin-top: 8px; }
#notice:not(:empty) { padding: 12px 14px; border-radius: 10px; margin-bottom: 16px; background: #f0e8fc; }
.panel, .tile { background: white; border: 1px solid var(--border); border-radius: 17px; box-shadow: 0 3px 12px #29154408; }
.panel { padding: clamp(16px, 2vw, 25px); min-width: 0; }
.panel > p, .panel h2 + p { margin-top: 8px; }
.panel + .panel { margin-top: 16px; }
.filters { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
label { display: grid; gap: 6px; font-weight: 700; font-size: .875rem; }
input, select { border-radius: 9px; padding: 9px 12px; border: 1px solid #d8cce6; background: white; color: inherit; min-height: 42px; max-width: 100%; }
.primary, .secondary, .menu-toggle { min-height: 40px; border-radius: 9px; padding: 8px 13px; font-weight: 750; }
.primary { border: 1px solid #f4cf3f; background: var(--yellow); color: #291544; }
.secondary { background: white; border: 1px solid var(--border); color: var(--purple); }
.menu-toggle { display: none; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 18px; }
.tile { padding: 16px; border-top: 3px solid #9d71e7; }
.tile:nth-child(even) { border-top-color: #e8ba24; }
.tile-label { color: var(--ink-light); font-weight: 700; font-size: .88rem; }
.tile-value { display: block; margin-top: 8px; font-size: 1.9rem; font-weight: 830; line-height: 1; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; }
.detail-grid .panel { margin: 0; }
.empty { min-height: 156px; display: grid; align-content: center; text-align: center; background: #faf8fe; border: 1px dashed #ddd0eb; border-radius: 11px; padding: 16px; margin-top: 15px; }
.empty p { margin-top: 5px; }
.chart { width: 100%; height: auto; margin-top: 15px; display: block; }
.chart line { stroke: #e5daf0; }
.chart rect { fill: #8852d2; }
.table-wrap { overflow: auto; margin-top: 16px; }
table { width: 100%; border-collapse: collapse; white-space: nowrap; }
th, td { text-align: left; border-bottom: 1px solid var(--border); padding: 10px 12px; }
th { color: var(--ink-light); font-size: .875rem; }
.game-icon { width: 32px; height: 32px; object-fit: cover; border-radius: 7px; vertical-align: middle; margin-right: 8px; }
.pill { display: inline-block; border-radius: 6px; padding: 4px 8px; background: #f1e9fc; font-size: .84rem; font-weight: 750; }
.pill.on { background: #e6f4e8; color: #25582e; }
.login { max-width: 430px; }
form { display: flex; flex-wrap: wrap; align-items: end; gap: 14px; margin-top: 16px; }
.login form { display: grid; }
details { margin-top: 15px; }
summary { cursor: pointer; font-weight: 650; }
@media (max-width: 960px) {
  .detail-grid { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .sidebar { position: static; width: auto; padding: 14px 16px; display: grid; grid-template-columns: 1fr auto; gap: 12px; }
  .brand { margin: 0; }
  .brand-name { font-size: 1.9rem; }
  .brand-caption { margin-top: 5px; }
  .menu-toggle { display: block; background: transparent; border: 1px solid #846ba1; color: white; align-self: center; }
  nav { grid-column: 1 / -1; display: none; }
  nav.open { display: grid; }
  .mascot, .sidebar-footer { display: none; }
  main { margin: 0; }
}
.help ol { display: grid; gap: 10px; padding-left: 1.45rem; line-height: 1.55; }
.help a, .inline-help { color: #6130a3; font-weight: 700; text-decoration: underline; text-underline-offset: .15em; }
.help .availability { background: #fff5cb; border: 1px solid #f4db78; border-radius: 10px; padding: 12px 14px; }
.help-heading, .live-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; }
.help textarea, .help pre { display: block; width: 100%; margin: 14px 0 0; padding: 13px; border: 1px solid var(--border); border-radius: 9px; background: #faf8fe; color: inherit; font: .9rem/1.5 ui-monospace, monospace; }
.help textarea { resize: vertical; min-height: 10em; }
.help pre { overflow: auto; }
.help th, .help td { white-space: normal; vertical-align: top; }
.help td:first-child { overflow-wrap: anywhere; }
.help .table-wrap { margin-top: 10px; }
.live-today { margin-bottom: 20px; }
.live-today .tiles { grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); margin: 14px 0 0; }
.live-today .tile { box-shadow: none; background: #faf8fe; }
.live-meta, .live-state { font-size: .85rem; color: var(--ink-light); }
