:root {
  --forest: #153f3a;
  --forest-dark: #0d302c;
  --forest-soft: #2e5d56;
  --coral: #df684f;
  --coral-dark: #b74735;
  --sun: #f0b94d;
  --blue: #4f83bd;
  --mint: #cde6d8;
  --mint-light: #e6f2eb;
  --canvas: #eef3ef;
  --surface: #ffffff;
  --surface-soft: #f7f9f6;
  --ink: #19312e;
  --ink-soft: #63746f;
  --line: #d5ded8;
  --danger: #ba4338;
  --success: #267354;
  --display: 'Palatino Linotype', 'Book Antiqua', Georgia, serif;
  --body: 'Bahnschrift', 'Trebuchet MS', sans-serif;
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--canvas);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background-color: var(--canvas);
  background-image:
    linear-gradient(rgba(21, 63, 58, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(21, 63, 58, 0.035) 1px, transparent 1px);
  background-size: 32px 32px;
}

button,
select {
  color: inherit;
  font: inherit;
}

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

button:focus-visible,
a:focus-visible,
select:focus-visible {
  outline: 3px solid var(--sun);
  outline-offset: 3px;
}

button:disabled {
  cursor: not-allowed;
}

a {
  color: inherit;
}

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

h1,
h2 {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: 0;
}

.skip-link {
  position: fixed;
  top: -60px;
  left: 14px;
  z-index: 50;
  padding: 10px 14px;
  color: white;
  background: var(--coral-dark);
}

.skip-link:focus {
  top: 12px;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  color: white;
  border-top: 5px solid var(--sun);
  background: var(--forest);
  box-shadow: 0 3px 16px rgba(13, 48, 44, 0.2);
}

.header-inner,
.daily-inner,
.app-grid,
.app-footer {
  width: min(1440px, 100%);
  margin: 0 auto;
}

.header-inner {
  display: grid;
  grid-template-columns: auto auto minmax(150px, 1fr) auto;
  align-items: center;
  gap: 22px;
  min-height: 76px;
  padding: 10px 24px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #e2eee8;
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
}

.back-link span:first-child {
  color: var(--sun);
  font-size: 1.3rem;
  line-height: 1;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
}

.brand-syriac {
  color: var(--sun);
  font-family: 'EastAssyrian', var(--display);
  font-size: 1.75rem;
  line-height: 1;
}

.brand-copy {
  display: grid;
  gap: 1px;
}

.brand-copy strong {
  font-family: var(--display);
  font-size: 1.05rem;
  letter-spacing: 0;
}

.brand-copy small {
  color: #acd0bf;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.chapter-switch {
  display: grid;
  justify-self: start;
  gap: 3px;
  margin-left: 12px;
  color: #acd0bf;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.chapter-switch select {
  min-width: 132px;
  min-height: 32px;
  padding: 4px 28px 4px 9px;
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 3px;
  background: var(--forest-dark);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

.stat-rack {
  display: grid;
  grid-template-columns: repeat(3, minmax(70px, auto));
  justify-self: end;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.header-stat {
  display: grid;
  gap: 2px;
  min-width: 76px;
  padding: 7px 12px;
  text-align: center;
}

.header-stat + .header-stat {
  border-left: 1px solid rgba(255, 255, 255, 0.18);
}

.header-stat span {
  color: #acd0bf;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.header-stat strong {
  color: var(--sun);
  font-size: 1.05rem;
}

.daily-strip {
  color: #dce9e2;
  background: var(--forest-dark);
}

.daily-inner {
  display: grid;
  grid-template-columns: auto minmax(100px, 320px) auto;
  align-items: center;
  justify-content: end;
  gap: 12px;
  min-height: 29px;
  padding: 4px 24px;
  font-size: 0.66rem;
  font-weight: 700;
}

.daily-track,
.chapter-track {
  overflow: hidden;
  background: rgba(255, 255, 255, 0.15);
}

.daily-track {
  width: 320px;
  height: 5px;
}

.daily-track span,
.chapter-track span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--sun);
  transition: width 260ms ease;
}

.app-grid {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr) 230px;
  min-height: calc(100vh - 110px);
}

.path-sidebar,
.record-sidebar {
  align-self: start;
  position: sticky;
  top: 110px;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
  background: rgba(247, 249, 246, 0.92);
  scrollbar-width: thin;
}

.path-sidebar {
  padding: 28px 22px 40px;
  border-right: 1px solid var(--line);
}

.chapter-kicker,
.panel-kicker,
.screen-eyebrow {
  margin-bottom: 7px;
  color: var(--coral-dark);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.path-sidebar h1 {
  margin-bottom: 4px;
  font-size: 1.65rem;
  line-height: 1.1;
}

.chapter-subtitle {
  margin-bottom: 20px;
  color: var(--ink-soft);
  font-size: 0.74rem;
}

.chapter-progress-copy {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 7px;
  color: var(--ink-soft);
  font-size: 0.68rem;
  font-weight: 700;
}

.chapter-track {
  height: 6px;
  margin-bottom: 28px;
  background: #dce4df;
}

.chapter-track span {
  background: var(--coral);
}

.learning-path {
  position: relative;
  margin: 0;
  padding: 0;
  list-style: none;
}

.learning-path::before {
  content: '';
  position: absolute;
  top: 25px;
  bottom: 25px;
  left: 23px;
  width: 2px;
  background: var(--line);
}

.path-item {
  position: relative;
  margin-bottom: 12px;
  animation: node-in 280ms both;
  animation-delay: calc(var(--node-index) * 18ms);
}

@keyframes node-in {
  from {
    opacity: 0;
    transform: translateY(5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.path-node {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  padding: 3px 8px 3px 0;
  color: var(--ink);
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.path-node:hover:not(:disabled) {
  border-color: var(--line);
  background: white;
}

.path-node.selected {
  border-color: var(--coral);
  background: white;
  box-shadow: 3px 3px 0 rgba(223, 104, 79, 0.16);
}

.path-node.locked {
  opacity: 0.42;
}

.node-number,
.checkpoint-mark {
  display: grid;
  position: relative;
  z-index: 1;
  place-items: center;
  width: 46px;
  height: 46px;
  color: var(--forest);
  border: 2px solid var(--forest-soft);
  border-radius: 50%;
  background: var(--surface-soft);
  font-size: 0.78rem;
  font-weight: 800;
}

.path-node.complete .node-number {
  color: white;
  border-color: var(--success);
  background: var(--success);
}

.path-node.complete .node-number::after {
  content: '✓';
  position: absolute;
  right: -3px;
  bottom: -2px;
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  color: var(--forest-dark);
  border: 2px solid var(--surface-soft);
  border-radius: 50%;
  background: var(--sun);
  font-size: 0.62rem;
}

.checkpoint-mark {
  color: var(--forest-dark);
  border-color: var(--sun);
  border-radius: 5px;
  background: var(--sun);
  font-size: 0.57rem;
  letter-spacing: 0.04em;
}

.path-node.complete .checkpoint-mark {
  color: white;
  border-color: var(--blue);
  background: var(--blue);
}

.node-copy {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.node-copy strong {
  overflow: hidden;
  font-size: 0.78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.node-copy small {
  color: var(--ink-soft);
  font-size: 0.64rem;
}

.node-stars {
  display: inline-flex;
  gap: 3px;
}

.node-stars i {
  width: 8px;
  height: 8px;
  border: 1px solid #a9b5af;
  transform: rotate(45deg);
}

.node-stars i.earned {
  border-color: var(--sun);
  background: var(--sun);
}

.play-area {
  min-width: 0;
  padding: 42px clamp(22px, 4vw, 64px) 72px;
}

.loading-state,
.error-panel {
  max-width: 760px;
  margin: 80px auto;
  padding: 40px;
  border: 1px solid var(--line);
  background: white;
  text-align: center;
}

.loading-state {
  color: var(--ink-soft);
  font-family: var(--display);
  font-size: 1.2rem;
}

.launch-panel,
.session-shell,
.result-panel {
  max-width: 830px;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-top: 6px solid var(--coral);
  border-radius: 7px;
  background: var(--surface);
  box-shadow: 8px 8px 0 rgba(21, 63, 58, 0.09);
  animation: screen-in 280ms ease both;
}

@keyframes screen-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.launch-panel.checkpoint,
.checkpoint-session {
  border-top-color: var(--sun);
}

.launch-top {
  padding: 42px 44px 30px;
}

.screen-title,
.challenge-title {
  margin-bottom: 12px;
  font-size: 2.45rem;
  line-height: 1.08;
}

.screen-copy,
.challenge-copy {
  max-width: 650px;
  margin-bottom: 0;
  color: var(--ink-soft);
  line-height: 1.55;
}

.launch-art {
  padding: 30px 44px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--mint-light);
}

.checkpoint .launch-art {
  background: #f9f1dc;
}

.launch-script {
  margin-bottom: 24px;
  color: var(--forest-dark);
  font-family: 'EastAssyrian', var(--display);
  font-size: 2.4rem;
  line-height: 1.6;
  text-align: right;
}

.audio-timeline {
  display: flex;
  align-items: center;
  gap: 3px;
  width: 100%;
  height: 42px;
  padding: 5px 0;
}

.timeline-segment {
  position: relative;
  min-width: 3px;
  height: var(--pulse-height);
  background: var(--forest-soft);
  transition: height 100ms ease, background-color 100ms ease;
}

.timeline-segment.is-speaking {
  height: 100%;
  background: var(--coral);
}

.launch-actions,
.result-rewards {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 22px 44px;
}

.reward-chip,
.result-mastery {
  display: grid;
  min-width: 118px;
  gap: 3px;
  padding: 9px 12px;
  border-left: 3px solid var(--blue);
  background: var(--surface-soft);
}

.reward-chip span,
.result-mastery > span {
  color: var(--ink-soft);
  font-size: 0.61rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.reward-chip strong {
  font-size: 0.8rem;
}

.primary-action,
.secondary-action,
.check-button,
.audio-button {
  min-height: 46px;
  padding: 10px 19px;
  border: 1px solid transparent;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 800;
}

.primary-action {
  display: block;
  min-width: 190px;
  margin: 2px 44px 38px auto;
  color: white;
  border-color: var(--coral-dark);
  background: var(--coral);
  box-shadow: 0 4px 0 var(--coral-dark);
}

.primary-action:hover,
.check-button:not(:disabled):hover {
  transform: translateY(-1px);
}

.primary-action:active,
.check-button:not(:disabled):active {
  transform: translateY(2px);
  box-shadow: none;
}

.checkpoint-action {
  color: var(--forest-dark);
  border-color: #bf8725;
  background: var(--sun);
  box-shadow: 0 4px 0 #bf8725;
}

.review-seals {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.review-seal {
  display: grid;
  place-items: center;
  gap: 9px;
  min-height: 86px;
  border: 1px solid #dfc890;
  background: rgba(255, 255, 255, 0.55);
}

.review-seal strong {
  font-family: var(--display);
  font-size: 1.5rem;
}

.session-meter {
  display: grid;
  grid-template-columns: auto minmax(120px, 1fr) auto;
  align-items: center;
  gap: 18px;
  min-height: 58px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
}

.close-session {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  color: var(--ink-soft);
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  font-size: 1.45rem;
}

.close-session:hover {
  color: var(--danger);
  border-color: var(--line);
  background: white;
}

.question-progress {
  display: flex;
  gap: 5px;
}

.question-progress span {
  flex: 1;
  height: 7px;
  background: #dce4df;
}

.question-progress span.complete {
  background: var(--success);
}

.question-progress span.current {
  background: var(--sun);
}

.focus-meter {
  display: flex;
  align-items: center;
  gap: 5px;
}

.focus-label {
  margin-right: 3px;
  color: var(--ink-soft);
  font-size: 0.59rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.focus-meter i {
  width: 11px;
  height: 11px;
  border: 1px solid var(--coral);
  transform: rotate(45deg);
}

.focus-meter i.full {
  background: var(--coral);
}

.focus-meter i.empty {
  border-color: #bac5bf;
}

.intro-content,
.question-content {
  min-height: 460px;
  padding: 38px 44px 42px;
}

.challenge-header {
  margin-bottom: 30px;
}

.challenge-title {
  margin-bottom: 8px;
  font-size: 2rem;
}

.intro-audio {
  display: grid;
  grid-template-columns: auto minmax(120px, 1fr);
  align-items: center;
  gap: 22px;
  margin-bottom: 24px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
}

.audio-button {
  color: white;
  border-color: var(--forest-dark);
  background: var(--forest);
}

.audio-button::before {
  content: '▶';
  display: inline-block;
  margin-right: 8px;
  color: var(--sun);
  font-size: 0.72rem;
}

.audio-button.playing::before {
  content: 'Ⅱ';
}

.audio-button.compact {
  min-height: 38px;
  padding: 7px 13px;
  font-size: 0.75rem;
}

.verse-words {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 18px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--mint-light);
}

.verse-word {
  display: grid;
  min-width: 76px;
  gap: 4px;
  padding: 8px 9px;
  color: var(--forest-dark);
  border: 1px solid #b8d1c3;
  border-radius: 3px;
  background: white;
  cursor: pointer;
  text-align: center;
}

.verse-word:hover,
.verse-word.is-speaking {
  border-color: var(--coral);
  background: #fff0e9;
}

.syriac-word,
.option-syriac,
.script-prompt,
.cloze-line,
.word-tile {
  font-family: 'EastAssyrian', var(--display);
  direction: rtl;
}

.syriac-word {
  font-size: 1.55rem;
  line-height: 1;
}

.word-meaning {
  color: var(--ink-soft);
  direction: ltr;
  font-size: 0.64rem;
  line-height: 1.1;
}

.listen-focus,
.verse-listen {
  display: grid;
  justify-items: center;
  gap: 12px;
  margin-bottom: 30px;
}

.sound-orb {
  display: grid;
  place-items: center;
  width: 112px;
  height: 112px;
  padding: 12px;
  color: white;
  border: 8px solid var(--mint);
  border-radius: 50%;
  background: var(--forest);
  box-shadow: 0 0 0 1px var(--forest-soft), 0 8px 0 rgba(21, 63, 58, 0.12);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 800;
}

.sound-orb::before {
  content: '▶';
  display: block;
  color: var(--sun);
  font-size: 1.4rem;
}

.sound-orb.playing::before {
  content: 'Ⅱ';
}

.sound-orb.wide {
  width: 132px;
  height: 88px;
  border-radius: 6px;
}

.listen-caption {
  color: var(--ink-soft);
  font-size: 0.72rem;
}

.verse-listen .audio-timeline {
  max-width: 460px;
}

.option-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
}

.option-grid.translation {
  grid-template-columns: 1fr;
}

.answer-option {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  min-height: 60px;
  padding: 10px 14px;
  color: var(--ink);
  border: 2px solid var(--line);
  border-radius: 5px;
  background: white;
  cursor: pointer;
  text-align: left;
}

.answer-option:hover:not(:disabled) {
  border-color: var(--blue);
  background: #f2f7fc;
}

.answer-option.selected {
  border-color: var(--blue);
  background: #e9f2fb;
  box-shadow: 0 3px 0 #aac5df;
}

.answer-option.correct {
  border-color: var(--success);
  background: var(--mint-light);
}

.answer-option.wrong {
  border-color: var(--danger);
  background: #fff0ee;
}

.option-key {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--surface-soft);
  font-size: 0.68rem;
  font-weight: 800;
}

.option-syriac {
  font-size: 1.7rem;
  text-align: right;
}

.option-text {
  font-size: 0.86rem;
  line-height: 1.35;
}

.script-prompt {
  margin-bottom: 14px;
  padding: 23px;
  color: var(--forest-dark);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--mint-light);
  font-size: 3rem;
  line-height: 1;
  text-align: center;
}

.challenge-body > .audio-button.compact {
  display: block;
  margin: 0 auto 28px;
}

.cloze-line {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 12px;
  margin-bottom: 30px;
  padding: 23px;
  color: var(--forest-dark);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--mint-light);
  font-size: 1.9rem;
  line-height: 1.3;
}

.missing-slot {
  display: inline-grid;
  min-width: 82px;
  place-items: center;
  color: var(--coral-dark);
  border-bottom: 3px solid var(--coral);
  background: white;
}

.arrange-area > .audio-button {
  display: block;
  margin: 0 auto 20px;
}

.selected-phrase,
.word-bank {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 76px;
  padding: 13px;
  direction: rtl;
}

.selected-phrase {
  margin-bottom: 16px;
  border: 2px dashed #bac9c1;
  background: var(--surface-soft);
}

.word-bank {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--mint-light);
}

.selection-placeholder {
  color: #94a49c;
  direction: ltr;
  font-size: 0.76rem;
}

.word-tile {
  min-height: 43px;
  padding: 7px 11px;
  color: var(--forest-dark);
  border: 1px solid var(--forest-soft);
  border-radius: 3px;
  background: white;
  box-shadow: 0 3px 0 #bac9c1;
  cursor: pointer;
  font-size: 1.4rem;
}

.word-tile.chosen {
  border-color: var(--blue);
  box-shadow: 0 3px 0 #aac5df;
}

.answer-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  min-height: 94px;
  padding: 16px 44px;
  border-top: 1px solid var(--line);
  background: var(--surface-soft);
}

.answer-footer.correct {
  border-top-color: #a9d3bd;
  background: var(--mint-light);
}

.answer-footer.wrong {
  border-top-color: #e5b5ae;
  background: #fff0ee;
}

.footer-message {
  display: grid;
  gap: 4px;
}

.footer-message strong {
  font-family: var(--display);
  font-size: 1rem;
}

.footer-message span {
  color: var(--ink-soft);
  font-size: 0.72rem;
  line-height: 1.35;
}

.check-button {
  min-width: 142px;
  color: white;
  border-color: var(--coral-dark);
  background: var(--coral);
  box-shadow: 0 4px 0 var(--coral-dark);
}

.check-button:disabled {
  color: #87958e;
  border-color: #d1d9d4;
  background: #e2e7e4;
  box-shadow: none;
}

.check-button.success {
  border-color: #195d43;
  background: var(--success);
  box-shadow: 0 4px 0 #195d43;
}

.check-button.retry {
  border-color: #93342c;
  background: var(--danger);
  box-shadow: 0 4px 0 #93342c;
}

.record-sidebar {
  padding: 28px 20px 40px;
  border-left: 1px solid var(--line);
}

.record-sidebar h2 {
  margin-bottom: 20px;
  font-size: 1.35rem;
}

.record-list {
  margin-bottom: 30px;
}

.record-list > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.record-list dt {
  color: var(--ink-soft);
  font-size: 0.68rem;
}

.record-list dd {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 800;
  text-align: right;
}

.badge-title {
  margin-bottom: 11px;
  color: var(--ink-soft);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.badge-shelf {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
}

.badge {
  display: grid;
  justify-items: center;
  gap: 7px;
  min-width: 0;
  padding: 10px 4px;
  color: #9ba9a2;
  border: 1px dashed #c5cec9;
  background: rgba(255, 255, 255, 0.45);
  text-align: center;
}

.badge.unlocked {
  color: var(--forest);
  border-style: solid;
  border-color: #d7bd7c;
  background: #fff7df;
}

.badge-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 2px solid currentColor;
  border-radius: 50%;
  font-size: 0.68rem;
  font-weight: 800;
}

.badge-name {
  max-width: 100%;
  overflow: hidden;
  font-size: 0.58rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reset-button {
  width: 100%;
  padding: 8px;
  color: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: 3px;
  background: transparent;
  cursor: pointer;
  font-size: 0.65rem;
}

.reset-button:hover {
  color: var(--danger);
  border-color: var(--danger);
  background: white;
}

.result-panel {
  padding: 42px 44px 38px;
  text-align: center;
}

.result-panel.passed {
  border-top-color: var(--success);
}

.result-panel.retry-result {
  border-top-color: var(--coral);
}

.result-score {
  display: grid;
  place-items: center;
  margin: 28px 0 20px;
}

.score-ring {
  display: grid;
  place-items: center;
  width: 154px;
  height: 154px;
  border-radius: 50%;
  background: conic-gradient(var(--success) var(--score), #dce4df 0);
}

.retry-result .score-ring {
  background: conic-gradient(var(--coral) var(--score), #dce4df 0);
}

.score-center {
  display: grid;
  place-items: center;
  width: 122px;
  height: 122px;
  border-radius: 50%;
  background: white;
}

.score-center strong {
  font-family: var(--display);
  font-size: 2rem;
  line-height: 1;
}

.score-center span {
  color: var(--ink-soft);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.result-rewards {
  justify-content: center;
  padding-right: 0;
  padding-left: 0;
}

.result-mastery {
  align-content: center;
  border-left-color: var(--sun);
}

.result-detail {
  max-width: 560px;
  margin: 18px auto 28px;
  color: var(--ink-soft);
  line-height: 1.55;
}

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

.result-actions .primary-action {
  display: inline-block;
  margin: 0;
}

.secondary-action {
  min-width: 150px;
  color: var(--forest);
  border-color: var(--forest);
  background: white;
}

.audio-error {
  max-width: 830px;
  margin: 0 auto 12px;
  padding: 10px 14px;
  color: var(--danger);
  border: 1px solid #e5b5ae;
  background: #fff0ee;
  font-size: 0.72rem;
}

.celebration {
  position: fixed;
  z-index: 60;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  visibility: hidden;
}

.celebration.show {
  visibility: visible;
}

.celebration-label {
  position: absolute;
  top: 42%;
  left: 50%;
  padding: 12px 22px;
  color: white;
  border: 2px solid var(--sun);
  border-radius: 4px;
  background: var(--forest);
  box-shadow: 6px 6px 0 rgba(13, 48, 44, 0.18);
  font-family: var(--display);
  font-size: 1.45rem;
  opacity: 0;
  transform: translate(-50%, -40%);
}

.celebration.show .celebration-label {
  animation: reward-pop 1.45s ease both;
}

@keyframes reward-pop {
  0% {
    opacity: 0;
    transform: translate(-50%, -20%) scale(0.75);
  }

  20%,
  72% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -70%) scale(0.92);
  }
}

.celebration i {
  position: absolute;
  top: -20px;
  left: var(--x);
  width: 9px;
  height: 17px;
  opacity: 0;
}

.celebration.show i {
  animation: confetti-fall 1.65s var(--delay) ease-in both;
}

.celebration i.coral {
  background: var(--coral);
}

.celebration i.gold {
  background: var(--sun);
}

.celebration i.teal {
  background: var(--forest-soft);
}

.celebration i.blue {
  background: var(--blue);
}

@keyframes confetti-fall {
  0% {
    opacity: 1;
    transform: translateY(0) rotate(0);
  }

  100% {
    opacity: 0.75;
    transform: translateY(105vh) rotate(var(--turn));
  }
}

.app-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 24px 28px;
  color: var(--ink-soft);
  border-top: 1px solid var(--line);
  font-size: 0.68rem;
}

.app-footer a {
  color: var(--forest);
  font-weight: 800;
  text-decoration: none;
}

@media (max-width: 1180px) {
  .app-grid {
    grid-template-columns: 240px minmax(0, 1fr);
  }

  .record-sidebar {
    position: static;
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: auto minmax(260px, 1fr) auto;
    align-items: start;
    gap: 24px;
    max-height: none;
    overflow: visible;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .record-sidebar h2 {
    margin: 0;
  }

  .record-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(100px, 1fr));
    gap: 16px;
    margin: 0;
  }

  .record-list > div {
    display: grid;
    padding-top: 0;
  }

  .badge-block {
    min-width: 220px;
  }

  .reset-button {
    grid-column: 1 / -1;
  }
}

@media (max-width: 860px) {
  .app-header {
    position: static;
  }

  .header-inner {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 14px;
  }

  .back-link span:last-child,
  .brand-copy small {
    display: none;
  }

  .chapter-switch {
    display: none;
  }

  .stat-rack {
    grid-column: 3;
  }

  .daily-inner {
    justify-content: stretch;
  }

  .daily-track {
    width: auto;
  }

  .app-grid {
    display: block;
    min-height: 0;
  }

  .path-sidebar {
    position: static;
    max-height: none;
    overflow: hidden;
    padding: 22px 18px 18px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .chapter-track {
    margin-bottom: 18px;
  }

  .learning-path {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 2px 2px 12px;
    scrollbar-width: thin;
  }

  .learning-path::before {
    display: none;
  }

  .path-item {
    flex: 0 0 136px;
    margin: 0;
  }

  .path-node {
    min-height: 58px;
    border-color: var(--line);
    background: rgba(255, 255, 255, 0.66);
  }

  .record-sidebar {
    display: block;
  }

  .record-sidebar h2 {
    margin-bottom: 16px;
  }

  .record-list {
    margin-bottom: 24px;
  }

  .badge-block {
    max-width: 360px;
  }
}

@media (max-width: 600px) {
  .header-inner {
    min-height: 66px;
    padding: 8px 14px;
  }

  .brand-syriac {
    font-size: 1.5rem;
  }

  .brand-copy strong {
    font-size: 0.9rem;
  }

  .stat-rack {
    grid-template-columns: repeat(3, 50px);
  }

  .header-stat {
    min-width: 0;
    padding: 6px 4px;
  }

  .header-stat strong {
    font-size: 0.88rem;
  }

  .daily-inner {
    grid-template-columns: auto minmax(60px, 1fr) auto;
    padding-right: 14px;
    padding-left: 14px;
  }

  .play-area {
    padding: 24px 12px 46px;
  }

  .launch-panel,
  .session-shell,
  .result-panel {
    box-shadow: 4px 4px 0 rgba(21, 63, 58, 0.09);
  }

  .launch-top,
  .intro-content,
  .question-content,
  .result-panel {
    padding: 28px 18px;
  }

  .screen-title {
    font-size: 2rem;
  }

  .challenge-title {
    font-size: 1.7rem;
  }

  .launch-art {
    padding: 22px 18px;
  }

  .launch-script {
    font-size: 2rem;
  }

  .launch-actions,
  .result-rewards {
    padding: 17px 18px;
  }

  .reward-chip,
  .result-mastery {
    flex: 1 1 110px;
    min-width: 0;
  }

  .primary-action {
    width: calc(100% - 36px);
    margin: 4px 18px 28px;
  }

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

  .session-meter {
    grid-template-columns: auto minmax(80px, 1fr);
    gap: 10px;
  }

  .focus-meter {
    grid-column: 2;
    justify-self: end;
  }

  .intro-content,
  .question-content {
    min-height: 430px;
  }

  .intro-audio {
    grid-template-columns: 1fr;
  }

  .intro-audio .audio-button {
    width: 100%;
  }

  .verse-word {
    min-width: 64px;
  }

  .syriac-word {
    font-size: 1.35rem;
  }

  .option-grid {
    grid-template-columns: 1fr;
  }

  .answer-option {
    min-height: 54px;
  }

  .option-syriac {
    font-size: 1.5rem;
  }

  .script-prompt {
    font-size: 2.5rem;
  }

  .cloze-line {
    padding: 18px 11px;
    font-size: 1.55rem;
  }

  .answer-footer {
    grid-template-columns: 1fr;
    padding: 14px 18px 19px;
  }

  .check-button {
    width: 100%;
  }

  .record-list {
    grid-template-columns: repeat(2, minmax(100px, 1fr));
  }

  .result-actions {
    display: grid;
  }

  .result-actions .primary-action,
  .result-actions .secondary-action {
    width: 100%;
    margin: 0;
  }

  .app-footer {
    flex-direction: column;
    padding-right: 14px;
    padding-left: 14px;
  }
}

@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;
  }
}