
  /* ── TOKENS ─────────────────────────────────────────── */
  :root {
    --bg:          #f5f0e8;
    --bg-card:     #faf7f2;
    --bg-bonus:    #f0eaf8;
    --border:      #e2d9c8;
    --border-soft: #ede6d6;
    --purple:      #6b3fa0;
    --purple-mid:  #8b5cc4;
    --purple-pale: #ede5f8;
    --text:        #2a2118;
    --text-mid:    #5a4e40;
    --text-soft:   #8a7d6e;
    --phrase-num:  #c4a882;

    /* register label colors */
    --col-general:    #2e7d52;
    --col-casual:     #b06020;
    --col-news:       #1a5f8a;
    --col-pro:        #6b3fa0;
    --col-workplace:  #7a2040;

    --radius:  10px;
    --shadow:  0 2px 12px rgba(80,50,20,0.07);
  }

  /* ── RESET & BASE ───────────────────────────────────── */
  *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

  body {
    background: var(--bg);
    color: var(--text);
    font-family: 'DM Sans', sans-serif;
    font-size: 16px;
    line-height: 1.7;
    min-height: 100vh;
  }

  /* ── SCROLL PROGRESS BAR ────────────────────────────── */
  #progress-bar {
    position: fixed;
    top: 0; left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, var(--purple), var(--purple-mid));
    z-index: 1000;
    transition: width 0.1s linear;
  }

  /* ── HEADER ─────────────────────────────────────────── */
  header {
    background: var(--purple);
    color: #fff;
    padding: 2rem 1.25rem 1.75rem;
    text-align: center;
  }

  .header-eyebrow {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    opacity: 0.75;
    margin-bottom: 0.5rem;
  }

  header h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.6rem, 5vw, 2.4rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.5rem;
  }

  .header-sub {
    font-size: 0.88rem;
    opacity: 0.8;
    font-weight: 300;
  }

  /* ── LEVEL BADGE ─────────────────────────────────────── */
  .level-badge {
    display: inline-block;
    margin-top: 0.9rem;
    background: rgba(255,255,255,0.18);
    border: 1px solid rgba(255,255,255,0.35);
    border-radius: 20px;
    padding: 0.2rem 0.85rem;
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.06em;
  }

  /* ── MAIN LAYOUT ─────────────────────────────────────── */
  main {
    max-width: 740px;
    margin: 0 auto;
    padding: 2rem 1rem 4rem;
  }

  /* ── INTRO STRIP ─────────────────────────────────────── */
  .intro-strip {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-left: 4px solid var(--purple);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    margin-bottom: 2rem;
    font-size: 0.9rem;
    color: var(--text-mid);
  }

  .intro-strip strong {
    color: var(--purple);
    font-weight: 600;
  }

  /* ── PHRASE CARD ─────────────────────────────────────── */
  .phrase-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
    overflow: hidden;
  }

  .phrase-header {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    padding: 1.1rem 1.25rem 1rem;
    border-bottom: 1px solid var(--border-soft);
  }

  .phrase-number {
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--phrase-num);
    flex-shrink: 0;
    line-height: 1;
    padding-top: 2px;
  }

  .phrase-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.25rem;
    font-weight: 700;
    font-style: italic;
    color: var(--purple);
    line-height: 1.3;
  }

  /* ── EXAMPLES DISCLOSURE ─────────────────────────────── */
  .examples-disclosure {
    padding: 0;
  }

  .examples-disclosure summary {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.65rem 1.25rem;
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-soft);
    user-select: none;
    transition: background 0.15s;
  }

  .examples-disclosure summary::-webkit-details-marker { display: none; }

  .examples-disclosure summary:hover {
    background: var(--purple-pale);
    color: var(--purple);
  }

  .toggle-icon {
    font-size: 0.9rem;
    transition: transform 0.25s ease;
    color: var(--purple-mid);
  }

  .examples-disclosure[open] summary .toggle-icon {
    transform: rotate(180deg);
  }

  .examples-disclosure[open] summary {
    color: var(--purple);
    border-bottom: 1px solid var(--border-soft);
  }

  /* ── SENTENCE LIST ───────────────────────────────────── */
  .sentence-list {
    list-style: none;
    padding: 0.5rem 0 0.75rem;
  }

  .sentence-list li {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    padding: 0.55rem 1.25rem;
    font-size: 0.95rem;
    line-height: 1.6;
    border-bottom: 1px solid var(--border-soft);
    transition: background 0.12s;
  }

  .sentence-list li:last-child { border-bottom: none; }

  .sentence-list li:hover { background: rgba(107,63,160,0.03); }

  .sentence-bullet {
    color: var(--purple-mid);
    font-size: 0.7rem;
    flex-shrink: 0;
    padding-top: 5px;
  }

  .sentence-text { flex: 1; }

  /* ── REGISTER LABELS ─────────────────────────────────── */
  .label {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    flex-shrink: 0;
    white-space: nowrap;
    padding-top: 2px;
  }

  .label-general    { color: var(--col-general); }
  .label-casual     { color: var(--col-casual); }
  .label-news       { color: var(--col-news); }
  .label-pro        { color: var(--col-pro); }
  .label-workplace  { color: var(--col-workplace); }

  /* ── LEGEND ──────────────────────────────────────────── */
  .legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    margin-bottom: 2rem;
    padding: 0.85rem 1.1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.78rem;
  }

  .legend-title {
    width: 100%;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-soft);
    margin-bottom: 0.1rem;
  }

  .legend-item {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-weight: 500;
  }

  .legend-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
  }

  /* ── BONUS SECTION ───────────────────────────────────── */
  .bonus-card {
    background: var(--bg-bonus);
    border: 1px solid #d8c8f0;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-top: 2.5rem;
    overflow: hidden;
  }

  .bonus-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.9rem 1.25rem;
    border-bottom: 1px solid #d8c8f0;
  }

  .bonus-star {
    font-size: 1.1rem;
  }

  .bonus-label {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: var(--purple);
  }

  .bonus-phrase-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.15rem;
    font-weight: 700;
    font-style: italic;
    color: var(--purple);
    padding: 0.85rem 1.25rem 0.4rem;
  }

  .bonus-sentences {
    list-style: none;
    padding: 0 0 0.75rem;
  }

  .bonus-sentences li {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    font-size: 0.95rem;
    line-height: 1.6;
    border-bottom: 1px solid #d8c8f0;
  }

  .bonus-sentences li:last-child { border-bottom: none; }

  /* ── FOOTER ──────────────────────────────────────────── */
  footer {
    text-align: center;
    padding: 2rem 1rem;
    font-size: 0.8rem;
    color: var(--text-soft);
    border-top: 1px solid var(--border);
  }

  /* ── RESPONSIVE ──────────────────────────────────────── */
  @media (max-width: 480px) {
    header { padding: 1.5rem 1rem 1.25rem; }
    main   { padding: 1.5rem 0.75rem 3rem; }
    .phrase-title { font-size: 1.1rem; }
    .sentence-list li { font-size: 0.9rem; }
  }

  .study-btn-wrap {
  text-align: center;
  margin: 1rem 0 0.5rem;
}

#study-mode-btn {
  background: var(--purple);
  color: #fff;
  border: none;
  border-radius: 24px;
  padding: 0.65rem 1.5rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

#study-mode-btn:hover {
  background: var(--purple-mid);
}

#study-mode-btn:active {
  transform: scale(0.97);
}

#study-mode-btn.active {
  background: var(--text-mid);
}
