:root {
  --bg: #060a1f;
  --bg-glow-1: rgba(76, 90, 255, 0.22);
  --bg-glow-2: rgba(162, 75, 255, 0.16);
  --surface: rgba(17, 24, 64, 0.72);
  --surface-2: rgba(25, 34, 84, 0.6);
  --border: rgba(118, 136, 255, 0.2);
  --border-strong: rgba(118, 136, 255, 0.38);
  --text: #e8ebff;
  --muted: #8f98c8;
  --accent: #5b5bff;
  --accent-2: #8b5cf6;
  --cyan: #4cc3ff;
  --grad: linear-gradient(90deg, #3d6bff 0%, #7b4dff 100%);
  --good: #3ddc84;
  --bad: #ff5a6e;
  --very-weak: #ff4d5e;
  --weak: #ff8a3d;
  --fair: #f5c542;
  --strong: #3ddc84;
  --very-strong: #19c37d;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  --radius: 16px;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f3f5ff;
  --bg-glow-1: rgba(91, 91, 255, 0.12);
  --bg-glow-2: rgba(162, 75, 255, 0.1);
  --surface: rgba(255, 255, 255, 0.9);
  --surface-2: #eef1ff;
  --border: rgba(80, 90, 200, 0.16);
  --border-strong: rgba(80, 90, 200, 0.32);
  --text: #141a3a;
  --muted: #5d6590;
  --shadow: 0 16px 40px rgba(40, 50, 140, 0.12);
  color-scheme: light;
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  min-height: 100vh;
  background:
    radial-gradient(900px 600px at 85% 10%, var(--bg-glow-2), transparent 60%),
    radial-gradient(800px 600px at 15% 90%, var(--bg-glow-1), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

svg { width: 20px; height: 20px; flex-shrink: 0; }
h1, h2, h3 { margin: 0; letter-spacing: -0.01em; }
h2 { font-size: 1.35rem; font-weight: 700; }
h3 { font-size: 0.95rem; font-weight: 600; }
em { font-style: normal; color: var(--accent-2); }
.muted { color: var(--muted); margin: 6px 0 0; font-size: 0.92rem; }
.small { font-size: 0.8rem; }
.hidden { display: none !important; }

/* ---------- Layout ---------- */
.app { display: flex; min-height: 100vh; }

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  width: 240px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 24px 16px;
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  border-right: 1px solid var(--border);
  backdrop-filter: blur(14px);
  z-index: 30;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.05rem;
  padding: 0 8px;
}
.brand-icon { width: 30px; height: 30px; color: var(--cyan); }

.nav { display: flex; flex-direction: column; gap: 6px; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 10px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item.active { background: var(--grad); color: #fff; box-shadow: 0 6px 20px rgba(91, 91, 255, 0.35); }

.sidebar-badge {
  margin-top: auto;
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.78rem;
}
.sidebar-badge svg { width: 26px; height: 26px; color: var(--cyan); }

.topbar { display: none; }
.scrim { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.5); z-index: 25; }

.content {
  position: relative;
  flex: 1;
  min-width: 0;
  padding: 40px 48px 56px;
}

.view { max-width: 1080px; margin: 0 auto; animation: fade 0.35s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}
.panel.narrow { max-width: 620px; margin: 24px auto 0; }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}
.icon-btn:hover { border-color: var(--border-strong); }
.theme-toggle { position: absolute; top: 24px; right: 28px; z-index: 5; }
.sound-toggle { position: absolute; top: 24px; right: 76px; z-index: 5; }

/* ---------- Buttons & inputs ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 12px;
  border: 1px solid transparent;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.15s, background 0.15s, border-color 0.15s;
}
.btn svg { width: 18px; height: 18px; }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 8px 24px rgba(91, 91, 255, 0.35); }
.btn-primary:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 12px 30px rgba(91, 91, 255, 0.5); }
.btn-lg { padding: 15px 28px; border-radius: 999px; font-size: 1rem; }
.btn-block { width: 100%; padding: 15px; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-outline { background: transparent; color: var(--text); border-color: var(--accent); }
.btn-outline:hover { background: rgba(91, 91, 255, 0.12); }
.btn-chip { padding: 8px 18px; font-weight: 500; background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn-chip:hover:not(:disabled) { border-color: var(--accent); }
.btn-chip.selected { border-color: var(--accent); background: rgba(91, 91, 255, 0.2); opacity: 1; }

.field { position: relative; margin: 24px 0 14px; }
.field input {
  width: 100%;
  padding: 15px 52px 15px 16px;
  font: inherit;
  font-size: 1rem;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field input::placeholder { color: var(--muted); }
.field input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(91, 91, 255, 0.2); }
.field-icon {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--muted);
  cursor: pointer;
}
.field-icon:hover { color: var(--text); }

.switch { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 26px; color: var(--muted); font-size: 0.88rem; cursor: pointer; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .track { position: relative; width: 34px; height: 20px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border-strong); transition: background 0.2s; }
.switch .track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--muted); transition: transform 0.2s, background 0.2s; }
.switch input:checked + .track { background: var(--accent); border-color: var(--accent); }
.switch input:checked + .track::after { transform: translateX(14px); background: #fff; }
.switch input:focus-visible + .track { box-shadow: 0 0 0 3px rgba(91, 91, 255, 0.35); }

.privacy-note { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 16px 0 0; color: var(--muted); font-size: 0.8rem; }
.privacy-note svg { width: 14px; height: 14px; }

.error { color: var(--bad); font-size: 0.85rem; margin: 10px 0 0; }

/* ---------- Home ---------- */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  align-items: center;
  gap: 24px;
  min-height: calc(100vh - 96px);
}
.hero-title { display: flex; align-items: center; gap: 18px; }
.hero-logo { width: 72px; height: 72px; color: var(--cyan); filter: drop-shadow(0 0 18px rgba(76, 195, 255, 0.5)); }
.hero h1 { font-size: clamp(2.2rem, 4vw, 3.2rem); font-weight: 800; }
.hero-tagline { margin: 2px 0 0; color: var(--cyan); font-weight: 500; }
.hero-lead { margin: 32px 0 18px; font-size: 1.12rem; max-width: 460px; }
.hero-rule { display: block; width: 44px; height: 2px; background: var(--grad); border-radius: 2px; }
.features { display: flex; flex-wrap: wrap; gap: 28px; padding: 0; margin: 26px 0 36px; list-style: none; }
.features li { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 0.8rem; line-height: 1.3; }
.features svg { width: 32px; height: 32px; padding: 6px; border: 1px solid var(--border-strong); border-radius: 9px; color: var(--cyan); }
.hero-privacy { display: flex; align-items: flex-start; gap: 10px; max-width: 520px; margin: 0 0 28px; padding: 12px 16px; border: 1px solid var(--border-strong); border-radius: 12px; color: var(--muted); font-size: 0.9rem; line-height: 1.45; }
.hero-privacy svg { flex: none; width: 18px; height: 18px; margin-top: 1px; color: var(--cyan); }
.hero-privacy strong { color: var(--text); }

.hero-art { position: relative; display: grid; place-items: center; aspect-ratio: 1; max-height: 520px; }
.orbit { position: absolute; border-radius: 50%; border: 2px solid transparent; }
.orbit-1 {
  inset: 12% 2%;
  border-top-color: rgba(76, 195, 255, 0.7);
  border-bottom-color: rgba(162, 75, 255, 0.7);
  transform: rotate(-20deg);
  animation: spin 14s linear infinite;
  box-shadow: 0 0 40px rgba(91, 91, 255, 0.25);
}
.orbit-2 {
  inset: 22% 10%;
  border-left-color: rgba(162, 75, 255, 0.6);
  border-right-color: rgba(76, 195, 255, 0.5);
  animation: spin 20s linear infinite reverse;
}
@keyframes spin { to { transform: rotate(340deg); } }
.hero-shield { width: 46%; filter: drop-shadow(0 0 40px rgba(91, 91, 255, 0.65)); animation: float 5s ease-in-out infinite; }
.hero-shield svg { width: 100%; height: auto; }
@keyframes float { 50% { transform: translateY(-10px); } }
.script {
  position: absolute;
  right: 0;
  bottom: 4%;
  margin: 0;
  font-family: "Caveat", cursive;
  font-size: 1.8rem;
  line-height: 1.05;
  color: var(--text);
  opacity: 0.85;
  transform: rotate(-14deg);
}

/* ---------- Stepper ---------- */
.stepper {
  display: flex;
  align-items: center;
  max-width: 640px;
  margin: 0 auto 32px;
  padding: 0 56px 0 0;
  list-style: none;
}
.stepper li { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 0.85rem; white-space: nowrap; }
.stepper li:not(:last-child) { flex: 1; }
.stepper li:not(:last-child)::after { content: ""; flex: 1; height: 1px; margin: 0 6px; background: var(--border-strong); }
.stepper li.done:not(:last-child)::after { background: var(--accent); }
.dot {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  font-size: 0.85rem;
}
.dot svg { display: none; width: 16px; height: 16px; }
.stepper li.active { color: var(--cyan); }
.stepper li.active .dot { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 0 0 5px rgba(91, 91, 255, 0.2); }
.stepper li.done .dot { background: var(--accent); border-color: transparent; color: #fff; }
.stepper li.done .dot b { display: none; }
.stepper li.done .dot svg { display: block; }

.two-col { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 24px; align-items: start; }

.side-panel h3 { margin-bottom: 16px; }
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; font-size: 0.86rem; color: var(--muted); }
.checklist li { display: flex; align-items: center; gap: 10px; transition: color 0.2s; }
.tick { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--border-strong); transition: background 0.2s; }
.tick svg { width: 12px; height: 12px; opacity: 0; color: #fff; }
.checklist li.ok { color: var(--text); }
.checklist li.ok .tick { background: var(--accent); border-color: var(--accent); }
.checklist li.ok .tick svg { opacity: 1; }

/* Questions */
.questions { list-style: none; padding: 0; margin: 22px 0 8px; display: grid; gap: 12px; counter-reset: q; }
.questions li {
  counter-increment: q;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-2);
  transition: border-color 0.2s;
}
.questions li::before {
  content: counter(q);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--grad);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
}
.questions li.missing { border-color: var(--bad); }
.question-text { flex: 1; font-size: 0.9rem; }
.yes-no { display: flex; gap: 6px; flex-shrink: 0; }
.yes-no label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.yes-no input { appearance: none; margin: 0; width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid var(--muted); }
.yes-no input:checked { border: 3px solid #fff; background: var(--accent); }
.yes-no label:has(input:checked) { background: var(--accent); border-color: var(--accent); color: #fff; }
.yes-no label:has(input:focus-visible) { box-shadow: 0 0 0 3px rgba(91, 91, 255, 0.35); }

.actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 24px; }

.help-card { text-align: center; padding: 36px 24px; }
.qmark {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: var(--grad);
  color: #fff;
  font-size: 2rem;
  font-weight: 800;
  box-shadow: 0 0 30px rgba(123, 77, 255, 0.55);
}
.help-card p { margin: 0; font-weight: 500; }

/* ---------- Results ---------- */
.result-top { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 20px; }
.score-card { display: flex; align-items: center; gap: 28px; }
.ring { position: relative; width: 150px; height: 150px; flex-shrink: 0; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 10; }
.ring-bg { stroke: var(--surface-2); }
.ring-fill { stroke: var(--strong); stroke-linecap: round; stroke-dasharray: 314.16; stroke-dashoffset: 314.16; transition: stroke-dashoffset 0.9s ease, stroke 0.3s; filter: drop-shadow(0 0 6px currentColor); }
.ring-label { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring-label strong { font-size: 2.6rem; font-weight: 800; line-height: 1; }
.ring-label span { color: var(--muted); font-size: 0.85rem; }
.score-info h2 { font-size: 1.6rem; }
.crack { display: flex; align-items: center; gap: 12px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); }
.crack svg { width: 30px; height: 30px; color: var(--cyan); }
.crack .muted { display: block; margin: 0; font-size: 0.78rem; }
.crack strong { color: var(--cyan); }

.strength-card h3 { margin-bottom: 14px; }
.gradient-bar { position: relative; height: 10px; border-radius: 999px; background: linear-gradient(90deg, var(--very-weak), var(--weak), var(--fair), var(--strong), var(--very-strong)); }
#bar-marker { position: absolute; top: 50%; left: 0; width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 4px solid var(--accent); transform: translate(-50%, -50%); transition: left 0.9s ease; box-shadow: 0 0 10px rgba(0, 0, 0, 0.4); }
.bar-scale { display: flex; justify-content: space-between; margin-top: 8px; font-size: 0.72rem; color: var(--muted); }
.stats { margin: 18px 0 0; display: grid; gap: 10px; }
.stats div { display: flex; justify-content: space-between; font-size: 0.86rem; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.stats div:last-child { border-bottom: 0; padding-bottom: 0; }
.stats dt { color: var(--muted); }
.stats dd { margin: 0; font-weight: 600; }

.result-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 20px; }
.result-grid .panel { padding: 22px; }
.result-grid h3 { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.result-grid h3 svg { width: 18px; height: 18px; }
.title-bad { color: var(--bad); }
.title-good { color: var(--good); }

.icon-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; font-size: 0.86rem; }
.icon-list li { position: relative; padding-left: 26px; }
.icon-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 11px;
}
.icon-list.bad li::before { background-color: var(--bad); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 5v9M12 19v.01' stroke='white' stroke-width='3.5' stroke-linecap='round'/%3E%3C/svg%3E"); }
.icon-list.good li::before { background-color: var(--good); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }

.ai-card {
  margin-top: 20px;
  padding: 22px;
  color: #fff;
  background: linear-gradient(135deg, #3b2bd6 0%, #6a34e8 55%, #8b5cf6 100%);
  border-color: rgba(190, 170, 255, 0.5);
  box-shadow: 0 12px 40px rgba(123, 77, 255, 0.4);
}
.ai-title { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; font-size: 1rem; }
.ai-title svg { width: 18px; height: 18px; }
#ai-advice { white-space: pre-wrap; font-size: 0.95rem; line-height: 1.65; }
#ai-advice.loading { opacity: 0.8; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.4; } }
.ai-card .ai-note { display: flex; align-items: center; gap: 8px; margin: 14px 0 0; color: inherit; opacity: 0.8; }
.ai-card .ai-note svg { width: 16px; height: 16px; flex-shrink: 0; }

.title-accent { color: var(--cyan); }
.improve-card { margin-top: 20px; padding: 22px; display: grid; gap: 14px; }
.improve-head h3 { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.improve-head h3 svg { width: 18px; height: 18px; }
.improve-head p { margin: 0; }
.improve-steps { list-style: none; counter-reset: step; padding: 0; margin: 0; display: grid; gap: 8px; }
.improve-steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-2);
  font-size: 0.88rem;
}
.improve-steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
}
.improve-steps .step-score { font-weight: 700; font-variant-numeric: tabular-nums; }
.improve-steps .gain { min-width: 44px; text-align: right; color: var(--good); font-size: 0.8rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.replace-note { display: flex; align-items: flex-start; gap: 10px; margin: 0; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--bad); color: var(--text); font-size: 0.88rem; }
.replace-note svg { color: var(--bad); width: 18px; height: 18px; margin-top: 1px; }
.improve-card .btn { justify-self: start; }

.result-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-top: 24px; }
.feedback { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.feedback .muted { margin: 0; }
.feedback-buttons { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Generator / About ---------- */
.range-row { display: grid; gap: 8px; margin: 8px 0 18px; font-size: 0.9rem; }
.range-row span { display: flex; justify-content: space-between; color: var(--muted); }
.range-row strong { color: var(--text); }
input[type="range"] { width: 100%; accent-color: var(--accent); }
.gen-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.segmented { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0 14px; }
.segmented .btn-chip:not(.selected) { opacity: 0.75; }
.gen-note { margin: 14px 0 0; }
.gen-note a { color: var(--cyan); }
.check { display: flex; align-items: center; gap: 8px; font-size: 0.88rem; cursor: pointer; }
.check input { accent-color: var(--accent); width: 16px; height: 16px; }
#gen-output { font-family: ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: 0.02em; }
.about p { margin: 14px 0 20px; }
.about .icon-list { font-size: 0.92rem; gap: 12px; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .result-top { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .app { flex-direction: column; }
  .topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: color-mix(in srgb, var(--bg) 85%, transparent);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(14px);
  }
  .topbar .brand { padding: 0; }
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    background: var(--bg);
  }
  .sidebar.open { transform: none; }
  .sidebar .brand { display: none; }
  .content { padding: 20px 16px 40px; }
  .theme-toggle, .sound-toggle { position: static; float: right; margin: 0 0 12px 12px; }
  .stepper { clear: both; padding: 0; margin-bottom: 20px; }
  .stepper li { flex-direction: column; gap: 6px; font-size: 0.72rem; position: relative; }
  .stepper li:not(:last-child)::after { position: absolute; top: 15px; left: calc(50% + 22px); right: calc(-50% + 22px); margin: 0; }
  .stepper li, .stepper li:not(:last-child) { flex: 1; }
  .two-col { grid-template-columns: 1fr; }
  .panel { padding: 20px; }
  .hero { grid-template-columns: 1fr; min-height: 0; clear: both; }
  .hero-art { order: -1; max-width: 340px; width: 100%; margin: 0 auto; }
  .hero-lead { margin-top: 20px; }
  .features { gap: 16px; }
  .score-card { flex-direction: column; text-align: center; }
  .crack { justify-content: center; text-align: left; }
  .result-grid { grid-template-columns: 1fr; }
  .questions li { flex-wrap: wrap; }
  .yes-no { margin-left: 40px; }
  .gen-options { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
