:root {
  --ink: #17221d;
  --muted: #627068;
  --paper: #f7f5ef;
  --surface: #fffdf8;
  --line: #dedfd8;
  --primary: #176b4d;
  --primary-dark: #0f4f39;
  --primary-soft: #dceee5;
  --accent: #ec8d51;
  --accent-soft: #fae7d9;
  --blue-soft: #e3ecf7;
  --danger: #a64232;
  --shadow: 0 14px 36px rgb(27 43 34 / 8%);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 4%, rgb(236 141 81 / 12%), transparent 25rem),
    radial-gradient(circle at 92% 20%, rgb(23 107 77 / 10%), transparent 28rem),
    var(--paper);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.5;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

button:focus-visible,
input:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid rgb(23 107 77 / 35%);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.65rem 1rem;
  color: white;
  background: var(--primary-dark);
  border-radius: 10px;
  transform: translateY(-150%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  min-height: 78px;
  padding: 0.75rem max(1rem, calc((100vw - 1180px) / 2));
  background: rgb(247 245 239 / 88%);
  border-bottom: 1px solid rgb(222 223 216 / 85%);
  backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0;
  text-align: left;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.brand-mark {
  display: grid;
  width: 45px;
  height: 45px;
  color: white;
  background: var(--primary);
  border-radius: 14px;
  font-weight: 800;
  place-items: center;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 0.98rem;
}

.brand small {
  margin-top: 0.05rem;
  color: var(--muted);
  font-size: 0.75rem;
}

.main-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  padding: 0.3rem;
  background: rgb(255 253 248 / 75%);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.nav-button {
  padding: 0.55rem 0.9rem;
  background: transparent;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 650;
}

.nav-button:hover {
  background: var(--primary-soft);
}

.nav-button.is-active {
  color: white;
  background: var(--primary);
}

main {
  width: min(1180px, calc(100% - 2rem));
  min-height: calc(100vh - 79px);
  margin: 0 auto;
  padding: 2.5rem 0 4rem;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.55fr);
  gap: 1.25rem;
  align-items: stretch;
}

.hero-copy,
.hero-progress,
.panel,
.week-panel,
.lesson-card,
.phrase-bank-card,
.metric-card {
  background: rgb(255 253 248 / 86%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-copy {
  position: relative;
  overflow: hidden;
  padding: clamp(1.5rem, 4vw, 3.1rem);
}

.hero-copy::after {
  position: absolute;
  right: -90px;
  bottom: -130px;
  width: 270px;
  height: 270px;
  background: var(--accent-soft);
  border-radius: 50%;
  content: "";
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 0.9rem;
  color: var(--primary);
  font-size: 0.77rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 20px;
  height: 2px;
  background: currentColor;
  content: "";
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  position: relative;
  z-index: 1;
  max-width: 700px;
  margin-bottom: 0.8rem;
  font-size: clamp(2.15rem, 5vw, 4.2rem);
  line-height: 1.02;
  letter-spacing: -0.055em;
}

.hero-copy > p:not(.eyebrow) {
  position: relative;
  z-index: 1;
  max-width: 630px;
  margin-bottom: 1.5rem;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.15rem);
}

.button-row {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 43px;
  padding: 0.65rem 1rem;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  font-weight: 700;
  text-decoration: none;
  transition:
    transform 140ms ease,
    background 140ms ease,
    border-color 140ms ease;
}

.button:hover {
  border-color: #b7bcb5;
  transform: translateY(-1px);
}

.button-primary {
  color: white;
  background: var(--primary);
  border-color: var(--primary);
}

.button-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

.button-soft {
  color: var(--primary-dark);
  background: var(--primary-soft);
  border-color: transparent;
}

.button-danger {
  color: var(--danger);
  background: transparent;
  border-color: rgb(166 66 50 / 30%);
}

.button-small {
  min-height: 34px;
  padding: 0.4rem 0.7rem;
  border-radius: 9px;
  font-size: 0.82rem;
}

.button svg,
.icon-button svg {
  width: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.hero-progress {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.4rem;
}

.progress-ring {
  position: relative;
  display: grid;
  width: 148px;
  height: 148px;
  margin: 0.4rem auto 1rem;
  background: conic-gradient(var(--primary) var(--progress), var(--primary-soft) 0);
  border-radius: 50%;
  place-items: center;
}

.progress-ring::before {
  position: absolute;
  width: 112px;
  height: 112px;
  background: var(--surface);
  border-radius: 50%;
  content: "";
}

.progress-ring strong,
.progress-ring span {
  position: relative;
  z-index: 1;
  display: block;
  text-align: center;
}

.progress-ring strong {
  font-size: 1.75rem;
}

.progress-ring span {
  color: var(--muted);
  font-size: 0.72rem;
}

.hero-progress h2 {
  margin-bottom: 0.25rem;
  font-size: 1.05rem;
}

.hero-progress p {
  margin-bottom: 1rem;
  color: var(--muted);
  font-size: 0.87rem;
}

.streak {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem;
  background: var(--accent-soft);
  border-radius: 12px;
  font-size: 0.85rem;
}

.streak strong {
  color: #934c21;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin: 2.5rem 0 1rem;
}

.section-heading h2 {
  margin-bottom: 0.25rem;
  font-size: clamp(1.45rem, 3vw, 2rem);
  letter-spacing: -0.025em;
}

.section-heading p {
  margin-bottom: 0;
  color: var(--muted);
}

.weeks {
  display: grid;
  gap: 1.1rem;
}

.week-panel {
  padding: 1.2rem;
}

.week-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.week-label {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.week-number {
  display: grid;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  color: var(--primary-dark);
  background: var(--primary-soft);
  border-radius: 12px;
  font-weight: 850;
  place-items: center;
}

.week-header h3 {
  margin-bottom: 0.1rem;
  font-size: 1rem;
}

.week-header p {
  margin: 0;
  color: var(--muted);
  font-size: 0.83rem;
}

.week-stat {
  color: var(--muted);
  font-size: 0.78rem;
  white-space: nowrap;
}

.days-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.6rem;
}

.day-button {
  position: relative;
  min-height: 118px;
  padding: 0.8rem;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 13px;
  cursor: pointer;
  transition:
    transform 140ms ease,
    border-color 140ms ease,
    box-shadow 140ms ease;
}

.day-button:hover {
  border-color: var(--primary);
  box-shadow: 0 8px 20px rgb(23 107 77 / 10%);
  transform: translateY(-2px);
}

.day-button.is-complete {
  background: var(--primary-soft);
  border-color: rgb(23 107 77 / 28%);
}

.day-button.is-current {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.day-number {
  display: block;
  margin-bottom: 0.45rem;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.day-title {
  display: block;
  font-size: 0.84rem;
  font-weight: 720;
  line-height: 1.25;
}

.day-check {
  position: absolute;
  right: 0.6rem;
  bottom: 0.55rem;
  display: grid;
  width: 22px;
  height: 22px;
  color: white;
  background: var(--primary);
  border-radius: 50%;
  font-size: 0.7rem;
  place-items: center;
}

.lesson-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.5rem;
  align-items: end;
  margin-bottom: 1.5rem;
}

.breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.7rem;
  padding: 0;
  color: var(--primary);
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 750;
}

.lesson-header h1 {
  margin-bottom: 0.45rem;
  font-size: clamp(2rem, 5vw, 3.4rem);
}

.lesson-header p {
  max-width: 700px;
  margin-bottom: 0;
  color: var(--muted);
}

.day-pager {
  display: flex;
  gap: 0.45rem;
}

.lesson-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 305px;
  gap: 1.2rem;
  align-items: start;
}

.lesson-main,
.lesson-sidebar {
  display: grid;
  gap: 1rem;
}

.panel {
  padding: clamp(1rem, 3vw, 1.45rem);
}

.panel-title {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.panel-title h2 {
  margin-bottom: 0.2rem;
  font-size: 1.18rem;
}

.panel-title p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.time-badge,
.tag {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 0.28rem 0.55rem;
  color: var(--primary-dark);
  background: var(--primary-soft);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  white-space: nowrap;
}

.tag-accent {
  color: #8b451d;
  background: var(--accent-soft);
}

.phrase-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.phrase-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.35rem 0.7rem;
  align-items: center;
  min-height: 94px;
  padding: 0.8rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.phrase-card strong {
  display: block;
  line-height: 1.3;
}

.translation {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.translation.is-hidden {
  filter: blur(5px);
  user-select: none;
}

.phrase-actions {
  display: flex;
  grid-row: 1 / 3;
  grid-column: 2;
  gap: 0.3rem;
}

.icon-button {
  display: grid;
  width: 34px;
  height: 34px;
  padding: 0;
  color: var(--primary);
  background: var(--primary-soft);
  border: 0;
  border-radius: 9px;
  cursor: pointer;
  place-items: center;
}

.icon-button:hover {
  color: white;
  background: var(--primary);
}

.listen-box {
  padding: 1rem;
  background: var(--blue-soft);
  border-radius: 14px;
}

.listen-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 0.85rem;
}

.transcript {
  margin: 0;
  padding: 0.85rem;
  background: rgb(255 255 255 / 62%);
  border-radius: 10px;
  font-size: 0.93rem;
}

.transcript.is-hidden {
  color: transparent;
  text-shadow: 0 0 8px rgb(23 34 29 / 50%);
  user-select: none;
}

.question-box {
  margin-top: 0.8rem;
  padding-top: 0.8rem;
  border-top: 1px solid rgb(23 34 29 / 12%);
}

.question-box p {
  margin-bottom: 0.45rem;
}

.answer {
  color: var(--primary-dark);
  font-weight: 750;
}

.answer[hidden] {
  display: none;
}

.roleplay {
  padding: 1rem;
  background: var(--accent-soft);
  border-radius: 14px;
}

.roleplay h3 {
  margin-bottom: 0.35rem;
  font-size: 1rem;
}

.roleplay > p {
  color: #74482d;
}

.opening-line {
  margin: 0.8rem 0;
  padding: 0.75rem 0.85rem;
  background: rgb(255 255 255 / 60%);
  border-left: 3px solid var(--accent);
  border-radius: 0 10px 10px 0;
}

.mission-list {
  margin: 0.6rem 0 1rem;
  padding-left: 1.2rem;
}

.mission-list li {
  margin-bottom: 0.35rem;
}

.routine-list {
  display: grid;
  gap: 0.55rem;
}

.routine-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.7rem;
  align-items: center;
  padding: 0.7rem;
  background: white;
  border: 1px solid var(--line);
  border-radius: 11px;
}

.routine-item input {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

.routine-item strong {
  display: block;
  font-size: 0.86rem;
}

.routine-item small {
  display: block;
  color: var(--muted);
}

.lesson-complete {
  text-align: center;
  background: var(--primary-soft);
  border-color: rgb(23 107 77 / 20%);
}

.lesson-complete h2 {
  margin-bottom: 0.4rem;
}

.lesson-complete p {
  color: var(--muted);
}

.review-list {
  display: grid;
  gap: 0.45rem;
}

.review-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  padding: 0.65rem 0.7rem;
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.review-item div {
  min-width: 0;
}

.review-item strong,
.review-item small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-item strong {
  font-size: 0.82rem;
}

.review-item small {
  color: var(--muted);
  font-size: 0.72rem;
}

.empty-state {
  padding: 1rem;
  color: var(--muted);
  text-align: center;
  background: rgb(255 255 255 / 45%);
  border: 1px dashed var(--line);
  border-radius: 12px;
}

.search-bar {
  display: flex;
  gap: 0.7rem;
  margin: 1.2rem 0;
}

.search-bar input {
  width: 100%;
  min-height: 48px;
  padding: 0 1rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 13px;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1rem;
}

.filter-button {
  padding: 0.45rem 0.75rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 700;
}

.filter-button.is-active {
  color: white;
  background: var(--primary);
  border-color: var(--primary);
}

.phrase-bank-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.phrase-bank-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.35rem;
  align-items: center;
  padding: 0.9rem;
}

.phrase-bank-card strong,
.phrase-bank-card small {
  display: block;
}

.phrase-bank-card small {
  color: var(--muted);
}

.phrase-bank-card .tag {
  margin-top: 0.4rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.metric-card {
  padding: 1.1rem;
}

.metric-card span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.metric-card strong {
  display: block;
  margin-top: 0.25rem;
  font-size: 1.8rem;
  letter-spacing: -0.04em;
}

.calendar {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 0.55rem;
}

.calendar-day {
  display: grid;
  aspect-ratio: 1;
  min-height: 54px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-weight: 800;
  place-items: center;
}

.calendar-day.is-complete {
  color: white;
  background: var(--primary);
  border-color: var(--primary);
}

.calendar-day.is-partial {
  color: var(--primary-dark);
  background: var(--primary-soft);
  border-color: rgb(23 107 77 / 25%);
}

.milestones {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.7rem;
}

.milestone {
  padding: 1rem;
  background: white;
  border: 1px solid var(--line);
  border-radius: 13px;
}

.milestone.is-reached {
  background: var(--primary-soft);
  border-color: rgb(23 107 77 / 25%);
}

.milestone strong {
  display: block;
  margin-bottom: 0.35rem;
}

.milestone p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.speech-result {
  position: fixed;
  z-index: 30;
  right: 1rem;
  bottom: 1rem;
  width: min(390px, calc(100% - 2rem));
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 18px 50px rgb(23 34 29 / 20%);
}

.speech-result h3 {
  margin-bottom: 0.25rem;
  font-size: 0.95rem;
}

.speech-result p {
  margin-bottom: 0.8rem;
  color: var(--muted);
  font-size: 0.86rem;
}

.speech-result strong {
  color: var(--primary);
}

.toast {
  position: fixed;
  z-index: 50;
  bottom: 1.2rem;
  left: 50%;
  padding: 0.7rem 1rem;
  color: white;
  background: var(--ink);
  border-radius: 10px;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 20px);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.footer-note {
  margin-top: 2rem;
  color: var(--muted);
  text-align: center;
  font-size: 0.78rem;
}

@media (max-width: 980px) {
  .days-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .lesson-layout {
    grid-template-columns: 1fr;
  }

  .lesson-sidebar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .phrase-bank-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .topbar {
    align-items: stretch;
    flex-direction: column;
    gap: 0.6rem;
    padding-block: 0.65rem;
  }

  .brand {
    display: none;
  }

  .main-nav {
    justify-content: stretch;
  }

  .nav-button {
    flex: 1;
  }

  main {
    padding-top: 1.3rem;
  }

  .hero {
    grid-template-columns: 1fr;
  }

  .hero-progress {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.5rem 1rem;
    align-items: center;
  }

  .progress-ring {
    grid-row: 1 / 3;
    width: 108px;
    height: 108px;
    margin: 0;
  }

  .progress-ring::before {
    width: 82px;
    height: 82px;
  }

  .progress-ring strong {
    font-size: 1.25rem;
  }

  .streak {
    grid-column: 1 / -1;
  }

  .lesson-header {
    grid-template-columns: 1fr;
  }

  .day-pager {
    justify-content: space-between;
  }

  .phrase-list,
  .lesson-sidebar,
  .stats-grid,
  .milestones {
    grid-template-columns: 1fr;
  }

  .calendar {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  main {
    width: min(100% - 1rem, 1180px);
  }

  .hero-copy,
  .hero-progress,
  .panel,
  .week-panel {
    border-radius: 15px;
  }

  .days-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .day-button {
    min-height: 98px;
  }

  .section-heading,
  .week-header {
    align-items: start;
    flex-direction: column;
  }

  .phrase-bank-grid {
    grid-template-columns: 1fr;
  }

  .calendar {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

.hero-stats {
  margin-top: 1.2rem;
}

.phrase-card {
  position: relative;
  padding-bottom: 1.1rem;
}

.mastery-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 0.18rem 0.45rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
}

.mastery-badge.is-new {
  color: #6b5a3a;
  background: #f3ead6;
}

.mastery-badge.is-practicing {
  color: #8b451d;
  background: var(--accent-soft);
}

.mastery-badge.is-mastered {
  color: var(--primary-dark);
  background: var(--primary-soft);
}

.verb-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.verb-card,
.phrase-bank-card {
  background: rgb(255 253 248 / 86%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.verb-card {
  padding: 1rem;
}

.verb-card header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 0.7rem;
  margin-bottom: 0.45rem;
}

.verb-card header strong,
.verb-card header small {
  display: block;
}

.verb-card header small {
  color: var(--muted);
}

.verb-forms {
  margin: 0 0 0.8rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.verb-examples {
  display: grid;
  gap: 0.45rem;
}

.verb-example {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  padding: 0.65rem 0.7rem;
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.verb-example strong,
.verb-example small {
  display: block;
}

.verb-example small {
  color: var(--muted);
  font-size: 0.75rem;
}

.word-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.4rem 0 0.7rem;
}

.word-chip {
  padding: 0.2rem 0.45rem;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 750;
}

.word-chip.is-correct {
  color: var(--primary-dark);
  background: var(--primary-soft);
}

.word-chip.is-replaced,
.word-chip.is-missing,
.word-chip.is-extra {
  color: #7a2d22;
  background: #f6ddd8;
}

.score-line {
  margin-bottom: 0.35rem;
}

.button.is-recording {
  color: white;
  background: var(--danger);
  border-color: var(--danger);
}

.filter-row {
  max-height: 9.5rem;
  overflow: auto;
}

.sample-banner {
  margin: 0 0 1rem;
  padding: 0.75rem 1rem;
  color: #8b451d;
  background: var(--accent-soft);
  border: 1px solid #f0d3bc;
  border-radius: 14px;
  font-size: 0.92rem;
  font-weight: 650;
}

.connect-bar {
  overflow: hidden;
  height: 14px;
  background: var(--primary-soft);
  border-radius: 999px;
}

.connect-bar span {
  display: block;
  height: 100%;
  background: var(--primary);
  border-radius: inherit;
}

.connect-bar-label {
  margin: 0.65rem 0 1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.connect-board {
  position: relative;
  margin-bottom: 1rem;
}

.connect-lines {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.connect-lines line {
  stroke: var(--primary);
  stroke-width: 3;
  stroke-linecap: round;
}

.connect-columns {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.connect-col {
  display: grid;
  gap: 0.65rem;
}

.connect-card {
  display: grid;
  gap: 0.15rem;
  width: 100%;
  padding: 0.9rem 1rem;
  text-align: left;
  background: rgb(255 253 248 / 86%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  cursor: pointer;
}

.connect-card strong,
.connect-card small {
  display: block;
}

.connect-card small {
  color: var(--muted);
}

.connect-card.is-selected {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgb(23 107 77 / 18%);
}

.connect-card.is-matched {
  color: var(--primary-dark);
  background: var(--primary-soft);
  border-color: var(--primary);
}

.connect-card.is-wrong {
  color: #7a2d22;
  background: #f6ddd8;
  border-color: var(--danger);
}

.connect-status {
  margin-top: 0.2rem;
  font-size: 0.75rem;
  font-weight: 800;
}

.connect-feedback {
  min-height: 4.5rem;
  margin-bottom: 1rem;
  padding: 0.9rem 1rem;
  background: rgb(255 253 248 / 86%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.connect-feedback.is-ok {
  color: var(--primary-dark);
  background: var(--primary-soft);
  border-color: #b7d8c8;
}

.connect-feedback.is-err {
  color: #7a2d22;
  background: #f6ddd8;
  border-color: #e4b6ae;
}

.connect-type-form .search-bar {
  margin-bottom: 0.8rem;
}

@media (max-width: 760px) {
  .verb-grid {
    grid-template-columns: 1fr;
  }

  .main-nav {
    flex-wrap: nowrap;
    overflow-x: auto;
  }

  .nav-button {
    flex: 1 0 auto;
    padding: 0.5rem 0.45rem;
    font-size: 0.78rem;
    white-space: nowrap;
  }

  .connect-lines {
    display: none;
  }

  .connect-columns {
    gap: 0.8rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
