:root {
  --paper: #f3eee5;
  --paper-deep: #e9e1d4;
  --card: #fffdf8;
  --ink: #1d2b27;
  --ink-soft: #53615c;
  --muted: #8a918c;
  --line: #ddd5c8;
  --line-soft: #ebe5db;
  --green: #2e675b;
  --green-deep: #204c43;
  --green-soft: #dcebe5;
  --coral: #db6d51;
  --coral-soft: #f8e1d8;
  --gold: #c28d42;
  --gold-soft: #f4e8d1;
  --danger: #b8473f;
  --shadow: 0 16px 48px rgba(45, 54, 49, 0.08);
  --shadow-small: 0 5px 18px rgba(45, 54, 49, 0.07);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --sidebar-width: 246px;
  --font-sans: "Segoe UI Variable", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-display: Georgia, "Songti SC", "STSong", serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 92% 8%, rgba(219, 109, 81, 0.08), transparent 24rem),
    radial-gradient(circle at 22% 88%, rgba(46, 103, 91, 0.08), transparent 28rem),
    var(--paper);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

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

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

button {
  color: inherit;
}

svg {
  display: block;
}

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 28px 20px 22px;
  border-right: 1px solid rgba(221, 213, 200, 0.8);
  background: rgba(250, 247, 240, 0.78);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 5px 9px 26px;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark,
.loading-mark {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
  width: 34px;
  height: 34px;
  padding: 7px;
  border-radius: 11px;
  color: #fff;
  background: var(--green);
}

.brand-mark span,
.loading-mark span {
  display: block;
  width: 4px;
  border-radius: 4px;
  background: currentColor;
  animation: sound-bar 1.4s ease-in-out infinite;
}

.brand-mark span:nth-child(1),
.loading-mark span:nth-child(1) {
  height: 9px;
  animation-delay: -0.3s;
}

.brand-mark span:nth-child(2),
.loading-mark span:nth-child(2) {
  height: 18px;
  animation-delay: -0.1s;
}

.brand-mark span:nth-child(3),
.loading-mark span:nth-child(3) {
  height: 13px;
  animation-delay: -0.5s;
}

@keyframes sound-bar {
  0%,
  100% {
    transform: scaleY(0.62);
  }
  50% {
    transform: scaleY(1);
  }
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.brand-copy strong {
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: 0.04em;
}

.brand-copy small {
  margin-top: 7px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.19em;
}

.nav-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.nav-item,
.mobile-nav-item,
.mobile-brand,
.icon-button,
.avatar-button {
  border: 0;
  background: none;
  cursor: pointer;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  padding: 12px 13px;
  border-radius: 12px;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.nav-item:hover {
  color: var(--ink);
  background: rgba(255, 253, 248, 0.76);
}

.nav-item.is-active {
  color: #fff;
  background: var(--green);
  box-shadow: 0 8px 18px rgba(46, 103, 91, 0.18);
}

.nav-icon {
  display: grid;
  flex: 0 0 19px;
  width: 19px;
  height: 19px;
  place-items: center;
}

.nav-icon svg {
  width: 18px;
  height: 18px;
}

.sidebar-bottom {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: auto;
}

.nav-item-muted {
  font-size: 13px;
}

.local-badge {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  color: var(--ink-soft);
  background: rgba(255, 253, 248, 0.56);
}

.status-dot {
  flex: 0 0 8px;
  width: 8px;
  height: 8px;
  margin-top: 4px;
  border-radius: 50%;
  background: #5ca67f;
  box-shadow: 0 0 0 4px rgba(92, 166, 127, 0.12);
}

.local-badge div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.local-badge strong {
  color: var(--ink);
  font-size: 12px;
}

.local-badge small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.main-shell {
  min-width: 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 78px;
  padding: 20px clamp(22px, 4vw, 58px) 10px;
}

.topbar-date {
  color: var(--ink-soft);
  font-size: 13px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-button,
.avatar-button {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink-soft);
  background: rgba(255, 253, 248, 0.7);
  transition: transform 160ms ease, background 160ms ease;
}

.icon-button:hover,
.avatar-button:hover {
  transform: translateY(-1px);
  background: var(--card);
}

.icon-button svg {
  width: 17px;
  height: 17px;
}

.avatar-button {
  border-color: var(--green);
  color: #fff;
  background: var(--green);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.mobile-brand {
  display: none;
}

.page {
  width: min(1280px, 100%);
  margin: 0 auto;
  padding: 18px clamp(22px, 4vw, 58px) 64px;
  outline: none;
}

.loading-state {
  display: grid;
  min-height: 60vh;
  place-items: center;
  align-content: center;
  gap: 16px;
  color: var(--muted);
}

.loading-state .loading-mark {
  width: 48px;
  height: 48px;
  padding: 11px;
}

.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 26px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  color: var(--coral);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 18px;
  height: 2px;
  content: "";
  background: currentColor;
}

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

h1,
h2,
h3 {
  color: var(--ink);
}

h1 {
  margin-bottom: 8px;
  font-family: var(--font-display);
  font-size: clamp(32px, 4.2vw, 52px);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.035em;
}

h2 {
  margin-bottom: 8px;
  font-family: var(--font-display);
  font-size: clamp(24px, 2.8vw, 34px);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

h3 {
  margin-bottom: 8px;
  font-size: 16px;
  line-height: 1.35;
}

.page-subtitle {
  max-width: 660px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.75;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(240px, 0.5fr);
  min-height: 290px;
  overflow: hidden;
  border-radius: var(--radius-xl);
  color: #fff;
  background: var(--green-deep);
  box-shadow: var(--shadow);
}

.hero::before {
  position: absolute;
  top: -120px;
  right: -80px;
  width: 360px;
  height: 360px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  content: "";
  box-shadow:
    0 0 0 44px rgba(255, 255, 255, 0.025),
    0 0 0 88px rgba(255, 255, 255, 0.02);
}

.hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: clamp(30px, 4vw, 48px);
}

.hero-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
  padding: 7px 11px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: #d9e9e4;
  background: rgba(255, 255, 255, 0.06);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.hero-label span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #e6bb76;
}

.hero h1 {
  max-width: 640px;
  color: #fff;
  font-size: clamp(34px, 4.3vw, 54px);
}

.hero p {
  max-width: 570px;
  margin-bottom: 28px;
  color: rgba(240, 247, 244, 0.72);
  font-size: 14px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-side {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  padding: 30px;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(rgba(255, 255, 255, 0.015), rgba(255, 255, 255, 0.055)),
    repeating-linear-gradient(
      90deg,
      transparent 0,
      transparent 39px,
      rgba(255, 255, 255, 0.035) 40px
    );
}

.progress-ring {
  --progress: 0deg;
  display: grid;
  width: 155px;
  height: 155px;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(#e6bb76 var(--progress), rgba(255, 255, 255, 0.1) 0);
}

.progress-ring::before {
  grid-area: 1 / 1;
  width: 127px;
  height: 127px;
  border-radius: 50%;
  content: "";
  background: var(--green-deep);
}

.progress-ring-copy {
  z-index: 1;
  grid-area: 1 / 1;
  text-align: center;
}

.progress-ring-copy strong {
  display: block;
  font-family: var(--font-display);
  font-size: 38px;
  font-weight: 500;
  line-height: 1;
}

.progress-ring-copy span {
  display: block;
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 17px;
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

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

.button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  transform: none;
}

.button svg {
  width: 16px;
  height: 16px;
}

.button-primary {
  color: #fff;
  background: var(--coral);
  box-shadow: 0 8px 20px rgba(219, 109, 81, 0.2);
}

.button-primary:hover {
  background: #c95d43;
}

.button-secondary {
  color: var(--ink);
  background: var(--card);
}

.button-green {
  color: #fff;
  background: var(--green);
}

.button-ghost {
  border-color: var(--line);
  color: var(--ink-soft);
  background: transparent;
}

.button-quiet {
  color: var(--ink-soft);
  background: var(--paper-deep);
}

.button-danger {
  color: #fff;
  background: var(--danger);
}

.hero .button-secondary {
  color: var(--green-deep);
  background: #f7f3e9;
}

.hero .button-ghost {
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
}

.section {
  margin-top: 34px;
}

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

.mode-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 318px;
  overflow: hidden;
  padding: clamp(25px, 3vw, 34px);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.mode-card::after {
  position: absolute;
  right: -72px;
  bottom: -82px;
  width: 230px;
  height: 230px;
  border: 1px solid currentColor;
  border-radius: 50%;
  content: "";
  opacity: 0.09;
  box-shadow: 0 0 0 34px currentColor;
}

.mode-card.daily {
  color: var(--green-deep);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.55), transparent 55%),
    #dcebe5;
}

.mode-card.ielts {
  color: #fff;
  border-color: #314f5c;
  background:
    radial-gradient(circle at 88% 12%, rgba(230, 187, 118, 0.17), transparent 32%),
    #263e49;
}

.mode-card-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.mode-kicker {
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.13em;
}

.mode-number {
  font-family: var(--font-display);
  font-size: 42px;
  line-height: 0.8;
  opacity: 0.4;
}

.mode-icon {
  position: relative;
  z-index: 1;
  display: grid;
  width: 46px;
  height: 46px;
  margin: 24px 0 18px;
  place-items: center;
  border-radius: 14px;
  color: var(--green);
  background: rgba(255, 255, 255, 0.58);
}

.mode-card.ielts .mode-icon {
  color: #e6bb76;
  background: rgba(255, 255, 255, 0.08);
}

.mode-icon svg {
  width: 23px;
  height: 23px;
}

.mode-card h2 {
  position: relative;
  z-index: 1;
  margin-bottom: 9px;
  color: inherit;
  font-size: clamp(29px, 3vw, 38px);
}

.mode-card p {
  position: relative;
  z-index: 1;
  max-width: 540px;
  margin-bottom: 17px;
  color: rgba(29, 43, 39, 0.67);
  font-size: 13px;
  line-height: 1.72;
}

.mode-card.ielts p {
  color: rgba(255, 255, 255, 0.64);
}

.mode-meta {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 17px;
  margin-bottom: 22px;
  font-size: 10px;
  font-weight: 750;
  opacity: 0.66;
}

.mode-actions {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 15px;
  margin-top: auto;
}

.mode-card.ielts .button-secondary {
  color: #263e49;
  background: #fff8ed;
}

.mode-card.ielts .text-button {
  color: #e6bb76;
}

.mode-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 7px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 850;
  white-space: nowrap;
}

.mode-tag.daily {
  color: var(--green-deep);
  background: var(--green-soft);
}

.mode-tag.ielts {
  color: #5c4220;
  background: var(--gold-soft);
}

.course-mode-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
}

.mode-filter {
  display: inline-flex;
  gap: 5px;
  margin-bottom: 20px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 253, 248, 0.65);
}

.mode-filter button {
  padding: 8px 13px;
  border: 0;
  border-radius: 8px;
  color: var(--ink-soft);
  cursor: pointer;
  background: transparent;
  font-size: 11px;
  font-weight: 750;
}

.mode-filter button.is-active {
  color: #fff;
  background: var(--green);
}

.mode-selector {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-bottom: 17px;
}

.mode-selector button {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--muted);
  cursor: pointer;
  text-align: left;
  background: #fbf9f4;
}

.mode-selector button strong {
  color: var(--ink);
  font-size: 11px;
}

.mode-selector button span {
  font-size: 9px;
  line-height: 1.5;
}

.mode-selector button.is-active {
  border-color: var(--green);
  color: var(--green-deep);
  background: var(--green-soft);
}

.dialogue-partner {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 5px;
  margin: 0 0 22px;
  padding: 17px 19px;
  border-left: 3px solid var(--coral);
  border-radius: 0 13px 13px 0;
  background: var(--coral-soft);
}

.dialogue-partner span {
  color: var(--coral);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.1em;
}

.dialogue-partner strong {
  font-family: var(--font-display);
  font-size: clamp(18px, 2.4vw, 25px);
  font-weight: 500;
  line-height: 1.45;
}

.exam-brief {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 22px 0 10px;
  padding: 12px 14px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: #f8f5ee;
  font-size: 10px;
}

.exam-brief span {
  padding: 4px 7px;
  border-radius: 7px;
  color: #fff;
  background: #263e49;
  font-weight: 850;
  letter-spacing: 0.07em;
}

.exam-brief strong {
  color: var(--ink);
  font-weight: 750;
}

.exam-brief em {
  flex-basis: 100%;
  color: var(--muted);
  font-style: normal;
}

.exam-timer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 10px 0 18px;
  padding: 13px 16px;
  border-radius: 12px;
  color: var(--green-deep);
  background: var(--green-soft);
}

.exam-timer span {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.07em;
}

.exam-timer strong {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 500;
}

.exam-timer.is-answering {
  color: #7a4a2a;
  background: var(--gold-soft);
}

.ielts-self-check {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 15px;
  color: var(--green-deep);
  font-size: 10px;
}

.ielts-self-check strong {
  flex-basis: 100%;
  margin-bottom: 2px;
}

.ielts-self-check span {
  padding: 5px 7px;
  border-radius: 7px;
  background: rgba(46, 103, 91, 0.09);
}

.course-pack-list {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.course-pack-panel {
  padding: 17px;
  border: 1px solid var(--line-soft);
  border-radius: 15px;
  background: #fbf9f4;
}

.course-pack-panel.ielts {
  background: #f5f1e7;
}

.course-pack-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 12px;
}

.course-pack-heading h3 {
  margin: 8px 0 4px;
}

.course-pack-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
}

.course-pack-count {
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 18px;
  white-space: nowrap;
}

.course-pack-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}

.section-header h2 {
  margin: 0;
  font-size: 26px;
}

.section-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.text-button {
  padding: 5px 0;
  border: 0;
  color: var(--green);
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.text-button:hover {
  color: var(--green-deep);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.55fr);
  gap: 18px;
}

.panel {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  background: rgba(255, 253, 248, 0.8);
  box-shadow: var(--shadow-small);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 20px 22px 0;
}

.panel-head h2,
.panel-head h3 {
  margin: 0;
}

.panel-body {
  padding: 18px 22px 22px;
}

.task-list {
  display: flex;
  flex-direction: column;
}

.task-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line-soft);
}

.task-row:last-child {
  border-bottom: 0;
  padding-bottom: 2px;
}

.task-index {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 10px;
  color: var(--green);
  background: var(--green-soft);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
}

.task-copy {
  min-width: 0;
}

.task-copy strong {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-copy span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.task-due {
  padding: 5px 8px;
  border-radius: 7px;
  color: var(--coral);
  background: var(--coral-soft);
  font-size: 10px;
  font-weight: 800;
}

.empty-inline {
  padding: 20px 0 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.stat-stack {
  display: grid;
  gap: 10px;
  padding: 18px 18px 20px;
}

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

.stat-card div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-card span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.stat-card strong {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 500;
}

.stat-icon {
  display: grid;
  width: 39px;
  height: 39px;
  place-items: center;
  border-radius: 12px;
  color: var(--green);
  background: var(--green-soft);
}

.stat-icon.coral {
  color: var(--coral);
  background: var(--coral-soft);
}

.stat-icon.gold {
  color: var(--gold);
  background: var(--gold-soft);
}

.stat-icon svg {
  width: 18px;
  height: 18px;
}

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

.course-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 230px;
  overflow: hidden;
  padding: 22px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  cursor: pointer;
  background: var(--card);
  box-shadow: var(--shadow-small);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.course-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.course-card::after {
  position: absolute;
  top: -42px;
  right: -42px;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  content: "";
  background: var(--course-accent, var(--green-soft));
  opacity: 0.65;
}

.course-card-top {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.course-number {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  border-radius: 999px;
  color: var(--green);
  background: var(--green-soft);
  font-size: 9px;
  font-weight: 800;
}

.status-pill.pending {
  color: var(--gold);
  background: var(--gold-soft);
}

.status-pill::before {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  content: "";
  background: currentColor;
}

.course-card h3 {
  position: relative;
  z-index: 1;
  max-width: 90%;
  margin-top: 32px;
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 500;
  line-height: 1.2;
}

.course-card p {
  position: relative;
  z-index: 1;
  margin: 8px 0 18px;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.6;
}

.course-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 13px;
  margin-top: auto;
  color: var(--muted);
  font-size: 10px;
}

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

.course-meta svg {
  width: 13px;
  height: 13px;
}

.empty-state {
  display: grid;
  min-height: 340px;
  padding: 46px 20px;
  place-items: center;
  align-content: center;
  border: 1px dashed var(--line);
  border-radius: var(--radius-xl);
  text-align: center;
  background: rgba(255, 253, 248, 0.48);
}

.empty-illustration {
  position: relative;
  display: grid;
  width: 84px;
  height: 84px;
  margin-bottom: 22px;
  place-items: center;
  border-radius: 27px;
  color: var(--green);
  background: var(--green-soft);
  transform: rotate(-5deg);
}

.empty-illustration::after {
  position: absolute;
  inset: 9px -10px -9px 10px;
  z-index: -1;
  border: 1px solid var(--line);
  border-radius: inherit;
  content: "";
  background: var(--card);
}

.empty-illustration svg {
  width: 36px;
  height: 36px;
}

.empty-state h2 {
  margin-bottom: 10px;
}

.empty-state p {
  max-width: 440px;
  margin-bottom: 23px;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.75;
}

.form-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.55fr);
  align-items: start;
  gap: 20px;
}

.form-card {
  padding: clamp(22px, 3vw, 32px);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-xl);
  background: var(--card);
  box-shadow: var(--shadow);
}

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

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field-full {
  grid-column: 1 / -1;
}

.field label,
.field-label {
  color: var(--ink);
  font-size: 12px;
  font-weight: 750;
}

.field label span,
.field-label span {
  margin-left: 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
}

.input,
.select,
.textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 11px;
  outline: 0;
  color: var(--ink);
  background: #fbf9f4;
  font-size: 13px;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.input,
.select {
  height: 44px;
  padding: 0 13px;
}

.textarea {
  min-height: 140px;
  padding: 12px 13px;
  line-height: 1.65;
  resize: vertical;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(46, 103, 91, 0.09);
}

.file-drop {
  position: relative;
  display: grid;
  min-height: 148px;
  padding: 24px;
  place-items: center;
  align-content: center;
  border: 1px dashed #cfc6b7;
  border-radius: 16px;
  cursor: pointer;
  text-align: center;
  background:
    linear-gradient(135deg, rgba(46, 103, 91, 0.03), transparent),
    #fbf9f4;
  transition: border-color 160ms ease, background 160ms ease;
}

.file-drop:hover,
.file-drop.is-dragging {
  border-color: var(--green);
  background: var(--green-soft);
}

.file-drop input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.file-drop svg {
  width: 27px;
  height: 27px;
  margin-bottom: 10px;
  color: var(--green);
}

.file-drop strong {
  font-size: 13px;
}

.file-drop span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 10px;
}

.file-drop.has-file {
  border-style: solid;
  border-color: rgba(46, 103, 91, 0.35);
  background: var(--green-soft);
}

.subtitle-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.text-link-label {
  position: relative;
  overflow: hidden;
  color: var(--green);
  cursor: pointer;
  font-size: 11px;
  font-weight: 750;
}

.text-link-label input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--line-soft);
}

.helper-panel {
  position: sticky;
  top: 22px;
  overflow: hidden;
  border-radius: var(--radius-xl);
  color: #fff;
  background: var(--green-deep);
  box-shadow: var(--shadow);
}

.helper-art {
  position: relative;
  height: 120px;
  overflow: hidden;
  background:
    radial-gradient(circle at 80% 20%, rgba(230, 187, 118, 0.3), transparent 38%),
    repeating-linear-gradient(
      90deg,
      transparent 0,
      transparent 30px,
      rgba(255, 255, 255, 0.08) 31px
    );
}

.helper-art .wave {
  position: absolute;
  right: 28px;
  bottom: 27px;
  left: 28px;
  display: flex;
  align-items: center;
  gap: 5px;
  height: 48px;
}

.wave span {
  flex: 1;
  min-width: 2px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.65);
}

.helper-copy {
  padding: 24px;
}

.helper-copy h3 {
  color: #fff;
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 500;
}

.helper-copy p {
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
  line-height: 1.7;
}

.step-list {
  display: grid;
  gap: 13px;
  margin-top: 20px;
}

.step-item {
  display: grid;
  grid-template-columns: 25px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.step-item span:first-child {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  color: #e6bb76;
  font-size: 10px;
  font-weight: 800;
}

.step-item strong {
  display: block;
  margin-bottom: 2px;
  color: #fff;
  font-size: 11px;
}

.step-item small {
  color: rgba(255, 255, 255, 0.5);
  font-size: 10px;
  line-height: 1.55;
}

.import-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.7fr);
  align-items: start;
  gap: 20px;
}

.import-card {
  padding: clamp(22px, 3vw, 32px);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-xl);
  background: var(--card);
  box-shadow: var(--shadow);
}

.request-card {
  overflow: hidden;
  border-radius: var(--radius-xl);
  color: var(--ink);
  background: #fff8ed;
  box-shadow: var(--shadow);
}

.request-banner {
  padding: 22px 24px;
  color: #fff;
  background: var(--coral);
}

.request-banner p {
  margin: 4px 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 11px;
  line-height: 1.6;
}

.request-body {
  padding: 21px 24px 24px;
}

.request-body .field {
  margin-bottom: 15px;
}

.request-body .select {
  background: #fffdf8;
}

.micro-copy {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.65;
}

.code-preview {
  max-height: 230px;
  overflow: auto;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  color: #46534e;
  background: #f7f3ea;
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 10px;
  line-height: 1.6;
  white-space: pre-wrap;
}

.import-drop {
  min-height: 120px;
  margin-bottom: 17px;
}

.validation-list {
  display: grid;
  gap: 7px;
  margin-top: 16px;
}

.validation-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 9px 10px;
  border-radius: 9px;
  font-size: 11px;
  line-height: 1.55;
}

.validation-item svg {
  flex: 0 0 15px;
  width: 15px;
  height: 15px;
  margin-top: 1px;
}

.validation-item.ok {
  color: var(--green);
  background: var(--green-soft);
}

.validation-item.error {
  color: var(--danger);
  background: #f7dfdc;
}

.practice-page {
  width: min(960px, 100%);
  margin: 0 auto;
}

.practice-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 22px;
  margin-bottom: 22px;
}

.practice-header h1 {
  margin: 0;
  font-size: clamp(29px, 3.5vw, 42px);
}

.practice-score {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 11px;
}

.practice-score strong {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 500;
}

.practice-progress {
  height: 5px;
  margin-bottom: 20px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--paper-deep);
}

.practice-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--coral);
  transition: width 300ms ease;
}

.practice-card {
  position: relative;
  overflow: hidden;
  padding: clamp(24px, 4vw, 44px);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-xl);
  background: var(--card);
  box-shadow: var(--shadow);
}

.practice-card::after {
  position: absolute;
  top: -80px;
  right: -90px;
  width: 220px;
  height: 220px;
  border: 1px solid var(--line-soft);
  border-radius: 50%;
  content: "";
}

.practice-card-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 36px;
}

.practice-type {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--coral);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.practice-type::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  content: "";
  background: currentColor;
}

.practice-course-name {
  color: var(--muted);
  font-size: 10px;
}

.practice-card h2 {
  position: relative;
  z-index: 1;
  max-width: 780px;
  margin-bottom: 18px;
  font-family: var(--font-sans);
  font-size: clamp(22px, 3vw, 34px);
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: -0.025em;
}

.practice-prompt-context {
  margin-bottom: 28px;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.75;
}

.hint-box {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 23px 0;
}

.hint-chip {
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink-soft);
  background: #fbf8f2;
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 10px;
}

.source-clip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  margin: 22px 0;
  padding: 13px;
  border: 1px solid var(--line-soft);
  border-radius: 13px;
  background: #f8f5ee;
}

.source-clip video {
  width: min(270px, 100%);
  max-height: 145px;
  border-radius: 9px;
  background: #15221e;
}

.source-clip-copy strong {
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
}

.source-clip-copy span {
  color: var(--muted);
  font-size: 10px;
}

.source-clip-copy button {
  grid-column: 2;
}

.recording-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 34px;
  padding: 29px 20px;
  border: 1px dashed var(--line);
  border-radius: 18px;
  background:
    radial-gradient(circle at center, rgba(46, 103, 91, 0.04), transparent 65%),
    #fbf9f4;
}

.record-button {
  position: relative;
  display: grid;
  width: 76px;
  height: 76px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  background: var(--coral);
  box-shadow:
    0 0 0 9px rgba(219, 109, 81, 0.09),
    0 12px 28px rgba(219, 109, 81, 0.2);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.record-button:hover {
  transform: scale(1.03);
}

.record-button svg {
  width: 27px;
  height: 27px;
}

.record-button.is-recording {
  animation: record-pulse 1.2s ease-in-out infinite;
  background: var(--danger);
}

.record-button.is-recording svg {
  width: 21px;
  height: 21px;
}

@keyframes record-pulse {
  50% {
    box-shadow:
      0 0 0 16px rgba(184, 71, 63, 0.07),
      0 12px 28px rgba(219, 109, 81, 0.2);
  }
}

.record-caption {
  margin: 18px 0 0;
  color: var(--ink-soft);
  font-size: 11px;
}

.recording-playback {
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(480px, 100%);
  margin-top: 18px;
}

.recording-playback audio {
  flex: 1;
  height: 38px;
}

.answer-panel {
  margin-top: 24px;
  overflow: hidden;
  border: 1px solid rgba(46, 103, 91, 0.16);
  border-radius: 16px;
  background: var(--green-soft);
}

.answer-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 17px;
  border-bottom: 1px solid rgba(46, 103, 91, 0.12);
}

.answer-panel-head strong {
  color: var(--green-deep);
  font-size: 11px;
  letter-spacing: 0.06em;
}

.answer-panel-body {
  padding: 18px;
}

.answer-main {
  margin-bottom: 10px;
  color: var(--green-deep);
  font-family: var(--font-display);
  font-size: clamp(20px, 2.5vw, 28px);
  line-height: 1.45;
}

.answer-note {
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.65;
}

.rating-panel {
  margin-top: 24px;
}

.rating-title {
  margin-bottom: 11px;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 700;
}

.rating-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}

.rating-button {
  min-height: 66px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  background: #fbf9f4;
  transition: border-color 160ms ease, transform 160ms ease, background 160ms ease;
}

.rating-button:hover {
  border-color: var(--green);
  transform: translateY(-1px);
}

.rating-button strong {
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
}

.rating-button span {
  color: var(--muted);
  font-size: 9px;
}

.rating-button:nth-child(1):hover {
  background: #f7dfdc;
}

.rating-button:nth-child(2):hover {
  background: var(--gold-soft);
}

.rating-button:nth-child(3):hover,
.rating-button:nth-child(4):hover {
  background: var(--green-soft);
}

.session-complete {
  display: grid;
  min-height: 560px;
  padding: 50px 24px;
  place-items: center;
  align-content: center;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-xl);
  text-align: center;
  background: var(--card);
  box-shadow: var(--shadow);
}

.complete-orbit {
  display: grid;
  width: 108px;
  height: 108px;
  margin-bottom: 26px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--green);
  box-shadow:
    0 0 0 12px var(--green-soft),
    0 0 0 24px rgba(46, 103, 91, 0.05);
}

.complete-orbit svg {
  width: 42px;
  height: 42px;
}

.session-complete h1 {
  margin-bottom: 10px;
}

.session-complete p {
  max-width: 480px;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.75;
}

.complete-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 9px;
  margin-top: 20px;
}

.modal {
  width: min(720px, calc(100% - 28px));
  max-height: min(86vh, 900px);
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 24px;
  color: var(--ink);
  background: var(--card);
  box-shadow: 0 30px 100px rgba(20, 31, 27, 0.25);
}

.modal::backdrop {
  background: rgba(23, 34, 30, 0.45);
  backdrop-filter: blur(5px);
}

.modal-content {
  max-height: min(86vh, 900px);
  overflow: auto;
  padding: 28px;
}

.modal-close {
  position: sticky;
  top: 0;
  float: right;
  z-index: 2;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: var(--ink-soft);
  cursor: pointer;
  background: var(--paper);
}

.modal-cover {
  position: relative;
  min-height: 160px;
  margin: -28px -28px 24px;
  padding: 34px 28px;
  color: #fff;
  background: var(--green-deep);
}

.modal-cover h2 {
  max-width: 530px;
  margin: 17px 0 6px;
  color: #fff;
}

.modal-cover p {
  margin: 0;
  color: rgba(255, 255, 255, 0.6);
  font-size: 11px;
}

.modal-cover .modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.detail-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 22px;
}

.detail-stat {
  padding: 13px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: #fbf9f4;
}

.detail-stat span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 9px;
}

.detail-stat strong {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
}

.detail-section {
  margin-top: 22px;
}

.detail-section h3 {
  margin-bottom: 11px;
}

.transcript-preview {
  max-height: 180px;
  overflow: auto;
  padding: 15px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  color: var(--ink-soft);
  background: #fbf9f4;
  font-size: 11px;
  line-height: 1.75;
  white-space: pre-wrap;
}

.expression-list {
  display: grid;
  gap: 8px;
}

.expression-row {
  padding: 12px 13px;
  border: 1px solid var(--line-soft);
  border-radius: 11px;
  background: #fbf9f4;
}

.expression-row strong {
  display: block;
  margin-bottom: 3px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
}

.expression-row span {
  color: var(--muted);
  font-size: 10px;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line-soft);
}

.confirm-modal {
  width: min(430px, calc(100% - 28px));
}

.confirm-content {
  text-align: center;
}

.confirm-icon {
  display: grid;
  width: 55px;
  height: 55px;
  margin: 0 auto 17px;
  place-items: center;
  border-radius: 50%;
  color: var(--danger);
  background: #f7dfdc;
}

.confirm-icon svg {
  width: 25px;
  height: 25px;
}

.confirm-content p {
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.7;
}

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

.settings-card {
  padding: 25px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  background: var(--card);
  box-shadow: var(--shadow-small);
}

.api-settings-card {
  grid-column: 1 / -1;
  background:
    linear-gradient(135deg, rgba(46, 103, 91, 0.065), transparent 44%),
    var(--card);
}

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

.api-settings-heading .eyebrow {
  margin-bottom: 9px;
}

.api-settings-heading h2 {
  margin-bottom: 6px;
}

.api-settings-heading > .status-pill {
  flex: 0 0 auto;
  margin-top: 4px;
}

.api-settings-grid {
  display: grid;
  grid-template-columns: 1fr 0.72fr 1.15fr;
  gap: 14px;
  margin-top: 20px;
}

.api-settings-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 8px;
  margin-top: 15px;
}

.secret-input {
  position: relative;
}

.secret-input .input {
  padding-right: 56px;
  font-family: "Cascadia Code", Consolas, monospace;
}

.secret-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  padding: 5px 7px;
  border: 0;
  border-radius: 6px;
  color: var(--green);
  cursor: pointer;
  background: var(--green-soft);
  font-size: 9px;
  font-weight: 800;
  transform: translateY(-50%);
}

.api-status {
  margin-top: 13px;
  padding: 10px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  color: var(--ink-soft);
  background: #f8f5ee;
  font-size: 11px;
  line-height: 1.6;
}

.api-status svg {
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 4px;
  vertical-align: -2px;
}

.api-status.is-loading {
  color: var(--gold);
  border-color: #ead8b5;
  background: var(--gold-soft);
}

.api-status.is-success {
  color: var(--green);
  border-color: rgba(46, 103, 91, 0.18);
  background: var(--green-soft);
}

.api-status.is-error {
  color: var(--danger);
  border-color: #ecd0cc;
  background: #f7dfdc;
}

.button-spinner {
  width: 13px;
  height: 13px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.settings-card.danger {
  border-color: #ecd0cc;
}

.settings-card h2 {
  font-size: 23px;
}

.settings-card p {
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.7;
}

.settings-meta {
  display: grid;
  gap: 9px;
  margin: 20px 0;
}

.settings-meta div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 10px;
}

.settings-meta strong {
  color: var(--ink);
  font-weight: 700;
}

.toast-region {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 100;
  display: grid;
  gap: 8px;
  pointer-events: none;
}

.toast {
  min-width: 260px;
  max-width: min(390px, calc(100vw - 40px));
  padding: 13px 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: #fff;
  background: var(--ink);
  box-shadow: 0 16px 40px rgba(20, 31, 27, 0.2);
  font-size: 12px;
  line-height: 1.55;
  animation: toast-in 230ms ease both;
}

.toast.error {
  background: var(--danger);
}

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

.mobile-nav {
  display: none;
}

@media (max-width: 1100px) {
  :root {
    --sidebar-width: 216px;
  }

  .dashboard-grid,
  .form-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .helper-panel {
    position: static;
  }

  .helper-art {
    display: none;
  }

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

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

@media (max-width: 800px) {
  :root {
    --radius-xl: 22px;
  }

  .app-shell {
    display: block;
  }

  .sidebar {
    display: none;
  }

  .topbar {
    min-height: 68px;
    padding: calc(12px + env(safe-area-inset-top)) 18px 8px;
  }

  .mobile-brand {
    display: flex;
    align-items: center;
    gap: 9px;
  }

  .mobile-brand .brand-mark {
    width: 30px;
    height: 30px;
    padding: 6px;
    border-radius: 9px;
  }

  .mobile-brand strong {
    font-family: var(--font-display);
    font-size: 16px;
    letter-spacing: 0.04em;
  }

  .topbar-date {
    display: none;
  }

  .page {
    padding: 15px 17px 120px;
  }

  .mobile-nav {
    position: fixed;
    right: 12px;
    bottom: calc(10px + env(safe-area-inset-bottom));
    left: 12px;
    z-index: 40;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    align-items: center;
    min-height: 68px;
    padding: 7px 10px;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 19px;
    background: rgba(29, 43, 39, 0.95);
    box-shadow: 0 16px 42px rgba(20, 31, 27, 0.24);
    backdrop-filter: blur(15px);
  }

  .mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: 0;
    color: rgba(255, 255, 255, 0.5);
    font-size: 9px;
  }

  .mobile-nav-item.is-active {
    color: #fff;
  }

  .mobile-nav-item .nav-icon {
    width: 21px;
    height: 21px;
  }

  .mobile-nav-add {
    width: 48px;
    height: 48px;
    margin: -21px auto 0;
    border-radius: 50%;
    color: #fff;
    background: var(--coral);
    box-shadow: 0 8px 20px rgba(219, 109, 81, 0.35);
  }

  .mobile-nav-add svg {
    width: 24px;
    height: 24px;
  }

  .page-heading {
    display: block;
    margin-bottom: 20px;
  }

  h1 {
    font-size: 35px;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero-content {
    padding: 28px 23px 25px;
  }

  .hero h1 {
    font-size: 38px;
  }

  .hero-side {
    display: none;
  }

  .course-grid,
  .form-grid,
  .settings-grid {
    grid-template-columns: 1fr;
  }

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

  .mode-card {
    min-height: 290px;
  }

  .mode-selector {
    grid-template-columns: 1fr;
  }

  .mode-filter {
    display: flex;
    overflow-x: auto;
  }

  .mode-filter button {
    flex: 1 0 auto;
  }

  .course-pack-heading {
    display: block;
  }

  .course-pack-count {
    display: inline-block;
    margin-top: 7px;
  }

  .api-settings-card {
    grid-column: auto;
  }

  .api-settings-grid {
    grid-template-columns: 1fr;
  }

  .api-settings-heading {
    display: block;
  }

  .api-settings-heading > .status-pill {
    display: inline-flex;
    margin-top: 10px;
  }

  .api-settings-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .api-settings-actions .button {
    width: 100%;
  }

  .field-full {
    grid-column: auto;
  }

  .form-card,
  .import-card {
    padding: 21px 18px;
  }

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

  .form-actions .button {
    width: 100%;
  }

  .practice-card {
    padding: 24px 19px;
  }

  .practice-card-top {
    margin-bottom: 28px;
  }

  .practice-course-name {
    max-width: 135px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

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

  .source-clip {
    grid-template-columns: 1fr;
  }

  .source-clip video {
    width: 100%;
    max-height: 190px;
  }

  .source-clip-copy button {
    grid-column: auto;
  }

  .modal-content {
    padding: 20px;
  }

  .modal-cover {
    margin: -20px -20px 22px;
    padding: 30px 20px;
  }

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

  .toast-region {
    right: 16px;
    bottom: calc(92px + env(safe-area-inset-bottom));
    left: 16px;
  }

  .toast {
    min-width: 0;
    max-width: none;
  }
}

@media (max-width: 430px) {
  .hero-actions,
  .complete-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .hero-actions .button,
  .complete-actions .button {
    width: 100%;
  }

  .section-header {
    align-items: flex-start;
  }

  .detail-stats {
    grid-template-columns: 1fr;
  }
}

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