   :root {
      --bg: #faf7f2;
      --surface: #ffffff;
      --border: #e8e0d4;
      --accent: #b05e3a;
      --accent-light: #f5ece6;
      --text: #1c1814;
      --text-muted: #7a6e63;
      --text-dim: #b0a89e;
      --green: #4a7c59;
      --green-bg: #eef5f1;
    }

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

    body {
      font-family: 'DM Sans', sans-serif;
      font-weight: 300;
      background: var(--bg);
      color: var(--text);
      min-height: 100vh;
      line-height: 1.6;
    }

    /* ── Header ── */
    header {
      border-bottom: 1px solid var(--border);
      background: var(--surface);
      padding: 0 40px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      height: 64px;
      position: sticky;
      top: 0;
      z-index: 10;
    }

    .logo {
      font-family: 'Lora', serif;
      font-size: 20px;
      color: var(--text);
      text-decoration: none;
      letter-spacing: -0.3px;
    }

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

    nav a {
      font-size: 13px;
      color: var(--text-muted);
      text-decoration: none;
      margin-left: 28px;
      font-weight: 400;
      transition: color 0.15s;
    }

    nav a:hover, nav a.active { color: var(--text); }
    nav a.active { font-weight: 500; }

    /* ── Hero ── */
    .hero {
      padding: 60px 40px 48px;
      max-width: 900px;
      margin: 0 auto;
    }

    .hero-label {
      font-size: 11px;
      font-weight: 500;
      text-transform: uppercase;
      letter-spacing: 2.5px;
      color: var(--accent);
      margin-bottom: 14px;
    }

    .hero h1 {
      font-family: 'Lora', serif;
      font-size: 42px;
      line-height: 1.15;
      letter-spacing: -0.5px;
      color: var(--text);
      margin-bottom: 14px;
    }

    .hero p {
      font-size: 16px;
      color: var(--text-muted);
      max-width: 480px;
    }

    /* ── Main content ── */
    .content {
      max-width: 900px;
      margin: 0 auto;
      padding: 0 40px 80px;
    }

    /* ── Loading / empty ── */
    .state-msg {
      text-align: center;
      padding: 80px 20px;
      color: var(--text-muted);
      font-size: 15px;
    }

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

    .spinner {
      width: 28px;
      height: 28px;
      border: 2px solid var(--border);
      border-top-color: var(--accent);
      border-radius: 50%;
      animation: spin 0.7s linear infinite;
      margin: 0 auto 16px;
    }

    @keyframes spin { to { transform: rotate(360deg); } }

    /* ── Month group ── */
    .month-group {
      margin-bottom: 48px;
    }

    .month-label {
      font-size: 11px;
      font-weight: 500;
      text-transform: uppercase;
      letter-spacing: 2px;
      color: var(--text-dim);
      padding-bottom: 12px;
      border-bottom: 1px solid var(--border);
      margin-bottom: 20px;
    }

    /* ── Class card ── */
    .class-card {
      display: grid;
      grid-template-columns: 72px 1fr auto;
      gap: 0 24px;
      align-items: start;
      padding: 20px 0;
      border-bottom: 1px solid var(--border);
      opacity: 0;
      transform: translateY(8px);
      transition: opacity 0.3s ease, transform 0.3s ease;
    }

    .class-card.visible {
      opacity: 1;
      transform: translateY(0);
    }

    /* Date column */
    .class-date {
      text-align: center;
      padding-top: 2px;
    }

    .class-date .day {
      font-family: 'Lora', serif;
      font-size: 28px;
      line-height: 1;
      color: var(--text);
      letter-spacing: -0.5px;
    }

    .class-date .weekday {
      font-size: 10px;
      font-weight: 500;
      text-transform: uppercase;
      letter-spacing: 1.5px;
      color: var(--text-dim);
      margin-top: 3px;
    }

    /* Info column */
    .class-info {}

    .class-title {
      font-family: 'Lora', serif;
      font-size: 18px;
      color: var(--text);
      margin-bottom: 6px;
      line-height: 1.3;
    }

    .class-meta {
      display: flex;
      flex-wrap: wrap;
      gap: 6px 16px;
      margin-bottom: 8px;
    }

    .class-meta span {
      font-size: 12.5px;
      color: var(--text-muted);
      display: flex;
      align-items: center;
      gap: 5px;
    }

    .class-meta .dot {
      width: 3px;
      height: 3px;
      background: var(--text-dim);
      border-radius: 50%;
      display: inline-block;
    }

    .class-desc {
      font-size: 13.5px;
      color: var(--text-muted);
      line-height: 1.5;
      max-width: 520px;
    }

    .teacher-tag {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      font-size: 12px;
      font-weight: 400;
      color: var(--accent);
      margin-top: 8px;
    }

    .teacher-tag::before {
      content: '';
      width: 16px;
      height: 16px;
      border-radius: 50%;
      background: var(--accent-light);
      border: 1px solid var(--accent);
      opacity: 0.6;
      display: block;
    }

    /* Action column */
    .class-action {
      padding-top: 2px;
    }

    .btn-register {
      display: inline-block;
      padding: 8px 18px;
      background: var(--accent);
      color: white;
      font-size: 13px;
      font-weight: 500;
      font-family: 'DM Sans', sans-serif;
      border: none;
      border-radius: 6px;
      cursor: pointer;
      text-decoration: none;
      transition: background 0.15s, transform 0.1s;
      white-space: nowrap;
    }

    .btn-register:hover {
      background: #96502f;
      transform: translateY(-1px);
    }

    .spots-left {
      font-size: 11px;
      color: var(--green);
      text-align: center;
      margin-top: 6px;
      font-weight: 500;
    }

    /* ── Registration modal ── */
    .modal-backdrop {
      position: fixed;
      inset: 0;
      background: rgba(28, 24, 20, 0.45);
      z-index: 100;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 20px;
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.2s;
    }

    .modal-backdrop.open {
      opacity: 1;
      pointer-events: all;
    }

    .modal {
      background: var(--surface);
      border-radius: 14px;
      padding: 36px;
      width: 100%;
      max-width: 440px;
      box-shadow: 0 20px 60px rgba(0,0,0,0.15);
      transform: translateY(12px);
      transition: transform 0.2s;
    }

    .modal-backdrop.open .modal {
      transform: translateY(0);
    }

    .modal h2 {
      font-family: 'Lora', serif;
      font-size: 22px;
      margin-bottom: 6px;
    }

    .modal-class-name {
      font-size: 13px;
      color: var(--text-muted);
      margin-bottom: 24px;
    }

    .field {
      margin-bottom: 16px;
    }

    .field label {
      display: block;
      font-size: 12px;
      font-weight: 500;
      text-transform: uppercase;
      letter-spacing: 1px;
      color: var(--text-muted);
      margin-bottom: 6px;
    }

    .field input {
      width: 100%;
      padding: 10px 14px;
      border: 1px solid var(--border);
      border-radius: 8px;
      font-family: 'DM Sans', sans-serif;
      font-size: 14px;
      color: var(--text);
      background: var(--bg);
      outline: none;
      transition: border-color 0.15s;
    }

    .field input:focus {
      border-color: var(--accent);
    }

    .modal-actions {
      display: flex;
      gap: 10px;
      margin-top: 24px;
    }

    .btn-cancel {
      flex: 1;
      padding: 10px;
      background: transparent;
      border: 1px solid var(--border);
      border-radius: 8px;
      font-family: 'DM Sans', sans-serif;
      font-size: 14px;
      color: var(--text-muted);
      cursor: pointer;
      transition: border-color 0.15s;
    }

    .btn-cancel:hover { border-color: var(--text-muted); }

    .btn-submit {
      flex: 2;
      padding: 10px;
      background: var(--accent);
      border: none;
      border-radius: 8px;
      font-family: 'DM Sans', sans-serif;
      font-size: 14px;
      font-weight: 500;
      color: white;
      cursor: pointer;
      transition: background 0.15s;
    }

    .btn-submit:hover { background: #96502f; }
    .btn-submit:disabled { opacity: 0.6; cursor: not-allowed; }

    .modal-feedback {
      margin-top: 14px;
      font-size: 13px;
      text-align: center;
      min-height: 20px;
    }

    .modal-feedback.success { color: var(--green); }
    .modal-feedback.error { color: var(--accent); }

    /* ── Responsive ── */
    @media (max-width: 600px) {
      header { padding: 0 20px; }
      .hero { padding: 40px 20px 32px; }
      .hero h1 { font-size: 30px; }
      .content { padding: 0 20px 60px; }
      .class-card { grid-template-columns: 56px 1fr; }
      .class-action { grid-column: 2; margin-top: 12px; }
      .modal { padding: 24px; }
    }

    .nav-auth {
      font-size: 14px;
      color: var(--text-muted);
      text-decoration: none;
      margin-left: 24px;
      font-weight: 500;
      color: var(--accent);
    }
    .nav-auth:hover { opacity: 0.8; }

    /* ── Search & tag filter ── */
    .filter-bar { margin-bottom: 28px; }
    .filter-bar input[type="search"] {
      width: 100%;
      border: 1px solid var(--border);
      background: var(--surface);
      padding: 12px 16px;
      font-family: inherit;
      font-size: 14.5px;
      color: var(--text);
      outline: none;
    }
    .filter-bar input[type="search"]:focus { border-color: var(--accent); }
    .tag-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
    .tag-chip {
      border: 1px solid var(--border);
      background: var(--surface);
      color: var(--text-muted);
      font-family: inherit;
      font-size: 12.5px;
      padding: 5px 12px;
      cursor: pointer;
      transition: all 0.15s;
    }
    .tag-chip:hover { border-color: var(--accent); color: var(--accent); }
    .tag-chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }
    .class-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
    .class-tag { font-size: 11.5px; color: var(--text-dim); border: 1px solid var(--border); padding: 2px 8px; }

    /* ── Footer ── */
    footer {
      border-top: 1px solid var(--border);
      background: var(--surface);
      padding: 28px 40px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      flex-wrap: wrap;
      gap: 12px;
    }
    .footer-left { font-size: 13px; color: var(--text-dim); line-height: 1.6; }
    .footer-left a { color: var(--text-dim); text-decoration: none; }
    .footer-left a:hover { color: var(--text-muted); }
    .footer-right { display: flex; gap: 20px; }
    .footer-right a { font-size: 13px; color: var(--text-dim); text-decoration: none; transition: color 0.15s; }
    .footer-right a:hover { color: var(--text-muted); }
    @media (max-width: 600px) { footer { padding: 24px 20px; flex-direction: column; align-items: flex-start; } }