  :root {
    --accent:    #c9a96e;
    --accent-2:  #e6c98e;
    --ok:        #7ec699;
    --danger:    #d68575;
  }
  :root,
  [data-theme="dark"] {
    color-scheme: dark;
    --bg:        #111318;
    --bg-2:      #161920;
    --surface:   rgba(255,255,255,.04);
    --surface-2: rgba(255,255,255,.06);
    --hairline:  rgba(255,255,255,.08);
    --hairline-2:rgba(255,255,255,.14);
    --text:      #ededee;
    --text-dim:  #a8acb5;
    --text-mute: #727786;
    --glass:     rgba(17,19,24,.78);
    --glass-strong: rgba(17,19,24,.88);
    --glass-solid: rgba(17,19,24,.96);
    --glass-zone: rgba(17,19,24,.62);
    --grad-warm: rgba(201,169,110,.06);
    --grad-cool: rgba(122,182,217,.04);
    --grain-opacity: .38;
    --grain-blend: overlay;
    --btn-hover-bg: rgba(255,255,255,.06);
    --btn-hover-border: rgba(255,255,255,.18);
    --btn-primary-hover: #fff;
    --input-bg: rgba(255,255,255,.025);
    --input-bg-focus: rgba(255,255,255,.04);
    --row-hover: rgba(255,255,255,.02);
    --chip-list-bg: rgba(255,255,255,.015);
    --crest-filter:
      drop-shadow(0 1px 0 rgba(255,255,255,.08))
      drop-shadow(0 12px 28px rgba(0,0,0,.45));
    --map-label: rgba(255,255,255,.85);
    --map-label-shadow: 0 1px 4px rgba(0,0,0,.8);
    --select-menu-bg: #1a1d25;
    --select-menu-text: #ededee;
  }
  [data-theme="light"] {
    color-scheme: light;
    --accent:    #9a7840;
    --accent-2:  #b8924a;
    --ok:        #3d9468;
    --danger:    #c25a4a;
    --bg:        #f7f6f3;
    --bg-2:      #efeeea;
    --surface:   rgba(0,0,0,.03);
    --surface-2: rgba(0,0,0,.045);
    --hairline:  rgba(0,0,0,.08);
    --hairline-2:rgba(0,0,0,.14);
    --text:      #1a1c22;
    --text-dim:  #5c6069;
    --text-mute: #868b95;
    --glass:     rgba(247,246,243,.88);
    --glass-strong: rgba(247,246,243,.94);
    --glass-solid: rgba(255,255,255,.98);
    --glass-zone: rgba(255,255,255,.82);
    --grad-warm: rgba(201,169,110,.14);
    --grad-cool: rgba(122,182,217,.1);
    --grain-opacity: .22;
    --grain-blend: multiply;
    --btn-hover-bg: rgba(0,0,0,.04);
    --btn-hover-border: rgba(0,0,0,.16);
    --btn-primary-hover: #2a2d35;
    --input-bg: rgba(0,0,0,.025);
    --input-bg-focus: rgba(0,0,0,.04);
    --row-hover: rgba(0,0,0,.02);
    --chip-list-bg: rgba(0,0,0,.02);
    --crest-filter:
      brightness(0)
      drop-shadow(0 2px 8px rgba(0,0,0,.14))
      drop-shadow(0 10px 24px rgba(0,0,0,.1));
    --map-label: rgba(255,255,255,.85);
    --map-label-shadow: 0 1px 4px rgba(0,0,0,.8);
    --select-menu-bg: #ffffff;
    --select-menu-text: #1a1c22;
  }
  *,*::before,*::after { box-sizing: border-box; }
 html, body {
   margin: 0;
   padding: 0;
   background: var(--bg);
   overflow-x: clip;
 }
  body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--text);
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background:
      radial-gradient(1000px 600px at 80% -200px, var(--grad-warm), transparent 60%),
      radial-gradient(800px 500px at -200px 30%, var(--grad-cool), transparent 60%),
      linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 50%, var(--bg) 100%);
    min-height: 100vh;
    letter-spacing: -0.005em;
  }
  /* subtle grain */
  body::before {
    content: '';
    position: fixed; inset: 0; pointer-events: none; z-index: 0;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.04 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
    opacity: var(--grain-opacity);
    mix-blend-mode: var(--grain-blend);
  }
  .wrap { max-width: 1120px; margin: 0 auto; padding: 0 32px; position: relative; z-index: 1; }

  /* ---------- Typography ---------- */
  .serif { font-family: 'Instrument Serif', Georgia, serif; font-weight: 400; letter-spacing: -0.01em; }
  .display {
    font-family: 'Instrument Serif', serif;
    font-weight: 400;
    font-size: clamp(56px, 11vw, 128px);
    line-height: 0.95;
    letter-spacing: -0.03em;
  }
  .eyebrow {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--text-mute);
  }
  .section-label {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--accent);
  }
  .section-title {
    font-family: 'Instrument Serif', serif;
    font-weight: 400;
    font-size: clamp(34px, 5vw, 56px);
    line-height: 1.05;
    letter-spacing: -0.02em;
    margin: 14px 0 28px;
    color: var(--text);
  }
  .lead {
    color: var(--text-dim);
    font-size: 17px;
    max-width: 640px;
  }
  .num {
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" 1;
  }
  a { color: var(--text); text-decoration: none; }
  a.link { color: var(--accent); border-bottom: 1px solid rgba(201,169,110,.3); transition: border-color .2s; }
  a.link:hover { border-color: var(--accent); }
  :focus-visible {
    outline: 2px solid var(--accent-2);
    outline-offset: 2px;
  }
  .nav button:focus-visible,
  .theme-toggle button:focus-visible,
  .btn:focus-visible,
  a:focus-visible,
  input:focus-visible,
  textarea:focus-visible,
  select:focus-visible {
    box-shadow: 0 0 0 3px rgba(201,169,110,.25);
  }

  /* ---------- Top bar ---------- */
  .topbar {
    position: sticky; top: 0; z-index: 50;
    display: flex;
    align-items: center;
    background: var(--glass);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--hairline);
  }
  .topbar-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1 1 auto;
    min-width: 0;
    height: 60px;
  }
  .topbar-start {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    min-width: 0;
  }
  .topbar-end {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    margin-left: auto;
    min-width: 0;
  }
  .brand {
    display: flex; align-items: center; gap: 10px;
    font-weight: 600; font-size: 14px;
    letter-spacing: -0.01em;
  }
  .sigil {
    width: 26px; height: 26px;
    display: grid; place-items: center;
    border: 1px solid var(--hairline-2);
    border-radius: 6px;
    color: var(--accent);
    font-family: 'Instrument Serif', serif;
    font-size: 17px;
    line-height: 1;
  }
  .nav {
    display: flex;
    gap: 2px;
    align-items: center;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    flex: 1 1 auto;
    justify-content: center;
    min-width: 0;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
    overscroll-behavior-x: contain;
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav button {
    background: transparent; border: 0;
    color: var(--text-dim);
    font-family: inherit; font-size: 13.5px; font-weight: 500;
    padding: 8px 14px;
    border-radius: 8px;
    cursor: pointer;
    white-space: nowrap;
    transition: color .15s, background .15s;
    letter-spacing: -0.005em;
  }
  .nav button:hover { color: var(--text); }
  .nav button.active { color: var(--text); background: var(--surface-2); }

  .theme-toggle {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 3px;
    border-radius: 999px;
    border: 1px solid var(--hairline);
    background: var(--surface);
    flex-shrink: 0;
  }
  .horde-theme-dock {
    position: fixed;
    left: max(16px, env(safe-area-inset-left));
    bottom: max(16px, env(safe-area-inset-bottom));
    z-index: 240;
  }
  .theme-toggle--dock {
    padding: 4px;
    border-color: var(--hairline-2);
    background: var(--glass-strong);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, .35);
    transition: border-color .15s, box-shadow .15s, transform .15s;
  }
  .theme-toggle--dock:hover {
    border-color: rgba(201, 169, 110, .45);
    box-shadow: 0 10px 36px rgba(0, 0, 0, .4);
  }
  .theme-toggle--dock button {
    width: 36px;
    height: 36px;
  }
  .theme-toggle button {
    width: 32px;
    height: 28px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--text-mute);
    cursor: pointer;
    display: grid;
    place-items: center;
    line-height: 0;
    transition: color .15s, background .15s;
  }
  .theme-toggle button svg { display: block; }
  .theme-toggle button:hover { color: var(--text-dim); }
  .theme-toggle button.active {
    background: var(--surface-2);
    color: var(--text);
    box-shadow: inset 0 0 0 1px var(--hairline-2);
  }

  .horde-fm {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    border: 0;
    background: transparent;
    flex-shrink: 0;
  }
  .horde-fm--edge {
    margin-right: max(16px, env(safe-area-inset-right));
    margin-left: 12px;
  }
  .horde-fm.is-loading .horde-fm-btn,
  .horde-fm.is-loading .horde-fm-skip {
    opacity: .65;
    pointer-events: none;
  }
  .horde-fm-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--text-dim);
    white-space: nowrap;
    user-select: none;
  }
  .horde-fm.is-playing .horde-fm-label {
    color: var(--accent);
  }
  .horde-fm-controls {
    display: inline-flex;
    align-items: center;
    gap: 2px;
  }
  .horde-fm-skip {
    width: 22px;
    height: 22px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--text-mute);
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: color .15s, background .15s, transform .15s;
  }
  .horde-fm-skip:hover {
    color: var(--accent);
    background: rgba(201, 169, 110, .1);
  }
  .horde-fm-skip:active { transform: scale(.94); }
  .horde-fm-btn {
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: var(--surface-2);
    color: var(--text);
    cursor: pointer;
    display: grid;
    place-items: center;
    line-height: 0;
    transition: color .15s, background .15s, transform .15s;
  }
  .horde-fm-btn:hover {
    background: rgba(201, 169, 110, .14);
    color: var(--accent);
  }
  .horde-fm-btn:active { transform: scale(.96); }
  .horde-fm-icon { display: block; }
  .horde-fm-icon-pause { display: none; }
  .horde-fm.is-playing .horde-fm-icon-play { display: none; }
  .horde-fm.is-playing .horde-fm-icon-pause { display: block; }
  .horde-fm-vol {
    -webkit-appearance: none;
    appearance: none;
    width: 56px;
    height: 14px;
    margin: 0;
    padding: 0;
    background: transparent;
    cursor: pointer;
    flex-shrink: 0;
    --vol: 55%;
  }
  .horde-fm-vol::-webkit-slider-runnable-track {
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(to right, var(--accent) 0%, var(--accent) var(--vol), var(--hairline-2) var(--vol), var(--hairline-2) 100%);
  }
  .horde-fm-vol::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 10px;
    height: 10px;
    margin-top: -3.5px;
    border-radius: 50%;
    background: var(--accent);
    border: 1.5px solid var(--surface);
    box-shadow: 0 1px 3px rgba(0, 0, 0, .35);
  }
  .horde-fm-vol::-moz-range-track {
    height: 3px;
    border-radius: 999px;
    background: var(--hairline-2);
  }
  .horde-fm-vol::-moz-range-progress {
    height: 3px;
    border-radius: 999px;
    background: var(--accent);
  }
  .horde-fm-vol::-moz-range-thumb {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent);
    border: 1.5px solid var(--surface);
    box-shadow: 0 1px 3px rgba(0, 0, 0, .35);
  }

  /* ---------- Hero ---------- */
  .hero { padding: 96px 0 64px; }
  .hero-meta { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
  .hero-meta .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--text-mute); }
  .hero h1 { margin: 0; }
  .hero-title {
    display: flex;
    align-items: center;
    gap: clamp(20px, 4vw, 56px);
    flex-wrap: wrap;
  }
  .crest-wrap {
    position: relative;
    display: inline-block;
    flex-shrink: 0;
    margin-top: -8px;
    line-height: 0;
  }
  .crest {
    position: relative;
    z-index: 2;
    width: clamp(140px, 18vw, 220px);
    height: auto;
    display: block;
    filter: var(--crest-filter);
    user-select: none;
    -webkit-user-drag: none;
    pointer-events: none;
  }
  .crest-eye {
    position: absolute;
    left: 43.8%;
    top: 31.8%;
    width: 12%;
    height: 10%;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    overflow: visible;
    z-index: 1;
    -webkit-tap-highlight-color: transparent;
  }
  .crest-eye::after {
    content: none;
  }
  .crest-eye:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
  }
  .crest-eye-fill {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle at 42% 38%, #ff7a6a 0%, #c93428 42%, #8f1510 100%);
    transform: scale(0);
    opacity: 0;
    box-shadow: none;
  }
  .crest-wrap.is-eye-lit .crest-eye-fill {
    opacity: 1;
    animation: crest-eye-fill 2.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  }
  .crest-wrap.is-eye-lit-persistent .crest-eye-fill {
    opacity: 1;
    transform: scale(1);
    animation: none;
    box-shadow:
      0 0 8px 2px rgba(201, 52, 40, 0.62),
      0 0 20px 6px rgba(143, 21, 16, 0.32);
  }
  .crest-wrap.is-eye-lit-persistent .crest {
    animation: none;
    filter:
      var(--crest-filter)
      drop-shadow(0 0 14px rgba(201, 52, 40, 0.28));
  }
  .crest-wrap.is-eye-lit .crest {
    animation: crest-eye-ambient 2.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  }
  @keyframes crest-eye-fill {
    0% {
      transform: scale(0);
      box-shadow: 0 0 0 0 rgba(201, 52, 40, 0);
    }
    55% {
      transform: scale(1.08);
      box-shadow:
        0 0 10px 2px rgba(201, 52, 40, 0.65),
        0 0 22px 6px rgba(143, 21, 16, 0.35);
    }
    100% {
      transform: scale(1);
      box-shadow:
        0 0 6px 1px rgba(201, 52, 40, 0.5),
        0 0 16px 4px rgba(143, 21, 16, 0.22);
    }
  }
  @keyframes crest-eye-ambient {
    0%, 100% { filter: var(--crest-filter); }
    45% {
      filter:
        var(--crest-filter)
        drop-shadow(0 0 18px rgba(201, 52, 40, 0.24));
    }
  }
  @media (prefers-reduced-motion: reduce) {
    .crest-wrap.is-eye-lit .crest-eye-fill {
      animation-duration: 0.01ms;
      animation-iteration-count: 1;
      transform: scale(1);
      opacity: 1;
    }
    .crest-wrap.is-eye-lit .crest { animation: none; }
    .crest-wrap.is-eye-lit-persistent .crest-eye-fill,
    .crest-wrap.is-eye-lit-persistent .crest { animation: none; }
  }

  body.is-toxic-chaos #siteShell {
    overflow: hidden;
    position: relative;
    transition: filter 0.6s ease;
  }
  body.is-toxic-chaos .crest-wrap {
    position: relative;
    z-index: 24;
  }
  body.is-toxic-chaos .toxic-drift {
    position: relative;
    z-index: 3;
    will-change: transform;
    animation: toxic-drift var(--toxic-dur, 10s) ease-in-out infinite;
    animation-delay: var(--toxic-delay, 0s);
  }
  body.is-toxic-chaos .toxic-drift-text {
    animation-name: toxic-drift-text;
  }
  body.is-toxic-chaos-fading .toxic-drift {
    animation: none !important;
  }
  body.is-toxic-chaos-fading #siteShell {
    filter: none;
  }
  @keyframes toxic-drift {
    0%, 100% {
      transform: translate(0, 0) rotate(0deg);
    }
    20% {
      transform: translate(var(--toxic-dx), var(--toxic-dy)) rotate(var(--toxic-rot));
    }
    45% {
      transform: translate(calc(var(--toxic-dx) * -0.75), calc(var(--toxic-dy) * 1.15)) rotate(calc(var(--toxic-rot) * -0.8));
    }
    70% {
      transform: translate(calc(var(--toxic-dx) * 0.55), calc(var(--toxic-dy) * -0.9)) rotate(calc(var(--toxic-rot) * 0.6));
    }
  }
  @keyframes toxic-drift-text {
    0%, 100% {
      transform: translate(0, 0) rotate(0deg);
    }
    18% {
      transform: translate(calc(var(--toxic-dx) * 1.1), calc(var(--toxic-dy) * 0.85)) rotate(calc(var(--toxic-rot) * 1.2));
    }
    42% {
      transform: translate(calc(var(--toxic-dx) * -0.9), calc(var(--toxic-dy) * 1.25)) rotate(calc(var(--toxic-rot) * -1));
    }
    68% {
      transform: translate(calc(var(--toxic-dx) * 0.7), calc(var(--toxic-dy) * -1.1)) rotate(calc(var(--toxic-rot) * 0.85));
    }
  }
  @media (prefers-reduced-motion: reduce) {
    body.is-toxic-chaos .toxic-drift {
      animation: none;
    }
  }
  .hero .motto {
    font-family: 'Instrument Serif', serif; font-style: italic;
    font-size: clamp(20px, 2.4vw, 28px);
    color: var(--text-dim);
    margin: 24px 0 0; max-width: 680px;
    letter-spacing: -0.005em;
  }
  .hero .by { color: var(--text-mute); font-style: normal; }

  .stats {
    margin-top: 72px;
    display: grid; grid-template-columns: repeat(3, 1fr);
    border-top: 1px solid var(--hairline);
    border-bottom: 1px solid var(--hairline);
  }
  .stat {
    padding: 28px 24px;
    border-right: 1px solid var(--hairline);
  }
  .stat:last-child { border-right: 0; }
  .stat .label {
    font-size: 11px; letter-spacing: .2em; text-transform: uppercase;
    color: var(--text-mute);
    margin-bottom: 14px;
  }
  .stat .value {
    font-family: 'Instrument Serif', serif;
    font-size: 44px; line-height: 1;
    font-weight: 400;
    letter-spacing: -0.02em;
  }
  .stat .value .sub { color: var(--text-mute); font-size: 22px; margin-left: 4px; }
  @media (max-width: 720px) {
    .stats { grid-template-columns: 1fr; }
    .stat { border-right: 0; border-bottom: 1px solid var(--hairline); }
    .stat:last-child { border-bottom: 0; }
  }

  /* ---------- Section ---------- */
  section.page { padding: 96px 0; }
  section.page.hidden { display: none; }
  .grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
  .grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
  @media (max-width: 860px) {
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
    section.page { padding: 64px 0; }
    .hero { padding: 64px 0 48px; }
  }

  /* ---------- Cards / surfaces ---------- */
  .surface {
    background: var(--surface);
    border: 1px solid var(--hairline);
    border-radius: 16px;
    padding: 28px;
  }
  .surface-flush { border-radius: 16px; overflow: hidden; }
  .divider { height: 1px; background: var(--hairline); margin: 32px 0; }

  /* ---------- Buttons / inputs ---------- */
  .btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 11px 18px;
    border-radius: 999px;
    font-size: 13.5px; font-weight: 500; letter-spacing: -0.005em;
    cursor: pointer;
    border: 1px solid var(--hairline-2);
    background: var(--surface-2);
    color: var(--text);
    transition: background .15s, border-color .15s, transform .1s;
    font-family: inherit;
  }
  .btn:hover { background: var(--btn-hover-bg); border-color: var(--btn-hover-border); }
  .btn:active { transform: scale(.985); }
  .btn-primary {
    background: var(--text);
    color: var(--bg);
    border-color: var(--text);
    font-weight: 600;
  }
  .btn-primary:hover { background: var(--btn-primary-hover); }
  .btn-ghost { background: transparent; }
  input, textarea, select {
    width: 100%;
    background: var(--input-bg);
    border: 1px solid var(--hairline);
    color: var(--text);
    padding: 11px 14px;
    border-radius: 10px;
    font-family: inherit; font-size: 14px;
    outline: none;
    transition: border-color .15s, background .15s;
  }
  input::placeholder, textarea::placeholder { color: var(--text-mute); }
  input:focus, textarea:focus, select:focus {
    border-color: var(--hairline-2);
    background-color: var(--input-bg-focus);
  }
  select { appearance: none; -webkit-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a8acb5' stroke-width='2'><polyline points='6 9 12 15 18 9'/></svg>");
    background-repeat: no-repeat; background-position: right 14px center;
    padding-right: 36px;
  }
  [data-theme="light"] select {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235c6069' stroke-width='2'><polyline points='6 9 12 15 18 9'/></svg>");
  }
  label { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--text-mute); }

  /* ---------- Table ---------- */
  table { width: 100%; border-collapse: collapse; }
  thead th {
    text-align: left;
    font-size: 11px; letter-spacing: .18em; text-transform: uppercase;
    color: var(--text-mute);
    font-weight: 500;
    padding: 14px 16px;
    border-bottom: 1px solid var(--hairline);
  }
  tbody td {
    padding: 16px;
    border-bottom: 1px solid var(--hairline);
    font-size: 14px;
  }
  tbody tr:last-child td { border-bottom: 0; }
  tbody tr { transition: background .12s; }
  tbody tr:hover { background: var(--row-hover); }
  .role-tag { font-size: 12px; color: var(--text-dim); }
  .role-tag.lead { color: var(--accent); }
  .status { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-dim); }
  .roster-status-head,
  .roster-status-cell { text-align: right; }
  .roster-status-cell .status { justify-content: flex-end; }
  .status .pulse { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(126,198,153,.7); animation: pulse 2s infinite; }
  .status.idle .pulse { background: var(--text-mute); animation: none; box-shadow: none; }
  @keyframes pulse {
    0%   { box-shadow: 0 0 0 0 rgba(126,198,153,.4); }
    70%  { box-shadow: 0 0 0 8px rgba(126,198,153,0); }
    100% { box-shadow: 0 0 0 0 rgba(126,198,153,0); }
  }

  /* ---------- Oil battle ---------- */
  #oilSyncStatus.is-saving { color: var(--text-mute); }
  #oilSyncStatus.is-saved { color: var(--accent); }
  #oilSyncStatus.is-error { color: #e07a7a; }
  .oil-planner-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    border: 1px solid var(--hairline-2);
    border-radius: 12px;
    background: var(--surface);
  }
  .oil-planner-copy {
    display: grid;
    gap: 3px;
    min-width: 0;
  }
  .oil-planner-copy strong { color: var(--text); }
  #panel-oil.oil-readonly .oil-battle-toolbar input:not([type="text"]),
  #panel-oil.oil-readonly .oil-battle-toolbar select,
  #panel-oil.oil-readonly .oil-battle-toolbar button,
  #panel-oil.oil-readonly .oil-score-grid input,
  #panel-oil.oil-readonly .oil-points-table select,
  #panel-oil.oil-readonly .oil-bulk select,
  #panel-oil.oil-readonly .oil-bulk button,
  #panel-oil.oil-readonly .oil-map-assign-controls select,
  #panel-oil.oil-readonly .oil-map-assign-controls button,
  #panel-oil.oil-readonly .oil-map-chip {
    opacity: .72;
  }
  .oil-battle-toolbar {
    display: grid;
    grid-template-columns: 1.2fr .6fr 1fr;
    gap: 14px;
    align-items: end;
  }
  .oil-days-input { max-width: 140px; }
  .oil-score-grid {
    margin-top: 16px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 14px;
  }
  .oil-score-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    border: 1px solid var(--hairline);
    border-radius: 12px;
    padding: 12px;
    background: var(--surface-2);
  }
  .oil-score-key {
    font-size: 13px;
    color: var(--text);
    margin-bottom: 2px;
  }
  .oil-score-field-label {
    font-size: 10px;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--text-mute);
  }
  .oil-score-card input {
    font-size: 14px;
    letter-spacing: normal;
    color: var(--text);
  }
  .oil-summary-wrap {
    margin-top: 16px;
    border: 1px solid var(--hairline);
    border-radius: 12px;
    overflow-x: auto;
  }
  .oil-summary-table { min-width: 560px; }
  .oil-summary-table tbody td,
  .oil-summary-table thead th {
    padding: 12px 14px;
  }
  .oil-summary-total td {
    font-weight: 600;
    color: var(--text);
  }
  .oil-alliance-name {
    font-weight: 600;
    line-height: 1.2;
    word-break: break-word;
  }
  .oil-points-head {
    align-items: end;
    gap: 10px;
  }
  .oil-map-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  .oil-map-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--hairline);
    border-radius: 999px;
    padding: 6px 10px;
    background: var(--surface-2);
    font-family: inherit;
    font-size: 12px;
    color: var(--text-dim);
    text-align: left;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
  }
  .oil-map-chip:hover:not(:disabled) {
    border-color: color-mix(in srgb, var(--accent) 55%, var(--hairline));
  }
  .oil-map-chip.is-active {
    border-color: var(--accent);
    background: color-mix(in srgb, var(--accent) 12%, var(--surface-2));
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 45%, transparent);
  }
  .oil-map-chip:disabled {
    cursor: not-allowed;
  }
  .oil-map-chip-copy {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
  }
  .oil-map-chip-name {
    color: var(--text);
    font-weight: 600;
    line-height: 1.15;
  }
  .oil-map-chip-stats {
    white-space: nowrap;
  }
  .oil-map-chip-swatch {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    border: 1px solid rgba(12, 14, 18, 0.4);
    flex: 0 0 auto;
  }
  .oil-map-viewer-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
  }
  .oil-map-assign-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-right: 10px;
    margin-right: 2px;
    border-right: 1px solid var(--hairline);
  }
  .oil-map-assign-label {
    font-size: 10px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--text-mute);
    white-space: nowrap;
  }
  .oil-map-owner-select {
    min-width: 190px;
    padding: 7px 30px 7px 10px;
    font-size: 12px;
  }
  .oil-map-days-control {
    display: inline-flex;
    align-items: center;
    gap: 6px;
  }
  .oil-map-days-control[hidden] { display: none !important; }
  .oil-map-days-input {
    width: 68px;
    min-width: 68px;
    padding: 7px 8px;
    font-size: 12px;
  }
  .oil-map-tool-btn {
    width: 36px;
    min-width: 36px;
    padding: 7px 0;
    font-size: 18px;
    line-height: 1;
  }
  .oil-map-tool-text {
    padding: 7px 10px;
    font-size: 12px;
  }
  .oil-map-zoom-label {
    min-width: 50px;
    text-align: center;
    color: var(--text);
  }
  .oil-map-wheel-hint {
    margin-left: auto;
  }
  .oil-map-action-status {
    min-height: 18px;
    margin-top: 6px;
    color: var(--accent);
  }
  .oil-map-point-editor {
    display: flex;
    align-items: end;
    flex-wrap: wrap;
    gap: 12px 18px;
    margin-top: 8px;
    padding: 12px;
    border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--hairline));
    border-radius: 10px;
    background: color-mix(in srgb, var(--accent) 7%, var(--surface-2));
  }
  .oil-map-point-editor[hidden],
  .oil-map-point-editor-controls[hidden] { display: none !important; }
  .oil-map-point-editor-copy {
    display: flex;
    flex: 1 1 210px;
    flex-direction: column;
    gap: 3px;
  }
  .oil-map-point-editor-copy strong {
    color: var(--text);
    font-size: 15px;
  }
  .oil-map-point-editor-controls {
    display: flex;
    align-items: end;
    flex: 2 1 520px;
    flex-wrap: wrap;
    gap: 8px;
  }
  .oil-map-point-editor-controls label {
    display: flex;
    flex-direction: column;
    gap: 5px;
  }
  .oil-map-point-editor-controls .oil-map-owner-select { min-width: 180px; }
  .oil-map-viewer:fullscreen {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    background: var(--surface);
  }
  .oil-map-viewer:fullscreen .oil-map-viewer-toolbar {
    flex: 0 0 auto;
  }
  .oil-map-viewer:fullscreen .oil-map-wrap {
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
    margin-top: 0;
    border-radius: 8px;
  }
  .oil-map-wrap {
    border: 1px solid var(--hairline);
    border-radius: 12px;
    overflow: auto;
    background:
      radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0)),
      var(--surface);
    padding: 8px;
    height: clamp(420px, 72vh, 760px);
    overscroll-behavior: contain;
    touch-action: none;
    user-select: none;
  }
  .oil-map-wrap.is-pannable {
    cursor: grab;
  }
  .oil-map-wrap.is-dragging {
    cursor: grabbing;
  }
  .oil-map-wrap:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
  }
  .oil-map-svg {
    display: block;
    width: auto;
    min-width: 0;
    max-width: none;
    height: auto;
  }
  .oil-map-background {
    pointer-events: none;
  }
  .oil-map-node {
    cursor: pointer;
    transition: opacity .15s ease;
  }
  .oil-map-viewer.is-painting .oil-map-node {
    cursor: crosshair;
  }
  .oil-map-node--empty { cursor: default; }
  .oil-map-node rect {
    stroke-width: 1.2;
    transition: fill .2s ease, stroke .2s ease;
  }
  .oil-map-node:hover rect {
    stroke-width: 1.8;
  }
  .oil-map-node text {
    fill: #111111;
    pointer-events: none;
    user-select: none;
  }
  .oil-map-node-status {
    letter-spacing: .02em;
  }
  .oil-map-hitbox {
    pointer-events: all;
    stroke: none;
  }
  .oil-map-base-text {
    fill: #111111;
    letter-spacing: .02em;
    pointer-events: none;
    user-select: none;
  }
  .oil-map-node:focus-visible rect {
    stroke: var(--accent);
    stroke-width: 2;
  }
  .oil-map-node.is-recent rect {
    stroke: var(--accent);
    stroke-width: 2.4;
  }
  .oil-map-base-node {
    cursor: pointer;
  }
  .oil-map-base-node.is-active-brush rect {
    stroke: var(--accent);
    stroke-width: 2.4;
  }
  .oil-map-base-node:focus-visible rect {
    stroke: var(--accent);
    stroke-width: 2;
  }
  .oil-points-wrap {
    max-height: 560px;
    overflow: auto;
    border: 1px solid var(--hairline);
    border-radius: 12px;
  }
  .oil-points-table {
    border-collapse: separate;
    border-spacing: 0;
  }
  .oil-points-table thead th {
    background: var(--surface);
    box-shadow: inset 0 -1px 0 var(--hairline);
  }
  .oil-points-table tbody td,
  .oil-points-table thead th {
    padding: 10px 12px;
  }
  .oil-points-table tbody td:nth-child(4) {
    min-width: 140px;
  }
  .oil-points-table tbody td:last-child { min-width: 112px; }
  .oil-points-table select {
    min-width: 120px;
    padding: 7px 30px 7px 10px;
    font-size: 13px;
  }
  .oil-point-days {
    width: 92px;
    min-width: 78px;
    padding: 7px 9px;
    font-size: 13px;
  }
  .oil-row-pulse td {
    animation: oil-row-pulse .7s ease;
  }
  @keyframes oil-row-pulse {
    0% { background: rgba(201, 169, 110, 0.24); }
    100% { background: transparent; }
  }
  @media (max-width: 980px) {
    .oil-battle-toolbar { grid-template-columns: 1fr; }
  }
  @media (max-width: 720px) {
    .oil-score-grid { grid-template-columns: 1fr; }
    .oil-map-wrap { height: clamp(360px, 64vh, 620px); }
    .oil-map-wheel-hint { width: 100%; margin-left: 0; }
    .oil-map-assign-controls {
      width: 100%;
      flex-wrap: wrap;
      padding-right: 0;
      padding-bottom: 8px;
      margin-right: 0;
      border-right: 0;
      border-bottom: 1px solid var(--hairline);
    }
    .oil-map-assign-label { width: 100%; }
    .oil-map-owner-select { flex: 1 1 150px; min-width: 0; }
    .oil-map-days-control { flex: 0 1 auto; }
    .oil-map-days-control .oil-map-assign-label { width: auto; }
    .oil-map-point-editor { align-items: stretch; }
    .oil-map-point-editor-controls { align-items: stretch; }
    .oil-map-point-editor-controls label { flex: 1 1 145px; }
    .oil-map-point-editor-controls .oil-map-owner-select,
    .oil-map-point-editor-controls .oil-map-days-input { width: 100%; }
    .oil-planner-bar { align-items: stretch; flex-direction: column; }
    .oil-points-head { align-items: stretch; }
    .oil-bulk { width: 100%; }
    .oil-bulk select { flex: 1; min-width: 0; }
  }

  /* ---------- Events ---------- */
  .event {
    display: grid; grid-template-columns: 220px 1fr auto; gap: 32px;
    padding: 28px 0;
    border-bottom: 1px solid var(--hairline);
    align-items: baseline;
  }
  .event:last-child { border-bottom: 0; }
  .event .when {
    font-family: 'Instrument Serif', serif;
    font-size: 22px; color: var(--text);
    letter-spacing: -0.01em;
  }
  .event .name {
    font-size: 20px; font-weight: 500;
    letter-spacing: -0.01em;
  }
  .event .desc { color: var(--text-dim); font-size: 14px; margin-top: 4px; max-width: 520px; }
  .event .tag {
    font-size: 10px; letter-spacing: .2em; text-transform: uppercase;
    padding: 5px 10px; border-radius: 999px;
    border: 1px solid var(--hairline-2); color: var(--text-dim);
  }
  .event.priority .tag { color: var(--accent); border-color: rgba(201,169,110,.4); }
  @media (max-width: 720px) {
    .event { grid-template-columns: 1fr; gap: 8px; }
  }

  /* ---------- Heroes ---------- */
  .hero-card {
    padding: 24px;
    background: var(--surface);
    border: 1px solid var(--hairline);
    border-radius: 14px;
    transition: border-color .2s, background .2s;
  }
  .hero-card:hover { border-color: var(--hairline-2); background: var(--surface-2); }
  .hero-card .tier {
    display: inline-block;
    font-family: 'Instrument Serif', serif;
    font-size: 36px; line-height: 1;
    color: var(--accent);
    letter-spacing: -0.02em;
    margin-bottom: 16px;
  }
  .hero-card .h-name { font-size: 19px; font-weight: 500; letter-spacing: -0.01em; }
  .hero-card .h-role { font-size: 12px; color: var(--text-mute); letter-spacing: .12em; text-transform: uppercase; margin-top: 4px; }
  .hero-card .h-note { color: var(--text-dim); font-size: 14px; margin-top: 14px; }

  /* ---------- Guides ---------- */
  .guide-library { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .guide-card {
    display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
    min-height: 220px; padding: 26px; text-align: left; cursor: pointer;
    background:
      radial-gradient(circle at top right, rgba(201,169,110,.12), transparent 42%),
      var(--surface);
    border: 1px solid var(--hairline);
    border-radius: 18px;
    color: var(--text);
    font-family: inherit;
    transition: transform .18s ease, border-color .18s ease, background .18s ease;
  }
  .guide-card:hover {
    transform: translateY(-2px);
    border-color: rgba(201,169,110,.36);
    background:
      radial-gradient(circle at top right, rgba(201,169,110,.18), transparent 42%),
      var(--surface-2);
  }
  .guide-card-kicker,
  .guide-card-meta {
    color: var(--text-mute);
    font-size: 11px;
    letter-spacing: .18em;
    text-transform: uppercase;
  }
  .guide-card-title {
    font-family: 'Instrument Serif', serif;
    font-size: 34px;
    line-height: 1;
    letter-spacing: -0.02em;
  }
  .guide-card-summary { color: var(--text-dim); line-height: 1.65; }
  .guide-card-meta {
    margin-top: auto;
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }
  .guide-card-likes {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-width: 28px;
    height: 26px;
    padding: 0 10px 0 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    color: #f2b8c6;
    background: rgba(242, 184, 198, .12);
    border: 1px solid rgba(242, 184, 198, .28);
    flex-shrink: 0;
  }
  .guide-card-likes .guide-like-icon {
    width: 13px;
    height: 13px;
    opacity: 1;
    flex-shrink: 0;
  }
  .guide-card-likes-count {
    line-height: 1;
    font-variant-numeric: tabular-nums;
  }
  .guide-card--featured {
    border-color: rgba(201,169,110,.42);
    background:
      radial-gradient(circle at top right, rgba(201,169,110,.22), transparent 48%),
      linear-gradient(160deg, rgba(201,169,110,.08), transparent 55%),
      var(--surface);
  }
  .guide-card-live {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #1a1208;
    background: linear-gradient(135deg, #e6c98e, #c9a96e);
  }
  .guide-modal {
    position: fixed;
    inset: 0;
    z-index: 600;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: max(24px, env(safe-area-inset-top)) 22px max(24px, env(safe-area-inset-bottom));
    overflow: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }
  .guide-modal[hidden] { display: none; }
  body.guide-modal-open {
    overflow: hidden;
  }
  body.guide-modal-open #siteFooter,
  #siteFooter[hidden] {
    display: none !important;
  }
  .guide-modal-backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    background: rgba(3, 5, 10, .55);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    cursor: pointer;
  }
  .guide-reader {
    position: relative;
    z-index: 1;
    width: min(980px, 100%);
    max-height: min(920px, calc(100vh - 48px));
    padding: 0;
    overflow: auto;
    border-radius: 0;
    background: rgb(17, 19, 24);
    border-color: rgba(201,169,110,.26);
    box-shadow: 0 26px 90px rgba(0,0,0,.56);
    scrollbar-width: thin;
    scrollbar-color: rgba(201,169,110,.55) transparent;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
  }
  .guide-reader::-webkit-scrollbar { width: 12px; }
  .guide-reader::-webkit-scrollbar-track {
    background: transparent !important;
  }
  .guide-reader::-webkit-scrollbar-thumb {
    background:
      linear-gradient(180deg, rgba(230,201,142,.72), rgba(201,169,110,.44));
    border: 3px solid transparent;
    border-radius: 999px;
    background-clip: content-box;
  }
  .guide-reader::-webkit-scrollbar-thumb:hover {
    background:
      linear-gradient(180deg, rgba(230,201,142,.9), rgba(201,169,110,.62));
    border: 3px solid transparent;
    border-radius: 999px;
    background-clip: content-box;
  }
  .guide-reader-head {
    display: flex; justify-content: space-between; gap: 24px; align-items: flex-start;
    padding: 32px;
    background:
      linear-gradient(135deg, rgba(201,169,110,.14), rgba(255,255,255,.03)),
      var(--surface-2);
    border-bottom: 1px solid var(--hairline);
  }
  .guide-reader-head h3 {
    font-family: 'Instrument Serif', serif;
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.04;
    margin: 10px 0 14px;
    font-weight: 400;
    letter-spacing: -0.025em;
  }
  .guide-reader-head p { margin: 0; color: var(--text-dim); max-width: 720px; line-height: 1.65; }
  .guide-reader-body { padding: 32px 32px 48px; display: grid; gap: 24px; }
  .guide-reader-section {
    padding-bottom: 24px;
    border-bottom: 1px solid var(--hairline);
  }
  .guide-reader-section:last-child { border-bottom: 0; padding-bottom: 0; }
  .guide-reader-section h4 {
    margin: 0 0 12px;
    color: var(--accent);
    font-size: 12px;
    letter-spacing: .2em;
    text-transform: uppercase;
  }
  .guide-reader-section p {
    margin: 10px 0 0;
    color: var(--text-dim);
    line-height: 1.78;
  }
  .guide-reader-section--rich { border-bottom: 0; padding-bottom: 0; }
  .guide-reader-section--rich p:last-child { margin-bottom: 0; }

  /* WC digest inside guides */
  .guide-wc-notice {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    margin-top: 18px;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid rgba(201,169,110,.35);
    background: rgba(201,169,110,.1);
    max-width: 720px;
  }
  .guide-wc-notice-icon {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    font-size: 18px;
    font-weight: 700;
    color: #1a1208;
    background: linear-gradient(135deg, #e6c98e, #c9a96e);
  }
  .guide-wc-notice strong {
    display: block;
    margin-bottom: 4px;
    font-size: 12px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--accent-2);
  }
  .guide-wc-notice p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text);
  }
  .guide-wc-matches {
    display: grid;
    gap: 18px;
  }
  .guide-wc-match {
    position: relative;
    padding: 22px 22px 20px;
    border-radius: 16px;
    border: 1px solid var(--hairline-2);
    background:
      radial-gradient(circle at top left, rgba(255,255,255,.04), transparent 45%),
      var(--surface-2);
  }
  .guide-wc-match--featured {
    border-color: rgba(201,169,110,.45);
    box-shadow: 0 12px 40px rgba(0,0,0,.28);
    background:
      radial-gradient(circle at top right, rgba(201,169,110,.16), transparent 50%),
      linear-gradient(180deg, rgba(201,169,110,.06), transparent 40%),
      var(--surface-2);
  }
  .guide-wc-match-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: #1a1208;
    background: linear-gradient(135deg, #e6c98e, #c9a96e);
  }
  .guide-wc-match-head {
    margin-bottom: 18px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--hairline);
  }
  .guide-wc-teams {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
    font-family: 'Instrument Serif', serif;
    font-size: clamp(26px, 4vw, 34px);
    line-height: 1.1;
    letter-spacing: -0.02em;
  }
  .guide-wc-flag { font-size: 1.1em; line-height: 1; }
  .guide-wc-vs {
    color: var(--text-mute);
    font-size: .75em;
    font-family: inherit;
  }
  .guide-wc-kickoff {
    margin-top: 8px;
    font-size: 11px;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--accent);
  }
  .guide-wc-match-body { display: grid; gap: 14px; }
  .guide-wc-field { display: grid; gap: 6px; }
  .guide-wc-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--text-mute);
  }
  .guide-wc-field p {
    margin: 0;
    color: var(--text);
    line-height: 1.7;
  }
  .guide-wc-field strong { color: var(--accent-2); font-weight: 600; }
  .guide-wc-odds {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }
  .guide-wc-odd {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 10px 8px;
    border-radius: 10px;
    font-size: 11px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--text-mute);
    background: rgba(255,255,255,.04);
    border: 1px solid var(--hairline);
  }
  .guide-wc-odd b {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0;
    color: var(--text);
  }
  .guide-wc-odd.is-home b { color: var(--accent-2); }
  .guide-wc-odd.is-away b { color: #8eb8e8; }
  .guide-wc-tip {
    margin: 0;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.65;
    color: var(--text-dim);
    background: rgba(0,0,0,.22);
    border-left: 3px solid var(--accent);
  }
  .guide-wc-tip strong { color: var(--text); }
  .guide-wc-meter {
    display: grid;
    gap: 8px;
  }
  .guide-wc-meter-track {
    height: 6px;
    border-radius: 999px;
    background: rgba(255,255,255,.08);
    overflow: hidden;
  }
  .guide-wc-meter-fill {
    width: calc(var(--wc-conf, 5) * 10%);
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #c9a96e, #e6c98e);
  }
  .guide-wc-meter-label {
    font-size: 12px;
    color: var(--text-mute);
    letter-spacing: .06em;
  }
  .guide-wc-meter-label strong { color: var(--accent-2); }
  .guide-wc-table-wrap {
    overflow-x: auto;
    border-radius: 14px;
    border: 1px solid var(--hairline-2);
  }
  .guide-wc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
  }
  .guide-wc-table th,
  .guide-wc-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--hairline);
    vertical-align: top;
  }
  .guide-wc-table th {
    font-size: 10px;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--text-mute);
    background: rgba(255,255,255,.03);
  }
  .guide-wc-table tr:last-child td { border-bottom: 0; }
  .guide-wc-table td { color: var(--text-dim); line-height: 1.55; }
  .guide-wc-table td:first-child { color: var(--text); font-weight: 500; }
  .guide-wc-pick {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 6px;
    font-weight: 700;
    color: #1a1208;
    background: linear-gradient(135deg, #e6c98e, #c9a96e);
  }
  .guide-wc-pick--strong {
    background: linear-gradient(135deg, #9fd4b0, #7ec699);
    color: #0d1a12;
  }
  .guide-wc-pick-note {
    margin-left: 6px;
    font-size: 12px;
    color: var(--text-mute);
    font-style: italic;
  }
  .guide-wc-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }
  .guide-wc-summary-card {
    padding: 20px;
    border-radius: 14px;
    border: 1px solid var(--hairline-2);
    background: var(--surface-2);
  }
  .guide-wc-summary-card--accent {
    border-color: rgba(126,198,153,.4);
    background: rgba(126,198,153,.08);
  }
  .guide-wc-summary-label {
    display: block;
    margin-bottom: 8px;
    font-size: 10px;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--text-mute);
  }
  .guide-wc-summary-card p {
    margin: 0;
    font-family: 'Instrument Serif', serif;
    font-size: 26px;
    line-height: 1.2;
    color: var(--text);
  }
  .guide-wc-summary-hint {
    display: block;
    margin-top: 6px;
    font-family: inherit;
    font-size: 13px;
    color: var(--text-mute);
    font-style: italic;
  }

  .guide-likes {
    margin-top: 8px;
    padding: 24px;
    border-radius: 16px;
    border: 1px solid var(--hairline-2);
    background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.01));
  }
  .guide-likes-top {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 14px;
  }
  .guide-likes-label {
    font-size: 12px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--text-mute);
  }
  .guide-like-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 16px 0 12px;
    border-radius: 999px;
    border: 1px solid rgba(242, 184, 198, .28);
    background: rgba(242, 184, 198, .08);
    color: #f2b8c6;
    cursor: pointer;
    transition: transform .15s ease, background .15s ease, border-color .15s ease, color .15s ease;
  }
  .guide-like-btn:hover {
    transform: translateY(-1px);
    background: rgba(242, 184, 198, .14);
    border-color: rgba(242, 184, 198, .45);
  }
  .guide-like-btn.is-liked {
    color: #fff;
    background: linear-gradient(135deg, #e07a96, #c45d7a);
    border-color: transparent;
    box-shadow: 0 8px 24px rgba(196, 93, 122, .28);
  }
  .guide-like-btn.is-liked .guide-like-icon { fill: currentColor; }
  .guide-like-icon {
    width: 20px;
    height: 20px;
    fill: currentColor;
    opacity: .65;
    transition: opacity .15s ease, transform .15s ease;
  }
  .guide-like-btn:hover .guide-like-icon { opacity: .9; }
  .guide-like-btn.is-liked .guide-like-icon {
    opacity: 1;
    transform: scale(1.05);
  }
  .guide-like-count {
    min-width: 1ch;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
  }
  .guide-like-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  .guide-like-chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    background: var(--surface-2);
    border: 1px solid var(--hairline-2);
  }
  .guide-like-chip.role-supreme {
    color: #f0d9a8;
    border-color: rgba(230, 201, 142, .35);
    background: rgba(230, 201, 142, .1);
  }
  .guide-like-chip.role-general {
    color: #b8e0c8;
    border-color: rgba(126, 198, 153, .35);
    background: rgba(126, 198, 153, .1);
  }
  .guide-like-empty {
    font-size: 14px;
    color: var(--text-mute);
    font-style: italic;
  }
  [data-theme="light"] .guide-likes {
    background: linear-gradient(180deg, rgba(196, 93, 122, .07), rgba(196, 93, 122, .02));
    border-color: rgba(196, 93, 122, .2);
  }
  [data-theme="light"] .guide-like-btn {
    color: #9a334f;
    background: #fff;
    border-color: rgba(196, 93, 122, .34);
    box-shadow: 0 1px 4px rgba(26, 28, 34, .07);
  }
  [data-theme="light"] .guide-like-btn .guide-like-icon {
    fill: #c45d7a;
    opacity: 1;
  }
  [data-theme="light"] .guide-like-btn:hover {
    color: #7f2239;
    background: rgba(196, 93, 122, .09);
    border-color: rgba(196, 93, 122, .48);
  }
  [data-theme="light"] .guide-like-btn.is-liked {
    color: #fff;
    background: linear-gradient(135deg, #d45674, #b83d5c);
    border-color: transparent;
    box-shadow: 0 6px 20px rgba(196, 93, 122, .32);
  }
  [data-theme="light"] .guide-like-btn.is-liked .guide-like-icon {
    fill: #fff;
    opacity: 1;
  }
  [data-theme="light"] .guide-card-likes {
    color: #9a334f;
    background: rgba(196, 93, 122, .11);
    border-color: rgba(196, 93, 122, .26);
  }
  [data-theme="light"] .guide-card-likes .guide-like-icon {
    fill: #c45d7a;
  }

  [data-theme="light"] .guide-modal-backdrop {
    background: rgba(247, 246, 243, .58);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
  }
  [data-theme="light"] .guide-reader {
    background: #fbfaf7;
    border-color: rgba(154,120,64,.22);
    box-shadow: 0 26px 80px rgba(26,28,34,.22);
    scrollbar-color: rgba(154,120,64,.58) transparent;
  }
  [data-theme="light"] .guide-reader::-webkit-scrollbar-track {
    background: transparent !important;
  }
  [data-theme="light"] .guide-reader::-webkit-scrollbar-thumb {
    background:
      linear-gradient(180deg, rgba(184,146,74,.72), rgba(154,120,64,.48));
    border: 3px solid transparent;
    border-radius: 999px;
    background-clip: content-box;
  }
  [data-theme="light"] .guide-reader::-webkit-scrollbar-thumb:hover {
    background:
      linear-gradient(180deg, rgba(184,146,74,.9), rgba(154,120,64,.64));
    border: 3px solid transparent;
    border-radius: 999px;
    background-clip: content-box;
  }
  [data-theme="light"] .guide-reader-head {
    background:
      linear-gradient(135deg, rgba(184,146,74,.18), rgba(255,255,255,.82)),
      #f5f1e8;
    border-bottom-color: rgba(154,120,64,.16);
  }
  [data-theme="light"] .guide-reader-head h3,
  [data-theme="light"] .guide-card-title {
    color: #1a1c22;
  }
  [data-theme="light"] .guide-reader-head p,
  [data-theme="light"] .guide-reader-section p,
  [data-theme="light"] .guide-card-summary {
    color: #4f535c;
  }
  [data-theme="light"] .guide-reader-section {
    border-bottom-color: rgba(0,0,0,.08);
  }
  [data-theme="light"] .guide-card {
    background:
      radial-gradient(circle at top right, rgba(184,146,74,.16), transparent 42%),
      rgba(255,255,255,.72);
    border-color: rgba(0,0,0,.08);
  }
  [data-theme="light"] .guide-card:hover {
    background:
      radial-gradient(circle at top right, rgba(184,146,74,.24), transparent 42%),
      rgba(255,255,255,.92);
    border-color: rgba(154,120,64,.28);
  }
  .guide-list { padding-left: 0; list-style: none; color: var(--text-dim); line-height: 1.75; }
  .guide-list li { padding: 12px 0; border-bottom: 1px solid var(--hairline); }
  .guide-list li:last-child { border-bottom: 0; }
  .guide-list b { color: var(--text); font-weight: 500; }
  .guide-reader-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
    flex-shrink: 0;
  }
  .guide-reader-head--editing {
    flex-direction: column;
    align-items: stretch;
  }
  .guide-reader-head--editing .guide-reader-actions {
    width: 100%;
    justify-content: flex-start;
    padding-top: 8px;
    border-top: 1px solid var(--hairline);
  }
  .guide-edit-meta {
    display: grid;
    gap: 12px;
    margin-top: 8px;
  }
  .guide-edit-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }
  .guide-edit-field {
    display: grid;
    gap: 6px;
    font-size: 12px;
    color: var(--text-mute);
  }
  .guide-edit-field span {
    letter-spacing: .08em;
    text-transform: uppercase;
    font-size: 10px;
    font-weight: 600;
  }
  .guide-edit-field em.guide-edit-hint {
    font-style: normal;
    text-transform: none;
    letter-spacing: 0;
    font-size: 11px;
    color: var(--text-mute);
    font-weight: 400;
  }
  .guide-edit-field input,
  .guide-edit-field textarea {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--hairline-2);
    border-radius: 10px;
    padding: 10px 12px;
  }
  .guide-edit-field textarea {
    resize: vertical;
    min-height: 72px;
  }
  .guide-edit-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-dim);
    cursor: pointer;
  }
  .guide-reader-body--editing {
    display: grid;
    gap: 16px;
  }
  .guide-edit-section {
    padding: 16px;
    border-radius: 14px;
    border: 1px solid var(--hairline-2);
    background: rgba(255,255,255,.02);
    display: grid;
    gap: 12px;
  }
  .guide-edit-section--notice {
    border-style: dashed;
    background: rgba(201,169,110,.06);
  }
  .guide-edit-section-head {
    display: flex;
    gap: 10px;
    align-items: flex-end;
    justify-content: space-between;
  }
  .guide-edit-section-head .guide-edit-field { flex: 1; }
  .guide-edit-section-remove {
    flex-shrink: 0;
    padding: 8px 10px !important;
    font-size: 12px !important;
  }
  .guide-edit-section-content {
    font-family: ui-monospace, 'Cascadia Code', Consolas, monospace;
    font-size: 12.5px;
    line-height: 1.55;
    min-height: 180px;
  }
  .guide-edit-status { margin-right: auto; }
  @media (max-width: 760px) {
    .guide-edit-row { grid-template-columns: 1fr; }
    .guide-reader-actions { width: 100%; justify-content: stretch; }
    .guide-reader-actions .btn { flex: 1 1 auto; justify-content: center; }
    .guide-library { grid-template-columns: 1fr; }
    .guide-modal { padding: 16px 12px; }
    .guide-reader { max-height: calc(100vh - 32px); }
    .guide-reader-head { flex-direction: column; padding: 24px; }
    .guide-reader-body { padding: 24px 24px 40px; }
    .guide-wc-match--featured .guide-wc-match-badge { position: static; margin-bottom: 12px; width: fit-content; }
    .guide-wc-summary { grid-template-columns: 1fr; }
    .guide-wc-teams { font-size: 24px; }
    .guide-wc-table th,
    .guide-wc-table td { padding: 12px; font-size: 13px; }
  }
  /* ---------- Ranking ---------- */
  .podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; gap: 16px; margin-bottom: 40px; align-items: end; }
  .podium-card {
    padding: 28px 20px;
    background: var(--surface);
    border: 1px solid var(--hairline);
    border-radius: 16px;
    text-align: center;
  }
  .podium-card.first { background: var(--surface-2); border-color: rgba(201,169,110,.25); padding: 36px 20px; }
  .podium-card .pos { font-family: 'Instrument Serif', serif; font-size: 28px; color: var(--text-mute); }
  .podium-card.first .pos { color: var(--accent); }
  .podium-card .pnick { font-size: 18px; font-weight: 500; margin-top: 14px; letter-spacing: -0.01em; }
  .podium-card .pval {
    font-family: 'Instrument Serif', serif;
    font-size: 48px; line-height: 1; margin-top: 16px;
    color: var(--text);
    letter-spacing: -0.02em;
  }
  .podium-card.first .pval { color: var(--accent); }
  .podium-card .plabel { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--text-mute); margin-top: 8px; }
  @media (max-width: 720px) {
    .podium { grid-template-columns: 1fr; }
    .podium-card.first { padding: 28px 20px; }
  }
  .bar {
    height: 2px; background: var(--hairline); border-radius: 999px; overflow: hidden; min-width: 80px;
  }
  .bar > div { height: 100%; background: var(--accent); }

  /* ---------- Chat ---------- */
  .chat-frame {
    background: var(--surface);
    border: 1px solid var(--hairline);
    border-radius: 16px;
    min-height: 480px;
    overflow: hidden;
  }
  .chat-empty { padding: 64px 32px; text-align: center; }
  .chat-empty h3 { font-family: 'Instrument Serif', serif; font-size: 28px; margin: 0 0 12px; font-weight: 400; }
  .chat-empty p { color: var(--text-dim); max-width: 460px; margin: 0 auto 24px; }
  .chat-empty ol { color: var(--text-dim); max-width: 460px; margin: 0 auto; text-align: left; font-size: 14px; padding-left: 20px; }
  .chat-empty ol li { margin: 8px 0; }
  .chat-empty code { font-family: 'SF Mono', Consolas, monospace; font-size: 12.5px; color: var(--accent); background: rgba(201,169,110,.08); padding: 2px 6px; border-radius: 4px; }

  /* ---------- Floating chat ---------- */
  .horde-chat {
    position: fixed;
    right: max(16px, env(safe-area-inset-right));
    bottom: max(16px, env(safe-area-inset-bottom));
    z-index: 240;
    display: none;
    font-size: 14px;
  }
  body.authenticated .horde-chat { display: block; }
  .horde-chat-toggle {
    width: 56px;
    height: 56px;
    position: relative;
    border-radius: 50%;
    border: 1px solid var(--hairline-2);
    background: var(--glass-strong);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: var(--text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
    transition: transform .15s, border-color .15s, background .15s;
  }
  .horde-chat-toggle::after {
    content: '';
    position: absolute;
    top: 9px;
    right: 9px;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #ffb2b2 0%, #ea5f5f 28%, #d74242 100%);
    border: 2px solid var(--glass-solid);
    box-shadow:
      0 0 0 2px rgba(215, 66, 66, .22),
      0 2px 8px rgba(0, 0, 0, .35);
    opacity: 0;
    transform: scale(.35);
    transition: opacity .2s ease, transform .2s ease;
    pointer-events: none;
  }
  .horde-chat-toggle.has-unread::after {
    opacity: 1;
    transform: scale(1);
  }
  [data-theme="light"] .horde-chat-toggle::after {
    border-color: #fff;
    box-shadow:
      0 0 0 2px rgba(215, 66, 66, .18),
      0 2px 6px rgba(26, 28, 34, .22);
  }
  .horde-chat-toggle:hover {
    border-color: rgba(201, 169, 110, .45);
    background: var(--glass-solid);
    transform: scale(1.04);
  }
  .horde-chat-toggle svg { display: block; }
  .horde-chat.open .horde-chat-toggle {
    border-color: rgba(201, 169, 110, .5);
    color: var(--accent-2);
  }
  .horde-chat-panel {
    position: absolute;
    right: 0;
    bottom: 68px;
    width: min(380px, calc(100vw - 32px));
    height: min(500px, calc(100dvh - 120px));
    display: none;
    flex-direction: column;
    border-radius: 16px;
    border: 1px solid var(--hairline-2);
    background: var(--glass-strong);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 20px 56px rgba(0, 0, 0, 0.45);
    overflow: hidden;
  }
  .horde-chat.open .horde-chat-panel { display: flex; }
  .horde-chat-head {
    padding: 14px 16px 12px;
    border-bottom: 1px solid var(--hairline);
    flex-shrink: 0;
  }
  .horde-chat-head-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
  }
  .horde-chat-title {
    font-family: 'Instrument Serif', serif;
    font-size: 20px;
    font-weight: 400;
    letter-spacing: -0.02em;
    margin: 0;
  }
  .horde-chat-close {
    border: 0;
    background: transparent;
    color: var(--text-mute);
    cursor: pointer;
    padding: 4px;
    border-radius: 8px;
    line-height: 0;
    transition: color .15s, background .15s;
  }
  .horde-chat-close:hover { color: var(--text); background: var(--surface); }
  .horde-chat-tabs {
    display: flex;
    gap: 4px;
    padding: 3px;
    border-radius: 999px;
    border: 1px solid var(--hairline);
    background: var(--surface);
  }
  .horde-chat-tabs button {
    flex: 1;
    border: 0;
    background: transparent;
    color: var(--text-dim);
    font: inherit;
    font-size: 12px;
    font-weight: 500;
    padding: 7px 10px;
    border-radius: 999px;
    cursor: pointer;
    transition: color .15s, background .15s;
  }
  .horde-chat-tabs button.active {
    background: var(--surface-2);
    color: var(--text);
    box-shadow: inset 0 0 0 1px var(--hairline-2);
  }
  .horde-chat-tabs button.has-unread {
    position: relative;
  }
  .horde-chat-tabs button.has-unread::after {
    content: '';
    position: absolute;
    top: 5px;
    right: 5px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #e45555;
    box-shadow: 0 0 0 2px var(--surface);
  }
  .horde-chat-tabs button[hidden] { display: none; }
  .horde-chat-body {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    position: relative;
  }
  .horde-chat-pick,
  .horde-chat-thread {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }
  .horde-chat-pick[hidden],
  .horde-chat-thread[hidden] {
    display: none !important;
  }
  .horde-chat-pick-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 10px 12px 14px;
  }
  .horde-chat-pick-section + .horde-chat-pick-section {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--hairline);
  }
  .horde-chat-pick-section[hidden] { display: none; }
  .horde-chat-pick-label {
    margin: 0 0 8px;
    padding: 0 4px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .02em;
    color: var(--text-mute);
  }
  .horde-chat-pick-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }
  .horde-chat-pick-empty {
    margin: 0;
    padding: 10px 4px 4px;
    font-size: 12px;
    color: var(--text-mute);
    line-height: 1.45;
  }
  .horde-chat-contact {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 10px;
    border: 1px solid transparent;
    border-radius: 12px;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: background .15s, border-color .15s;
  }
  .horde-chat-contact:hover {
    background: var(--surface-2);
    border-color: var(--hairline-2);
  }
  .horde-chat-contact-avatar {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: -0.02em;
    background: var(--surface-2);
    border: 1px solid var(--hairline-2);
    color: var(--text-dim);
    position: relative;
  }
  .horde-chat-contact-avatar.online::after {
    content: '';
    position: absolute;
    right: -1px;
    bottom: -1px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #4caf7a;
    border: 2px solid var(--glass-strong, var(--surface));
    box-shadow: 0 0 0 1px rgba(76, 175, 122, .25);
  }
  .horde-chat-contact-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
  }
  .horde-chat-contact-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
  }
  .horde-chat-contact-nick {
    font-size: 13px;
    font-weight: 600;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .horde-chat-contact-nick.role-supreme { color: var(--accent-2); }
  .horde-chat-contact-nick.role-general { color: var(--accent); }
  .horde-chat-contact-meta {
    flex-shrink: 0;
    font-size: 10px;
    color: var(--text-mute);
    font-variant-numeric: tabular-nums;
  }
  .horde-chat-contact-preview {
    font-size: 12px;
    color: var(--text-mute);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .horde-chat-contact-badge {
    flex-shrink: 0;
    min-width: 18px;
    padding: 2px 6px;
    border-radius: 999px;
    background: #e45555;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.3;
    text-align: center;
  }
  .horde-chat-thread-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-bottom: 1px solid var(--hairline);
    background: var(--surface);
    flex-shrink: 0;
  }
  .horde-chat-thread-head[hidden] { display: none !important; }
  .horde-chat-thread-back {
    flex-shrink: 0;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 1px solid var(--hairline-2);
    border-radius: 10px;
    background: var(--surface-2);
    color: var(--text);
    cursor: pointer;
    transition: background .15s, border-color .15s;
  }
  .horde-chat-thread-back:hover {
    background: var(--surface);
    border-color: var(--hairline);
  }
  .horde-chat-thread-title {
    font-size: 14px;
    font-weight: 600;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .horde-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overscroll-behavior: contain;
  }
  .horde-chat-msg {
    display: flex;
    flex-direction: column;
    gap: 3px;
    max-width: 92%;
  }
  .horde-chat-msg.mine { align-self: flex-end; align-items: flex-end; }
  .horde-chat-msg-head {
    display: flex;
    align-items: baseline;
    gap: 6px;
    flex-wrap: wrap;
  }
  .horde-chat-msg.mine .horde-chat-msg-head { flex-direction: row-reverse; }
  .horde-chat-msg-nick {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: -0.01em;
  }
  .horde-chat-msg-nick.role-supreme { color: var(--accent-2); }
  .horde-chat-msg-nick.role-general { color: var(--accent); }
  .horde-chat-msg-time {
    font-size: 10px;
    color: var(--text-mute);
    font-variant-numeric: tabular-nums;
  }
  .horde-chat-msg-del {
    margin-left: auto;
    border: 0;
    background: transparent;
    color: var(--text-mute);
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    padding: 2px 5px;
    border-radius: 4px;
    opacity: 0;
    transition: opacity .15s, color .15s;
  }
  .horde-chat-msg:hover .horde-chat-msg-del,
  .horde-chat-msg-del:focus { opacity: 1; }
  .horde-chat-msg-del:hover { color: var(--danger); background: rgba(220, 80, 80, .08); }
  .horde-chat-msg.mine .horde-chat-msg-del { margin-left: 0; margin-right: auto; order: -1; }
  @media (hover: none) {
    .horde-chat-msg-del { opacity: .75; }
  }
  .horde-chat-msg-body {
    padding: 9px 12px;
    border-radius: 12px;
    border: 1px solid var(--hairline);
    background: var(--surface);
    line-height: 1.45;
    word-break: break-word;
    white-space: pre-wrap;
  }
  .horde-chat-msg.mine .horde-chat-msg-body {
    background: rgba(201, 169, 110, .12);
    border-color: rgba(201, 169, 110, .28);
  }
  .horde-chat-msg.dm {
    gap: 4px;
    max-width: 88%;
  }
  .horde-chat-msg.dm.mine {
    align-items: flex-end;
  }
  .horde-chat-msg-time--dm {
    font-size: 10px;
    color: var(--text-mute);
    font-variant-numeric: tabular-nums;
    padding: 0 4px;
  }
  .horde-chat-msg-head--dm {
    width: 100%;
    justify-content: flex-end;
    gap: 4px;
    min-height: 0;
    opacity: 0;
    transition: opacity .15s;
  }
  .horde-chat-msg.dm:hover .horde-chat-msg-head--dm,
  .horde-chat-msg.dm:focus-within .horde-chat-msg-head--dm {
    opacity: 1;
  }
  .horde-chat-empty {
    margin: auto;
    text-align: center;
    color: var(--text-mute);
    font-size: 13px;
    line-height: 1.5;
    padding: 24px 12px;
  }
  .horde-chat-compose {
    display: flex;
    gap: 8px;
    padding: 12px 14px 14px;
    border-top: 1px solid var(--hairline);
    flex-shrink: 0;
  }
  .horde-chat-compose input {
    flex: 1;
    min-width: 0;
    padding: 10px 12px;
    font-size: 14px;
  }
  .horde-chat-compose .btn {
    padding: 10px 14px;
    flex-shrink: 0;
  }
  @media (max-width: 520px) {
    .horde-chat-panel {
      right: -8px;
      width: calc(100vw - 16px);
      height: min(70dvh, calc(100dvh - 100px));
    }
  }
  .horde-notify {
    position: relative;
    z-index: 120;
    display: none;
    font-size: 14px;
    flex-shrink: 0;
  }
  body.authenticated .horde-notify { display: block; }
  .horde-notify-toggle {
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 0;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: none;
    padding: 0;
  }
  .horde-notify-toggle svg {
    width: 18px;
    height: 18px;
  }
  .horde-notify-toggle::after {
    top: 1px;
    right: -1px;
    width: 9px;
    height: 9px;
    border: 2px solid var(--bg);
    box-shadow:
      0 0 0 1px rgba(215, 66, 66, .22),
      0 1px 4px rgba(0, 0, 0, .28);
  }
  [data-theme="light"] .horde-notify-toggle::after {
    border-color: #fff;
  }
  .horde-notify-toggle:hover {
    border-color: transparent;
    background: transparent;
    transform: none;
  }
  .horde-notify-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    width: min(360px, calc(100vw - 32px));
    max-height: min(420px, calc(100dvh - 180px));
    display: none;
    flex-direction: column;
    border-radius: 16px;
    border: 1px solid var(--hairline-2);
    background: var(--bg-2);
    box-shadow: 0 20px 56px rgba(0, 0, 0, 0.62);
    overflow: hidden;
  }
  .horde-notify.open .horde-notify-panel { display: flex; }
  .horde-notify-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px 10px;
    border-bottom: 1px solid var(--hairline);
  }
  .horde-notify-title {
    margin: 0;
    font-family: 'Instrument Serif', serif;
    font-size: 20px;
    font-weight: 400;
    letter-spacing: -0.02em;
  }
  .horde-notify-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding: 10px 14px 8px;
    border-bottom: 1px solid var(--hairline);
  }
  .horde-notify-list {
    overflow-y: auto;
    padding: 8px 14px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  .horde-notify-item {
    border: 1px solid var(--hairline-2);
    border-radius: 12px;
    background: var(--surface-2);
    padding: 10px 12px;
  }
  .horde-notify-item h4 {
    margin: 0 0 4px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
  }
  .horde-notify-item p {
    margin: 0;
    color: var(--text);
    font-size: 12.5px;
    line-height: 1.5;
    white-space: pre-wrap;
  }
  .horde-notify-item .meta {
    margin-top: 6px;
    font-size: 10px;
    color: var(--text-mute);
    letter-spacing: .08em;
    text-transform: uppercase;
  }
  .horde-notify-item .actions {
    margin-top: 10px;
    display: flex;
    justify-content: flex-end;
  }
  .horde-notify-item--invite {
    border-color: rgba(201,169,110,.35);
    background:
      radial-gradient(circle at top right, rgba(201,169,110,.12), transparent 45%),
      var(--surface-2);
  }
  @media (max-width: 520px) {
    .horde-notify-panel {
      right: 0;
      width: calc(100vw - 16px);
      max-height: min(64dvh, calc(100dvh - 180px));
    }
  }

  .ext-link {
    display: flex; align-items: center; gap: 16px;
    padding: 18px 20px;
    background: var(--surface);
    border: 1px solid var(--hairline);
    border-radius: 12px;
    transition: background .15s, border-color .15s;
    cursor: pointer;
  }
  .ext-link:hover { background: var(--surface-2); border-color: var(--hairline-2); }
  .ext-link.disabled { opacity: .4; pointer-events: none; }
  .ext-link .ico { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--hairline-2); border-radius: 10px; color: var(--text-dim); }
  .ext-link .ttl { font-size: 14px; font-weight: 500; }
  .ext-link .sub { font-size: 12px; color: var(--text-mute); margin-top: 2px; }

  /* ---------- Rules ---------- */
  .rule {
    display: grid; grid-template-columns: 60px 1fr; gap: 28px;
    padding: 22px 0;
    border-bottom: 1px solid var(--hairline);
  }
  .rule:last-child { border-bottom: 0; }
  .rule .n {
    font-family: 'Instrument Serif', serif;
    font-size: 32px; color: var(--accent); line-height: 1;
    letter-spacing: -0.02em;
  }
  .rule .t { font-size: 16px; font-weight: 500; margin-bottom: 6px; letter-spacing: -0.005em; }
  .rule .d { color: var(--text-dim); font-size: 14.5px; }

  /* ---------- News ---------- */
  .home-news { max-width: 760px; }
  .news-item {
    padding: 28px 0;
    border-bottom: 1px solid var(--hairline);
  }
  .news-item:last-child { border-bottom: 0; }
  .news-item .meta { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--text-mute); margin-bottom: 10px; }
  .news-item .t { font-family: 'Instrument Serif', serif; font-size: 28px; line-height: 1.15; letter-spacing: -0.01em; margin-bottom: 10px; font-weight: 400; }
  .news-item .b { color: var(--text-dim); font-size: 15px; }
  .news-edit-toggle { flex-shrink: 0; }
  .news-editor {
    margin-top: 10px;
    padding: 18px;
    background: var(--surface);
    border: 1px solid var(--hairline);
    border-radius: 14px;
  }
  .news-editor label {
    display: block;
    margin: 12px 0 6px;
    color: var(--text-mute);
    font-size: 11px;
    letter-spacing: .18em;
    text-transform: uppercase;
  }
  .news-editor input,
  .news-editor textarea { width: 100%; }
  .news-editor-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
  .news-edit-status { align-self: center; color: var(--text-mute); }

  /* Notes list */
  .note {
    padding: 14px 16px;
    background: var(--surface);
    border: 1px solid var(--hairline);
    border-radius: 10px;
    display: flex; gap: 12px; align-items: flex-start;
  }
  .note .meta { font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--text-mute); margin-bottom: 4px; }
  .note .text { font-size: 14px; }
  .note button { background: none; border: 0; color: var(--text-mute); cursor: pointer; font-size: 18px; line-height: 1; padding: 0; transition: color .15s; }
  .note button:hover { color: var(--danger); }

  /* utilities */
  .row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
  .between { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
  .mt-2 { margin-top: 8px; } .mt-4 { margin-top: 16px; } .mt-6 { margin-top: 24px; } .mt-8 { margin-top: 32px; } .mt-12 { margin-top: 48px; }
  .text-dim { color: var(--text-dim); }
  .text-mute { color: var(--text-mute); }
  .text-accent { color: var(--accent); }
  .small { font-size: 13px; }
  .xs { font-size: 12px; }
  footer { padding: 28px 0; border-top: 1px solid var(--hairline); color: var(--text-mute); font-size: 12.5px; text-align: center; letter-spacing: .04em; }

  /* ---------- Reservoir Raid planner ---------- */
  .raid-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 24px;
    align-items: start;
  }
  @media (max-width: 960px) {
    .raid-layout { grid-template-columns: 1fr; }
  }
  .raid-main {
    display: flex;
    flex-direction: column;
    gap: 24px;
    min-width: 0;
  }
  .raid-sidebar {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: calc(100vh - 180px);
    position: sticky;
    top: 76px;
  }
  @media (max-width: 960px) {
    .raid-sidebar { position: static; max-height: none; }
  }
  .raid-pool-head {
    font-size: 10px;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--text-mute);
    margin-top: 4px;
  }
  .raid-roster-block + .raid-roster-block {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--hairline);
  }
  .raid-roster-label {
    display: block;
    width: 100%;
    box-sizing: border-box;
    font-size: 10px;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--text-mute);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    padding: 4px 2px;
    margin: 0 0 8px;
    font-family: inherit;
    font-weight: 600;
  }
  .raid-roster-label:not(:read-only):hover,
  .raid-roster-label:not(:read-only):focus {
    border-color: var(--hairline-2);
    color: var(--text);
    outline: none;
    background: rgba(255, 255, 255, 0.02);
  }
  .raid-roster-label:read-only {
    cursor: default;
  }
  .raid-roster-add {
    margin: 0 0 10px;
  }
  .raid-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-height: 52px;
    padding: 10px;
    border-radius: 10px;
    border: 1px dashed var(--hairline);
    background: var(--chip-list-bg);
    transition: border-color .15s, background .15s;
  }
  .raid-chip-list.drag-over {
    border-color: var(--accent);
    background: rgba(201,169,110,.06);
  }
  .raid-chip-list.raid-reserve { min-height: 72px; }
  #raidPool {
    max-height: min(42vh, 420px);
    overflow-y: auto;
    scrollbar-width: thin;
  }
  #raidReserve {
    max-height: 160px;
    overflow-y: auto;
    scrollbar-width: thin;
  }
  .raid-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
    background: var(--surface-2);
    border: 1px solid var(--hairline-2);
    cursor: grab;
    user-select: none;
    max-width: 100%;
    letter-spacing: -0.01em;
  }
  .raid-chip:active { cursor: grabbing; }
  .raid-chip.is-reserve {
    border-color: rgba(126,198,153,.35);
    background: rgba(126,198,153,.08);
  }
  .raid-chip.is-leader { border-color: rgba(201,169,110,.5); color: var(--accent-2); }
  .raid-chip .chip-x {
    background: none; border: 0; color: var(--text-mute);
    cursor: pointer; font-size: 14px; line-height: 1; padding: 0 0 0 2px;
  }
  .raid-chip .chip-x:hover { color: var(--danger); }
  .raid-map-wrap { padding: 12px; overflow: hidden; }
  .raid-map-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 10px;
    position: relative;
    z-index: 3;
  }
  .raid-map {
    position: relative;
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    line-height: 0;
    background: #1a120e;
    --raid-overlay-bg: rgba(10, 12, 16, 0.93);
    --raid-overlay-border: rgba(201, 169, 110, 0.72);
    --raid-overlay-text: #f4efe4;
    --raid-count-bg: #c9a96e;
    --raid-count-text: #1a1208;
  }
  .raid-map-compose-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 36px;
    padding: 0 12px;
    border-radius: 10px;
    border: 1px solid var(--hairline-2);
    background: var(--glass-strong);
    backdrop-filter: blur(8px);
    color: var(--text-dim);
    cursor: pointer;
    transition: color .15s, border-color .15s, background .15s;
    line-height: 1.2;
    font-size: 12px;
    font-family: inherit;
  }
  .raid-map-compose-label {
    letter-spacing: .04em;
  }
  .raid-map-compose-btn:hover { color: var(--text); border-color: var(--hairline-2); }
  .raid-map-compose-btn.is-collapsed,
  .raid-map-compose-btn[aria-pressed="true"] {
    color: var(--accent-2);
    border-color: var(--accent);
    background: rgba(201,169,110,.15);
  }
  .raid-map-edit-btn {
    position: static;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    border: 1px solid var(--hairline-2);
    background: var(--glass-strong);
    backdrop-filter: blur(8px);
    color: var(--text-dim);
    cursor: pointer;
    transition: color .15s, border-color .15s, background .15s;
    padding: 0;
    line-height: 0;
    flex: 0 0 auto;
  }
  .raid-map-edit-btn:hover { color: var(--text); border-color: var(--hairline-2); }
  .raid-map-edit-btn.active {
    color: var(--accent-2);
    border-color: var(--accent);
    background: rgba(201,169,110,.15);
  }
  .raid-map-edit-hint {
    flex: 1 1 180px;
    font-size: 11px;
    letter-spacing: .06em;
    color: var(--accent-2);
    background: var(--glass-strong);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(201,169,110,.35);
    border-radius: 8px;
    padding: 6px 10px;
    line-height: 1.3;
  }
  .raid-map-edit-hint[hidden] { display: none !important; }
  .raid-map.raid-map-editing .raid-point { cursor: grab; z-index: 5; }
  .raid-map.raid-map-editing .raid-point.is-dragging { cursor: grabbing; z-index: 20; opacity: .9; }
  .raid-map.raid-map-editing .raid-point-zone {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(201,169,110,.2);
  }
  .raid-map.raid-map-editing .raid-chip { pointer-events: none; opacity: .55; }
  .raid-map.raid-map-editing .raid-point-add { pointer-events: none; }
  .raid-point-label-input {
    width: 100%;
    font-size: 9px;
    letter-spacing: .1em;
    text-transform: uppercase;
    text-align: center;
    padding: 4px 6px;
    margin-bottom: 4px;
    background: var(--raid-overlay-bg);
    border: 1px solid var(--raid-overlay-border);
    border-radius: 6px;
    color: var(--raid-overlay-text);
    pointer-events: auto;
    line-height: 1.2;
    cursor: text;
  }
  .raid-point-label-input:focus {
    border-color: var(--raid-count-bg);
    background: rgba(10, 12, 16, 0.98);
  }
  .raid-map img {
    width: 100%;
    height: auto;
    display: block;
    pointer-events: none;
    user-select: none;
  }
  .raid-point {
    position: absolute;
    transform: translate(-50%, -50%);
    min-width: 88px;
    max-width: 120px;
    z-index: 2;
  }
  .raid-point-head {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-bottom: 4px;
    position: relative;
    z-index: 4;
    pointer-events: auto;
  }
  .raid-point-label {
    font-size: 9px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--raid-overlay-text);
    text-align: center;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85);
    pointer-events: none;
    flex: 1 1 auto;
    min-width: 0;
    margin-bottom: 0;
  }
  .raid-map .raid-point-label {
    background: var(--raid-overlay-bg);
    border: 1px solid var(--raid-overlay-border);
    border-radius: 6px;
    padding: 3px 6px;
    text-shadow: none;
    line-height: 1.25;
  }
  .raid-point-head .raid-point-label-input {
    margin-bottom: 0;
    flex: 1 1 auto;
    min-width: 0;
  }
  .raid-point-toggle {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-width: 22px;
    height: 22px;
    padding: 0 5px;
    border-radius: 6px;
    border: 1px solid var(--raid-overlay-border);
    background: var(--raid-overlay-bg);
    color: var(--raid-overlay-text);
    font-size: 10px;
    line-height: 1;
    cursor: pointer;
    backdrop-filter: blur(6px);
    pointer-events: auto;
    touch-action: manipulation;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  }
  .raid-point-toggle:hover {
    border-color: var(--accent-2);
    color: #fff;
    background: rgba(10, 12, 16, 0.98);
  }
  .raid-point-toggle-count {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
    color: var(--raid-count-text);
    background: var(--raid-count-bg);
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
  }
  .raid-point-toggle-icon {
    font-size: 10px;
    line-height: 1;
    opacity: 0.9;
  }
  .raid-point.is-collapsed {
    min-width: 0;
    max-width: 148px;
  }
  .raid-point.is-collapsed .raid-point-head {
    margin-bottom: 0;
    gap: 5px;
    padding: 4px 6px;
    border-radius: 10px;
    background: var(--raid-overlay-bg);
    border: 1.5px solid var(--raid-overlay-border);
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.5);
  }
  .raid-point.is-collapsed .raid-point-label {
    background: transparent;
    border: 0;
    padding: 0;
    font-size: 8px;
    font-weight: 700;
    color: var(--raid-overlay-text);
  }
  .raid-point.is-collapsed .raid-point-toggle {
    min-width: 34px;
    height: 26px;
    padding: 0 6px;
    gap: 4px;
    border-color: rgba(255, 255, 255, 0.22);
    background: rgba(0, 0, 0, 0.25);
    box-shadow: none;
  }
  .raid-point.is-collapsed .raid-point-toggle-count {
    min-width: 20px;
    height: 20px;
    font-size: 12px;
  }
  .raid-point.is-collapsed .raid-point-toggle-icon {
    color: var(--raid-count-bg);
    font-size: 11px;
    font-weight: 700;
  }
  .raid-point.is-collapsed .raid-point-zone {
    display: none !important;
  }
  .raid-point.has-custom-size {
    min-width: 0;
    max-width: none;
  }
  .raid-point-zone {
    position: relative;
    min-height: 36px;
    padding: 6px;
    border-radius: 10px;
    border: 1.5px solid var(--raid-overlay-border);
    background: var(--raid-overlay-bg);
    backdrop-filter: blur(6px);
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: stretch;
    transition: border-color .15s, background .15s, box-shadow .15s;
  }
  .raid-point-zone.is-resizable {
    overflow-x: hidden;
    overflow-y: auto;
    box-sizing: border-box;
  }
  .raid-point-zone.is-resizing {
    user-select: none;
  }
  .raid-point-resize {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 16px;
    height: 16px;
    cursor: nwse-resize;
    touch-action: none;
    z-index: 6;
    border-radius: 0 0 8px 0;
    background:
      linear-gradient(
        135deg,
        transparent 0 42%,
        rgba(201, 169, 110, 0.45) 42% 46%,
        transparent 46% 54%,
        rgba(201, 169, 110, 0.65) 54% 58%,
        transparent 58% 66%,
        rgba(201, 169, 110, 0.9) 66% 100%
      );
  }
  .raid-point-resize:hover {
    background-color: rgba(201, 169, 110, 0.18);
  }
  .raid-point-zone.drag-over {
    border-color: var(--accent-2);
    background: rgba(201,169,110,.18);
    box-shadow: 0 0 0 2px rgba(201,169,110,.25);
  }
  .raid-point-zone .raid-chip {
    font-size: 11px;
    padding: 3px 8px;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(201, 169, 110, 0.35);
    color: var(--raid-overlay-text);
  }
  .raid-point-zone .raid-point-add {
    background: none;
    border: 0;
    color: rgba(244, 239, 228, 0.72);
    font-size: 10px;
    cursor: pointer;
    padding: 2px 0;
    font-family: inherit;
    text-align: center;
  }
  .raid-point-zone .raid-point-add:hover { color: var(--raid-count-bg); }
  .raid-stats { margin-top: auto; padding-top: 8px; }
  .raid-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 12px;
    color: var(--text-dim);
  }
  .raid-legend span { display: inline-flex; align-items: center; gap: 6px; }
  .raid-legend i {
    width: 10px; height: 10px; border-radius: 50%; display: inline-block;
  }
  .raid-tactics {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  .raid-tactics textarea {
    min-height: 160px;
    resize: vertical;
    line-height: 1.55;
    font-size: 14px;
  }

  .raid-page-tools-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .raid-map-viewport {
    width: 100%;
    border-radius: 12px;
  }

  @media (max-width: 960px) {
    .raid-layout {
      grid-template-columns: 1fr;
      gap: 16px;
    }
    .raid-main { order: 1; }
    .raid-sidebar { order: 2; }
    .raid-main { gap: 16px; }
  }

  @media (max-width: 640px) {
    #panel-raid {
      padding: 40px 0 48px;
    }
    #panel-raid .section-label { margin-bottom: 4px; }
    #panel-raid .section-title {
      margin: 8px 0 10px;
      font-size: clamp(26px, 8vw, 34px);
    }
    #panel-raid .lead { display: none; }
    #panel-raid .raid-legend {
      gap: 8px 12px;
      font-size: 11px;
    }
    #panel-raid .raid-legend i { width: 8px; height: 8px; }
    .raid-page-tools {
      flex-direction: column;
      align-items: stretch;
      gap: 8px !important;
    }
    .raid-page-tools #raidSearch {
      max-width: none !important;
      width: 100%;
      min-height: 42px;
    }
    .raid-page-tools-actions {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 8px;
    }
    .raid-page-tools-actions .btn {
      justify-content: center;
      min-height: 42px;
      padding: 10px 8px;
      font-size: 13px;
    }
    .raid-map-wrap {
      padding: 8px 6px;
    }
    .raid-map-toolbar {
      margin-bottom: 6px;
      gap: 6px;
    }
    .raid-map-compose-btn {
      flex: 1 1 auto;
      min-height: 40px;
      padding: 0 10px;
      font-size: 12px;
    }
    .raid-map-edit-btn {
      width: 40px;
      height: 40px;
      flex: 0 0 auto;
    }
    .raid-map-edit-hint {
      flex: 1 1 100%;
      font-size: 11px;
    }
    .raid-map-viewport {
      overflow: auto;
      -webkit-overflow-scrolling: touch;
      touch-action: pan-x pan-y;
      max-height: min(68dvh, 460px);
      border: 1px solid var(--hairline);
      background: #120e0c;
    }
    .raid-map-viewport .raid-map {
      min-width: 540px;
      border-radius: 0;
    }
    .raid-map--touch .raid-point.is-collapsed {
      transform: translate(-50%, -50%) scale(0.92);
    }
    .raid-map--touch.raid-map-editing .raid-point {
      transform: translate(-50%, -50%);
    }
    .raid-point {
      min-width: 88px;
      max-width: 118px;
    }
    .raid-point.has-custom-size {
      min-width: 0;
      max-width: none !important;
    }
    .raid-point.is-collapsed {
      max-width: 118px;
    }
    .raid-point.is-collapsed .raid-point-head {
      padding: 5px 7px;
      gap: 4px;
      cursor: pointer;
    }
    .raid-point.is-collapsed .raid-point-label {
      font-size: 8px;
      letter-spacing: .08em;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      max-width: 64px;
    }
    .raid-point.is-collapsed .raid-point-toggle {
      min-width: 36px;
      min-height: 36px;
      height: 32px;
      padding: 0 7px;
    }
    .raid-point.is-collapsed .raid-point-toggle-count {
      min-width: 22px;
      height: 22px;
      font-size: 12px;
    }
    .raid-point-zone {
      padding: 6px;
      border-radius: 10px;
    }
    .raid-point-zone .raid-chip {
      font-size: 12px;
      padding: 6px 10px;
      min-height: 34px;
    }
    .raid-point-zone .raid-point-add {
      font-size: 12px;
      min-height: 36px;
      padding: 6px 0;
    }
    .raid-map--touch .raid-point-resize {
      width: 24px;
      height: 24px;
    }
    .raid-sidebar {
      gap: 10px;
    }
    .raid-sidebar .surface,
    .raid-map-wrap.surface,
    .raid-tactics.surface {
      padding: 14px;
    }
    #raidPool {
      max-height: 140px;
    }
    #raidReserve {
      max-height: 120px;
    }
    .raid-chip {
      font-size: 13px;
      padding: 6px 12px;
      min-height: 34px;
    }
    .raid-chip .chip-x {
      font-size: 16px;
      padding: 4px;
      margin: -4px -2px -4px 0;
    }
    .raid-tactics textarea {
      min-height: 120px;
      font-size: 16px;
    }
  }

  @media (max-width: 480px) {
    .raid-map-viewport .raid-map {
      min-width: 500px;
    }
    .raid-map--touch .raid-point.is-collapsed {
      transform: translate(-50%, -50%) scale(0.86);
    }
    .raid-point.is-collapsed {
      max-width: 52px;
    }
    .raid-point.is-collapsed .raid-point-label {
      display: none;
    }
    .raid-point.is-collapsed .raid-point-head {
      justify-content: center;
      padding: 4px;
      min-width: 44px;
      min-height: 44px;
    }
    .raid-point.is-collapsed .raid-point-toggle {
      min-width: 40px;
      min-height: 40px;
      width: 40px;
      height: 40px;
      padding: 0;
      justify-content: center;
    }
    .raid-map-compose-label {
      display: none;
    }
    .raid-map-compose-btn {
      flex: 0 0 auto;
      width: 40px;
      padding: 0;
    }
  }

  /* ---------- Auth gate ---------- */
  body:not(.authenticated) { overflow: hidden; }
  #siteShell[hidden],
  body:not(.authenticated) #siteShell {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }
  .auth-gate {
    position: fixed;
    inset: 0;
    z-index: 300;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: max(16px, env(safe-area-inset-top)) 24px max(16px, env(safe-area-inset-bottom));
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }
  .auth-preview {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
    user-select: none;
    background:
      radial-gradient(1000px 600px at 80% -200px, var(--grad-warm), transparent 60%),
      radial-gradient(800px 500px at -200px 30%, var(--grad-cool), transparent 60%),
      linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 50%, var(--bg) 100%);
  }
  .auth-preview-topbar {
    border-bottom: 1px solid var(--hairline);
    background: var(--glass);
  }
  .auth-preview-topbar .topbar-inner { height: 60px; }
  .auth-preview-topbar .brand { display: flex; align-items: center; gap: 10px; font-weight: 600; }
  .auth-preview-nav {
    display: flex;
    gap: 6px;
    margin-left: 24px;
    flex-wrap: wrap;
    font-size: 13px;
    color: var(--text-mute);
  }
  .auth-preview-nav span:first-child { color: var(--text); }
  .auth-preview-main { padding-top: 24px; }
  .auth-preview-crest {
    width: clamp(120px, 16vw, 180px);
    height: clamp(120px, 16vw, 180px);
    border-radius: 50%;
    border: 1px solid var(--hairline-2);
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Instrument Serif', serif;
    font-size: clamp(64px, 10vw, 96px);
    color: var(--accent-2);
    opacity: 0.85;
  }
  .auth-preview-cards {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 8px;
  }
  .auth-preview-card {
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid var(--hairline);
    background: var(--surface);
  }
  .auth-preview-card .t { font-size: 14px; font-weight: 500; margin-bottom: 4px; }
  .auth-preview-card .d { font-size: 12px; color: var(--text-mute); }
  .auth-scrim {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    backdrop-filter: blur(9px) saturate(140%);
    -webkit-backdrop-filter: blur(9px) saturate(140%);
    background: rgba(17, 19, 24, 0.46);
  }
  [data-theme="light"] .auth-scrim { background: rgba(247, 246, 243, 0.55); }
  body.authenticated .auth-gate { display: none; }
  body.session-restoring .auth-gate { opacity: 0; pointer-events: none; }
  .auth-panel {
    position: relative;
    z-index: 2;
    width: min(100%, 460px);
    margin: auto;
    flex-shrink: 0;
    padding: 36px 32px 32px;
    background: var(--glass-strong);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
  }
  .auth-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
  }
  .auth-brand .sigil { width: 32px; height: 32px; font-size: 20px; }
  .auth-brand h1 {
    margin: 0;
    font-family: 'Instrument Serif', serif;
    font-size: 28px;
    font-weight: 400;
    letter-spacing: -0.02em;
  }
  .auth-brand p { margin: 4px 0 0; font-size: 13px; color: var(--text-dim); }
  .auth-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
    padding: 4px;
    border-radius: 999px;
    border: 1px solid var(--hairline);
    background: var(--surface);
  }
  .auth-tabs button {
    flex: 1;
    border: 0;
    background: transparent;
    color: var(--text-dim);
    font: inherit;
    font-size: 13px;
    font-weight: 500;
    padding: 9px 12px;
    border-radius: 999px;
    cursor: pointer;
    transition: color .15s, background .15s;
  }
  .auth-tabs button.active {
    background: var(--surface-2);
    color: var(--text);
    box-shadow: inset 0 0 0 1px var(--hairline-2);
  }
  .auth-form { display: none; flex-direction: column; gap: 16px; }
  .auth-form.active { display: flex; }
  .auth-form .auth-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .auth-form textarea {
    min-height: 72px;
    max-height: 120px;
    resize: vertical;
  }
  @media (max-width: 520px), (max-height: 740px) {
    .auth-gate { padding: 12px 16px; }
    .auth-panel { padding: 24px 20px 20px; }
    .auth-brand { margin-bottom: 20px; }
    .auth-brand h1 { font-size: 24px; }
    .auth-tabs { margin-bottom: 16px; }
    .auth-form { gap: 12px; }
    .auth-form .auth-row-2 { grid-template-columns: 1fr; }
    .auth-hint { margin-top: 12px; }
  }
  .auth-status {
    min-height: 18px;
    font-size: 12.5px;
    color: var(--text-mute);
  }
  .auth-status.ok { color: var(--ok); line-height: 1.5; min-height: auto; }
  .auth-status.err { color: var(--danger); }
  .auth-go-login { width: 100%; margin-top: 4px; }
  .auth-consent {
    display: grid;
    grid-template-columns: 16px 1fr;
    gap: 10px;
    align-items: start;
    margin-top: -2px;
    font-size: 12px;
    color: var(--text-dim);
    line-height: 1.5;
  }
  .auth-consent + .auth-consent {
    margin-top: -8px;
  }
  .auth-consent input {
    margin-top: 2px;
    width: 16px;
    height: 16px;
  }
  .auth-hint {
    margin-top: 18px;
    font-size: 12px;
    color: var(--text-mute);
    line-height: 1.5;
  }
  .auth-consent a,
  .auth-hint a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 2px;
  }
  .user-menu {
    display: none;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
  }
  body.authenticated .user-menu { display: flex; }
  .user-chip {
    font-size: 12.5px;
    color: var(--text-dim);
    white-space: nowrap;
  }
  .user-chip strong { color: var(--text); font-weight: 600; }
  .role-badge {
    font-size: 10px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--accent);
    border: 1px solid rgba(201,169,110,.35);
    border-radius: 999px;
    padding: 3px 8px;
  }
  .nav-moderation { display: none; }
  body.can-moderate .nav-moderation { display: inline-flex; }
  .mod-card {
    padding: 20px;
    border-bottom: 1px solid var(--hairline);
  }
  .mod-card:last-child { border-bottom: 0; }
  .mod-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
  }
  .mod-card .nick {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.01em;
  }
  .mod-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 20px;
    margin-top: 12px;
    font-size: 13px;
    color: var(--text-dim);
  }
  .mod-meta span { display: block; }
  .mod-meta .label {
    font-size: 10px;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--text-mute);
    margin-bottom: 2px;
  }
  .mod-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
  .mod-empty { padding: 28px; text-align: center; color: var(--text-mute); font-size: 14px; }
  .general-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
  .general-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid var(--hairline);
    background: var(--surface);
    font-size: 13px;
  }
  .general-tag button {
    border: 0;
    background: transparent;
    color: var(--text-mute);
    cursor: pointer;
    font-size: 15px;
    line-height: 1;
    padding: 0;
  }
  .general-tag button:hover { color: var(--danger); }
  .select-wrap {
    position: relative;
    flex: 1;
    min-width: 200px;
    max-width: 320px;
  }
  .select-wrap select {
    width: 100%;
    background-image: none;
    padding-right: 36px;
  }
  .select-wrap::after {
    content: '';
    position: absolute;
    right: 14px;
    top: 50%;
    width: 12px;
    height: 12px;
    margin-top: -6px;
    pointer-events: none;
    background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a8acb5' stroke-width='2'><polyline points='6 9 12 15 18 9'/></svg>") center/contain no-repeat;
  }
  [data-theme="light"] .select-wrap::after {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235c6069' stroke-width='2'><polyline points='6 9 12 15 18 9'/></svg>");
  }
  select option {
    background-color: var(--select-menu-bg);
    color: var(--select-menu-text);
  }
  select optgroup {
    background-color: var(--select-menu-bg);
    color: var(--select-menu-text);
  }
  @media (max-width: 860px) {
    .topbar {
      flex-wrap: wrap;
      align-items: flex-start;
      padding-bottom: 8px;
    }
    .topbar-inner {
      flex-wrap: wrap;
      height: auto;
      row-gap: 4px;
      padding-bottom: 0;
    }
    .topbar-start { order: 1; }
    .topbar-end { order: 2; margin-left: auto; }
    .horde-fm--edge {
      order: 2;
      align-self: center;
      margin: 10px max(12px, env(safe-area-inset-right)) 0 8px;
    }
    .horde-fm-label { display: none; }
    .horde-fm-vol { width: 44px; }
    .nav {
      order: 4;
      flex: 1 1 100%;
      width: 100%;
      justify-content: center;
    }
    .user-menu { display: none !important; }
    body.authenticated .user-menu-mobile { display: flex; }
  }
  .user-menu-mobile {
    display: none;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
  }

  @media (max-width: 960px) {
    .wrap { padding: 0 20px; }
    section.page { padding: 56px 0; }
    .hero { padding: 60px 0 42px; }
    .surface { padding: 22px; }
    .section-title { margin: 12px 0 20px; }
    .lead { font-size: 16px; }
    .stats { margin-top: 48px; }
    .stat .value { font-size: 38px; }
    .news-editor { padding: 14px; }
    .mod-meta { grid-template-columns: 1fr; }
  }

  @media (max-width: 640px) {
    .wrap { padding: 0 14px; }
    .topbar { padding-bottom: 6px; }
    .topbar-inner { row-gap: 8px; }
    .topbar-end {
      order: 3;
      width: 100%;
      justify-content: space-between;
      margin-left: 0;
    }
    .brand { font-size: 13px; gap: 8px; }
    .brand > span:last-child {
      max-width: 124px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .user-menu-mobile {
      width: auto;
      flex: 1;
      min-width: 0;
      justify-content: space-between;
      gap: 8px;
    }
    .user-menu-mobile .user-chip {
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      font-size: 11.5px;
    }
    .user-menu-mobile .btn { padding: 6px 10px; font-size: 12px; }
    .horde-notify-panel {
      position: fixed;
      left: 8px;
      right: 8px;
      top: calc(env(safe-area-inset-top) + 108px);
      width: auto;
      max-height: calc(100dvh - env(safe-area-inset-top) - 120px);
      border-radius: 14px;
    }
    .horde-notify-title { font-size: 18px; }
    .horde-notify-actions .btn {
      flex: 1 1 auto;
      justify-content: center;
      min-height: 34px;
    }
    .horde-notify-list {
      padding: 8px 10px 10px;
      gap: 7px;
    }
    .horde-notify-item {
      padding: 9px 10px;
    }
    .horde-fm--edge {
      order: 5;
      width: 100%;
      justify-content: flex-end;
      margin: 6px 14px 0 auto;
    }
    .horde-fm-vol { display: none; }
    .horde-fm-btn { width: 30px; height: 30px; }
    .nav {
      justify-content: flex-start;
      padding-bottom: 2px;
      padding-right: 10px;
      scroll-padding-left: 2px;
      scroll-padding-right: 16px;
    }
    .nav button {
      padding: 7px 10px;
      font-size: 12.5px;
    }
    .section-title { font-size: clamp(28px, 9vw, 40px); }
    .lead { font-size: 15px; }
    .hero-meta {
      gap: 10px;
      margin-bottom: 16px;
      flex-wrap: wrap;
    }
    .motto { margin-top: 18px; font-size: 15px; }
    .surface {
      padding: 16px;
      border-radius: 12px;
    }
    .news-item { padding: 20px 0; }
    .news-item .t { font-size: 24px; }
    .news-editor { padding: 12px; }
    thead th,
    tbody td { padding: 12px; }
    .guide-modal { padding: 12px 8px; }
    .guide-reader { max-height: calc(100vh - 24px); }
    .guide-reader-head,
    .guide-reader-body { padding: 18px; }
    .guide-reader-head h3 {
      font-size: clamp(24px, 8vw, 32px);
      margin: 8px 0 10px;
    }
    .auth-preview-nav { display: none; }
    .auth-preview-main { padding-top: 12px; }
    footer {
      padding: 18px 0;
      font-size: 11.5px;
      letter-spacing: .02em;
    }
  }

  @media (max-width: 420px) {
    .brand > span:last-child { max-width: 92px; }
    .topbar-end { gap: 6px; }
    .user-menu-mobile .user-chip { font-size: 11px; }
    .horde-theme-dock {
      left: max(10px, env(safe-area-inset-left));
      bottom: max(10px, env(safe-area-inset-bottom));
    }
  }

/* —— Баннер обновления (PWA) —— */
.horde-update-banner {
  position: fixed;
  left: 50%;
  bottom: max(18px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
  max-width: min(92vw, 420px);
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid var(--hairline);
  background: var(--surface);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .28);
}
.horde-update-banner-text {
  font-size: 14px;
  font-weight: 500;
}
.horde-update-banner-btn {
  border: none;
  border-radius: 999px;
  padding: 8px 16px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  background: var(--accent, #c9a96e);
  color: #111;
}
.horde-update-banner-btn:hover {
  filter: brightness(1.06);
}
