:root {
  --paper: #f7f4ed;
  --paper-deep: #efe9dc;
  --card: #fffdf8;
  --card-blue: #eaf0f8;
  --blue-soft: #e7edf7;
  --blue: #526f9f;
  --blue-deep: #2e466d;
  --ink: #283649;
  --muted: #7f8995;
  --line: rgba(67, 84, 106, 0.12);
  --sage: #5e806a;
  --sage-soft: #dce9dc;
  --sand: #e9d8c6;
  --sand-soft: #f4eadd;
  --orange: #c88357;
  --orange-soft: #f5e2d5;
  --gold: #d8a94f;
  --gold-soft: #f7ecd2;
  --danger-soft: #f6e4de;
  --shadow: 0 14px 40px rgba(48, 62, 78, 0.08);
  --shadow-soft: 0 6px 20px rgba(48, 62, 78, 0.06);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  background: #e9e6df;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% 15%, rgba(255, 255, 255, 0.7), transparent 30%),
    linear-gradient(135deg, #ebe8df 0%, #e5e9e7 55%, #dddcd7 100%);
  color: var(--ink);
  font-family:
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC",
    sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

button {
  color: inherit;
}

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

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(82, 111, 159, 0.28);
  outline-offset: 2px;
}

.desktop-atmosphere {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.atmosphere-grid {
  position: absolute;
  inset: 0;
  opacity: 0.26;
  background-image:
    linear-gradient(rgba(74, 87, 99, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(74, 87, 99, 0.08) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(to bottom, transparent, #000 25%, #000 75%, transparent);
}

.atmosphere-sun {
  position: absolute;
  top: 6vh;
  right: 8vw;
  width: 21vw;
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(255, 249, 228, 0.7);
  filter: blur(2px);
}

.atmosphere-note {
  position: absolute;
  color: rgba(41, 58, 77, 0.2);
  font-family: "STKaiti", "KaiTi", serif;
  font-size: clamp(22px, 3vw, 48px);
  letter-spacing: 0.12em;
  writing-mode: vertical-rl;
}

.atmosphere-note-one {
  left: 8vw;
  top: 24vh;
}

.atmosphere-note-two {
  right: 7vw;
  bottom: 18vh;
}

.app-shell {
  position: relative;
  width: min(100%, 480px);
  min-height: 100dvh;
  margin: 0 auto;
  overflow: hidden;
  background:
    radial-gradient(circle at 98% 2%, var(--season-glow, rgba(231, 237, 247, 0.9)), transparent 27%),
    var(--paper);
  transition: background 0.35s ease;
}

@media (min-width: 760px) {
  body {
    padding: 22px 0;
  }

  .app-shell {
    min-height: calc(100dvh - 44px);
    border-radius: 34px;
    box-shadow:
      0 40px 100px rgba(44, 58, 71, 0.16),
      0 2px 0 rgba(255, 255, 255, 0.9) inset,
      0 0 0 1px rgba(255, 255, 255, 0.55);
  }
}

.screen {
  min-height: 100dvh;
  padding-bottom: calc(96px + var(--safe-bottom));
  animation: page-in 0.3s ease both;
}

@media (min-width: 760px) {
  .screen {
    min-height: calc(100dvh - 44px);
  }
}

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

.topbar {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 66px;
  padding: 16px 20px 8px;
}

.topbar.compact {
  min-height: 58px;
  padding-bottom: 4px;
}

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

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(82, 111, 159, 0.14);
  border-radius: 11px 11px 11px 4px;
  background: rgba(255, 253, 248, 0.88);
  box-shadow: var(--shadow-soft);
}

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

.brand-copy strong {
  display: block;
  font-family: "Songti SC", "STSong", serif;
  font-size: 16px;
  letter-spacing: 0.08em;
}

.brand-copy small {
  display: block;
  margin-top: 1px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.icon-button {
  display: grid;
  width: 38px;
  height: 38px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 253, 248, 0.76);
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.icon-button:hover {
  background: #fffdf8;
  transform: translateY(-1px);
}

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

.icon-button.filled {
  border-color: transparent;
  background: var(--blue-deep);
  color: white;
}

.page-content {
  padding: 4px 18px 22px;
}

.page-heading {
  margin: 8px 2px 20px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 8px;
  color: var(--blue);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.eyebrow::before {
  width: 20px;
  height: 1px;
  background: currentColor;
  content: "";
}

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

h1,
h2,
h3 {
  font-family: "Songti SC", "STSong", "Noto Serif SC", serif;
  font-weight: 700;
}

.page-heading h1 {
  margin-bottom: 6px;
  font-size: 28px;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.page-heading p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.section {
  margin-top: 22px;
}

.section:first-child {
  margin-top: 0;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 2px 11px;
}

.section-head h2,
.section-head h3 {
  margin: 0;
  font-size: 17px;
}

.section-head p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.text-button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.text-button svg {
  width: 14px;
  height: 14px;
}

.card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(75, 91, 110, 0.08);
  border-radius: var(--radius-lg);
  background: rgba(255, 253, 248, 0.92);
  box-shadow: var(--shadow-soft);
}

.card.paper {
  background:
    linear-gradient(rgba(255, 255, 255, 0.48), rgba(255, 255, 255, 0.48)),
    repeating-linear-gradient(
      0deg,
      transparent 0,
      transparent 27px,
      rgba(82, 111, 159, 0.055) 28px
    ),
    var(--card);
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 12px 18px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: var(--blue-deep);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, filter 0.2s ease;
}

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

.button:active {
  transform: scale(0.98);
}

.button.secondary {
  border-color: var(--line);
  background: var(--card);
  color: var(--blue-deep);
}

.button.soft {
  border-color: rgba(82, 111, 159, 0.1);
  background: var(--blue-soft);
  color: var(--blue-deep);
}

.button.sage {
  background: var(--sage);
}

.button.warm {
  background: var(--orange);
}

.button.full {
  width: 100%;
}

.button.small {
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 11px;
  font-size: 11px;
}

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

.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue-deep);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
}

.pill.sage {
  background: var(--sage-soft);
  color: var(--sage);
}

.pill.warm {
  background: var(--orange-soft);
  color: #9b603b;
}

.pill.gold {
  background: var(--gold-soft);
  color: #946c24;
}

.pill.muted {
  background: #efefeb;
  color: #777e83;
}

.subtle {
  color: var(--muted);
}

.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 118px;
  min-height: 174px;
  align-items: center;
  padding: 18px 8px 16px 18px;
  background:
    radial-gradient(circle at 88% 40%, rgba(255, 255, 255, 0.8), transparent 31%),
    linear-gradient(135deg, #edf1f7 0%, #f6f2e9 74%);
}

.home-hero::after {
  position: absolute;
  right: -16px;
  bottom: -33px;
  width: 130px;
  height: 66px;
  border-radius: 50%;
  background: rgba(221, 233, 220, 0.7);
  content: "";
}

.hero-copy {
  position: relative;
  z-index: 2;
}

.hero-copy h1 {
  margin: 8px 0 8px;
  font-size: 25px;
  line-height: 1.25;
}

.hero-copy p {
  max-width: 210px;
  margin-bottom: 14px;
  color: #6f7984;
  font-size: 12px;
  line-height: 1.65;
}

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

.otter-stage {
  position: relative;
  z-index: 2;
  display: grid;
  align-self: end;
  justify-self: center;
  cursor: pointer;
  user-select: none;
}

.otter-stage.large {
  min-height: 230px;
  place-items: center;
  padding-top: 14px;
  background:
    radial-gradient(ellipse at center bottom, rgba(218, 229, 217, 0.96), transparent 63%);
}

.otter-svg {
  width: 120px;
  height: 138px;
  overflow: visible;
  filter: drop-shadow(0 12px 13px rgba(48, 63, 77, 0.09));
  transform-origin: 50% 90%;
}

.otter-stage:hover .otter-svg {
  animation: otter-wave 0.65s ease-in-out;
}

.otter-stage.is-poked .otter-svg {
  animation: otter-bounce 0.7s ease;
}

.otter-stage.large .otter-svg {
  width: 208px;
  height: 230px;
}

.otter-body {
  fill: #a77754;
}

.otter-face,
.otter-paw {
  fill: #d7b08c;
}

.otter-bib {
  fill: #f2d7b9;
}

.otter-eye {
  fill: #2b3340;
}

.otter-cheek {
  fill: #e9a592;
  opacity: 0.55;
}

.otter-sweater {
  fill: var(--blue);
}

.otter-scarf {
  fill: var(--sand);
}

.otter-book {
  fill: var(--sage-soft);
  stroke: var(--sage);
  stroke-width: 2;
}

.otter-spark {
  fill: var(--gold);
  opacity: 0;
}

.otter-stage.is-poked .otter-spark {
  animation: sparkle 0.8s ease both;
}

@keyframes otter-wave {
  0%,
  100% {
    transform: rotate(0deg);
  }
  25% {
    transform: rotate(-3deg);
  }
  55% {
    transform: rotate(4deg);
  }
  75% {
    transform: rotate(-2deg);
  }
}

@keyframes otter-bounce {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  35% {
    transform: translateY(-9px) scale(1.03);
  }
  70% {
    transform: translateY(2px) scale(0.98);
  }
}

@keyframes sparkle {
  0% {
    opacity: 0;
    transform: translateY(5px) scale(0.5);
  }
  35% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(-12px) scale(1.2);
  }
}

.pet-speech {
  position: absolute;
  z-index: 4;
  right: 4px;
  top: 8px;
  max-width: 150px;
  padding: 8px 10px;
  border: 1px solid rgba(82, 111, 159, 0.12);
  border-radius: 13px 13px 13px 4px;
  background: rgba(255, 253, 248, 0.96);
  box-shadow: var(--shadow-soft);
  color: #53606d;
  font-size: 10px;
  line-height: 1.5;
  transform-origin: 0 100%;
  animation: speech-in 0.24s ease both;
}

@keyframes speech-in {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(4px);
  }
}

.quote-strip {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 12px;
  padding: 11px 13px;
  border: 1px dashed rgba(82, 111, 159, 0.2);
  border-radius: 15px;
  background: rgba(255, 253, 248, 0.6);
}

.quote-icon {
  color: var(--orange);
  font-family: Georgia, serif;
  font-size: 28px;
  line-height: 0.8;
}

.quote-strip p {
  flex: 1;
  margin: 0;
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 14px;
  line-height: 1.55;
}

.quote-strip small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.quote-refresh {
  flex: 0 0 auto;
  padding: 5px;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.quote-refresh svg {
  width: 16px;
  height: 16px;
}

.progress-card {
  padding: 17px;
}

.progress-top {
  display: flex;
  align-items: center;
  gap: 17px;
}

.progress-ring {
  --progress: 50;
  position: relative;
  display: grid;
  width: 76px;
  height: 76px;
  flex: 0 0 76px;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--blue) calc(var(--progress) * 1%), #e5e6e1 0);
}

.progress-ring::after {
  position: absolute;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--card);
  content: "";
}

.progress-ring strong {
  position: relative;
  z-index: 1;
  font-family: Georgia, serif;
  font-size: 21px;
}

.progress-ring small {
  position: absolute;
  z-index: 1;
  bottom: 16px;
  color: var(--muted);
  font-size: 8px;
}

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

.progress-copy h3 {
  margin: 0 0 5px;
  font-size: 17px;
}

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

.growth-mini {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 12px;
}

.growth-mini-bar {
  height: 6px;
  flex: 1;
  overflow: hidden;
  border-radius: 999px;
  background: #eaebe7;
}

.growth-mini-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold), #e7c77f);
}

.growth-mini b {
  color: #8c6b2f;
  font-size: 10px;
}

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

.task-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto auto;
  min-height: 74px;
  align-items: center;
  gap: 11px;
  padding: 12px;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.task-card.is-done {
  opacity: 0.66;
}

.task-card.is-done .task-title {
  text-decoration: line-through;
  text-decoration-color: rgba(40, 54, 73, 0.3);
}

.task-index {
  display: grid;
  width: 38px;
  height: 46px;
  place-items: center;
  border-radius: 13px;
  background: var(--blue-soft);
  color: var(--blue);
  font-family: Georgia, serif;
  font-size: 15px;
}

.task-index.math {
  background: var(--sand-soft);
  color: #9d6f4b;
}

.task-index.english {
  background: var(--sage-soft);
  color: var(--sage);
}

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

.task-main h3 {
  overflow: hidden;
  margin: 0 0 4px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 10px;
}

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

.task-meta svg {
  width: 12px;
  height: 12px;
}

.task-check {
  display: grid;
  width: 30px;
  height: 30px;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(82, 111, 159, 0.22);
  border-radius: 50%;
  background: transparent;
  color: transparent;
  cursor: pointer;
}

.task-more {
  display: grid;
  width: 28px;
  height: 28px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #969da2;
  cursor: pointer;
}

.task-more:hover {
  background: rgba(67, 84, 106, 0.06);
  color: var(--ink);
}

.task-more svg {
  width: 16px;
  height: 16px;
}

.task-check svg {
  width: 16px;
  height: 16px;
}

.task-card.is-done .task-check {
  border-color: var(--sage);
  background: var(--sage);
  color: white;
}

.home-shortcuts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
}

.shortcut-card {
  min-height: 96px;
  padding: 13px 10px;
  text-align: left;
  cursor: pointer;
}

.shortcut-icon {
  display: grid;
  width: 32px;
  height: 32px;
  margin-bottom: 10px;
  place-items: center;
  border-radius: 10px;
  background: var(--blue-soft);
  color: var(--blue);
}

.shortcut-card:nth-child(2) .shortcut-icon {
  background: var(--sage-soft);
  color: var(--sage);
}

.shortcut-card:nth-child(3) .shortcut-icon {
  background: var(--gold-soft);
  color: #a87425;
}

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

.shortcut-card strong {
  display: block;
  margin-bottom: 3px;
  font-size: 12px;
}

.shortcut-card small {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.45;
}

.surprise-card {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 15px;
  background:
    radial-gradient(circle at 90% 20%, rgba(255, 255, 255, 0.9), transparent 24%),
    linear-gradient(135deg, var(--sand-soft), #f8f1e6);
}

.surprise-icon {
  display: grid;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  place-items: center;
  border-radius: 14px;
  background: white;
  box-shadow: var(--shadow-soft);
  font-size: 23px;
}

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

.surprise-copy strong {
  display: block;
  margin-bottom: 3px;
  font-size: 12px;
}

.surprise-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.bottom-nav {
  position: fixed;
  z-index: 30;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  width: min(100%, 480px);
  grid-template-columns: repeat(4, 1fr);
  min-height: 74px;
  margin: 0 auto;
  padding: 7px 10px calc(7px + var(--safe-bottom));
  border-top: 1px solid rgba(67, 84, 106, 0.08);
  background: rgba(251, 249, 243, 0.92);
  box-shadow: 0 -10px 35px rgba(50, 61, 73, 0.055);
  backdrop-filter: blur(18px);
}

@media (min-width: 760px) {
  .bottom-nav {
    bottom: 22px;
    border-radius: 0 0 34px 34px;
  }
}

.nav-item {
  position: relative;
  display: flex;
  min-height: 56px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 5px;
  border: 0;
  background: transparent;
  color: #868d94;
  font-size: 10px;
  cursor: pointer;
}

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

.nav-item.active {
  color: var(--blue-deep);
  font-weight: 700;
}

.nav-item.active::before {
  position: absolute;
  top: -8px;
  width: 25px;
  height: 2px;
  border-radius: 99px;
  background: var(--blue);
  content: "";
}

.nav-item.active svg {
  fill: rgba(82, 111, 159, 0.1);
}

.learn-hero {
  padding: 18px;
  background:
    radial-gradient(circle at 88% 15%, rgba(255, 255, 255, 0.8), transparent 28%),
    linear-gradient(140deg, #e8eff8, #f6f3eb);
}

.learn-hero h2 {
  margin: 8px 0 6px;
  font-size: 22px;
}

.learn-hero p {
  max-width: 310px;
  margin-bottom: 15px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.subject-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.subject-card {
  min-height: 152px;
  padding: 15px;
  text-align: left;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.subject-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.subject-icon {
  display: grid;
  width: 39px;
  height: 39px;
  place-items: center;
  border-radius: 13px;
  background: var(--subject-soft, var(--blue-soft));
  color: var(--subject-color, var(--blue));
}

.subject-icon svg {
  width: 20px;
  height: 20px;
}

.subject-card h3 {
  margin: 17px 0 4px;
  font-size: 16px;
}

.subject-card p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 10px;
}

.subject-progress {
  height: 5px;
  overflow: hidden;
  border-radius: 99px;
  background: #e9eae6;
}

.subject-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--subject-color, var(--blue));
}

.subject-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  color: var(--muted);
  font-size: 9px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 4px 2px 13px;
  color: var(--muted);
  font-size: 10px;
}

.breadcrumb button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--blue);
  cursor: pointer;
}

.breadcrumb svg {
  width: 12px;
  height: 12px;
}

.chapter-list {
  display: grid;
  gap: 10px;
}

.chapter-card {
  overflow: hidden;
}

.chapter-button {
  display: grid;
  width: 100%;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 14px;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.chapter-number {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 10px;
  background: var(--blue-soft);
  color: var(--blue);
  font-family: Georgia, serif;
  font-size: 12px;
}

.chapter-button strong {
  display: block;
  margin-bottom: 3px;
  font-size: 12px;
}

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

.chapter-chevron {
  color: var(--muted);
  transition: transform 0.2s ease;
}

.chapter-card.open .chapter-chevron {
  transform: rotate(180deg);
}

.chapter-chevron svg {
  width: 17px;
  height: 17px;
}

.knowledge-list {
  display: none;
  padding: 0 12px 12px;
}

.chapter-card.open .knowledge-list {
  display: grid;
  gap: 7px;
}

.knowledge-item {
  display: grid;
  width: 100%;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 11px 10px;
  border: 1px solid rgba(67, 84, 106, 0.07);
  border-radius: 13px;
  background: rgba(250, 249, 245, 0.8);
  text-align: left;
  cursor: pointer;
}

.knowledge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #c9cbc8;
}

.knowledge-item.learning .knowledge-dot {
  background: var(--orange);
}

.knowledge-item.review .knowledge-dot {
  background: var(--blue);
}

.knowledge-item.mastered .knowledge-dot {
  background: var(--sage);
}

.knowledge-copy strong {
  display: block;
  margin-bottom: 2px;
  font-size: 11px;
}

.knowledge-copy small {
  color: var(--muted);
  font-size: 9px;
}

.knowledge-arrow {
  color: #a4a9ad;
}

.knowledge-arrow svg {
  width: 15px;
  height: 15px;
}

.point-hero {
  padding: 19px;
  background:
    radial-gradient(circle at 92% 15%, rgba(255, 255, 255, 0.9), transparent 26%),
    linear-gradient(135deg, #e8eef7, #f2eee5);
}

.point-hero h1 {
  margin: 9px 0 6px;
  font-size: 25px;
}

.point-hero p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.65;
}

.mastery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.mastery-card {
  min-height: 92px;
  padding: 12px 9px;
  text-align: center;
}

.mastery-icon {
  display: grid;
  width: 30px;
  height: 30px;
  margin: 0 auto 8px;
  place-items: center;
  border-radius: 9px;
  background: var(--blue-soft);
  color: var(--blue);
}

.mastery-icon svg {
  width: 15px;
  height: 15px;
}

.mastery-card strong {
  display: block;
  margin-bottom: 2px;
  font-size: 10px;
}

.mastery-card small {
  color: var(--muted);
  font-size: 9px;
}

.evidence-card {
  padding: 16px;
}

.evidence-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line);
}

.evidence-row:last-child {
  border-bottom: 0;
}

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

.evidence-row strong {
  font-size: 11px;
  text-align: right;
}

.point-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.focus-launch {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 16px;
  background:
    linear-gradient(115deg, rgba(82, 111, 159, 0.96), rgba(47, 69, 105, 0.98)),
    var(--blue-deep);
  color: white;
}

.focus-launch-icon {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.14);
}

.focus-launch-icon svg {
  width: 22px;
  height: 22px;
}

.focus-launch-copy {
  flex: 1;
}

.focus-launch-copy strong {
  display: block;
  margin-bottom: 3px;
  font-size: 13px;
}

.focus-launch-copy small {
  color: rgba(255, 255, 255, 0.7);
  font-size: 9px;
}

.focus-launch .button {
  min-height: 36px;
  padding: 8px 12px;
  background: #fff;
  color: var(--blue-deep);
  font-size: 10px;
}

.timeline {
  display: grid;
  gap: 0;
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 10px;
  padding-bottom: 16px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item::before {
  position: absolute;
  top: 18px;
  bottom: 0;
  left: 6px;
  width: 1px;
  background: var(--line);
  content: "";
}

.timeline-item:last-child::before {
  display: none;
}

.timeline-dot {
  position: relative;
  z-index: 1;
  width: 13px;
  height: 13px;
  margin-top: 3px;
  border: 3px solid var(--card);
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 1px rgba(82, 111, 159, 0.2);
}

.timeline-copy {
  margin-top: -2px;
}

.timeline-copy strong {
  display: block;
  margin-bottom: 3px;
  font-size: 11px;
}

.timeline-copy small {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

.tabs {
  display: grid;
  grid-template-columns: repeat(4, auto);
  gap: 3px;
  margin: 8px 0 17px;
  padding: 4px;
  border: 1px solid rgba(67, 84, 106, 0.08);
  border-radius: 14px;
  background: rgba(237, 235, 228, 0.7);
}

.tab {
  min-height: 34px;
  padding: 7px 8px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  cursor: pointer;
}

.tab.active {
  background: var(--card);
  box-shadow: 0 3px 9px rgba(48, 62, 78, 0.07);
  color: var(--blue-deep);
  font-weight: 700;
}

.review-hero {
  padding: 18px;
  background:
    radial-gradient(circle at 88% 18%, rgba(255, 255, 255, 0.78), transparent 25%),
    linear-gradient(135deg, #f4eadd, #edf1e9);
}

.review-hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.review-count {
  margin: 2px 0 4px;
  color: var(--blue-deep);
  font-family: Georgia, serif;
  font-size: 38px;
  line-height: 1;
}

.review-hero h2 {
  margin-bottom: 6px;
  font-size: 20px;
}

.review-hero p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.review-hero-otter {
  width: 90px;
  height: 100px;
  flex: 0 0 90px;
}

.review-hero-otter .otter-svg {
  width: 100%;
  height: 100%;
}

.review-list {
  display: grid;
  gap: 9px;
}

.review-card {
  padding: 14px;
}

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

.review-card h3 {
  margin: 7px 0 3px;
  font-size: 14px;
}

.review-card p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.review-card-actions {
  display: flex;
  gap: 7px;
  margin-top: 12px;
}

.mistake-card {
  padding: 15px;
}

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

.mistake-subject {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--blue);
  font-size: 10px;
  font-weight: 700;
}

.mistake-subject::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.mistake-card h3 {
  margin: 0 0 8px;
  font-size: 13px;
  line-height: 1.55;
}

.mistake-insight {
  margin-top: 9px;
  padding: 10px;
  border-radius: 11px;
  background: #f5f4ef;
  color: #6e7781;
  font-size: 10px;
  line-height: 1.55;
}

.empty-state {
  padding: 34px 24px;
  text-align: center;
}

.empty-state-icon {
  display: grid;
  width: 58px;
  height: 58px;
  margin: 0 auto 13px;
  place-items: center;
  border-radius: 18px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 25px;
}

.empty-state h3 {
  margin-bottom: 6px;
  font-size: 15px;
}

.empty-state p {
  margin-bottom: 15px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.65;
}

.weekly-paper {
  padding: 19px 17px;
}

.weekly-paper h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

.weekly-paper > p {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}

.prompt {
  margin-top: 17px;
}

.prompt label {
  display: block;
  margin-bottom: 7px;
  font-size: 11px;
  font-weight: 700;
}

.prompt textarea,
.field textarea {
  width: 100%;
  min-height: 88px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.72);
  padding: 11px 12px;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.65;
}

.prompt textarea::placeholder,
.field textarea::placeholder,
.field input::placeholder {
  color: #a7aaae;
}

.suggestion-card {
  margin-top: 12px;
  padding: 13px;
  border: 1px dashed rgba(82, 111, 159, 0.2);
  border-radius: 13px;
  background: var(--blue-soft);
}

.suggestion-card strong {
  display: block;
  margin-bottom: 5px;
  color: var(--blue-deep);
  font-size: 11px;
}

.suggestion-card p {
  margin: 0;
  color: #6d7b8a;
  font-size: 10px;
  line-height: 1.6;
}

.bar-chart {
  display: grid;
  gap: 14px;
  padding: 17px;
}

.bar-row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) 31px;
  align-items: center;
  gap: 9px;
}

.bar-row span {
  font-size: 10px;
}

.bar-track {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #ecece8;
}

.bar-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
}

.bar-row:nth-child(2) .bar-track i {
  background: var(--sage);
}

.bar-row:nth-child(3) .bar-track i {
  background: var(--orange);
}

.bar-row:nth-child(4) .bar-track i {
  background: var(--gold);
}

.bar-row b {
  color: var(--muted);
  font-size: 9px;
  text-align: right;
}

.intensity-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.intensity-card {
  display: flex;
  min-height: 113px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 13px 11px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--card);
  text-align: left;
  cursor: pointer;
}

.intensity-card.selected {
  border-color: var(--blue);
  background: var(--blue-soft);
  box-shadow: 0 0 0 2px rgba(82, 111, 159, 0.09);
}

.intensity-card span {
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 700;
}

.intensity-card strong {
  margin-bottom: 6px;
  color: var(--blue-deep);
  font-family: Georgia, serif;
  font-size: 16px;
  font-weight: 500;
}

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

.roadmap-list {
  padding: 16px 14px 5px;
}

.roadmap-row {
  position: relative;
  display: grid;
  grid-template-columns: 56px 13px minmax(0, 1fr);
  gap: 10px;
  padding-bottom: 17px;
}

.roadmap-row:not(:last-child)::after {
  position: absolute;
  top: 16px;
  bottom: 0;
  left: 69px;
  width: 1px;
  background: var(--line);
  content: "";
}

.roadmap-month {
  padding-top: 1px;
  color: var(--muted);
  font-family: Georgia, serif;
  font-size: 9px;
}

.roadmap-row .timeline-dot {
  margin-top: 1px;
  border-color: var(--card);
}

.roadmap-row.current .timeline-dot {
  background: var(--orange);
  box-shadow: 0 0 0 4px var(--orange-soft);
}

.roadmap-copy h3,
.roadmap-copy strong {
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
}

.roadmap-copy p {
  margin: 0 0 5px;
  color: #6e7781;
  font-size: 9px;
  line-height: 1.6;
}

.roadmap-copy small {
  color: var(--muted);
  font-size: 8px;
  line-height: 1.5;
}

.chart-panel {
  padding: 16px;
}

.seven-days {
  display: grid;
  height: 135px;
  grid-template-columns: repeat(7, 1fr);
  align-items: end;
  gap: 7px;
}

.day-column {
  display: flex;
  height: 100%;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}

.day-bar {
  display: flex;
  width: 23px;
  height: 93px;
  align-items: flex-end;
  overflow: hidden;
  border-radius: 7px;
  background: #eeeeda;
}

.day-bar span {
  display: block;
  width: 100%;
  min-height: 5px;
  border-radius: inherit;
  background: linear-gradient(to top, var(--blue), #8fa6c8);
}

.day-column:nth-child(even) .day-bar span {
  background: linear-gradient(to top, var(--sage), #9bb5a1);
}

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

.day-column em {
  color: var(--ink);
  font-size: 8px;
  font-style: normal;
}

.insight-stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.insight-stat {
  padding: 14px;
}

.insight-stat small {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 9px;
}

.insight-stat strong {
  font-family: Georgia, serif;
  font-size: 25px;
  font-weight: 500;
}

.profile-card {
  padding: 18px;
  background:
    radial-gradient(circle at 90% 9%, rgba(255, 255, 255, 0.85), transparent 22%),
    linear-gradient(135deg, #e7eef7, #f5f0e7);
}

.profile-top {
  display: flex;
  align-items: center;
  gap: 13px;
}

.profile-avatar {
  display: grid;
  width: 53px;
  height: 53px;
  flex: 0 0 53px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 18px;
  background: rgba(255, 253, 248, 0.78);
  box-shadow: var(--shadow-soft);
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 27px;
}

.profile-name h2 {
  margin: 0 0 3px;
  font-size: 18px;
}

.profile-name p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
}

.goal-card {
  margin-top: 14px;
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.52);
}

.goal-card small {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 9px;
}

.goal-card strong {
  font-size: 12px;
}

.streak-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 9px;
  color: #718091;
  font-size: 9px;
}

.streak-note svg {
  width: 13px;
  height: 13px;
}

.menu-card {
  overflow: hidden;
}

.menu-row {
  display: flex;
  width: 100%;
  min-height: 56px;
  align-items: center;
  gap: 11px;
  padding: 11px 14px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.menu-row:last-child {
  border-bottom: 0;
}

.menu-icon {
  display: grid;
  width: 33px;
  height: 33px;
  flex: 0 0 33px;
  place-items: center;
  border-radius: 10px;
  background: var(--blue-soft);
  color: var(--blue);
}

.menu-icon.sage {
  background: var(--sage-soft);
  color: var(--sage);
}

.menu-icon.warm {
  background: var(--orange-soft);
  color: var(--orange);
}

.menu-icon.gold {
  background: var(--gold-soft);
  color: #a67a2e;
}

.menu-icon svg {
  width: 16px;
  height: 16px;
}

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

.menu-copy strong {
  display: block;
  margin-bottom: 3px;
  font-size: 11px;
}

.menu-copy small {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.menu-chevron {
  color: #a7aaad;
}

.menu-chevron svg {
  width: 16px;
  height: 16px;
}

.growth-hero {
  padding: 19px;
  text-align: center;
  background:
    radial-gradient(circle at center top, rgba(255, 255, 255, 0.92), transparent 44%),
    linear-gradient(145deg, #f7ecd2, #f4eadd);
}

.level-orbit {
  position: relative;
  display: grid;
  width: 112px;
  height: 112px;
  margin: 0 auto 11px;
  place-items: center;
  border: 1px dashed rgba(157, 116, 48, 0.28);
  border-radius: 50%;
}

.level-orbit::before {
  position: absolute;
  inset: 13px;
  border-radius: 50%;
  background: rgba(255, 253, 248, 0.86);
  box-shadow: var(--shadow-soft);
  content: "";
}

.level-orbit strong {
  position: relative;
  z-index: 1;
  font-family: Georgia, serif;
  font-size: 32px;
  font-weight: 500;
}

.growth-hero h2 {
  margin-bottom: 5px;
  font-size: 20px;
}

.growth-hero p {
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 10px;
}

.level-progress {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(128, 101, 56, 0.12);
}

.level-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #c8963e, #e4c36f);
}

.badge-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
}

.badge-card {
  min-height: 112px;
  padding: 12px 7px;
  text-align: center;
  opacity: 0.46;
}

.badge-card.unlocked {
  opacity: 1;
}

.badge-icon {
  display: grid;
  width: 44px;
  height: 44px;
  margin: 0 auto 8px;
  place-items: center;
  border-radius: 15px;
  background: #efefeb;
  filter: grayscale(1);
  font-size: 21px;
}

.badge-card.unlocked .badge-icon {
  background: var(--gold-soft);
  filter: none;
}

.badge-card strong {
  display: block;
  margin-bottom: 3px;
  font-size: 10px;
}

.badge-card small {
  color: var(--muted);
  font-size: 8px;
  line-height: 1.45;
}

.album-grid {
  display: grid;
  gap: 12px;
}

.album-card {
  position: relative;
  min-height: 150px;
  padding: 17px;
  background:
    linear-gradient(90deg, transparent 20px, rgba(201, 126, 106, 0.18) 21px, transparent 22px),
    repeating-linear-gradient(
      0deg,
      transparent 0,
      transparent 27px,
      rgba(82, 111, 159, 0.07) 28px
    ),
    #fffdf7;
}

.album-date {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 17px;
  color: var(--muted);
  font-size: 9px;
}

.album-date::before {
  width: 23px;
  height: 2px;
  background: var(--orange);
  content: "";
}

.album-card h3 {
  margin-bottom: 7px;
  font-size: 16px;
}

.album-card p {
  margin: 0;
  color: #606b76;
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 13px;
  line-height: 1.75;
}

.album-mood {
  position: absolute;
  right: 13px;
  bottom: 12px;
  font-size: 19px;
}

.room-scene {
  position: relative;
  min-height: 235px;
  overflow: hidden;
  border: 1px solid rgba(67, 84, 106, 0.08);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(to bottom, var(--room-sky, #dae6f2) 0 58%, var(--room-floor, #e8d4bd) 58%),
    #dae6f2;
  box-shadow: var(--shadow-soft);
}

.room-scene::after {
  position: absolute;
  right: -20px;
  bottom: 71px;
  left: -20px;
  height: 1px;
  background: rgba(73, 78, 78, 0.16);
  content: "";
}

.room-window {
  position: absolute;
  top: 24px;
  right: 28px;
  width: 87px;
  height: 88px;
  border: 7px solid #f5eee2;
  background:
    linear-gradient(90deg, transparent 47%, #f5eee2 47% 53%, transparent 53%),
    linear-gradient(0deg, transparent 47%, #f5eee2 47% 53%, transparent 53%),
    linear-gradient(#c7daeb, #ecf2f8);
  box-shadow: 0 6px 18px rgba(67, 84, 106, 0.08);
}

.room-desk {
  position: absolute;
  right: 25px;
  bottom: 54px;
  width: 205px;
  height: 13px;
  border-radius: 3px;
  background: #b38b6b;
  box-shadow:
    10px 10px 0 -4px #9e785c,
    170px 10px 0 -4px #9e785c;
}

.room-lamp {
  position: absolute;
  right: 45px;
  bottom: 67px;
  width: 16px;
  height: 51px;
  border-radius: 10px 10px 4px 4px;
  background: #d3af73;
  box-shadow: 0 0 25px rgba(245, 213, 143, 0.55);
}

.room-otter {
  position: absolute;
  right: 88px;
  bottom: 58px;
  z-index: 3;
}

.room-otter .otter-svg {
  width: 84px;
  height: 95px;
}

.room-sofa {
  position: absolute;
  left: 22px;
  bottom: 55px;
  width: 135px;
  height: 64px;
  border-radius: 18px 18px 7px 7px;
  background: #b7c8ba;
  box-shadow: 0 9px 0 #a5b8a8;
}

.room-sofa::before,
.room-sofa::after {
  position: absolute;
  bottom: -16px;
  width: 8px;
  height: 18px;
  border-radius: 4px;
  background: #8d745e;
  content: "";
}

.room-sofa::before {
  left: 15px;
}

.room-sofa::after {
  right: 15px;
}

.decor {
  position: absolute;
  display: grid;
  place-items: center;
  font-size: 28px;
  filter: drop-shadow(0 4px 5px rgba(51, 63, 72, 0.1));
}

.decor.plant {
  left: 13px;
  bottom: 65px;
}

.decor.books {
  right: 143px;
  bottom: 67px;
  font-size: 23px;
}

.decor.lamp {
  right: 26px;
  bottom: 67px;
  font-size: 34px;
}

.decor.pillow {
  left: 39px;
  bottom: 90px;
}

.decor.garland {
  top: 18px;
  left: 25px;
  font-size: 21px;
}

.decor.placeholder {
  opacity: 0.38;
  filter: grayscale(0.75);
}

.decor-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.decor-card {
  padding: 13px;
}

.decor-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.decor-emoji {
  font-size: 25px;
}

.decor-card h3 {
  margin: 0 0 4px;
  font-size: 11px;
}

.decor-card p {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

.theme-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
}

.theme-card {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--card);
  text-align: center;
  cursor: pointer;
}

.theme-card.active {
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgba(82, 111, 159, 0.12);
}

.theme-swatch {
  width: 100%;
  height: 34px;
  margin-bottom: 6px;
  border-radius: 8px;
  background: var(--theme-preview);
}

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

.setting-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
}

.setting-row:last-child {
  border-bottom: 0;
}

.setting-copy {
  flex: 1;
}

.setting-copy strong {
  display: block;
  margin-bottom: 3px;
  font-size: 11px;
}

.setting-copy small {
  color: var(--muted);
  font-size: 9px;
}

.switch {
  position: relative;
  width: 42px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #d9dad6;
  cursor: pointer;
  transition: background 0.2s ease;
}

.switch::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 2px 5px rgba(42, 51, 59, 0.15);
  content: "";
  transition: transform 0.2s ease;
}

.switch.on {
  background: var(--sage);
}

.switch.on::after {
  transform: translateX(18px);
}

.field {
  margin-bottom: 14px;
}

.field label {
  display: block;
  margin-bottom: 6px;
  color: #62707e;
  font-size: 10px;
  font-weight: 700;
}

.field input,
.field select {
  width: 100%;
  height: 43px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.8);
  padding: 0 12px;
  color: var(--ink);
  font-size: 12px;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.modal-backdrop {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  background: rgba(31, 40, 52, 0.32);
  backdrop-filter: blur(5px);
  animation: fade-in 0.22s ease both;
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
}

.sheet {
  width: min(100%, 480px);
  max-height: 92dvh;
  overflow-y: auto;
  padding: 8px 18px calc(22px + var(--safe-bottom));
  border-radius: 28px 28px 0 0;
  background: var(--paper);
  box-shadow: 0 -24px 60px rgba(27, 37, 50, 0.16);
  animation: sheet-up 0.3s cubic-bezier(0.2, 0.85, 0.28, 1) both;
}

@media (min-width: 760px) {
  .modal-backdrop {
    align-items: center;
    padding: 22px;
  }

  .sheet {
    max-height: calc(100dvh - 44px);
    border-radius: 28px;
  }
}

@keyframes sheet-up {
  from {
    opacity: 0.6;
    transform: translateY(60px);
  }
}

.sheet-handle {
  width: 37px;
  height: 4px;
  margin: 3px auto 15px;
  border-radius: 99px;
  background: #d1d1cc;
}

.sheet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 17px;
}

.sheet-head h2 {
  margin: 0 0 4px;
  font-size: 21px;
}

.sheet-head p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.sheet-close {
  display: grid;
  width: 33px;
  height: 33px;
  flex: 0 0 33px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(69, 83, 97, 0.07);
  cursor: pointer;
}

.sheet-close svg {
  width: 17px;
  height: 17px;
}

.sheet-actions {
  display: flex;
  gap: 9px;
  margin-top: 19px;
}

.sheet-actions .button {
  flex: 1;
}

.choice-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.choice {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  color: var(--muted);
  font-size: 10px;
  cursor: pointer;
}

.choice.active {
  border-color: var(--blue);
  background: var(--blue-soft);
  color: var(--blue-deep);
  font-weight: 700;
}

.focus-overlay {
  position: fixed;
  z-index: 120;
  inset: 0;
  display: flex;
  justify-content: center;
  overflow-y: auto;
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 255, 255, 0.94), transparent 26%),
    linear-gradient(160deg, #eaf0f7, #f5f0e7 54%, #dfe9df);
  animation: fade-in 0.3s ease both;
}

.focus-screen {
  position: relative;
  width: min(100%, 480px);
  min-height: 100dvh;
  padding: 20px 19px calc(25px + var(--safe-bottom));
}

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

.focus-mode-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--blue);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.focus-mode-label::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--sage);
  box-shadow: 0 0 0 4px rgba(94, 128, 106, 0.12);
  content: "";
}

.focus-close {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  cursor: pointer;
}

.focus-title {
  margin: 19px 0 6px;
  text-align: center;
}

.focus-title small {
  color: var(--muted);
  font-size: 10px;
}

.focus-title h1 {
  margin: 6px 0;
  font-size: 25px;
}

.focus-title p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
}

.focus-otter {
  position: relative;
  display: grid;
  height: 228px;
  place-items: end center;
}

.focus-otter::after {
  position: absolute;
  bottom: 14px;
  width: 210px;
  height: 42px;
  border-radius: 50%;
  background: rgba(119, 143, 124, 0.14);
  content: "";
}

.focus-otter .otter-svg {
  position: relative;
  z-index: 1;
  width: 180px;
  height: 204px;
}

.focus-timer-wrap {
  display: grid;
  place-items: center;
  margin-top: 0;
}

.focus-timer {
  position: relative;
  display: grid;
  width: 210px;
  height: 210px;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--blue) calc(var(--timer-progress) * 1%), rgba(255, 255, 255, 0.54) 0);
  box-shadow: 0 19px 50px rgba(60, 78, 97, 0.1);
}

.focus-timer::before {
  position: absolute;
  inset: 10px;
  border-radius: inherit;
  background: rgba(247, 244, 237, 0.94);
  content: "";
}

.focus-time {
  position: relative;
  z-index: 1;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 48px;
  letter-spacing: 0.03em;
}

.focus-time small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-family: "PingFang SC", sans-serif;
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-align: center;
}

.focus-controls {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 19px;
}

.focus-controls button {
  min-width: 94px;
}

.focus-note {
  margin-top: 18px;
  padding: 12px;
  border: 1px solid rgba(67, 84, 106, 0.08);
  border-radius: 14px;
  background: rgba(255, 253, 248, 0.56);
  color: var(--muted);
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
}

.love-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 9px;
}

.long-paper {
  padding: 18px;
  background:
    repeating-linear-gradient(
      0deg,
      transparent 0,
      transparent 27px,
      rgba(82, 111, 159, 0.06) 28px
    ),
    #fffdf8;
}

.long-paper h2 {
  margin-bottom: 8px;
  font-size: 21px;
}

.long-paper p,
.long-paper li {
  color: #5e6974;
  font-size: 11px;
  line-height: 1.75;
}

.long-paper ul {
  margin: 10px 0;
  padding-left: 18px;
}

.celebrate {
  position: fixed;
  z-index: 200;
  inset: 0;
  display: grid;
  padding: 20px;
  place-items: center;
  background: rgba(247, 244, 237, 0.92);
  backdrop-filter: blur(8px);
  text-align: center;
  animation: fade-in 0.25s ease;
}

.celebrate-card {
  width: min(100%, 360px);
  padding: 29px 20px 22px;
  border-radius: 28px;
  background: var(--card);
  box-shadow: var(--shadow);
  animation: celebrate-in 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.2) both;
}

@keyframes celebrate-in {
  from {
    opacity: 0;
    transform: scale(0.86) translateY(12px);
  }
}

.celebrate-emoji {
  display: block;
  margin-bottom: 13px;
  font-size: 52px;
}

.celebrate-card h2 {
  margin-bottom: 7px;
  font-size: 22px;
}

.celebrate-card p {
  margin-bottom: 17px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.65;
}

.celebrate-stats {
  display: flex;
  justify-content: center;
  gap: 23px;
  margin-bottom: 20px;
}

.celebrate-stat strong {
  display: block;
  margin-bottom: 3px;
  font-family: Georgia, serif;
  font-size: 21px;
}

.celebrate-stat small {
  color: var(--muted);
  font-size: 9px;
}

.confetti {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.confetti i {
  position: absolute;
  top: -15px;
  width: 7px;
  height: 12px;
  border-radius: 2px;
  background: var(--confetti-color);
  animation: confetti-fall var(--duration) linear infinite;
  animation-delay: var(--delay);
  left: var(--left);
}

@keyframes confetti-fall {
  to {
    transform: translateY(110vh) rotate(420deg);
  }
}

.toast {
  position: fixed;
  z-index: 300;
  right: 50%;
  bottom: calc(92px + var(--safe-bottom));
  max-width: min(85vw, 370px);
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  background: rgba(39, 52, 69, 0.94);
  box-shadow: 0 12px 30px rgba(33, 43, 55, 0.22);
  color: white;
  font-size: 11px;
  line-height: 1.5;
  opacity: 0;
  pointer-events: none;
  transform: translate(50%, 10px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast.show {
  opacity: 1;
  transform: translate(50%, 0);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.hide {
  display: none !important;
}

.muted-divider {
  width: 1px;
  height: 11px;
  background: var(--line);
}

.inline {
  display: inline;
}

.nowrap {
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
