:root {
  --bg: #fdfdfd;
  --ink: #2b3a4a;
  --muted: #7982a0;
  --line: #cbd5e1;
  --mint: #4ade80;
  --sky: #38bdf8;
  --sun: #facc15;
  --peach: #fb923c;
  --pink: #f472b6;
  --paper: #fcfcfb;
  --box-surface: #fcfcfb;
  --box-border: #d7d9dd;
  --box-border-strong: #c7cbd1;
  --box-shadow-soft: 0 12px 24px rgba(112, 120, 132, 0.12), 0 3px 8px rgba(112, 120, 132, 0.06);
  --shadow: var(--box-shadow-soft);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 12px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Noto Sans SC", sans-serif;
  color: var(--ink);
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(203, 213, 225, 0.15) 1px, transparent 1px),
    linear-gradient(90deg, rgba(203, 213, 225, 0.15) 1px, transparent 1px);
  background-size: 30px 30px;
  min-height: 100vh;
}

.page-login {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

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

iconify-icon {
  line-height: 1;
}

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.floating-decor {
  position: fixed;
  border-radius: 999px;
  pointer-events: none;
  z-index: 0;
}

.decor-sun {
  top: 40px;
  right: 80px;
  width: 128px;
  height: 128px;
  opacity: 0.4;
  filter: blur(32px);
  background: var(--sun);
  animation: float 3s ease-in-out infinite;
}

.decor-pink {
  bottom: 80px;
  left: 40px;
  width: 192px;
  height: 192px;
  opacity: 0.18;
  filter: blur(48px);
  background: var(--pink);
}

.sidebar,
.panel,
.hero-card,
.metric-tile,
.stat-card,
.ghost-card,
.score-orb {
  background: var(--paper);
  border: 3px solid var(--ink);
  box-shadow: var(--shadow);
  border-radius: var(--radius-xl);
}

.sidebar {
  width: 100%;
  flex-shrink: 0;
  padding: 28px;
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
  padding: 14px 16px;
  border: 3px solid var(--ink);
  border-radius: 18px;
  background: #fff8d8;
}

.user-chip-avatar {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 3px solid var(--ink);
  border-radius: 16px;
  background: #fff;
  font-size: 22px;
}

.user-chip-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 13px;
}

.user-chip-copy {
  display: grid;
  gap: 2px;
}

.user-chip-copy strong {
  font-size: 15px;
}

.user-chip-copy span {
  font-size: 13px;
  color: var(--muted);
}

.sidebar-rings {
  position: absolute;
  left: -16px;
  top: 40px;
  bottom: 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
}

.sidebar-rings span {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #e5e7eb;
  border: 4px solid #fff;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.12);
}

.brand-kicker,
.eyebrow {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ink);
}

.brand-kicker {
  display: inline-block;
  padding: 0 8px;
  background: var(--sun);
}

.brand-block h1,
.hero-card h2,
.page-header h2,
.panel h3 {
  margin: 0;
  font-family: "Baloo 2", cursive;
  font-weight: 800;
  line-height: 1;
}

.brand-block h1 {
  font-size: 40px;
}

.brand-copy,
.section-copy,
.panel-note,
.habit-meta span,
.task-copy span,
.task-row span,
.draw-row span,
.exam-row span,
.info-list {
  color: var(--muted);
}

.nav-list {
  display: grid;
  gap: 12px;
  margin: 24px 0;
  align-content: start;
  grid-auto-rows: max-content;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 24px;
  border-radius: 999px;
  font-weight: 700;
  color: #38405d;
  transition: 180ms ease;
}

.nav-link.is-active {
  background: var(--sun);
  border: 3px solid var(--ink);
  transform: rotate(-1deg);
  box-shadow: 3px 3px 0 var(--ink);
}

.nav-link:hover:not(.is-active) {
  background: rgba(255, 255, 255, 0.5);
}

.nav-icon {
  font-size: 24px;
}

.sidebar-card {
  margin-top: auto;
  padding: 24px;
  border-radius: 24px;
  color: #fff;
  overflow: hidden;
  position: relative;
  background: linear-gradient(135deg, #ffcf7f 0%, #ff9d94 100%);
}

.sidebar-card-icon {
  position: absolute;
  top: -8px;
  right: -8px;
  font-size: 64px;
  opacity: 0.2;
}

.sidebar-card .eyebrow {
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 4px;
}

.logout-form {
  margin-top: 18px;
}

.logout-button {
  width: 100%;
  border: 2px solid rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font: inherit;
  font-weight: 700;
  padding: 12px 16px;
  cursor: pointer;
}

.logout-button:hover {
  background: rgba(255, 255, 255, 0.22);
}

.login-shell {
  width: min(100%, 520px);
  position: relative;
  z-index: 2;
}

.login-card {
  display: grid;
  gap: 24px;
  padding: 32px;
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.login-copy h1 {
  margin-bottom: 12px;
  font-family: "Baloo 2", cursive;
  font-size: 48px;
  line-height: 1;
}

.login-copy p {
  margin: 0;
  color: var(--muted);
}

.login-form {
  display: grid;
  gap: 16px;
}

.login-form label {
  display: grid;
  gap: 8px;
  font-weight: 700;
}

.login-form input {
  width: 100%;
  padding: 14px 16px;
  border: 3px solid var(--ink);
  border-radius: 16px;
  background: #fff;
  font: inherit;
}

.login-submit {
  margin-top: 8px;
}

.sidebar-card strong {
  display: block;
  font-family: "Baloo 2", cursive;
  font-size: 52px;
  line-height: 1;
  margin-bottom: 10px;
}

.progress-track {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.3);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: #fff;
}

.content {
  flex: 1;
  display: grid;
  gap: 20px;
  align-content: start;
  position: relative;
  z-index: 1;
}

.flash-stack {
  display: grid;
  gap: 10px;
}

.flash-message {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-radius: 16px;
  border: 3px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  background: #fff;
  font-size: 14px;
  font-weight: 700;
}

.flash-message iconify-icon {
  font-size: 20px;
  flex: 0 0 auto;
}

.flash-success {
  background: #dcfce7;
  color: #166534;
}

.flash-warning {
  background: #fef3c7;
  color: #92400e;
}

.flash-error {
  background: #fee2e2;
  color: #991b1b;
}

.hero-card,
.page-header {
  position: relative;
  overflow: hidden;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  justify-content: space-between;
}

.hero-card::before,
.page-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 16px;
  background: rgba(56, 189, 248, 0.2);
}

.hero-card h2,
.page-header h2,
.page-archive .archive-hero h2,
.page-exams .exam-dossier-hero h2,
.page-analytics .analytics-diagnostic-summary h2,
.reward-market-title h2 {
  font-size: clamp(40px, 4.2vw, 54px);
  margin-bottom: 10px;
}

.section-copy,
.page-analytics .analytics-summary-sentence,
.reward-filter-meta {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.6;
  color: var(--muted);
}

.sticker-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.sticker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: #fff;
  border: 3px solid var(--ink);
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.08);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.sticker-icon {
  font-size: 18px;
}

.text-yellow {
  color: #facc15;
}

.text-blue {
  color: #38bdf8;
}

.text-green {
  color: #4ade80;
}

.hero-metrics,
.metrics-grid,
.reward-grid,
.rule-grid {
  display: grid;
  gap: 12px;
}

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

.hero-metrics.compact {
  grid-template-columns: repeat(2, minmax(180px, 1fr));
}

.metric-tile,
.stat-card,
.reward-card,
.rule-card {
  padding: 16px;
}

.metric-tile:nth-child(1) {
  background: var(--sun);
}

.metric-tile:nth-child(2) {
  background: var(--mint);
}

.metric-tile:nth-child(3) {
  background: var(--sky);
}

.metric-tile span,
.stat-card span {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: rgba(43, 58, 74, 0.65);
  text-transform: uppercase;
}

.metric-tile strong,
.stat-card strong,
.score-orb strong {
  display: block;
  margin-top: 6px;
  font-family: "Baloo 2", cursive;
  font-size: 30px;
  line-height: 1;
}

.metric-tile small {
  font-size: 18px;
}

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

.panel {
  padding: 24px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid rgba(127, 215, 180, 0.3);
}

.pill.success {
  background: rgba(127, 215, 180, 0.2);
  color: #1f4b47;
}

.pill.warning {
  background: rgba(250, 204, 21, 0.28);
  color: #6e5402;
}

.weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 10px;
  text-align: center;
}

.weekdays span {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--muted);
}

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

.calendar-day {
  aspect-ratio: 1;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(121, 130, 160, 0.05);
  color: rgba(121, 130, 160, 0.4);
  font-weight: 700;
  font-size: 14px;
}

.calendar-day.done,
.calendar-day.today-done {
  background: linear-gradient(135deg, var(--mint) 0%, var(--sky) 100%);
  box-shadow: 0 0 15px rgba(127, 215, 180, 0.5);
  color: #22434f;
}

.calendar-day.today,
.calendar-day.today-done {
  outline: 4px solid #ffd66e;
}

.calendar-day.missed {
  background: rgba(121, 130, 160, 0.1);
  color: var(--muted);
}

.calendar-day.empty {
  background: transparent;
}

/* 首页月历卡片在三端统一收紧一档，减少首屏占高。 */
.page-dashboard .panel:first-child {
  padding: 20px;
}

.page-dashboard .panel:first-child .panel-head {
  margin-bottom: 14px;
  align-items: flex-start;
}

.page-dashboard .panel:first-child .pill.success {
  padding: 6px 12px;
  font-size: 10px;
}

.page-dashboard .weekdays {
  gap: 6px;
  margin-bottom: 6px;
}

.page-dashboard .weekdays span {
  font-size: 9px;
}

.page-dashboard .calendar-grid {
  gap: 6px;
}

.page-dashboard .calendar-day {
  border-radius: 9px;
  font-size: 12px;
}

.page-dashboard .calendar-day.today,
.page-dashboard .calendar-day.today-done {
  outline-width: 2px;
}

.page-dashboard .calendar-day.done,
.page-dashboard .calendar-day.today-done {
  box-shadow: 0 0 8px rgba(127, 215, 180, 0.28);
}

.page-dashboard .panel-note {
  margin: 10px 0 0;
  font-size: 12px;
  line-height: 1.5;
}

.habit-list,
.task-stack,
.task-board,
.draw-list,
.exam-table,
.bars,
.note-stack {
  display: grid;
  gap: 12px;
}

.task-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr);
  gap: 24px;
}

/* 任务页左右两栏统一为管理面板风格，平板下保持同一套视觉语言。 */
.page-tasks .task-main > .panel,
.page-tasks .task-manager-panel {
  display: grid;
  gap: 18px;
  padding: 22px;
  background: rgba(255, 255, 255, 0.94);
}

.task-entry-panel {
  display: grid;
  gap: 14px;
  padding: 18px 20px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 4px 4px 0 var(--ink);
}

.task-entry-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.task-entry-head h3 {
  margin: 0;
  font-family: "Baloo 2", cursive;
  font-size: 24px;
  line-height: 1.1;
}

.task-entry-head .panel-note {
  margin-top: 6px;
  font-size: 12px;
}

.task-entry-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: #f8fafc;
  border: 2px solid rgba(43, 58, 74, 0.08);
}

.task-entry-tab {
  padding: 8px 12px;
  border-radius: 999px;
  border: 0;
  background: transparent;
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
}

.task-entry-tab.is-active {
  box-shadow: 2px 2px 0 rgba(43, 58, 74, 0.18);
  color: var(--ink);
  background: #fff;
}

.task-entry-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.task-entry-form label {
  display: grid;
  gap: 6px;
}

.task-entry-form label span {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.task-entry-form input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 2px solid var(--ink);
  background: #fff;
  font: inherit;
}

.task-entry-submit {
  min-width: 132px;
  min-height: 44px;
  padding-inline: 14px;
  box-shadow: 2px 2px 0 var(--ink);
}

.task-main,
.task-side {
  display: grid;
  gap: 24px;
  align-content: start;
}

.task-hero {
  background-image: url("https://www.transparenttextures.com/patterns/notebook.png");
}

.task-summary {
  display: grid;
  gap: 12px;
  min-width: 280px;
}

.task-summary-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  border-radius: 18px;
  border: 3px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
}

.task-summary-card.yellow {
  background: var(--sun);
}

.task-summary-card.green {
  background: var(--mint);
}

.task-summary-card span {
  display: block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  opacity: 0.7;
}

.task-summary-card strong {
  display: block;
  margin-top: 2px;
  font-family: "Baloo 2", cursive;
  font-size: 28px;
  line-height: 1;
}

.task-summary-card small {
  font-size: 12px;
}

.task-summary-card iconify-icon {
  font-size: 42px;
  opacity: 0.45;
}

.task-actions {
  display: flex;
  gap: 8px;
}

.icon-button {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 2px solid var(--ink);
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.task-habit-list {
  display: grid;
  gap: 16px;
}

.task-habit-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border-radius: 14px;
  border: 3px solid var(--ink);
  background: #fff;
  box-shadow: 3px 3px 0 var(--ink);
  transition: 180ms ease;
}

.task-habit-card:hover {
  background: #f0f9ff;
}

.task-habit-card.is-done {
  border-style: dashed;
  border-color: var(--line);
  box-shadow: none;
  background: rgba(249, 250, 251, 0.7);
  opacity: 0.65;
}

.task-habit-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 2px solid var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  font-size: 22px;
}

.task-habit-icon.tone-sky {
  background: #e0f2fe;
  color: #0284c7;
}

.task-habit-icon.tone-gray {
  background: #e5e7eb;
  color: #94a3b8;
  border-color: #d1d5db;
}

.task-habit-icon.tone-pink {
  background: #fce7f3;
  color: #db2777;
}

.task-habit-icon.tone-green {
  background: #dcfce7;
  color: #16a34a;
}

.task-habit-copy {
  flex: 1;
  min-width: 0;
}

.task-habit-copy strong {
  display: block;
  font-size: 18px;
  font-weight: 700;
}

.task-habit-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}

.task-habit-makeup {
  margin-top: 10px;
}

.task-habit-makeup summary {
  width: fit-content;
  list-style: none;
  cursor: pointer;
  color: #2563eb;
  font-size: 12px;
  font-weight: 700;
}

.task-habit-makeup summary::-webkit-details-marker {
  display: none;
}

.task-habit-makeup-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
  align-items: center;
}

.task-habit-makeup-date {
  min-width: 150px;
  padding: 10px 12px;
  border: 2px solid var(--ink);
  border-radius: 12px;
  background: #fff;
  font: inherit;
}

.task-habit-makeup-submit {
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: #fff8d8;
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  padding: 10px 14px;
  cursor: pointer;
}

.task-highlight {
  color: #f97316;
  font-weight: 700;
}

.task-habit-points {
  font-family: "Baloo 2", cursive;
  font-size: 22px;
  font-weight: 800;
  color: #16a34a;
}

.task-check-btn {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 2px solid var(--ink);
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.task-check-btn.done {
  background: var(--mint);
  border-color: var(--mint);
  color: #fff;
}

.task-check.done {
  background: var(--mint);
  border-color: var(--mint);
  color: #fff;
}

.habit-item,
.task-row,
.draw-row,
.exam-row,
.task-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border-radius: 14px;
  background: #fff;
  border: 3px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  transition: 180ms ease;
}

.habit-item {
  border-width: 2px;
  border-radius: 18px;
  box-shadow: 3px 3px 0 #2b3a4a;
}

.note-card {
  position: relative;
  padding: 16px 18px 16px 20px;
  border-radius: 14px;
  background: #fff;
  border: 3px solid var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
  display: grid;
  gap: 4px;
}

.note-card::before {
  content: "";
  position: absolute;
  left: -2px;
  top: 14px;
  width: 6px;
  height: 26px;
  border-radius: 999px;
}

.note-card.urgent::before {
  background: #f87171;
}

.note-card.info::before {
  background: #60a5fa;
}

.note-card.red::before {
  background: #f87171;
}

.note-card.blue::before {
  background: #60a5fa;
}

.note-card span {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
}

.note-card.red span {
  color: #ef4444;
}

.note-card.blue span {
  color: #3b82f6;
}

.note-panel {
  background: rgba(255, 255, 255, 0.94);
}

.task-manager-panel {
  gap: 18px;
}

.task-board-shell {
  min-height: 0;
  max-height: 430px;
  overflow: auto;
  padding-right: 6px;
}

.task-create-form {
  display: grid;
  gap: 10px;
}

.task-create-form input,
.task-create-form select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 2px solid var(--ink);
  background: #fff;
  font: inherit;
}

.task-create-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.task-inline-form {
  display: flex;
  margin: 0;
}

.task-delete-btn {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 2px solid var(--ink);
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #ef4444;
}

.note-title {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 8px;
}

.note-badge {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 2px solid var(--ink);
  background: var(--sun);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.note-add {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 2px dashed var(--ink);
  background: transparent;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.habit-item:hover,
.task-habit-card:hover,
.task-card:hover {
  background: #f0f9ff;
}

.task-card.is-done {
  opacity: 0.72;
  border-style: dashed;
  box-shadow: none;
  background: rgba(249, 250, 251, 0.8);
}

.task-card.is-done .task-copy strong {
  text-decoration: line-through;
}

.habit-item.is-done {
  opacity: 1;
  border: 2px solid transparent;
  background: linear-gradient(to right, rgba(127, 215, 180, 0.2), rgba(255, 255, 255, 0.6));
  box-shadow: none;
}

.habit-mark,
.task-check {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 2px solid var(--ink);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background: #fff;
}

.habit-action-form,
.task-check-form,
.reward-action-form {
  display: flex;
  margin: 0;
}

.habit-mark-button,
.task-check-btn {
  font: inherit;
}

.habit-mark-button {
  cursor: pointer;
}

.habit-mark-button:disabled,
.task-check-btn:disabled {
  cursor: default;
}

.habit-item.is-done .habit-mark {
  background: linear-gradient(135deg, #7fd7b4 0%, #9ed8ff 100%);
  color: white;
  border-color: transparent;
  box-shadow: 0 8px 16px rgba(127, 215, 180, 0.25);
}

.habit-item.is-done .habit-meta strong,
.habit-item.is-done .habit-meta span,
.habit-item.is-done .habit-points {
  opacity: 0.5;
}

.habit-item.is-done .habit-meta strong {
  text-decoration: line-through;
}

.task-check.done {
  background: var(--mint);
}

.habit-meta,
.task-copy {
  flex: 1;
  display: grid;
  gap: 4px;
}

.task-copy strong,
.task-habit-copy strong {
  line-height: 1.35;
}

.task-copy span,
.task-habit-meta span {
  font-size: 12px;
}

.habit-points {
  font-family: "Baloo 2", cursive;
  font-size: 24px;
  font-weight: 800;
  color: #16a34a;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #2563eb;
  font-size: 14px;
  font-weight: 700;
}

.button-link,
.mock-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--ink);
  border-radius: 12px;
  padding: 10px 18px;
  background: #fff;
  box-shadow: 3px 3px 0 var(--ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: 180ms ease;
}

.green-button {
  background: #4ade80;
  color: #24454f;
}

.button-link:hover,
.mock-button:hover {
  transform: translateY(-2px);
}

.mock-button.wide {
  width: 100%;
}

.mock-button.ghost {
  background: transparent;
  border-style: dashed;
  box-shadow: none;
}

.score-orb,
.ghost-card {
  padding: 18px 20px;
}

.score-orb {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 220px;
  background: var(--sun);
}

.score-orb span {
  font-size: 14px;
  font-weight: 700;
}

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

.stat-card {
  border-top-width: 8px;
}

.stat-card:nth-child(1) {
  border-top-color: #fb923c;
}

.stat-card:nth-child(2) {
  border-top-color: #38bdf8;
}

.stat-card:nth-child(3) {
  border-top-color: #4ade80;
}

.stat-card:nth-child(4) {
  border-top-color: #a78bfa;
}

.bar-row {
  display: grid;
  grid-template-columns: 56px 1fr;
  align-items: center;
  gap: 12px;
}

.bar {
  height: 16px;
  border-radius: 999px;
  background: #f3f4f6;
  border: 2px solid var(--ink);
  overflow: hidden;
}

.bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--mint) 0%, var(--sky) 100%);
}

.info-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 12px;
}

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

.progress-panel {
  position: relative;
  overflow: hidden;
  padding: 20px 22px;
}

.progress-panel-strip {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr) max-content;
  align-items: center;
  gap: 14px;
}

.progress-panel-intro,
.progress-panel-meter,
.progress-panel-summary {
  display: grid;
  gap: 10px;
}

.progress-panel-intro {
  align-content: center;
}

.progress-panel-meter {
  min-width: 0;
}

.progress-panel-summary {
  justify-items: end;
  text-align: right;
}

.progress-badge {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.08;
  font-size: 76px;
  pointer-events: none;
}

.progress-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 700;
}

.progress-track.dark {
  height: 16px;
  background: #f3f4f6;
  border: 2px solid var(--ink);
}

.progress-fill.gradient {
  background: linear-gradient(90deg, var(--mint) 0%, var(--sky) 100%);
}

.progress-card p {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}

.progress-copy {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}

.exam-reward {
  background:
    radial-gradient(circle at top right, rgba(255, 214, 110, 0.4), transparent 34%),
    radial-gradient(circle at left bottom, rgba(255, 147, 178, 0.18), transparent 24%),
    rgba(255, 255, 255, 0.86);
}

.exam-paper {
  position: relative;
  padding: 16px;
  margin-bottom: 16px;
  border: 2px dashed #fca5a5;
  border-radius: 18px;
  background: #fefce8;
  overflow: hidden;
}

.exam-stamp {
  position: absolute;
  right: -6px;
  top: -6px;
  width: 64px;
  height: 64px;
  border-radius: 999px;
  border: 4px solid #ef4444;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: rotate(-12deg);
  color: #ef4444;
  font-weight: 800;
  font-size: 26px;
  opacity: 0.8;
}

.exam-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 6px;
}

.exam-title-row span {
  font-size: 18px;
  font-weight: 700;
  color: #38405d;
}

.exam-title-row strong {
  font-family: "Baloo 2", cursive;
  font-size: 32px;
  color: #3da986;
}

.exam-title-row small {
  font-size: 14px;
}

.exam-paper p {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

.exam-paper p strong {
  color: #3da986;
}

.quick-todo-list .task-row {
  justify-content: space-between;
  box-shadow: 3px 3px 0 #2b3a4a;
}

.todo-pill {
  background: rgba(255, 183, 143, 0.2);
  color: #38405d;
}

.todo-pill.priority-normal {
  background: rgba(167, 139, 250, 0.16);
}

.todo-pill.priority-low {
  background: rgba(74, 222, 128, 0.18);
}

.page-exams .exam-dossier-hero {
  position: relative;
  overflow: hidden;
  display: block;
  width: 100%;
  padding: 0 20px 14px;
  border: 3px solid var(--ink);
  border-radius: 24px;
  box-shadow: 3px 3px 0 var(--ink);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(250, 252, 247, 0.97) 100%);
}

.page-exams .exam-dossier-hero::before {
  height: 4px;
  background: linear-gradient(90deg, rgba(74, 222, 128, 0.16), rgba(56, 189, 248, 0.1));
}

.page-exams .exam-dossier-hero-copy {
  width: 100%;
  max-width: none;
}

.page-exams .exam-dossier-hero .section-copy {
  max-width: 42ch;
}

.page-exams .exam-dossier-hero h2 {
  margin-bottom: 10px;
}

.page-exams .exam-dossier-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.72fr) minmax(260px, 0.86fr);
  gap: 24px;
  align-items: start;
}

.page-exams .exam-dossier-main,
.page-exams .exam-dossier-side {
  display: grid;
  gap: 20px;
  align-content: start;
  min-width: 0;
}

.page-exams .exam-dossier-main .panel,
.page-exams .exam-dossier-side .panel {
  border-width: 1px;
  border-color: rgba(203, 213, 225, 0.92);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
  background: rgba(255, 255, 255, 0.98);
}

.page-exams .exam-dossier-side .panel {
  border: 3px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
}

.page-exams .exam-record-panel {
  position: relative;
  display: grid;
  gap: 22px;
}

.page-exams .exam-record-panel::after {
  content: "";
  position: absolute;
  inset: -3px;
  border: 3px solid var(--ink);
  border-radius: calc(var(--radius-xl) + 3px);
  box-shadow: 3px 3px 0 var(--ink);
  pointer-events: none;
}

.page-exams .exam-record-panel .panel-head {
  margin-bottom: 0;
}

.page-exams .exam-record-head {
  align-items: end;
}

.page-exams .exam-record-intro,
.page-exams .exam-side-copy {
  margin: 8px 0 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.65;
}

.page-exams .exam-record-summary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.page-exams .exam-record-count {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.page-exams .exam-record-groups {
  display: grid;
  gap: 22px;
}

.page-exams .exam-record-group {
  position: relative;
  display: grid;
  gap: 14px;
  padding: 2px 0 10px 24px;
}

.page-exams .exam-record-group::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 6px;
  width: 2px;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.95);
}

.page-exams .exam-record-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.page-exams .exam-record-group-head h4 {
  margin: 0;
  font-family: "Baloo 2", cursive;
  font-size: 22px;
  line-height: 1.1;
}

.page-exams .exam-record-group-head span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.page-exams .exam-record-list {
  display: grid;
  gap: 10px;
}

.page-exams .exam-record-card {
  display: grid;
  gap: 12px;
  padding: 18px 18px 16px;
  border-radius: 16px;
  border: 1px solid rgba(226, 232, 240, 0.95);
  background: #fcfcfc;
  box-shadow: none;
  transition: border-color 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

.page-exams .exam-record-card.is-muted {
  opacity: 0.7;
}

.page-exams .exam-record-card:hover {
  border-color: rgba(74, 222, 128, 0.32);
  background: #fff;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.05);
}

.page-exams .exam-record-card-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.page-exams .exam-record-icon {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 10px;
  border: 1px solid rgba(203, 213, 225, 0.9);
  background: rgba(74, 222, 128, 0.16);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #166534;
}

.page-exams .exam-record-icon.tone-sky {
  background: rgba(56, 189, 248, 0.16);
  color: #0369a1;
}

.page-exams .exam-record-icon.tone-pink {
  background: rgba(244, 114, 182, 0.14);
  color: #9d174d;
}

.page-exams .exam-record-title {
  flex: 1;
  min-width: 0;
}

.page-exams .exam-record-title h5 {
  margin: 0 0 4px;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.25;
}

.page-exams .exam-record-title p {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.page-exams .exam-record-note {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
}

.page-exams .exam-entry-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.page-exams .exam-tag {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(203, 213, 225, 0.85);
  background: #fff;
  font-size: 10px;
  font-weight: 800;
}

.page-exams .exam-tag.tone-purple {
  border-color: #a78bfa;
  background: rgba(167, 139, 250, 0.12);
  color: #5b21b6;
}

.page-exams .exam-tag.tone-blue {
  border-color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  color: #0369a1;
}

.page-exams .exam-record-stats {
  display: flex;
  gap: 12px;
  align-items: center;
  padding-top: 12px;
  border-top: 1px dashed rgba(203, 213, 225, 0.9);
}

.page-exams .exam-score-box {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.page-exams .exam-score-box span {
  color: #6b7280;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.page-exams .exam-score-box strong {
  font-family: "Baloo 2", cursive;
  font-size: 34px;
  line-height: 1;
  color: #166534;
}

.page-exams .exam-divider {
  flex: 0 0 1px;
  margin-left: auto;
  width: 1px;
  height: 48px;
  background: rgba(203, 213, 225, 0.95);
}

.page-exams .exam-points-box {
  display: grid;
  flex: 0 0 auto;
  min-width: max-content;
  gap: 6px;
  justify-items: end;
  text-align: right;
}

.page-exams .exam-delta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 5px;
  font-size: 11px;
  font-weight: 800;
  color: #16a34a;
}

.page-exams .exam-delta.is-down {
  color: #f87171;
}

.page-exams .exam-points-box span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(132, 204, 22, 0.24);
  border-radius: 999px;
  background: #f7fee7;
  font-size: 12px;
  font-weight: 800;
  color: #84cc16;
}

.page-exams .exam-more-button {
  width: 100%;
  margin-top: 4px;
  padding: 14px 18px;
  border: 1px solid rgba(203, 213, 225, 0.92);
  border-radius: 16px;
  background: rgba(248, 250, 252, 0.82);
  color: #64748b;
  font: inherit;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
}

.page-exams .exam-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-top: 2px;
}

.page-exams .exam-hero-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(250, 204, 21, 0.34);
  border-radius: 999px;
  background: rgba(255, 248, 220, 0.96);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: none;
}

.page-exams .exam-hero-note {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  border: 0;
  border-radius: 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.page-exams .exam-hero-note iconify-icon {
  font-size: 18px;
  color: var(--sky);
}

.page-exams .exam-form-panel,
.page-exams .exam-subject-index {
  display: grid;
  gap: 18px;
  padding: 24px;
}

.page-exams .exam-form-panel h3,
.page-exams .exam-subject-index h3 {
  font-size: 22px;
}

.page-exams .exam-form {
  display: grid;
  gap: 12px;
}

.page-exams .exam-form label {
  display: grid;
  gap: 6px;
}

.page-exams .exam-form label span {
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
}

.page-exams .exam-form input,
.page-exams .exam-form select,
.page-exams .exam-form textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid rgba(203, 213, 225, 0.92);
  border-radius: 12px;
  background: #f8fafc;
  font: inherit;
  color: var(--ink);
}

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

.page-exams .exam-subject-index-list {
  display: grid;
  gap: 2px;
}

.page-exams .exam-subject-index-item {
  display: grid;
  gap: 8px;
  padding: 14px 0;
  border-radius: 0;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(241, 245, 249, 0.95);
}

.page-exams .exam-level-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  font-weight: 700;
}

.page-exams .exam-level-meta span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.page-exams .exam-level-meta strong {
  font-family: "Baloo 2", cursive;
  font-size: 18px;
  color: #94a3b8;
}

.page-exams .exam-level-track {
  height: 10px;
  padding: 2px;
  border-radius: 999px;
  background: rgba(241, 245, 249, 0.92);
}

.page-exams .exam-level-fill.tone-orange {
  background: linear-gradient(90deg, #fb923c, #fbbf24);
}

.page-exams .exam-level-fill.tone-sky {
  background: linear-gradient(90deg, #38bdf8, #60a5fa);
}

.page-exams .exam-level-fill.tone-pink {
  background: linear-gradient(90deg, #f472b6, #fb7185);
}

.page-exams .exam-side-link {
  justify-content: center;
}

.page-archive .archive-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 40px;
  background: var(--paper);
  border: 3px solid var(--ink);
  box-shadow: var(--shadow);
  border-radius: var(--radius-xl);
}

.page-archive .archive-hero-copy {
  position: relative;
  z-index: 1;
  max-width: 56%;
}

.page-archive .archive-hero h2 {
  margin: 0 0 10px;
  color: var(--ink);
  line-height: 1;
}

.page-archive .archive-hero .section-copy {
  color: var(--muted);
}

.page-archive .archive-hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 24px;
}

.page-archive .archive-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  box-shadow: 3px 3px 0 var(--ink);
}

.page-archive .archive-hero-badge iconify-icon.tone-sun {
  color: var(--sun);
}

.page-archive .archive-hero-badge iconify-icon.tone-mint {
  color: var(--mint);
}

.page-archive .archive-hero-visual {
  position: relative;
  flex: 0 0 auto;
  display: none;
}

.page-archive .archive-hero-visual-orb {
  width: 192px;
  height: 192px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px dashed var(--ink);
  border-radius: 999px;
  background: rgba(74, 222, 128, 0.1);
}

.page-archive .archive-hero-visual-orb iconify-icon {
  font-size: 96px;
  color: var(--mint);
}

.page-archive .archive-layout {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 24px;
  align-items: start;
}

.page-archive .archive-main {
  grid-column: span 8;
  display: grid;
  gap: 24px;
  min-width: 0;
}

.page-archive .archive-side {
  grid-column: span 4;
  display: grid;
  gap: 24px;
  min-width: 0;
}

.page-archive .archive-main-card,
.page-archive .archive-side-card {
  background: #fff;
  border: 3px solid var(--ink);
  box-shadow: var(--shadow);
  border-radius: var(--radius-xl);
}

.page-archive .archive-main-card,
.page-archive .archive-side-card {
  padding: 32px;
}

.page-archive .archive-main-card {
  display: grid;
  gap: 32px;
}

.page-archive .archive-main-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin: 0;
}

.page-archive .archive-main-head .eyebrow,
.page-archive .archive-side-card .eyebrow {
  margin: 0 0 4px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.page-archive .archive-main-head h3,
.page-archive .archive-side-card h3 {
  margin: 0;
  color: var(--ink);
  font-size: 32px;
  line-height: 1.04;
}

.page-archive .archive-last-updated {
  padding: 10px 16px;
  border: 2px solid rgba(74, 222, 128, 0.2);
  border-radius: 999px;
  background: rgba(74, 222, 128, 0.1);
  color: var(--mint);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.page-archive .archive-profile-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  margin: 0;
}

.page-archive .archive-profile-item {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 24px;
  border: 2px solid var(--ink);
  border-radius: var(--radius-lg);
  box-shadow: 3px 3px 0 var(--ink);
  background: var(--paper);
  text-align: center;
}

.page-archive .archive-profile-item dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.page-archive .archive-profile-item dd {
  margin: 0;
  color: var(--ink);
  font-size: 20px;
  font-weight: 700;
}

.page-archive .archive-profile-item dd small {
  font-size: 14px;
}

.page-archive .archive-profile-highlight dd {
  font-size: 42px;
  font-weight: 800;
}

.page-archive .archive-profile-highlight.tone-height {
  background: rgba(74, 222, 128, 0.05);
  border-color: rgba(74, 222, 128, 0.4);
}

.page-archive .archive-profile-highlight.tone-height dt {
  color: var(--mint);
}

.page-archive .archive-profile-highlight.tone-weight {
  background: rgba(56, 189, 248, 0.05);
  border-color: rgba(56, 189, 248, 0.4);
}

.page-archive .archive-profile-highlight.tone-weight dt {
  color: var(--sky);
}

.page-archive .archive-measurements {
  display: grid;
  gap: 16px;
}

.page-archive .archive-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.page-archive .archive-section-head h4 {
  margin: 0;
  color: var(--ink);
  font-size: 20px;
  font-weight: 700;
}

.page-archive .archive-record-add {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--sky);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.page-archive .archive-record-add iconify-icon {
  font-size: 18px;
}

.page-archive .archive-entry-form {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 2px dashed rgba(121, 130, 160, 0.35);
  border-radius: var(--radius-xl);
  background: #f8fafc;
}

.page-archive .archive-entry-form[hidden] {
  display: none !important;
}

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

.page-archive .archive-entry-form label {
  display: grid;
  gap: 6px;
}

.page-archive .archive-entry-form label span {
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
}

.page-archive .archive-entry-form input {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid rgba(203, 213, 225, 0.92);
  border-radius: 12px;
  background: #fff;
  font: inherit;
  color: var(--ink);
}

.page-archive .archive-entry-note {
  grid-column: 1 / -1;
}

.page-archive .archive-entry-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.page-archive .archive-entry-submit,
.page-archive .archive-entry-cancel {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.page-archive .archive-entry-submit {
  border: 2px solid var(--ink);
  background: var(--sky);
  color: #fff;
  cursor: pointer;
  box-shadow: 4px 4px 0 var(--ink);
}

.page-archive .archive-entry-cancel {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.page-archive .archive-measurement-list {
  display: grid;
  gap: 12px;
}

.page-archive .archive-measurement-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px;
  border: 2px solid var(--ink);
  border-radius: var(--radius-lg);
  background: #fff;
  transition: transform 160ms ease;
}

.page-archive .archive-measurement-item:hover {
  transform: translateX(4px);
}

.page-archive .archive-measurement-month {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border-radius: 12px;
  background: rgba(121, 130, 160, 0.1);
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.page-archive .archive-measurement-month.tone-mint {
  background: rgba(74, 222, 128, 0.2);
  color: var(--mint);
}

.page-archive .archive-measurement-summary {
  flex: 1;
  min-width: 0;
}

.page-archive .archive-measurement-title {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
}

.page-archive .archive-measurement-note {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.page-archive .archive-measurement-stats {
  display: flex;
  align-items: center;
  gap: 32px;
}

.page-archive .archive-measurement-stat {
  text-align: right;
}

.page-archive .archive-measurement-stat-label {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.page-archive .archive-measurement-stat-value {
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.page-archive .archive-measurement-stat-value strong {
  font-size: 16px;
}

.page-archive .archive-delta {
  margin-left: 6px;
  color: var(--mint);
  font-size: 12px;
}

.page-archive .archive-delta.is-down {
  color: var(--pink);
}

.page-archive .archive-measurement-chevron {
  color: var(--muted);
}

.page-archive .archive-history-button {
  width: 100%;
  padding: 16px;
  border: 2px dashed rgba(121, 130, 160, 0.3);
  border-radius: var(--radius-xl);
  background: transparent;
  color: var(--muted);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.page-archive .archive-side-card {
  display: grid;
  gap: 24px;
}

.page-archive .archive-class-list {
  display: grid;
  gap: 16px;
}

.page-archive .archive-class-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px;
  border: 2px solid var(--ink);
  border-radius: var(--radius-lg);
  background: #fff;
}

.page-archive .archive-class-card.tone-pink {
  background: rgba(244, 114, 182, 0.05);
  border-color: rgba(244, 114, 182, 0.2);
}

.page-archive .archive-class-card.tone-sky {
  background: rgba(56, 189, 248, 0.05);
  border-color: rgba(56, 189, 248, 0.2);
}

.page-archive .archive-class-card.tone-mint {
  background: rgba(74, 222, 128, 0.05);
  border-color: rgba(74, 222, 128, 0.2);
}

.page-archive .archive-class-icon {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border: 2px solid var(--ink);
  border-radius: 12px;
  background: #fff;
}

.page-archive .archive-class-card.tone-pink .archive-class-icon,
.page-archive .archive-class-card.tone-pink .archive-class-copy p {
  color: var(--pink);
}

.page-archive .archive-class-card.tone-sky .archive-class-icon,
.page-archive .archive-class-card.tone-sky .archive-class-copy p {
  color: var(--sky);
}

.page-archive .archive-class-card.tone-mint .archive-class-icon,
.page-archive .archive-class-card.tone-mint .archive-class-copy p {
  color: var(--mint);
}

.page-archive .archive-class-copy {
  min-width: 0;
}

.page-archive .archive-class-copy strong {
  display: block;
  color: var(--ink);
  font-size: 16px;
}

.page-archive .archive-class-copy p,
.page-archive .archive-class-copy span {
  margin: 4px 0 0;
  font-size: 13px;
  line-height: 1.5;
}

.page-archive .archive-class-copy span {
  display: block;
  color: var(--muted);
}

.page-archive .archive-reminder-card {
  position: relative;
  overflow: hidden;
  background: var(--sun);
}

.page-archive .archive-reminder-card h3 {
  display: flex;
  align-items: center;
  gap: 8px;
}

.page-archive .archive-reminder-card .panel-note {
  color: rgba(43, 58, 74, 0.9);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.7;
}

.page-archive .archive-reminder-icon {
  position: absolute;
  right: -10px;
  bottom: -12px;
  font-size: 90px;
  opacity: 0.1;
  transform: rotate(12deg);
}

.page-archive .archive-reminder-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: start;
  padding: 14px 22px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  box-shadow: 3px 3px 0 var(--ink);
}

.reward-layout,
.analytics-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr);
  gap: 24px;
}

.page-rewards .reward-layout {
  grid-template-columns: 1fr;
}

.reward-main,
.reward-side {
  display: grid;
  gap: 24px;
  align-content: start;
}

.baloo-inline {
  font-family: "Baloo 2", cursive;
  font-size: 30px;
  font-weight: 800;
  line-height: 1;
}

.reward-balance {
  display: flex;
  align-items: center;
  gap: 16px;
}

.reward-market-stack {
  gap: 20px;
}

.balance-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: 999px;
  border: 3px solid var(--ink);
  background: var(--sun);
  box-shadow: 3px 3px 0 var(--ink);
  font-weight: 700;
}

.balance-chip iconify-icon {
  font-size: 24px;
}

.balance-chip small {
  font-size: 14px;
  opacity: 0.7;
}

.balance-chip.balance-chip-soft {
  background: rgba(255, 255, 255, 0.92);
}

.reward-filter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0;
}

.reward-filter-panel {
  padding: 12px 14px;
  border-radius: 24px;
  border: 3px solid var(--ink);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 4px 4px 0 var(--ink);
}

.reward-filter h3,
.reward-market-title h2 {
  margin: 0;
  font-family: "Baloo 2", cursive;
  line-height: 1;
}

.reward-market-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.reward-market-summary {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.reward-market-title {
  display: grid;
  gap: 0;
}

.reward-market-balance {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 11px;
  border-radius: 999px;
  border: 3px solid var(--ink);
  background: #fef3c7;
  box-shadow: 3px 3px 0 var(--ink);
  white-space: nowrap;
}

.reward-market-balance iconify-icon {
  font-size: 18px;
}

.reward-market-balance .baloo-inline {
  font-size: 20px;
}

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

.pill-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 12px;
  border: 2px solid transparent;
  background: #f3f4f6;
  color: #9ca3af;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
}

.pill-button.active {
  background: #fff;
  color: var(--ink);
  border-color: var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
}

.pill-count {
  opacity: 0.72;
}

.reward-filter-meta {
  color: #64748b;
}

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

.reward-card {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 10px;
  border-radius: 16px;
  border: 3px solid var(--ink);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 3px 3px 0 var(--ink);
}

.reward-card-empty {
  grid-column: 1 / -1;
  align-items: flex-start;
}

.reward-card-empty p {
  margin: 0;
  color: #64748b;
  font-size: 12px;
  line-height: 1.5;
}

.reward-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 7;
  border-radius: 14px;
  border: 2px solid var(--ink);
  overflow: hidden;
  background: #f9fafb;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px 12px 12px;
}

.reward-media::before,
.reward-media::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
}

.reward-media::before {
  width: 108px;
  height: 108px;
  left: -18px;
  bottom: -42px;
  background: rgba(255, 255, 255, 0.28);
}

.reward-media::after {
  width: 72px;
  height: 72px;
  right: -10px;
  top: -18px;
  background: rgba(255, 255, 255, 0.35);
}

.reward-card-blue .reward-media {
  background: #ffedd5;
}

.reward-card-green .reward-media {
  background: #dcfce7;
}

.reward-card-purple .reward-media {
  background: #ede9fe;
}

.reward-card-pink .reward-media {
  background: #fce7f3;
}

.reward-tag {
  position: absolute;
  top: 6px;
  right: 6px;
  padding: 2px 7px;
  border-radius: 8px;
  border: 2px solid var(--ink);
  background: #fff;
  font-size: 8px;
  font-weight: 800;
}

.reward-media-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 86px;
  height: 86px;
  border-radius: 24px;
  border: 3px solid var(--ink);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 4px 4px 0 var(--ink);
  transform: rotate(-5deg);
  position: relative;
  z-index: 1;
}

.reward-media-icon iconify-icon {
  font-size: 50px;
  display: block;
  flex: 0 0 auto;
  line-height: 1;
}

.reward-copy {
  display: grid;
  gap: 2px;
  padding: 0 2px;
}

.reward-copy strong {
  font-size: 13px;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.reward-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 2px;
}

.reward-status {
  display: inline-flex;
  align-items: center;
  padding: 4px 7px;
  border-radius: 999px;
  background: #eef2ff;
  color: #475569;
  font-size: 9px;
  font-weight: 700;
}

.reward-status.is-ready {
  background: #dcfce7;
  color: #166534;
}

.reward-cost {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: "Baloo 2", cursive;
  font-size: 18px;
  font-weight: 800;
}

.reward-cost iconify-icon {
  font-size: 14px;
}

.reward-action-form {
  margin-top: auto;
}

.reward-btn {
  padding: 8px 10px;
  border-radius: 10px;
  width: 100%;
  min-height: 36px;
  font-size: 10px;
  box-shadow: 2px 2px 0 var(--ink);
}

.reward-btn:disabled {
  opacity: 0.68;
  cursor: default;
  transform: none;
}

.reward-card-blue .reward-btn {
  background: #38bdf8;
  color: #fff;
}

.reward-card-green .reward-btn {
  background: #4ade80;
  color: #1e3a34;
}

.reward-card-purple .reward-btn {
  background: #a78bfa;
  color: #fff;
}

.reward-card-pink .reward-btn {
  background: #f472b6;
  color: #fff;
}

.reward-history-strip {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 3px solid rgba(43, 58, 74, 0.16);
}

.reward-history-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.reward-history-head h3 {
  margin: 0;
  font-family: "Baloo 2", cursive;
  font-size: 20px;
}

.reward-history-count {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(239, 246, 255, 0.82);
  border: 2px solid rgba(191, 219, 254, 0.9);
  color: #1d4ed8;
  font-size: 10px;
  font-weight: 800;
}

.reward-history-list {
  display: grid;
  gap: 4px;
}

.reward-history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 10px;
  border-radius: 10px;
  border: 2px solid transparent;
  background: rgba(255, 255, 255, 0.7);
  transition: 160ms ease;
}

.reward-history-item:hover {
  border-color: rgba(43, 58, 74, 0.22);
  background: rgba(255, 255, 255, 0.92);
}

.reward-history-main {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.reward-history-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 2px solid #dbeafe;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.reward-history-icon iconify-icon {
  font-size: 16px;
  display: block;
}

.reward-history-main strong,
.reward-history-main span {
  display: block;
}

.reward-history-main strong {
  font-size: 11px;
  line-height: 1.2;
}

.reward-history-main span {
  font-size: 9px;
  color: var(--muted);
}

.reward-history-state {
  padding: 4px 7px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #6b7280;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  flex: 0 0 auto;
}

.reward-history-item-empty {
  justify-content: flex-start;
}

.collection-link {
  display: block;
  text-align: center;
  margin-top: 12px;
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
}

.analytics-summary .metric-tile:nth-child(2) {
  background: #fff;
}

.page-analytics .analytics-diagnostic-hero {
  display: grid;
  gap: 22px;
  padding-top: 0;
}

.page-analytics .analytics-diagnostic-top {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) auto;
  gap: 24px;
  align-items: start;
}

.page-analytics .analytics-diagnostic-summary {
  display: grid;
  gap: 8px;
}

.page-analytics .analytics-diagnostic-summary h2 {
  line-height: 1;
}

.page-analytics .analytics-diagnostic-copy {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.7;
  color: rgba(43, 58, 74, 0.82);
}

.page-analytics .analytics-summary-sentence {
  max-width: 42ch;
}

.page-analytics .analytics-diagnostic-score {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 22px;
  border-radius: 18px;
  border: 3px solid var(--ink);
  background: #f8fafc;
  box-shadow: 4px 4px 0 var(--ink);
}

.page-analytics .analytics-diagnostic-score span,
.page-analytics .analytics-secondary-card span,
.page-analytics .analytics-timeline-metric span {
  font-size: 11px;
  font-weight: 700;
  color: rgba(43, 58, 74, 0.64);
  text-transform: uppercase;
}

.page-analytics .analytics-diagnostic-score strong,
.page-analytics .analytics-secondary-card strong {
  font-family: "Baloo 2", cursive;
  font-size: 36px;
  line-height: 1;
}

.page-analytics .analytics-score-divider {
  width: 2px;
  align-self: stretch;
  background: rgba(43, 58, 74, 0.1);
}

.page-analytics .analytics-diagnostic-delta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #16a34a;
  font-size: 14px;
  font-weight: 800;
}

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

.page-analytics .analytics-overview-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 3px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
}

.page-analytics .analytics-overview-card.tone-up {
  background: #f0fdf4;
}

.page-analytics .analytics-overview-card.tone-down {
  background: #fef2f2;
}

.page-analytics .analytics-overview-card.tone-action {
  background: #fffbeb;
  border-style: dashed;
}

.page-analytics .analytics-overview-icon,
.page-analytics .analytics-timeline-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 2px solid var(--ink);
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  font-size: 20px;
}

.page-analytics .analytics-overview-card.tone-action .analytics-overview-icon {
  background: var(--sun);
  color: #fff;
}

.page-analytics .analytics-overview-card h4 {
  margin: 0;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #64748b;
}

.page-analytics .analytics-overview-title {
  margin: 4px 0 0;
  font-size: 16px;
  font-weight: 700;
}

.page-analytics .analytics-overview-detail,
.page-analytics .analytics-timeline-subtitle,
.page-analytics .analytics-timeline-detail,
.page-analytics .analytics-secondary-card p {
  margin: 6px 0 0;
  color: #64748b;
  font-size: 12px;
  line-height: 1.6;
}

.page-analytics .analytics-timeline-panel {
  display: grid;
  gap: 22px;
}

.page-analytics .analytics-timeline-head {
  align-items: center;
  margin-bottom: 0;
}

.page-analytics .analytics-timeline-intro {
  margin: 6px 0 0;
  color: #7982a0;
  font-size: 14px;
  font-weight: 500;
}

.page-analytics .analytics-filter-switch {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0;
  padding: 4px;
  border-radius: 14px;
  background: #f1f5f9;
  border: 2px solid var(--ink);
}

.page-analytics .analytics-filter-switch .pill-button {
  padding: 8px 16px;
  border-radius: 10px;
  background: transparent;
  color: #7982a0;
}

.page-analytics .analytics-filter-switch .pill-button.active {
  border-color: rgba(43, 58, 74, 0.1);
  box-shadow: none;
}

.page-analytics .analytics-timeline-list {
  display: grid;
  gap: 24px;
  padding-left: 28px;
  border-left: 4px solid rgba(43, 58, 74, 0.05);
}

.page-analytics .analytics-timeline-item {
  position: relative;
  display: block;
}

.page-analytics .analytics-timeline-marker {
  position: absolute;
  left: -50px;
  top: 14px;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 3px solid var(--ink);
  background: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.page-analytics .analytics-timeline-marker strong {
  font-size: 7px;
  font-weight: 900;
  line-height: 1;
}

.page-analytics .analytics-timeline-marker span {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  display: block;
  margin-top: 2px;
}

.page-analytics .analytics-timeline-item.direction-up .analytics-timeline-marker span {
  background: #16a34a;
}

.page-analytics .analytics-timeline-item.direction-down .analytics-timeline-marker span {
  background: #dc2626;
}

.page-analytics .analytics-timeline-item.direction-milestone .analytics-timeline-marker span {
  background: #2563eb;
}

.page-analytics .analytics-timeline-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  padding: 18px 20px;
  border-radius: 20px;
  border: 3px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  background: #fff;
}

.page-analytics .analytics-timeline-item.direction-up .analytics-timeline-card {
  background: linear-gradient(180deg, rgba(220, 252, 231, 0.72), #fff);
}

.page-analytics .analytics-timeline-item.direction-down .analytics-timeline-card {
  background: linear-gradient(180deg, rgba(254, 226, 226, 0.72), #fff);
}

.page-analytics .analytics-timeline-item.direction-milestone .analytics-timeline-card {
  background: linear-gradient(180deg, rgba(219, 234, 254, 0.72), #fff);
}

.page-analytics .analytics-timeline-main {
  display: flex;
  gap: 14px;
  min-width: 0;
  align-items: flex-start;
}

.page-analytics .analytics-timeline-copy {
  min-width: 0;
}

.page-analytics .analytics-timeline-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.page-analytics .analytics-date-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 10px;
  border: 2px solid var(--ink);
  background: #fef3c7;
  font-size: 10px;
  font-weight: 800;
}

.page-analytics .analytics-timeline-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 6px;
  border-radius: 6px;
  background: #2b3a4a;
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.page-analytics .analytics-timeline-state {
  font-size: 12px;
  font-weight: 800;
}

.page-analytics .analytics-timeline-state.state-up {
  color: #16a34a;
}

.page-analytics .analytics-timeline-state.state-down {
  color: #ef4444;
}

.page-analytics .analytics-timeline-state.state-milestone {
  color: #2563eb;
}

.page-analytics .analytics-timeline-copy h4 {
  margin: 6px 0 0;
  font-size: 16px;
  line-height: 1.35;
  color: #2b3a4a;
}

.page-analytics .analytics-timeline-metric {
  min-width: 84px;
  display: grid;
  align-content: start;
  justify-items: end;
  gap: 2px;
  padding: 8px 12px;
  border: 2px solid var(--ink);
  background: #fff;
  border-radius: 12px;
}

.page-analytics .analytics-timeline-metric strong {
  font-family: "Baloo 2", cursive;
  font-size: 22px;
  font-weight: 800;
}

.page-analytics .analytics-secondary-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.page-analytics .analytics-secondary-card {
  padding: 20px 22px;
  border-radius: 18px;
  border: 3px solid rgba(43, 58, 74, 0.1);
  background: #f8fafc;
}

.page-analytics .analytics-secondary-card.tone-green {
  border-color: rgba(43, 58, 74, 0.1);
}

.page-analytics .analytics-secondary-card.tone-blue {
  border-color: rgba(43, 58, 74, 0.1);
}

.page-analytics .analytics-secondary-card.tone-orange {
  border-color: rgba(43, 58, 74, 0.1);
}

.chart-panel {
  padding-bottom: 20px;
}

.analytics-bars {
  position: relative;
  height: 256px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  padding: 0 8px 24px;
  border-bottom: 2px dashed rgba(43, 58, 74, 0.2);
}

.analytics-bar {
  flex: 1;
  border-radius: 12px 12px 0 0;
  background: #38bdf8;
  transition: 180ms ease;
}

.analytics-bar.peak {
  position: relative;
  background: #facc15;
  border-inline: 2px solid var(--ink);
  border-top: 2px solid var(--ink);
}

.analytics-bar.peak span {
  position: absolute;
  top: -36px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  padding: 4px 8px;
  border-radius: 6px;
  background: var(--ink);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
}

.analytics-weeks {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 8px 0;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--muted);
}

.level-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: #f0f9ff;
}

.level-bubble {
  position: relative;
  width: 128px;
  height: 128px;
  margin-bottom: 24px;
  border-radius: 999px;
  border: 8px solid #fff;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.level-fill {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 65%;
  background: #38bdf8;
}

.level-bubble iconify-icon {
  position: relative;
  z-index: 1;
  font-size: 48px;
}

.level-panel h4 {
  margin: 0 0 8px;
  font-family: "Baloo 2", cursive;
  font-size: 32px;
}

.level-panel p {
  margin: 0 0 24px;
  font-size: 14px;
  color: var(--muted);
}

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

.metrics-grid-rich .stat-card {
  padding: 24px;
}

.stat-card.tone-orange {
  border-top-color: #fb923c;
}

.stat-card.tone-blue {
  border-top-color: #38bdf8;
}

.stat-card.tone-green {
  border-top-color: #4ade80;
}

.stat-card.tone-purple {
  border-top-color: #a78bfa;
}

.stat-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.stat-meta small {
  font-size: 12px;
  font-weight: 700;
}

.teacher-panel {
  position: relative;
  overflow: hidden;
  background: #fffbeb;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.teacher-copy h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  font-family: "Baloo 2", cursive;
  font-size: 32px;
}

.teacher-copy blockquote {
  margin: 0;
  font-size: 18px;
  font-style: italic;
  line-height: 1.7;
}

.teacher-card {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border-radius: 18px;
  border: 2px solid var(--ink);
  background: #fff;
}

.teacher-card img {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  border: 2px solid var(--ink);
  background: #dbeafe;
}

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

.teacher-card span {
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
}

/* 页面级定义完成后再次统一覆盖，避免被中途规则重新改回黑边硬阴影。 */
.nav-link.is-active,
.user-chip,
.user-chip-avatar,
.sidebar,
.panel,
.hero-card,
.metric-tile,
.stat-card,
.ghost-card,
.score-orb,
.login-card,
.task-entry-panel,
.task-summary-card,
.icon-button,
.task-habit-card,
.task-habit-icon,
.habit-item,
.task-row,
.draw-row,
.exam-row,
.task-card,
.note-card,
.page-exams .exam-dossier-hero,
.page-exams .exam-dossier-side .panel,
.page-exams .exam-record-panel::after,
.page-archive .archive-hero,
.page-archive .archive-main-card,
.page-archive .archive-side-card,
.page-archive .archive-profile-item,
.page-archive .archive-measurement-item,
.page-archive .archive-class-card,
.page-archive .archive-reminder-action,
.reward-filter-panel,
.reward-market-balance,
.balance-chip,
.reward-card,
.reward-media,
.reward-tag,
.reward-media-icon,
.page-analytics .analytics-diagnostic-score,
.page-analytics .analytics-overview-card,
.page-analytics .analytics-overview-icon,
.page-analytics .analytics-timeline-marker,
.page-analytics .analytics-timeline-card,
.page-analytics .analytics-timeline-metric,
.page-analytics .analytics-date-chip,
.page-analytics .analytics-filter-switch {
  border-color: var(--box-border-strong);
  box-shadow: var(--box-shadow-soft);
}

.flash-message,
.sticker,
.login-form input,
.task-entry-form input,
.task-habit-makeup-date,
.task-habit-makeup-submit,
.task-check-btn,
.page-exams .exam-form input,
.page-exams .exam-form select,
.page-exams .exam-form textarea,
.page-exams .exam-more-button,
.page-archive .archive-entry-form,
.page-archive .archive-entry-form input,
.page-archive .archive-history-button {
  border-color: var(--box-border-strong);
  background: var(--box-surface);
  box-shadow: var(--box-shadow-soft);
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@media (min-width: 701px) {
  .app-shell {
    flex-direction: row;
    align-items: stretch;
  }

  .sidebar {
    width: clamp(260px, 28vw, 320px);
    min-height: calc(100vh - 48px);
  }

  .page-tasks .hero-card,
  .page-rewards .hero-card,
  .page-analytics .hero-card,
  .page-exams .hero-card {
    flex-direction: row;
    align-items: center;
    gap: 24px;
  }

  .page-tasks .hero-card > div:first-child,
  .page-rewards .hero-card > div:first-child,
  .page-analytics .hero-card > div:first-child,
  .page-exams .hero-card > div:first-child {
    flex: 1;
    min-width: 0;
  }

  .hero-side {
    margin-left: auto;
  }

  .page-tasks .task-summary {
    width: min(280px, 100%);
    min-width: 220px;
  }

  .page-rewards .reward-hero-visual {
    min-width: 180px;
  }

  .page-analytics .analytics-summary,
  .page-exams .exam-hero-metrics {
    width: min(320px, 100%);
    min-width: 220px;
  }

}

.page-word-quiz .word-quiz-result-meta,
.page-word-quiz .word-quiz-question-order {
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.page-word-quiz .word-quiz-layout {
  display: grid;
  gap: 18px;
}

.page-word-quiz .word-quiz-hero-strip,
.page-word-quiz .word-quiz-stage-card {
  border: 1px solid var(--box-border);
  background: var(--box-surface);
  box-shadow: var(--box-shadow-soft);
}

.page-word-quiz .word-quiz-hero-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  background:
    radial-gradient(circle at top right, rgba(250, 204, 21, 0.18), transparent 30%),
    linear-gradient(180deg, rgba(255, 252, 242, 0.98) 0%, rgba(255, 248, 238, 0.98) 100%);
}

.page-word-quiz .word-quiz-hero-strip-copy {
  display: grid;
  gap: 6px;
}

.page-word-quiz .word-quiz-hero-strip h2 {
  font-size: clamp(28px, 4vw, 36px);
}

.page-word-quiz .word-quiz-hero-strip .section-copy {
  margin: 0;
}

.page-word-quiz .word-quiz-hero-strip-stickers {
  justify-content: flex-end;
  flex-wrap: wrap;
}

.page-word-quiz .word-quiz-stage-card {
  width: min(100%, 920px);
  justify-self: center;
  min-width: 0;
  padding: 20px;
}

.page-word-quiz .word-quiz-card-face {
  display: grid;
  gap: 18px;
  padding: 20px;
  border: 1px solid var(--box-border);
  border-radius: 28px;
}

.page-word-quiz .word-quiz-card-front {
  background:
    radial-gradient(circle at top left, rgba(233, 213, 255, 0.88), transparent 35%),
    linear-gradient(135deg, rgba(242, 235, 255, 0.96) 0%, rgba(229, 220, 255, 0.92) 55%, rgba(255, 255, 255, 0.96) 100%);
}

.page-word-quiz .word-quiz-card-back.is-correct {
  background: linear-gradient(135deg, rgba(220, 252, 231, 0.96) 0%, rgba(187, 247, 208, 0.92) 55%, rgba(255, 255, 255, 0.96) 100%);
}

.page-word-quiz .word-quiz-card-back.is-wrong {
  background: linear-gradient(135deg, rgba(254, 226, 226, 0.96) 0%, rgba(254, 202, 202, 0.92) 55%, rgba(255, 255, 255, 0.96) 100%);
}

.page-word-quiz .word-quiz-card-static {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.96) 100%);
}

.page-word-quiz .word-quiz-card-top,
.page-word-quiz .word-quiz-card-result-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.page-word-quiz .word-quiz-progress-dots {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.page-word-quiz .word-quiz-progress-dot {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: rgba(221, 214, 254, 0.96);
  border: 2px solid rgba(124, 58, 237, 0.12);
}

.page-word-quiz .word-quiz-progress-dot.is-done,
.page-word-quiz .word-quiz-progress-dot.is-current {
  background: #7c3aed;
}

.page-word-quiz .word-quiz-progress-dot.is-current {
  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.15);
}

.page-word-quiz .word-quiz-current-word {
  margin: 0;
  font-family: "Baloo 2", cursive;
  font-size: clamp(38px, 5.5vw, 56px);
  line-height: 1;
  color: #4c1d95;
}

.page-word-quiz .word-quiz-prompt,
.page-word-quiz .word-quiz-card-intro,
.page-word-quiz .word-quiz-result-copy,
.page-word-quiz .word-quiz-completion,
.page-word-quiz .word-quiz-idle,
.page-word-quiz .word-quiz-empty-copy {
  display: grid;
  gap: 12px;
}

.page-word-quiz .word-quiz-prompt,
.page-word-quiz .word-quiz-result-copy {
  justify-items: center;
  text-align: center;
}

.page-word-quiz .word-quiz-empty-copy p,
.page-word-quiz .word-quiz-idle p,
.page-word-quiz .word-quiz-completion p,
.page-word-quiz .word-quiz-prompt p,
.page-word-quiz .word-quiz-result-copy p,
.page-word-quiz .word-quiz-example-card p {
  margin: 0;
  color: #5f6c78;
  line-height: 1.7;
}

.page-word-quiz .word-quiz-example-translation {
  margin-top: 6px;
  font-size: 12px;
  color: #8b97a5;
}

.page-word-quiz .word-quiz-result-meaning {
  font-size: 22px;
  font-weight: 800;
  color: #243b53;
}

.page-word-quiz .word-quiz-result-picked {
  font-size: 14px;
}

.page-word-quiz .word-quiz-empty-copy code {
  display: block;
  padding: 12px 14px;
  border: 1px dashed var(--box-border-strong);
  border-radius: 18px;
  background: rgba(248, 250, 252, 0.92);
  color: #304454;
  font-size: 13px;
  line-height: 1.6;
  white-space: normal;
  word-break: break-all;
}

.page-word-quiz .word-quiz-audio {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid var(--box-border-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  color: #5b21b6;
  font: inherit;
  font-weight: 700;
}

.page-word-quiz .word-quiz-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.page-word-quiz .word-quiz-options form {
  min-width: 0;
}

.page-word-quiz .word-quiz-option {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 68px;
  padding: 15px 16px;
  border: 1px solid var(--box-border-strong);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.94) 100%);
  color: #21313f;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  text-align: left;
  box-shadow: var(--box-shadow-soft);
}

.page-word-quiz .word-quiz-option-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(196, 181, 253, 0.92);
  color: #4c1d95;
  font-family: "Baloo 2", cursive;
  font-size: 16px;
  line-height: 1;
}

.page-word-quiz .word-quiz-option-label {
  min-width: 0;
}

.page-word-quiz .word-quiz-result-badge,
.page-word-quiz .word-quiz-completion-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 18px;
  border-radius: 20px;
  border: 1px solid var(--box-border);
  background: rgba(255, 255, 255, 0.92);
  font-weight: 700;
}

.page-word-quiz .word-quiz-completion-badge {
  width: fit-content;
  color: #27414e;
}

.page-word-quiz .word-quiz-result-badge {
  padding: 8px 14px;
}

.page-word-quiz .word-quiz-card-back.is-correct .word-quiz-result-badge {
  background: #14532d;
  color: #fff;
}

.page-word-quiz .word-quiz-card-back.is-wrong .word-quiz-result-badge {
  background: #991b1b;
  color: #fff;
}

.page-word-quiz .word-quiz-example-card {
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.8);
  text-align: center;
}

.page-word-quiz .word-quiz-feedback-note {
  color: #5f6c78;
}

.page-word-quiz .word-quiz-card-back form,
.page-word-quiz .word-quiz-card-static form {
  justify-self: end;
}

.page-word-quiz .word-quiz-library-card {
  width: min(100%, 920px);
  justify-self: center;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid var(--box-border);
  background:
    radial-gradient(circle at top right, rgba(186, 230, 253, 0.35), transparent 28%),
    rgba(255, 255, 255, 0.94);
  box-shadow: var(--box-shadow-soft);
}

.page-word-quiz .word-quiz-library-copy {
  display: grid;
  gap: 4px;
}

.page-word-quiz .word-quiz-library-copy h3 {
  font-size: 22px;
}

.page-word-quiz .word-quiz-library-copy .panel-note {
  margin: 0;
  font-size: 12px;
}

.page-word-quiz .word-quiz-library-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.page-word-quiz .word-quiz-library-stats span {
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  border: 1px solid var(--box-border);
  border-radius: 14px;
  background: rgba(248, 250, 252, 0.86);
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
}

.page-word-quiz .word-quiz-library-stats strong {
  color: #243b53;
  font-family: "Baloo 2", cursive;
  font-size: 20px;
  line-height: 1;
}

.page-word-quiz .word-quiz-import-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  align-items: end;
  gap: 10px;
}

.page-word-quiz .word-quiz-file-field {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
}

.page-word-quiz .word-quiz-file-field input {
  width: 100%;
  padding: 9px 10px;
  border: 1px dashed var(--box-border-strong);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  font: inherit;
  font-size: 12px;
}

@media (min-width: 701px) and (max-width: 1099px) {
  /* 平板端保持完整页面，同时尽量压缩导航占位。 */
  .app-shell {
    gap: 16px;
    padding: 16px;
  }

  .sidebar {
    width: 96px;
    padding: 18px 14px;
    border-radius: 28px;
  }

  .sidebar-rings {
    display: none;
  }

  .user-chip {
    justify-content: center;
    padding: 10px;
    margin-bottom: 12px;
  }

  .user-chip-avatar {
    width: 42px;
    height: 42px;
  }

  .user-chip-copy span {
    display: none;
  }

  .user-chip-copy strong {
    display: none;
  }

  .brand-block {
    display: grid;
    justify-items: center;
    text-align: center;
  }

  .brand-kicker,
  .brand-copy,
  .sidebar-card .eyebrow,
  .sidebar-card .progress-track {
    display: none;
  }

  .brand-block h1 {
    font-size: 24px;
    line-height: 1.1;
  }

  .nav-list {
    gap: 10px;
    margin: 18px 0;
  }

  .nav-link {
    justify-content: center;
    padding: 14px 10px;
    font-size: 0;
    gap: 0;
  }

  .nav-link.is-active {
    transform: none;
  }

  .nav-icon {
    font-size: 22px;
  }

  .sidebar-card {
    padding: 14px 10px;
    border-radius: 20px;
    text-align: center;
  }

  .sidebar-card strong {
    margin-bottom: 0;
    font-size: 28px;
  }

  .sidebar-card-icon {
    font-size: 36px;
    top: -4px;
    right: -4px;
  }

  .logout-form {
    margin-top: 12px;
  }

  .logout-button {
    padding: 10px 8px;
    font-size: 12px;
  }

  .content {
    gap: 16px;
  }

  .page-dashboard .hero-card,
  .page-tasks .hero-card,
  .page-rewards .hero-card,
  .page-analytics .hero-card,
  .page-exams .hero-card {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(220px, 0.8fr);
    align-items: start;
    gap: 20px;
    padding: 28px;
  }

  .page-dashboard .hero-card > div:first-child,
  .page-tasks .hero-card > div:first-child,
  .page-rewards .hero-card > div:first-child,
  .page-analytics .hero-card > div:first-child,
  .page-exams .hero-card > div:first-child {
    max-width: none;
  }

  .page-dashboard .hero-card h2,
  .page-tasks .hero-card h2,
  .page-rewards .hero-card h2,
  .page-analytics .hero-card h2,
  .page-exams .hero-card h2 {
    font-size: clamp(30px, 3.8vw, 40px);
  }

  .hero-side {
    width: 100%;
    min-width: 0;
    margin-left: 0;
  }

  .page-dashboard .hero-metrics,
  .page-tasks .task-summary,
  .page-analytics .analytics-summary,
  .page-exams .exam-hero-metrics {
    width: 100%;
    min-width: 0;
    gap: 10px;
  }

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

  .page-tasks .task-summary-card,
  .page-dashboard .metric-tile,
  .page-analytics .metric-tile,
  .page-exams .exam-metric-tile {
    padding: 14px;
  }

  .page-dashboard .metric-tile strong,
  .page-tasks .task-summary-card strong,
  .page-analytics .metric-tile strong,
  .page-exams .exam-metric-tile strong {
    font-size: 24px;
  }

  .page-dashboard .metric-tile small,
  .page-tasks .task-summary-card small {
    font-size: 14px;
  }

  .page-rewards .reward-hero-visual {
    min-width: 0;
  }

  .page-rewards .gift-orb {
    width: 144px;
    height: 144px;
  }

  .page-rewards .gift-orb iconify-icon {
    font-size: 64px;
  }

  .page-rewards .reward-balance {
    flex-wrap: wrap;
    gap: 12px;
  }

  .page-analytics .analytics-summary {
    grid-template-columns: 1fr;
  }

  .page-exams .exam-hero-metrics {
    grid-template-columns: 1fr;
  }

  .page-exams .exam-hero-actions {
    gap: 10px;
  }

  .page-word-quiz .word-quiz-hero-strip {
    padding: 16px 20px;
  }

  .page-word-quiz .word-quiz-layout {
    gap: 16px;
  }

  .page-word-quiz .word-quiz-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-word-quiz .word-quiz-stage-card {
    width: 100%;
  }

  .page-word-quiz .word-quiz-library-card {
    width: 100%;
  }

  .page-dashboard .grid.two-columns,
  .reward-grid-rich,
  .metrics-grid-rich {
    grid-template-columns: 1fr;
  }

  .page-rewards .reward-layout {
    grid-template-columns: 1fr;
  }

  .page-rewards .reward-market-bar {
    align-items: start;
    justify-content: space-between;
  }

  .page-rewards .filter-pills {
    justify-content: flex-end;
  }

  .page-rewards .reward-grid-rich {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
  }

  .page-tasks .progress-panel-grid {
    display: none;
  }

  .task-entry-form {
    grid-template-columns: 1fr;
  }

  .task-board-shell {
    max-height: 360px;
  }

  .page-dashboard .panel:first-child {
    padding: 18px;
  }

  .page-dashboard .panel:first-child .panel-head {
    margin-bottom: 12px;
  }

  .page-dashboard .weekdays,
  .page-dashboard .calendar-grid {
    gap: 5px;
  }

  .page-dashboard .calendar-day {
    border-radius: 8px;
    font-size: 11px;
  }

  .page-dashboard .panel-note {
    font-size: 11px;
    margin-top: 8px;
  }
}

@media (min-width: 701px) and (max-width: 1099px) and (orientation: portrait) {
  /* 平板竖屏下首页月历进一步收紧，避免格子显空。 */
  .page-dashboard .panel:first-child {
    padding: 16px;
  }

  .page-dashboard .panel:first-child .panel-head {
    margin-bottom: 10px;
  }

  .page-dashboard .weekdays,
  .page-dashboard .calendar-grid {
    width: min(100%, 400px);
    gap: 4px;
    margin-inline: auto;
  }

  .page-dashboard .weekdays {
    margin-bottom: 4px;
  }

  .page-dashboard .weekdays span {
    font-size: 10px;
  }

  .page-dashboard .calendar-day {
    border-radius: 7px;
    font-size: 20px;
  }

  .page-rewards .reward-market-bar {
    align-items: flex-start;
    gap: 10px;
  }

  .page-rewards .reward-market-balance {
    width: fit-content;
  }

  .page-rewards .filter-pills {
    justify-content: flex-start;
  }

  .page-rewards .reward-grid-rich {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  /* 平板竖屏下任务页改为上下堆叠，避免窄宽度里双栏失衡和底部空白。 */
  .page-tasks .task-layout {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .page-tasks .task-board-shell {
    max-height: 380px;
  }

  /* 平板竖屏下 exams 保持左侧档案浏览优先，右侧收窄为辅助栏。 */
  .page-exams .exam-dossier-hero {
    gap: 10px;
    padding: 0 16px 12px;
  }

  .page-exams .exam-hero-actions {
    gap: 8px 12px;
    margin-top: 0;
  }

  .page-exams .exam-hero-button {
    min-height: 34px;
    padding: 0 12px;
  }

  .page-exams .exam-dossier-layout {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .page-exams .exam-dossier-main,
  .page-exams .exam-dossier-side {
    gap: 16px;
  }

  .page-exams .exam-record-group {
    padding-left: 20px;
  }

  .page-exams .exam-record-groups {
    gap: 14px;
  }

  .page-exams .exam-record-card {
    padding: 14px;
  }

  .page-exams .exam-subject-index {
    gap: 16px;
  }

  .page-exams .exam-subject-index-item {
    padding: 12px 0;
  }

  .page-archive .archive-hero {
    display: block;
    padding: 28px;
  }

  .page-archive .archive-layout {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .page-archive .archive-main,
  .page-archive .archive-side {
    grid-column: 1 / -1;
    gap: 16px;
  }

  .page-archive .archive-hero-copy {
    max-width: none;
  }

  .page-archive .archive-hero-visual {
    display: none;
  }

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

  .page-archive .archive-measurement-item {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    align-items: start;
  }

  .page-archive .archive-measurement-stats {
    grid-column: 1 / -1;
    justify-content: space-between;
    margin-left: 0;
    padding-left: 62px;
    gap: 12px;
  }

  .page-archive .archive-measurement-chevron {
    display: none;
  }

  .page-analytics .analytics-diagnostic-top {
    grid-template-columns: 1fr;
  }

  .page-analytics .analytics-overview-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
  }

  .page-analytics .analytics-overview-card {
    gap: 10px;
    padding: 12px 14px;
  }

  .page-analytics .analytics-overview-title {
    font-size: 14px;
  }

  .page-analytics .analytics-overview-detail {
    font-size: 11px;
    line-height: 1.45;
  }

  .page-analytics .analytics-secondary-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
  }

  .page-analytics .analytics-timeline-card {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .page-analytics .analytics-timeline-metric {
    justify-items: end;
    padding-left: 16px;
    padding-top: 8px;
    border-left: 0;
    border-top: 0;
  }
}

@media (min-width: 1100px) {
  .sidebar {
    width: 320px;
  }

  .page-rewards .reward-layout {
    grid-template-columns: 1fr;
  }

  .page-rewards .reward-grid-rich {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
  }

  .page-dashboard .content-dashboard {
    gap: 24px;
  }

  .page-dashboard .hero-card {
    flex-direction: row;
    align-items: center;
    gap: 32px;
    padding: 40px;
  }

  .page-dashboard .hero-card > div:first-child {
    flex: 1;
    max-width: 56%;
  }

  .page-dashboard .hero-metrics {
    width: 380px;
    min-width: 380px;
    gap: 16px;
  }

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

  .page-dashboard .panel {
    padding: 32px;
  }

  .page-dashboard .panel-head {
    margin-bottom: 24px;
  }

  .page-dashboard .panel:first-child {
    padding: 24px;
  }

  .page-dashboard .panel:first-child .panel-head {
    margin-bottom: 16px;
  }

  .page-dashboard .calendar-grid {
    gap: 8px;
  }

  .page-dashboard .calendar-day {
    border-radius: 10px;
    font-size: 12px;
  }

  .page-dashboard .weekdays {
    gap: 8px;
    margin-bottom: 8px;
  }

  .page-dashboard .habit-list,
  .page-dashboard .task-stack {
    gap: 16px;
  }

  .page-dashboard .habit-item {
    padding: 16px;
    gap: 16px;
    border-width: 2px;
    box-shadow: 3px 3px 0 #2b3a4a;
  }

  .page-dashboard .habit-item:hover {
    transform: translateX(4px);
  }

  .page-dashboard .habit-mark {
    width: 40px;
    height: 40px;
    border-color: #7fd7b4;
    background: rgba(127, 215, 180, 0.14);
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.82);
  }

  .page-dashboard .habit-item:not(.is-done) .habit-mark iconify-icon,
  .page-dashboard .habit-item:not(.is-done) .habit-mark {
    transition: 180ms ease;
  }

  .page-dashboard .habit-item:not(.is-done):hover .habit-mark {
    transform: scale(1.1);
  }

  .page-dashboard .habit-item:not(.is-done):hover .habit-mark {
    color: #7fd7b4;
    background: rgba(127, 215, 180, 0.2);
  }

  .page-dashboard .habit-item.is-done {
    background: linear-gradient(to right, rgba(127, 215, 180, 0.2), rgba(255, 255, 255, 0.6));
    border-color: transparent;
    box-shadow: none;
  }

  .page-dashboard .habit-item.is-done .habit-mark {
    background: linear-gradient(135deg, #7fd7b4 0%, #9ed8ff 100%);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 10px 18px rgba(127, 215, 180, 0.24);
  }

  .page-dashboard .habit-item.is-done .habit-meta strong,
  .page-dashboard .habit-item.is-done .habit-meta span,
  .page-dashboard .habit-item.is-done .habit-points {
    opacity: 0.5;
  }

  .page-dashboard .habit-item.is-done .habit-meta strong {
    text-decoration: line-through;
  }

  .page-dashboard .task-row {
    padding: 16px;
    border-width: 2px;
    box-shadow: 2px 2px 0 #2b3a4a;
  }

  .page-dashboard .todo-pill {
    padding: 6px 12px;
    font-size: 10px;
  }

  .page-dashboard .exam-reward .button-link {
    padding: 12px 20px;
    border-radius: 999px;
    border-width: 3px;
    box-shadow: 3px 3px 0 #2b3a4a;
  }

  .page-dashboard .sidebar {
    width: 320px;
    padding: 32px;
  }

  .page-dashboard .nav-link {
    padding: 16px 24px;
  }

  .page-dashboard .nav-link.is-active {
    box-shadow: 3px 3px 0 #2b3a4a;
  }

  .page-dashboard .sidebar-card {
    padding: 24px;
    border-radius: 24px;
  }

  .page-tasks .task-summary {
    width: 280px;
    min-width: 280px;
  }

  .page-tasks .progress-panel-grid {
    display: none;
  }

  .page-tasks .progress-panel-strip {
    grid-template-columns: max-content minmax(0, 1fr) max-content;
    gap: 14px;
  }

  .task-board-shell {
    max-height: 520px;
  }

  .page-rewards .reward-hero-visual {
    min-width: 220px;
  }

  .page-analytics .analytics-summary {
    width: 320px;
    min-width: 320px;
  }

  .page-exams .exam-hero-metrics {
    width: 320px;
    min-width: 320px;
  }

  .page-archive .archive-hero-visual {
    display: block;
  }
}

@media (max-width: 700px) {
  .hero-metrics,
  .hero-metrics.compact,
  .grid.two-columns,
  .task-layout,
  .exam-dossier-layout,
  .word-quiz-layout,
  .reward-layout,
  .analytics-layout,
  .metrics-grid,
  .reward-grid,
  .rule-grid {
    grid-template-columns: 1fr;
  }

  .reward-grid-rich,
  .metrics-grid-rich {
    grid-template-columns: 1fr;
  }

  .page-rewards .reward-market-bar {
    align-items: flex-start;
    gap: 10px;
  }

  .page-rewards .filter-pills {
    justify-content: flex-start;
  }

  .score-orb {
    min-width: 0;
  }

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

  .app-shell {
    padding: 16px;
    gap: 16px;
  }

  .task-entry-head {
    flex-direction: column;
    align-items: stretch;
  }

  .page-tasks .progress-panel-strip {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .page-tasks .progress-panel-summary,
  .page-tasks .progress-panel-meter {
    gap: 10px;
  }

  .page-tasks .progress-panel {
    padding: 18px 20px;
  }

  .page-tasks .progress-badge {
    top: 18px;
    right: 12px;
    transform: none;
    font-size: 58px;
  }

  .task-entry-form {
    grid-template-columns: 1fr;
  }

  .task-entry-submit {
    width: 100%;
    min-width: 0;
  }

  /* 平板和手机下任务列表在面板内部滚动，避免新增任务后整页被不断拉长。 */
  .task-board-shell {
    max-height: 320px;
    padding-right: 2px;
  }

  .page-dashboard .panel:first-child {
    padding: 18px;
  }

  .page-dashboard .panel:first-child .panel-head {
    margin-bottom: 12px;
    gap: 10px;
  }

  .page-dashboard .panel:first-child .pill.success {
    padding: 5px 10px;
    font-size: 9px;
  }

  .sidebar,
  .hero-card,
  .page-header,
  .panel {
    padding: 22px;
  }

  .hero-card h2,
  .page-header h2 {
    font-size: 36px;
  }

  .page-dashboard .weekdays,
  .page-dashboard .calendar-grid {
    gap: 4px;
  }

  .page-dashboard .weekdays {
    margin-bottom: 4px;
  }

  .page-dashboard .calendar-day {
    border-radius: 7px;
    font-size: 11px;
  }

  .page-dashboard .panel-note {
    margin-top: 8px;
    font-size: 11px;
  }

  .calendar-grid,
  .weekdays {
    gap: 8px;
  }

  .reward-balance {
    flex-wrap: wrap;
  }

  .reward-hero-visual {
    display: none;
  }

  .page-exams .exam-dossier-layout {
    grid-template-columns: 1fr;
  }

  .page-exams .exam-dossier-main,
  .page-exams .exam-dossier-side {
    gap: 16px;
  }

  .page-exams .exam-record-stats {
    grid-template-columns: 1fr;
  }

  .page-exams .exam-divider {
    display: none;
  }

  .page-exams .exam-points-box {
    justify-self: start;
    justify-items: start;
    text-align: left;
  }

  .page-exams .exam-form-grid {
    grid-template-columns: 1fr;
  }

  .page-word-quiz .word-quiz-hero-strip,
  .page-word-quiz .word-quiz-options {
    grid-template-columns: 1fr;
  }

  .page-word-quiz .word-quiz-hero-strip {
    display: grid;
    justify-items: start;
  }

  .page-word-quiz .word-quiz-stage-card,
  .page-word-quiz .word-quiz-card-face {
    padding: 18px;
  }

  .page-word-quiz .word-quiz-library-card {
    padding: 14px;
  }

  .page-word-quiz .word-quiz-library-stats,
  .page-word-quiz .word-quiz-import-form {
    grid-template-columns: 1fr;
  }

  .page-archive .archive-main-head {
    flex-direction: column;
    align-items: flex-start;
  }

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

  .page-archive .archive-hero {
    display: block;
  }

  .page-archive .archive-hero-copy {
    max-width: none;
  }

  .page-archive .archive-hero-badges {
    gap: 10px;
  }

  .page-archive .archive-hero-badge {
    font-size: 13px;
  }

  .page-archive .archive-measurement-item {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    align-items: start;
    padding: 16px;
  }

  .page-archive .archive-measurement-stats {
    grid-column: 1 / -1;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    margin-left: 0;
    padding-left: 62px;
    gap: 12px;
  }

  .page-archive .archive-measurement-stat {
    justify-items: start;
    text-align: left;
  }

  .page-archive .archive-measurement-chevron {
    display: none;
  }

  .task-create-row {
    grid-template-columns: 1fr;
  }

  .page-analytics .analytics-diagnostic-top,
  .page-analytics .analytics-secondary-metrics {
    grid-template-columns: 1fr;
  }

  .page-analytics .analytics-overview-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }

  .page-analytics .analytics-overview-card,
  .page-analytics .analytics-timeline-main {
    align-items: flex-start;
  }

  .page-analytics .analytics-overview-card {
    gap: 8px;
    padding: 10px 12px;
  }

  .page-analytics .analytics-overview-icon {
    width: 32px;
    height: 32px;
    font-size: 16px;
  }

  .page-analytics .analytics-overview-card h4 {
    font-size: 9px;
    letter-spacing: 0.08em;
  }

  .page-analytics .analytics-overview-title {
    font-size: 13px;
  }

  .page-analytics .analytics-overview-detail {
    font-size: 10px;
    line-height: 1.35;
  }

  .page-analytics .analytics-timeline-head {
    align-items: stretch;
  }

  .page-analytics .analytics-filter-switch {
    justify-content: flex-start;
  }

  .page-analytics .analytics-timeline-list {
    padding-left: 14px;
  }

  .page-analytics .analytics-timeline-marker {
    left: -30px;
  }

  .page-analytics .analytics-timeline-card {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .page-analytics .analytics-timeline-metric {
    min-width: 0;
    justify-items: start;
    padding-left: 0;
    padding-top: 12px;
    border: 2px solid var(--ink);
  }
}

@media (max-width: 560px) {
  .page-analytics .analytics-overview-grid {
    grid-template-columns: 1fr;
  }
}
