/* Deutsch A1 — Luxe Learning UI (system fonts — works offline / file://) */

:root {
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  --font-display: Georgia, "Times New Roman", serif;
  --touch-min: 48px;
  --max-width: 58rem;
  --radius: 20px;
  --radius-sm: 12px;
  --radius-lg: 28px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --bg: #f8f7ff;
  --text: #0f0d1a;
  --muted: #6b6680;
  --card: rgba(255, 255, 255, 0.72);
  --card-solid: #ffffff;
  --border: rgba(255, 255, 255, 0.6);
  --border-subtle: rgba(15, 13, 26, 0.06);

  --violet: #6d28d9;
  --indigo: #4f46e5;
  --pink: #db2777;
  --cyan: #0891b2;
  --amber: #d97706;

  --gradient: linear-gradient(125deg, #4f46e5 0%, #7c3aed 38%, #c026d3 68%, #f472b6 100%);
  --gradient-hero: linear-gradient(145deg, #312e81 0%, #5b21b6 35%, #9d174d 70%, #ea580c 100%);
  --gradient-es: linear-gradient(135deg, #b91c1c, #ea580c);
  --gradient-en: linear-gradient(135deg, #0369a1, #6366f1);
  --gradient-audio: linear-gradient(135deg, #059669, #0891b2);

  --shadow-sm: 0 2px 8px rgba(49, 46, 129, 0.06);
  --shadow: 0 8px 32px rgba(49, 46, 129, 0.1);
  --shadow-lg: 0 24px 60px rgba(49, 46, 129, 0.16);
  --glow: 0 0 60px rgba(124, 58, 237, 0.25);
  --code-bg: rgba(79, 70, 229, 0.06);
  --header-bg: rgba(255, 255, 255, 0.65);
  --lr-bg: linear-gradient(160deg, #1e1b4b 0%, #4c1d95 50%, #831843 100%);
}

/* Always light UI — OS dark mode made text/fields unreadable on Windows */
html {
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: light;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  min-height: 100vh;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(124, 58, 237, 0.35), transparent),
    radial-gradient(ellipse 60% 40% at 100% 50%, rgba(219, 39, 119, 0.15), transparent),
    radial-gradient(ellipse 50% 30% at 0% 80%, rgba(79, 70, 229, 0.2), transparent),
    var(--bg);
  overflow-x: hidden;
}

/* Centered page column — everything lives here */
.app-shell {
  width: 100%;
  max-width: 40rem;
  margin: 0 auto;
  padding: 0 1.15rem 4rem;
  box-sizing: border-box;
}

.page-hub .app-shell {
  max-width: 52rem;
}

.page-teacher .app-shell,
.page-student-es .app-shell,
.page-student-en .app-shell {
  max-width: 42rem;
}

/* Animated ambient background */
body::before,
body::after {
  content: "";
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.55;
  z-index: -2;
  pointer-events: none;
}
body::before {
  width: min(90vw, 520px);
  height: min(90vw, 520px);
  top: -15%;
  left: -10%;
  background: radial-gradient(circle, #a78bfa, transparent 70%);
  animation: float-a 18s var(--ease) infinite alternate;
}
body::after {
  width: min(70vw, 400px);
  height: min(70vw, 400px);
  bottom: -5%;
  right: -8%;
  background: radial-gradient(circle, #f9a8d4, transparent 70%);
  animation: float-b 22s var(--ease) infinite alternate;
}

.bg-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(60px);
  z-index: -1;
  pointer-events: none;
  opacity: 0.4;
}
.bg-orb-3 {
  width: 280px;
  height: 280px;
  top: 40%;
  left: 55%;
  background: #67e8f9;
  animation: float-c 26s ease-in-out infinite alternate;
}

@keyframes float-a {
  to { transform: translate(8%, 12%) scale(1.08); }
}
@keyframes float-b {
  to { transform: translate(-10%, -8%) scale(1.05); }
}
@keyframes float-c {
  to { transform: translate(-15%, 10%) scale(0.9); }
}

@media (prefers-reduced-motion: reduce) {
  body::before, body::after, .bg-orb { animation: none; }
}

/* ─── Reveal animation (always readable — no invisible cards) ─── */
.reveal {
  opacity: 1;
  transform: translateY(18px);
  transition: transform 0.65s var(--ease), box-shadow 0.65s var(--ease);
}
.reveal-visible {
  transform: translateY(0);
}
.hub-card:nth-child(1) { transition-delay: 0.05s; }
.hub-card:nth-child(2) { transition-delay: 0.1s; }
.hub-card:nth-child(3) { transition-delay: 0.15s; }
.hub-card:nth-child(4) { transition-delay: 0.08s; }
.hub-card:nth-child(5) { transition-delay: 0.12s; }

/* Skip */
.skip-link {
  position: absolute;
  left: -9999px;
  z-index: 9999;
  padding: 0.75rem 1.25rem;
  background: var(--gradient);
  color: #fff;
  border-radius: 999px;
  font-weight: 700;
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  backdrop-filter: blur(20px) saturate(1.8);
  -webkit-backdrop-filter: blur(20px) saturate(1.8);
  background: var(--header-bg);
  border-bottom: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
}

.site-header-inner {
  max-width: 100%;
  margin: 0 auto;
  padding: 0.9rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-title {
  margin: 0;
  flex: 1;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.site-title a {
  text-decoration: none;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: var(--touch-min);
  padding: 0 1.25rem;
  font-weight: 700;
  font-size: 0.88rem;
  text-decoration: none;
  color: #fff;
  background: var(--gradient);
  border-radius: 999px;
  box-shadow: 0 4px 20px rgba(79, 70, 229, 0.4), inset 0 1px 0 rgba(255,255,255,0.25);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.nav-back:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 28px rgba(79, 70, 229, 0.5), var(--glow);
}

/* Week nav — scrolls with page (not sticky on phone or PC) */
.week-nav {
  position: static;
  padding: 0.75rem 1.25rem 0.85rem;
  background: var(--card);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.week-nav::-webkit-scrollbar { display: none; }

.week-nav-label {
  max-width: 100%;
  margin: 0 auto 0.5rem;
  text-align: center;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
}

.week-nav-inner {
  display: flex;
  gap: 0.5rem;
  max-width: 100%;
  margin: 0 auto;
  justify-content: center;
  flex-wrap: wrap;
}

.week-nav a {
  flex: 0 0 auto;
  width: 2.85rem;
  height: 2.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.95rem;
  text-decoration: none;
  color: var(--muted);
  background: var(--card-solid);
  border: 1.5px solid var(--border-subtle);
  border-radius: 14px;
  transition: all 0.25s var(--ease);
  position: relative;
}
.week-nav a:hover {
  color: var(--violet);
  border-color: rgba(109, 40, 217, 0.35);
  transform: translateY(-2px);
}
.week-nav a.is-active {
  color: #fff;
  border-color: transparent;
  background: var(--gradient);
  box-shadow: 0 6px 16px rgba(109, 40, 217, 0.45);
  transform: scale(1.06);
}

/* Main */
main.content {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: 1.25rem 0 3rem;
}
.page-hub main.content {
  padding-top: 0;
  text-align: center;
}
.page-hub main.content .card-grid,
.page-hub main.content .audio-strip,
.page-hub main.content .quick-weeks,
.page-hub main.content .tip-box {
  text-align: left;
}

/* ─── HERO ─── */
.hero {
  position: relative;
  margin: 0 0 2.25rem;
  padding: clamp(2.5rem, 8vw, 4rem) 1.5rem clamp(2rem, 6vw, 3rem);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-align: center;
  box-shadow: var(--shadow-lg), var(--glow);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--gradient-hero);
  background-size: 200% 200%;
  animation: hero-shift 12s ease infinite;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 80%, rgba(255,255,255,0.15), transparent 40%),
    radial-gradient(circle at 80% 20%, rgba(255,255,255,0.12), transparent 35%),
    url("data:image/svg+xml,%3Csvg width='40' height='40' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0h40v40H0z' fill='none'/%3E%3Ccircle cx='20' cy='20' r='1' fill='%23fff' fill-opacity='0.12'/%3E%3C/svg%3E");
  opacity: 0.9;
}

@keyframes hero-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.hero-shine {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    105deg,
    transparent 40%,
    rgba(255,255,255,0.08) 45%,
    rgba(255,255,255,0.2) 50%,
    rgba(255,255,255,0.08) 55%,
    transparent 60%
  );
  animation: shine 6s ease-in-out infinite;
  pointer-events: none;
}

@keyframes shine {
  0%, 100% { transform: translateX(-30%) rotate(25deg); }
  50% { transform: translateX(30%) rotate(25deg); }
}

.hero-inner { position: relative; z-index: 2; color: #fff; }

.hero-flag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 4.5rem;
  height: 4.5rem;
  font-size: 2.25rem;
  margin-bottom: 1rem;
  background: rgba(255,255,255,0.15);
  border: 2px solid rgba(255,255,255,0.35);
  border-radius: 22px;
  backdrop-filter: blur(8px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  animation: flag-pop 0.8s var(--ease) both;
}

@keyframes flag-pop {
  from { transform: scale(0.6); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 9vw, 4rem);
  font-weight: 400;
  font-style: italic;
  margin: 0 0 0.65rem;
  line-height: 1.05;
  color: #fff;
  -webkit-text-fill-color: #fff;
  letter-spacing: -0.02em;
  text-shadow: 0 4px 30px rgba(0,0,0,0.25);
  animation: fade-up 0.7s var(--ease) 0.1s both;
}

.hero-sub {
  display: block;
  font-family: var(--font);
  font-size: clamp(0.75rem, 2.5vw, 0.9rem);
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  opacity: 0.85;
  margin-bottom: 0.5rem;
  animation: fade-up 0.6s var(--ease) both;
}

.hero-tagline {
  margin: 0 auto 1.5rem;
  max-width: 26rem;
  font-size: 1.08rem;
  font-weight: 500;
  opacity: 0.92;
  line-height: 1.55;
  animation: fade-up 0.7s var(--ease) 0.2s both;
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.stats-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55rem;
  animation: fade-up 0.7s var(--ease) 0.35s both;
}

.stat-pill {
  padding: 0.5rem 1.1rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.28);
  border-radius: 999px;
  backdrop-filter: blur(10px);
  transition: transform 0.2s var(--ease);
}
.stat-pill:hover { transform: scale(1.05); }

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.75rem;
  animation: fade-up 0.7s var(--ease) 0.45s both;
}

.btn-hero {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: var(--touch-min);
  padding: 0 1.5rem;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  border-radius: 999px;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.btn-hero-primary {
  color: #312e81;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}
.btn-hero-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.28);
}
.btn-hero-ghost {
  color: #fff;
  background: rgba(255,255,255,0.12);
  border: 1.5px solid rgba(255,255,255,0.35);
}
.btn-hero-ghost:hover {
  background: rgba(255,255,255,0.22);
  transform: translateY(-2px);
}

/* Section label */
.page-hub .section-label {
  justify-content: center;
}
.page-hub .section-label::before {
  content: none;
}
.page-hub .section-label::after {
  display: none;
}

.section-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
  margin: 0 0 1.25rem;
}
.section-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--border-subtle), transparent);
}

/* Bento grid */
.card-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
  width: 100%;
  margin: 0 auto;
}

@media (min-width: 560px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.1rem;
  }
}
@media (min-width: 960px) {
  .card-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.15rem;
  }
  .hub-card.bento-feature {
    grid-column: span 2;
    grid-row: span 1;
  }
}

/* Hub cards */
.hub-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 150px;
  padding: 1.5rem;
  text-decoration: none;
  color: inherit;
  background: var(--card-solid);
  border: 2px solid rgba(109, 40, 217, 0.15);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.hub-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  background: var(--card-accent, var(--gradient));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.5;
  transition: opacity 0.35s;
}

.hub-card::after {
  content: "";
  position: absolute;
  top: -40%;
  right: -30%;
  width: 120px;
  height: 120px;
  background: var(--card-accent, var(--gradient));
  opacity: 0.12;
  border-radius: 50%;
  filter: blur(20px);
  transition: opacity 0.35s, transform 0.35s var(--ease);
}

.hub-card:hover,
.hub-card:focus-visible {
  transform: translateY(-6px) scale(1.01);
  box-shadow: var(--shadow-lg), var(--glow);
  outline: none;
}
.hub-card:hover::before { opacity: 1; }
.hub-card:hover::after {
  opacity: 0.25;
  transform: scale(1.3);
}

.hub-card.bento-feature {
  min-height: 180px;
  padding: 1.75rem;
}

.hub-card-icon {
  width: 3.25rem;
  height: 3.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  border-radius: 16px;
  background: var(--icon-bg, var(--gradient));
  margin-bottom: 1.1rem;
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
  position: relative;
  z-index: 1;
}

.hub-card h2 {
  margin: 0 0 0.4rem;
  font-family: var(--font);
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  border: none;
  padding: 0;
  position: relative;
  z-index: 1;
}
.hub-card.bento-feature h2 { font-size: 1.45rem; }

.hub-card p {
  margin: 0;
  flex: 1;
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.5;
  z-index: 1;
  position: relative;
}

.hub-card .badge {
  display: inline-flex;
  align-self: flex-start;
  margin-top: 1rem;
  padding: 0.3rem 0.75rem;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--violet);
  background: rgba(109, 40, 217, 0.1);
  border-radius: 8px;
  z-index: 1;
  position: relative;
}

.hub-card .arrow {
  position: absolute;
  bottom: 1.35rem;
  right: 1.35rem;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--muted);
  background: var(--card-solid);
  border-radius: 50%;
  border: 1px solid var(--border-subtle);
  transition: all 0.3s var(--ease);
  z-index: 1;
}
.hub-card:hover .arrow {
  color: #fff;
  background: var(--gradient);
  border-color: transparent;
  transform: translate(4px, -4px);
}

.hub-card.card-teacher { --card-accent: var(--gradient); --icon-bg: var(--gradient); }
.hub-card.card-solutions { --card-accent: linear-gradient(135deg, #f59e0b, #ef4444); --icon-bg: linear-gradient(135deg, #f59e0b, #ef4444); }
.hub-card.card-es { --card-accent: var(--gradient-es); --icon-bg: var(--gradient-es); }
.hub-card.card-en { --card-accent: var(--gradient-en); --icon-bg: var(--gradient-en); }
.hub-card.card-audio { --card-accent: var(--gradient-audio); --icon-bg: var(--gradient-audio); }
.hub-card.card-tools { --card-accent: linear-gradient(135deg, #64748b, #94a3b8); --icon-bg: linear-gradient(135deg, #64748b, #94a3b8); }

/* Audio strip */
.audio-strip {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.25rem;
  margin: 2.5rem 0;
  padding: 1.5rem 1.6rem;
  background: var(--card);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(5, 150, 105, 0.25);
  border-radius: var(--radius);
  box-shadow: var(--shadow), 0 0 40px rgba(5, 150, 105, 0.08);
  position: relative;
  overflow: hidden;
}

.audio-strip::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--gradient-audio);
}

.audio-strip-waves {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 2.5rem;
  padding: 0 0.25rem;
}
.audio-strip-waves span {
  width: 4px;
  border-radius: 4px;
  background: var(--gradient-audio);
  animation: wave 1.2s ease-in-out infinite;
}
.audio-strip-waves span:nth-child(1) { height: 40%; animation-delay: 0s; }
.audio-strip-waves span:nth-child(2) { height: 70%; animation-delay: 0.1s; }
.audio-strip-waves span:nth-child(3) { height: 100%; animation-delay: 0.2s; }
.audio-strip-waves span:nth-child(4) { height: 55%; animation-delay: 0.3s; }
.audio-strip-waves span:nth-child(5) { height: 85%; animation-delay: 0.15s; }
.audio-strip-waves span:nth-child(6) { height: 45%; animation-delay: 0.25s; }

@keyframes wave {
  0%, 100% { transform: scaleY(0.6); opacity: 0.7; }
  50% { transform: scaleY(1); opacity: 1; }
}

.audio-strip-icon {
  width: 3.5rem;
  height: 3.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  background: var(--gradient-audio);
  border-radius: 16px;
  box-shadow: 0 6px 20px rgba(5, 150, 105, 0.35);
}

.audio-strip-text strong {
  display: block;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.25rem;
}
.audio-strip-text span {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.45;
}

/* Quick week row on hub */
.quick-weeks {
  margin: 2rem 0;
  padding: 1.35rem;
  background: var(--card);
  backdrop-filter: blur(12px);
  border-radius: var(--radius);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
}
.quick-weeks p {
  margin: 0 0 1rem;
  font-size: 0.88rem;
  color: var(--muted);
}
.quick-weeks-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 0.45rem;
}
@media (max-width: 480px) {
  .quick-weeks-grid { grid-template-columns: repeat(4, 1fr); }
}
.quick-weeks-grid a {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  text-decoration: none;
  color: var(--muted);
  background: var(--card-solid);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  transition: all 0.2s var(--ease);
}
.quick-weeks-grid a:hover {
  color: #fff;
  background: var(--gradient);
  border-color: transparent;
  transform: scale(1.08);
}

/* Tip box */
.tip-box {
  margin: 2rem 0;
  padding: 1.5rem 1.65rem;
  background: var(--card);
  backdrop-filter: blur(16px);
  border-radius: var(--radius);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.tip-box::before {
  content: "✦";
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  font-size: 2rem;
  opacity: 0.12;
  color: var(--violet);
}
.tip-box h3 {
  margin: 0 0 1rem;
  font-size: 1.05rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.tip-box ul { margin: 0; padding: 0; list-style: none; }
.tip-box li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.55rem;
  color: var(--muted);
  font-size: 0.95rem;
}
.tip-box li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gradient);
}
.tip-box li strong { color: var(--text); }

/* ─── Lesson pages ─── */
.content > h1:first-child {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 5vw, 2.35rem);
  font-weight: 400;
  font-style: italic;
  margin-bottom: 1.25rem;
  padding-bottom: 1.25rem;
  border: none;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.week-panel {
  margin: 2rem 0;
  background: var(--card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  scroll-margin-top: 8.5rem;
  transition: box-shadow 0.35s var(--ease);
}
.week-panel:hover {
  box-shadow: var(--shadow-lg);
}

.week-panel-head {
  display: flex;
  align-items: center;
  gap: 1.15rem;
  padding: 1.35rem 1.5rem;
  background: var(--gradient);
  color: #fff;
  position: relative;
  overflow: hidden;
}

/* Rotating accent per week */
.week-panel[data-week="1"] .week-panel-head,
.week-panel[data-week="9"] .week-panel-head {
  background: linear-gradient(125deg, #4f46e5, #7c3aed);
}
.week-panel[data-week="2"] .week-panel-head,
.week-panel[data-week="10"] .week-panel-head {
  background: linear-gradient(125deg, #7c3aed, #c026d3);
}
.week-panel[data-week="3"] .week-panel-head,
.week-panel[data-week="11"] .week-panel-head {
  background: linear-gradient(125deg, #c026d3, #db2777);
}
.week-panel[data-week="4"] .week-panel-head,
.week-panel[data-week="12"] .week-panel-head {
  background: linear-gradient(125deg, #db2777, #ea580c);
}
.week-panel[data-week="5"] .week-panel-head,
.week-panel[data-week="13"] .week-panel-head {
  background: linear-gradient(125deg, #ea580c, #d97706);
}
.week-panel[data-week="6"] .week-panel-head,
.week-panel[data-week="14"] .week-panel-head {
  background: linear-gradient(125deg, #059669, #0891b2);
}
.week-panel[data-week="7"] .week-panel-head,
.week-panel[data-week="15"] .week-panel-head {
  background: linear-gradient(125deg, #0369a1, #4f46e5);
}
.week-panel[data-week="8"] .week-panel-head,
.week-panel[data-week="16"] .week-panel-head {
  background: linear-gradient(125deg, #312e81, #9d174d);
}

.week-panel-head::after {
  content: "";
  position: absolute;
  right: -20px;
  top: -40px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
}

.week-badge {
  flex-shrink: 0;
  width: 3.5rem;
  height: 3.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 800;
  background: rgba(255,255,255,0.2);
  border: 2px solid rgba(255,255,255,0.45);
  border-radius: 18px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.3);
  position: relative;
  z-index: 1;
}

.week-panel-head h2 {
  margin: 0;
  font-family: var(--font);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.35;
  color: #fff;
  -webkit-text-fill-color: #fff;
  border: none;
  padding: 0;
  z-index: 1;
  position: relative;
}

.week-panel-content {
  padding: 1.5rem 1.5rem 1.75rem;
}

.week-panel-content > p:first-of-type {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0 !important;
  background: none !important;
  margin-bottom: 1.25rem !important;
}

.week-panel-content > p:first-of-type strong {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--violet);
  background: var(--code-bg);
  border-radius: 8px;
  border: 1px solid rgba(109, 40, 217, 0.12);
}

.week-panel-content pre {
  margin: 1.25rem 0;
  padding: 1.4rem 1.5rem;
  background: var(--lr-bg);
  color: #ede9fe;
  border: none;
  border-radius: var(--radius);
  font-size: 1.02rem;
  line-height: 1.75;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 12px 40px rgba(30, 27, 75, 0.25);
  position: relative;
}

.week-panel-content pre::before {
  content: "🎧 Listen & Repeat";
  display: block;
  font-family: var(--font);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(237, 233, 254, 0.65);
  margin-bottom: 0.85rem;
}

.week-panel-content pre code {
  color: inherit;
  background: none;
  font-weight: 500;
}

.week-panel-content h3 {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 2rem;
  padding: 0.85rem 1rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  background: var(--card-solid);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  border-left: 4px solid transparent;
  border-image: var(--gradient) 1;
  box-shadow: var(--shadow-sm);
}

.week-panel-content h3::before {
  content: "✎";
  font-size: 0.9rem;
}

/* Tables */
.content table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.9rem;
  margin: 1.25rem 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: block;
  overflow-x: auto;
}
.content thead, .content tbody, .content tr { display: table; width: 100%; }
.content th {
  background: var(--gradient);
  color: #fff;
  font-weight: 700;
  padding: 0.85rem 0.75rem;
  border: none;
  font-size: 0.82rem;
  letter-spacing: 0.03em;
}
.content td {
  padding: 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--card-solid);
}
.content tr:last-child td { border-bottom: none; }

.content code {
  font-size: 0.86em;
  padding: 0.2em 0.5em;
  font-weight: 600;
  background: rgba(109, 40, 217, 0.1);
  color: var(--violet);
  border-radius: 6px;
}

.content a {
  color: var(--violet);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1.5px solid rgba(109, 40, 217, 0.35);
  transition: border-color 0.2s;
}
.content a:hover { border-color: var(--violet); }

.content hr {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-subtle), transparent);
  margin: 2.5rem 0;
}

.hub-intro { color: var(--muted); }

/* ─── Welcome / language picker ─── */
.page-welcome main.content {
  text-align: center;
}

.course-picker {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 2rem 0;
  text-align: left;
}

.course-card {
  display: block;
  padding: 1.35rem 1.5rem;
  text-decoration: none;
  color: inherit;
  background: #fff;
  border: 2px solid #c4b5fd;
  border-radius: 20px;
  box-shadow: var(--shadow);
  transition: transform 0.25s var(--ease), box-shadow 0.25s;
}

.course-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.course-card h2 {
  margin: 0.35rem 0 0.4rem;
  font-size: 1.25rem;
  font-weight: 800;
}

.course-card p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.45;
}

.course-flags {
  font-size: 1.5rem;
  line-height: 1;
}

.course-go {
  display: inline-block;
  margin-top: 0.85rem;
  font-weight: 800;
  font-size: 0.88rem;
  color: var(--violet);
}

.course-de-es { border-color: #fbbf24; }
.course-de-en { border-color: #818cf8; }
.course-es-en { border-color: #f87171; }

.welcome-ui-lang {
  margin: 2rem 0 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.ui-lang-btn {
  margin: 0 0.2rem;
  padding: 0.35rem 0.75rem;
  font-weight: 700;
  font-size: 0.82rem;
  border: 1.5px solid var(--border-subtle);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  color: var(--text);
}

.ui-lang-btn.is-active {
  color: #fff;
  background: var(--gradient);
  border-color: transparent;
}

/* ─── Markdown body (between panels) ─── */
.content > p {
  margin: 0 0 1rem;
  color: var(--text);
  line-height: 1.65;
}
.content > p:has(+ .overview-roadmap),
.content > h2 + p {
  color: var(--muted);
  font-size: 1.02rem;
}

.content > h2 {
  margin: 2rem 0 1rem;
  padding: 0.75rem 1rem;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  background: var(--card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  border-left: 4px solid var(--violet);
  box-shadow: var(--shadow-sm);
}

.content > ul,
.content > ol {
  margin: 0 0 1.25rem;
  padding: 1rem 1.25rem 1rem 2.25rem;
  background: var(--card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}
.content > ul li,
.content > ol li {
  margin-bottom: 0.45rem;
  color: var(--muted);
}
.content > ul li strong,
.content > ol li strong {
  color: var(--text);
}

/* Week roadmap table at top */
.overview-roadmap {
  margin: 1.5rem 0 2rem;
  padding: 0.25rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.overview-roadmap table {
  margin: 0 !important;
  box-shadow: none !important;
  display: table !important;
  width: 100%;
  border-radius: 0;
}
.overview-roadmap thead th {
  position: static;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.overview-roadmap tbody tr {
  transition: background 0.2s var(--ease);
}
.overview-roadmap tbody tr:hover td {
  background: rgba(109, 40, 217, 0.06);
}
.overview-roadmap tbody td:first-child {
  font-weight: 800;
  color: var(--violet);
  width: 4.5rem;
  text-align: center;
  font-size: 1rem;
}
.overview-roadmap tbody td:nth-child(2) {
  font-weight: 600;
  color: var(--text);
}
.overview-roadmap tbody td:nth-child(3) {
  font-size: 0.88rem;
  color: var(--muted);
}

.week-panel-content > h2 {
  margin: 1.75rem 0 0.85rem;
  padding: 0.7rem 1rem;
  font-size: 1rem;
  font-weight: 800;
  color: var(--text);
  background: linear-gradient(90deg, var(--code-bg), transparent);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  border-left: 4px solid var(--violet);
}
.week-panel-content > h2::before {
  content: "● ";
  color: var(--violet);
}

.week-panel-content > ul,
.week-panel-content > ol {
  margin: 0 0 1.25rem;
  padding-left: 1.35rem;
}
.week-panel-content > ul li {
  margin-bottom: 0.4rem;
  color: var(--text);
}

.week-panel-content > p {
  margin-bottom: 0.85rem;
}

/* Page banner (lesson pages) */
.page-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.65rem 1rem;
  max-width: 100%;
  margin: 0 auto 0.5rem;
  padding: 0.85rem 1rem;
  text-align: center;
  background: var(--card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  color: var(--muted);
}
.page-banner-icon {
  font-size: 1.25rem;
  line-height: 1;
}
.page-banner p {
  margin: 0;
  flex: 1;
  min-width: 12rem;
  font-weight: 500;
}
.week-progress {
  margin-left: auto;
  padding: 0.35rem 0.9rem;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--violet);
  background: var(--code-bg);
  border-radius: 999px;
  border: 1px solid rgba(109, 40, 217, 0.15);
  min-height: 1.75rem;
  display: inline-flex;
  align-items: center;
}
.week-progress:empty { display: none; }

.page-student-es .week-panel[data-week] .week-panel-head {
  filter: hue-rotate(-8deg) saturate(1.05);
}
.page-student-en .week-panel[data-week] .week-panel-head {
  filter: hue-rotate(12deg) saturate(0.95);
}

.site-footer {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: 2.5rem 0 3rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
  border-top: 1px solid var(--border-subtle);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.footer-nav a {
  padding: 0.45rem 1rem;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--text);
  background: var(--card);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  transition: transform 0.2s var(--ease), box-shadow 0.2s;
}
.footer-nav a:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
  color: var(--violet);
}

.footer-copy {
  margin: 0;
  opacity: 0.85;
}
.footer-copy code {
  font-size: 0.78em;
  padding: 0.15rem 0.4rem;
  background: var(--code-bg);
  border-radius: 6px;
}

/* Phone: horizontal week strip */
@media (max-width: 768px) {
  .week-nav {
    padding: 0.5rem 0.75rem 0.65rem;
  }
  .week-nav-inner {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    padding-bottom: 0.15rem;
  }
  .week-nav a {
    scroll-snap-align: center;
    width: 2.55rem;
    height: 2.55rem;
    font-size: 0.88rem;
  }
}

/* L&R audio (teacher + student week pages) */
.lr-audio-panel {
  margin: 1rem 0 1.25rem;
  padding: 1.1rem 1.2rem;
  background: linear-gradient(135deg, #ecfdf5, #f0fdfa);
  border: 2px solid #34d399;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.lr-audio-heading {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  font-weight: 800;
  color: #047857;
}

.lr-audio-combined {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.lr-audio-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
}

.lr-audio-label {
  flex: 0 0 auto;
  min-width: 7rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: #065f46;
}

.lr-audio-item audio {
  flex: 1 1 12rem;
  min-width: 10rem;
  max-width: 100%;
  height: 2.5rem;
}

.lr-audio-lines {
  margin-top: 0.85rem;
}

.lr-audio-lines summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 0.85rem;
  color: #047857;
}

.lr-audio-line-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.65rem;
}

.lr-audio-missing {
  margin: 0;
  font-size: 0.88rem;
  color: #92400e;
  background: #fffbeb;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  border: 1px solid #fcd34d;
}

/* Teacher: optional read-aloud script (same text as TTS) */
.lr-teacher-script {
  margin: 0 0 1rem;
  padding: 0.85rem 1rem 1rem;
  background: linear-gradient(135deg, #faf5ff, #f5f3ff);
  border: 2px solid #c4b5fd;
  border-radius: var(--radius);
}

.lr-teacher-script summary {
  cursor: pointer;
  font-weight: 800;
  font-size: 0.92rem;
  color: #5b21b6;
  list-style: none;
}

.lr-teacher-script summary::-webkit-details-marker {
  display: none;
}

.lr-teacher-script[open] summary {
  margin-bottom: 0.65rem;
}

.lr-script-hint {
  margin: 0 0 0.75rem;
  font-size: 0.82rem;
  color: #6b7280;
}

.lr-script-lines {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.lr-script-line {
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
  padding: 0.65rem 0.85rem;
  background: #fff;
  border: 1.5px solid #e9d5ff;
  border-radius: 12px;
  font-size: 1.05rem;
  line-height: 1.45;
}

.lr-script-num {
  flex: 0 0 auto;
  width: 1.6rem;
  height: 1.6rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 800;
  color: #5b21b6;
  background: #ede9fe;
  border-radius: 999px;
}

.lr-script-text {
  flex: 1;
  font-weight: 600;
  color: #1f1235;
}

.lr-script-global-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-left: auto;
  font-size: 0.78rem;
  font-weight: 700;
  color: #5b21b6;
  white-space: nowrap;
  cursor: pointer;
}

.lr-script-global-toggle input {
  width: 1rem;
  height: 1rem;
  accent-color: #7c3aed;
}

body.lr-scripts-open .lr-teacher-script {
  border-color: #a78bfa;
}

@media print {
  body::before, body::after, .bg-orb, .hero-shine, .week-nav, .skip-link, .no-print { display: none !important; }
  .week-panel { break-inside: avoid; box-shadow: none; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero::before, .hero-shine, .audio-strip-waves span { animation: none; }
}

/* Site login gate + account settings */

body.auth-pending .app-shell,
body.auth-pending .skip-link {
  visibility: hidden;
}

body.auth-pending::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: linear-gradient(165deg, #4c1d95 0%, #7c3aed 18%, #ddd6fe 48%, #f5f3ff 100%);
}

.page-login {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.login-card {
  width: min(22rem, 100%);
  padding: 1.75rem 1.5rem;
  background: #fff;
  border: 2px solid rgba(109, 40, 217, 0.25);
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(76, 29, 149, 0.2);
}

.login-card h1 {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
  font-weight: 800;
  color: #0f0d1a;
}

.login-card p {
  margin: 0 0 1.25rem;
  font-size: 0.9rem;
  color: #5b5670;
}

.login-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.85rem;
}

.login-field label {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #5b5670;
}

.login-field input {
  min-height: 44px;
  padding: 0.65rem 0.85rem;
  font-size: 16px;
  font-family: inherit;
  font-weight: 600;
  border: 2px solid rgba(109, 40, 217, 0.35);
  border-radius: 10px;
  box-sizing: border-box;
}

.login-field input:focus {
  outline: none;
  border-color: #6d28d9;
  box-shadow: 0 0 0 3px rgba(109, 40, 217, 0.2);
}

.login-btn {
  width: 100%;
  min-height: 44px;
  margin-top: 0.35rem;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(125deg, #4f46e5, #7c3aed);
  border: none;
  border-radius: 999px;
  cursor: pointer;
}

.login-btn:disabled {
  opacity: 0.65;
  cursor: wait;
}

.login-error {
  margin: 0 0 0.85rem;
  padding: 0.6rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: #b91c1c;
  background: #fef2f2;
  border-radius: 8px;
}

.login-error[hidden] {
  display: none;
}

.nav-auth {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-left: auto;
}

.nav-user {
  font-size: 0.78rem;
  font-weight: 800;
  color: #5b5670;
  max-width: 8rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-settings-btn {
  min-width: 40px;
  min-height: 40px;
  padding: 0;
  font-size: 1.1rem;
  line-height: 1;
  background: rgba(109, 40, 217, 0.08);
  border: 1.5px solid rgba(109, 40, 217, 0.2);
  border-radius: 10px;
  cursor: pointer;
}

.account-sync-pill {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(109, 40, 217, 0.1);
  color: #5b21b6;
  white-space: nowrap;
}

.account-sync-pill.is-ok {
  background: rgba(34, 197, 94, 0.15);
  color: #15803d;
}

.account-sync-pill.is-syncing {
  opacity: 0.85;
}

.account-sync-pill.is-err {
  background: rgba(239, 68, 68, 0.12);
  color: #b91c1c;
}

.auth-settings-backdrop {
  position: fixed;
  inset: 0;
  z-index: 600;
  background: rgba(15, 13, 26, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.auth-settings-dialog {
  width: min(24rem, 100%);
  max-height: min(85vh, 32rem);
  overflow: auto;
  padding: 1.2rem 1.25rem;
  background: #fff;
  border: 2px solid rgba(109, 40, 217, 0.3);
  border-radius: 16px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.18);
}

.auth-settings-dialog h2 {
  margin: 0 0 1rem;
  font-size: 1rem;
  font-weight: 800;
  color: #6d28d9;
}

.auth-settings-section {
  margin-bottom: 1.15rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(15, 13, 26, 0.1);
}

.auth-settings-section:last-of-type {
  border-bottom: none;
  margin-bottom: 0.75rem;
}

.auth-settings-section h3 {
  margin: 0 0 0.65rem;
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #5b5670;
}

.auth-settings-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.auth-btn {
  min-height: 40px;
  padding: 0 1rem;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  border-radius: 10px;
  border: 1.5px solid rgba(109, 40, 217, 0.25);
  background: #fff;
  cursor: pointer;
}

.auth-btn-primary {
  color: #fff;
  background: linear-gradient(125deg, #4f46e5, #7c3aed);
  border-color: transparent;
}

.auth-btn-danger {
  color: #b91c1c;
  border-color: rgba(185, 28, 28, 0.3);
}

.auth-msg {
  margin: 0.5rem 0 0;
  font-size: 0.78rem;
  font-weight: 700;
}

.auth-msg.is-ok {
  color: #059669;
}

.auth-msg.is-err {
  color: #b91c1c;
}

.auth-user-list {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.88rem;
  font-weight: 600;
}

.auth-user-list li {
  padding: 0.25rem 0;
}

@media (max-width: 640px) {
  .site-header-inner {
    flex-wrap: wrap;
  }
  .nav-auth {
    order: 3;
    width: 100%;
    justify-content: flex-end;
    margin-top: 0.25rem;
  }
}

/* Bug report — small red control, non-blocking */

.nav-bug-btn,
.wb-bug-btn {
  flex-shrink: 0;
  min-width: 36px;
  min-height: 36px;
  padding: 0;
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 999px;
  border: 2px solid #dc2626;
  background: #fef2f2;
  color: #b91c1c;
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.2);
}

.nav-bug-btn:hover,
.wb-bug-btn:hover {
  background: #fee2e2;
  transform: scale(1.05);
}

.wb-bug-btn {
  width: 36px;
  height: 36px;
}

.exercise-actions .wb-bug-btn {
  order: -1;
}

.bug-report-backdrop {
  position: fixed;
  inset: 0;
  z-index: 700;
  background: rgba(15, 13, 26, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.bug-report-dialog {
  width: min(22rem, 100%);
  padding: 1.15rem 1.2rem;
  background: #fff;
  border: 2px solid rgba(220, 38, 38, 0.35);
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
}

.bug-report-dialog h2 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  font-weight: 800;
  color: #b91c1c;
}

.bug-report-context {
  margin: 0 0 0.75rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: #5b5670;
}

.bug-report-dialog textarea {
  width: 100%;
  min-height: 5.5rem;
  padding: 0.65rem 0.75rem;
  font-family: inherit;
  font-size: 16px;
  border: 2px solid rgba(109, 40, 217, 0.25);
  border-radius: 10px;
  box-sizing: border-box;
  resize: vertical;
}

.bug-report-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.bug-report-actions button {
  flex: 1;
  min-height: 40px;
  font-family: inherit;
  font-weight: 700;
  border-radius: 10px;
  cursor: pointer;
}

.bug-report-send {
  color: #fff;
  background: #dc2626;
  border: none;
}

.bug-report-cancel {
  background: #fff;
  border: 1.5px solid rgba(15, 13, 26, 0.15);
}

.bug-report-msg {
  margin: 0.5rem 0 0;
  font-size: 0.78rem;
  font-weight: 700;
}

.bug-report-msg.is-ok {
  color: #059669;
}

.bug-report-msg.is-err {
  color: #b91c1c;
}

.bug-fixed-backdrop {
  position: fixed;
  inset: 0;
  z-index: 800;
  background: rgba(15, 13, 26, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.bug-fixed-dialog {
  width: min(20rem, 100%);
  padding: 1.25rem;
  text-align: center;
  background: #fff;
  border: 2px solid rgba(5, 150, 105, 0.4);
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2);
}

.bug-fixed-dialog h2 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  color: #047857;
}

.bug-fixed-dialog p {
  margin: 0 0 1rem;
  font-size: 0.88rem;
  color: #5b5670;
}

.bug-fixed-dialog button {
  width: 100%;
  min-height: 44px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(125deg, #059669, #10b981);
  border: none;
  border-radius: 999px;
  cursor: pointer;
}
