:root {
  color-scheme: light;
  --bg: #f7fbf8;
  --surface: #ffffff;
  --surface-soft: #eef7f2;
  --ink: #21312c;
  --muted: #5b6d66;
  --line: #d8e6df;
  --primary: #277a68;
  --primary-strong: #155f51;
  --primary-soft: #dff2ec;
  --accent: #8065b0;
  --accent-soft: #ece5f8;
  --sun: #b7791f;
  --sun-soft: #fff3d6;
  --danger-soft: #feeceb;
  --shadow: 0 14px 38px rgba(31, 49, 43, 0.1);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(223, 242, 236, 0.72), rgba(247, 251, 248, 0) 360px),
    var(--bg);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  font-size: 16px;
  line-height: 1.55;
}

button,
input,
select {
  font: inherit;
}

button,
.button {
  min-height: 48px;
  border: 0;
  border-radius: var(--radius);
  background: var(--primary);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 700;
  padding: 0.85rem 1.05rem;
  text-decoration: none;
  transition: background-color 160ms ease, transform 160ms ease;
}

button:hover,
.button:hover {
  background: var(--primary-strong);
}

button:focus-visible,
.button:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(128, 101, 176, 0.35);
  outline-offset: 3px;
}

button:active,
.button:active {
  transform: translateY(1px);
}

button.secondary,
.button.secondary {
  background: var(--primary-soft);
  color: var(--primary-strong);
}

button.ghost,
.button.ghost {
  background: transparent;
  color: var(--primary-strong);
  border: 1px solid var(--line);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

input,
select {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  min-height: 48px;
  padding: 0.75rem;
  width: 100%;
}

input::placeholder {
  color: #82948d;
}

input:hover,
select:hover {
  border-color: #b8cec4;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: 0.5rem;
  transform: translateY(-150%);
  background: var(--ink);
  color: #fff;
  padding: 0.5rem 0.75rem;
  z-index: 10;
}

.skip-link:focus {
  transform: translateY(0);
}

.shell {
  min-height: 100vh;
}

.shell.dark-mode {
  --bg: #111c1a;
  --surface: #1b2a27;
  --surface-soft: #203631;
  --ink: #f0f7f3;
  --muted: #bad0c8;
  --line: #36524b;
  --primary: #58b89d;
  --primary-strong: #89dcc4;
  --primary-soft: #203f38;
  --accent: #b59ade;
  --accent-soft: #302642;
  --sun-soft: #3c3018;
  background:
    linear-gradient(180deg, rgba(32, 54, 49, 0.88), rgba(17, 28, 26, 0) 360px),
    var(--bg);
  color-scheme: dark;
}

.shell.calm-theme-mode:not(.dark-mode) {
  --bg: #f7fbf8;
  --surface-soft: #f0f8f4;
  --primary: #2d806c;
  --primary-soft: #e4f5ef;
}

.shell.dark-mode.calm-theme-mode {
  --surface-soft: #243a35;
  --primary: #66c3aa;
  --primary-soft: #21453d;
}

.shell.dark-mode,
.shell.dark-mode h1,
.shell.dark-mode h2,
.shell.dark-mode h3,
.shell.dark-mode h4,
.shell.dark-mode p,
.shell.dark-mode li,
.shell.dark-mode label,
.shell.dark-mode strong,
.shell.dark-mode span,
.shell.dark-mode small,
.shell.dark-mode .page-title,
.shell.dark-mode .lead,
.shell.dark-mode .eyebrow {
  color: #ffffff;
}

.shell.large-buttons-mode button,
.shell.large-buttons-mode .button,
.shell.large-buttons-mode .choice-button {
  font-size: 1.08rem;
  min-height: 64px;
  padding: 1rem 1.2rem;
}

.shell.large-buttons-mode .choice-grid,
.shell.large-buttons-mode .emotion-grid {
  gap: 0.95rem;
}

.shell.reduced-animation-mode *,
.shell.reduced-animation-mode *::before,
.shell.reduced-animation-mode *::after {
  animation-duration: 0.001ms !important;
  animation-iteration-count: 1 !important;
  scroll-behavior: auto !important;
  transition-duration: 0.001ms !important;
}

.shell.reduced-animation-mode button:active,
.shell.reduced-animation-mode .button:active {
  transform: none;
}

.shell.support-adhd-mode .progress-track {
  height: 16px;
}

.shell.support-adhd-mode .quest-card,
.shell.support-adhd-mode .instruction-panel {
  border-width: 2px;
}

.shell.support-autism-mode .instruction-panel,
.shell.support-autism-mode .quest-card,
.shell.support-autism-mode .schedule-list li {
  box-shadow: none;
}

.shell.support-autism-mode .feedback {
  font-weight: 700;
}

.shell.support-dyslexia-mode {
  letter-spacing: 0.03em;
  word-spacing: 0.08em;
}

.shell.support-dyslexia-mode .activity-prompt,
.shell.support-dyslexia-mode .instruction-text {
  line-height: 1.35;
}

.shell.dark-mode input,
.shell.dark-mode select,
.shell.dark-mode .auth-card,
.shell.dark-mode .auth-aside,
.shell.dark-mode .check-card,
.shell.dark-mode .emotion-button,
.shell.dark-mode .choice-button,
.shell.dark-mode .setting-item,
.shell.dark-mode .schedule-list li,
.shell.dark-mode .report-list li,
.shell.dark-mode .skill-row,
.shell.dark-mode .reward-icon {
  background: var(--surface);
  color: #ffffff;
}

.shell.dark-mode input,
.shell.dark-mode select,
.shell.dark-mode input::placeholder,
.shell.dark-mode .muted {
  color: #ffffff;
}

.shell.dark-mode .brand {
  color: var(--ink);
}

.shell.dark-mode .feedback {
  background: var(--sun-soft);
  border-color: #6f5728;
  color: #ffe4ad;
}

.shell.dark-mode .pill,
.shell.dark-mode .badge,
.shell.dark-mode .progress-track,
.shell.dark-mode .answer-sequence {
  background: var(--primary-soft);
  border-color: var(--line);
  color: var(--primary-strong);
}

.shell.dark-mode .badge.gem {
  background: var(--accent-soft);
  color: #d8c7f2;
}

.shell.dark-mode .badge.star {
  background: var(--sun-soft);
  color: #ffe4ad;
}

.shell.dark-mode .instruction-panel {
  background: #10211d;
  border-color: #5f8a7e;
  color: #f7fffb;
}

.shell.dark-mode .instruction-text,
.shell.dark-mode .activity-prompt {
  color: #ffffff;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.35);
}

.shell.dark-mode .choice-button {
  background: #f7fffb;
  border-color: #8fd7c1;
  color: #10211d;
}

.shell.dark-mode .choice-button span,
.shell.dark-mode .choice-button strong {
  color: #10211d;
}

.shell.dark-mode .choice-button:hover,
.shell.dark-mode .choice-button[aria-pressed="true"] {
  background: #dff7ef;
  border-color: #66c3aa;
  color: #0a1815;
}

.shell.dark-mode .word-highlight {
  background: #ffe4ad;
  color: #17120a;
}

.shell.dark-mode .word-highlight span,
.shell.dark-mode .word-highlight strong {
  color: #17120a;
}

.shell.dark-mode .countdown-panel {
  background: #132823;
  border-color: #5f8a7e;
}

.shell.dark-mode .countdown-number {
  color: #a9f0db;
}

.topbar {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin: 0 auto;
  max-width: 1120px;
  padding: 1rem;
}

.brand {
  align-items: center;
  color: var(--ink);
  display: inline-flex;
  font-size: 1.25rem;
  font-weight: 800;
  gap: 0.55rem;
  text-decoration: none;
}

.brand-mark {
  align-items: center;
  background: var(--primary);
  border-radius: 50%;
  color: #fff;
  display: inline-flex;
  height: 2.4rem;
  justify-content: center;
  width: 2.4rem;
}

.nav-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: flex-end;
}

.container {
  margin: 0 auto;
  max-width: 1120px;
  padding: 1rem;
}

.narrow {
  margin: 1rem auto;
  max-width: 560px;
}

.auth-layout {
  align-items: stretch;
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 0.75fr);
  min-height: calc(100vh - 126px);
  padding: 1rem 0 2rem;
}

.auth-panel {
  align-items: center;
  display: grid;
}

.auth-card,
.auth-aside {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.auth-card {
  background: rgba(255, 255, 255, 0.94);
  display: grid;
  gap: 1rem;
  padding: clamp(1rem, 4vw, 2rem);
}

.auth-heading {
  align-items: center;
  display: flex;
  gap: 0.9rem;
}

.auth-mark {
  align-items: center;
  background: var(--primary-soft);
  border: 1px solid #c5e5d8;
  border-radius: var(--radius);
  color: var(--primary-strong);
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 0.82rem;
  font-weight: 800;
  height: 4rem;
  justify-content: center;
  text-transform: uppercase;
  width: 4rem;
}

.auth-aside {
  background:
    linear-gradient(180deg, rgba(223, 242, 236, 0.88), rgba(255, 255, 255, 0.92)),
    var(--surface);
  display: grid;
  gap: 1rem;
  padding: clamp(1rem, 3vw, 1.5rem);
}

.auth-aside h2 {
  font-size: clamp(1.65rem, 3vw, 2.4rem);
  line-height: 1.08;
  margin: 0;
}

.auth-aside p {
  color: var(--muted);
  margin: 0;
}

.auth-benefits {
  display: grid;
  gap: 0.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.auth-benefits li {
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  gap: 0.2rem;
  padding: 0.8rem;
}

.auth-benefits span {
  color: var(--muted);
}

.auth-error p {
  margin: 0.2rem 0;
}

.auth-submit {
  margin-top: 0.2rem;
  width: 100%;
}

.auth-switch {
  color: var(--muted);
  margin: 0;
  text-align: center;
}

.auth-switch a {
  color: var(--primary-strong);
  font-weight: 800;
}

.onboarding-layout {
  display: grid;
  gap: 1rem;
  padding: 1rem 0 2rem;
}

.onboarding-intro {
  max-width: 820px;
}

.onboarding-form {
  display: grid;
  gap: 1.25rem;
}

.form-section {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 0.85rem;
  padding-top: 1rem;
}

.form-section:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.form-section h2 {
  font-size: 1.2rem;
  margin: 0;
}

.form-grid {
  display: grid;
  gap: 0.9rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.checkbox-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.check-card {
  align-items: start;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  display: grid;
  gap: 0.65rem;
  grid-template-columns: auto minmax(0, 1fr);
  padding: 0.8rem;
}

.check-card:hover {
  border-color: #b8cec4;
}

.check-card input {
  height: 1.1rem;
  margin-top: 0.2rem;
  min-height: auto;
  width: 1.1rem;
}

.check-card span {
  display: grid;
  gap: 0.15rem;
}

.check-card small {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.35;
}

.hero {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1.05fr 0.95fr;
  min-height: calc(100vh - 100px);
  align-items: center;
  padding-bottom: 2rem;
}

.hero h1,
.page-title {
  font-size: clamp(2.15rem, 5vw, 4.4rem);
  letter-spacing: 0;
  line-height: 1.05;
  margin: 0 0 1rem;
}

.compact-title {
  font-size: clamp(2rem, 4vw, 3rem);
}

.hero p,
.lead {
  color: var(--muted);
  font-size: 1.12rem;
  max-width: 64ch;
}

.hero-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem;
}

.benefit-grid,
.dashboard-grid,
.quest-grid,
.summary-grid {
  display: grid;
  gap: 1rem;
}

.benefit-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 1.2rem;
}

.dashboard-grid {
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
}

.quest-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

.card,
.quest-card,
.schedule,
.check-in,
.reward-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
}

.card.soft,
.schedule {
  background: var(--surface-soft);
}

.card h2,
.card h3,
.quest-card h3,
.check-in h2 {
  font-size: 1.2rem;
  margin: 0 0 0.45rem;
}

.eyebrow {
  color: var(--primary-strong);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin: 0 0 0.4rem;
  text-transform: uppercase;
}

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

.stack {
  display: grid;
  gap: 1rem;
}

.row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.inline-form {
  margin: 0;
}

.form-stack {
  display: grid;
  gap: 0.9rem;
  margin: 0.25rem 0 0;
}

.field,
.form-stack label {
  display: grid;
  font-weight: 700;
  gap: 0.35rem;
  grid-template-columns: 1fr;
  width: 100%;
}

.field span {
  display: block;
}

.field input {
  display: block;
}

.split {
  align-items: start;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
}

.compact-split {
  align-items: center;
  margin-bottom: 1rem;
}

.pill-list,
.badge-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  list-style: none;
  margin: 0.7rem 0 0;
  padding: 0;
}

.pill,
.badge {
  background: var(--primary-soft);
  border-radius: 999px;
  color: var(--primary-strong);
  display: inline-flex;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 0.3rem 0.65rem;
}

.badge.gem {
  background: var(--accent-soft);
  color: #5d438b;
}

.badge.star {
  background: var(--sun-soft);
  color: var(--sun);
}

.badge.badge {
  background: #eaf0ff;
  color: #365a9f;
}

.emotion-grid {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.emotion-button {
  background: #fff;
  border: 2px solid var(--line);
  color: var(--ink);
  min-height: 72px;
}

.emotion-button[aria-pressed="true"] {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: #493373;
}

.emotion-choice {
  align-items: center;
  display: flex;
  font-weight: 800;
  justify-content: center;
  text-align: center;
}

.emotion-choice input {
  height: 1px;
  opacity: 0;
  position: absolute;
  width: 1px;
}

.emotion-choice:has(input:checked) {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: #493373;
}

.schedule-list,
.report-list {
  display: grid;
  gap: 0.6rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.schedule-list li,
.report-list li {
  align-items: start;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  gap: 0.2rem;
  padding: 0.75rem;
}

.quest-card {
  display: grid;
  gap: 0.75rem;
}

.quest-meta {
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.progress-track {
  background: #dcebe4;
  border-radius: 999px;
  height: 12px;
  overflow: hidden;
}

.progress-fill {
  background: var(--primary);
  height: 100%;
  transition: width 180ms ease;
}

.instruction-panel {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  min-height: 220px;
  padding: 1.25rem;
}

.instruction-text {
  font-size: clamp(1.55rem, 3.5vw, 2.45rem);
  font-weight: 800;
  line-height: 1.2;
  margin: 0;
}

.activity-panel {
  display: grid;
  gap: 1rem;
  width: 100%;
}

.activity-prompt {
  font-size: clamp(1.35rem, 3vw, 2rem);
  font-weight: 800;
  line-height: 1.25;
  margin: 0;
}

.choice-grid {
  display: grid;
  gap: 0.7rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.choice-button {
  background: #fff;
  border: 2px solid var(--line);
  color: var(--ink);
  min-height: 64px;
}

.choice-button[aria-pressed="true"] {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: #493373;
}

.answer-sequence {
  background: var(--primary-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--primary-strong);
  font-size: 1.4rem;
  font-weight: 800;
  min-height: 56px;
  padding: 0.75rem;
}

.quest-support-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  min-height: 2rem;
}

.word-highlight {
  background: var(--sun-soft);
  border-radius: 0.3rem;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  padding: 0.05rem 0.18rem;
}

.countdown-panel {
  align-items: center;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  gap: 0.75rem;
  justify-items: center;
  min-height: 260px;
  padding: 1.25rem;
  text-align: center;
}

.countdown-number {
  color: var(--primary-strong);
  font-size: clamp(3.5rem, 12vw, 7rem);
  line-height: 1;
}

.feedback {
  background: var(--sun-soft);
  border: 1px solid #f0d8a6;
  border-radius: var(--radius);
  color: #76500f;
  padding: 0.75rem;
}

.reward-card {
  background: linear-gradient(180deg, #fff, var(--sun-soft));
  text-align: center;
}

.reward-icon {
  align-items: center;
  background: #fff;
  border: 1px solid #f0d8a6;
  border-radius: 50%;
  color: var(--sun);
  display: inline-flex;
  font-size: 2rem;
  height: 4.4rem;
  justify-content: center;
  margin-bottom: 0.75rem;
  width: 4.4rem;
}

.settings-list {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.setting-item {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  gap: 0.55rem;
  padding: 0.65rem;
}

.visually-hidden {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.hidden {
  display: none !important;
}

.dyslexia-mode {
  letter-spacing: 0.03em;
  word-spacing: 0.08em;
}

.dyslexia-font-mode {
  letter-spacing: 0.03em;
  word-spacing: 0.08em;
}

.skill-map {
  display: grid;
  gap: 0.75rem;
}

.section-heading {
  align-items: end;
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}

.section-heading h2,
.section-heading p {
  margin: 0;
}

.skill-chip-grid {
  display: grid;
  gap: 0.55rem;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.skill-chip {
  align-items: center;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  gap: 0.55rem;
  justify-content: space-between;
  min-width: 0;
  padding: 0.6rem 0.7rem;
}

.skill-chip span:first-child {
  overflow-wrap: anywhere;
}

.skill-chip strong {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  flex: 0 0 auto;
  min-width: 2rem;
  padding: 0.1rem 0.45rem;
  text-align: center;
}

.compact-details {
  border-top: 1px solid var(--line);
  margin-top: 0.85rem;
  padding-top: 0.7rem;
}

.compact-details summary {
  color: var(--primary-strong);
  cursor: pointer;
  font-weight: 700;
  width: fit-content;
}

.compact-details[open] summary {
  margin-bottom: 0.75rem;
}

.details-content {
  margin-top: 0.75rem;
}

.table-scroll {
  overflow-x: auto;
  width: 100%;
}

.progress-table {
  border-collapse: collapse;
  min-width: 620px;
  width: 100%;
}

.progress-table th,
.progress-table td {
  border-bottom: 1px solid var(--line);
  padding: 0.65rem 0.55rem;
  text-align: left;
  vertical-align: top;
}

.progress-table th {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.progress-table tbody tr:last-child td {
  border-bottom: 0;
}

.type-label {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
  white-space: nowrap;
}

.mastery-result {
  display: grid;
  line-height: 1.25;
  min-width: 76px;
  text-align: right;
}

.mastery-result small {
  color: var(--muted);
}

.daily-stats {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 0.75rem;
}

.daily-stats div {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  gap: 0.2rem;
  padding: 0.85rem;
}

.daily-stats strong {
  font-size: 1.4rem;
}

.skill-row {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  gap: 0.75rem;
  grid-template-columns: minmax(0, 1fr) minmax(120px, 220px) auto;
  padding: 0.85rem;
}

.skill-row > div:first-child {
  display: grid;
  gap: 0.15rem;
}

.skill-meter {
  background: #dcebe4;
  border-radius: 999px;
  height: 12px;
  overflow: hidden;
}

.skill-meter span {
  background: var(--primary);
  display: block;
  height: 100%;
}

@media (max-width: 900px) {
  .hero,
  .dashboard-grid,
  .auth-layout {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 1rem;
  }

  .auth-layout {
    min-height: auto;
  }

  .benefit-grid,
  .summary-grid,
  .daily-stats,
  .form-grid,
  .checkbox-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .nav-actions,
  .row,
  .compact-split {
    align-items: stretch;
    flex-direction: column;
  }

  .auth-heading {
    align-items: start;
    flex-direction: column;
  }

  .button,
  button {
    width: 100%;
  }

  .quest-grid,
  .emotion-grid,
  .choice-grid,
  .settings-list {
    grid-template-columns: 1fr;
  }

  .container {
    padding: 0.85rem;
  }

  .hero h1,
  .page-title {
    font-size: 2.25rem;
  }

  .skill-row {
    grid-template-columns: 1fr;
  }

  .mastery-result {
    grid-template-columns: auto 1fr;
    gap: 0.45rem;
    text-align: left;
  }
}
