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

:root {
  --bg: #0d0e10;
  --bg2: #15171b;
  --bg3: #1c1f25;
  --bg4: #22262e;
  --accent: #c8a96e;
  --accent2: #e8c98e;
  --green: #5ec48a;
  --red: #e05c6e;
  --text: #f0ead8;
  --muted: #6a6050;
  --muted2: #8a7a60;
  --border: rgba(200,169,110,0.14);
  --border2: rgba(200,169,110,0.28);
  --sidebar-w: 260px;
  --radius: 10px;
}

body.white-theme {
  --bg: #f8f7f4;
  --bg2: #ffffff;
  --bg3: #efede8;
  --bg4: #e1ddd5;
  --accent: #5d5d5d;
  --accent2: #2e2e2e;
  --green: #2f7f53;
  --red: #9f2c3f;
  --text: #121314;
  --muted: #646464;
  --muted2: #8c8c8c;
  --border: rgba(0,0,0,0.08);
  --border2: rgba(0,0,0,0.16);
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Mono', monospace;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ══════════════════════════════════════
   AUTH MODAL
══════════════════════════════════════ */
.auth-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.72);
  backdrop-filter: blur(8px);
  z-index: 300;
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
  animation: authFadeIn 0.2s ease;
}
.auth-overlay.hidden { display: none; }

@keyframes authFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.auth-modal {
  background: var(--bg2);
  border: 0.5px solid var(--border2);
  border-radius: 20px;
  padding: 2rem 2rem 1.5rem;
  width: 100%; max-width: 380px;
  box-shadow: 0 32px 80px rgba(0,0,0,0.6);
  animation: authSlideUp 0.28s cubic-bezier(.4,0,.2,1);
}
@keyframes authSlideUp {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.auth-brand {
  display: flex; align-items: center; gap: 9px;
  margin-bottom: 1.6rem;
}
.auth-brand-icon {
  font-size: 1.1rem; color: var(--accent);
  background: rgba(200,169,110,0.1);
  border: 0.5px solid var(--border);
  border-radius: 8px; width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
}
.auth-brand-name {
  font-family: 'Playfair Display', serif;
  font-size: 0.95rem; color: var(--accent2); font-weight: 700;
}

.auth-panel { animation: panelFade 0.2s ease; }
.auth-panel.hidden { display: none; }
@keyframes panelFade {
  from { opacity: 0; transform: translateX(8px); }
  to   { opacity: 1; transform: translateX(0); }
}

.auth-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem; color: var(--text); font-weight: 700;
  margin-bottom: 0.25rem;
}
.auth-sub {
  font-size: 0.68rem; color: var(--muted2); margin-bottom: 1.4rem;
  line-height: 1.6; letter-spacing: 0.02em;
}

.auth-google-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 0.62rem;
  background: var(--bg3); border: 0.5px solid var(--border2);
  border-radius: 10px; color: var(--text);
  font-family: 'DM Mono', monospace; font-size: 0.72rem;
  letter-spacing: 0.05em; cursor: pointer; transition: all 0.18s;
}
.auth-google-btn:hover { background: var(--bg4); border-color: var(--accent); }

.auth-divider {
  display: flex; align-items: center; gap: 10px;
  margin: 1rem 0; color: var(--muted); font-size: 0.62rem;
}
.auth-divider::before, .auth-divider::after {
  content: ''; flex: 1; height: 0.5px; background: var(--border);
}

.auth-field { margin-bottom: 0.85rem; }
.auth-label {
  display: block; font-size: 0.6rem; color: var(--muted2);
  letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 5px;
}
.auth-input {
  width: 100%; padding: 0.6rem 0.75rem;
  background: var(--bg3); border: 0.5px solid var(--border);
  border-radius: 8px; color: var(--text);
  font-family: 'DM Mono', monospace; font-size: 0.75rem;
  outline: none; transition: border-color 0.18s;
}
.auth-input:focus { border-color: var(--accent); }
.auth-input::placeholder { color: var(--muted); }

.auth-error {
  font-size: 0.65rem; color: var(--red);
  min-height: 1rem; margin-bottom: 0.5rem;
  letter-spacing: 0.02em;
}
.auth-success {
  font-size: 0.65rem; color: var(--green);
  min-height: 1rem; margin-bottom: 0.5rem;
  letter-spacing: 0.02em;
}

.auth-submit {
  width: 100%; padding: 0.68rem;
  background: var(--accent); color: var(--bg);
  border: none; border-radius: 10px;
  font-family: 'DM Mono', monospace; font-size: 0.75rem;
  font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase;
  cursor: pointer; transition: all 0.18s; margin-bottom: 0.9rem;
}
.auth-submit:hover { background: var(--accent2); }
.auth-submit:disabled { opacity: 0.5; cursor: not-allowed; }

.auth-switch {
  text-align: center; font-size: 0.65rem; color: var(--muted2);
  margin-bottom: 0.4rem;
}
.auth-switch button {
  background: none; border: none; color: var(--accent);
  font-family: 'DM Mono', monospace; font-size: 0.65rem;
  cursor: pointer; padding: 0; transition: color 0.15s;
}
.auth-switch button:hover { color: var(--accent2); }

.auth-guest-btn {
  display: block; width: 100%; margin-top: 0.85rem;
  padding: 0.5rem;
  background: transparent; border: 0.5px solid var(--border);
  border-radius: 8px; color: var(--muted);
  font-family: 'DM Mono', monospace; font-size: 0.63rem;
  letter-spacing: 0.06em; cursor: pointer; transition: all 0.18s;
}
.auth-guest-btn:hover { border-color: var(--muted2); color: var(--muted2); }

/* ══════════════════════════════════════
   TOPBAR ACCOUNT BUTTON & DROPDOWN
══════════════════════════════════════ */
.topbar-account-btn {
  margin-left: auto;
  background: none; border: none;
  border-radius: 50%; padding: 0;
  cursor: pointer; transition: border-color 0.18s;
  min-width: 34px; height: 34px;
  padding: 0 0.5rem;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  outline: none;
}
.topbar-account-btn:focus,
.topbar-account-btn:focus-visible {
  outline: none;
  box-shadow: none;
}
.topbar-account-btn:hover { border-color: transparent; }

.topbar-account-btn:hover .topbar-avatar {
  border-color: var(--accent);
}

.topbar-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--bg3);
  border: 0.5px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem; color: var(--accent2); font-weight: 500;
  overflow: hidden;
}
.topbar-avatar img { width: 100%; height: 100%; object-fit: cover; }

.topbar-streak {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  margin-left: 0.55rem;
  padding: 0.18rem 0.45rem;
  border-radius: 999px;
  background: rgba(237, 122, 49, 0.12);
  color: var(--accent2);
  font-size: 0.72rem;
  font-weight: 700;
}

.topbar-streak-icon {
  width: 0.85rem;
  height: 0.85rem;
  fill: var(--accent2);
}

.account-dropdown {
  position: fixed; top: 58px; right: 1rem;
  background: var(--bg2); border: 0.5px solid var(--border2);
  border-radius: 14px; padding: 0.85rem;
  min-width: 220px; z-index: 200;
  box-shadow: 0 16px 48px rgba(0,0,0,0.4);
  animation: ddSlide 0.18s cubic-bezier(.4,0,.2,1);
  display: none;
}
.account-dropdown.open { display: block; }

@keyframes ddSlide {
  from { opacity: 0; transform: translateY(-8px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.account-avatar-info {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 0.75rem;
}
.account-avatar-lg {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--bg3); border: 0.5px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem; color: var(--accent2); font-weight: 500;
  overflow: hidden; flex-shrink: 0;
}
.account-avatar-lg img { width: 100%; height: 100%; object-fit: cover; }
.account-name { font-size: 0.78rem; color: var(--text); font-weight: 500; }
.account-email { font-size: 0.6rem; color: var(--muted2); margin-top: 1px; }

.account-dd-divider { height: 0.5px; background: var(--border); margin: 0.5rem 0; }

.account-dd-item {
  display: flex; align-items: center; gap: 9px;
  width: 100%; padding: 0.48rem 0.55rem;
  background: none; border: none; border-radius: 7px;
  color: var(--muted2); font-family: 'DM Mono', monospace; font-size: 0.68rem;
  cursor: pointer; transition: all 0.15s; text-align: left;
}
.account-dd-item:hover { background: var(--bg3); color: var(--text); }
.account-dd-signout { color: var(--red); }
.account-dd-signout:hover { background: rgba(224,92,110,0.08); color: var(--red); }

/* ══════════════════════════════════════
   SIDEBAR ACCOUNT SECTION
══════════════════════════════════════ */
.sidebar-account-card {
  display: flex; align-items: center; gap: 10px;
  padding: 0.65rem 0.75rem;
  background: var(--bg3); border: 0.5px solid var(--border);
  border-radius: 10px; margin-bottom: 0.5rem;
}
.sidebar-account-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--bg4); border: 0.5px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.72rem; color: var(--accent2); flex-shrink: 0;
  overflow: hidden;
}
.sidebar-account-avatar img { width: 100%; height: 100%; object-fit: cover; }
.sidebar-account-name { font-size: 0.72rem; color: var(--text); font-weight: 500; }
.sidebar-account-status { font-size: 0.58rem; color: var(--muted); margin-top: 1px; }

.auth-nav-btn { color: var(--accent) !important; }

/* ══════════════════════════════════════
   PROFILE PAGE
══════════════════════════════════════ */
.profile-hero {
  display: flex; align-items: center; gap: 1.25rem;
  padding: 1.5rem 0 1.5rem;
  border-bottom: 0.5px solid var(--border);
  margin-bottom: 1.25rem;
}
.profile-avatar-wrapper {
  position: relative; flex-shrink: 0;
  width: 72px; height: 72px;
}
.profile-avatar-lg {
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--bg3); border: 0.5px solid var(--border2);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem; color: var(--accent2);
  overflow: hidden;
}
.profile-avatar-lg img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }

/* Camera / edit overlay on the profile picture */
.profile-avatar-upload-btn {
  position: absolute; bottom: 0; right: 0;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--accent); border: 2px solid var(--bg2);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background 0.18s;
  color: var(--bg);
}
.profile-avatar-upload-btn:hover { background: var(--accent2); }
.profile-avatar-upload-btn svg { pointer-events: none; }
.profile-display-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem; color: var(--text); font-weight: 700; line-height: 1.2;
}
.profile-streak-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  margin: 0.55rem 0 0;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  background: rgba(237, 122, 49, 0.1);
  color: var(--accent2);
  font-size: 0.82rem;
  font-weight: 600;
}
.profile-streak-icon {
  width: 1rem;
  height: 1rem;
  fill: var(--accent2);
}
.profile-email-text { font-size: 0.68rem; color: var(--muted2); margin-top: 3px; }
.profile-member-since { font-size: 0.6rem; color: var(--muted); margin-top: 4px; letter-spacing: 0.08em; }

.profile-graph-panel {
  background: var(--bg2);
  border: 0.5px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 1rem;
}
.profile-graph-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 0.85rem;
}
.profile-graph-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent);
  font-family: 'Playfair Display', serif;
}
.profile-graph-sub {
  font-size: 0.68rem;
  color: var(--muted2);
}
.profile-graph {
  position: relative;
  min-height: 220px;
  width: 100%;
}
.profile-graph-svg {
  width: 100%;
  height: 100%;
}
.profile-graph-grid-line {
  stroke: var(--border2);
  stroke-width: 0.5;
}
.profile-graph-label {
  fill: var(--muted2);
  font-family: 'DM Mono', monospace;
  font-size: 10px;
}
.profile-graph-value {
  fill: var(--accent2);
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  font-weight: 700;
}
.profile-graph-point {
  fill: var(--muted2);
  opacity: 0.6;
}
.profile-graph-point.active {
  fill: var(--accent2);
  opacity: 1;
}

.profile-stats-grid {
  display: grid; grid-template-columns: repeat(4,1fr); gap: 8px;
  margin-bottom: 1.25rem;
}
@media (max-width: 480px) { .profile-stats-grid { grid-template-columns: repeat(2,1fr); } }

.profile-stat {
  background: var(--bg2); border: 0.5px solid var(--border);
  border-radius: var(--radius); padding: 0.9rem 0.5rem; text-align: center;
}
.profile-stat-val {
  font-size: 1.4rem; font-weight: 500; color: var(--accent2); line-height: 1.2;
}
.profile-stat-label {
  font-size: 0.55rem; color: var(--muted); letter-spacing: 0.1em;
  text-transform: uppercase; margin-top: 3px;
}

.profile-section-title {
  font-family: 'Playfair Display', serif;
  font-size: 0.9rem; color: var(--accent); font-weight: 400;
  margin-bottom: 0.9rem;
}

.profile-edit-panel {
  margin-bottom: 1rem;
}

.profile-actions {
  display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 1rem;
}
.profile-action-btn {
  padding: 0.5rem 1.1rem;
  background: transparent; border: 0.5px solid var(--border);
  border-radius: 8px; color: var(--muted2);
  font-family: 'DM Mono', monospace; font-size: 0.67rem;
  letter-spacing: 0.07em; cursor: pointer; transition: all 0.18s;
}
.profile-action-btn:hover { border-color: var(--accent); color: var(--accent); }
.profile-action-danger { color: var(--red); border-color: rgba(224,92,110,0.3); }
.profile-action-danger:hover { border-color: var(--red); background: rgba(224,92,110,0.06); color: var(--red); }

.profile-guest-note {
  display: flex; gap: 1rem; align-items: flex-start;
  background: var(--bg2); border: 0.5px solid var(--border);
  border-radius: 14px; padding: 1.1rem;
}
.profile-guest-icon { font-size: 1.6rem; color: var(--accent); flex-shrink: 0; }
.profile-guest-text { font-size: 0.68rem; color: var(--muted2); line-height: 1.75; }
.profile-guest-text strong { color: var(--text); }

/* ══════════════════════════════════════
   SIDEBAR
══════════════════════════════════════ */
.sidebar-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.55);
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s;
  z-index: 90;
}
.sidebar-overlay.open { opacity: 1; pointer-events: all; }

.sidebar {
  position: fixed; top: 0; left: 0; bottom: 0;
  width: var(--sidebar-w);
  background: var(--bg2);
  border-right: 0.5px solid var(--border);
  transform: translateX(calc(-1 * var(--sidebar-w)));
  transition: transform 0.28s cubic-bezier(.4,0,.2,1);
  z-index: 100;
  display: flex; flex-direction: column;
  overflow-y: auto;
}
.sidebar.open { transform: translateX(0); }

.sidebar-head {
  padding: 1.5rem 1.25rem 1rem;
  border-bottom: 0.5px solid var(--border);
}
.sidebar-head h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem; color: var(--accent2); font-weight: 700;
}
.sidebar-head p {
  font-size: 0.62rem; color: var(--muted2);
  letter-spacing: 0.1em; text-transform: uppercase; margin-top: 2px;
}

.nav-section { padding: 1rem 0.75rem 0.5rem; }
.nav-section-label {
  font-size: 0.58rem; color: var(--muted);
  letter-spacing: 0.14em; text-transform: uppercase;
  padding: 0 0.5rem; margin-bottom: 0.4rem;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 0.58rem 0.75rem; border-radius: 8px;
  cursor: pointer; transition: all 0.15s;
  font-size: 0.78rem; color: var(--muted2);
  border: none; background: none; width: 100%; text-align: left;
  font-family: 'DM Mono', monospace;
}
.nav-item:hover { background: var(--bg3); color: var(--text); }
.nav-item.active {
  background: rgba(200,169,110,0.09);
  color: var(--accent2);
  border: 0.5px solid var(--border);
}
.nav-icon { font-size: 1rem; width: 20px; text-align: center; }

.sidebar-settings { padding: 0.75rem 1.25rem; border-top: 0.5px solid var(--border); }
.sb-label { font-size: 0.62rem; color: var(--muted2); letter-spacing: 0.08em; margin-bottom: 6px; }
.sb-pills { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 1rem; }

.pill-btn {
  padding: 0.26rem 0.58rem;
  font-family: 'DM Mono', monospace; font-size: 0.65rem;
  border-radius: 99px; border: 0.5px solid var(--border);
  background: transparent; color: var(--muted);
  cursor: pointer; transition: all 0.15s; white-space: nowrap;
}
.pill-btn.active { background: rgba(200,169,110,0.14); border-color: var(--accent); color: var(--accent2); }

.sidebar-footer {
  margin-top: auto;
  padding: 1rem 1.25rem;
  border-top: 0.5px solid var(--border);
  font-size: 0.63rem; color: var(--muted);
  letter-spacing: 0.05em; line-height: 1.7;
}
.sidebar-footer a {
  color: var(--muted2);
  text-decoration: none;
}
.sidebar-footer a:hover { color: var(--accent2); }

/* ══════════════════════════════════════
   TOP BAR
══════════════════════════════════════ */
.topbar {
  display: flex; align-items: center; gap: 1rem;
  padding: 0.9rem 1.5rem;
  border-bottom: 0.5px solid var(--border);
  position: sticky; top: 0; z-index: 50;
  background: var(--bg);
}
.hamburger {
  background: none; border: 0.5px solid var(--border);
  border-radius: 8px; padding: 0.42rem 0.52rem;
  cursor: pointer; color: var(--muted2);
  display: flex; flex-direction: column; gap: 4px;
  transition: all 0.15s;
}
.hamburger:hover { border-color: var(--accent); color: var(--accent); }
.hamburger span { display: block; width: 18px; height: 1.5px; background: currentColor; border-radius: 1px; }
.topbar-title { font-family: 'Playfair Display', serif; font-size: 1.05rem; color: var(--accent2); font-weight: 700; }
.topbar-mode { font-size: 0.63rem; color: var(--muted2); letter-spacing: 0.1em; text-transform: uppercase; margin-left: auto; }

/* ══════════════════════════════════════
   MAIN / STATS
══════════════════════════════════════ */
.main { max-width: 700px; margin: 0 auto; padding: 1.75rem 1.25rem 4rem; }

.stats-row { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin-bottom: 1.1rem; }
.stat-card {
  background: var(--bg2); border: 0.5px solid var(--border);
  border-radius: var(--radius); padding: 0.65rem 0.75rem; text-align: center;
}
.stat-label { font-size: 0.6rem; color: var(--muted); letter-spacing: 0.1em; text-transform: uppercase; }
.stat-value { font-size: 1.5rem; font-weight: 500; color: var(--accent2); line-height: 1.2; margin-top: 2px; }

.streak-bar { display: flex; gap: 4px; margin-bottom: 1.1rem; justify-content: center; min-height: 8px; }
.streak-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--bg3); border: 0.5px solid var(--border); transition: all 0.3s;
}
.streak-dot.hit { background: var(--green); border-color: var(--green); }
.streak-dot.miss { background: var(--red); border-color: var(--red); }

/* ══════════════════════════════════════
   MAIN PANEL
══════════════════════════════════════ */
.main-panel {
  background: var(--bg2); border: 0.5px solid var(--border);
  border-radius: 16px; padding: 1.6rem; margin-bottom: 1rem;
}

.mode-tabs {
  display: flex; gap: 4px; background: var(--bg3);
  border-radius: 8px; padding: 4px; margin-bottom: 1.4rem;
}
.mode-tab {
  flex: 1; padding: 0.4rem;
  font-family: 'DM Mono', monospace; font-size: 0.67rem;
  letter-spacing: 0.07em; text-transform: uppercase;
  background: transparent; border: none; border-radius: 6px;
  color: var(--muted); cursor: pointer; transition: all 0.18s;
}
.mode-tab.active { background: var(--bg2); color: var(--accent2); border: 0.5px solid var(--border); }

.play-area { display: flex; flex-direction: column; align-items: center; gap: 1rem; padding: 0.25rem 0; }

.answer-display {
  font-family: 'Playfair Display', serif;
  font-size: 2.2rem; color: var(--accent);
  min-height: 2.8rem; letter-spacing: 0.03em;
  text-align: center; transition: color 0.3s; line-height: 1.2;
}
.answer-display.revealed { color: var(--accent2); }

.notes-display {
  font-size: 0.72rem; color: var(--muted2);
  letter-spacing: 0.08em; min-height: 1rem; text-align: center;
}

.btn-play {
  display: flex; align-items: center; gap: 10px;
  padding: 0.68rem 1.6rem;
  background: var(--accent); color: var(--bg);
  border: none; border-radius: 8px;
  font-family: 'DM Mono', monospace; font-size: 0.77rem;
  font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase;
  cursor: pointer; transition: all 0.18s;
}
.btn-play:hover { background: var(--accent2); transform: translateY(-1px); }
.btn-play:active { transform: scale(0.98); }
.btn-play svg { width: 16px; height: 16px; }

.divider { width: 40px; height: 1px; background: var(--border); }

.answer-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 7px; width: 100%; }
@media (max-width: 500px) { .answer-grid { grid-template-columns: repeat(3,1fr); } }

.answer-btn {
  padding: 0.52rem 0.2rem;
  background: var(--bg3); border: 0.5px solid var(--border);
  border-radius: 8px; color: var(--text);
  font-family: 'DM Mono', monospace; font-size: 0.67rem;
  cursor: pointer; transition: all 0.15s; line-height: 1.3; text-align: center;
}
.answer-btn:hover:not(:disabled) { background: var(--bg4); border-color: var(--border2); color: var(--accent2); }
.answer-btn.correct { background: rgba(94,196,138,0.12); border-color: var(--green); color: var(--green); }
.answer-btn.wrong   { background: rgba(224,92,110,0.12);  border-color: var(--red);   color: var(--red); }
.answer-btn:disabled { cursor: default; }

.feedback-msg { font-size: 0.78rem; min-height: 1rem; text-align: center; letter-spacing: 0.04em; }
.feedback-msg.correct { color: var(--green); }
.feedback-msg.wrong   { color: var(--red); }

.scale-notes-tag {
  display: none;
  font-size: 0.63rem; color: var(--muted2);
  background: var(--bg3); border: 0.5px solid var(--border);
  border-radius: 4px; padding: 3px 8px; letter-spacing: 0.05em;
}

.next-btn {
  padding: 0.48rem 1.35rem;
  background: transparent; border: 0.5px solid var(--border);
  border-radius: 8px; color: var(--muted);
  font-family: 'DM Mono', monospace; font-size: 0.68rem;
  letter-spacing: 0.08em; cursor: pointer; transition: all 0.18s;
  text-transform: uppercase; display: none;
}
.next-btn.visible { display: block; color: var(--accent); border-color: var(--accent); }
.next-btn:hover { background: rgba(200,169,110,0.09); }

/* ══════════════════════════════════════
   SETTINGS PANEL
══════════════════════════════════════ */
.settings-panel {
  background: var(--bg2); border: 0.5px solid var(--border);
  border-radius: 16px; padding: 1.35rem;
}
.settings-panel h3 {
  font-family: 'Playfair Display', serif;
  font-size: 0.92rem; color: var(--accent); margin-bottom: 0.9rem; font-weight: 400;
}
.toggle-row { display: flex; flex-wrap: wrap; gap: 6px; }
.ivt {
  padding: 0.27rem 0.58rem;
  font-family: 'DM Mono', monospace; font-size: 0.64rem;
  border-radius: 6px; border: 0.5px solid var(--border);
  background: transparent; color: var(--muted);
  cursor: pointer; transition: all 0.15s;
}
.ivt.active { background: rgba(200,169,110,0.1); border-color: var(--accent); color: var(--accent); }

/* ══════════════════════════════════════
   PAGE SYSTEM
══════════════════════════════════════ */
.page { display: block; }

/* ══════════════════════════════════════
   HOME PAGE
══════════════════════════════════════ */
.home-hero {
  min-height: calc(100vh - 60px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 3rem 1.5rem 4rem;
  text-align: center;
  position: relative;
}
.home-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 50% at 50% 40%, rgba(200,169,110,0.06) 0%, transparent 70%);
  pointer-events: none;
}
.hero-eyebrow {
  font-size: 0.6rem; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 1.2rem;
  border: 0.5px solid var(--border); border-radius: 99px;
  padding: 0.3rem 0.9rem; display: inline-block;
}
.hero-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.6rem, 8vw, 4.2rem);
  font-weight: 700; line-height: 1.1;
  color: var(--text); margin-bottom: 0.4rem;
}
.hero-title em { font-style: italic; color: var(--accent); }
.hero-sub {
  font-size: 0.8rem; color: var(--muted2); line-height: 1.8;
  max-width: 400px; margin: 1.2rem auto 2.4rem;
  letter-spacing: 0.03em;
}
.hero-cta {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 0.78rem 2rem;
  background: var(--accent); color: var(--bg);
  border: none; border-radius: 10px;
  font-family: 'DM Mono', monospace; font-size: 0.8rem;
  font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase;
  cursor: pointer; transition: all 0.18s;
}
.hero-cta:hover { background: var(--accent2); transform: translateY(-2px); box-shadow: 0 8px 30px rgba(200,169,110,0.2); }

.home-features {
  display: grid; grid-template-columns: repeat(3,1fr); gap: 12px;
  max-width: 700px; margin: 3.5rem auto 0; padding: 0 1.25rem;
}
@media (max-width: 540px) { .home-features { grid-template-columns: 1fr; } }
.feature-card {
  background: var(--bg2); border: 0.5px solid var(--border);
  border-radius: 14px; padding: 1.3rem 1.1rem;
  transition: border-color 0.2s;
}
.feature-card:hover { border-color: var(--border2); }
.feature-icon { font-size: 1.5rem; margin-bottom: 0.65rem; }
.feature-title {
  font-family: 'Playfair Display', serif;
  font-size: 0.92rem; color: var(--accent2);
  margin-bottom: 0.45rem; font-weight: 700;
}
.feature-desc { font-size: 0.67rem; color: var(--muted2); line-height: 1.75; }

.home-exercises {
  max-width: 700px; margin: 2.5rem auto 0; padding: 0 1.25rem 4rem;
}
.section-label {
  font-size: 0.6rem; color: var(--muted); letter-spacing: 0.16em;
  text-transform: uppercase; margin-bottom: 0.9rem;
  padding-bottom: 0.5rem; border-bottom: 0.5px solid var(--border);
}
.exercise-cards { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; }
@media (max-width: 500px) { .exercise-cards { grid-template-columns: 1fr; } }
.ex-card {
  background: var(--bg2); border: 0.5px solid var(--border);
  border-radius: 12px; padding: 1.1rem;
  cursor: pointer; transition: all 0.18s; text-align: left;
  font-family: 'DM Mono', monospace;
}
.ex-card:hover { background: var(--bg3); border-color: var(--accent); transform: translateY(-2px); }
.ex-card-icon { font-size: 1.3rem; margin-bottom: 0.55rem; }
.ex-card-name { font-size: 0.82rem; color: var(--accent2); margin-bottom: 0.3rem; font-weight: 500; }
.ex-card-count { font-size: 0.62rem; color: var(--muted); }

/* ══════════════════════════════════════
   ABOUT PAGE
══════════════════════════════════════ */
.about-wrap { max-width: 640px; margin: 0 auto; padding: 2.5rem 1.25rem 5rem; }
.about-hero-text {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.9rem, 6vw, 2.8rem);
  font-weight: 700; line-height: 1.2; color: var(--text); margin-bottom: 0.5rem;
}
.about-hero-text em { color: var(--accent); font-style: italic; }
.about-intro { font-size: 0.78rem; color: var(--muted2); line-height: 1.85; margin-bottom: 2.5rem; max-width: 520px; }
.about-divider { height: 0.5px; background: var(--border); margin: 2rem 0; }
.about-section-title {
  font-family: 'Playfair Display', serif;
  font-size: 1rem; color: var(--accent); font-weight: 400; margin-bottom: 0.9rem;
}
.about-body { font-size: 0.74rem; color: var(--muted2); line-height: 1.9; margin-bottom: 1.1rem; }
.about-pillars { display: grid; grid-template-columns: repeat(2,1fr); gap: 10px; margin: 1.5rem 0; }
@media (max-width: 480px) { .about-pillars { grid-template-columns: 1fr; } }
.pillar { background: var(--bg2); border: 0.5px solid var(--border); border-radius: 12px; padding: 1.1rem; }
.pillar-num { font-size: 0.6rem; color: var(--accent); letter-spacing: 0.12em; margin-bottom: 0.5rem; }
.pillar-title { font-family: 'Playfair Display', serif; font-size: 0.88rem; color: var(--text); margin-bottom: 0.35rem; }
.pillar-text { font-size: 0.66rem; color: var(--muted2); line-height: 1.7; }
.about-signature {
  display: block;
  margin: 2rem 0 0;
  text-align: right;
  font-family: 'Brush Script MT', cursive;
  font-size: 1.35rem;
  color: var(--accent);
  letter-spacing: 0.03em;
  line-height: 1.1;
  padding-right: 2px;
  opacity: 0.95;
}
.about-start-btn {
  margin-top: 2rem; display: inline-flex; align-items: center; gap: 10px;
  padding: 0.72rem 1.8rem; background: transparent; border: 0.5px solid var(--accent);
  border-radius: 10px; color: var(--accent); font-family: 'DM Mono', monospace;
  font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; cursor: pointer; transition: all 0.18s;
}
.about-start-btn:hover { background: rgba(200,169,110,0.09); transform: translateY(-1px); }

.content-section {
  max-width: 760px;
  margin: 0 auto;
  padding: 3rem 1.25rem 5rem;
}
.content-section.narrow { max-width: 680px; }
.content-eyebrow {
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.8rem;
}
.content-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 6vw, 3rem);
  line-height: 1.12;
  color: var(--text);
  margin-bottom: 1rem;
}
.content-lede {
  color: var(--muted2);
  font-size: 0.82rem;
  line-height: 1.9;
  max-width: 620px;
  margin-bottom: 2rem;
}
.content-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 1.4rem 0 2rem;
}
@media (max-width: 700px) { .content-grid { grid-template-columns: 1fr; } }
.content-card {
  background: var(--bg2);
  border: 0.5px solid var(--border);
  border-radius: 12px;
  padding: 1.2rem;
}
.content-card h2,
.content-block h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  color: var(--accent2);
  margin-bottom: 0.65rem;
}
.content-card p,
.content-block p,
.content-list li {
  color: var(--muted2);
  font-size: 0.72rem;
  line-height: 1.85;
}
.content-block {
  border-top: 0.5px solid var(--border);
  padding-top: 1.4rem;
  margin-top: 1.4rem;
}
.content-list {
  margin-left: 1.2rem;
  margin-bottom: 1rem;
}
.inline-link {
  color: var(--accent2);
  text-decoration: none;
  border-bottom: 0.5px solid var(--border2);
}
.inline-link:hover { color: var(--accent); }
.site-footer {
  border-top: 0.5px solid var(--border);
  color: var(--muted);
  font-size: 0.63rem;
  line-height: 1.8;
  margin-top: 2rem;
  padding-top: 1rem;
}
.site-footer a {
  color: var(--muted2);
  text-decoration: none;
  margin-right: 0.9rem;
}
.site-footer a:hover { color: var(--accent2); }

/* ══════════════════════════════════════
   DANGER ZONE
══════════════════════════════════════ */
.danger-zone {
  border-color: rgba(224,92,110,0.25) !important;
  margin-top: 1rem;
}
.danger-zone-label {
  font-size: 0.58rem; color: var(--red);
  letter-spacing: 0.14em; text-transform: uppercase;
  margin-bottom: 0.6rem;
}
.danger-zone-desc {
  font-size: 0.68rem; color: var(--muted2); line-height: 1.7;
  margin-bottom: 1rem;
}
.danger-zone-btn {
  padding: 0.5rem 1.2rem;
  background: transparent; border: 0.5px solid var(--red);
  border-radius: 8px; color: var(--red);
  font-family: 'DM Mono', monospace; font-size: 0.67rem;
  letter-spacing: 0.07em; cursor: pointer; transition: all 0.18s;
}
.danger-zone-btn:hover { background: rgba(224,92,110,0.1); }
