  :root {
    --red: #9000e3;
    --red-dark: #6800a5;
    --gold: #f0b429;
    --gold-dim: #a07820;
    --bg: #0a0a0f;
    --bg2: #111118;
    --bg3: #1a1a25;
    --bg4: #22222f;
    --text: #e8e8f0;
    --text-dim: #8888a8;
    --border: #2a2a3a;
    --blue: #3a7bd5;
    --green: #22c55e;
    --purple: #9b59b6;
  }

  * { box-sizing: border-box; margin: 0; padding: 0; }

  body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Barlow', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
  }

  /* ── HEADER ── */
  header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(10,10,15,0.95);
    backdrop-filter: blur(12px);
    border-bottom: 2px solid var(--purple);
    padding: 0 2rem;
    display: flex; align-items: center; justify-content: space-between;
    height: 64px;
  }
  .logo {
    font-family: 'Bebas Neue', cursive;
    font-size: 1.8rem;
    letter-spacing: 0.05em;
    color: var(--text);
  }
  .logo span { color: var(--purple); }

nav a {
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 0 1.1rem;
  height: 64px;
  border-bottom: 3px solid transparent;
  transition: color 0.2s, border-color 0.2s;
  text-decoration: none;
  display: flex;
  align-items: center;
}

nav a:hover {
  color: var(--text);
}

nav a.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

  nav { display: flex; gap: 0; }
  nav button {
    background: none; border: none; cursor: pointer;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 0.85rem; font-weight: 700; letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-dim);
    padding: 0 1.1rem; height: 64px;
    border-bottom: 3px solid transparent;
    transition: color 0.2s, border-color 0.2s;
    position: relative;
  }
  nav button:hover { color: var(--text); }
  nav button.active { color: var(--gold); border-bottom-color: var(--gold); }

  /* ── PAGES ── */
  .page { display: none; padding: 2rem; max-width: 1400px; margin: 0 auto; }
  .page.active { display: block; }

  /* ── HERO (HOME) ── */
  .hero {
  min-height: 420px;
  background:
    linear-gradient(to bottom, transparent 40%, var(--bg) 100%),
    radial-gradient(ellipse at 70% 50%, rgba(155, 89, 182, 0.2) 0%, transparent 60%),
    linear-gradient(135deg, #0a0a0f 0%, #1a0f2a 50%, #0a0a0f 100%);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 3rem;
  display: flex; flex-direction: column; justify-content: flex-end;
  margin-bottom: 1.5rem;
  position: relative; overflow: hidden;
}
.hero::before {
  content: 'MFF';
  position: absolute; top: -20px; right: -10px;
  font-family: 'Bebas Neue', cursive;
  font-size: 18rem; line-height: 1;
  color: rgba(155, 89, 182, 0.04); /* changed to purple */
  pointer-events: none;
  user-select: none;
}


  .hero h1 {
    font-family: 'Bebas Neue', cursive;
    font-size: clamp(2.5rem, 6vw, 5rem);
    line-height: 1; letter-spacing: 0.02em;
    margin-bottom: 0.75rem;
  }
  .hero h1 em {
  color: var(--purple); /* was --red, now uses purple variable */
  font-style: normal;
}
  .hero p { font-size: 1.1rem; color: var(--text-dim); max-width: 520px; line-height: 1.6; }

  .quick-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }
  .quick-card {
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
    cursor: pointer;
    transition: border-color 0.2s, transform 0.2s, background 0.2s;
  }
  .quick-card:hover {
    border-color: var(--red);
    transform: translateY(-3px);
    background: var(--bg4);
  }
  .quick-card .icon { font-size: 1.8rem; margin-bottom: 0.5rem; }
  .quick-card h3 {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 1rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.06em; margin-bottom: 0.25rem;
  }
  .quick-card p { font-size: 0.8rem; color: var(--text-dim); }

  /* ── SECTION TITLE ── */
  .section-title {
    font-family: 'Bebas Neue', cursive;
    font-size: 2rem; letter-spacing: 0.05em;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--red);
    display: flex; align-items: center; gap: 0.75rem;
  }
  .section-title .badge {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 0.7rem; font-weight: 700;
    background: var(--red);
    color: white; padding: 0.2rem 0.5rem;
    border-radius: 4px; letter-spacing: 0.1em;
    margin-left: auto;
  }

  /* ── CHARACTERS PAGE ── */
  .controls {
    display: flex; gap: 0.75rem; flex-wrap: wrap;
    margin-bottom: 1.5rem; align-items: center;
  }
  .search-box {
    flex: 1; min-width: 200px;
    background: var(--bg3); border: 1px solid var(--border);
    border-radius: 8px; padding: 0.6rem 1rem;
    color: var(--text); font-family: 'Barlow', sans-serif; font-size: 0.95rem;
  }
  .search-box:focus { outline: none; border-color: var(--red); }
  .filter-btn {
    background: var(--bg3); border: 1px solid var(--border);
    border-radius: 8px; padding: 0.6rem 1rem;
    color: var(--text-dim); font-family: 'Barlow Condensed', sans-serif;
    font-size: 0.85rem; font-weight: 700; letter-spacing: 0.06em;
    text-transform: uppercase; cursor: pointer;
    transition: all 0.2s;
  }
  .filter-btn:hover, .filter-btn.active {
    background: var(--red); border-color: var(--red); color: white;
  }

  .char-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
  }
  .char-card {
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    transition: border-color 0.2s, transform 0.2s;
    cursor: pointer;
  }
  .char-card:hover { border-color: var(--gold); transform: translateY(-4px); }

  .char-portrait {
    width: 100%; height: 128px;
    background: linear-gradient(135deg, var(--bg4), var(--bg2));
    display: flex; align-items: center; justify-content: center;
    overflow: hidden; position: relative;
  }
  .char-portrait img {
    width: 128px; height: 128px;
    object-fit: cover;
    image-rendering: pixelated;
  }
  .char-portrait .type-badge {
  position: absolute; top: 6px; right: 6px;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.65rem; font-weight: 700; letter-spacing: 0.08em;
  padding: 0.15rem 0.4rem; border-radius: 4px;   /* ← this gives round corners */
  text-transform: uppercase;
}
#modal-type-badge .type-badge {
  border-radius: 4px;
}
  .type-pve   { background: rgba(34,197,94,0.25);  color: #22c55e; border: 1px solid #22c55e44; }
  .type-pvp   { background: rgba(59,130,246,0.25); color: #60a5fa; border: 1px solid #60a5fa44; }
  .type-hybrid{ background: rgba(240,180,41,0.25); color: var(--gold); border: 1px solid #f0b42944; }
  .type-support{background: rgba(155,89,182,0.25); color: #c084fc; border: 1px solid #c084fc44; }

  .char-info { padding: 0.75rem; }
  .char-name {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 1rem; font-weight: 700; letter-spacing: 0.04em;
    margin-bottom: 0.35rem;
  }
  .char-detail { font-size: 0.75rem; color: var(--text-dim); line-height: 1.5; }
  .char-detail strong { color: var(--text); font-weight: 600; }

  /* ── MODAL ── */
  .modal-overlay {
    display: none; position: fixed; inset: 0; z-index: 500;
    background: rgba(0,0,0,0.85); backdrop-filter: blur(4px);
    align-items: center; justify-content: center;
  }
  .modal-overlay.open { display: flex; }
  .modal {
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 14px;
    width: min(90vw, 520px);
    overflow: hidden;
  }
  .modal-header {
    background: linear-gradient(135deg, var(--bg4), #1a0308);
    border-bottom: 1px solid var(--border);
    padding: 1.5rem;
    display: flex; align-items: center; gap: 1rem;
  }
  .modal-portrait {
    width: 80px; height: 80px;
    border-radius: 10px; overflow: hidden;
    border: 2px solid var(--red);
    flex-shrink: 0;
    background: var(--bg2);
    display: flex; align-items: center; justify-content: center;
  }
  .modal-portrait img { width: 80px; height: 80px; object-fit: cover; }
  .modal-header h2 {
    font-family: 'Bebas Neue', cursive;
    font-size: 1.8rem; letter-spacing: 0.04em;
  }
  .modal-body { padding: 1.5rem; display: flex; flex-direction: column; gap: 1rem; }
  .modal-row {
    display: flex; justify-content: space-between; align-items: flex-start;
    padding-bottom: 0.75rem; border-bottom: 1px solid var(--border);
    gap: 1rem;
  }
  .modal-row:last-child { border-bottom: none; padding-bottom: 0; }
  .modal-label {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 0.75rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.08em; color: var(--text-dim);
    white-space: nowrap;
  }
  .modal-value { font-size: 0.9rem; color: var(--text); text-align: right; }
  .modal-close {
    display: block; width: calc(100% - 3rem); margin: 0 1.5rem 1.5rem;
    background: var(--red); border: none; cursor: pointer;
    color: white; font-family: 'Barlow Condensed', sans-serif;
    font-size: 0.9rem; font-weight: 700; letter-spacing: 0.1em;
    text-transform: uppercase; padding: 0.75rem; border-radius: 8px;
    transition: background 0.2s;
  }
  .modal-close:hover { background: var(--red-dark); }

  /* ── TIER LIST ── */
  .tier-row {
    display: flex; align-items: flex-start; gap: 1rem;
    margin-bottom: 0.75rem;
  }
  .tier-label {
    width: 56px; height: 56px; flex-shrink: 0;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-family: 'Bebas Neue', cursive; font-size: 1.8rem;
  }
  .tier-label-custom {
    min-width: 110px; width: 110px; flex-shrink: 0;
    border-radius: 8px; padding: 0.35rem 0.5rem;
    display: flex; align-items: center; justify-content: center;
    text-align: center;
    font-family: 'Barlow Condensed', cursive;
    font-size: 0.82rem; font-weight: 700;
    letter-spacing: 0.05em; text-transform: uppercase;
    line-height: 1.3; min-height: 56px;
  }
  .tier-s  { background: #e74c3c; color: white; }
  .tier-a  { background: #e67e22; color: white; }
  .tier-b  { background: #f1c40f; color: #111; }
  .tier-c  { background: #27ae60; color: white; }
  .tier-d  { background: #2980b9; color: white; }
  .tier-chars {
    flex: 1;
    background: var(--bg3); border: 1px solid var(--border);
    border-radius: 8px; padding: 0.5rem;
    display: flex; flex-wrap: wrap; gap: 0.5rem; min-height: 56px;
    align-items: center;
  }
  .tier-char-chip {
    display: inline-block;
    background: var(--bg4); border: 1px solid var(--border);
    border-radius: 6px; overflow: hidden;
    cursor: pointer; transition: border-color 0.15s, transform 0.15s;
    width: 48px; height: 48px;
  }
  .tier-char-chip:hover { border-color: var(--gold); transform: scale(1.1); }
  .tier-char-chip img { width: 48px; height: 48px; display: block; object-fit: cover; }

  /* ── GUIDES (new) ── */
  .guide-list {
    display: flex; flex-direction: column; gap: 1rem;
    max-width: 860px;
  }
  .guide-card {
    background: var(--bg3); border: 1px solid var(--border);
    border-radius: 12px; overflow: hidden;
  }
  .guide-card-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 1rem 1.25rem; cursor: pointer;
    transition: background 0.15s;
    gap: 1rem;
    user-select: none;
  }
  .guide-card-header:hover { background: var(--bg4); }
  .guide-card.guide-open .guide-card-header { background: var(--bg4); border-bottom: 1px solid var(--border); }
  .guide-card-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 1.15rem; font-weight: 700;
    letter-spacing: 0.02em; line-height: 1.2;
  }
  .guide-card-chevron {
    font-size: 0.7rem; color: var(--text-dim); flex-shrink: 0;
    transition: transform 0.2s;
  }
  .guide-card.guide-open .guide-card-chevron { transform: rotate(180deg); color: var(--gold); }
  .guide-card-body {
    display: none; padding: 1.5rem 1.5rem 1.25rem;
  }
  .guide-card.guide-open .guide-card-body { display: block; }

  /* Body typography */
  .guide-card-body p {
    font-size: 0.88rem; color: var(--text-dim); line-height: 1.75;
    margin-bottom: 0.9rem;
  }
  .guide-card-body p:last-child { margin-bottom: 0; }
  .guide-card-body strong { color: var(--text); font-weight: 600; }

  /* Character entries */
  .g-char {
    background: var(--bg2); border: 1px solid var(--border);
    border-left: 3px solid var(--red);
    border-radius: 8px; padding: 0.9rem 1rem;
    margin-bottom: 0.75rem;
  }
  .g-char:last-of-type { margin-bottom: 1rem; }
  .g-char-name {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 1.05rem; font-weight: 700;
    letter-spacing: 0.03em; margin-bottom: 0.4rem;
    color: var(--text);
  }
  .g-char p { margin-bottom: 0; }

  /* Badges */
  .g-badge {
    display: inline-block;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 0.65rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.06em; padding: 0.15rem 0.5rem;
    border-radius: 4px; margin-left: 0.4rem;
    vertical-align: middle; white-space: nowrap;
  }
  .g-badge-green  { background: rgba(34,197,94,0.15);  color: #22c55e; border: 1px solid #22c55e44; }
  .g-badge-red    { background: rgba(231,76,60,0.15);  color: #e74c3c; border: 1px solid #e74c3c44; }
  .g-badge-yellow { background: rgba(240,180,41,0.15); color: var(--gold); border: 1px solid #f0b42944; }
  .g-badge-blue   { background: rgba(58,123,213,0.15); color: #60a5fa; border: 1px solid #60a5fa44; }

  /* Card name highlights (for the cards guide) */
  .g-card-name {
    color: var(--gold); font-style: italic; font-weight: 500;
  }

  /* Credits block */
  .g-credits {
    margin-top: 1.25rem; padding: 0.75rem 1rem;
    background: var(--bg4); border-radius: 8px; border: 1px solid var(--border);
    font-size: 0.78rem; color: var(--text-dim); line-height: 1.7;
  }
  .g-credits strong { color: var(--text); }

  /* ── ROSTER TRACKER ── */
  .tracker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 0.5rem;
  }
  .tracker-item {
    background: var(--bg3); border: 2px solid var(--border);
    border-radius: 8px; overflow: hidden;
    position: relative; cursor: pointer;
    transition: border-color 0.2s, transform 0.15s;
    aspect-ratio: 1;
  }
  .tracker-item:hover { border-color: var(--gold); transform: scale(1.05); }
  .tracker-item.owned { border-color: var(--green); }
  .tracker-item img {
    width: 100%; height: 100%;
    object-fit: cover; display: block;
    opacity: 0.3; transition: opacity 0.2s;
  }
  .tracker-item.owned img { opacity: 1; }
  .tracker-check {
    position: absolute; bottom: 3px; right: 4px;
    font-size: 0.75rem; font-weight: bold; color: var(--green);
    text-shadow: 0 0 4px rgba(0,0,0,0.8);
  }
  .tracker-stats {
    display: flex; gap: 1rem; margin-bottom: 1.5rem;
    flex-wrap: wrap;
  }
  .stat-chip {
    background: var(--bg3); border: 1px solid var(--border);
    border-radius: 8px; padding: 0.75rem 1.25rem;
    text-align: center;
  }
  .stat-chip .val {
    font-family: 'Bebas Neue', cursive;
    font-size: 2rem; color: var(--gold); line-height: 1;
  }
  .stat-chip .lbl {
    font-size: 0.75rem; color: var(--text-dim); letter-spacing: 0.06em;
    text-transform: uppercase;
  }

  /* ── CHECKLIST ── */
  .checklist-section { margin-bottom: 2rem; }
  .checklist-section h3 {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 1rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.08em; color: var(--text-dim); margin-bottom: 0.75rem;
    padding-bottom: 0.4rem; border-bottom: 1px solid var(--border);
  }
  .check-item {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0.6rem 0.75rem; border-radius: 8px;
    cursor: pointer; transition: background 0.2s; margin-bottom: 0.35rem;
  }
  .check-item:hover { background: var(--bg3); }
  .check-item input[type=checkbox] { display: none; }
  .check-box {
    width: 20px; height: 20px; flex-shrink: 0;
    border: 2px solid var(--border); border-radius: 5px;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
  }
  .check-item.done .check-box { background: var(--green); border-color: var(--green); }
  .check-item.done .check-box::after { content: '✓'; color: white; font-size: 0.75rem; font-weight: bold; }
  .check-item.done .check-label { color: var(--text-dim); text-decoration: line-through; }
  .check-label { font-size: 0.9rem; }
  .check-reward { margin-left: auto; font-size: 0.75rem; color: var(--gold); font-weight: 600; }
  .reset-btn {
    background: none; border: 1px solid var(--border);
    border-radius: 8px; padding: 0.5rem 1rem;
    color: var(--text-dim); cursor: pointer; font-family: 'Barlow Condensed', sans-serif;
    font-size: 0.8rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.06em; margin-bottom: 1.5rem;
    transition: all 0.2s;
  }
  .reset-btn:hover { border-color: var(--red); color: var(--red); }

  /* ── BEGINNERS ── */
  .beginner-steps {
    display: flex; flex-direction: column; gap: 1rem;
    margin-bottom: 2rem;
  }
  .step-card {
    background: var(--bg3); border: 1px solid var(--border);
    border-radius: 10px; padding: 1.25rem;
    display: flex; gap: 1rem; align-items: flex-start;
  }
  .step-num {
    font-family: 'Bebas Neue', cursive;
    font-size: 2.5rem; color: var(--red); line-height: 1;
    flex-shrink: 0; width: 40px; text-align: center;
  }
  .step-card h3 {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 1.1rem; font-weight: 700; margin-bottom: 0.4rem;
  }
  .step-card p { font-size: 0.85rem; color: var(--text-dim); line-height: 1.6; }

  .tip-box {
    background: rgba(240,180,41,0.08); border: 1px solid rgba(240,180,41,0.3);
    border-radius: 10px; padding: 1rem 1.25rem; margin-bottom: 1rem;
    font-size: 0.88rem; line-height: 1.6;
  }
  .tip-box strong { color: var(--gold); }

  /* ── CALC ── */
  .calc-form {
    background: var(--bg3); border: 1px solid var(--border);
    border-radius: 12px; padding: 1.5rem;
    display: flex; flex-direction: column; gap: 1rem;
    max-width: 480px; margin-bottom: 2rem;
  }
  .form-row { display: flex; flex-direction: column; gap: 0.35rem; }
  .form-row label {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 0.75rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.08em; color: var(--text-dim);
  }
  .form-row select, .form-row input {
    background: var(--bg4); border: 1px solid var(--border);
    border-radius: 8px; padding: 0.6rem 0.8rem;
    color: var(--text); font-family: 'Barlow', sans-serif; font-size: 0.9rem;
  }
  .form-row select:focus, .form-row input:focus { outline: none; border-color: var(--red); }
  .calc-btn {
    background: var(--red); border: none; cursor: pointer;
    color: white; font-family: 'Barlow Condensed', sans-serif;
    font-size: 0.9rem; font-weight: 700; letter-spacing: 0.1em;
    text-transform: uppercase; padding: 0.75rem; border-radius: 8px;
    transition: background 0.2s;
  }
  .calc-btn:hover { background: var(--red-dark); }
  .calc-result {
    background: var(--bg3); border: 1px solid var(--border);
    border-radius: 12px; padding: 1.5rem; max-width: 600px;
    display: none;
  }
  .calc-result.show { display: block; }
  .calc-result-header { margin-bottom: 1rem; padding-bottom: 0.75rem; border-bottom: 2px solid var(--red); }
  .calc-result-label {
    font-family: 'Bebas Neue', cursive;
    font-size: 1.4rem; letter-spacing: 0.04em; color: var(--gold);
  }
  .calc-result-note { font-size: 0.78rem; color: var(--text-dim); margin-top: 0.2rem; line-height: 1.5; }
  .calc-section { margin-bottom: 1.25rem; }
  .calc-section:last-child { margin-bottom: 0; }
  .calc-section-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 0.8rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.08em; color: var(--blue);
    margin-bottom: 0.4rem; padding-bottom: 0.3rem;
    border-bottom: 1px solid var(--border);
  }
  .calc-section-note {
    font-size: 0.72rem; color: var(--text-dim); margin-bottom: 0.4rem;
    font-style: italic;
  }
  .res-row {
    display: flex; justify-content: space-between;
    padding: 0.35rem 0; border-bottom: 1px solid var(--border);
    font-size: 0.85rem; gap: 1rem;
  }
  .res-row:last-child { border-bottom: none; }
  .res-row .val { color: var(--gold); font-weight: 700; text-align: right; flex-shrink: 0; }
  .res-row.res-highlight { background: rgba(240,180,41,0.06); border-radius: 4px; padding: 0.35rem 0.4rem; }

  /* ── HOME LAYOUT ── */
  .home-layout {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    max-width: 860px;
    margin: 0 auto;
  }
  .home-main { display: flex; flex-direction: column; gap: 1.25rem; }

  /* ── SIDEBAR (hidden when empty) ── */
  .home-sidebar:empty { display: none; }
  .home-sidebar { display: flex; flex-direction: column; gap: 1rem; }
  .sidebar-widget {
    background: var(--bg3); border: 1px solid var(--border);
    border-radius: 10px; overflow: hidden;
  }
  .sidebar-widget-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 0.78rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.1em; color: var(--text-dim);
    background: var(--bg4); padding: 0.6rem 1rem;
    border-bottom: 1px solid var(--border);
  }
  .tip-list {
    list-style: none; padding: 0.75rem 1rem;
    display: flex; flex-direction: column; gap: 0.5rem;
  }
  .tip-list li {
    font-size: 0.8rem; color: var(--text-dim); line-height: 1.5;
    padding-left: 0.9rem; position: relative;
  }
  .tip-list li::before {
    content: '›'; position: absolute; left: 0;
    color: var(--gold); font-weight: 700;
  }
  .mat-list { padding: 0.5rem 0; }
  .mat-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 0.35rem 1rem; gap: 0.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.04);
  }
  .mat-row:last-child { border-bottom: none; }
  .mat-name { font-size: 0.78rem; font-weight: 600; color: var(--text); }
  .mat-src { font-size: 0.7rem; color: var(--text-dim); text-align: right; }
  .reminder-list { padding: 0.6rem 1rem; display: flex; flex-direction: column; gap: 0.4rem; }
  .reminder-row { display: flex; align-items: center; gap: 0.6rem; font-size: 0.8rem; color: var(--text-dim); }
  .reminder-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }

  /* ── CHARACTER OF THE WEEK ── */
  .cotw-card {
    background: var(--bg3);
    border: 1px solid rgba(155,89,182,0.4);
    border-radius: 12px; overflow: hidden;
  }
  .cotw-header {
    background: linear-gradient(135deg, rgba(155,89,182,0.15), rgba(59,130,246,0.08));
    border-bottom: 1px solid rgba(155,89,182,0.3);
    padding: 0.85rem 1.25rem;
    display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem;
  }
  .cotw-badge {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 0.8rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.1em; color: #c084fc;
  }
  .cotw-sub { font-size: 0.72rem; color: var(--text-dim); font-style: italic; }
  .cotw-body {
    display: flex; align-items: flex-start; gap: 1.25rem;
    padding: 1.25rem;
  }
  .cotw-portrait {
    width: 90px; height: 90px; flex-shrink: 0;
    border-radius: 10px; overflow: hidden;
    border: 2px solid #9b59b6;
    background: var(--bg2);
  }
  .cotw-portrait img { width: 90px; height: 90px; object-fit: cover; display: block; }
  .cotw-name {
    font-family: 'Bebas Neue', cursive;
    font-size: 1.7rem; letter-spacing: 0.04em; line-height: 1;
    margin-bottom: 0.4rem;
  }
  .cotw-meta { display: flex; gap: 0.4rem; margin-bottom: 0.4rem; flex-wrap: wrap; }
  .cotw-tag {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 0.65rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.08em; padding: 0.15rem 0.45rem;
    border-radius: 4px; border: 1px solid transparent;
  }
  .cotw-uniform, .cotw-ctp {
    font-size: 0.78rem; color: var(--text-dim); margin-bottom: 0.25rem;
  }
  .cotw-uniform strong, .cotw-ctp strong { color: var(--text); }
  .cotw-desc {
    font-size: 0.82rem; color: var(--text-dim); line-height: 1.6;
    margin-top: 0.5rem;
  }

  /* ── FEATURED CHARACTER ── */
  .featured-card {
  display: flex; align-items: center; gap: 1.5rem;
  background: linear-gradient(135deg, rgba(240,180,41,0.08), rgba(155, 89, 182, 0.06));
  border: 1px solid rgba(155, 89, 182, 0.35);
  border-radius: 12px; padding: 1.5rem;
  margin-top: 0.5rem;
}
  .featured-portrait {
    width: 100px; height: 100px; flex-shrink: 0;
    border-radius: 12px; overflow: hidden;
    border: 2px solid var(--gold);
    background: var(--bg3);
    display: flex; align-items: center; justify-content: center;
  }
  .featured-portrait img { width: 100px; height: 100px; object-fit: cover; }
  .featured-label {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.1em; color: var(--gold); margin-bottom: 0.3rem;
  }
  .featured-name {
    font-family: 'Bebas Neue', cursive;
    font-size: 2rem; letter-spacing: 0.04em; line-height: 1;
    margin-bottom: 0.35rem;
  }
  .featured-uniform {
    font-size: 0.82rem; color: var(--text-dim); margin-bottom: 0.5rem;
  }
  .featured-uniform strong { color: var(--text); }
  .featured-desc { font-size: 0.88rem; color: var(--text-dim); line-height: 1.6; }

  /* ══════════════════════════════════
     MOBILE RESPONSIVE
  ══════════════════════════════════ */
  @media (max-width: 768px) {
    header {
      padding: 0 1rem;
      height: auto; flex-direction: column;
      align-items: flex-start; padding-top: 0.75rem;
    }
    .logo { padding-bottom: 0.25rem; }
    nav {
      width: 100%; overflow-x: auto;
      padding-bottom: 0.5rem;
      scrollbar-width: none;
    }
    nav::-webkit-scrollbar { display: none; }
    nav a {  
    font-size: 0.75rem;
    padding: 0 0.75rem;
    height: 44px;
    white-space: nowrap;
    border-bottom-width: 2px;
  }
    .page { padding: 1rem; }
    .hero { min-height: 260px; padding: 1.5rem; }
    .hero h1 { font-size: 2.2rem; }
    .hero p { font-size: 0.9rem; }
    .quick-cards { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
    .home-layout { max-width: 100%; }
    .quick-cards { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
    .featured-card { flex-direction: column; align-items: flex-start; gap: 1rem; }
    .featured-portrait { width: 80px; height: 80px; }
    .featured-portrait img { width: 80px; height: 80px; }
    .cotw-body { flex-direction: column; }
    .cotw-portrait { width: 70px; height: 70px; }
    .cotw-portrait img { width: 70px; height: 70px; }
    .char-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
    .tier-row { gap: 0.5rem; }
    .tier-label { width: 44px; height: 44px; font-size: 1.4rem; }
    .tier-char-chip { width: 40px; height: 40px; }
    .tier-char-chip img { width: 40px; height: 40px; }
    .guide-list { max-width: 100%; }
    .tracker-grid { grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 0.4rem; }
    .tracker-stats { gap: 0.5rem; }
    .stat-chip { padding: 0.5rem 0.75rem; }
    .modal { width: 95vw; }
    .modal-header { padding: 1rem; }
    .modal-body { padding: 1rem; }
    .modal-close { width: calc(100% - 2rem); margin: 0 1rem 1rem; }
    .calc-form { max-width: 100%; }
    .calc-result { max-width: 100%; }
    .section-title { font-size: 1.6rem; }
    .controls { gap: 0.5rem; }
    .filter-btn { padding: 0.5rem 0.75rem; font-size: 0.78rem; }
    .search-box { font-size: 0.9rem; }
    .step-card { flex-direction: column; gap: 0.5rem; }
    .step-num { font-size: 1.8rem; width: auto; }
  }

  @media (max-width: 480px) {
    .quick-cards { grid-template-columns: 1fr 1fr; }
    .char-grid { grid-template-columns: repeat(2, 1fr); }
    .hero h1 { font-size: 1.8rem; }
     nav a {   
    font-size: 0.7rem;
    padding: 0 0.6rem;
  }
    .home-sidebar { grid-template-columns: 1fr; }
  }
  ::-webkit-scrollbar { width: 6px; }
  ::-webkit-scrollbar-track { background: var(--bg2); }
  ::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

  /* ── EMPTY STATE ── */
  .empty { text-align: center; padding: 3rem; color: var(--text-dim); }
  .empty .icon { font-size: 3rem; margin-bottom: 1rem; }

  /* ── LOADING ── */
  .loading {
    text-align: center; padding: 3rem;
    font-family: 'Barlow Condensed', sans-serif;
    color: var(--text-dim); letter-spacing: 0.1em; text-transform: uppercase;
    font-size: 0.85rem;
  }

