    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

    :root {
      --bg: #080e1a;
      --surface: #0d1625;
      --card: #111b2e;
      --card-hover: #172032;
      --border: rgba(255,255,255,0.07);
      --border-hover: rgba(255,255,255,0.14);
      --text: #f0f4ff;
      --muted: #7a8baa;
      --muted2: #3d4f6a;
      --accent: #3b82f6;
      --accent-dim: rgba(59,130,246,0.12);
    }

    html { scroll-behavior: smooth; }

    body {
      font-family: "Inter", sans-serif;
      background: var(--bg);
      color: var(--text);
      min-height: 100vh;
      overflow-x: hidden;
    }

    /* ── TOP NAV ── */
    .topnav {
      position: sticky;
      top: 0;
      z-index: 100;
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 0 24px;
      height: 58px;
      background: rgba(8,14,26,0.88);
      backdrop-filter: blur(16px);
      border-bottom: 1px solid var(--border);
    }

    .topnav-brand {
      display: flex;
      align-items: center;
      gap: 10px;
      font-size: 15px;
      font-weight: 700;
      letter-spacing: -0.3px;
      color: var(--text);
      text-decoration: none;
    }

    .topnav-brand span { color: var(--accent); }

    .brand-mark {
      width: 24px;
      height: 24px;
      border-radius: 7px;
      object-fit: cover;
      border: 1px solid var(--border-hover);
      background: var(--surface);
      box-shadow: 0 0 0 3px rgba(59,130,246,0.10);
    }

    .topnav-actions {
      display: flex;
      align-items: center;
      gap: 8px;
    }

    /* ── BUTTONS ── */
    .btn {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 8px 14px;
      border-radius: 8px;
      border: 1px solid var(--border-hover);
      background: transparent;
      color: var(--muted);
      font-size: 13px;
      font-weight: 500;
      font-family: "Inter", sans-serif;
      cursor: pointer;
      transition: color 0.15s, background 0.15s, border-color 0.15s;
      white-space: nowrap;
    }

    .btn:hover {
      color: var(--text);
      background: rgba(255,255,255,0.06);
      border-color: rgba(255,255,255,0.2);
    }

    .btn-sm {
      padding: 6px 10px;
      font-size: 12px;
      border-radius: 6px;
    }

    .btn-sm svg {
      width: 14px;
      height: 14px;
      flex-shrink: 0;
    }

    /* ── BADGE ── */
    .badge {
      display: inline-flex;
      align-items: center;
      padding: 3px 10px;
      border-radius: 6px;
      font-size: 12px;
      font-weight: 700;
      letter-spacing: 0.3px;
      border: 1px solid rgba(59,130,246,0.35);
      color: var(--accent);
      background: var(--accent-dim);
    }

    /* ── HERO ── */
    .hero {
      text-align: center;
      padding: 56px 24px 40px;
    }

    .hero-eyebrow {
      display: inline-block;
      font-size: 11px;
      font-weight: 600;
      letter-spacing: 2px;
      text-transform: uppercase;
      color: var(--accent);
      margin-bottom: 18px;
    }

    .hero h1 {
      font-size: clamp(36px, 6vw, 56px);
      font-weight: 900;
      letter-spacing: -2px;
      line-height: 1;
      color: var(--text);
      margin-bottom: 14px;
    }

    .hero h1 em {
      font-style: normal;
      color: var(--accent);
    }

    .hero-sub {
      font-size: 16px;
      color: var(--muted);
      max-width: 440px;
      margin: 0 auto;
      line-height: 1.6;
    }

    .top100-switcher {
      width: min(900px, calc(100% - 48px));
      margin: -18px auto 28px;
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 6px;
      padding: 6px;
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 12px;
    }

    .top100-switcher a {
      display: flex;
      align-items: center;
      justify-content: center;
      min-height: 40px;
      padding: 9px 12px;
      border-radius: 8px;
      color: var(--muted);
      text-decoration: none;
      font-size: 13px;
      font-weight: 800;
      transition: color 0.15s, background 0.15s, box-shadow 0.15s;
    }

    .top100-switcher a:hover {
      color: var(--text);
      background: rgba(255,255,255,0.05);
    }

    .top100-switcher a.active {
      color: #fff;
      background: var(--accent);
      box-shadow: 0 10px 28px rgba(59,130,246,0.22);
    }

    /* ── STATS ── */
    .stats {
      display: flex;
      justify-content: center;
      gap: 12px;
      padding: 0 24px 40px;
      flex-wrap: wrap;
    }

    .stat-pill {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 12px 20px;
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 12px;
    }

    .stat-num {
      font-size: 22px;
      font-weight: 800;
      letter-spacing: -0.5px;
      color: var(--text);
    }

    .stat-label {
      font-size: 12px;
      color: var(--muted);
      text-transform: uppercase;
      letter-spacing: 1px;
      font-weight: 500;
    }

    /* ── MAIN ── */
    .generator-strip {
      width: min(900px, calc(100% - 48px));
      margin: -18px auto 32px;
      padding: 16px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 14px;
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 12px;
    }

    .generator-strip-title {
      font-size: 15px;
      font-weight: 800;
      margin-bottom: 3px;
    }

    .generator-strip-sub {
      color: var(--muted);
      font-size: 13px;
      line-height: 1.45;
    }

    .main {
      max-width: 900px;
      margin: 0 auto;
      padding: 0 24px 80px;
    }

    #grid {
      display: flex;
      flex-direction: column;
      gap: 8px;
    }

    /* ── LOADING / EMPTY ── */
    .loading-state {
      text-align: center;
      padding: 60px 20px;
      color: var(--muted);
      font-size: 14px;
    }

    .empty-state {
      text-align: center;
      padding: 64px 24px;
    }

    .empty-state .empty-icon {
      font-size: 48px;
      margin-bottom: 16px;
      opacity: 0.4;
    }

    .empty-state p {
      color: var(--muted);
      font-size: 15px;
    }

    /* ── SLOT ── */
    body.access-checking .hero,
    body.access-checking .top100-switcher,
    body.access-checking .stats,
    body.access-checking .generator-strip,
    body.access-checking .main {
      visibility: hidden;
    }

    body.access-denied .stats,
    body.access-denied .generator-strip,
    body.access-denied .main {
      display: none;
    }

    .slot {
      position: relative;
      z-index: 1;
      overflow: visible;
      display: flex;
      align-items: center;
      gap: 14px;
      padding: 14px 16px;
      background: var(--card);
      border: 1px solid var(--border);
      border-radius: 12px;
      transition: background 0.15s, border-color 0.15s, transform 0.12s;
      animation: fadeIn 0.25s ease both;
    }

    .slot.is-assigning {
      z-index: 80;
    }

    .slot.clickable {
      cursor: pointer;
    }

    .slot.clickable:hover {
      background: var(--card-hover);
      border-color: var(--border-hover);
      transform: translateY(-1px);
    }

    @keyframes fadeIn {
      from { opacity: 0; transform: translateY(6px); }
      to   { opacity: 1; transform: translateY(0); }
    }

    /* ── RANK BADGE ── */
    .rank {
      flex-shrink: 0;
      width: 52px;
      height: 52px;
      display: flex;
      align-items: center;
      justify-content: center;
      border-radius: 10px;
      font-size: 18px;
      font-weight: 800;
      border: 1px solid;
    }

    /* ── THUMB ── */
    .thumb {
      flex-shrink: 0;
      width: 96px;
      height: 64px;
      overflow: hidden;
      background: #08101f;
      border-radius: 8px;
      border: 1px solid var(--border);
    }

    .thumb img {
      display: block;
      width: 100%;
      height: 100%;
      background: #08101f;
      object-fit: var(--thumb-fit, cover);
      object-position: var(--thumb-pos, center);
      transform: scale(var(--thumb-zoom, 1));
      transform-origin: var(--thumb-pos, center);
    }

    .thumb-placeholder {
      flex-shrink: 0;
      width: 96px;
      height: 64px;
      border-radius: 8px;
      border: 1px dashed var(--border-hover);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 20px;
      opacity: 0.35;
    }

    /* ── SLOT BODY ── */
    .slot-body {
      flex: 1;
      min-width: 0;
    }

    .slot-heading {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      min-width: 0;
    }

    .slot-title-lines {
      min-width: 0;
    }

    .slot-name {
      font-size: 16px;
      font-weight: 700;
      letter-spacing: -0.2px;
      color: var(--text);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .slot-date {
      margin-top: 2px;
      font-size: 12px;
      font-weight: 700;
      color: var(--muted2);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .slot-meta {
      display: flex;
      align-items: center;
      gap: 5px;
      font-size: 13px;
      color: var(--muted);
      margin-top: 4px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .slot-meta svg {
      width: 13px;
      height: 13px;
      flex-shrink: 0;
      opacity: 0.7;
    }

    .slot-estimate {
      flex-shrink: 0;
      padding: 5px 9px;
      border-radius: 999px;
      border: 1px solid rgba(59,130,246,0.28);
      background: rgba(59,130,246,0.10);
      color: #dbeafe;
      font-size: 12px;
      font-weight: 850;
      letter-spacing: 0.1px;
      white-space: nowrap;
    }

    .slot-estimate strong {
      color: #ffffff;
      font-weight: 900;
    }

    /* WIND ESTIMATE */
    .wind-estimate-control {
      display: grid;
      grid-template-columns: auto minmax(92px, 140px) auto;
      align-items: center;
      gap: 7px;
      margin-top: 8px;
      color: var(--muted);
      font-size: 11px;
      font-weight: 800;
      letter-spacing: .5px;
      text-transform: uppercase;
    }

    .wind-estimate-control input {
      width: 100%;
      height: 32px;
      padding: 7px 9px;
      border-radius: 7px;
      border: 1px solid var(--border);
      background: var(--surface);
      color: var(--text);
      font-family: "Inter", sans-serif;
      font-size: 13px;
      font-weight: 700;
      outline: none;
    }

    .wind-estimate-control input:focus {
      border-color: rgba(59,130,246,0.5);
      box-shadow: 0 0 0 3px rgba(59,130,246,0.12);
    }

    /* ── ARROW ── */
    .slot-arrow {
      display: flex;
      align-items: center;
      color: var(--muted2);
      flex-shrink: 0;
      transition: color 0.15s, transform 0.15s;
    }

    .slot.clickable:hover .slot-arrow { color: var(--muted); transform: translateX(2px); }

    .slot-arrow svg { width: 16px; height: 16px; }

    /* ── ADMIN ASSIGN ── */
    .assign-box {
      padding: 10px 12px;
      border-radius: 8px;
      border: 1px solid var(--border);
      background: var(--surface);
      cursor: pointer;
      transition: border-color 0.15s;
    }

    .assign-box:hover { border-color: var(--border-hover); }

    .assign-box.empty {
      color: var(--muted2);
      font-size: 14px;
      border-style: dashed;
    }

    .assign-search {
      width: 100%;
      margin-top: 8px;
      padding: 10px 12px;
      border-radius: 8px;
      background: var(--surface);
      border: 1px solid var(--border);
      color: var(--text);
      font-size: 14px;
      font-family: "Inter", sans-serif;
      outline: none;
      transition: border-color 0.15s, box-shadow 0.15s;
    }

    .assign-search:focus {
      border-color: rgba(59,130,246,0.5);
      box-shadow: 0 0 0 3px rgba(59,130,246,0.12);
    }

    .assign-search::placeholder { color: var(--muted2); }

    .assign-results {
      position: absolute;
      top: 100%;
      left: 0;
      right: 0;
      margin-top: 4px;
      background: var(--card);
      border: 1px solid var(--border-hover);
      border-radius: 10px;
      max-height: 200px;
      overflow-y: auto;
      z-index: 90;
      box-shadow: 0 18px 44px rgba(0,0,0,0.32);
    }

    .result-item {
      padding: 10px 12px;
      font-size: 13px;
      cursor: pointer;
      border-bottom: 1px solid var(--border);
      transition: background 0.15s;
    }

    .result-item:last-child { border-bottom: none; }
    .result-item:hover { background: var(--card-hover); }

    /* ── SLOT ACTIONS ── */
    .slot-actions {
      display: flex;
      align-items: center;
      gap: 6px;
      flex-shrink: 0;
    }

    .slot.dragging { opacity: .45; outline: 2px solid var(--accent); }
    .slot.compact { grid-template-columns: 64px minmax(0,1fr) auto; min-height: 56px; }
    .slot.compact .thumb,
    .slot.compact .thumb-placeholder { display: none; }

    .manager-row {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
      margin-top: 12px;
    }

    .conflict-box {
      margin-top: 12px;
      padding: 10px 12px;
      border-radius: 10px;
      border: 1px solid rgba(245,158,11,.28);
      background: rgba(245,158,11,.10);
      color: #fbbf24;
      font-size: 12px;
      line-height: 1.45;
      display: none;
    }

    .admin-tools {
      display: none;
      padding: 16px;
      margin-bottom: 16px;
      background: var(--card);
      border: 1px solid var(--border);
      border-radius: 12px;
    }

    .admin-tools h3 {
      font-size: 16px;
      font-weight: 800;
      letter-spacing: -0.2px;
      margin-bottom: 6px;
    }

    .admin-hint {
      color: var(--muted);
      font-size: 13px;
      line-height: 1.5;
    }

    .quick-add {
      display: grid;
      grid-template-columns: minmax(0, 1fr) 130px auto;
      gap: 8px;
      align-items: start;
      margin-top: 14px;
    }

    .quick-search-wrap {
      position: relative;
    }

    .rank-input {
      width: 100%;
      padding: 10px 12px;
      border-radius: 8px;
      background: var(--surface);
      border: 1px solid var(--border);
      color: var(--text);
      font-size: 14px;
      font-family: "Inter", sans-serif;
      outline: none;
      transition: border-color 0.15s, box-shadow 0.15s;
    }

    .rank-input:focus {
      border-color: rgba(59,130,246,0.5);
      box-shadow: 0 0 0 3px rgba(59,130,246,0.12);
    }

    .move-btn:disabled {
      opacity: 0.35;
      cursor: not-allowed;
    }

    .move-btn {
      justify-content: center;
      min-width: 34px;
      padding-left: 8px;
      padding-right: 8px;
    }

    /* ── FOOTER ── */
    footer {
      text-align: center;
      padding: 24px;
      border-top: 1px solid var(--border);
      color: var(--muted2);
      font-size: 12px;
      letter-spacing: 0.3px;
    }

    /* ── SCROLLBAR ── */
    ::-webkit-scrollbar { width: 6px; }
    ::-webkit-scrollbar-track { background: var(--bg); }
    ::-webkit-scrollbar-thumb { background: var(--muted2); border-radius: 99px; }
    ::-webkit-scrollbar-thumb:hover { background: var(--muted); }

    /* ── MOBILE ── */
    @media (max-width: 640px) {
      .topnav { padding: 0 16px; }
      .topnav-actions { max-width: calc(100vw - 150px); overflow-x: auto; scrollbar-width: none; }
      .topnav-actions::-webkit-scrollbar { display: none; }
      .topnav .btn-label { display: none; }
      .hero { padding: 34px 20px 24px; }
      .top100-switcher { width: calc(100% - 32px); margin: -6px auto 22px; position: sticky; top: 58px; z-index: 40; }
      .main { padding: 0 16px 60px; }
      .generator-strip { width: calc(100% - 32px); margin-top: -14px; flex-direction: column; align-items: stretch; }
      .thumb, .thumb-placeholder { display: none; }
      .slot-arrow { display: none; }
      .slot { align-items: flex-start; gap: 10px; padding: 12px; border-radius: 11px; }
      .rank { width: 44px; height: 44px; font-size: 16px; }
      .slot-heading { align-items: flex-start; flex-direction: column; gap: 6px; }
      .slot-name { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
      .slot-date, .slot-meta { white-space: normal; }
      .slot-estimate { align-self: flex-start; padding: 4px 7px; font-size: 11px; }
      .slot-actions { align-self: stretch; flex-direction: column; }
      .move-btn, .slot-actions .btn-sm { width: 38px; min-height: 34px; }
      .quick-add { grid-template-columns: 1fr; }
    }

.top100-switcher a { text-align: center; line-height: 1.4; min-width: 0; }
.top100-switcher small { display: block; font: inherit; font-size: 11px; opacity: .8; }
@media (max-width: 640px) { .top100-switcher a { padding: 8px 5px; font-size: 12px; } }
