:root, html[data-theme="dark"] {
      --bg: #0f1724;
      --bg-2: #1b2a44;
      --card: rgba(22, 32, 52, 0.84);
      --border: rgba(148, 163, 184, 0.16);
      --input: #121a2b;
      --text: #f4f7fb;
      --muted: #93a4bb;
      --accent: #38bdf8;
      --green: #34d399;
      --orange: #fb923c;
      --pill-bg: rgba(56, 189, 248, 0.14);
      --pill-fg: #7dd3fc;
      --badge-bg: rgba(52, 211, 153, 0.14);
      --badge-fg: #6ee7b7;
      --badge-bd: rgba(52, 211, 153, 0.28);
      --topbar: rgba(15, 23, 36, 0.78);
      --inner: rgba(10, 16, 28, 0.74);
      --cell: rgba(255,255,255,0.035);
      --cell-bd: rgba(255,255,255,0.07);
      --hover: rgba(56,189,248,0.08);
      --has: rgba(56,189,248,0.12);
      --daynum: #9fb0c8;
      --tip-bg: #0b1220;
      --tip-fg: #f8fafc;
      --btn: rgba(255,255,255,0.05);
      --btn-hover: rgba(255,255,255,0.1);
      --row-bd: rgba(148,163,184,0.1);
      --shadow: 0 18px 50px rgba(0,0,0,0.28);
      --glow: 0 0 0 1px rgba(56,189,248,0.18), 0 10px 30px rgba(56,189,248,0.08);
      --dot-ring: rgba(255,255,255,0.22);
    }
    html[data-theme="light"] {
      --bg: #aeb9cb;
      --bg-2: #c5d0e0;
      --card: rgba(255,255,255,0.9);
      --border: rgba(30, 48, 72, 0.1);
      --input: #ffffff;
      --text: #122033;
      --muted: #51657f;
      --accent: #0284c7;
      --green: #059669;
      --orange: #ea580c;
      --pill-bg: #e0f2fe;
      --pill-fg: #0369a1;
      --badge-bg: #d1fae5;
      --badge-fg: #047857;
      --badge-bd: #a7f3d0;
      --topbar: rgba(255,255,255,0.72);
      --inner: #f3f6fb;
      --cell: #ffffff;
      --cell-bd: #dce5f0;
      --hover: rgba(2,132,199,0.06);
      --has: #e0f2fe;
      --daynum: #5b6f88;
      --tip-bg: #122033;
      --tip-fg: #ffffff;
      --btn: #ffffff;
      --btn-hover: #eaf0f7;
      --row-bd: #e6edf5;
      --shadow: 0 16px 40px rgba(18,32,51,0.12);
      --glow: 0 0 0 1px rgba(2,132,199,0.12), 0 10px 24px rgba(2,132,199,0.08);
      --dot-ring: rgba(18,32,51,0.18);
    }
    * { box-sizing: border-box; font-family: "DM Sans", system-ui, sans-serif; }
    h1, h2, .title { font-family: Outfit, sans-serif; letter-spacing: -0.02em; }
    body {
      margin: 0; color: var(--text); min-height: 100vh;
      background:
        radial-gradient(1100px 480px at 6% -12%, var(--bg-2), transparent 58%),
        radial-gradient(800px 380px at 100% 0%, rgba(56,189,248,0.18), transparent 52%),
        var(--bg);
    }
    #gate { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
    #gate .card {
      background: var(--card); border: 1px solid var(--border); border-radius: 20px;
      padding: 36px; width: 100%; max-width: 380px; text-align: center;
      box-shadow: var(--shadow); backdrop-filter: blur(18px);
    }
    #gate label { display: block; text-align: left; font-size: 12px; color: var(--muted); margin-bottom: 6px; font-weight: 600; }
    #gate input {
      width: 100%; padding: 11px 13px; border-radius: 12px;
      border: 1px solid var(--border); background: var(--input); color: var(--text); margin-bottom: 14px;
    }
    #gate button[type="submit"] {
      width: 100%; padding: 11px; border: none; border-radius: 12px; cursor: pointer;
      background: linear-gradient(135deg, #0ea5e9, #6366f1); color: #fff; font-weight: 700;
      box-shadow: 0 10px 24px rgba(14,165,233,0.28);
    }
    #gate .err { display: none; color: #fb7185; font-size: 12px; margin-top: 10px; }
    .topbar {
      display: flex; align-items: center; justify-content: space-between; gap: 12px;
      padding: 14px 22px; border-bottom: 1px solid var(--border);
      background: var(--topbar); backdrop-filter: blur(18px);
      position: sticky; top: 0; z-index: 30;
    }
    .theme-btn, .icon-btn {
      font-size: 12px; padding: 7px 13px; border-radius: 999px; border: 1px solid var(--border);
      background: var(--card); color: var(--text); cursor: pointer; white-space: nowrap; font-weight: 600;
    }
    .theme-btn:hover, .icon-btn:hover { border-color: var(--accent); box-shadow: var(--glow); }
    .content { max-width: 1400px; margin: 0 auto; padding: 22px 16px 56px; }
    .country-stack { display: flex; flex-direction: column; gap: 28px; }
    .country-slot-full { width: 100%; }
    .country-block {
      background: var(--card); border: 1px solid var(--border); border-radius: 22px;
      overflow: visible; height: 100%; box-shadow: var(--shadow); backdrop-filter: blur(16px);
    }
    .country-head {
      padding: 18px 20px 12px;
      display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
    }
    .country-body {
      display: grid;
      grid-template-columns: 1fr 1fr;
      align-items: stretch;
      gap: 14px;
      padding: 0 16px 16px;
      min-height: 0;
    }
    @media (max-width: 900px) {
      .country-body { grid-template-columns: 1fr; }
    }
    .seller-section, .cal-section {
      min-width: 0;
      background: var(--inner);
      border: 1px solid var(--border);
      border-radius: 16px;
      overflow: hidden;
    }
    table { width: 100%; border-collapse: collapse; font-size: 13px; color: var(--text); }
    th, td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--row-bd); color: var(--text); }
    th { color: var(--muted); font-weight: 700; font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; }
    td.num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }
    tr:last-child td { border-bottom: none; }
    tr:hover td { background: var(--hover); }
    .rank { color: var(--muted); width: 2rem; }
    .empty { padding: 24px; text-align: center; color: var(--muted); font-size: 13px; }
    .meta { font-size: 12px; color: var(--muted); }
    .pill {
      display: inline-block; font-size: 11px; padding: 4px 10px; border-radius: 999px;
      background: var(--pill-bg); color: var(--pill-fg); font-weight: 600;
    }
    .build-badge {
      font-size: 10px; font-weight: 700; letter-spacing: 0.04em;
      padding: 4px 9px; border-radius: 999px;
      background: var(--badge-bg); color: var(--badge-fg);
      border: 1px solid var(--badge-bd);
    }
    .cal-swatch {
      display: inline-block; width: 10px; height: 10px; border-radius: 50%;
      vertical-align: middle; margin-right: 6px;
      box-shadow: 0 0 0 2px var(--dot-ring);
    }
    .seller-section { padding: 0; overflow-x: auto; }
    .cal-section { padding: 14px 16px 18px; }
    .cal-hint { margin-bottom: 12px; font-size: 11px; }
    .cal-single { background: transparent; border: none; width: 100%; }
    .cal-nav {
      display: flex; align-items: center; justify-content: space-between;
      gap: 8px; margin-bottom: 10px;
    }
    .cal-nav-label {
      flex: 1; text-align: center; font-size: 15px; font-weight: 700; color: var(--accent);
      font-family: Outfit, sans-serif;
    }
    .cal-nav-btn {
      width: 34px; height: 34px; border-radius: 12px; border: 1px solid var(--border);
      background: var(--btn); color: var(--text); font-size: 18px; line-height: 1;
      cursor: pointer; display: flex; align-items: center; justify-content: center;
    }
    .cal-nav-btn:hover:not(:disabled) {
      background: var(--btn-hover); border-color: var(--accent); box-shadow: var(--glow);
    }
    .cal-nav-btn:disabled { opacity: 0.35; cursor: not-allowed; }
    .cal-dow-row {
      display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px;
      font-size: 10px; color: var(--muted); text-align: center; margin-bottom: 6px;
      font-weight: 700; letter-spacing: 0.06em;
    }
    .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
    .cal-cell {
      min-height: 52px; border-radius: 10px; padding: 4px;
      background: var(--cell); border: 1px solid var(--cell-bd);
      display: flex; flex-direction: column; overflow: visible;
    }
    .cal-cell.cal-pad { background: transparent; border-color: transparent; }
    .cal-cell.cal-has { background: var(--has); }
    .cal-cell.cal-today { border-color: var(--accent); box-shadow: var(--glow); }
    .cal-daynum {
      display: block; line-height: 1.2; color: var(--daynum); font-size: 11px;
      text-align: right; font-weight: 700;
    }
    .cal-dots {
      display: flex; flex-wrap: wrap; gap: 2px; justify-content: center;
      align-items: center; align-content: flex-end; flex: 1;
      min-height: 10px; padding: 1px 0;
    }
    .cal-dot {
      width: 6px; height: 6px; border-radius: 50%; display: block; flex-shrink: 0;
      box-shadow: 0 0 0 1px var(--dot-ring); cursor: help; position: relative;
    }
    .cal-dot[data-color] { background: var(--dot-color, #64748b); }
    .cal-dot[data-tip]:hover::after {
      content: attr(data-tip);
      position: absolute; left: 50%; bottom: calc(100% + 8px);
      transform: translateX(-50%);
      background: var(--tip-bg); color: var(--tip-fg); font-size: 11px; line-height: 1.3;
      padding: 6px 9px; border-radius: 10px; border: 1px solid var(--border);
      white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis;
      pointer-events: none; z-index: 20;
      box-shadow: var(--shadow);
    }
    .seller-section-title, .cal-title {
      padding: 13px 16px 9px; font-size: 13px; font-weight: 700; color: var(--text);
      border-bottom: 1px solid var(--border); font-family: Outfit, sans-serif;
    }
    .cal-title { padding: 0 0 8px; margin-bottom: 10px; }

.nav-link {
  font-size: 12px; padding: 7px 13px; border-radius: 999px; border: 1px solid var(--border);
  background: transparent; color: var(--muted); text-decoration: none; font-weight: 600;
}
.nav-link:hover, .nav-link.active {
  color: var(--text); border-color: var(--accent); background: var(--card);
}
.topbar-left { display: flex; align-items: center; gap: 14px; }
.topbar-nav { display: flex; align-items: center; gap: 8px; }

.hero {
  background: var(--card); border: 1px solid var(--border); border-radius: 22px;
  padding: 36px 32px 32px; box-shadow: var(--shadow); backdrop-filter: blur(16px);
  margin-bottom: 22px;
}
.hero-kicker {
  font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 10px;
}
.hero h1 { font-size: 34px; margin: 0 0 10px; font-weight: 700; }
.hero p { margin: 0; font-size: 15px; color: var(--muted); line-height: 1.6; max-width: 640px; }

.module-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
@media (max-width: 800px) {
  .module-grid { grid-template-columns: 1fr; }
  .hero { padding: 26px 20px; }
  .hero h1 { font-size: 26px; }
}
.module-card {
  display: block; text-decoration: none; color: inherit;
  background: var(--card); border: 1px solid var(--border); border-radius: 20px;
  padding: 22px 22px 20px; box-shadow: var(--shadow); backdrop-filter: blur(16px);
  min-height: 170px; transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
a.module-card:hover {
  transform: translateY(-3px); border-color: var(--accent); box-shadow: var(--glow);
}
.module-card.soon { opacity: 0.72; cursor: default; }
.module-card.soon:hover { transform: none; box-shadow: var(--shadow); border-color: var(--border); }
.module-icon {
  width: 40px; height: 40px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: var(--pill-bg); color: var(--accent); font-size: 18px; margin-bottom: 14px;
}
.module-card h2 { margin: 0 0 6px; font-size: 18px; }
.module-card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.module-foot { margin-top: 16px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.source-row {
  margin-top: 22px; color: var(--muted); font-size: 12px; line-height: 1.6;
}

