/* ============================================
   Inklings Read — brand colors from mrbray.com
   Site palette + Inklings rainbow wordmark
   ============================================ */

:root {
  /* Mr. Bray Labs (Squarespace site palette) */
  --bray-white: #ffffff;
  --bray-light: #f2f1f2;      /* lightAccent hsl(300,4%,95%) */
  --bray-accent: #ea2323;     /* accent hsl(360,83%,53%) — CTA red */
  --bray-accent-dark: #c41b1b;
  --bray-navy: #013474;       /* darkAccent hsl(213,98%,23%) */
  --bray-blue: #00479d;       /* black token hsl(213,99%,31%) */

  /* Inklings logo rainbow */
  --ink-magenta: #e4007c;
  --ink-yellow: #f5e000;
  --ink-cyan: #00a0e0;
  --ink-green: #3fd020;
  --ink-green-dark: #2fa818;
  --ink-orange: #f08000;
  --ink-red: #e8350a;
  --ink-purple: #8b3db0;
  --ink-sky: #5b9bd5;

  /* Semantic (Duolingo-style UI mapped to brand) */
  --cream: var(--bray-light);
  --cream-deep: #e6e4e8;
  --ink: var(--bray-navy);
  --ink-soft: #5a6a85;
  --white: var(--bray-white);
  --green: var(--ink-green);
  --green-dark: var(--ink-green-dark);
  --blue: var(--ink-cyan);
  --blue-dark: #0088c2;
  --purple: var(--ink-purple);
  --orange: var(--ink-orange);
  --red: var(--bray-accent);
  --red-dark: var(--bray-accent-dark);
  --coral: var(--ink-red);
  --honey: var(--ink-yellow);
  --path-bg: #e8e6eb;
  --shadow: 0 4px 0 rgba(1, 52, 116, 0.18);
  --shadow-soft: 0 8px 24px rgba(1, 52, 116, 0.1);
  --radius: 16px;
  --radius-sm: 12px;
  --radius-pill: 999px;
  --font-display: "Baloo 2", "Baloo", system-ui, sans-serif;
  --font-body: "Familjen Grotesk", system-ui, sans-serif;
  --header-h: 56px;
  --tab-h: 64px;
  --max: 520px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
}

body.modal-open {
  overflow: hidden;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.2;
  margin: 0 0 0.5rem;
  letter-spacing: -0.02em;
}

p { margin: 0 0 0.75rem; }
p:last-child { margin-bottom: 0; }

a {
  color: var(--bray-blue);
  font-weight: 700;
}

.muted { color: var(--ink-soft); }
.small { font-size: 0.85rem; }

/* ---------- Shell ---------- */
.app-shell {
  max-width: var(--max);
  margin: 0 auto;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--cream);
  position: relative;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.04), var(--shadow-soft);
}

/* Top bar — navy so Inklings wordmark (designed on black) pops */
.top-bar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.65rem 1rem;
  min-height: var(--header-h);
  background: var(--bray-navy);
  border-bottom: 3px solid var(--bray-accent);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.05rem;
  font-family: var(--font-display);
  color: var(--bray-navy);
  text-decoration: none;
}

.brand-logo {
  height: 30px;
  width: auto;
  display: block;
  max-width: 148px;
  object-fit: contain;
  /* logo has transparent bg + white stroke — crisp on navy */
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--ink-magenta), var(--ink-cyan) 45%, var(--ink-green));
  display: grid;
  place-items: center;
  color: white;
  font-size: 1rem;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.stats-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 800;
  font-size: 0.8rem;
  color: white;
}

.stat {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: rgba(255, 255, 255, 0.12);
  color: white;
  padding: 0.3rem 0.55rem;
  border-radius: var(--radius-pill);
}

.stat-level {
  color: white;
  padding: 0.3rem 0.6rem;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

/* Main */
.main {
  flex: 1;
  padding: 1rem 1rem calc(var(--tab-h) + 1.25rem);
  overflow-x: hidden;
}

.screen {
  display: none;
  animation: fadeIn 0.25s var(--ease);
}

.screen.is-active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* Unit header */
.unit-header {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.1rem 1.15rem;
  margin-bottom: 1rem;
  border-left: 6px solid var(--unit-color, var(--green));
  box-shadow: var(--shadow-soft);
}

.unit-header h1 {
  font-size: 1.2rem;
  margin-bottom: 0.2rem;
}

.unit-ages {
  font-weight: 800;
  font-size: 0.8rem;
  color: var(--unit-color, var(--green));
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.35rem;
}

.progress-track {
  height: 12px;
  background: var(--path-bg);
  border-radius: var(--radius-pill);
  overflow: hidden;
  margin: 0.75rem 0 0.35rem;
  border: 2px solid #e5e5e5;
}

.progress-fill {
  height: 100%;
  width: 0;
  background: var(--green);
  border-radius: var(--radius-pill);
  transition: width 0.4s var(--ease);
}

.progress-text {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--ink-soft);
}

/* Level chips */
.level-chips {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0.25rem 0 0.75rem;
  scrollbar-width: none;
}

.level-chips::-webkit-scrollbar { display: none; }

.level-chip {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  padding: 0.45rem 0.7rem;
  border-radius: 14px;
  border: 2px solid #e5e5e5;
  background: var(--white);
  font-family: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s;
}

.level-chip:hover { transform: translateY(-1px); }

.level-chip.is-active {
  border-color: var(--c, var(--green));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--c, var(--green)) 25%, transparent);
}

.chip-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--c, var(--green));
  color: white;
  display: grid;
  place-items: center;
  font-size: 0.85rem;
}

.chip-meta {
  font-size: 0.7rem;
  color: var(--ink-soft);
}

/* Path */
.lesson-path {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem 0 2rem;
  position: relative;
}

.path-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 280px;
  position: relative;
  margin-bottom: 1.25rem;
}

.path-node.left { transform: translateX(-48px); }
.path-node.right { transform: translateX(48px); }

.path-connector {
  position: absolute;
  top: -28px;
  width: 4px;
  height: 28px;
  background: #e5e5e5;
  border-radius: 2px;
  z-index: 0;
}

.path-node:first-child .path-connector { display: none; }
.path-node.is-done .path-connector { background: var(--ink-green); }

.node-btn {
  position: relative;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  border: none;
  background: var(--ink-green);
  color: white;
  font-size: 1.6rem;
  cursor: pointer;
  box-shadow: 0 6px 0 var(--ink-green-dark);
  transition: transform 0.12s, box-shadow 0.12s;
  z-index: 1;
  display: grid;
  place-items: center;
}

.node-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 0 var(--ink-green-dark);
}

.node-btn:active:not(:disabled) {
  transform: translateY(3px);
  box-shadow: 0 2px 0 var(--ink-green-dark);
}

.path-node.is-locked .node-btn {
  background: #e5e5e5;
  box-shadow: 0 6px 0 #cfcfcf;
  color: #aaa;
  cursor: not-allowed;
}

.path-node.is-done .node-btn {
  background: var(--ink-yellow);
  box-shadow: 0 6px 0 #d4c200;
  color: var(--bray-navy);
}

.path-node.is-current .node-btn {
  background: var(--ink-cyan);
  box-shadow: 0 6px 0 var(--blue-dark);
  animation: bounceSoft 2s ease infinite;
}

@keyframes bounceSoft {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.node-pulse {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 3px solid var(--blue);
  opacity: 0.5;
  animation: pulseRing 1.6s ease infinite;
}

@keyframes pulseRing {
  0% { transform: scale(1); opacity: 0.55; }
  100% { transform: scale(1.25); opacity: 0; }
}

.node-stars {
  position: absolute;
  bottom: -4px;
  font-size: 0.65rem;
  letter-spacing: -1px;
  color: var(--ink-orange);
  text-shadow: 0 1px 0 rgba(0,0,0,0.15);
}

.node-label {
  text-align: center;
  margin-top: 0.55rem;
  max-width: 160px;
}

.node-label strong {
  display: block;
  font-size: 0.85rem;
  font-weight: 800;
  line-height: 1.25;
}

.node-label span {
  font-size: 0.75rem;
  color: var(--ink-soft);
  font-weight: 600;
}

/* Library */
.library-toolbar {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.library-toolbar input,
.library-toolbar select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid #e5e5e5;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  background: var(--white);
}

.library-toolbar input:focus,
.library-toolbar select:focus {
  outline: none;
  border-color: var(--blue);
}

.library-count {
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.library-grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.lib-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  border: 2px solid #e5e5e5;
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
  position: relative;
}

.lib-card:hover:not(.is-locked) {
  transform: translateY(-2px);
  border-color: var(--blue);
  box-shadow: var(--shadow-soft);
}

.lib-card.is-locked {
  opacity: 0.65;
  cursor: not-allowed;
}

.lib-card.is-done {
  border-color: color-mix(in srgb, var(--green) 40%, #e5e5e5);
}

.lib-badge {
  display: inline-block;
  color: white;
  font-size: 0.7rem;
  font-weight: 900;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-pill);
  margin-bottom: 0.4rem;
}

.lib-card h3 {
  font-size: 1.05rem;
}

.lib-author {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink-soft);
  margin-bottom: 0.35rem;
}

.lib-blurb {
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.lib-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.65rem;
  gap: 0.5rem;
}

.lib-tags {
  font-size: 0.75rem;
  font-weight: 700;
  color: #aaa;
}

.lib-status {
  font-weight: 900;
  font-size: 0.85rem;
  color: var(--bray-navy);
}

/* Profile */
.profile-hero {
  text-align: center;
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.5rem 1rem;
  margin-bottom: 1rem;
  border: 2px solid #e5e5e5;
}

.avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--bray-navy);
  display: grid;
  place-items: center;
  font-size: 2rem;
  margin: 0 auto 0.75rem;
  box-shadow: var(--shadow);
  overflow: hidden;
  border: 3px solid var(--bray-accent);
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.stat-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin: 1rem 0;
}

.stat-card {
  background: var(--cream);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.4rem;
}

.stat-card strong {
  display: block;
  font-size: 1.25rem;
  font-weight: 900;
}

.stat-card span {
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--ink-soft);
  text-transform: uppercase;
}

.prof-level-row {
  background: var(--white);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  margin-bottom: 0.5rem;
  border: 2px solid #e5e5e5;
}

.prof-level-top {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
  font-size: 0.9rem;
}

.prof-level-top strong { flex: 1; font-weight: 800; }

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

.bar {
  height: 10px;
  background: var(--path-bg);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: var(--radius-pill);
  transition: width 0.4s var(--ease);
}

.profile-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-weight: 800;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.12s, box-shadow 0.12s, filter 0.12s;
}

.btn-primary {
  background: var(--bray-accent);
  color: white;
  box-shadow: 0 4px 0 var(--bray-accent-dark);
}

.btn-primary:hover { filter: brightness(1.05); }
.btn-primary:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--bray-accent-dark);
}

.btn-ghost {
  background: var(--white);
  color: var(--ink-soft);
  border: 2px solid #e5e5e5;
  box-shadow: 0 3px 0 #e5e5e5;
}

.btn-ghost:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #e5e5e5;
}

.btn-danger {
  background: var(--white);
  color: var(--red);
  border: 2px solid #ffc9c9;
  box-shadow: 0 3px 0 #ffc9c9;
}

.btn-lg {
  padding: 0.95rem 1.5rem;
  font-size: 1.05rem;
  width: 100%;
}

/* Bottom tabs */
.tab-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(100%, var(--max));
  height: var(--tab-h);
  display: flex;
  background: var(--white);
  border-top: 2px solid var(--cream-deep);
  box-shadow: 0 -4px 16px rgba(1, 52, 116, 0.08);
  z-index: 60;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.tab-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  border: none;
  background: transparent;
  font-family: inherit;
  font-weight: 800;
  font-size: 0.7rem;
  color: #afafaf;
  cursor: pointer;
  transition: color 0.15s;
}

.tab-btn.is-active {
  color: var(--bray-accent);
}

.tab-icon {
  font-size: 1.35rem;
  line-height: 1;
}

/* Lesson modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s;
}

.modal.is-open {
  opacity: 1;
  visibility: visible;
}

.modal-sheet {
  width: min(100%, var(--max));
  max-height: 94dvh;
  background: var(--cream);
  border-radius: 20px 20px 0 0;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.3s var(--ease);
  overflow: hidden;
}

.modal.is-open .modal-sheet {
  transform: translateY(0);
}

.lesson-top {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: var(--white);
  border-bottom: 2px solid var(--cream-deep);
}

.lesson-top h2 {
  flex: 1;
  font-size: 0.95rem;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-left: 4px solid var(--green);
  padding-left: 0.65rem;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid #e5e5e5;
  background: var(--white);
  font-size: 1.2rem;
  cursor: pointer;
  font-weight: 800;
  color: var(--ink-soft);
  flex-shrink: 0;
}

.lesson-steps {
  display: flex;
  gap: 0.35rem;
  padding: 0.65rem 1rem 0;
  flex-wrap: wrap;
}

.lstep {
  font-size: 0.7rem;
  font-weight: 800;
  color: #bbb;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-pill);
  background: transparent;
}

.lstep.is-on {
  background: var(--blue);
  color: white;
}

.lstep.is-done {
  color: var(--green-dark);
}

#lesson-body {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  padding-bottom: 2rem;
}

.lesson-panel {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.25rem;
  border: 2px solid #e5e5e5;
}

.lesson-level-tag {
  display: inline-block;
  color: white;
  font-size: 0.75rem;
  font-weight: 900;
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-pill);
  margin-bottom: 0.75rem;
}

.lesson-blurb {
  font-size: 1.05rem;
  margin: 1rem 0;
}

.lesson-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-weight: 800;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  color: var(--ink-soft);
}

.excerpt {
  margin: 1rem 0 1.25rem;
  padding: 1.15rem;
  background: var(--cream);
  border-left: 4px solid var(--honey);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 1.05rem;
  line-height: 1.7;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
}

.word-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.word-card {
  background: var(--cream);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  border: 2px solid #e5e5e5;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.word-card strong {
  color: var(--blue);
  font-size: 1.1rem;
  text-transform: capitalize;
}

.quiz-progress {
  font-weight: 900;
  font-size: 0.8rem;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.75rem;
}

.choices {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 1rem;
}

.choice-btn {
  text-align: left;
  padding: 0.95rem 1.1rem;
  border-radius: var(--radius-sm);
  border: 2px solid #e5e5e5;
  background: var(--white);
  font-family: inherit;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 3px 0 #e5e5e5;
  transition: transform 0.1s, border-color 0.15s;
}

.choice-btn:hover:not(:disabled) {
  border-color: var(--blue);
}

.choice-btn:active:not(:disabled) {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #e5e5e5;
}

.choice-btn.is-correct {
  border-color: var(--ink-green);
  background: #d8ffc8;
  box-shadow: 0 3px 0 var(--ink-green-dark);
}

.choice-btn.is-wrong {
  border-color: var(--bray-accent);
  background: #ffd6d6;
  box-shadow: 0 3px 0 var(--bray-accent-dark);
}

.feedback {
  margin-top: 1rem;
  font-weight: 800;
  padding: 0.75rem;
  border-radius: var(--radius-sm);
}

.feedback.is-good {
  background: #d8ffc8;
  color: var(--ink-green-dark);
}

.feedback.is-bad {
  background: #ffd6d6;
  color: var(--bray-accent-dark);
}

.result-panel {
  text-align: center;
}

.result-emoji {
  font-size: 3.5rem;
  margin-bottom: 0.5rem;
}

.result-stars {
  font-size: 1.75rem;
  color: var(--ink-orange);
  letter-spacing: 0.1em;
  margin: 0.5rem 0 1rem;
}

.xp-pop {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--bray-navy);
}

.result-actions {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 1.25rem;
}

/* Welcome */
.welcome-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  background:
    radial-gradient(ellipse at 20% 20%, rgba(228, 0, 124, 0.35), transparent 45%),
    radial-gradient(ellipse at 80% 30%, rgba(0, 160, 224, 0.35), transparent 45%),
    radial-gradient(ellipse at 50% 90%, rgba(63, 208, 32, 0.25), transparent 50%),
    linear-gradient(165deg, var(--bray-navy) 0%, #002456 55%, #001a3d 100%);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  color: white;
  text-align: center;
}

.welcome-overlay.is-open {
  display: flex;
}

.welcome-card {
  max-width: 360px;
}

.welcome-logo {
  width: min(100%, 280px);
  height: auto;
  margin: 0 auto 1rem;
  display: block;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.35));
}

.welcome-card h1 {
  font-size: 2rem;
  font-family: var(--font-display);
  color: white;
  margin-bottom: 0.75rem;
}

.welcome-card p {
  opacity: 0.95;
  font-weight: 600;
  margin-bottom: 1rem;
}

.welcome-list {
  text-align: left;
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
  font-weight: 700;
}

.welcome-list li {
  padding: 0.4rem 0;
}

.welcome-list li::before {
  content: "✓ ";
  color: var(--ink-yellow);
}

.welcome-card .btn-primary {
  background: var(--bray-accent);
  color: white;
  box-shadow: 0 4px 0 var(--bray-accent-dark);
}

.welcome-powered {
  margin-top: 1.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  opacity: 0.75;
}

.welcome-powered a {
  color: white;
}

/* Toast */
.toast {
  position: fixed;
  bottom: calc(var(--tab-h) + 1rem);
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--ink);
  color: white;
  font-weight: 800;
  font-size: 0.9rem;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-pill);
  z-index: 250;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  max-width: 90%;
  text-align: center;
}

.toast.is-show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.word-card strong {
  color: var(--bray-blue);
}

.lstep.is-on {
  background: var(--bray-accent);
  color: white;
}

.lstep.is-done {
  color: var(--ink-green-dark);
}

.excerpt {
  border-left-color: var(--ink-magenta);
}

/* Wide screens — center phone-like app */
@media (min-width: 560px) {
  body {
    background: var(--bray-navy);
  }

  .path-node.left { transform: translateX(-64px); }
  .path-node.right { transform: translateX(64px); }

  .modal {
    align-items: center;
  }

  .modal-sheet {
    border-radius: 20px;
    max-height: 90dvh;
  }
}

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