:root {
      color-scheme: dark;
      --bg: #05070d;
      --panel: rgba(14, 18, 28, 0.92);
      --panel-2: rgba(255,255,255,0.03);
      --border: rgba(255,255,255,0.08);
      --text: #eef2fb;
      --muted: #9ba6bb;
      --accent: #7c93ff;
      --green: #3ee7a8;
      --gold: #ffd37a;
      --red: #ff7f8a;
      --shadow: 0 24px 80px rgba(0,0,0,0.45);
    }
    * { box-sizing: border-box; }
    html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
    body {
      background:
        radial-gradient(circle at top, rgba(124,147,255,0.12), transparent 38%),
        radial-gradient(circle at 15% 20%, rgba(62,231,168,0.08), transparent 26%),
        radial-gradient(circle at 85% 20%, rgba(255,211,122,0.08), transparent 24%),
        linear-gradient(180deg, #090b12 0%, #05070d 100%);
    }
    .shell { max-width: 1600px; margin: 0 auto; padding: 28px 18px 46px; }
    header {
      text-align: center;
      padding: 32px 18px 24px;
      margin-bottom: 16px;
    }
    .eyebrow {
      display: inline-flex;
      align-items: center;
      gap: 10px;
      text-transform: uppercase;
      letter-spacing: 0.24em;
      color: var(--muted);
      font-weight: 700;
      font-size: 12px;
      margin-bottom: 12px;
    }
    .eyebrow::before, .eyebrow::after {
      content: '';
      width: 30px;
      height: 1px;
      background: linear-gradient(90deg, transparent, rgba(255,255,255,.4), transparent);
    }
    h1 {
      margin: 0;
      font-size: clamp(2.5rem, 5vw, 5.9rem);
      line-height: 0.92;
      letter-spacing: -0.08em;
      text-transform: uppercase;
      text-wrap: balance;
    }
    .subhead {
      margin: 14px auto 0;
      max-width: 900px;
      color: var(--muted);
      font-size: clamp(0.98rem, 1.18vw, 1.15rem);
      line-height: 1.65;
    }
    .nav {
      margin: 22px auto 0;
      display: flex;
      gap: 10px;
      justify-content: center;
      flex-wrap: wrap;
    }
    .nav-link {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      padding: 11px 16px;
      border-radius: 999px;
      border: 1px solid var(--border);
      background: rgba(255,255,255,0.04);
      color: #eef2fb;
      text-decoration: none;
      font-weight: 800;
      letter-spacing: 0.02em;
      transition: transform 0.14s ease, background 0.14s ease, border-color 0.14s ease;
    }
    .nav-link:hover { transform: translateY(-1px); border-color: rgba(255,255,255,0.16); }
    .nav-link.active { background: rgba(124,147,255,0.18); border-color: rgba(124,147,255,0.35); }
    .meta {
      margin-top: 18px;
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      justify-content: center;
    }
    .pill {
      background: rgba(255,255,255,0.04);
      border: 1px solid var(--border);
      color: #dfe5f2;
      padding: 9px 14px;
      border-radius: 999px;
      font-size: 13px;
      font-weight: 700;
      letter-spacing: 0.02em;
      backdrop-filter: blur(10px);
    }
    .toolbar {
      max-width: 1200px;
      margin: 24px auto 20px;
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto auto;
      gap: 12px;
      align-items: center;
    }
    .search-wrap {
      position: relative;
    }
    .search-input {
      width: 100%;
      border: 1px solid rgba(210,220,235,0.72);
      background: linear-gradient(180deg, rgba(18,26,40,0.90), rgba(12,18,30,0.84));
      color: var(--text);
      border-radius: 18px;
      padding: 16px 18px 16px 52px;
      font-size: 16px;
      outline: none;
      box-shadow:
        0 14px 40px rgba(0,0,0,0.32),
        inset 0 1px 0 rgba(255,255,255,0.08),
        0 0 0 1px rgba(88,166,255,0.16);
    }
    .search-input:focus {
      border-color: color-mix(in srgb, var(--accent) 72%, white 18%);
      box-shadow:
        0 14px 40px rgba(0,0,0,0.32),
        0 0 0 3px rgba(88,166,255,0.24),
        inset 0 1px 0 rgba(255,255,255,0.10),
        0 0 0 1px rgba(88,166,255,0.26);
    }
    .search-input::placeholder { color: rgba(237,241,248,0.66); }
    .search-icon {
      position: absolute;
      left: 16px;
      top: 50%;
      transform: translateY(-50%);
      width: 22px;
      height: 22px;
      display: flex;
      align-items: center;
      justify-content: center;
      pointer-events: none;
      font-size: 18px;
      color: rgba(245,247,251,0.94);
    }
    .toggle-group {
      display: flex;
      gap: 10px;
      flex-wrap: wrap;
      justify-content: flex-end;
    }
    .toggle {
      appearance: none;
      border: 1px solid var(--border);
      background: rgba(255,255,255,0.03);
      color: var(--text);
      padding: 13px 14px;
      border-radius: 14px;
      cursor: pointer;
      font-weight: 800;
      letter-spacing: 0.02em;
      transition: transform 0.14s ease, background 0.14s ease, border-color 0.14s ease;
    }
    .toggle:hover { transform: translateY(-1px); }
    .toggle.active { border-color: color-mix(in srgb, var(--accent) 75%, white 12%); background: rgba(124,147,255,0.16); }
    .status {
      max-width: 1200px;
      margin: 0 auto 22px;
      color: rgba(223,229,242,0.80);
      font-size: 13px;
      line-height: 1.5;
      min-height: 1.4em;
    }
    .board {
      position: relative;
      border: 1px solid var(--border);
      border-radius: 28px;
      background: linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.015));
      box-shadow: var(--shadow);
      overflow: hidden;
      margin-bottom: 18px;
    }
    .board::before {
      content: '';
      position: absolute;
      inset: 0 auto 0 0;
      width: 6px;
      background: var(--accent);
    }
    .board.hidden { display: none; }
    .board-header {
      display: flex;
      justify-content: space-between;
      align-items: flex-end;
      gap: 16px;
      padding: 20px 20px 16px 24px;
      background: linear-gradient(90deg, var(--board-bg), transparent 70%);
      border-bottom: 1px solid rgba(255,255,255,0.06);
    }
    .board-title {
      display: flex;
      align-items: baseline;
      gap: 14px;
      min-width: 0;
    }
    .board-title h2 {
      margin: 0;
      font-size: clamp(1.6rem, 3vw, 3rem);
      letter-spacing: -0.07em;
      line-height: 0.95;
      text-transform: uppercase;
      text-wrap: balance;
    }
    .board-title span {
      color: var(--muted);
      font-weight: 700;
      letter-spacing: 0.12em;
      text-transform: uppercase;
      font-size: 0.78rem;
      white-space: nowrap;
    }
    .board-summary {
      flex: 0 0 auto;
      border-radius: 999px;
      padding: 10px 14px;
      border: 1px solid color-mix(in srgb, var(--accent) 65%, white 10%);
      background: color-mix(in srgb, var(--accent) 16%, black 84%);
      color: #fff;
      font-weight: 800;
      letter-spacing: 0.04em;
      text-transform: uppercase;
      font-size: 12px;
    }
    .board-body { padding: 18px; }
    .subboard {
      margin-top: 14px;
      border: 1px solid rgba(255,255,255,0.08);
      border-radius: 20px;
      background: rgba(255,255,255,0.02);
      overflow: hidden;
    }
    .subboard:first-child { margin-top: 0; }
    .subboard-header {
      display: flex;
      justify-content: space-between;
      gap: 12px;
      align-items: center;
      padding: 12px 14px;
      border-bottom: 1px solid rgba(255,255,255,0.06);
      background: rgba(255,255,255,0.03);
      font-weight: 800;
    }
    .subboard-header .small {
      color: var(--muted);
      font-weight: 700;
      font-size: 12px;
      text-transform: uppercase;
      letter-spacing: 0.08em;
    }
    .rows { display: grid; gap: 10px; padding: 14px; }
    .row {
      display: grid;
      grid-template-columns: 56px minmax(0, 1fr) auto;
      gap: 12px;
      align-items: center;
      padding: 12px 14px;
      border-radius: 16px;
      border: 1px solid rgba(255,255,255,0.06);
      background: rgba(255,255,255,0.03);
    }
    .row.rank-1 { border-color: rgba(255, 211, 122, 0.32); background: linear-gradient(90deg, rgba(255,211,122,0.10), rgba(255,255,255,0.03)); }
    .row.rank-2 { border-color: rgba(180, 200, 255, 0.24); }
    .row.rank-3 { border-color: rgba(161, 255, 206, 0.18); }
    .rank {
      width: 56px;
      height: 56px;
      border-radius: 16px;
      display: grid;
      place-items: center;
      background: rgba(124,147,255,0.16);
      border: 1px solid rgba(124,147,255,0.22);
      font-weight: 900;
      font-size: 18px;
      letter-spacing: -0.03em;
    }
    .who {
      min-width: 0;
      display: grid;
      gap: 3px;
    }
    .who .name {
      font-weight: 800;
      line-height: 1.2;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .who .sub {
      color: var(--muted);
      font-size: 12px;
      line-height: 1.4;
    }
    .time {
      font-weight: 900;
      font-size: 18px;
      letter-spacing: -0.04em;
      white-space: nowrap;
    }
    .empty {
      padding: 16px 14px;
      color: rgba(223,229,242,0.72);
      font-size: 14px;
    }
    .badge {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      border-radius: 999px;
      padding: 7px 11px;
      font-size: 11px;
      font-weight: 900;
      text-transform: uppercase;
      letter-spacing: 0.08em;
      color: #fff;
      background: rgba(255,255,255,0.08);
      border: 1px solid rgba(255,255,255,0.10);
    }
    .badge.botw { background: rgba(62,231,168,0.14); border-color: rgba(62,231,168,0.18); color: #b8ffe4; }
    .badge.raid { background: rgba(255,211,122,0.14); border-color: rgba(255,211,122,0.18); color: #ffe8b1; }
    footer {
      padding: 18px 8px 0;
      color: rgba(230,235,245,0.56);
      font-size: 12px;
      line-height: 1.6;
      text-align: center;
    }
    @media (max-width: 820px) {
      .toolbar { grid-template-columns: 1fr; }
      .toggle-group { justify-content: flex-start; }
      .board-header { flex-direction: column; align-items: flex-start; }
      .row { grid-template-columns: 46px minmax(0, 1fr); }
      .time { grid-column: 1 / -1; justify-self: start; }
    }
