:root {
  color-scheme: light;
  --ink: #1f1b16;
  --ink-deep: #17130e;
  --muted-ink: #6f6557;
  --paper: #fffaf0;
  --paper-bg: #efe6d6;
  --paper-soft: #f7efdf;
  --paper-deep: #e2d3bb;
  --paper-line: rgba(99, 76, 48, 0.18);
  --paper-ink: #111817;
  --panel: rgba(255, 250, 240, 0.82);
  --panel-strong: rgba(255, 250, 240, 0.94);
  --panel-line: rgba(99, 76, 48, 0.18);
  --muted: #6f6557;
  --text: #1f1b16;
  --blue: #2f6f8f;
  --blue-strong: #265b76;
  --jade: #357960;
  --gold: #8d6b2d;
  --danger: #a7352a;
  --warn: #b86a18;
  --shadow: 0 16px 36px rgba(72, 52, 31, 0.08);
  font-family:
    ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "SF Pro Text", "PingFang SC", "Hiragino Sans GB", sans-serif;
}

/* Inkstone web desk surfaces */
.brand-lockup {
  min-width: 0;
}

.brand-wordmark {
  margin: 0;
  color: var(--ink-deep);
  font-family: "Songti SC", "STSong", "Songti TC", serif;
  font-size: clamp(1.35rem, 2.2vw, 1.75rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.05;
}

body.guest-mode .app-shell {
  min-height: 100vh;
  padding: 0;
}

body.guest-mode .app-shell::before {
  display: none;
}

body.guest-mode .desk-topbar,
body.guest-mode .suite-drawer,
body.guest-mode .suite-backdrop {
  display: none !important;
}

.platform-nav {
  display: none;
}

.platform-nav-button {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--muted-ink);
  background: transparent;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 760;
}

.platform-nav-button:hover,
.platform-nav-button:focus-visible,
.platform-nav-button.is-active {
  border-color: rgba(53, 121, 96, 0.22);
  color: var(--ink);
  background: rgba(53, 121, 96, 0.1);
}

.auth-header-button {
  color: var(--jade);
}

.auth-view.landing-view {
  position: relative;
  display: grid;
  min-height: 100vh;
  max-width: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  place-items: center;
}

.landing-stage {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 80% 60% at 70% 40%, rgba(255, 236, 196, 0.55), transparent 55%),
    radial-gradient(ellipse 50% 40% at 20% 70%, rgba(53, 121, 96, 0.12), transparent 50%),
    linear-gradient(160deg, #2a2118 0%, #4a3a2a 28%, #8b7355 55%, #c4a574 78%, #efe6d6 100%);
}

.landing-desk {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.landing-light {
  position: absolute;
  top: -20%;
  left: 30%;
  width: 55%;
  height: 70%;
  background: radial-gradient(ellipse at center, rgba(255, 248, 230, 0.55), transparent 68%);
  animation: landing-light-sweep 12s ease-in-out infinite alternate;
  pointer-events: none;
}

.landing-paper {
  position: absolute;
  right: 12%;
  top: 22%;
  width: min(42vw, 420px);
  height: min(52vh, 480px);
  border-radius: 4px 18px 6px 4px;
  background:
    linear-gradient(90deg, rgba(99, 76, 48, 0.05) 1px, transparent 1px),
    linear-gradient(rgba(255, 250, 240, 0.97), rgba(247, 239, 223, 0.92));
  background-size: 28px 28px, auto;
  box-shadow:
    0 30px 60px rgba(20, 14, 8, 0.35),
    inset 0 0 0 1px rgba(99, 76, 48, 0.12);
  transform: rotate(-4deg) perspective(800px) rotateY(-8deg);
  animation: landing-paper-breathe 10s ease-in-out infinite alternate;
}

.landing-paper-2 {
  right: auto;
  left: 8%;
  top: 38%;
  width: min(28vw, 280px);
  height: min(36vh, 320px);
  opacity: 0.72;
  transform: rotate(8deg) perspective(800px) rotateY(6deg);
  animation-delay: -4s;
}

.landing-inkstone {
  position: absolute;
  left: 22%;
  bottom: 18%;
  width: 88px;
  height: 52px;
  border-radius: 40% 40% 30% 30%;
  background: radial-gradient(circle at 40% 35%, #3a342c, #12100d 70%);
  box-shadow:
    0 12px 24px rgba(0, 0, 0, 0.35),
    inset 0 8px 12px rgba(255, 255, 255, 0.06);
}

.landing-inkstone::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 28%;
  width: 28px;
  height: 18px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 30%, #2a2420, #0a0908);
  transform: translateX(-50%);
  box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.08);
}

.landing-brush {
  position: absolute;
  left: 28%;
  bottom: 28%;
  width: 160px;
  height: 10px;
  border-radius: 4px;
  background: linear-gradient(90deg, #1a1510 0%, #1a1510 22%, #8b6914 22%, #c4a050 70%, #5c4030 70%, #2a2018 100%);
  transform: rotate(-28deg);
  transform-origin: left center;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.25);
  animation: landing-brush-sway 9s ease-in-out infinite alternate;
}

.landing-glyph {
  position: absolute;
  color: rgba(255, 250, 240, 0.14);
  font-family: "Songti SC", "STSong", serif;
  font-weight: 700;
  line-height: 1;
  user-select: none;
  animation: landing-glyph-float 14s ease-in-out infinite alternate;
}

.landing-glyph-a { top: 14%; left: 18%; font-size: clamp(3rem, 8vw, 6rem); animation-delay: 0s; }
.landing-glyph-b { top: 28%; right: 18%; font-size: clamp(2.5rem, 6vw, 4.5rem); animation-delay: -3s; color: rgba(31, 27, 22, 0.08); }
.landing-glyph-c { bottom: 22%; right: 28%; font-size: clamp(2rem, 5vw, 3.5rem); animation-delay: -6s; }
.landing-glyph-d { top: 48%; left: 42%; font-size: clamp(1.5rem, 3vw, 2.5rem); animation-delay: -2s; color: rgba(31, 27, 22, 0.1); }

.landing-mist {
  position: absolute;
  inset: auto 0 0;
  height: 35%;
  background: linear-gradient(transparent, rgba(239, 230, 214, 0.45));
  pointer-events: none;
}

@keyframes landing-light-sweep {
  from { transform: translate(-6%, 2%) scale(1); opacity: 0.75; }
  to { transform: translate(8%, -4%) scale(1.08); opacity: 1; }
}

@keyframes landing-paper-breathe {
  from { transform: rotate(-4deg) perspective(800px) rotateY(-8deg) translateY(0); }
  to { transform: rotate(-3deg) perspective(800px) rotateY(-6deg) translateY(-6px); }
}

@keyframes landing-brush-sway {
  from { transform: rotate(-30deg); }
  to { transform: rotate(-24deg); }
}

@keyframes landing-glyph-float {
  from { transform: translateY(0); opacity: 0.55; }
  to { transform: translateY(-14px); opacity: 1; }
}

.landing-content {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 28px;
  width: min(920px, calc(100% - 32px));
  margin: 32px auto;
  padding: 28px 24px 32px;
  border: 1px solid rgba(255, 250, 240, 0.28);
  border-radius: 18px;
  background: rgba(255, 250, 240, 0.78);
  box-shadow: 0 28px 64px rgba(24, 16, 8, 0.28);
  backdrop-filter: blur(10px);
}

.landing-brand {
  text-align: center;
}

.landing-logo {
  display: grid;
  width: 88px;
  height: 88px;
  margin: 0 auto 14px;
  place-items: center;
  border: 1px solid rgba(53, 121, 96, 0.28);
  border-radius: 50%;
  color: var(--jade);
  background:
    radial-gradient(circle at 35% 30%, rgba(255, 250, 240, 0.95), rgba(247, 239, 223, 0.85)),
    rgba(53, 121, 96, 0.08);
  box-shadow: 0 12px 28px rgba(45, 38, 31, 0.12);
  font-family: "Songti SC", "STSong", serif;
  font-size: 2.6rem;
  font-weight: 700;
}

.landing-kicker {
  margin: 0 0 6px;
  color: var(--muted-ink);
  font-size: 0.78rem;
  font-weight: 780;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.landing-wordmark {
  margin: 0 0 12px;
  color: var(--ink-deep);
  font-family: "Songti SC", "STSong", serif;
  font-size: clamp(2.8rem, 8vw, 4.6rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 0.95;
}

.landing-tagline {
  max-width: 34rem;
  margin: 0 auto;
  color: var(--muted-ink);
  font-size: 1.02rem;
  line-height: 1.5;
}

.landing-auth-panel {
  display: grid;
  gap: 14px;
  width: min(420px, 100%);
  margin: 0 auto;
}

.auth-mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--paper-line);
  border-radius: 999px;
  background: rgba(255, 250, 240, 0.55);
}

.auth-mode-tab {
  min-height: 40px;
  border: 0;
  border-radius: 999px;
  color: var(--muted-ink);
  background: transparent;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 760;
  cursor: pointer;
}

.auth-mode-tab.is-active {
  color: var(--ink);
  background: rgba(53, 121, 96, 0.14);
  box-shadow: 0 1px 0 rgba(255, 255, 240, 0.6);
}

.landing-auth-card {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--paper-line);
  border-radius: 12px;
  background: rgba(255, 250, 240, 0.9);
}

.landing-auth-card[hidden] {
  display: none !important;
}

.auth-social-actions {
  display: grid;
  gap: 10px;
  margin: 16px 0;
}

.auth-social-actions[hidden],
.auth-social-button[hidden] {
  display: none;
}

.auth-social-actions > p {
  margin: 0;
  color: var(--muted-ink);
  font-size: 0.76rem;
  font-weight: 760;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.auth-social-buttons {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.auth-social-button {
  display: inline-flex;
  min-width: 150px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 18px;
  border: 1px solid var(--paper-line);
  border-radius: 9px;
  color: var(--ink);
  background: rgba(255, 250, 240, 0.86);
  font-size: 0.84rem;
  font-weight: 780;
  text-decoration: none;
}

.auth-social-button:hover {
  border-color: rgba(53, 121, 96, 0.34);
  box-shadow: 0 6px 18px rgba(45, 38, 31, 0.08);
}

.auth-social-button span {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 50%;
  font-size: 0.82rem;
  font-weight: 850;
}

.auth-social-button.google span {
  color: #2458b8;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(36, 88, 184, 0.18);
}

.auth-social-button.x span {
  color: #fff;
  background: #111;
}

.auth-social-button.apple span {
  color: #fff;
  background: #111;
  font-size: 0.62rem;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted-ink);
  font-size: 0.72rem;
}

.auth-divider::before,
.auth-divider::after {
  height: 1px;
  flex: 1;
  background: rgba(63, 52, 41, 0.12);
  content: "";
}

.auth-card {
  display: grid;
  gap: 14px;
}

.auth-field {
  display: grid;
  gap: 6px;
  color: var(--muted-ink);
  font-size: 0.78rem;
  font-weight: 760;
}

.auth-field input {
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--paper-line);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 250, 240, 0.76);
  font: inherit;
}

.auth-field input:focus {
  outline: 2px solid rgba(53, 121, 96, 0.25);
  outline-offset: 2px;
}

.auth-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--muted-ink);
  font-size: 0.8rem;
  line-height: 1.4;
}

.auth-check input {
  margin-top: 3px;
}

.auth-status {
  min-height: 24px;
  margin: 14px 0 0;
  color: var(--danger);
  font-size: 0.82rem;
  line-height: 1.45;
  text-align: center;
}

.auth-local-button {
  display: block;
  margin: 0 auto;
}

.auth-link-button {
  justify-self: start;
  padding: 0;
  border: 0;
  color: var(--jade);
  background: transparent;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 760;
  cursor: pointer;
}

.auth-link-button:hover {
  text-decoration: underline;
}

.auth-recovery-panel {
  display: grid;
  gap: 14px;
  max-width: 720px;
  margin: 14px auto 0;
}

.auth-recovery-panel[hidden],
.auth-recovery-form[hidden] {
  display: none;
}

.auth-recovery-form {
  display: grid;
  gap: 12px;
}

.auth-recovery-form .dashboard-copy {
  margin: 0;
}

.auth-recovery-status {
  min-height: 20px;
  margin: 0;
  color: var(--muted-ink);
  font-size: 0.8rem;
  line-height: 1.45;
}

.platform-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
  padding: 26px;
  border: 1px solid var(--paper-line);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255, 250, 240, 0.94), rgba(247, 239, 223, 0.72));
  box-shadow: var(--shadow);
}

.platform-hero h2 {
  max-width: 720px;
  margin: 6px 0 10px;
  color: var(--ink-deep);
  font-family: "Songti SC", "STSong", serif;
  font-size: clamp(2rem, 4vw, 3.7rem);
  line-height: 0.98;
}

.platform-hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.progress-metrics,
.progress-ledger-grid,
.memory-library-grid {
  display: grid;
  gap: 14px;
}

.progress-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 14px;
}

.progress-metrics .metric-card {
  min-height: 126px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.progress-metrics .metric-card span {
  color: var(--muted-ink);
  font-size: 0.78rem;
}

.progress-ledger-grid {
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
}

.progress-overview-panel,
.progress-activity-panel {
  min-height: 560px;
}

.ledger-progress-track,
.progress-group-track {
  overflow: hidden;
  border-radius: 999px;
  background: rgba(99, 76, 48, 0.1);
}

.ledger-progress-track {
  height: 12px;
  margin: 18px 0 12px;
}

.ledger-progress-track span,
.progress-group-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--jade), #6f9b75);
  transition: width 240ms ease;
}

.ledger-stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding-bottom: 18px;
  color: var(--muted-ink);
  border-bottom: 1px solid var(--paper-line);
  font-size: 0.84rem;
}

.ledger-stat-row strong {
  color: var(--ink);
}

.progress-group-list {
  display: grid;
  gap: 2px;
  margin-top: 12px;
}

.progress-group-row {
  display: grid;
  grid-template-columns: minmax(170px, 1.2fr) minmax(100px, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 62px;
  padding: 8px 0;
  border: 0;
  border-bottom: 1px solid rgba(99, 76, 48, 0.1);
  color: var(--ink);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.progress-group-row:hover,
.progress-group-row:focus-visible {
  color: var(--jade);
}

.progress-group-heading,
.memory-card-body {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.progress-group-heading small,
.memory-card-body small,
.memory-card-body em {
  overflow: hidden;
  color: var(--muted-ink);
  font-size: 0.76rem;
  font-style: normal;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.progress-group-status {
  color: var(--muted-ink);
  font-size: 0.76rem;
  white-space: nowrap;
}

.progress-group-track {
  height: 7px;
}

.progress-cloud-note {
  display: flex;
  gap: 10px;
  margin-top: 24px;
  padding: 14px;
  border: 1px solid rgba(53, 121, 96, 0.2);
  border-radius: 8px;
  background: rgba(53, 121, 96, 0.07);
}

.progress-cloud-note p {
  margin: 4px 0 0;
  color: var(--muted-ink);
  font-size: 0.8rem;
  line-height: 1.45;
}

.status-dot {
  width: 9px;
  height: 9px;
  margin-top: 4px;
  border-radius: 50%;
  background: var(--jade);
  box-shadow: 0 0 0 4px rgba(53, 121, 96, 0.1);
}

.memory-library-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.memory-library-toolbar input {
  width: min(420px, 100%);
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--paper-line);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 250, 240, 0.78);
}

.memory-library-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.memory-library-panel {
  min-height: 320px;
}

.memory-library-panel-wide {
  grid-column: 1 / -1;
}

.memory-card-list {
  display: grid;
  gap: 6px;
  max-height: 440px;
  overflow: auto;
  padding-right: 4px;
}

.memory-object-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-height: 500px;
}

.memory-card {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 62px;
  padding: 9px;
  border: 1px solid rgba(99, 76, 48, 0.12);
  border-radius: 8px;
  background: rgba(247, 239, 223, 0.45);
}

.memory-card:hover {
  border-color: rgba(53, 121, 96, 0.3);
  background: rgba(53, 121, 96, 0.06);
}

.memory-card-key {
  display: grid;
  min-height: 42px;
  place-items: center;
  border-radius: 6px;
  color: var(--ink-deep);
  background: rgba(214, 190, 132, 0.3);
  font-family: "Songti SC", "STSong", serif;
  font-size: 1.35rem;
  font-weight: 900;
}

.memory-card-actor .memory-card-key,
.memory-card-final .memory-card-key {
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 0.85rem;
  letter-spacing: 0.03em;
}

.origin-atlas-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.origin-atlas-toolbar input {
  width: min(460px, 100%);
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--paper-line);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 250, 240, 0.78);
}

.origin-atlas-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.origin-atlas-metrics .metric-card {
  min-height: 116px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.origin-atlas-metrics .metric-card span {
  color: var(--muted-ink);
  font-size: 0.78rem;
}

.origin-atlas-panel {
  min-height: 520px;
}

.origin-record-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  max-height: 780px;
  overflow: auto;
}

.origin-record-card {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 12px;
  padding: 11px;
  border: 1px solid rgba(99, 76, 48, 0.13);
  border-radius: 8px;
  background: rgba(247, 239, 223, 0.45);
}

.origin-record-card:hover {
  border-color: rgba(53, 121, 96, 0.32);
  background: rgba(53, 121, 96, 0.06);
}

.origin-record-card.is-unsourced {
  opacity: 0.72;
}

.origin-record-mark {
  display: grid;
  min-height: 62px;
  place-items: center;
  align-self: start;
  border: 1px solid rgba(99, 76, 48, 0.14);
  border-radius: 8px;
  color: var(--ink-deep);
  background: rgba(214, 190, 132, 0.3);
  cursor: pointer;
  font-family: "Songti SC", "STSong", serif;
  font-size: 2.25rem;
  font-weight: 900;
}

.origin-record-mark:hover,
.origin-record-mark:focus-visible {
  border-color: rgba(53, 121, 96, 0.48);
  color: var(--jade);
}

.origin-record-body {
  display: grid;
  align-content: start;
  gap: 6px;
  min-width: 0;
}

.origin-record-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.origin-record-heading strong {
  overflow: hidden;
  color: var(--ink);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.origin-record-heading small,
.origin-record-meta {
  color: var(--muted-ink);
  font-size: 0.72rem;
  white-space: nowrap;
}

.origin-record-type {
  width: fit-content;
  padding: 3px 7px;
  border: 1px solid rgba(141, 107, 45, 0.2);
  border-radius: 999px;
  color: var(--gold);
  background: rgba(214, 190, 132, 0.16);
  font-size: 0.72rem;
  font-weight: 760;
  text-transform: capitalize;
}

.origin-record-body p {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: var(--muted-ink);
  font-size: 0.82rem;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.profile-account-card {
  background: linear-gradient(135deg, rgba(53, 121, 96, 0.08), rgba(255, 250, 240, 0.76));
}

.profile-sync-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(63, 52, 41, 0.12);
}

.profile-sync-message {
  margin: 0;
  color: rgba(63, 52, 41, 0.68);
  font-size: 0.78rem;
  line-height: 1.45;
}

.profile-auth-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(63, 52, 41, 0.12);
}

.profile-auth-actions .card-label {
  margin: 0 0 4px;
}

.profile-email-verification {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(183, 124, 39, 0.24);
  border-radius: 10px;
  background: rgba(225, 166, 77, 0.08);
}

.profile-email-verification[hidden] {
  display: none;
}

.profile-email-verification.is-verified {
  border-color: rgba(53, 121, 96, 0.24);
  background: rgba(53, 121, 96, 0.08);
}

.profile-email-verification .card-label,
.profile-email-verification .profile-session-status {
  margin: 0 0 4px;
}

.profile-identity-methods {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(63, 52, 41, 0.12);
}

.profile-identity-methods[hidden] {
  display: none;
}

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

.profile-identity-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px;
  border: 1px solid rgba(63, 52, 41, 0.12);
  border-radius: 10px;
  background: rgba(255, 250, 240, 0.62);
}

.profile-identity-card.is-connected {
  border-color: rgba(53, 121, 96, 0.26);
  background: rgba(53, 121, 96, 0.07);
}

.profile-identity-copy {
  display: grid;
  gap: 3px;
}

.profile-identity-copy strong {
  color: var(--ink);
  font-size: 0.84rem;
}

.profile-identity-copy span {
  color: var(--muted-ink);
  font-size: 0.72rem;
}

.profile-identity-action[aria-disabled="true"] {
  opacity: 0.58;
}

.account-deletion-form {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(167, 53, 42, 0.22);
}

.account-deletion-form[hidden] {
  display: none;
}

.account-deletion-form > .dashboard-copy {
  margin: 0;
}

.account-deletion-form > label {
  display: grid;
  gap: 6px;
  color: var(--muted-ink);
  font-size: 0.78rem;
  font-weight: 760;
}

.account-deletion-form input {
  min-height: 42px;
  padding: 0 11px;
  border: 1px solid rgba(167, 53, 42, 0.22);
  border-radius: 8px;
  background: rgba(255, 250, 240, 0.76);
  font: inherit;
}

.danger-button {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--danger);
  border-radius: 8px;
  color: #fff;
  background: var(--danger);
  font: inherit;
  font-weight: 780;
  cursor: pointer;
}

.danger-button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.account-password-form {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(63, 52, 41, 0.12);
}

.account-password-form label {
  display: grid;
  gap: 6px;
  color: var(--muted-ink);
  font-size: 0.78rem;
  font-weight: 760;
}

.account-password-form input {
  min-height: 42px;
  padding: 0 11px;
  border: 1px solid var(--paper-line);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 250, 240, 0.76);
  font: inherit;
}

.account-password-form input:focus {
  outline: 2px solid rgba(53, 121, 96, 0.25);
  outline-offset: 2px;
}

.account-password-form .profile-settings-actions {
  align-items: center;
}

.account-password-form .profile-settings-status {
  min-height: 20px;
  margin: 0;
}

.profile-session-actions {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(63, 52, 41, 0.12);
}

.profile-session-heading {
  align-items: center;
}

.profile-session-heading .card-label,
.profile-session-status {
  margin: 0;
}

.profile-session-status {
  min-height: 18px;
  color: var(--muted-ink);
  font-size: 0.76rem;
  line-height: 1.45;
}

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

.profile-session-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 12px;
  border: 1px solid rgba(63, 52, 41, 0.12);
  border-radius: 10px;
  background: rgba(255, 250, 240, 0.62);
}

.profile-session-card.is-current {
  border-color: rgba(53, 121, 96, 0.28);
  background: rgba(53, 121, 96, 0.08);
}

.profile-session-identity {
  display: grid;
  gap: 3px;
}

.profile-session-identity strong {
  color: var(--ink);
  font-size: 0.84rem;
}

.profile-session-identity span {
  color: var(--muted-ink);
  font-size: 0.72rem;
}

.profile-session-current {
  color: var(--green);
  font-size: 0.72rem;
  font-weight: 780;
}

.profile-export-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(63, 52, 41, 0.12);
}

.profile-export-actions .card-label,
.profile-export-actions .profile-settings-status {
  margin: 0;
}

.profile-export-action-control {
  display: grid;
  justify-items: end;
  gap: 5px;
}

@media (max-width: 900px) {
  .platform-nav {
    order: 3;
    flex-basis: 100%;
  }

  .platform-nav-button {
    flex: 1 1 0;
    padding: 0 8px;
    font-size: 0.74rem;
  }

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

  .progress-ledger-grid,
  .memory-library-grid,
  .origin-record-list {
    grid-template-columns: 1fr;
  }

  .memory-library-panel-wide {
    grid-column: auto;
  }

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

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

@media (max-width: 560px) {
  .platform-hero,
  .auth-hero,
  .memory-library-toolbar,
  .origin-atlas-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .profile-sync-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .auth-layout {
    grid-template-columns: 1fr;
  }

  .auth-social-buttons {
    align-items: stretch;
    flex-direction: column;
  }

  .auth-view {
    padding: 18px;
  }

  .profile-auth-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .profile-email-verification {
    align-items: stretch;
    flex-direction: column;
  }

  .profile-identity-card {
    align-items: stretch;
    flex-direction: column;
  }

  .profile-session-heading,
  .profile-session-card {
    align-items: stretch;
    flex-direction: column;
  }

  .profile-export-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .profile-export-action-control {
    justify-items: start;
  }

  .platform-hero {
    padding: 18px;
  }

  .platform-hero-actions,
  .memory-library-toolbar input {
    width: 100%;
  }

  .progress-metrics {
    gap: 8px;
  }

  .progress-metrics .metric-card {
    min-height: 108px;
  }

  .progress-group-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .progress-group-track {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .memory-object-grid {
    grid-template-columns: 1fr;
  }

  .origin-atlas-metrics {
    gap: 8px;
  }
}

* {
  box-sizing: border-box;
}

body {
  position: relative;
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    linear-gradient(90deg, rgba(99, 76, 48, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, rgba(99, 76, 48, 0.025) 1px, transparent 1px),
    radial-gradient(circle at 20% 10%, rgba(255, 250, 240, 0.88), transparent 24rem),
    linear-gradient(180deg, #f6eddd 0%, var(--paper-bg) 100%);
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 42px 42px, 42px 42px, cover, cover;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body::before {
  background:
    linear-gradient(90deg, rgba(255, 250, 240, 0.38), transparent 18%, rgba(127, 91, 48, 0.035) 50%, transparent 82%),
    repeating-linear-gradient(0deg, transparent 0 13px, rgba(99, 76, 48, 0.028) 13px 14px, transparent 14px 28px);
}

body::after {
  background:
    radial-gradient(circle at 86% 14%, rgba(167, 53, 42, 0.05), transparent 16rem),
    linear-gradient(90deg, rgba(99, 76, 48, 0.06), transparent 32%, rgba(255, 250, 240, 0.26));
}

button {
  font: inherit;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.46;
}

button:focus-visible {
  outline: 2px solid var(--jade);
  outline-offset: 2px;
}

.app-shell {
  position: relative;
  z-index: 1;
  width: min(1480px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 28px;
}

.app-shell::before {
  content: "";
  position: absolute;
  top: 18px;
  bottom: 18px;
  left: 18px;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(99, 76, 48, 0.3), transparent);
}

.topbar,
.header-actions,
.layout,
.worksheet-header,
.tool-row,
.queue-header,
.queue-actions,
.stats-grid,
.mode-tabs,
.browser-actions {
  display: flex;
  align-items: center;
}

.topbar {
  position: relative;
  z-index: 30;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.topbar-title {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.header-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.suite-launcher {
  display: inline-grid;
  width: 46px;
  min-width: 46px;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid rgba(84, 57, 35, 0.18);
  border-radius: 8px;
  color: #1d1812;
  background: rgba(255, 249, 236, 0.82);
  box-shadow: 0 8px 18px rgba(72, 52, 31, 0.08);
  cursor: pointer;
}

.suite-launcher:hover,
.suite-launcher:focus-visible {
  border-color: rgba(53, 121, 96, 0.42);
  transform: translateY(-1px);
}

.suite-launcher-mark {
  display: grid;
  place-items: center;
  color: #1d1812;
  font-family: "Songti SC", "STSong", serif;
  font-size: 1.25rem;
  font-weight: 900;
  line-height: 1;
}

.suite-backdrop {
  position: fixed;
  inset: 0;
  z-index: 45;
  background: rgba(29, 24, 18, 0.34);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 180ms ease;
}

.suite-backdrop[hidden] {
  display: none;
}

body.suite-open .suite-backdrop {
  opacity: 1;
}

.suite-drawer {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 50;
  display: grid;
  grid-template-rows: auto 1fr;
  width: min(360px, calc(100vw - 26px));
  overflow-y: auto;
  padding: 18px;
  border-right: 1px solid rgba(84, 57, 35, 0.18);
  color: #1d1812;
  background: #fff9ec;
  box-shadow: 22px 0 48px rgba(72, 52, 31, 0.22);
  transform: translateX(-104%);
  transition: transform 180ms ease;
}

body.suite-open .suite-drawer {
  transform: translateX(0);
}

.suite-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(84, 57, 35, 0.18);
}

.suite-drawer-kicker {
  margin: 0;
  color: #6e614c;
  font-size: 0.75rem;
  font-weight: 850;
  text-transform: uppercase;
}

.suite-drawer-header h2 {
  margin: 2px 0 0;
  color: #1d1812;
  font-size: 1.5rem;
  line-height: 1.1;
}

.suite-drawer-close {
  display: inline-grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid rgba(84, 57, 35, 0.18);
  border-radius: 999px;
  color: #1d1812;
  background: rgba(255, 249, 236, 0.82);
  cursor: pointer;
  font-size: 1.5rem;
  line-height: 1;
}

.suite-app-list {
  display: grid;
  align-content: start;
  gap: 10px;
  padding-top: 16px;
}

.suite-drawer-group {
  display: grid;
  gap: 10px;
  padding-top: 10px;
}

.suite-drawer-group[hidden],
.suite-app-link[hidden] {
  display: none;
}

.suite-drawer-label {
  margin: 0;
  color: #6e614c;
  font-size: 0.75rem;
  font-weight: 850;
  text-transform: uppercase;
}

.suite-profile-link,
.suite-app-link {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 58px;
  border: 1px solid rgba(84, 57, 35, 0.18);
  border-radius: 8px;
  padding: 8px;
  color: #1d1812;
  background: rgba(241, 234, 219, 0.48);
  box-shadow: none;
  font: inherit;
  text-decoration: none;
  text-align: left;
}

.suite-profile-link {
  cursor: pointer;
}

.suite-profile-link:hover,
.suite-profile-link:focus-visible,
.suite-app-link:hover,
.suite-app-link:focus-visible {
  border-color: rgba(53, 121, 96, 0.38);
  background: rgba(53, 121, 96, 0.1);
  outline: none;
}

.suite-profile-link.is-current,
.suite-app-link.is-current {
  border-color: rgba(53, 121, 96, 0.42);
  background: rgba(53, 121, 96, 0.1);
}

.suite-sub-link {
  min-height: 58px;
}

.suite-app-seal {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  color: #17130e;
  background: rgba(214, 190, 132, 0.34);
  font-family: "Songti SC", "STSong", serif;
  font-size: 1.25rem;
  font-weight: 900;
  line-height: 1;
}

.suite-profile-link strong,
.suite-profile-link small,
.suite-app-link strong,
.suite-app-link small {
  display: block;
}

.suite-profile-link strong,
.suite-app-link strong {
  font-size: 1rem;
  font-weight: 850;
}

.suite-profile-link small,
.suite-app-link small {
  overflow: hidden;
  color: #6e614c;
  font-size: 0.82rem;
  font-weight: 650;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.suite-label,
.card-label,
.stats-grid p {
  margin: 0;
  color: var(--muted-ink);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 0;
  color: var(--ink-deep);
  font-size: clamp(2.2rem, 5vw, 4.8rem);
  line-height: 0.96;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 1.5rem;
  letter-spacing: 0;
}

.session-pill,
.compact-button,
.tool-button,
.primary-button,
.mode-tab,
.reveal-button {
  border: 1px solid var(--paper-line);
  color: var(--text);
  background: rgba(255, 250, 240, 0.72);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    0 8px 18px rgba(72, 52, 31, 0.06);
}

.session-pill {
  display: grid;
  gap: 2px;
  min-width: 150px;
  padding: 12px 16px;
  border-radius: 999px;
  font: inherit;
  text-align: right;
}

button.session-pill {
  cursor: pointer;
}

button.session-pill:hover,
button.session-pill:focus-visible {
  border-color: rgba(53, 121, 96, 0.3);
  background: rgba(255, 253, 246, 0.94);
  outline: none;
}

.learner-pill {
  min-width: 124px;
}

.quiz-back-button {
  display: none;
}

.session-pill span {
  color: var(--muted-ink);
  font-size: 0.84rem;
  font-weight: 700;
}

.layout {
  position: relative;
  align-items: stretch;
  gap: 18px;
}

.hidden {
  display: none !important;
}

.dashboard-view {
  display: grid;
  gap: 18px;
}

.profile-view {
  display: grid;
  gap: 18px;
}

.qa-review-view {
  display: grid;
  gap: 18px;
}

.mnemonic-review-view {
  display: grid;
  gap: 18px;
}

.curriculum-browser-view {
  display: grid;
  gap: 18px;
}

.character-detail-view {
  display: grid;
  gap: 18px;
}

.dashboard-hero,
.profile-hero,
.qa-hero,
.mnemonic-review-hero,
.browser-hero,
.detail-hero,
.dashboard-panel,
.metric-card {
  border: 1px solid var(--panel-line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.dashboard-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 170px;
  padding: 24px;
}

.dashboard-hero-actions,
.lesson-hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.browser-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 158px;
  padding: 24px;
}

.profile-hero {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 22px;
  min-height: 158px;
  padding: 22px;
}

.qa-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 22px;
  min-height: 158px;
  padding: 22px;
}

.mnemonic-review-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 22px;
  min-height: 158px;
  padding: 22px;
}

.profile-hero h2 {
  margin-top: 8px;
  color: var(--ink-deep);
  font-size: clamp(2rem, 4vw, 4.2rem);
  line-height: 0.98;
}

.profile-hero-actions {
  display: grid;
  gap: 10px;
  min-width: 150px;
}

.browser-hero h2 {
  margin-top: 8px;
  color: var(--ink-deep);
  font-size: clamp(2rem, 4vw, 4.2rem);
  line-height: 0.98;
}

.qa-hero h2,
.mnemonic-review-hero h2 {
  margin-top: 8px;
  color: var(--ink-deep);
  font-size: clamp(2rem, 4vw, 4.2rem);
  line-height: 0.98;
}

.qa-hero-actions {
  display: grid;
  gap: 10px;
  min-width: 140px;
}

.mnemonic-review-actions {
  display: grid;
  gap: 10px;
  min-width: 120px;
}

.qa-sheet-link {
  display: grid;
  place-items: center;
  text-decoration: none;
}

.browser-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.study-plan-panel {
  min-height: 0;
}

.learner-profile-panel {
  display: grid;
  min-height: 0;
  gap: 14px;
}

.profile-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.profile-summary > div:nth-child(2) {
  flex: 1;
  min-width: 0;
}

.profile-avatar,
.profile-hero-avatar {
  display: grid;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid rgba(31, 27, 22, 0.82);
  border-radius: 8px;
  color: #fffaf0;
  background:
    radial-gradient(circle at 35% 24%, rgba(255, 250, 240, 0.18), transparent 34%),
    linear-gradient(145deg, var(--profile-avatar-accent, #9f352c), color-mix(in srgb, var(--profile-avatar-accent, #9f352c) 58%, #17130e));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 12px 24px rgba(72, 52, 31, 0.14);
  font-family: "Kaiti SC", "STKaiti", "Songti SC", serif;
  line-height: 1;
}

.profile-avatar {
  width: 62px;
  font-size: 2rem;
}

.profile-hero-avatar {
  width: clamp(72px, 10vw, 108px);
  font-size: clamp(2.35rem, 5vw, 4.2rem);
}

.profile-summary-actions {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.profile-summary h3 {
  margin: 6px 0 0;
  color: var(--ink-deep);
  font-size: clamp(1.45rem, 3vw, 2rem);
  line-height: 1.05;
}

.profile-summary .dashboard-copy {
  margin-top: 8px;
}

.profile-badge {
  width: fit-content;
  min-width: 112px;
  border: 1px solid rgba(53, 121, 96, 0.28);
  border-radius: 999px;
  padding: 8px 12px;
  color: #0f513d;
  background: rgba(53, 121, 96, 0.1);
  font-size: 0.82rem;
  font-weight: 850;
  text-align: center;
}

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

.profile-grid div {
  min-height: 72px;
  border: 1px solid var(--paper-line);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 250, 240, 0.72);
}

.profile-grid p {
  margin: 0;
  color: var(--muted-ink);
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.profile-grid strong {
  display: block;
  margin-top: 8px;
  color: var(--ink-deep);
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.1;
}

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

.profile-detail-card {
  min-height: 0;
}

.profile-definition-list {
  display: grid;
  gap: 9px;
  margin: 0;
}

.profile-definition-list div {
  display: grid;
  grid-template-columns: minmax(92px, 0.5fr) minmax(0, 1fr);
  gap: 12px;
  align-items: baseline;
  border: 1px solid var(--paper-line);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 250, 240, 0.72);
}

.profile-definition-list.compact div {
  grid-template-columns: 1fr;
  gap: 4px;
}

.profile-definition-list dt {
  color: var(--muted-ink);
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}

.profile-definition-list dd {
  margin: 0;
  color: var(--ink-deep);
  font-weight: 850;
  overflow-wrap: anywhere;
}

.profile-settings-card {
  grid-column: 1 / -1;
}

.profile-settings-form {
  display: grid;
  gap: 12px;
}

.profile-fieldset {
  display: grid;
  gap: 10px;
  min-width: 0;
  margin: 0;
  border: 1px solid var(--paper-line);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 250, 240, 0.48);
}

.profile-fieldset legend {
  padding: 0 6px;
  color: var(--muted-ink);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.profile-avatar-picker {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.profile-avatar-option,
.profile-interest-option {
  border: 1px solid var(--paper-line);
  border-radius: 8px;
  color: var(--ink-deep);
  background: rgba(255, 250, 240, 0.82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
  cursor: pointer;
  font: inherit;
}

.profile-avatar-option {
  display: grid;
  justify-items: center;
  gap: 8px;
  min-height: 104px;
  padding: 10px 8px;
  font-size: 0.76rem;
  font-weight: 850;
  text-align: center;
}

.profile-avatar-option-mark {
  display: grid;
  width: 48px;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid rgba(31, 27, 22, 0.76);
  border-radius: 8px;
  color: #fffaf0;
  background:
    radial-gradient(circle at 35% 24%, rgba(255, 250, 240, 0.16), transparent 34%),
    linear-gradient(145deg, var(--profile-avatar-accent, #9f352c), color-mix(in srgb, var(--profile-avatar-accent, #9f352c) 58%, #17130e));
  font-family: "Kaiti SC", "STKaiti", "Songti SC", serif;
  font-size: 1.75rem;
  line-height: 1;
}

.profile-interest-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.profile-interest-option {
  min-height: 44px;
  padding: 0 12px;
  font-size: 0.84rem;
  font-weight: 850;
}

.profile-avatar-option:hover,
.profile-avatar-option:focus-visible,
.profile-interest-option:hover,
.profile-interest-option:focus-visible {
  border-color: rgba(53, 121, 96, 0.44);
  outline: none;
}

.profile-avatar-option.is-selected,
.profile-interest-option.is-selected {
  border-color: rgba(53, 121, 96, 0.62);
  background: rgba(207, 226, 211, 0.62);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.62),
    0 0 0 3px rgba(53, 121, 96, 0.1);
}

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

.profile-settings-form label {
  display: grid;
  gap: 6px;
}

.profile-settings-form label span {
  color: var(--muted-ink);
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}

.profile-settings-form input,
.profile-settings-form select,
.profile-settings-form textarea {
  width: 100%;
  border: 1px solid var(--paper-line);
  border-radius: 8px;
  color: var(--text);
  background: rgba(255, 250, 240, 0.86);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
  font: inherit;
  outline: none;
}

.profile-settings-form input,
.profile-settings-form select {
  min-height: 46px;
  padding: 0 12px;
}

.profile-settings-form textarea {
  min-height: 96px;
  padding: 12px;
  line-height: 1.45;
  resize: vertical;
}

.profile-settings-form input:focus,
.profile-settings-form select:focus,
.profile-settings-form textarea:focus {
  border-color: rgba(53, 121, 96, 0.45);
  box-shadow: 0 0 0 3px rgba(53, 121, 96, 0.1);
}

.profile-settings-actions {
  display: flex;
  justify-content: flex-end;
}

.study-plan-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 320px);
  gap: 16px;
  align-items: stretch;
}

.study-plan-main {
  display: grid;
  align-content: start;
  gap: 10px;
}

.study-plan-kicker {
  width: fit-content;
  margin: 0;
  padding: 4px 8px;
  border: 1px solid rgba(53, 121, 96, 0.26);
  border-radius: 999px;
  color: #0f513d;
  background: rgba(53, 121, 96, 0.1);
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}

.study-plan-main h3 {
  margin: 0;
  color: var(--ink-deep);
  font-size: 1.45rem;
  line-height: 1.12;
}

.study-plan-bar {
  display: block;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(99, 76, 48, 0.12);
}

.study-plan-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--jade), #8d6b2d);
}

.study-plan-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.study-plan-stats span,
.study-plan-next {
  border: 1px solid var(--paper-line);
  border-radius: 8px;
  background: rgba(255, 250, 240, 0.72);
}

.study-plan-stats span {
  padding: 8px 10px;
  color: var(--muted-ink);
  font-size: 0.86rem;
  font-weight: 750;
}

.study-plan-stats strong {
  color: var(--ink-deep);
}

.study-plan-next {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 14px;
}

.study-plan-next strong {
  color: var(--ink-deep);
  font-size: 1.05rem;
  line-height: 1.2;
}

.study-plan-next span {
  color: var(--jade);
  font-size: 0.88rem;
  font-weight: 800;
}

.study-plan-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.study-plan-actions .primary-button,
.study-plan-actions .compact-button {
  width: 100%;
}

.study-lanes-panel {
  min-height: 0;
}

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

.study-lane-card {
  display: grid;
  min-height: 150px;
  align-content: space-between;
  gap: 12px;
  border: 1px solid var(--paper-line);
  border-radius: 8px;
  padding: 16px;
  color: var(--muted-ink);
  background:
    linear-gradient(135deg, rgba(255, 250, 240, 0.94), rgba(239, 229, 209, 0.78));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.58);
  text-align: left;
}

.study-lane-card:not(:disabled):hover,
.study-lane-card:not(:disabled):focus-visible {
  border-color: rgba(53, 121, 96, 0.38);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.62),
    0 12px 24px rgba(72, 52, 31, 0.12);
}

.study-lane-card.recommended {
  border-color: rgba(53, 121, 96, 0.46);
  background:
    linear-gradient(135deg, rgba(247, 241, 225, 0.98), rgba(213, 230, 214, 0.78));
}

.study-lane-card:disabled {
  opacity: 0.58;
  cursor: default;
}

.study-lane-label {
  color: var(--muted-ink);
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}

.study-lane-card strong {
  color: var(--ink-deep);
  font-size: clamp(2.2rem, 5vw, 4.1rem);
  line-height: 0.9;
}

.study-lane-card small {
  color: var(--jade);
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.35;
}

.session-complete-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 0;
  gap: 16px;
  border-color: rgba(53, 121, 96, 0.34);
  background:
    linear-gradient(135deg, rgba(255, 250, 240, 0.96), rgba(218, 232, 219, 0.72));
}

.session-complete-panel[hidden] {
  display: none;
}

.session-complete-panel h3 {
  margin: 6px 0 0;
  color: var(--ink-deep);
  font-size: 1.55rem;
}

.session-complete-next {
  width: fit-content;
  margin: 10px 0 0;
  padding: 6px 10px;
  border: 1px solid rgba(53, 121, 96, 0.26);
  border-radius: 999px;
  color: #0f513d;
  background: rgba(53, 121, 96, 0.1);
  font-size: 0.82rem;
  font-weight: 850;
}

.session-complete-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  gap: 8px;
  min-width: min(100%, 520px);
}

.session-complete-actions strong {
  grid-column: 1 / -1;
  color: var(--jade);
  text-align: right;
}

.session-complete-actions .compact-button.recommended {
  border-color: rgba(53, 121, 96, 0.46);
  color: #0f513d;
  background:
    linear-gradient(135deg, rgba(255, 250, 240, 0.96), rgba(213, 230, 214, 0.82));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.64),
    0 10px 20px rgba(53, 121, 96, 0.14);
}

.detail-hero {
  display: grid;
  grid-template-columns: auto minmax(120px, 220px) 1fr auto;
  align-items: center;
  gap: 20px;
  padding: 20px;
}

.detail-character {
  display: grid;
  width: min(20vw, 180px);
  min-width: 124px;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid var(--paper-line);
  border-radius: 8px;
  color: var(--ink-deep);
  background:
    linear-gradient(90deg, rgba(99, 76, 48, 0.08) 1px, transparent 1px),
    linear-gradient(180deg, rgba(99, 76, 48, 0.06) 1px, transparent 1px),
    rgba(255, 250, 240, 0.9);
  background-size: 22px 22px;
  font-family: "Songti SC", "STSong", serif;
  font-size: clamp(5rem, 12vw, 8.5rem);
  line-height: 1;
}

.detail-identity h2 {
  margin-top: 8px;
  color: var(--ink-deep);
  font-size: clamp(2.2rem, 5vw, 5rem);
  line-height: 0.96;
}

.detail-pinyin {
  margin: 0;
  color: var(--jade);
  font-size: 1.6rem;
  font-weight: 850;
}

.study-plan-chip {
  display: inline-flex;
  width: fit-content;
  margin-top: 12px;
  padding: 6px 10px;
  border: 1px solid rgba(141, 107, 45, 0.28);
  border-radius: 999px;
  color: var(--muted-ink);
  background: rgba(141, 107, 45, 0.1);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.study-plan-chip[data-state="learned"] {
  border-color: rgba(53, 121, 96, 0.36);
  color: #0f513d;
  background: rgba(53, 121, 96, 0.12);
}

.study-plan-chip[data-state="introduced"] {
  border-color: rgba(47, 111, 143, 0.28);
  color: var(--blue-strong);
  background: rgba(47, 111, 143, 0.1);
}

.study-path-note {
  max-width: 660px;
  margin: 10px 0 0;
  color: var(--muted-ink);
  font-size: 0.92rem;
  line-height: 1.45;
}

.pronunciation-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  min-height: 42px;
}

.speak-button {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid rgba(99, 76, 48, 0.22);
  border-radius: 999px;
  color: var(--jade);
  background:
    radial-gradient(circle at 50% 42%, rgba(53, 121, 96, 0.12), transparent 58%),
    rgba(255, 250, 240, 0.78);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    0 8px 18px rgba(72, 52, 31, 0.08);
  cursor: pointer;
  font-weight: 900;
}

.speak-button.is-loading {
  animation: speakPulse 900ms ease-in-out infinite;
}

.pronunciation-status {
  min-width: 0;
  color: var(--muted-ink);
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1.2;
}

.pronunciation-status[data-state="fallback"] {
  color: #2e6b56;
}

.pronunciation-status[data-state="local"] {
  color: rgba(159, 53, 44, 0.82);
}

@keyframes speakPulse {
  0%,
  100% {
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.5),
      0 0 14px rgba(53, 121, 96, 0.14),
      0 8px 18px rgba(72, 52, 31, 0.08);
  }

  50% {
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.5),
      0 0 28px rgba(53, 121, 96, 0.28),
      0 8px 18px rgba(72, 52, 31, 0.08);
  }
}

.detail-actions {
  display: grid;
  gap: 10px;
  min-width: 132px;
}

.dashboard-hero h2 {
  margin-top: 8px;
  color: var(--ink-deep);
  font-size: clamp(2rem, 4vw, 4.2rem);
  line-height: 0.98;
}

.dashboard-copy {
  max-width: 720px;
  margin: 14px 0 0;
  color: var(--muted-ink);
  font-size: 1.04rem;
  line-height: 1.55;
}

.start-button {
  min-width: 176px;
  min-height: 54px;
}

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

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

.qa-metrics,
.mnemonic-review-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.metric-card {
  padding: 16px;
}

.metric-card p {
  margin: 0;
  color: var(--muted-ink);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.metric-card strong {
  display: block;
  margin-top: 10px;
  color: var(--ink-deep);
  font-size: clamp(1.9rem, 3vw, 3.1rem);
  line-height: 1;
}

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

.browser-layout {
  display: grid;
  grid-template-columns: minmax(360px, 0.95fr) minmax(0, 1.25fr);
  gap: 14px;
  align-items: start;
}

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

.detail-priority-panel {
  grid-column: 1 / -1;
  min-height: 0;
}

.meaning-layout {
  display: grid;
  grid-template-columns: minmax(220px, 0.72fr) minmax(0, 1.28fr);
  gap: 18px;
  align-items: start;
}

.meaning-gloss {
  min-width: 0;
}

.meaning-gloss .dashboard-copy {
  margin-top: 8px;
  color: var(--ink-deep);
  font-size: clamp(1.15rem, 2vw, 1.55rem);
  font-weight: 850;
  line-height: 1.32;
}

.dashboard-panel {
  min-height: 230px;
  padding: 16px;
}

.group-browser-panel,
.group-detail-panel {
  min-height: 640px;
}

.character-search-panel {
  min-height: 0;
}

.character-search-control {
  margin-bottom: 12px;
}

.character-search-control input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--paper-line);
  border-radius: 8px;
  color: var(--text);
  background: rgba(255, 250, 240, 0.86);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
  font: inherit;
  font-size: 1rem;
  outline: none;
}

.character-search-control input::placeholder {
  color: rgba(111, 101, 87, 0.55);
}

.character-search-control input:focus {
  border-color: rgba(53, 121, 96, 0.45);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    0 0 0 3px rgba(53, 121, 96, 0.12);
}

.character-search-results {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.character-search-result {
  display: grid;
  grid-template-columns: 54px 1fr;
  align-items: center;
  gap: 10px;
  min-height: 82px;
  padding: 10px;
  border: 1px solid var(--paper-line);
  border-radius: 8px;
  color: var(--text);
  background: rgba(255, 250, 240, 0.72);
  cursor: pointer;
  text-align: left;
}

.character-search-result:hover {
  border-color: rgba(53, 121, 96, 0.3);
  background-color: rgba(255, 253, 246, 0.94);
}

.search-result-symbol {
  display: grid;
  aspect-ratio: 1;
  place-items: center;
  color: var(--ink-deep);
  font-family: "Songti SC", "STSong", serif;
  font-size: 2.35rem;
  line-height: 1;
}

.search-result-info {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.search-result-info strong,
.search-result-info small {
  overflow-wrap: anywhere;
}

.search-result-info strong {
  color: var(--ink-deep);
  font-size: 0.9rem;
  line-height: 1.15;
}

.search-result-info small {
  color: var(--jade);
  font-size: 0.76rem;
  font-weight: 750;
  line-height: 1.2;
}

.milestone-group-list {
  display: grid;
  gap: 18px;
}

.milestone-section {
  display: grid;
  gap: 10px;
}

.milestone-section h3,
.selected-group-heading h3 {
  margin: 0;
  color: var(--ink-deep);
  font-size: 1.15rem;
  line-height: 1.15;
}

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

.group-card {
  display: grid;
  gap: 8px;
  min-height: 150px;
  padding: 14px;
  border: 1px solid var(--paper-line);
  border-radius: 8px;
  color: var(--text);
  background: rgba(255, 250, 240, 0.72);
  cursor: pointer;
  text-align: left;
}

.group-card:hover,
.group-character-card:hover {
  border-color: rgba(53, 121, 96, 0.3);
  background-color: rgba(255, 253, 246, 0.94);
}

.group-card.active {
  border-color: rgba(53, 121, 96, 0.5);
  box-shadow:
    inset 0 0 0 1px rgba(53, 121, 96, 0.18),
    0 14px 32px rgba(72, 52, 31, 0.1);
}

.group-card-title,
.group-card-meta,
.group-card-stats,
.group-card-due {
  display: block;
}

.group-card-title {
  color: var(--ink-deep);
  font-size: 1rem;
  font-weight: 850;
  line-height: 1.2;
}

.group-state-chip {
  width: fit-content;
  padding: 4px 8px;
  border: 1px solid var(--paper-line);
  border-radius: 999px;
  color: var(--muted-ink);
  background: rgba(99, 76, 48, 0.06);
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.group-state-chip.review_due {
  border-color: rgba(167, 53, 42, 0.26);
  color: #7d1d16;
  background: rgba(167, 53, 42, 0.1);
}

.group-state-chip.learning {
  border-color: rgba(47, 111, 143, 0.28);
  color: var(--blue-strong);
  background: rgba(47, 111, 143, 0.1);
}

.group-state-chip.learned {
  border-color: rgba(53, 121, 96, 0.36);
  color: #0f513d;
  background: rgba(53, 121, 96, 0.12);
}

.group-card-meta,
.group-card-stats {
  color: var(--muted-ink);
  font-size: 0.82rem;
  font-weight: 750;
}

.group-card-due {
  color: var(--jade);
  font-size: 0.82rem;
  font-weight: 850;
}

.group-progress {
  display: block;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(99, 76, 48, 0.12);
}

.group-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--jade), #8d6b2d);
}

.selected-group-heading {
  margin-bottom: 14px;
}

.selected-group-heading p {
  margin: 8px 0 0;
  color: var(--muted-ink);
  line-height: 1.45;
}

.group-progress-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.group-progress-strip div {
  padding: 12px;
  border: 1px solid var(--paper-line);
  border-radius: 8px;
  background: rgba(255, 250, 240, 0.72);
}

.group-progress-strip p {
  margin: 0;
  color: var(--muted-ink);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
}

.group-progress-strip strong {
  display: block;
  margin-top: 8px;
  color: var(--ink-deep);
  font-size: 1.3rem;
  line-height: 1.1;
}

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

.group-character-card {
  display: grid;
  grid-template-columns: 64px 1fr;
  align-items: center;
  gap: 10px;
  min-height: 96px;
  padding: 10px;
  border: 1px solid var(--paper-line);
  border-radius: 8px;
  color: var(--text);
  background: rgba(255, 250, 240, 0.72);
  cursor: pointer;
  text-align: left;
}

.group-character-symbol {
  display: grid;
  aspect-ratio: 1;
  place-items: center;
  color: var(--ink-deep);
  font-family: "Songti SC", "STSong", serif;
  font-size: 2.7rem;
  line-height: 1;
}

.group-character-info {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.group-character-info strong,
.group-character-info small {
  overflow-wrap: anywhere;
}

.group-character-info strong {
  color: var(--ink-deep);
  font-size: 0.88rem;
  line-height: 1.15;
}

.group-character-info small {
  color: var(--jade);
  font-size: 0.76rem;
  font-weight: 750;
  line-height: 1.2;
}

.group-character-info .group-character-note {
  color: var(--gold);
  font-weight: 800;
}

.stroke-demo-panel {
  display: grid;
  gap: 12px;
}

.stroke-demo-stage {
  display: grid;
  min-height: 260px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(74, 52, 32, 0.24);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(89, 55, 27, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, rgba(89, 55, 27, 0.028) 1px, transparent 1px),
    linear-gradient(135deg, rgba(255, 255, 255, 0.62), rgba(230, 211, 172, 0.16)),
    #eadfca;
  background-size: 18px 18px, 22px 22px, 100% 100%, 100% 100%;
  box-shadow:
    inset 0 0 0 1px rgba(255, 252, 240, 0.62),
    inset 0 -18px 34px rgba(126, 83, 36, 0.08);
}

.stroke-demo-svg,
.stroke-demo-image {
  display: block;
  width: min(260px, 100%);
  aspect-ratio: 1;
  border: 1px solid rgba(84, 57, 35, 0.2);
  background: rgba(255, 251, 236, 0.3);
  box-shadow: 0 12px 28px rgba(49, 31, 18, 0.12);
}

.stroke-demo-grid path {
  fill: none;
  stroke: rgba(82, 58, 37, 0.28);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.demo-guide-stroke {
  stroke: rgba(76, 54, 35, 0.14);
}

.demo-brush-stroke {
  opacity: 0;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  stroke-linecap: round;
  stroke-linejoin: round;
  animation: paintPathStroke 720ms cubic-bezier(0.22, 0.74, 0.24, 1) forwards;
}

.demo-brush-stroke-shadow {
  stroke: rgba(31, 25, 18, 0.18);
  filter: blur(0.55px);
}

.demo-brush-stroke-core {
  stroke: rgba(17, 15, 12, 0.96);
  filter: drop-shadow(0 1px 2px rgba(54, 36, 22, 0.16));
}

.demo-brush-stroke-highlight {
  stroke: rgba(238, 224, 190, 0.1);
  stroke-linecap: round;
}

.demo-source-guide-stroke {
  fill: rgba(76, 54, 35, 0.12);
}

.demo-source-reveal {
  fill: none;
  stroke: #fff;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 150;
  animation: paintPathStroke 720ms cubic-bezier(0.22, 0.74, 0.24, 1) forwards;
}

.demo-source-brush-stroke {
  fill: rgba(17, 15, 12, 0.96);
  opacity: 0;
  filter: drop-shadow(0 3px 8px rgba(54, 36, 22, 0.2));
  animation: showSourceStroke 120ms linear forwards;
}

.stroke-demo-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.stroke-demo-footer p {
  margin: 0;
  color: var(--muted-ink);
  font-size: 0.82rem;
  line-height: 1.35;
}

.stroke-demo-placeholder {
  display: grid;
  place-items: center;
  color: var(--muted-ink);
}

.stroke-demo-placeholder span {
  color: rgba(99, 76, 48, 0.22);
  font-family: "Songti SC", "STSong", serif;
  font-size: 8rem;
  line-height: 1;
}

.stroke-demo-placeholder p {
  margin: 8px 0 0;
  font-weight: 800;
}

@keyframes paintPathStroke {
  0% {
    opacity: 1;
    stroke-dashoffset: 100;
  }

  to {
    opacity: 1;
    stroke-dashoffset: 0;
  }
}

@keyframes showSourceStroke {
  to {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .demo-brush-stroke,
  .demo-source-reveal,
  .demo-source-brush-stroke,
  .suite-backdrop,
  .suite-drawer {
    animation: none;
    transition: none;
  }

  .demo-brush-stroke,
  .demo-source-reveal,
  .demo-source-brush-stroke {
    opacity: 1;
    stroke-dashoffset: 0;
  }
}

.meaning-etymology {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding-left: 18px;
  border-left: 1px solid var(--paper-line);
}

.meaning-etymology strong {
  color: var(--jade);
  font-size: 0.9rem;
}

.origin-v2 {
  display: grid;
  gap: 10px;
}

.origin-choice-note {
  border-left: 3px solid rgba(53, 121, 96, 0.34);
  padding-left: 10px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 750;
  line-height: 1.4;
}

.origin-source-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.origin-source-row span {
  border: 1px solid rgba(53, 121, 96, 0.2);
  border-radius: 999px;
  padding: 5px 8px;
  color: var(--jade);
  background: rgba(255, 250, 240, 0.7);
  font-size: 0.72rem;
  font-weight: 850;
}

.review-panel {
  min-height: 0;
}

.review-form {
  display: grid;
  gap: 12px;
}

.review-form-row {
  display: grid;
  grid-template-columns: 1fr 1.2fr 0.8fr;
  gap: 10px;
}

.review-form.learner-feedback .review-form-row {
  grid-template-columns: 1fr 1.2fr;
}

.review-form label[hidden] {
  display: none;
}

.review-form label,
.review-note-field {
  display: grid;
  gap: 6px;
}

.review-form label span {
  color: var(--muted-ink);
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}

.review-form select,
.review-form textarea {
  width: 100%;
  border: 1px solid var(--paper-line);
  border-radius: 8px;
  color: var(--text);
  background: rgba(255, 250, 240, 0.86);
  font: inherit;
  outline: none;
}

.review-form select {
  min-height: 44px;
  padding: 0 10px;
}

.review-form textarea {
  min-height: 86px;
  resize: vertical;
  padding: 10px 12px;
  line-height: 1.4;
}

.review-form select:focus,
.review-form textarea:focus {
  border-color: rgba(53, 121, 96, 0.45);
  box-shadow: 0 0 0 3px rgba(53, 121, 96, 0.12);
}

.review-form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.review-status {
  min-height: 20px;
  margin: 0;
  color: var(--jade);
  font-size: 0.86rem;
  font-weight: 750;
}

.review-flag-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.review-flag-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: start;
  padding: 10px;
  border: 1px solid var(--paper-line);
  border-radius: 8px;
  background: rgba(255, 250, 240, 0.72);
}

.review-flag-row.resolved {
  opacity: 0.64;
}

.review-flag-row strong,
.review-flag-row small {
  display: block;
}

.review-flag-row small {
  margin-top: 4px;
  color: var(--jade);
  font-weight: 750;
  text-transform: capitalize;
}

.review-flag-row p {
  margin: 8px 0 0;
  color: var(--muted-ink);
  line-height: 1.4;
}

.qa-review-panel {
  min-height: 520px;
}

.qa-panel-heading {
  align-items: flex-start;
  gap: 16px;
}

.qa-filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.qa-flag-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.qa-flag-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 14px;
  border: 1px solid var(--paper-line);
  border-radius: 8px;
  padding: 12px;
  background:
    linear-gradient(135deg, rgba(255, 250, 240, 0.92), rgba(239, 229, 209, 0.72));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.58),
    0 12px 24px rgba(72, 52, 31, 0.07);
}

.qa-flag-card.high {
  border-color: rgba(167, 53, 42, 0.32);
}

.qa-flag-card.resolved {
  opacity: 0.68;
}

.mnemonic-review-panel {
  min-height: 560px;
}

.mnemonic-review-panel-heading {
  align-items: flex-start;
  gap: 16px;
}

.mnemonic-review-list {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.mnemonic-review-card {
  display: grid;
  grid-template-columns: minmax(92px, 132px) minmax(0, 1fr);
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--panel-line);
  border-radius: 8px;
  background: rgba(255, 250, 240, 0.78);
  box-shadow: var(--shadow);
}

.mnemonic-review-card.accepted {
  border-color: rgba(53, 121, 96, 0.3);
  background:
    linear-gradient(90deg, rgba(53, 121, 96, 0.1), transparent 34%),
    rgba(248, 243, 231, 0.92);
}

.mnemonic-review-card.revise {
  border-color: rgba(167, 53, 42, 0.36);
  background:
    linear-gradient(90deg, rgba(167, 53, 42, 0.08), transparent 34%),
    rgba(248, 243, 231, 0.94);
}

.mnemonic-review-mark {
  display: grid;
  min-height: 132px;
  place-items: center;
  border: 1px solid rgba(121, 75, 49, 0.28);
  border-radius: 8px;
  color: var(--ink-deep);
  background:
    linear-gradient(rgba(128, 88, 49, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(128, 88, 49, 0.06) 1px, transparent 1px),
    linear-gradient(135deg, rgba(255, 250, 240, 0.96), rgba(239, 229, 209, 0.72));
  background-size: 100% 50%, 50% 100%, auto;
  font-family: "Kaiti SC", "STKaiti", "Songti SC", serif;
  font-size: clamp(4.4rem, 11vw, 7.1rem);
  line-height: 1;
}

.mnemonic-review-body {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.mnemonic-review-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.mnemonic-review-card-head h3 {
  margin: 2px 0 0;
  color: var(--ink-deep);
  font-size: 1.35rem;
}

.mnemonic-review-status {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border: 1px solid rgba(99, 76, 48, 0.16);
  border-radius: 999px;
  color: var(--muted-ink);
  background: rgba(255, 250, 240, 0.62);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: capitalize;
  white-space: nowrap;
}

.mnemonic-review-status.accepted {
  color: #2e6b56;
  border-color: rgba(53, 121, 96, 0.22);
  background: rgba(53, 121, 96, 0.09);
}

.mnemonic-review-status.revise {
  color: rgba(167, 53, 42, 0.9);
  border-color: rgba(167, 53, 42, 0.22);
  background: rgba(167, 53, 42, 0.08);
}

.mnemonic-review-meta,
.mnemonic-review-props,
.mnemonic-review-prompt,
.mnemonic-review-cue,
.mnemonic-review-note {
  margin: 0;
  color: var(--muted-ink);
  line-height: 1.45;
}

.mnemonic-review-scene {
  margin: 0;
  color: var(--ink-deep);
  font-size: 1.04rem;
  font-weight: 780;
  line-height: 1.5;
}

.mnemonic-review-props strong,
.mnemonic-review-note strong {
  color: var(--ink-deep);
}

.mnemonic-review-prompt {
  font-size: 0.95rem;
}

.mnemonic-review-cue {
  color: var(--jade);
  font-size: 0.86rem;
  font-weight: 800;
}

.mnemonic-review-controls {
  display: grid;
  gap: 8px;
}

.mnemonic-review-controls textarea {
  min-height: 72px;
  resize: vertical;
  border: 1px solid rgba(99, 76, 48, 0.18);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--ink-deep);
  background: rgba(255, 250, 240, 0.78);
  font: inherit;
  line-height: 1.4;
}

.mnemonic-review-control-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.mnemonic-review-save-status {
  color: var(--muted-ink);
  font-size: 0.82rem;
  font-weight: 800;
}

.qa-character-button {
  display: grid;
  width: 64px;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid rgba(31, 27, 22, 0.82);
  border-radius: 8px;
  color: #fffaf0;
  background: linear-gradient(145deg, #2d261f, #17130e);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 10px 18px rgba(72, 52, 31, 0.1);
  cursor: pointer;
  font-family: "Songti SC", "STSong", serif;
  font-size: 2rem;
  line-height: 1;
}

.qa-flag-body {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.qa-flag-heading {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.qa-flag-heading strong {
  color: var(--ink-deep);
  font-size: 1rem;
}

.qa-flag-body small {
  color: var(--jade);
  font-size: 0.84rem;
  font-weight: 800;
  text-transform: capitalize;
}

.qa-flag-body p {
  margin: 0;
  color: var(--muted-ink);
  line-height: 1.45;
}

.qa-status-chip {
  display: inline-grid;
  min-height: 24px;
  place-items: center;
  border: 1px solid rgba(53, 121, 96, 0.24);
  border-radius: 999px;
  padding: 0 9px;
  color: var(--jade);
  background: rgba(53, 121, 96, 0.08);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.qa-status-chip.resolved {
  color: var(--muted-ink);
  background: rgba(99, 76, 48, 0.08);
}

.qa-flag-actions {
  display: grid;
  gap: 8px;
  min-width: 104px;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.panel-heading strong {
  color: var(--jade);
}

.mini-character-row {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 8px;
}

.mini-character {
  display: grid;
  min-height: 82px;
  place-items: center;
  border: 1px solid var(--paper-line);
  border-radius: 8px;
  color: var(--text);
  background: rgba(255, 250, 240, 0.72);
  cursor: pointer;
}

.mini-character span {
  font-family: "Songti SC", "STSong", serif;
  font-size: 2.1rem;
  line-height: 1;
}

.mini-character small {
  color: var(--jade);
  font-weight: 800;
}

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

.mini-list-row {
  display: grid;
  grid-template-columns: 54px 1fr;
  align-items: center;
  gap: 12px;
  min-height: 60px;
  width: 100%;
  border: 1px solid var(--paper-line);
  border-radius: 8px;
  color: var(--text);
  background: rgba(255, 250, 240, 0.72);
  cursor: pointer;
  text-align: left;
}

button.mini-list-row:hover,
.mini-character:hover,
.related-character-link:hover {
  border-color: rgba(53, 121, 96, 0.3);
  background-color: rgba(255, 253, 246, 0.94);
}

.static-row {
  cursor: default;
}

.list-character {
  display: grid;
  min-height: 48px;
  place-items: center;
  color: var(--ink-deep);
  font-family: "Songti SC", "STSong", serif;
  font-size: 2rem;
}

.mini-list-row strong,
.mini-list-row small {
  display: block;
}

.mini-list-row small {
  margin-top: 4px;
  color: var(--jade);
  font-weight: 750;
}

.related-character-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.related-character-link {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--paper-line);
  border-radius: 8px;
  color: var(--ink-deep);
  background: rgba(255, 250, 240, 0.72);
  font-family: "Songti SC", "STSong", serif;
  font-size: 1.45rem;
  line-height: 1;
  cursor: pointer;
}

.empty-state {
  margin: 0;
  padding: 18px;
  border: 1px solid var(--paper-line);
  border-radius: 8px;
  color: var(--muted-ink);
  background: rgba(255, 250, 240, 0.56);
}

.prompt-panel,
.practice-panel,
.queue-panel {
  border: 1px solid var(--panel-line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.prompt-panel {
  display: grid;
  width: 330px;
  gap: 14px;
  align-content: start;
  padding: 16px;
}

.practice-panel {
  flex: 1;
  min-width: 0;
  padding: 18px;
}

.queue-panel {
  position: fixed;
  top: 112px;
  right: max(28px, calc((100vw - 1480px) / 2 + 28px));
  z-index: 10;
  width: min(360px, calc(100vw - 36px));
  padding: 16px;
  transform: translateX(calc(100% + 48px));
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.queue-panel.open {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}

.mode-tabs {
  gap: 8px;
}

.mode-tab {
  flex: 1;
  min-height: 44px;
  border-radius: 999px;
  cursor: pointer;
}

.mode-tab.active {
  color: #fffaf0;
  border-color: rgba(31, 27, 22, 0.86);
  background: linear-gradient(145deg, #2d261f, #17130e);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 12px 28px rgba(72, 52, 31, 0.14);
}

.prompt-card,
.feedback-card {
  padding: 16px;
  border: 1px solid var(--paper-line);
  border-radius: 8px;
  background: rgba(255, 250, 240, 0.76);
}

.meaning {
  margin-top: 14px;
  font-size: 2.6rem;
  font-weight: 850;
  line-height: 1;
}

.pinyin {
  margin: 0;
  color: var(--jade);
  font-size: 1.4rem;
  font-weight: 800;
}

.reveal-button {
  width: 100%;
  min-height: 44px;
  margin-top: 18px;
  border-radius: 8px;
  cursor: pointer;
}

.revealed-character {
  display: grid;
  min-height: 82px;
  margin-top: 14px;
  place-items: center;
  border: 1px solid var(--paper-line);
  border-radius: 8px;
  color: var(--ink-deep);
  background:
    linear-gradient(90deg, rgba(99, 76, 48, 0.08) 1px, transparent 1px),
    linear-gradient(180deg, rgba(99, 76, 48, 0.06) 1px, transparent 1px),
    rgba(255, 250, 240, 0.82);
  background-size: 18px 18px;
  font-family: "Songti SC", "STSong", serif;
  font-size: 4.4rem;
  line-height: 1;
}

.revealed-character.hidden {
  color: transparent;
}

.quiz-view .revealed-character.hidden {
  display: none;
}

.stats-grid {
  gap: 8px;
}

.stats-grid div {
  flex: 1;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--paper-line);
  border-radius: 8px;
  background: rgba(255, 250, 240, 0.72);
}

.stats-grid strong {
  display: block;
  margin-top: 6px;
  font-size: 1.35rem;
}

.feedback-card p:last-child {
  margin: 10px 0 0;
  color: var(--muted-ink);
  line-height: 1.45;
}

.worksheet-header {
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.worksheet-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.worksheet-actions .compact-button.active {
  border-color: rgba(53, 121, 96, 0.46);
  color: #0f513d;
  background: rgba(53, 121, 96, 0.1);
}

.compact-button,
.tool-button,
.primary-button {
  min-height: 44px;
  border-radius: 999px;
  cursor: pointer;
}

.compact-button {
  padding: 0 16px;
}

.paper-frame {
  display: grid;
  place-items: center;
}

.paper-frame > * {
  grid-area: 1 / 1;
}

.practice-workspace {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(240px, 300px);
  gap: 16px;
  align-items: start;
}

.practice-paper {
  position: relative;
  width: min(68vh, 720px, 100%);
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid rgba(121, 75, 49, 0.42);
  border-radius: 8px;
  background:
    linear-gradient(rgba(128, 88, 49, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(128, 88, 49, 0.08) 1px, transparent 1px),
    radial-gradient(circle at 50% 38%, rgba(255, 255, 255, 0.62), transparent 48%),
    linear-gradient(135deg, var(--paper), var(--paper-deep));
  background-size: 100% 25%, 25% 100%, auto, auto;
  box-shadow:
    inset 0 0 0 12px rgba(255, 255, 255, 0.18),
    0 24px 44px rgba(72, 52, 31, 0.13);
  touch-action: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
}

.trace-guide-panel {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--paper-line);
  border-radius: 8px;
  background: rgba(255, 250, 240, 0.72);
}

.trace-guide-panel[hidden] {
  display: none;
}

.trace-guide-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.trace-guide-header h3 {
  margin: 5px 0 0;
  color: var(--ink-deep);
  font-size: 1.25rem;
  line-height: 1.1;
}

.trace-guide-header strong {
  flex: 0 0 auto;
  color: var(--muted-ink);
  font-size: 0.8rem;
  font-weight: 850;
}

.trace-stroke-demo {
  display: grid;
  min-height: 190px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(99, 76, 48, 0.14);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(99, 76, 48, 0.06) 1px, transparent 1px),
    linear-gradient(180deg, rgba(99, 76, 48, 0.05) 1px, transparent 1px),
    rgba(255, 253, 247, 0.7);
  background-size: 22px 22px;
}

.trace-stroke-demo .stroke-demo-svg,
.trace-stroke-demo .stroke-demo-image {
  width: min(100%, 240px);
}

.trace-stroke-demo .stroke-demo-placeholder {
  min-height: 190px;
  border: 0;
  background: transparent;
}

.trace-guide-footer {
  align-items: stretch;
  flex-direction: column;
}

.trace-guide-footer p {
  max-width: none;
  font-size: 0.76rem;
}

.trace-guide-footer .compact-button {
  width: 100%;
}

.trace-guide-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.trace-guide-actions .compact-button {
  width: 100%;
}

.practice-sheet-view {
  display: grid;
  gap: 18px;
}

.lesson-view {
  display: grid;
  gap: 18px;
}

.lesson-provenance {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.lesson-provenance h3 {
  margin: 6px 0 0;
  color: var(--ink-deep);
  font-size: 1.35rem;
}

.lesson-objective {
  padding: 18px;
}

.lesson-objective-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.lesson-objective-head .card-label {
  margin: 0;
}

#lessonProgressStatus[data-state="learned"] {
  color: var(--paper);
  border-color: rgba(31, 27, 22, 0.18);
  background: var(--jade);
}

.lesson-group-panel {
  display: grid;
  gap: 12px;
}

.lesson-group-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 8px;
  max-height: 310px;
  overflow: auto;
  padding-right: 4px;
}

.lesson-group-button {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 64px;
  padding: 10px;
  border: 1px solid rgba(99, 76, 48, 0.16);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 250, 240, 0.68);
  text-align: left;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.lesson-group-button:hover,
.lesson-group-button:focus-visible {
  border-color: rgba(53, 121, 96, 0.38);
  background: rgba(255, 250, 240, 0.9);
  transform: translateY(-1px);
}

.lesson-group-button.is-active {
  border-color: rgba(53, 121, 96, 0.44);
  background: rgba(53, 121, 96, 0.08);
  box-shadow: inset 3px 0 0 var(--jade);
}

.lesson-group-seal {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(159, 53, 44, 0.22);
  border-radius: 7px;
  color: rgba(159, 53, 44, 0.82);
  background: rgba(255, 250, 240, 0.74);
  font-family: "Kaiti SC", "STKaiti", "Songti SC", serif;
  font-size: 0.78rem;
  font-weight: 800;
}

.lesson-group-copy {
  min-width: 0;
}

.lesson-group-button strong {
  display: -webkit-box;
  overflow: hidden;
  color: var(--ink-deep);
  font-size: 0.92rem;
  line-height: 1.22;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.lesson-group-button small,
.lesson-group-progress {
  display: block;
}

.lesson-group-button small {
  overflow: hidden;
  margin-top: 4px;
  color: var(--muted-ink);
  font-size: 0.78rem;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lesson-group-progress {
  min-width: 48px;
  padding: 5px 8px;
  border: 1px solid rgba(53, 121, 96, 0.18);
  border-radius: 999px;
  color: #2e6b56;
  background: rgba(53, 121, 96, 0.08);
  font-size: 0.78rem;
  font-weight: 800;
  text-align: center;
  white-space: nowrap;
}

.lesson-objective p:last-child {
  margin: 8px 0 0;
  color: var(--ink-deep);
  font-size: 1.05rem;
  line-height: 1.5;
}

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

.lesson-shell-grid > div {
  min-height: 132px;
  border: 1px solid rgba(141, 107, 45, 0.2);
  border-radius: 8px;
  padding: 14px;
  background: rgba(255, 250, 240, 0.58);
}

.lesson-shell-grid p:last-child {
  margin: 8px 0 0;
  color: var(--ink-deep);
  font-size: 0.98rem;
  line-height: 1.5;
}

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

.lesson-character-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(88px, 120px) minmax(0, 1fr);
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--panel-line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.lesson-character-card.is-learned {
  border-color: rgba(53, 121, 96, 0.26);
  background:
    linear-gradient(90deg, rgba(53, 121, 96, 0.1), transparent 34%),
    rgba(248, 243, 231, 0.92);
  box-shadow:
    inset 3px 0 0 rgba(53, 121, 96, 0.34),
    var(--shadow);
}

.lesson-character-card.is-learned::after {
  position: absolute;
  inset: 12px 12px auto auto;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(159, 53, 44, 0.26);
  border-radius: 5px;
  color: rgba(159, 53, 44, 0.78);
  background: rgba(255, 250, 240, 0.72);
  box-shadow:
    inset 0 0 0 2px rgba(159, 53, 44, 0.08),
    0 8px 18px rgba(72, 52, 31, 0.1);
  content: "熟";
  font-family: "Kaiti SC", "STKaiti", "Songti SC", serif;
  font-size: 1rem;
  font-weight: 800;
  transform: rotate(-4deg);
}

.lesson-character-mark {
  display: grid;
  min-height: 120px;
  place-items: center;
  border: 1px solid rgba(121, 75, 49, 0.28);
  border-radius: 8px;
  color: var(--ink-deep);
  background:
    linear-gradient(rgba(128, 88, 49, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(128, 88, 49, 0.06) 1px, transparent 1px),
    linear-gradient(135deg, rgba(255, 250, 240, 0.96), rgba(239, 229, 209, 0.72));
  background-size: 100% 50%, 50% 100%, auto;
  font-family: "Kaiti SC", "STKaiti", "Songti SC", serif;
  font-size: clamp(4rem, 10vw, 6.8rem);
  line-height: 1;
}

.lesson-character-body {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.lesson-character-heading h3 {
  margin: 2px 0 0;
  color: var(--ink-deep);
  font-size: 1.35rem;
}

.lesson-pronunciation-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
}

.lesson-pronunciation-row .card-label {
  margin: 0;
}

.lesson-speak-button {
  width: 44px;
  height: 44px;
  font-size: 0.82rem;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    0 5px 12px rgba(72, 52, 31, 0.06);
}

.lesson-pronunciation-status {
  min-width: 0;
  color: var(--muted-ink);
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1.2;
}

.lesson-pronunciation-status[data-state="fallback"] {
  color: #2e6b56;
}

.lesson-pronunciation-status[data-state="local"] {
  color: rgba(159, 53, 44, 0.82);
}

.lesson-card-status {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border: 1px solid rgba(99, 76, 48, 0.16);
  border-radius: 999px;
  color: var(--muted-ink);
  background: rgba(255, 250, 240, 0.62);
  font-size: 0.82rem;
}

.lesson-card-status strong {
  font-size: 0.78rem;
}

.lesson-character-card.is-learned .lesson-card-status {
  color: #2e6b56;
  border-color: rgba(53, 121, 96, 0.22);
  background: rgba(53, 121, 96, 0.09);
}

.lesson-character-card.is-learned .lesson-card-status span {
  color: rgba(159, 53, 44, 0.82);
  font-family: "Kaiti SC", "STKaiti", "Songti SC", serif;
  font-weight: 900;
}

.lesson-shape,
.lesson-scene,
.lesson-visual,
.lesson-cue {
  margin: 0;
  color: var(--muted-ink);
  line-height: 1.45;
}

.lesson-mnemonic {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(99, 76, 48, 0.14);
  border-radius: 8px;
  background: rgba(255, 250, 240, 0.58);
}

.lesson-scene {
  color: var(--ink-deep);
  font-weight: 780;
}

.lesson-visual {
  font-size: 0.95rem;
}

.lesson-cue {
  color: var(--jade);
  font-size: 0.84rem;
  font-weight: 800;
}

.lesson-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.practice-sheet-frame {
  display: grid;
  place-items: center;
}

.practice-sheet-hero {
  align-items: center;
}

.practice-sheet {
  display: grid;
  width: min(980px, 100%);
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px 12px;
  padding: 12px;
  border: 1px solid rgba(121, 75, 49, 0.32);
  border-radius: 10px;
  background:
    radial-gradient(circle at 50% 30%, rgba(255, 255, 255, 0.5), transparent 58%),
    linear-gradient(135deg, rgba(255, 250, 240, 0.96), rgba(226, 211, 187, 0.82));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.3),
    0 22px 42px rgba(72, 52, 31, 0.12);
}

.practice-sheet-cell {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.practice-sheet-box {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid rgba(121, 75, 49, 0.34);
  border-radius: 6px;
  background:
    linear-gradient(rgba(128, 88, 49, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(128, 88, 49, 0.06) 1px, transparent 1px),
    linear-gradient(135deg, rgba(255, 250, 240, 0.96), rgba(239, 229, 209, 0.72));
  background-size: 100% 25%, 25% 100%, auto;
  touch-action: none;
}

.practice-sheet-box.active {
  border-color: rgba(53, 121, 96, 0.54);
  box-shadow: 0 0 0 2px rgba(53, 121, 96, 0.12);
}

.sheet-clear-button {
  justify-self: end;
  min-width: 44px;
  min-height: 44px;
  padding: 0 9px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: rgba(31, 25, 18, 0.6);
  background: rgba(255, 250, 240, 0.42);
  font-size: 0.68rem;
  font-weight: 850;
  cursor: pointer;
  opacity: 0.74;
}

.sheet-clear-button:hover,
.sheet-clear-button:focus-visible {
  border-color: rgba(53, 121, 96, 0.26);
  color: #0f513d;
  background: rgba(255, 250, 240, 0.82);
  opacity: 1;
  outline: none;
}

.grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.grid.vertical {
  top: 0;
  right: auto;
  bottom: 0;
  left: 50%;
  width: 1px;
  background: rgba(126, 79, 51, 0.36);
}

.grid.horizontal {
  top: 50%;
  right: 0;
  bottom: auto;
  left: 0;
  height: 1px;
  background: rgba(126, 79, 51, 0.36);
}

.grid.diagonal-a,
.grid.diagonal-b {
  top: 50%;
  left: -21%;
  width: 142%;
  height: 1px;
  background: rgba(126, 79, 51, 0.26);
}

.grid.diagonal-a {
  transform: rotate(45deg);
}

.grid.diagonal-b {
  transform: rotate(-45deg);
}

.ghost-character {
  position: absolute;
  inset: 4%;
  display: grid;
  place-items: center;
  color: rgba(17, 24, 23, 0.14);
  font-family: "Kaiti SC", "STKaiti", "Songti SC", serif;
  font-size: var(--ghost-character-size, clamp(10rem, 34vmin, 22rem));
  line-height: 1;
  pointer-events: none;
  user-select: none;
}

.ghost-character.is-vector {
  inset: 7%;
}

.ghost-trace-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.ghost-trace-source-stroke {
  fill: rgba(17, 24, 23, 0.14);
}

.ghost-trace-line-stroke {
  fill: none;
  stroke: rgba(17, 24, 23, 0.14);
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ghost-character.hidden {
  opacity: 0;
}

canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  touch-action: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
}

.tool-row {
  justify-content: center;
  gap: 12px;
  margin-top: 18px;
}

.tool-button,
.primary-button {
  min-width: 108px;
  padding: 0 18px;
}

.primary-button {
  color: #fffaf0;
  border-color: rgba(31, 27, 22, 0.86);
  background: linear-gradient(145deg, #2d261f, #17130e);
  font-weight: 850;
}

.queue-header {
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.queue-actions {
  gap: 8px;
}

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

.character-tile {
  display: grid;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid var(--paper-line);
  border-radius: 8px;
  color: var(--text);
  background: rgba(255, 250, 240, 0.72);
  cursor: pointer;
  font-family: "Songti SC", "STSong", serif;
  font-size: 1.8rem;
}

.character-tile.active {
  color: #fffaf0;
  border-color: rgba(31, 27, 22, 0.86);
  background: linear-gradient(145deg, #2d261f, #17130e);
}

@media (max-width: 1120px) {
  .metric-row,
  .browser-metrics,
  .qa-metrics,
  .mnemonic-review-metrics,
  .character-search-results,
  .profile-grid,
  .dashboard-grid,
  .profile-detail-grid,
  .detail-grid,
  .study-plan-layout,
  .study-lane-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .browser-layout {
    grid-template-columns: 1fr;
  }

  .group-browser-panel,
  .group-detail-panel {
    min-height: auto;
  }

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

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

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

  .profile-hero > .compact-button {
    grid-column: 1 / -1;
    width: fit-content;
  }

  .profile-hero-actions {
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .profile-avatar-picker {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .qa-hero > .compact-button {
    grid-column: 1 / -1;
    width: fit-content;
  }

  .detail-character,
  .detail-identity,
  .detail-actions {
    grid-column: 1 / -1;
  }

  .mini-character-row {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .layout {
    flex-wrap: wrap;
  }

  .prompt-panel {
    width: calc(50% - 9px);
  }

  .practice-panel {
    order: -1;
    flex-basis: 100%;
  }

  .practice-paper {
    width: min(76vh, 680px, 100%);
  }

  .practice-workspace {
    grid-template-columns: minmax(360px, 1fr) minmax(220px, 280px);
  }

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

@media (min-width: 721px) and (max-width: 1280px) {
  .dashboard-view {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.72fr);
    align-items: start;
  }

  .study-plan-panel,
  .study-lanes-panel,
  .session-complete-panel,
  .metric-row,
  .dashboard-grid {
    grid-column: 1 / -1;
  }

  .dashboard-view > .study-plan-panel {
    order: -1;
  }

  .dashboard-hero {
    min-height: 0;
  }

  .learner-profile-panel {
    align-self: stretch;
  }

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

  .profile-grid div:last-child {
    grid-column: 1 / -1;
  }

  .lesson-view {
    grid-template-columns: minmax(250px, 320px) minmax(0, 1fr);
    align-items: start;
  }

  .lesson-hero,
  .lesson-provenance,
  .lesson-objective,
  .lesson-shell,
  .lesson-character-grid {
    grid-column: 2;
  }

  .lesson-group-panel {
    position: sticky;
    top: 20px;
    grid-column: 1;
    grid-row: 1 / span 5;
    max-height: calc(100vh - 40px);
  }

  .lesson-group-list {
    grid-template-columns: 1fr;
    max-height: calc(100vh - 140px);
  }

  .lesson-character-grid {
    grid-template-columns: 1fr;
  }

  .lesson-character-card {
    grid-template-columns: minmax(82px, 112px) minmax(0, 1fr);
  }

  .curriculum-browser-view {
    align-items: start;
  }

  .browser-layout {
    grid-template-columns: minmax(260px, 0.45fr) minmax(0, 1fr);
    align-items: start;
  }

  .browser-hero,
  .browser-metrics,
  .character-search-panel,
  .browser-layout {
    grid-column: 1 / -1;
  }

  .group-browser-panel {
    position: sticky;
    top: 20px;
    grid-column: 1;
  }

  .group-detail-panel {
    grid-column: 2;
  }

  .character-detail-view {
    align-items: start;
  }

  .character-detail-view > *,
  .detail-grid > * {
    min-width: 0;
  }

  .detail-grid {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.72fr);
  }

  .detail-priority-panel {
    grid-column: 1 / -1;
  }

  .stroke-demo-panel,
  .review-panel {
    grid-column: 2;
  }

  .review-form-row {
    grid-template-columns: 1fr;
  }

  .review-form label {
    min-width: 0;
  }

  .meaning-panel {
    grid-column: 1 / -1;
  }

  .practice-sheet {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .quiz-view .practice-paper {
    width: min(54vh, 460px, 100%);
  }

  .quiz-view[data-mode="trace"] .practice-paper {
    width: min(50vh, 430px, 100%);
  }
}

@media (max-width: 720px) {
  .app-shell {
    padding: 18px;
  }

  .dashboard-view,
  .lesson-view,
  .curriculum-browser-view,
  .character-detail-view,
  .profile-view,
  .qa-review-view,
  .practice-sheet-view {
    gap: 12px;
  }

  .app-shell::before {
    left: 9px;
  }

  .topbar {
    align-items: flex-start;
    gap: 12px;
  }

  .topbar-title {
    align-items: center;
  }

  .topbar-title > div {
    min-width: 0;
  }

  .topbar-title h1 {
    font-size: clamp(2rem, 8.8vw, 2.65rem);
    line-height: 0.95;
  }

  .suite-label {
    font-size: 0.78rem;
  }

  .suite-launcher {
    width: 46px;
    min-width: 46px;
  }

  .suite-drawer {
    width: min(360px, calc(100vw - 26px));
    padding: 18px;
  }

  .header-actions {
    justify-content: flex-start;
  }

  .header-actions > .compact-button {
    display: none;
  }

  .header-actions .session-pill {
    min-width: 104px;
    padding: 8px 10px;
  }

  .header-actions .session-pill span {
    font-size: 0.72rem;
  }

  .header-actions .session-pill strong {
    font-size: 1rem;
  }

  body.quiz-active .topbar {
    align-items: center;
    flex-direction: row;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
  }

  body.quiz-active .topbar-title {
    align-items: center;
    gap: 10px;
  }

  body.quiz-active .topbar-title h1 {
    font-size: clamp(1.6rem, 7vw, 2.15rem);
    line-height: 1;
  }

  body.quiz-active .suite-label {
    font-size: 0.66rem;
  }

  body.quiz-active .suite-launcher {
    width: 44px;
    min-width: 44px;
    min-height: 44px;
  }

  body.quiz-active .header-actions {
    display: none;
  }

  body.quiz-active .quiz-back-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 64px;
    min-height: 44px;
    padding: 0 14px;
  }

  .study-plan-panel {
    order: 1;
    padding: 14px;
  }

  .dashboard-view > .dashboard-hero {
    order: 2;
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
    min-height: 0;
    padding: 14px;
  }

  .dashboard-view > .dashboard-hero h2 {
    margin-top: 4px;
    font-size: clamp(1.65rem, 7.4vw, 2.2rem);
  }

  .dashboard-copy {
    margin-top: 8px;
    font-size: 0.96rem;
    line-height: 1.42;
  }

  .dashboard-view > .dashboard-hero .dashboard-hero-actions,
  .lesson-hero-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .dashboard-view > .dashboard-hero .dashboard-hero-actions .primary-button,
  .dashboard-view > .dashboard-hero .dashboard-hero-actions .compact-button,
  .lesson-hero-actions .primary-button,
  .lesson-hero-actions .compact-button {
    flex: 1 1 132px;
  }

  .lesson-hero,
  .practice-sheet-hero {
    order: 1;
  }

  .lesson-group-panel {
    order: 2;
  }

  .lesson-provenance,
  .lesson-objective {
    order: 3;
  }

  .lesson-shell {
    order: 4;
  }

  .lesson-character-grid {
    order: 5;
  }

  .study-lanes-panel {
    order: 3;
    padding: 14px;
  }

  .learner-profile-panel {
    order: 4;
  }

  .metric-row {
    order: 5;
  }

  .dashboard-grid {
    order: 6;
  }

  .study-plan-layout {
    gap: 12px;
  }

  .study-plan-main {
    gap: 8px;
  }

  .study-plan-main h3 {
    font-size: 1.25rem;
  }

  .study-plan-main .dashboard-copy {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .study-plan-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .study-plan-stats span {
    padding: 8px;
    font-size: 0.78rem;
    text-align: center;
  }

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

  .study-lane-grid {
    gap: 8px;
  }

  .study-lane-card {
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 72px;
    align-content: center;
    gap: 6px 10px;
    padding: 12px;
  }

  .study-lane-card strong {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
    font-size: 2rem;
  }

  .study-lane-card small {
    font-size: 0.82rem;
  }

  .metric-card {
    padding: 12px;
  }

  .metric-card strong {
    margin-top: 6px;
    font-size: 1.7rem;
  }

  .profile-hero {
    grid-template-columns: 1fr;
  }

  .profile-hero-actions {
    width: 100%;
  }

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

  .profile-avatar {
    width: 56px;
  }

  .qa-hero {
    grid-template-columns: 1fr;
  }

  .qa-hero-actions {
    width: 100%;
  }

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

  .profile-summary-actions {
    justify-items: start;
  }

  .session-complete-panel {
    align-items: flex-start;
    flex-direction: column;
  }

  .session-complete-actions {
    grid-template-columns: 1fr;
    min-width: 100%;
  }

  .session-complete-actions strong {
    text-align: left;
  }

  .browser-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .detail-hero,
  .profile-hero,
  .qa-hero,
  .browser-hero,
  .practice-sheet-hero,
  .lesson-hero {
    min-height: 0;
    padding: 14px;
  }

  .detail-hero h2,
  .profile-hero h2,
  .qa-hero h2,
  .browser-hero h2,
  .practice-sheet-hero h2,
  .lesson-hero h2 {
    font-size: clamp(1.9rem, 8vw, 2.45rem);
  }

  .lesson-group-panel,
  .lesson-provenance,
  .lesson-objective,
  .lesson-shell,
  .group-browser-panel,
  .group-detail-panel,
  .character-search-panel,
  .meaning-panel,
  .stroke-demo-panel,
  .words-panel,
  .building-block-panel,
  .review-panel,
  .qa-review-panel,
  .dashboard-panel {
    padding: 14px;
  }

  .metric-row,
  .browser-metrics,
  .qa-metrics,
  .mnemonic-review-metrics,
  .profile-grid,
  .dashboard-grid,
  .profile-detail-grid,
  .detail-grid,
  .meaning-layout,
  .study-plan-layout,
  .study-lane-grid,
  .lesson-group-list,
  .lesson-shell-grid,
  .profile-settings-row,
  .review-form-row,
  .group-card-grid,
  .group-progress-strip,
  .character-search-results,
  .group-character-grid {
    grid-template-columns: 1fr;
  }

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

  .mnemonic-review-mark {
    min-height: 110px;
  }

  .lesson-group-button {
    grid-template-columns: 32px minmax(0, 1fr) 44px;
    scroll-snap-align: start;
  }

  .lesson-group-list {
    grid-auto-flow: column;
    grid-auto-columns: minmax(245px, 78vw);
    grid-template-columns: none;
    max-height: none;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0 2px 8px 0;
    scroll-snap-type: x proximity;
  }

  .qa-panel-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .qa-filter-tabs {
    justify-content: flex-start;
  }

  .qa-flag-card {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .qa-flag-actions {
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .meaning-etymology {
    padding-top: 14px;
    padding-left: 0;
    border-top: 1px solid var(--paper-line);
    border-left: 0;
  }

  .session-pill {
    min-width: 118px;
    padding: 10px 12px;
  }

  .prompt-panel,
  .queue-panel,
  .practice-panel {
    width: 100%;
  }

  body.quiz-active .prompt-panel {
    order: -2;
    gap: 8px;
    padding: 10px;
  }

  body.quiz-active .prompt-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 8px;
    align-items: center;
    padding: 10px;
  }

  body.quiz-active .prompt-card .card-label,
  body.quiz-active .revealed-character {
    display: none;
  }

  body.quiz-active .feedback-card {
    padding: 10px;
  }

  body.quiz-active .prompt-panel .stats-grid,
  body.quiz-active .prompt-panel .feedback-card {
    display: none;
  }

  body.quiz-active .meaning {
    min-width: 0;
    margin: 0;
    overflow: hidden;
    font-size: 1.35rem;
    line-height: 1.05;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.quiz-active .pronunciation-line {
    gap: 6px;
    margin-top: 0;
    min-height: 44px;
  }

  body.quiz-active .pinyin {
    font-size: 1rem;
  }

  body.quiz-active .pronunciation-status {
    display: none;
  }

  body.quiz-active .reveal-button {
    width: auto;
    min-width: 98px;
    min-height: 44px;
    margin-top: 0;
    padding: 0 12px;
  }

  body.quiz-active .stats-grid div {
    padding: 10px;
  }

  body.quiz-active .practice-panel {
    order: -1;
    padding: 12px;
  }

  body.quiz-active .worksheet-header {
    margin-bottom: 8px;
  }

  body.quiz-active .worksheet-header h2 {
    font-size: 1.55rem;
  }

  .practice-paper {
    width: 100%;
  }

  .practice-workspace {
    grid-template-columns: 1fr;
  }

  .trace-guide-panel {
    order: 2;
  }

  .trace-stroke-demo {
    min-height: 150px;
  }

  .trace-stroke-demo .stroke-demo-svg,
  .trace-stroke-demo .stroke-demo-image {
    width: min(100%, 180px);
  }

  .practice-sheet {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 8px;
  }

  .practice-sheet-hero .worksheet-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .practice-sheet-hero .worksheet-actions .compact-button,
  .practice-sheet-hero .worksheet-actions .primary-button {
    flex: 1 1 112px;
  }

  .lesson-character-grid {
    grid-template-columns: 1fr;
  }

  .lesson-character-card {
    grid-template-columns: 74px minmax(0, 1fr);
    gap: 12px;
    padding: 12px;
  }

  .lesson-character-mark {
    min-height: 74px;
    font-size: 3.5rem;
  }

  .lesson-character-body {
    gap: 8px;
  }

  .lesson-character-heading h3 {
    font-size: 1.12rem;
  }

  .lesson-mnemonic {
    grid-column: 1 / -1;
    padding: 10px;
  }

  .lesson-card-actions {
    grid-column: 1 / -1;
  }

  .lesson-shell-grid > div {
    min-height: 0;
    padding: 12px;
  }

  .mini-character-row {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .stroke-demo-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .meaning {
    font-size: 2.1rem;
  }
}
