:root {
  color-scheme: light;
  --page: #f5f7f3;
  --surface: #ffffff;
  --surface-soft: #eef4f0;
  --surface-warm: #fbf6ea;
  --ink: #18211d;
  --muted: #69746f;
  --muted-strong: #4f5b55;
  --primary: #2f6b5f;
  --primary-hover: #275b51;
  --primary-soft: #dcece6;
  --primary-softer: #edf5f2;
  --amber: #d3963e;
  --amber-soft: #f6ead2;
  --blue: #4776a8;
  --blue-soft: #e8eff7;
  --danger: #b65353;
  --border: #dfe5e1;
  --border-strong: #cfd8d2;
  --shadow-soft: 0 12px 32px rgb(34 57 47 / 7%);
  --shadow-float: 0 20px 50px rgb(33 52 44 / 14%);
  --sidebar-width: 236px;
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --font-ui: Inter, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    radial-gradient(circle at 82% -20%, rgb(220 236 230 / 60%), transparent 34rem),
    var(--page);
  color: var(--ink);
  font-family: var(--font-ui);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

button {
  color: inherit;
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

svg {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--ink);
  color: white;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-12px);
}

.skip-link:focus {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid rgb(71 118 168 / 35%);
  outline-offset: 3px;
}

.app-shell {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  z-index: 20;
  inset: 0 auto 0 0;
  display: flex;
  width: var(--sidebar-width);
  flex-direction: column;
  padding: 28px 20px 22px;
  border-right: 1px solid rgb(223 229 225 / 85%);
  background: rgb(250 251 249 / 92%);
  backdrop-filter: blur(18px);
}

.brand,
.mobile-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand {
  padding: 0 8px;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 14px;
  background: var(--primary);
  color: white;
  box-shadow: 0 8px 20px rgb(47 107 95 / 18%);
}

.brand-mark svg {
  width: 25px;
  stroke-width: 1.7;
}

.brand-mark.small {
  width: 36px;
  height: 36px;
  border-radius: 12px;
}

.brand-mark.small svg {
  width: 21px;
}

.brand strong,
.mobile-brand strong {
  display: block;
  font-size: 17px;
  letter-spacing: -0.02em;
}

.brand small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.side-nav {
  display: grid;
  gap: 7px;
  margin-top: 42px;
}

.nav-item {
  display: flex;
  min-height: 48px;
  align-items: center;
  gap: 13px;
  padding: 0 14px;
  border-radius: 13px;
  color: var(--muted-strong);
  font-size: 14px;
  font-weight: 600;
  transition: 160ms ease;
}

.nav-item svg {
  width: 21px;
}

.nav-item:hover {
  background: rgb(237 245 242 / 70%);
  color: var(--primary);
}

.nav-item.active {
  background: var(--primary-soft);
  color: var(--primary);
}

.sidebar-note {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin-top: auto;
  padding: 14px;
  border: 1px solid #eadfca;
  border-radius: var(--radius-md);
  background: var(--surface-warm);
}

.note-icon {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: var(--amber-soft);
  color: #98651f;
  font-size: 13px;
  font-weight: 800;
}

.sidebar-note strong {
  font-size: 12px;
}

.sidebar-note p {
  margin: 4px 0 0;
  color: #7b6b51;
  font-size: 10px;
  line-height: 1.55;
}

.main {
  min-height: 100vh;
  margin-left: var(--sidebar-width);
}

.topbar {
  position: sticky;
  z-index: 15;
  top: 0;
  display: flex;
  min-height: 82px;
  align-items: center;
  justify-content: space-between;
  padding: 14px clamp(24px, 4vw, 56px);
  border-bottom: 1px solid rgb(223 229 225 / 75%);
  background: rgb(245 247 243 / 84%);
  backdrop-filter: blur(18px);
}

.mobile-brand {
  display: none;
}

.topbar-date span {
  display: block;
  font-size: 14px;
  font-weight: 700;
}

.topbar-date small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

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

.icon-button,
.more-button,
.audio-button {
  display: grid;
  min-width: 44px;
  min-height: 44px;
  cursor: pointer;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface);
  color: var(--muted-strong);
  transition: 160ms ease;
}

.icon-button:hover,
.more-button:hover,
.audio-button:hover {
  border-color: var(--border-strong);
  background: var(--primary-softer);
  color: var(--primary);
}

.icon-button {
  position: relative;
}

.icon-button svg,
.more-button svg,
.audio-button svg {
  width: 21px;
}

.notification-dot {
  position: absolute;
  top: 9px;
  right: 10px;
  width: 6px;
  height: 6px;
  border: 2px solid white;
  border-radius: 50%;
  background: var(--amber);
}

.profile-button {
  display: flex;
  min-height: 48px;
  cursor: pointer;
  align-items: center;
  gap: 10px;
  padding: 5px 9px 5px 6px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
}

.profile-button:hover {
  border-color: var(--border);
  background: rgb(255 255 255 / 70%);
}

.avatar {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  background: #e3e8e4;
  color: var(--primary);
  font-size: 14px;
  font-weight: 800;
}

.profile-copy {
  text-align: left;
}

.profile-copy strong,
.profile-copy small {
  display: block;
}

.profile-copy strong {
  font-size: 13px;
}

.profile-copy small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.profile-button > svg {
  width: 17px;
  color: var(--muted);
}

.dashboard {
  width: min(100%, 1320px);
  margin: 0 auto;
  padding: 38px clamp(24px, 4vw, 56px) 70px;
}

.welcome-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 25px;
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--primary);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.welcome-row h1 {
  margin: 0;
  font-size: clamp(27px, 3vw, 36px);
  letter-spacing: -0.045em;
}

.welcome-row > div > p:last-child {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.streak-pill {
  display: flex;
  min-height: 42px;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid #eadfc9;
  border-radius: 999px;
  background: var(--surface-warm);
  color: #8d6123;
  font-size: 12px;
  font-weight: 750;
}

.streak-pill svg {
  width: 18px;
  fill: #e6b45c;
  stroke: #b97921;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(280px, 0.68fr);
  gap: 24px;
}

.primary-column,
.secondary-column {
  display: grid;
  align-content: start;
  gap: 24px;
}

.today-card {
  position: relative;
  display: grid;
  min-height: 382px;
  overflow: hidden;
  grid-template-columns: minmax(0, 1.25fr) minmax(270px, 0.75fr);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(130deg, rgb(255 255 255 / 98%), rgb(246 250 247 / 94%)),
    var(--surface);
  box-shadow: var(--shadow-soft);
}

.today-copy {
  position: relative;
  z-index: 2;
  padding: 31px 30px 28px;
}

.card-heading,
.section-heading,
.attention-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.status-chip,
.due-chip,
.count-badge {
  display: inline-flex;
  min-height: 25px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
}

.status-chip {
  padding: 0 10px;
  background: var(--primary-soft);
  color: var(--primary);
}

.card-heading h2 {
  margin: 11px 0 0;
  font-size: 25px;
  letter-spacing: -0.035em;
}

.more-button {
  min-width: 40px;
  min-height: 40px;
  border-color: transparent;
  background: transparent;
}

.today-description {
  max-width: 590px;
  margin: 16px 0 22px;
  color: var(--muted-strong);
  font-size: 13px;
  line-height: 1.75;
}

.stage-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 13px 15px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgb(255 255 255 / 72%);
}

.stage-current {
  display: flex;
  align-items: center;
  gap: 11px;
}

.stage-icon {
  display: grid;
  width: 39px;
  height: 39px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 12px;
  background: var(--primary-soft);
  color: var(--primary);
}

.stage-icon svg {
  width: 20px;
}

.stage-current small,
.stage-current strong {
  display: block;
}

.stage-current small {
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 10px;
}

.stage-current strong {
  font-size: 13px;
}

.stage-meta {
  display: flex;
  align-items: center;
  gap: 13px;
  color: var(--muted);
  font-size: 11px;
}

.stage-meta strong {
  color: var(--ink);
  font-size: 15px;
}

.stage-meta span + span {
  padding-left: 13px;
  border-left: 1px solid var(--border);
}

.progress-block {
  margin-top: 18px;
}

.progress-copy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 10px;
}

.progress-copy strong {
  color: var(--primary);
  font-size: 11px;
}

.progress-track {
  width: 100%;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7ebe8;
}

.progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
}

.step-dots {
  display: flex;
  justify-content: space-between;
  margin: 11px 0 0;
  padding: 0;
  list-style: none;
}

.step-dots li {
  display: grid;
  justify-items: center;
  gap: 4px;
  color: #9aa39e;
}

.step-dots li span {
  display: grid;
  width: 21px;
  height: 21px;
  place-items: center;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  background: white;
  font-size: 8px;
  font-weight: 800;
}

.step-dots li small {
  font-size: 8px;
}

.step-dots li.done,
.step-dots li.active {
  color: var(--primary);
}

.step-dots li.done span {
  border-color: var(--primary);
  background: var(--primary);
  color: white;
}

.step-dots li.active span {
  border: 2px solid var(--primary);
  background: var(--primary-soft);
}

.primary-button,
.secondary-button,
.text-button {
  display: inline-flex;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 0;
  font-weight: 750;
  transition: 160ms ease;
}

.primary-button {
  min-height: 49px;
  margin-top: 20px;
  padding: 0 19px;
  border-radius: 13px;
  background: var(--primary);
  color: white;
  box-shadow: 0 9px 18px rgb(47 107 95 / 17%);
  font-size: 13px;
}

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

.primary-button:active,
.secondary-button:active {
  transform: translateY(0);
}

.primary-button svg,
.secondary-button svg,
.text-button svg {
  width: 17px;
}

.today-visual {
  position: relative;
  min-height: 100%;
  overflow: hidden;
  background:
    linear-gradient(150deg, rgb(224 238 232 / 80%), rgb(242 247 244 / 35%)),
    var(--primary-softer);
}

.today-visual::before {
  position: absolute;
  right: -60px;
  bottom: -70px;
  width: 240px;
  height: 240px;
  border: 1px solid rgb(47 107 95 / 10%);
  border-radius: 50%;
  content: "";
}

.visual-orbit {
  position: absolute;
  border: 1px solid rgb(47 107 95 / 13%);
  border-radius: 50%;
}

.orbit-one {
  top: 26px;
  right: -20px;
  width: 150px;
  height: 150px;
}

.orbit-two {
  top: 65px;
  right: 24px;
  width: 58px;
  height: 58px;
}

.word-card {
  position: absolute;
  display: flex;
  width: 190px;
  min-height: 112px;
  flex-direction: column;
  justify-content: center;
  padding: 17px;
  border: 1px solid rgb(207 216 210 / 80%);
  border-radius: 17px;
  background: rgb(255 255 255 / 90%);
  box-shadow: 0 18px 35px rgb(42 74 62 / 12%);
  backdrop-filter: blur(10px);
}

.word-card span {
  font-size: 16px;
  font-weight: 800;
}

.word-card small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 9px;
}

.word-card-back {
  top: 44px;
  left: 50%;
  opacity: 0.56;
  transform: translateX(-50%) rotate(7deg);
}

.word-card-middle {
  top: 105px;
  left: 50%;
  opacity: 0.78;
  transform: translateX(-50%) rotate(-5deg);
}

.word-card-front {
  top: 164px;
  left: 50%;
  min-height: 139px;
  transform: translateX(-50%) rotate(1deg);
}

.word-card-front strong {
  margin-top: 13px;
  color: var(--primary);
  font-size: 13px;
}

.word-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.word-card-top svg {
  width: 18px;
  color: var(--primary);
}

.mini-progress {
  display: flex;
  gap: 4px;
  margin-top: 15px;
}

.mini-progress i {
  width: 21px;
  height: 3px;
  border-radius: 999px;
  background: #e0e6e2;
}

.mini-progress i:nth-child(-n + 3) {
  background: var(--primary);
}

.section-block {
  padding-top: 4px;
}

.section-heading {
  align-items: flex-end;
  margin-bottom: 16px;
}

.section-heading.compact {
  align-items: center;
}

.section-heading h2,
.attention-header h2,
.review-card h2 {
  margin: 0;
  font-size: 18px;
  letter-spacing: -0.025em;
}

.text-button {
  min-height: 40px;
  padding: 0;
  background: transparent;
  color: var(--primary);
  font-size: 11px;
}

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

.stat-card {
  display: flex;
  min-height: 116px;
  align-items: center;
  gap: 13px;
  padding: 17px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: 0 7px 20px rgb(40 63 53 / 4%);
}

.stat-icon {
  display: grid;
  width: 41px;
  height: 41px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 13px;
}

.stat-icon svg {
  width: 21px;
}

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

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

.stat-icon.time {
  background: var(--amber-soft);
  color: #98651f;
}

.stat-card span,
.stat-card strong,
.stat-card small {
  display: block;
}

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

.stat-card strong {
  margin-top: 4px;
  font-size: 24px;
  letter-spacing: -0.04em;
}

.stat-card strong em {
  margin-left: 3px;
  color: var(--muted-strong);
  font-size: 10px;
  font-style: normal;
  font-weight: 600;
}

.stat-card small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
}

.stat-card small b {
  color: var(--primary);
}

.activity-card,
.review-card,
.attention-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: 0 7px 20px rgb(40 63 53 / 4%);
}

.activity-card {
  padding: 22px 23px 17px;
}

.legend {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 9px;
}

.legend span {
  width: 8px;
  height: 8px;
  border-radius: 3px;
  background: var(--primary);
}

.chart {
  position: relative;
  display: grid;
  height: 176px;
  grid-template-columns: repeat(7, 1fr);
  align-items: end;
  gap: clamp(8px, 2vw, 20px);
  padding-top: 24px;
}

.chart-line {
  position: absolute;
  z-index: 0;
  right: 0;
  left: 0;
  border-top: 1px dashed #e6ebe7;
}

.line-one {
  top: 35px;
}

.line-two {
  top: 79px;
}

.line-three {
  top: 123px;
}

.bar-column {
  position: relative;
  z-index: 1;
  display: grid;
  height: 100%;
  grid-template-rows: 1fr 20px;
  align-items: end;
  justify-items: center;
  gap: 7px;
}

.bar {
  position: relative;
  display: block;
  width: min(27px, 65%);
  height: var(--height);
  min-height: 14px;
  align-self: end;
  border-radius: 7px 7px 3px 3px;
  background: #dfe9e5;
  transition: 180ms ease;
}

.bar-column:hover .bar {
  background: #c7ddd5;
}

.bar-column.today .bar {
  background: var(--primary);
}

.bar b {
  position: absolute;
  top: -22px;
  left: 50%;
  color: var(--primary);
  font-size: 9px;
  transform: translateX(-50%);
}

.bar-column small {
  color: var(--muted);
  font-size: 8px;
}

.bar-column.today small {
  color: var(--primary);
  font-weight: 800;
}

.review-card {
  padding: 23px;
  background:
    radial-gradient(circle at 95% 0%, rgb(220 236 230 / 70%), transparent 10rem),
    var(--surface);
}

.review-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 23px;
}

.review-icon {
  display: grid;
  width: 45px;
  height: 45px;
  place-items: center;
  border-radius: 15px;
  background: var(--primary-soft);
  color: var(--primary);
}

.review-icon svg {
  width: 23px;
}

.due-chip {
  padding: 0 10px;
  background: var(--amber-soft);
  color: #936422;
}

.review-card h2 {
  font-size: 20px;
}

.review-card > p:not(.eyebrow) {
  margin: 10px 0 17px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.review-words {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.review-words span {
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #fafbf9;
  font-size: 10px;
  font-weight: 700;
}

.secondary-button {
  width: 100%;
  min-height: 45px;
  margin-top: 19px;
  border: 1px solid var(--primary);
  border-radius: 12px;
  background: transparent;
  color: var(--primary);
  font-size: 12px;
}

.secondary-button:hover {
  background: var(--primary-softer);
}

.attention-card {
  padding: 21px 20px 8px;
}

.attention-header {
  align-items: center;
  margin-bottom: 9px;
}

.attention-header h2 {
  font-size: 16px;
}

.count-badge {
  min-width: 26px;
  padding: 0 8px;
  background: var(--blue-soft);
  color: var(--blue);
}

.attention-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.attention-list li {
  display: flex;
  min-height: 63px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid #edf0ee;
}

.attention-list strong,
.attention-list span {
  display: block;
}

.attention-list strong {
  font-size: 13px;
}

.attention-list span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.audio-button {
  min-width: 38px;
  min-height: 38px;
  border-color: transparent;
  background: var(--primary-softer);
  color: var(--primary);
}

.audio-button svg {
  width: 18px;
}

.audio-button.playing {
  background: var(--primary);
  color: white;
  animation: audio-pulse 1s ease-in-out infinite;
}

@keyframes audio-pulse {
  50% {
    box-shadow: 0 0 0 6px rgb(47 107 95 / 11%);
  }
}

.quote-card {
  position: relative;
  margin: 0;
  overflow: hidden;
  padding: 21px 22px;
  border: 1px solid #eadfc9;
  border-radius: var(--radius-lg);
  background: var(--surface-warm);
  color: #675a47;
}

.quote-card svg {
  position: absolute;
  top: 10px;
  right: 15px;
  width: 45px;
  color: rgb(211 150 62 / 22%);
  fill: currentColor;
  stroke: none;
}

.quote-card p {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: 12px;
  line-height: 1.75;
}

.bottom-nav {
  display: none;
}

dialog {
  width: min(92vw, 470px);
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-float);
}

dialog::backdrop {
  background: rgb(24 33 29 / 42%);
  backdrop-filter: blur(3px);
}

.dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 24px 17px;
}

.dialog-header h2 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -0.035em;
}

.dialog-close {
  min-width: 40px;
  min-height: 40px;
  border-color: transparent;
}

.dialog-steps {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 2px 24px 12px;
  list-style: none;
}

.dialog-steps li {
  position: relative;
  display: flex;
  min-height: 61px;
  align-items: center;
  gap: 13px;
}

.dialog-steps li:not(:last-child)::after {
  position: absolute;
  top: 43px;
  bottom: -8px;
  left: 16px;
  width: 1px;
  background: var(--border);
  content: "";
}

.dialog-steps li > span {
  z-index: 1;
  display: grid;
  width: 33px;
  height: 33px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  background: white;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.dialog-steps li > span svg {
  width: 17px;
}

.dialog-steps li.done > span {
  border-color: var(--primary);
  background: var(--primary);
  color: white;
}

.dialog-steps li.current > span {
  border: 2px solid var(--primary);
  background: var(--primary-soft);
  color: var(--primary);
}

.dialog-steps strong,
.dialog-steps small {
  display: block;
}

.dialog-steps strong {
  font-size: 13px;
}

.dialog-steps small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
}

.dialog-action {
  width: calc(100% - 48px);
  margin: 8px 24px 24px;
}

.dialog-intro {
  margin: 0;
  padding: 0 24px 17px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.review-dialog-words {
  display: grid;
  gap: 8px;
  padding: 0 24px 8px;
}

.review-dialog-words > span {
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fafbf9;
}

.review-dialog-words strong {
  font-size: 13px;
}

.review-dialog-words small {
  color: var(--muted);
  font-size: 10px;
}

.toast {
  position: fixed;
  z-index: 100;
  right: 24px;
  bottom: 24px;
  display: flex;
  min-height: 48px;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  border: 1px solid rgb(47 107 95 / 25%);
  border-radius: 13px;
  background: var(--ink);
  color: white;
  box-shadow: var(--shadow-float);
  font-size: 12px;
  font-weight: 650;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: 180ms ease;
}

.toast.show {
  opacity: 1;
  transform: none;
}

.toast svg {
  width: 18px;
  color: #8ed1bd;
}

@media (max-width: 1120px) {
  .dashboard-grid {
    grid-template-columns: minmax(0, 1fr) 278px;
  }

  .today-card {
    grid-template-columns: minmax(0, 1fr) 220px;
  }

  .word-card {
    width: 164px;
  }

  .stat-card {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (min-width: 840px) and (max-width: 1199px) {
  :root {
    --sidebar-width: 208px;
  }

  .sidebar {
    padding: 26px 14px 20px;
  }

  .brand {
    padding: 0 7px;
  }

  .side-nav {
    margin-top: 36px;
  }

  .sidebar-note {
    padding: 12px;
  }

  .topbar {
    padding-right: 28px;
    padding-left: 28px;
  }

  .dashboard {
    padding: 32px 28px 60px;
  }

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

  .today-card {
    grid-template-columns: minmax(0, 1fr) 210px;
  }

  .today-copy {
    padding: 28px 26px 26px;
  }

  .today-description {
    max-width: 520px;
  }

  .today-visual {
    min-width: 210px;
  }

  .word-card {
    width: 164px;
  }

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

  .review-card,
  .attention-card {
    height: 100%;
  }

  .quote-card {
    grid-column: 1 / -1;
  }

  .stat-card {
    align-items: center;
    flex-direction: row;
  }
}

@media (max-width: 839px) {
  body {
    background:
      radial-gradient(circle at 110% -10%, rgb(220 236 230 / 65%), transparent 24rem),
      var(--page);
  }

  .sidebar {
    display: none;
  }

  .main {
    margin-left: 0;
    padding-bottom: 79px;
  }

  .topbar {
    min-height: 65px;
    padding: 10px 16px;
  }

  .mobile-brand {
    display: inline-flex;
  }

  .topbar-date {
    display: none;
  }

  .profile-copy,
  .profile-button > svg {
    display: none;
  }

  .profile-button {
    min-width: 44px;
    padding: 3px;
  }

  .avatar {
    width: 38px;
    height: 38px;
  }

  .dashboard {
    padding: 24px 16px 38px;
  }

  .welcome-row {
    align-items: flex-start;
    margin-bottom: 20px;
  }

  .welcome-row h1 {
    font-size: 28px;
  }

  .welcome-row > div > p:last-child {
    font-size: 12px;
  }

  .streak-pill {
    min-height: 36px;
    padding: 0 11px;
    white-space: nowrap;
    font-size: 10px;
  }

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

  .primary-column,
  .secondary-column {
    gap: 20px;
  }

  .secondary-column {
    grid-row: 2;
  }

  .today-card {
    grid-template-columns: 1fr;
  }

  .today-copy {
    padding: 24px 20px 22px;
  }

  .card-heading h2 {
    font-size: 22px;
  }

  .today-description {
    font-size: 12px;
  }

  .today-visual {
    display: none;
  }

  .stage-summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .stage-meta {
    width: 100%;
    justify-content: space-between;
  }

  .stage-meta span + span {
    border-left: 0;
  }

  .primary-button {
    width: 100%;
  }

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

  .stat-card {
    min-height: 122px;
    gap: 10px;
    padding: 13px 11px;
  }

  .stat-icon {
    width: 35px;
    height: 35px;
    border-radius: 11px;
  }

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

  .stat-card strong {
    font-size: 21px;
  }

  .stat-card small {
    line-height: 1.4;
  }

  .activity-card {
    padding: 20px 16px 15px;
  }

  .chart {
    height: 156px;
    gap: 8px;
  }

  .review-card,
  .attention-card {
    padding-right: 19px;
    padding-left: 19px;
  }

  .bottom-nav {
    position: fixed;
    z-index: 30;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    min-height: 70px;
    grid-template-columns: repeat(5, 1fr);
    padding: 7px max(7px, env(safe-area-inset-right)) max(7px, env(safe-area-inset-bottom))
      max(7px, env(safe-area-inset-left));
    border-top: 1px solid rgb(223 229 225 / 90%);
    background: rgb(255 255 255 / 94%);
    backdrop-filter: blur(18px);
  }

  .bottom-nav a {
    display: grid;
    min-height: 52px;
    place-content: center;
    justify-items: center;
    gap: 4px;
    border-radius: 12px;
    color: #7a847f;
    font-size: 9px;
    font-weight: 650;
  }

  .bottom-nav a svg {
    width: 21px;
  }

  .bottom-nav a.active {
    background: var(--primary-softer);
    color: var(--primary);
  }

  .toast {
    right: 16px;
    bottom: calc(82px + env(safe-area-inset-bottom));
    left: 16px;
    justify-content: center;
  }

  dialog {
    width: calc(100% - 24px);
    max-height: calc(100dvh - 24px);
    margin-bottom: 12px;
    border-radius: 22px 22px 16px 16px;
  }
}

@media (max-width: 430px) {
  .welcome-row {
    gap: 10px;
  }

  .welcome-row h1 {
    font-size: 25px;
  }

  .welcome-row > div > p:last-child {
    max-width: 230px;
  }

  .streak-pill svg {
    display: none;
  }

  .section-heading h2 {
    font-size: 16px;
  }

  .stat-card span {
    font-size: 9px;
  }

  .stat-card strong {
    font-size: 20px;
  }

  .stat-card strong em {
    display: block;
    margin: 2px 0 0;
  }
}

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