/* ── PWA Install Pill ────────────────────────────────────────────────────── */
.install-pill {
  position: fixed;
  bottom: calc(24px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(440px, calc(100vw - 32px));
  padding: 12px 14px 12px 16px;
  border: 2px solid var(--navy, #101b48);
  border-radius: 999px;
  background: var(--navy, #101b48);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 750;
  box-shadow: 0 8px 32px rgba(16, 27, 72, 0.32);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.35s ease, transform 0.35s ease;
  pointer-events: none;
}

.install-pill.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.install-pill-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}

#installPillText {
  flex: 1;
}

.install-pill-dismiss {
  flex-shrink: 0;
  border: 0;
  border-radius: 999px;
  padding: 2px 6px;
  background: rgba(255,255,255,0.15);
  color: #fff;
  font-size: 0.78rem;
  cursor: pointer;
  line-height: 1;
}

/* ── Daily reminder UI (inside nickname/profile screen) ─────────────────── */
.reminder-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 0.5rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line, #dcdceb);
  border-radius: 14px;
  background: var(--soft, #f5f3fa);
}

.reminder-toggle-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 750;
  color: var(--navy, #101b48);
  cursor: pointer;
}

.reminder-toggle-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--blue, #2047f4);
  cursor: pointer;
}

#reminderTime {
  padding: 0.38rem 0.6rem;
  border: 1px solid var(--line, #dcdceb);
  border-radius: 10px;
  background: #fff;
  color: var(--navy, #101b48);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
}

#reminderTime:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.reminder-ios-note {
  width: 100%;
  margin: 0;
  color: var(--muted, #666a7e);
  font-size: 0.8rem;
  line-height: 1.45;
}

:root {
  --navy: #101b48;
  --navy-2: #182967;
  --blue: #2047f4;
  --blue-soft: #e9eeff;
  --pink: #ff3f9b;
  --pink-dark: #bd1769;
  --pink-soft: #fff0f7;
  --violet: #8d42f5;
  --lime: #c9f227;
  --lime-dark: #597000;
  --cream: #fff9ec;
  --paper: #fff;
  --soft: #f5f3fa;
  --ink: #161a2c;
  --muted: #666a7e;
  --line: #dcdceb;
  --good: #08783e;
  --good-bg: #e7f9ee;
  --bad: #b62447;
  --bad-bg: #fff0f3;
  --warning: #795006;
  --warning-bg: #fff4cf;
  --shadow: 0 18px 0 rgba(16, 27, 72, 0.08);
  --shadow-soft: 0 22px 60px rgba(16, 27, 72, 0.12);
  --radius: 26px;
}

/* v10 pilot profiles and administration */
.profile-badge {
  max-width: 180px;
  overflow: hidden;
  padding: 0.42rem 0.7rem;
  border: 1px solid rgba(16, 27, 72, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--navy);
  font-size: 0.82rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}
.profile-badge:focus-visible { outline: 3px solid var(--pink); outline-offset: 3px; }

.privacy-note {
  max-width: 62ch;
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

.nickname-form {
  display: grid;
  width: min(100%, 420px);
  gap: 0.75rem;
  margin: 1.5rem auto 0;
  text-align: left;
}

.nickname-form input {
  width: 100%;
}
.pronoun-fieldset { display: grid; gap: .48rem; margin: .7rem 0 0; border: 1px solid var(--line); border-radius: 14px; padding: 1rem; }
.pronoun-fieldset legend { color: var(--navy); font-weight: 850; }
.pronoun-fieldset legend span { color: var(--muted); font-weight: 600; }
.pronoun-fieldset label { margin: 0; color: var(--ink); font-weight: 650; }
.pronoun-fieldset input[type="radio"] { width: auto; margin-right: .35rem; }
.admin-login-toggle { margin-top: .6rem; }
.admin-login-fields { display: grid; gap: .55rem; margin-top: .8rem; }

.admin-screen {
  display: grid;
  gap: 1rem;
  padding-bottom: 4rem;
}

.admin-screen.hidden {
  display: none;
}

.admin-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.admin-hero .lead {
  max-width: 68ch;
}

.admin-key-panel {
  border-color: rgba(216, 62, 135, 0.32);
  background: linear-gradient(135deg, #fff, #fff4fa);
}

.generated-key-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 0.75rem;
}

.generated-key {
  display: grid;
  gap: 0.28rem;
  padding: 0.85rem;
  border: 1px solid rgba(16, 27, 72, 0.12);
  border-radius: 16px;
  background: #fff;
}

.generated-key code {
  color: var(--navy);
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.admin-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 1rem 0;
}

.admin-summary span {
  padding: 0.55rem 0.75rem;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--navy);
  font-size: 0.84rem;
  font-weight: 800;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(16, 27, 72, 0.1);
  border-radius: 18px;
}

.admin-table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
  background: #fff;
}

.admin-table th,
.admin-table td {
  padding: 0.85rem;
  border-bottom: 1px solid rgba(16, 27, 72, 0.09);
  text-align: left;
  vertical-align: top;
}

.admin-table th {
  background: #f5f7ff;
  color: var(--navy);
  font-size: 0.76rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.admin-table td {
  font-size: 0.86rem;
}

.admin-name-input {
  width: 160px;
  min-height: 38px;
  padding: 0.48rem 0.6rem;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.38rem;
}

.admin-actions button {
  min-height: 36px;
  padding: 0.42rem 0.58rem;
  border: 1px solid rgba(16, 27, 72, 0.16);
  border-radius: 10px;
  background: #fff;
  color: var(--navy);
  font-size: 0.75rem;
  font-weight: 800;
  cursor: pointer;
}

.admin-actions button.danger {
  color: #9b2146;
}

.admin-feedback-list {
  display: grid;
  gap: 0.65rem;
  margin-top: 1rem;
}

.admin-feedback-item {
  padding: 0.8rem 0;
  border-bottom: 1px solid rgba(16, 27, 72, 0.1);
}

.admin-feedback-item:last-child {
  border-bottom: 0;
}

.pilot-feedback {
  display: grid;
  gap: 0.55rem;
  margin-top: 1.25rem;
  padding: 0.85rem;
  border: 1px solid rgba(16, 27, 72, 0.1);
  border-radius: 16px;
  background: #fafbff;
}

.pilot-feedback > span {
  color: var(--navy);
  font-size: 0.82rem;
  font-weight: 800;
}

.pilot-feedback-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pilot-feedback-actions button {
  min-height: 38px;
  padding: 0.48rem 0.68rem;
  border: 1px solid rgba(16, 27, 72, 0.14);
  border-radius: 999px;
  background: #fff;
  color: var(--navy);
  font-weight: 750;
  cursor: pointer;
}

.pilot-feedback-actions button.sent {
  border-color: #27885d;
  background: #e8f8ef;
  color: #146341;
}

@media (max-width: 720px) {
  .admin-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .profile-badge {
    display: none;
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--ink);
  background:
    linear-gradient(rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.78)),
    radial-gradient(circle at 10% 10%, #ffd5ea 0, transparent 34rem),
    radial-gradient(circle at 92% 22%, #dfe5ff 0, transparent 34rem),
    var(--cream);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea,
a {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 4px solid rgba(32, 71, 244, 0.28);
  outline-offset: 3px;
}

.hidden {
  display: none !important;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.ambient {
  position: fixed;
  z-index: -1;
  border-radius: 999px;
  filter: blur(4px);
  pointer-events: none;
}

.ambient-one {
  top: 18vh;
  right: -150px;
  width: 330px;
  height: 330px;
  background: rgba(255, 63, 155, 0.12);
}

.ambient-two {
  bottom: 4vh;
  left: -120px;
  width: 270px;
  height: 270px;
  background: rgba(201, 242, 39, 0.14);
}

.shell {
  width: min(1440px, calc(100% - 36px));
  margin: auto;
  padding:
    max(16px, env(safe-area-inset-top))
    max(0px, env(safe-area-inset-right))
    max(36px, env(safe-area-inset-bottom))
    max(0px, env(safe-area-inset-left));
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  margin-bottom: 18px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  border: 0;
  padding: 7px 0;
  background: transparent;
  color: var(--navy);
  cursor: pointer;
  font-weight: 950;
  letter-spacing: -0.035em;
}

.brand-star {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  background: var(--pink);
  color: #fff;
  box-shadow: 0 4px 0 var(--pink-dark);
}

.sync-badge {
  color: var(--good);
  font-size: 0.8rem;
  font-weight: 800;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 900px;
  margin-bottom: 20px;
  color: var(--navy);
  font-size: clamp(3rem, 6.6vw, 6.1rem);
  line-height: 0.92;
  letter-spacing: -0.075em;
}

h2 {
  margin-bottom: 8px;
  color: var(--navy);
  font-size: clamp(1.7rem, 3vw, 2.8rem);
  line-height: 1.02;
  letter-spacing: -0.045em;
}

h3 {
  margin-bottom: 6px;
  color: var(--navy);
  font-size: 1.25rem;
  letter-spacing: -0.025em;
}

.lead {
  max-width: 760px;
  color: #50546b;
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  line-height: 1.62;
}

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

.eyebrow {
  display: inline-block;
  margin-bottom: 11px;
  color: var(--blue);
  font-size: 0.76rem;
  font-weight: 950;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow.light {
  color: #cad4ff;
}

.panel,
.login-card,
.home-hero,
.today-card,
.progress-card,
.home-section,
.session-bar,
.guide-card,
.exercise-shell,
.result-card {
  border: 2px solid var(--navy);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.panel {
  padding: clamp(24px, 4vw, 48px);
}

.centered {
  display: grid;
  min-height: 420px;
  place-items: center;
  align-content: center;
  gap: 20px;
  color: var(--muted);
}

.spinner {
  width: 44px;
  height: 44px;
  border: 5px solid var(--line);
  border-top-color: var(--pink);
  border-radius: 999px;
  animation: spin 0.75s linear infinite;
}

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

.login-card {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(520px, 1.1fr);
  align-items: start;
  overflow: hidden;
}

.login-copy {
  align-self: center;
  padding: clamp(28px, 5vw, 70px);
}

.login-copy h1 {
  font-size: clamp(3.1rem, 4.8vw, 5.4rem);
  line-height: 1.04;
}

.login-art {
  width: 100%;
  height: auto;
  min-height: 0;
  aspect-ratio: 1408 / 768;
  object-fit: contain;
  object-position: center;
  background: var(--paper);
}

.auth-choice {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 28px;
}

.auth-cta {
  width: 100%;
  justify-content: center;
}

.auth-back {
  display: inline-block;
  margin-bottom: 4px;
  padding: 0;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
}

.auth-back:hover {
  color: var(--navy);
}

.admin-login-bottom {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.admin-login-link {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 700;
}

.admin-login-link:hover {
  color: var(--navy);
}

.login-form {
  display: grid;
  gap: 0.55rem;
  margin-top: 28px;
}

.login-form label,
.custom-question label,
.productive-area label {
  display: block;
  margin-bottom: 8px;
  color: var(--navy);
  font-weight: 850;
}

.input-row {
  display: flex;
  gap: 10px;
}

input,
select,
textarea {
  width: 100%;
  min-width: 0;
  border: 2px solid var(--line);
  border-radius: 14px;
  padding: 13px 14px;
  background: #fff;
  color: var(--ink);
}

textarea {
  resize: vertical;
  line-height: 1.55;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue);
}

.form-message {
  min-height: 24px;
  margin-top: 10px;
  color: var(--bad);
  font-weight: 800;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  border: 0;
  border-radius: 14px;
  padding: 12px 19px;
  cursor: pointer;
  font-weight: 900;
  line-height: 1.15;
  text-align: center;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
}

.button:hover:not(:disabled) {
  transform: translateY(-2px);
}

.button:active:not(:disabled) {
  transform: translateY(2px);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.button.large {
  min-height: 58px;
  padding: 15px 24px;
  font-size: 1.05rem;
}

.primary {
  background: var(--pink);
  box-shadow: 0 6px 0 var(--pink-dark);
  color: #fff;
}

.navy {
  background: var(--navy);
  box-shadow: 0 5px 0 #070d27;
  color: #fff;
}

.secondary {
  border: 2px solid var(--navy);
  background: #fff;
  color: var(--navy);
}

.text-button {
  border: 0;
  padding: 9px 0;
  background: transparent;
  color: var(--navy);
  cursor: pointer;
  font-weight: 900;
}

.icon-button {
  display: grid;
  width: 46px;
  height: 46px;
  border: 2px solid rgba(255, 255, 255, 0.34);
  border-radius: 14px;
  place-items: center;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  cursor: pointer;
  font-weight: 900;
}

.home-hero {
  display: grid;
  grid-template-columns: 1fr;
  min-height: 0;
  overflow: hidden;
}

.hero-copy {
  align-self: center;
  padding: clamp(30px, 4vw, 54px) clamp(28px, 5vw, 70px) clamp(20px, 3vw, 34px);
}

.hero-copy h1 {
  font-size: clamp(2.4rem, 5vw, 4.2rem);
  line-height: 1.02;
}

.challenge-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.mission-note {
  margin-top: 22px;
  border-left: 5px solid var(--pink);
  border-radius: 8px 18px 18px 8px;
  padding: 15px 17px;
  background: linear-gradient(
    135deg,
    rgba(255, 54, 153, 0.09),
    rgba(198, 255, 65, 0.14)
  );
  color: var(--navy);
}

.mission-note strong {
  display: block;
  margin-bottom: 5px;
  font-size: 0.98rem;
}

.mission-note p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
}

.challenge-facts span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 13px;
  color: var(--muted);
  font-size: 0.85rem;
}

.challenge-facts strong {
  margin-right: 4px;
  color: var(--navy);
}

.hero-art-wrap {
  position: relative;
  min-height: 0;
  aspect-ratio: 1600 / 902;
  overflow: hidden;
  background: var(--navy);
}

.hero-art {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
/* Scene strip — replaces old 3-column gallery grid */
.qc-moments { margin: 24px 0; }
.scene-strip-heading { font-size: .82rem; font-weight: 900; letter-spacing: .07em; text-transform: uppercase; color: var(--navy); margin: 0 0 12px; }
.scene-strip { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.scene-strip::-webkit-scrollbar { height: 4px; }
.scene-strip::-webkit-scrollbar-thumb { background: var(--line); border-radius: 4px; }
.scene-card { min-width: 0; border: 2px solid var(--navy); border-radius: 18px; overflow: hidden; background: var(--paper); box-shadow: var(--shadow); transition: border-color .15s; }
.scene-card.open { border-color: var(--pink); }
.scene-card-btn { display: block; width: 100%; border: none; padding: 0; background: none; cursor: pointer; text-align: left; }
.scene-card-btn img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.scene-card-title { display: block; padding: .6rem .85rem; color: var(--navy); font-size: .82rem; font-weight: 800; line-height: 1.3; min-height: 4.4rem; }
.scene-panel-area { margin-top: 10px; border: 2px solid var(--navy); border-radius: 18px; padding: 1.1rem 1.25rem; background: var(--paper); box-shadow: var(--shadow); animation: scene-panel-in .2s ease; }
.scene-panel-area.hidden { display: none; }
@keyframes scene-panel-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }
.scene-passage { font-size: .9rem; line-height: 1.7; color: var(--ink); margin: 0 0 1rem; }
.scene-vocab-heading { font-size: .78rem; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; color: var(--navy); margin: 0 0 .5rem; }
.scene-vocab { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .45rem; }
.scene-vocab li { font-size: .85rem; line-height: 1.5; color: var(--ink); }
.scene-vocab li strong { color: var(--navy); font-weight: 800; margin-right: .2em; }

.decorative-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.decorative-strip figure {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 3px 4px 0 rgba(18, 29, 70, 0.1);
}

.decorative-strip img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 8;
  object-fit: cover;
}

.decorative-strip figcaption {
  padding: 9px 11px;
  color: var(--navy);
  font-size: 0.74rem;
  font-weight: 850;
  line-height: 1.25;
}

.readiness-art-strip {
  max-width: 680px;
}

.session-art-strip {
  max-width: 960px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.result-art-strip {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 24px;
}

.hero-sticker {
  position: absolute;
  right: 28px;
  bottom: 28px;
  transform: rotate(-5deg);
  border: 3px solid var(--navy);
  border-radius: 999px;
  padding: 12px 18px;
  background: var(--lime);
  color: var(--navy);
  box-shadow: 5px 6px 0 var(--navy);
  font-weight: 950;
}

.notice {
  margin-top: 16px;
  border-radius: 14px;
  padding: 14px 16px;
  line-height: 1.45;
}

.warning {
  border: 1px solid #e8c961;
  background: var(--warning-bg);
  color: var(--warning);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(310px, 0.5fr);
  gap: 20px;
  margin-top: 24px;
}

.today-card,
.progress-card {
  padding: clamp(25px, 4vw, 48px);
}

.today-card {
  background:
    radial-gradient(circle at 96% 0, rgba(255, 63, 155, 0.13), transparent 22rem),
    #fff;
}

.today-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.status-pill {
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 0.8rem;
  font-weight: 900;
}

.status-pill.available {
  background: var(--lime);
  color: var(--navy);
}

.status-pill.in-progress {
  background: #f1e4ff;
  color: #6b26ba;
}

.status-pill.completed {
  background: var(--good-bg);
  color: var(--good);
}

.status-pill.missed {
  background: var(--pink-soft);
  color: var(--pink-dark);
}

.today-why {
  max-width: 780px;
  color: #50546b;
  font-size: 1.08rem;
  line-height: 1.62;
}

.format-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0;
}

.format-strip span {
  border-radius: 999px;
  padding: 7px 11px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 0.82rem;
  font-weight: 850;
}

.coach-tip {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 11px;
  border-left: 5px solid var(--lime);
  border-radius: 0 15px 15px 0;
  padding: 15px;
  background: #f7ffd9;
}

.coach-tip p {
  margin: 0;
  color: #3f4d09;
  line-height: 1.5;
}

.main-actions,
.utility-actions,
.tutor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 11px;
  margin-top: 24px;
}

.progress-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  background:
    radial-gradient(circle at 100% 0, rgba(255, 63, 155, 0.35), transparent 20rem),
    var(--navy);
  color: #fff;
}

.ring-wrap {
  display: grid;
  margin: 12px 0 24px;
  place-items: center;
}

.progress-ring {
  --progress: 0;
  display: grid;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  place-items: center;
  background: conic-gradient(var(--lime) calc(var(--progress) * 1%), rgba(255, 255, 255, 0.14) 0);
}

.progress-ring::before {
  position: absolute;
  width: 136px;
  height: 136px;
  border-radius: 50%;
  background: var(--navy);
  content: "";
}

.progress-ring span {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.progress-ring strong {
  color: #fff;
  font-size: 3.2rem;
  letter-spacing: -0.08em;
}

.progress-ring small {
  color: #cbd4fa;
  font-size: 1rem;
}

.mini-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.mini-stats div {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  padding: 12px 8px;
  background: rgba(255, 255, 255, 0.07);
  text-align: center;
}

.mini-stats strong {
  display: block;
  color: #fff;
  font-size: 1.4rem;
}

.mini-stats span {
  color: #cbd4fa;
  font-size: 0.7rem;
}

.summary {
  margin: 18px 0 0;
  color: #dce3ff;
  line-height: 1.5;
}

.home-section {
  margin-top: 24px;
  padding: clamp(24px, 4vw, 42px);
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
}

.section-heading p,
.utility-section p,
.phrase-section p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.5;
}

.path-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
  color: var(--muted);
  font-size: 0.76rem;
}

.path-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.dot.available {
  background: var(--pink);
}

.dot.in-progress {
  background: var(--violet);
}

.dot.completed {
  background: var(--good);
}

.dot.locked {
  background: #bbc0cf;
}

.challenge-path {
  display: grid;
  grid-template-columns: repeat(10, minmax(72px, 1fr));
  gap: 10px;
  margin-top: 26px;
}

.day-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 118px;
  border: 2px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  transition: transform 0.15s, border-color 0.15s;
}

.day-card:hover:not(:disabled) {
  transform: translateY(-3px);
  border-color: var(--pink);
}

.day-card:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.day-card .day-number {
  margin-bottom: auto;
  color: var(--navy);
  font-size: 1.5rem;
  font-weight: 950;
}

.day-card .day-format {
  margin-top: 15px;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 850;
  line-height: 1.2;
  overflow-wrap: anywhere;
  text-transform: uppercase;
}

.day-card.completed {
  border-color: var(--good);
  background: var(--good-bg);
}

.day-card.in-progress {
  border-color: var(--violet);
  background: #f5edff;
}

.day-card.missed {
  border-color: #ef9abd;
  background: var(--pink-soft);
}

.day-card.today::after {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--pink);
  box-shadow: 0 0 0 4px rgba(255, 63, 155, 0.16);
  content: "";
}

.resume-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 18px;
}

.resume-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  background: var(--soft);
}

.resume-card strong,
.resume-card span {
  display: block;
}

.resume-card span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.8rem;
}

.insight-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 20px;
}

.insight-grid article {
  border: 1px solid var(--line);
  border-radius: 17px;
  padding: 19px;
  background: var(--soft);
}

.insight-grid span,
.insight-grid strong,
.insight-grid small {
  display: block;
}

.insight-grid span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}

.insight-grid strong {
  margin: 14px 0 7px;
  color: var(--navy);
  font-size: 1.35rem;
}

.insight-grid small {
  color: var(--muted);
  line-height: 1.4;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-top: 22px;
}

.mock-official-heading {
  margin-top: 2.4rem;
  margin-bottom: 0;
  padding-top: 2rem;
  border-top: 2px solid var(--navy);
  color: var(--navy);
  font-size: 1.5rem;
  font-weight: 900;
}

.feature-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: 210px;
  border: 2px solid var(--navy);
  border-radius: 19px;
  padding: 18px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  text-decoration: none;
  transition: transform 0.18s, box-shadow 0.18s;
}

.feature-card:hover {
  transform: translateY(-4px) rotate(-0.5deg);
  box-shadow: 6px 7px 0 var(--navy);
}

.feature-icon {
  display: grid;
  min-width: 46px;
  height: 42px;
  margin-bottom: auto;
  padding: 0 8px;
  place-items: center;
  border-radius: 12px;
  background: var(--navy);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 950;
}

.feature-card strong {
  margin-top: 28px;
  color: var(--navy);
  font-size: 1.1rem;
}

.feature-card > span:last-child {
  margin-top: 6px;
  color: #52576c;
  font-size: 0.84rem;
  line-height: 1.4;
}

.pink-card {
  background: #fff0f7;
}

.blue-card {
  background: #edf1ff;
}

.lime-card {
  background: #f5ffd2;
}

.violet-card {
  background: #f5edff;
}

.navy-card {
  background: var(--navy);
}

.navy-card strong,
.navy-card > span:last-child {
  color: #fff;
}

.navy-card .feature-icon {
  background: var(--pink);
}

.phrase-section {
  display: grid;
  grid-template-columns: 0.72fr 1.28fr;
  align-items: start;
  gap: 30px;
}

.phrase-form {
  display: grid;
  grid-template-columns: 1fr 130px auto;
  gap: 8px;
}

.phrase-list {
  display: flex;
  grid-column: 2;
  flex-wrap: wrap;
  gap: 8px;
}

.weak-areas-section {
  margin-top: 0;
}

.weak-areas-list {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.weak-area-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 13px 18px;
  background: var(--soft);
}

.weak-area-label {
  font-weight: 700;
  color: var(--navy);
  font-size: 0.95rem;
}

.weak-area-count {
  font-size: 0.82rem;
  font-weight: 850;
  color: var(--bad, #c0392b);
  background: color-mix(in srgb, var(--bad, #c0392b) 10%, transparent);
  border-radius: 999px;
  padding: 3px 10px;
}

.result-weak-areas {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.result-weak-areas-lead {
  margin: 6px 0 0;
  font-size: 0.9rem;
  color: var(--muted, #5f6980);
}

.result-weak-areas-list {
  margin-top: 14px;
}

.phrase-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 8px 7px 12px;
  background: var(--soft);
  color: var(--navy);
  font-size: 0.84rem;
}

.phrase-chip small {
  color: var(--muted);
}

.phrase-chip button {
  display: grid;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 50%;
  place-items: center;
  background: #fff;
  color: var(--bad);
  cursor: pointer;
}

.create-exercise-cta-section {
  display: flex;
  justify-content: center;
  padding: 8px 0 4px;
}

.create-exercise-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border: 2px solid var(--violet, #8d42f5);
  border-radius: 999px;
  background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  box-shadow: 0 6px 0 rgba(109, 40, 217, 0.32);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.create-exercise-cta:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 0 rgba(109, 40, 217, 0.32);
}

.create-exercise-cta:active:not(:disabled) {
  transform: translateY(1px);
  box-shadow: 0 3px 0 rgba(109, 40, 217, 0.32);
}

.utility-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.file-button input {
  display: none;
}

.session-bar {
  position: sticky;
  z-index: 20;
  top: 10px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  margin-bottom: 12px;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
}

.session-identity {
  text-align: center;
}

.session-identity strong,
.session-identity span {
  display: block;
}

.session-identity strong {
  color: var(--navy);
}

.session-identity span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.75rem;
}

.timer-cluster {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  border-radius: 16px;
  padding: 7px 8px 7px 13px;
  background: var(--navy);
  color: #fff;
}

.timer-copy {
  text-align: right;
}

.timer-copy span,
.timer-copy strong {
  display: block;
}

.timer-copy span {
  color: #cbd4fa;
  font-size: 0.65rem;
}

.timer-copy strong {
  font-variant-numeric: tabular-nums;
  font-size: 1.2rem;
}

.session-progress {
  height: 8px;
  margin: 0 3px 16px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5e6ee;
}

.session-progress > div {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--pink), var(--violet), var(--blue));
  transition: width 0.25s;
}

.guide-card {
  display: grid;
  grid-template-columns: 1fr 300px;
  align-items: center;
  min-height: 600px;
  overflow: hidden;
}

.guide-card > div:first-child {
  padding: clamp(30px, 5vw, 70px);
}

.guide-card h1 {
  max-width: 850px;
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  max-width: 720px;
  margin: 26px 0;
}

.guide-grid article {
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 15px;
  background: var(--soft);
}

.guide-grid span,
.guide-grid strong {
  display: block;
}

.guide-grid span {
  color: var(--muted);
  font-size: 0.76rem;
}

.guide-grid strong {
  margin-top: 5px;
  color: var(--navy);
}

.strategy-card {
  max-width: 720px;
  margin-bottom: 26px;
  border-radius: 16px;
  padding: 18px;
  background: #f5ffd2;
}

.strategy-card span {
  display: block;
  margin-bottom: 6px;
  color: var(--lime-dark);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.strategy-card p {
  margin: 0;
  color: #384600;
  line-height: 1.5;
}

.guide-deco {
  display: grid;
  height: 100%;
  min-height: 600px;
  place-content: center;
  background:
    radial-gradient(circle at 50% 30%, var(--pink) 0, transparent 10rem),
    linear-gradient(160deg, var(--violet), var(--blue), var(--navy));
  color: #fff;
  text-align: center;
}

.guide-deco span {
  font-size: 9rem;
  font-weight: 950;
  line-height: 0.75;
  letter-spacing: -0.12em;
}

.guide-deco small {
  margin-top: 24px;
  color: var(--lime);
  font-size: 1.2rem;
  font-weight: 950;
  line-height: 1.1;
  text-transform: uppercase;
}

.exercise-shell {
  padding: 18px;
}

.target-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 12px;
  border-radius: 14px;
  padding: 12px 15px;
  background: var(--lime);
  color: var(--navy);
}

.target-banner span {
  font-size: 0.84rem;
}

.exercise-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 5px 14px;
}

.tag {
  display: inline-block;
  border-radius: 999px;
  padding: 7px 11px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 900;
}

.exercise-layout {
  display: grid;
  grid-template-columns: minmax(380px, 0.93fr) minmax(460px, 1.07fr);
  gap: 16px;
  align-items: start;
}

.exercise-layout.single-pane {
  grid-template-columns: minmax(0, 820px);
  justify-content: center;
}

.stimulus-pane,
.item-pane {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
}

.stimulus-pane {
  position: sticky;
  top: 112px;
  max-height: calc(100vh - 135px);
  overflow: auto;
  padding: clamp(20px, 3vw, 34px);
  background: #fffcf3;
  overscroll-behavior: contain;
}

.stimulus-pane:empty {
  display: none;
}

.stimulus-pane h2 {
  font-size: clamp(1.7rem, 2.6vw, 2.5rem);
}

.stimulus-pane p {
  color: #343746;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.06rem;
  line-height: 1.72;
}

.readable-sentence {
  border-radius: 5px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  transition: background 0.18s, box-shadow 0.18s;
}

.readable-sentence.evidence-highlight {
  padding: 2px 3px;
  background: #dff7d2;
  box-shadow: 0 0 0 2px rgba(46, 140, 69, 0.16);
}

.vocab-word {
  border-radius: 4px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.vocab-word:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.vocab-word.user-highlight {
  padding: 1px 2px;
  background: #fff09a;
  box-shadow: inset 0 -2px 0 #e5bc24;
}

.stimulus-pane .instructions {
  margin-bottom: 20px;
  border-left: 4px solid var(--pink);
  padding-left: 13px;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.88rem;
  line-height: 1.45;
}

.short-text {
  border: 1px solid #e1ddcf;
  border-radius: 14px;
  padding: 16px;
  background: #fff;
}

.task-stack,
.situation-list,
.listening-statements {
  display: grid;
  gap: 10px;
  margin: 16px 0;
}

.situation-list,
.listening-statements {
  padding-left: 28px;
}

.situation-list li,
.listening-statements li {
  border: 1px solid #e1ddcf;
  border-radius: 12px;
  padding: 10px 12px;
  background: #fff;
  color: #343746;
  line-height: 1.45;
}

.active-task {
  border-color: var(--pink) !important;
  background: var(--pink-soft) !important;
  box-shadow: 0 0 0 2px rgba(255, 63, 155, 0.1);
}

.short-text-label {
  display: block;
  margin-bottom: 8px;
  color: var(--pink-dark);
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.shared-options,
.ads-list,
.leitpunkte-list,
.prompt-list {
  display: grid;
  gap: 8px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.shared-options li,
.ad-card,
.leitpunkte-list li,
.prompt-list li {
  border: 1px solid #e1ddcf;
  border-radius: 12px;
  padding: 11px 12px;
  background: #fff;
  color: #343746;
  font-family: inherit;
  font-size: 0.88rem;
  line-height: 1.4;
}

.ad-card strong {
  display: block;
  margin-bottom: 3px;
  color: var(--navy);
}

.stimulus-text {
  white-space: pre-line;
}

.stimulus-text mark {
  border-radius: 4px;
  padding: 1px 3px;
  background: #f3ffc0;
}

.prep-time {
  border-left: 4px solid var(--blue);
  padding-left: 12px;
  font-family: inherit !important;
  font-size: 0.9rem !important;
}

.source-message,
.position-grid article {
  margin-top: 18px;
  border: 1px solid #e1ddcf;
  border-radius: 15px;
  padding: 16px;
  background: #fff;
}

.source-message > span,
.position-grid span {
  color: var(--pink-dark);
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.source-message p,
.position-grid p {
  margin-bottom: 0;
  white-space: pre-line;
}

.position-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.position-grid article:nth-child(2) {
  background: var(--blue-soft);
}

.item-pane {
  min-height: 520px;
  padding: clamp(22px, 3vw, 38px);
}

.question {
  max-width: 900px;
  margin: 14px 0 22px;
  font-size: clamp(1.55rem, 3vw, 2.4rem);
  line-height: 1.18;
}

.question-heading {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  justify-content: space-between;
}

.flag-item-button {
  flex: 0 0 auto;
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 9px 11px;
  background: #fff;
  color: var(--navy);
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 850;
}

.flag-item-button.selected {
  border-color: var(--pink);
  background: var(--pink-soft);
  color: var(--pink-dark);
}

.options {
  display: grid;
  gap: 10px;
}

.word-bank-options {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.word-bank-options .option {
  min-height: 50px;
  padding: 9px;
}

.word-bank-options .option-letter {
  width: 28px;
  height: 28px;
}

.option {
  display: flex;
  width: 100%;
  align-items: flex-start;
  gap: 12px;
  min-height: 58px;
  border: 2px solid var(--line);
  border-radius: 15px;
  padding: 13px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  transition: transform 0.12s, border-color 0.12s;
}

.option > span:last-child {
  min-width: 0;
  overflow-wrap: anywhere;
  white-space: normal;
  line-height: 1.45;
}

.option:hover:not(:disabled) {
  transform: translateX(3px);
  border-color: var(--pink);
}

.option.bank-used {
  border-style: dashed;
  opacity: 0.42;
}

.option-letter {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 9px;
  background: var(--navy);
  color: #fff;
  font-weight: 950;
}

.option.correct {
  border-color: var(--good);
  background: var(--good-bg);
}

.option.wrong {
  border-color: var(--bad);
  background: var(--bad-bg);
}

.option.chosen:not(.correct):not(.wrong) {
  border-color: var(--blue);
  background: var(--blue-soft);
}

.feedback,
.confidence,
.tutor-panel,
.productive-area,
.audio-controls {
  margin-top: 16px;
  border-radius: 17px;
  padding: 17px;
}

.feedback {
  background: var(--soft);
  line-height: 1.55;
}

.feedback strong {
  display: block;
  margin-bottom: 5px;
  color: var(--navy);
}

.feedback-solution,
.feedback-explanation {
  display: block;
  margin-top: 8px;
}

.feedback-solution {
  color: var(--navy);
  font-weight: 750;
}

.feedback-explanation {
  color: var(--ink);
}

.evidence-box {
  margin-top: 12px;
  border-left: 4px solid var(--lime);
  padding: 9px 12px;
  background: #f7ffd9;
  color: #3d490d;
  font-family: Georgia, "Times New Roman", serif;
}

.audio-rate {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  color: var(--navy);
  font-size: 0.8rem;
  font-weight: 800;
}

.audio-rate select {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 7px 9px;
  background: #fff;
  color: var(--navy);
  font: inherit;
}

.writing-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(210px, 0.36fr);
  gap: 14px;
  align-items: start;
}

.writing-workspace textarea {
  width: 100%;
}

.writing-checklist {
  display: grid;
  gap: 10px;
  border: 1px solid #d8dcef;
  border-radius: 15px;
  padding: 14px;
  background: #f7f8ff;
}

.writing-checklist label {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  align-items: start;
  color: #343746;
  font-size: 0.82rem;
  line-height: 1.35;
}

.writing-checklist input {
  margin-top: 2px;
  accent-color: var(--pink);
}

.result-flags {
  margin-top: 18px;
  border: 1px solid #ef9abd;
  border-radius: 18px;
  padding: 16px 18px;
  background: var(--pink-soft);
}

.result-flags p {
  margin: 5px 0 10px;
}

.result-flags ul {
  margin: 0;
  padding-left: 20px;
}

.confidence {
  border: 1px solid var(--line);
  background: #fff;
}

.confidence-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.confidence-options button,
.tutor-button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 9px 12px;
  background: #fff;
  color: var(--navy);
  cursor: pointer;
  font-weight: 800;
}

.confidence-options button.selected {
  border-color: var(--blue);
  background: var(--blue-soft);
}

.tutor-panel {
  border: 2px solid #ccd7ff;
  background: #f2f5ff;
}

.tutor-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.unverified {
  border-radius: 999px;
  padding: 5px 9px;
  background: #fff2cc;
  color: #75510a;
  font-size: 0.72rem;
  font-weight: 850;
  white-space: nowrap;
}

.custom-question {
  margin-top: 16px;
}

.tutor-loading,
.tutor-answer {
  margin-top: 16px;
  border-radius: 14px;
  padding: 15px;
  background: #fff;
}

.tutor-loading {
  color: var(--muted);
  font-weight: 800;
}

.tutor-answer {
  line-height: 1.55;
}

.tutor-answer dl {
  margin: 0;
}

.tutor-answer dt {
  margin-top: 12px;
  color: var(--navy);
  font-weight: 900;
}

.tutor-answer dt:first-child {
  margin-top: 0;
}

.tutor-answer dd {
  margin: 3px 0 0;
}

/* Vergleich mode — side-by-side comparison grid */
.compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 16px;
  margin: 0;
}

.compare-grid dt {
  margin-top: 0;
  padding-bottom: 4px;
  border-bottom: 2px solid var(--pink);
  color: var(--navy);
  font-weight: 900;
}

.compare-grid dd {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.45;
}

.compare-example {
  font-style: italic;
  color: var(--muted);
}

.compare-quick-rule {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  background: #f0f3ff;
  font-size: 0.88rem;
  line-height: 1.5;
}

.audio-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  background: var(--soft);
}

.audio-controls span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.productive-area {
  border: 1px solid var(--line);
  background: var(--soft);
}

.productive-area textarea {
  background: #fff;
}

.productive-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
}

.productive-footer span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.conversation {
  display: grid;
  gap: 9px;
  margin-bottom: 16px;
}

.message {
  max-width: 88%;
  border-radius: 15px;
  padding: 12px 14px;
  line-height: 1.45;
}

.message.learner {
  margin-left: auto;
  background: var(--navy);
  color: #fff;
}

.message.partner {
  background: #fff;
  color: var(--ink);
}

.message.feedback-message {
  border-left: 4px solid var(--lime);
  background: #f7ffd9;
  color: #3d490d;
  font-size: 0.86rem;
}

.quiz-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 11px;
  margin-top: 20px;
}

.result-card {
  display: grid;
  grid-template-columns: minmax(360px, 0.8fr) minmax(0, 1.2fr);
  min-height: 650px;
  overflow: hidden;
}

.result-card.no-art {
  grid-template-columns: 1fr;
}

.result-artwork-wrap {
  min-height: 650px;
}

.result-artwork-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.result-copy {
  align-self: center;
  padding: clamp(30px, 5vw, 70px);
}

.result-copy h1 {
  font-size: clamp(3.2rem, 6vw, 6.2rem);
}

.motivation-chip {
  width: fit-content;
  margin: 18px 0;
  border: 2px solid var(--navy);
  border-radius: 999px;
  padding: 9px 14px;
  background: var(--lime);
  color: var(--navy);
  box-shadow: 3px 4px 0 var(--navy);
  font-weight: 900;
}

.result-celebration {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.result-celebration .motivation-chip {
  margin: 8px 0;
}

.result-celebration .text-button {
  color: var(--pink-dark);
}

.result-numbers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 28px 0;
}

.result-numbers div {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 15px;
  background: var(--soft);
}

.result-numbers strong,
.result-numbers span {
  display: block;
}

.result-numbers strong {
  color: var(--pink);
  font-size: clamp(1.7rem, 3vw, 2.7rem);
  letter-spacing: -0.06em;
}

.result-numbers span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.74rem;
}

.result-insights {
  display: grid;
  gap: 8px;
}

.result-insight {
  border-left: 4px solid var(--blue);
  padding: 9px 12px;
  background: var(--blue-soft);
  color: var(--navy);
  line-height: 1.45;
}

footer {
  padding: 30px 0 5px;
  color: #808497;
  font-size: 0.78rem;
  text-align: center;
}

.pulse-list {
  display: grid;
  gap: 14px;
}

.pulse-card {
  overflow: hidden;
  border: 1px solid rgba(20, 25, 73, 0.14);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 12px 35px rgba(20, 25, 73, 0.07);
}

.pulse-card summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 22px;
  cursor: pointer;
  list-style: none;
}

.pulse-card summary::-webkit-details-marker {
  display: none;
}

.pulse-card summary span {
  display: grid;
  gap: 3px;
}

.pulse-card summary small {
  color: var(--muted);
  font-weight: 700;
}

.pulse-card summary b {
  color: var(--pink);
  font-size: 1.45rem;
}

.pulse-body {
  display: grid;
  gap: 16px;
  padding: 0 22px 22px;
  border-top: 1px solid rgba(20, 25, 73, 0.08);
}

.pulse-positive {
  margin-top: 18px;
  font-size: 1.05rem;
  font-weight: 700;
}

.pulse-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.pulse-metrics span {
  display: grid;
  gap: 3px;
  padding: 13px;
  border-radius: 15px;
  background: var(--blue-soft);
  color: var(--navy);
  font-size: 0.85rem;
}

.pulse-metrics strong {
  font-size: 1.15rem;
}

.pulse-strategy {
  padding: 16px;
  border-left: 5px solid var(--lime);
  border-radius: 8px 16px 16px 8px;
  background: rgba(198, 255, 65, 0.14);
}

.pulse-strategy p,
.pulse-encouragement {
  margin: 5px 0 0;
}

.new-pulse-notice {
  display: grid;
  gap: 5px;
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--pink), var(--violet));
  color: #fff;
}

.difficulty-check {
  margin-top: 18px;
  padding: 20px;
  border: 1px solid rgba(20, 25, 73, 0.12);
  border-radius: 20px;
  background: #fff;
}

.difficulty-check h2 {
  margin: 6px 0;
}

.difficulty-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  margin-top: 16px;
}

.difficulty-options button {
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid rgba(20, 25, 73, 0.16);
  border-radius: 14px;
  background: var(--blue-soft);
  color: var(--navy);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.difficulty-options button:hover {
  border-color: var(--pink);
  background: #fff;
}

.difficulty-check-result {
  color: var(--navy);
  font-weight: 700;
}

@media (max-width: 760px) {
  .pulse-metrics,
  .difficulty-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

code {
  border-radius: 5px;
  padding: 1px 5px;
  background: rgba(16, 27, 72, 0.08);
}

@media (min-width: 1180px) {
  .exercise-layout {
    min-height: calc(100vh - 175px);
  }
}

@media (max-width: 1180px) {
  .challenge-path {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .card-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .resume-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 1100px) {
  .shell {
    width: min(100% - 24px, 1440px);
  }

  .login-card,
  .home-hero,
  .dashboard-grid,
  .guide-card,
  .result-card,
  .phrase-section {
    grid-template-columns: 1fr;
  }

  .login-art {
    order: -1;
    max-height: none;
    object-position: center;
  }

  .home-hero {
    min-height: auto;
  }

  .hero-art-wrap {
    min-height: 0;
  }

  .progress-card {
    min-height: 460px;
  }

  .guide-deco {
    display: none;
  }

  .exercise-layout {
    grid-template-columns: 1fr;
  }

  .writing-workspace {
    grid-template-columns: 1fr;
  }

  .stimulus-pane {
    position: relative;
    top: auto;
    max-height: none;
  }

  .phrase-list {
    grid-column: 1;
  }

  .result-artwork-wrap {
    min-height: 430px;
    max-height: 520px;
  }
}

@media (max-width: 680px) {
  .shell {
    width: min(100% - 16px, 1440px);
  }

  .panel,
  .login-card,
  .home-hero,
  .today-card,
  .progress-card,
  .home-section,
  .session-bar,
  .guide-card,
  .exercise-shell,
  .result-card {
    border-radius: 20px;
  }

  h1,
  .hero-copy h1,
  .login-copy h1 {
    font-size: clamp(3rem, 15vw, 4.8rem);
  }

  .hero-copy,
  .login-copy {
    padding: 27px 22px;
  }

  .auth-choice {
    grid-template-columns: 1fr;
  }

  .hero-art-wrap {
    min-height: 0;
  }
  .result-art-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .scene-strip {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 10px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }
  .scene-card { flex: 0 0 240px; scroll-snap-align: start; }

  .decorative-strip {
    grid-template-columns: 1fr;
  }

  .section-heading,
  .utility-section,
  .tutor-heading,
  .productive-footer,
  .target-banner {
    align-items: stretch;
    flex-direction: column;
  }

  .question-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .flag-item-button {
    align-self: flex-start;
    margin-top: -8px;
  }

  .input-row,
  .main-actions,
  .utility-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .input-row .button,
  .main-actions .button,
  .utility-actions .button {
    width: 100%;
  }

  .challenge-path {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .day-card {
    min-height: 96px;
    padding: 10px;
  }

  .day-card .day-number {
    font-size: 1.35rem;
  }

  .day-card .day-format {
    font-size: 0.61rem;
  }

  .card-grid,
  .insight-grid,
  .resume-list,
  .result-numbers {
    grid-template-columns: 1fr;
  }

  .feature-card {
    min-height: 165px;
  }

  .phrase-form {
    grid-template-columns: 1fr;
  }

  .session-bar {
    position: relative;
    top: auto;
    grid-template-columns: 1fr auto;
  }

  .session-identity {
    display: none;
  }

  .session-bar .text-button {
    text-align: left;
  }

  .guide-grid,
  .quiz-controls {
    grid-template-columns: 1fr;
  }

  .exercise-shell {
    padding: 10px;
  }

  .item-pane,
  .stimulus-pane {
    padding: 19px 16px;
  }

  .audio-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .position-grid,
  .word-bank-options {
    grid-template-columns: 1fr;
  }

  .unverified {
    align-self: flex-start;
  }
}

.notice.critical {
  border: 2px solid #ff5370;
  background: #7d1029;
  color: #fff;
}

.storage-banner {
  position: sticky;
  top: 10px;
  z-index: 80;
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 8px 0 16px;
  box-shadow: 0 12px 34px rgba(75, 6, 25, 0.28);
}

.storage-banner code {
  color: inherit;
}

.save-failure-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(19, 8, 28, 0.72);
  backdrop-filter: blur(10px);
}

.save-failure-overlay.hidden {
  display: none;
}

.save-failure-card {
  width: min(520px, 100%);
  padding: clamp(24px, 5vw, 40px);
  border: 3px solid #ff5b6e;
  border-radius: 28px;
  background: #fff8fa;
  box-shadow: 0 24px 80px rgba(34, 6, 18, 0.35);
}

.save-failure-card h2 {
  margin: 8px 0 12px;
  color: #9b1235;
}

.save-failure-card p {
  margin: 0 0 22px;
}

body.save-blocked {
  overflow: hidden;
}

.delete-confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(19, 8, 28, 0.72);
  backdrop-filter: blur(10px);
}

.delete-confirm-overlay.hidden {
  display: none;
}

.delete-confirm-card {
  width: min(480px, 100%);
  padding: clamp(24px, 5vw, 40px);
  border: 3px solid #c0392b;
  border-radius: 28px;
  background: #fff8f8;
  box-shadow: 0 24px 80px rgba(34, 6, 18, 0.35);
}

.delete-confirm-card h2 {
  margin: 8px 0 12px;
  color: #9b1221;
}

.delete-confirm-card p {
  margin: 0 0 24px;
  color: #3d2222;
}

.delete-confirm-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.button.danger {
  background: #c0392b;
  color: #fff;
  border-color: #c0392b;
}

.button.danger:hover {
  background: #9b1221;
  border-color: #9b1221;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.hero-copy .button {
  margin-top: 0;
}

/* Streak fire — lights up when streak ≥ 2 */
.mini-stats strong.streak-hot {
  color: #ff8c00;
  text-shadow: 0 0 12px rgba(255, 140, 0, 0.55);
}

.readiness-screen {
  display: grid;
  gap: 22px;
}

.readiness-header,
.exam-date-form,
.readiness-section-card,
.ai-generator-section {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-soft);
}

.readiness-header {
  padding: clamp(24px, 4vw, 52px);
  color: #fff;
  background: linear-gradient(135deg, #101b48, #4e248d 62%, #d42d8d);
}

.readiness-header .text-button {
  color: #fff;
  margin-bottom: 24px;
}

.readiness-header p {
  margin-bottom: 0;
}

.exam-date-form {
  padding: 22px;
}

.exam-date-form label {
  display: block;
  margin-bottom: 10px;
  font-weight: 800;
}

.readiness-hero-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.readiness-hero-grid article {
  min-height: 160px;
  padding: 24px;
  border-radius: 24px;
  color: #fff;
  background: #2845d6;
}

.readiness-hero-grid article:nth-child(2) {
  background: #d42d8d;
}

.readiness-hero-grid article:nth-child(3) {
  color: #101b48;
  background: #c8ff4a;
}

.readiness-hero-grid span,
.readiness-hero-grid small {
  display: block;
}

.readiness-hero-grid strong {
  display: block;
  margin: 15px 0 8px;
  font-size: clamp(1.7rem, 3vw, 2.8rem);
}

.readiness-game-card {
  padding: 24px;
  border-radius: 24px;
  color: #fff;
  background: #101b48;
}

.readiness-game-card span,
.readiness-game-card small {
  display: block;
}

.readiness-game-card strong {
  display: block;
  margin: 12px 0 6px;
  font-size: clamp(1.4rem, 2.4vw, 2rem);
}

.readiness-sections {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.readiness-section-card {
  padding: 22px;
}

.readiness-section-heading {
  display: flex;
  justify-content: space-between;
  gap: 18px;
}

.readiness-section-heading span,
.readiness-section-heading strong {
  display: block;
}

.readiness-section-heading strong {
  margin-top: 5px;
  font-size: 1.5rem;
}

.readiness-meter {
  height: 10px;
  margin: 18px 0 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #e4e7f1;
}

.readiness-meter i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2845d6, #d42d8d);
}

.readiness-meter i.provisional {
  background: repeating-linear-gradient(
    135deg,
    var(--blue),
    var(--blue) 8px,
    #8fa8ff 8px,
    #8fa8ff 16px
  );
}

.manual-score {
  display: grid;
  grid-template-columns: 1fr 92px;
  gap: 12px;
  align-items: center;
  margin-top: 16px;
  font-size: 0.86rem;
  font-weight: 700;
}

.manual-score input {
  width: 100%;
}

.readiness-caution {
  padding: 18px 22px;
  border-radius: 18px;
  background: #fff4c4;
  color: #4a3a00;
}

.ai-generator-section {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(440px, 1.1fr);
  gap: 28px;
  align-items: center;
}

.ai-block-form {
  display: grid;
  /* Keep the topic field generous: examples and real topics should remain readable. */
  grid-template-columns: 150px minmax(300px, 1fr) auto;
  gap: 10px;
}

.ai-generator-section .form-message {
  grid-column: 1 / -1;
}

.notes-panel {
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid #d8dcef;
  border-radius: 18px;
  background: #f7f8ff;
}

.resurfaced-notes {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}

.resurfaced-notes article {
  padding: 12px 14px;
  border-radius: 14px;
  background: #fff0fa;
}

.resurfaced-notes span {
  color: #a91a70;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.resurfaced-notes p {
  margin: 5px 0 0;
  white-space: pre-wrap;
}

.notes-form {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.notes-form label {
  font-weight: 800;
}

@media (max-width: 1080px) {
  .readiness-hero-grid,
  .readiness-sections,
  .ai-generator-section {
    grid-template-columns: 1fr;
  }

  .ai-block-form {
    grid-template-columns: 1fr;
  }

  .storage-banner {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── Chat screen ─────────────────────────────────────────────────────────── */
.chat-screen {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  max-width: 780px;
  margin: 0 auto;
  padding: 0;
}

.chat-screen-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 10;
}

.chat-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-align: center;
}

.chat-title strong {
  font-size: 0.9rem;
  color: var(--navy);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-bubble {
  max-width: 78%;
  padding: 11px 15px;
  border-radius: 18px;
  line-height: 1.5;
  font-size: 0.93rem;
  white-space: pre-wrap;
  word-break: break-word;
}

.chat-bubble--user {
  align-self: flex-end;
  background: var(--navy);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.chat-bubble--assistant {
  align-self: flex-start;
  background: #f0f3ff;
  color: var(--navy);
  border-bottom-left-radius: 4px;
}

.chat-typing {
  padding: 0 20px 8px;
  color: var(--muted);
  font-size: 0.82rem;
  font-style: italic;
}

.chat-form {
  display: flex;
  gap: 10px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  background: #fff;
  position: sticky;
  bottom: 0;
}

.chat-input {
  flex: 1;
  min-height: 44px;
  padding: 10px 14px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  font-size: 0.95rem;
  background: #fafbff;
  outline: none;
  transition: border-color 0.15s;
}

.chat-input:focus {
  border-color: var(--pink);
}

.chat-send {
  min-width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 999px;
  font-size: 1.1rem;
}

.site-footer {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 36px 18px 8px;
  color: var(--muted);
  text-align: center;
}

.site-footer p {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.5;
}

.footer-logo {
  display: block;
  width: 88px;
  height: 88px;
  object-fit: contain;
}

/* --- Der·Die·Das Artikel-Spiel --- */
.game-screen {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 560px;
  margin: 0 auto;
  width: 100%;
}

.game-round-label {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--navy, #101b48);
}

.game-progress {
  height: 10px;
  border-radius: 999px;
  background: rgba(16, 27, 72, 0.12);
  overflow: hidden;
}

.game-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: var(--navy, #101b48);
  transition: width 0.3s ease;
}

.game-play-area,
.game-result-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
  padding: 24px 16px 40px;
}

.game-question-hint {
  margin: 0;
  opacity: 0.7;
}

.game-noun {
  margin: 0;
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.game-article-buttons {
  display: flex;
  gap: 12px;
}

.game-article-button {
  font-size: 1.3rem;
  font-weight: 700;
  padding: 14px 28px;
  border-radius: 16px;
  border: 2px solid rgba(16, 27, 72, 0.25);
  background: #fff;
  cursor: pointer;
  transition: transform 0.1s ease, border-color 0.15s ease;
}

.game-article-button:not(:disabled):hover {
  transform: translateY(-2px);
  border-color: var(--navy, #101b48);
}

.game-article-correct {
  border-color: #1a7f4b;
  background: #e2f6ea;
}

.game-article-wrong {
  border-color: #c0392b;
  background: #fde8e4;
}

.game-feedback {
  min-height: 3em;
  margin: 0;
  max-width: 420px;
}

.game-feedback-right {
  color: #1a7f4b;
  font-weight: 600;
}

.game-feedback-wrong {
  color: #7c2d1e;
}

.game-stats-line {
  margin: 0;
  opacity: 0.8;
}

.game-result-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}
