:root {
  --bg: #eef7e5;
  --bg-deep: #e3f1d3;
  --app: #fbfdf7;
  --panel: #fffefa;
  --panel-soft: #f6faee;
  --ink: #353b32;
  --ink-soft: #777d70;
  --ink-faint: #a7aa9b;
  --line: #e9ecdf;
  --line-strong: #dfe5d3;
  --green: #86bd88;
  --green-deep: #65a46b;
  --green-soft: #e1f0d9;
  --pink: #f3b5bc;
  --pink-soft: #fde7e8;
  --yellow: #f5d788;
  --yellow-soft: #fbf0cc;
  --blue: #c4e2ef;
  --blue-soft: #e6f5fb;
  --brown: #9a7353;
  --accent: #78b77d;
  --accent-strong: #5f9e66;
  --accent-soft: #e3f1dc;
  --accent-wash: rgba(120, 183, 125, .15);
  --accent-rgb: 120, 183, 125;
  --shadow: 0 12px 30px rgba(86, 118, 75, .09);
  --shadow-sm: 0 4px 13px rgba(86, 118, 75, .07);
  --radius: 24px;
  --radius-sm: 16px;
  --app-width: 520px;
  --header-h: 74px;
}

body[data-theme="sakura"] {
  --bg: #fceff1;
  --bg-deep: #f6e3e8;
  --app: #fffaf9;
  --panel-soft: #fdf5f5;
  --line: #f2e7e9;
  --line-strong: #eadbde;
}

body[data-theme="sky"] {
  --bg: #eaf5f7;
  --bg-deep: #dbedf0;
  --app: #f9fdfc;
  --panel-soft: #f3faf9;
  --line: #e3eeeb;
  --line-strong: #d9e6e2;
}

body[data-theme="peach"] {
  --bg: #fbf1e4;
  --bg-deep: #f5e4d2;
  --app: #fffbf6;
  --panel-soft: #fcf7ee;
  --line: #f0e8dd;
  --line-strong: #e9ded1;
}

body[data-accent="coral"] {
  --accent: #e9958d;
  --accent-strong: #d6766f;
  --accent-soft: #fae7e4;
  --accent-wash: rgba(233, 149, 141, .15);
  --accent-rgb: 233, 149, 141;
}

body[data-accent="lavender"] {
  --accent: #a997d1;
  --accent-strong: #8874b1;
  --accent-soft: #eee9f7;
  --accent-wash: rgba(169, 151, 209, .15);
  --accent-rgb: 169, 151, 209;
}

body[data-accent="sky"] {
  --accent: #72bdd8;
  --accent-strong: #519db9;
  --accent-soft: #e4f3f8;
  --accent-wash: rgba(114, 189, 216, .14);
  --accent-rgb: 114, 189, 216;
}

body[data-accent="butter"] {
  --accent: #dbbc62;
  --accent-strong: #b99a41;
  --accent-soft: #f9efd0;
  --accent-wash: rgba(219, 188, 98, .15);
  --accent-rgb: 219, 188, 98;
}

body[data-effective-scheme="dark"] {
  --bg: #1c261b;
  --bg-deep: #263526;
  --app: #20291f;
  --panel: #293328;
  --panel-soft: #303b2e;
  --ink: #f2f5ed;
  --ink-soft: #bdc7b7;
  --ink-faint: #879281;
  --line: #3b4738;
  --line-strong: #485543;
  --pink-soft: #473330;
  --yellow-soft: #433d28;
  --blue-soft: #293b41;
  --green-soft: color-mix(in srgb, var(--accent) 18%, #293328);
  --accent-soft: color-mix(in srgb, var(--accent) 19%, #293328);
  --accent-wash: color-mix(in srgb, var(--accent) 12%, transparent);
  --brown: #caae8e;
  --shadow: 0 16px 35px rgba(0,0,0,.2);
  --shadow-sm: 0 4px 14px rgba(0,0,0,.14);
}

body[data-effective-scheme="dark"][data-theme="sakura"] {
  --bg: #2b1e22;
  --bg-deep: #3a292e;
  --app: #2c2225;
  --panel: #36292c;
  --panel-soft: #3d3032;
}

body[data-effective-scheme="dark"][data-theme="sky"] {
  --bg: #17262a;
  --bg-deep: #20353a;
  --app: #1c292d;
  --panel: #263439;
  --panel-soft: #2c3c40;
}

body[data-effective-scheme="dark"][data-theme="peach"] {
  --bg: #2d241b;
  --bg-deep: #3a2f21;
  --app: #2b241e;
  --panel: #372e26;
  --panel-soft: #3e352b;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  min-height: 100%;
  background: var(--bg-deep);
}

body {
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 10%, color-mix(in srgb, var(--green) 21%, transparent) 0 12%, transparent 35%),
    radial-gradient(circle at 90% 30%, color-mix(in srgb, var(--blue) 28%, transparent) 0 9%, transparent 31%),
    linear-gradient(145deg, var(--bg), var(--bg-deep));
  font-family: "Avenir Next", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  transition: background .3s ease, color .3s ease;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(var(--accent-rgb), .28);
  outline-offset: 2px;
}

svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

[hidden] {
  display: none !important;
}

::-webkit-scrollbar {
  width: 0;
}

.backdrop {
  position: fixed;
  z-index: -1;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.cloud {
  position: absolute;
  border-radius: 999px;
  background: rgba(255,255,255,.62);
  filter: blur(.2px);
}

.cloud::before,
.cloud::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: inherit;
}

.cloud::before {
  width: 54%;
  height: 150%;
  left: 15%;
  bottom: 10%;
}

.cloud::after {
  width: 44%;
  height: 120%;
  right: 12%;
  bottom: 15%;
}

.cloud-a {
  top: 8%;
  left: 5%;
  width: 130px;
  height: 35px;
}

.cloud-b {
  top: 18%;
  right: 4%;
  width: 90px;
  height: 25px;
  opacity: .75;
}

.cloud-c {
  bottom: 16%;
  left: 12%;
  width: 110px;
  height: 28px;
  opacity: .62;
}

.leaf {
  position: absolute;
  width: 120px;
  height: 180px;
  border-radius: 80% 10% 80% 10%;
  border: 2px solid rgba(112, 160, 98, .18);
}

.leaf-a {
  left: -70px;
  bottom: 15%;
  transform: rotate(18deg);
}

.leaf-b {
  right: -75px;
  bottom: 35%;
  transform: scaleX(-1) rotate(18deg);
}

.app-frame {
  position: relative;
  width: min(100%, var(--app-width));
  min-height: 100vh;
  margin: 0 auto;
  overflow: hidden;
  background:
    radial-gradient(circle at 92% 3%, rgba(202, 230, 239, .75), transparent 22%),
    linear-gradient(180deg, color-mix(in srgb, var(--app) 93%, var(--green) 7%), var(--app) 42%);
  box-shadow: 0 0 70px rgba(69, 101, 59, .1);
  transition: background .3s ease;
}

.app-frame::before,
.app-frame::after {
  content: "";
  position: absolute;
  z-index: 0;
  pointer-events: none;
  border-radius: 50%;
  background: color-mix(in srgb, var(--green) 7%, transparent);
}

.app-frame::before {
  width: 230px;
  height: 230px;
  right: -100px;
  top: 240px;
}

.app-frame::after {
  width: 180px;
  height: 180px;
  left: -110px;
  bottom: 220px;
}

.app-header {
  position: sticky;
  z-index: 40;
  top: 0;
  height: var(--header-h);
  padding: 10px 19px;
  display: grid;
  grid-template-columns: 42px 1fr 88px;
  align-items: center;
  background: color-mix(in srgb, var(--app) 84%, transparent);
  backdrop-filter: blur(16px);
}

.header-button {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--ink-soft);
  background: color-mix(in srgb, var(--panel) 86%, transparent);
  cursor: pointer;
}

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

.back-button {
  visibility: hidden;
}

body:not([data-page="home"]) .back-button {
  visibility: visible;
}

body:not([data-page="home"]) .page-heading span {
  display: none;
}

.page-heading {
  display: grid;
  justify-items: start;
  line-height: 1.15;
}

.page-heading h1 {
  font-family: "STKaiti", "KaiTi", "PingFang SC", serif;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: .06em;
}

.page-heading span {
  margin-top: 2px;
  color: var(--ink-soft);
  font-size: 9px;
}

body:not([data-page="home"]) .page-heading {
  justify-items: center;
}

body[data-page] .page-heading h1 {
  font-size: 18px;
}

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

.app-main {
  position: relative;
  z-index: 1;
  padding: 0 16px calc(93px + env(safe-area-inset-bottom, 0px));
}

.page {
  display: none;
  animation: pageIn .28s ease;
}

.page.active {
  display: block;
}

@keyframes pageIn {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}

.home-hero {
  position: relative;
  min-height: 168px;
  padding: 20px 4px 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.home-greeting h2 {
  font-family: "STKaiti", "KaiTi", "PingFang SC", serif;
  font-size: 22px;
  letter-spacing: .02em;
}

.home-greeting p {
  margin-top: 7px;
  color: var(--ink-soft);
  font-size: 11px;
}

.hidden-name,
.plan-hidden-data {
  display: none;
}

.home-sheep-wrap {
  position: absolute;
  top: -9px;
  right: -4px;
  width: 169px;
  height: 168px;
}

.home-sheep {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 154px;
  height: 120px;
  object-fit: cover;
  object-position: center;
  mix-blend-mode: multiply;
  -webkit-mask-image: radial-gradient(ellipse 64% 62% at 51% 51%, #000 58%, transparent 84%);
  mask-image: radial-gradient(ellipse 64% 62% at 51% 51%, #000 58%, transparent 84%);
}

.speech-bubble {
  position: absolute;
  z-index: 2;
  right: 14px;
  bottom: 79px;
  max-width: 132px;
  padding: 6px 9px;
  border: 1px solid #e7e5d7;
  border-radius: 999px;
  color: var(--ink-soft);
  background: rgba(255,255,255,.94);
  font-size: 8px;
  box-shadow: var(--shadow-sm);
}

.daily-plan-card {
  position: relative;
  z-index: 2;
  margin-top: -15px;
  padding: 18px 18px 17px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.95);
  border-radius: 25px;
  background:
    radial-gradient(circle at 0 100%, rgba(203, 230, 185, .36), transparent 25%),
    var(--panel);
  box-shadow: var(--shadow);
}

.daily-plan-card::after {
  content: "❀";
  position: absolute;
  right: 16px;
  bottom: 12px;
  color: rgba(135, 184, 114, .32);
  font-size: 21px;
}

.plan-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.target-badge {
  width: 33px;
  height: 33px;
  flex: 0 0 33px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #df6d74;
  background: var(--pink-soft);
}

.target-badge svg {
  width: 21px;
  height: 21px;
}

.plan-card-head h3 {
  font-family: "STKaiti", "KaiTi", "PingFang SC", serif;
  font-size: 16px;
}

.level-select {
  margin-top: 2px;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  border: none;
  color: var(--ink-soft);
  background: transparent;
  font-size: 11px;
  cursor: pointer;
}

.level-select svg {
  width: 13px;
  height: 13px;
}

.goal-number {
  margin: 15px 0 11px;
  display: flex;
  align-items: baseline;
  gap: 5px;
}

.goal-number strong {
  color: var(--ink);
  font-size: 44px;
  font-weight: 850;
  line-height: .9;
}

.goal-number span,
.goal-number small {
  color: var(--ink-soft);
  font-size: 13px;
}

.goal-number b {
  color: var(--ink-soft);
  font-size: 20px;
}

.plan-progress-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.plan-progress {
  flex: 1;
  height: 11px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8ebdf;
}

.plan-progress span {
  width: 0;
  height: 100%;
  display: block;
  border-radius: inherit;
  background: linear-gradient(90deg, color-mix(in srgb, var(--green) 74%, white), var(--green));
  transition: width .45s ease;
}

.plan-progress-row > b {
  min-width: 35px;
  color: var(--ink-soft);
  font-size: 11px;
  text-align: right;
}

.main-pill-button {
  min-height: 44px;
  padding: 0 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid rgba(255,255,255,.32);
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, #8cc68e, #72b579);
  box-shadow: 0 8px 18px rgba(104, 164, 108, .2);
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
}

body[data-accent] .main-pill-button {
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 85%, white), var(--accent-strong));
  box-shadow: 0 8px 18px rgba(var(--accent-rgb), .22);
}

.daily-plan-card > .main-pill-button {
  width: 68%;
  margin: 15px auto 0;
  display: flex;
}

.play-circle {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.68);
  border-radius: 50%;
  font-size: 7px;
}

.quick-stats {
  margin-top: 13px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.quick-stat {
  min-height: 95px;
  padding: 12px 8px;
  display: grid;
  place-items: center;
  align-content: center;
  border: 1px solid rgba(255,255,255,.95);
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
  text-align: center;
}

.quick-stat.mint {
  background: #f5faeb;
}

.quick-stat.blue {
  background: #edf8fb;
}

.quick-stat.yellow {
  background: #fff9e6;
}

.quick-icon {
  margin-bottom: 4px;
  color: var(--green-deep);
  font-size: 22px;
}

.quick-stat.blue .quick-icon {
  color: #719eb0;
}

.quick-stat.yellow .quick-icon {
  color: #d7ae49;
}

.quick-stat b {
  font-size: 18px;
}

.quick-stat small {
  margin-top: 2px;
  color: var(--ink-soft);
  font-size: 9px;
}

.section-heading {
  margin: 23px 3px 12px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.section-heading.compact {
  margin-top: 0;
}

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

.section-heading p {
  margin-top: 3px;
  color: var(--ink-faint);
  font-size: 9px;
}

.text-link {
  padding: 3px;
  border: none;
  color: var(--ink-soft);
  background: transparent;
  font-size: 10px;
  cursor: pointer;
}

.soft-label {
  display: block;
  margin-bottom: 4px;
  color: var(--accent-strong);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .12em;
}

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

.level-card {
  position: relative;
  min-height: 108px;
  padding: 11px 9px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.92);
  border-radius: 16px;
  background: color-mix(in srgb, var(--level-color) 14%, var(--panel));
  box-shadow: var(--shadow-sm);
  text-align: center;
  cursor: pointer;
}

.level-card:hover,
.level-card.active {
  border-color: color-mix(in srgb, var(--level-color) 58%, var(--line));
}

.level-card.active::after {
  content: "✓";
  position: absolute;
  top: 5px;
  right: 7px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  color: #fff;
  background: color-mix(in srgb, var(--level-color) 78%, #6c9c6c);
  font-size: 9px;
  line-height: 16px;
}

.level-emoji {
  width: 35px;
  height: 35px;
  margin: 0 auto 6px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #fff;
  background: color-mix(in srgb, var(--level-color) 82%, white);
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 3px 8px color-mix(in srgb, var(--level-color) 25%, transparent);
}

.level-card h4 {
  font-size: 11px;
  line-height: 1.25;
}

.level-card p {
  margin-top: 3px;
  color: var(--ink-faint);
  font-size: 8px;
  line-height: 1.35;
}

.level-card b {
  color: var(--ink-soft);
}

.level-card-progress {
  color: var(--ink-faint);
  font-size: 8px;
}

.home-review-card {
  margin-top: 20px;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel);
  box-shadow: var(--shadow-sm);
}

.home-review-card h3 {
  font-size: 13px;
}

.home-review-card h3 b {
  color: var(--accent-strong);
}

.home-review-card p {
  margin-top: 4px;
  color: var(--ink-faint);
  font-size: 8px;
  line-height: 1.5;
}

.review-pill,
.outline-button,
.ghost-pill {
  min-height: 36px;
  padding: 0 15px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  color: var(--ink-soft);
  background: var(--panel-soft);
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}

.home-chart-card {
  margin-top: 20px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel);
  box-shadow: var(--shadow-sm);
}

.reading-entry-card {
  width: 100%;
  margin-top: 18px;
  padding: 13px 14px;
  display: flex;
  align-items: center;
  gap: 11px;
  border: 1px solid #e7eadb;
  border-radius: 18px;
  color: var(--ink);
  background:
    radial-gradient(circle at 90% 20%, rgba(197, 229, 208, .46), transparent 31%),
    var(--panel);
  box-shadow: var(--shadow-sm);
  text-align: left;
  cursor: pointer;
}

.reading-entry-icon {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--green-deep);
  background: var(--green-soft);
}

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

.reading-entry-copy {
  min-width: 0;
  flex: 1;
  display: grid;
  gap: 2px;
}

.reading-entry-copy small {
  color: var(--green-deep);
  font-size: 8px;
  font-weight: 800;
}

.reading-entry-copy b {
  overflow: hidden;
  font-size: 11px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.reading-entry-copy i {
  overflow: hidden;
  color: var(--ink-faint);
  font-size: 8px;
  font-style: normal;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.reading-entry-arrow {
  color: var(--ink-faint);
  font-size: 19px;
}

.week-chart {
  width: 100%;
  height: 118px;
  margin-top: 8px;
  overflow: visible;
}

.chart-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  color: var(--ink-faint);
  font-size: 8px;
  text-align: center;
}

.study-setup-hero,
.library-intro {
  margin-top: 10px;
  padding: 18px;
  min-height: 125px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow-sm);
}

.shelf-tabs {
  margin: 9px 0 12px;
  padding: 4px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
}

.shelf-tabs button {
  min-height: 35px;
  border: none;
  border-radius: 10px;
  color: var(--ink-soft);
  background: transparent;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}

.shelf-tabs button.active {
  color: var(--green-deep);
  background: var(--green-soft);
}

.shelf-pane {
  display: none;
  animation: pageIn .22s ease;
}

.shelf-pane.active {
  display: block;
}

.study-setup-hero h2,
.library-intro h2,
.settings-intro h2 {
  font-family: "STKaiti", "KaiTi", "PingFang SC", serif;
  font-size: 22px;
  line-height: 1.3;
}

.study-setup-hero p,
.library-intro p,
.settings-intro p {
  margin-top: 6px;
  color: var(--ink-soft);
  font-size: 9px;
  line-height: 1.55;
}

.study-setup-hero img,
.library-intro img {
  width: 105px;
  height: 88px;
  object-fit: cover;
  mix-blend-mode: multiply;
  -webkit-mask-image: radial-gradient(ellipse 62% 60% at 50% 52%, #000 58%, transparent 85%);
  mask-image: radial-gradient(ellipse 62% 60% at 50% 52%, #000 58%, transparent 85%);
}

.mode-grid {
  margin-top: 13px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.mode-card {
  padding: 12px;
  display: grid;
  grid-template-columns: 34px 1fr;
  grid-template-rows: auto auto;
  column-gap: 9px;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--ink);
  background: var(--panel);
  text-align: left;
  cursor: pointer;
}

.mode-card.active {
  border-color: var(--green);
  background: var(--green-soft);
}

.mode-card > span {
  width: 34px;
  height: 34px;
  grid-row: span 2;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--green-deep);
  background: #fff;
  font-size: 16px;
}

.mode-card b {
  align-self: end;
  font-size: 11px;
}

.mode-card small {
  color: var(--ink-faint);
  font-size: 8px;
}

.session-summary {
  margin-top: 13px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow-sm);
}

.tiny-badge {
  padding: 5px 8px;
  border-radius: 999px;
  color: var(--ink-soft);
  background: var(--panel-soft);
  font-size: 8px;
}

.session-metrics {
  margin: 15px 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.session-metrics > div {
  padding: 11px 12px;
  display: grid;
  gap: 5px;
  border-radius: 13px;
  background: var(--panel-soft);
}

.session-metrics span {
  color: var(--ink-faint);
  font-size: 8px;
}

.session-metrics b {
  font-size: 13px;
}

.session-summary > .main-pill-button {
  width: 100%;
}

.goal-stepper {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.goal-stepper button {
  width: 24px;
  height: 24px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--ink-soft);
  background: var(--panel);
  cursor: pointer;
}

.goal-stepper b {
  min-width: 22px;
  text-align: center;
}

.round-back {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--ink-soft);
  background: var(--panel);
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
}

.study-topline {
  margin: 6px 0 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

#btnExitStudy {
  display: none;
}

.study-progress-meta {
  flex: 1;
}

.study-progress-meta > div:first-child {
  margin-bottom: 5px;
  display: flex;
  justify-content: space-between;
  color: var(--ink-soft);
  font-size: 8px;
}

.study-progress {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8eadd;
}

.study-progress span {
  width: 0;
  height: 100%;
  display: block;
  border-radius: inherit;
  background: var(--green);
  transition: width .3s ease;
}

.little-streak {
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  font-size: 11px;
}

.little-streak b {
  margin-left: 3px;
  font-size: 9px;
}

.word-card {
  min-height: 410px;
  padding: 17px;
  border: 1px solid rgba(255,255,255,.95);
  border-radius: 25px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

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

.level-chip {
  padding: 5px 9px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  background: var(--panel-soft);
  font-size: 9px;
}

.word-level-pill {
  padding: 5px 9px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--green-deep);
  background: var(--green-soft);
  font-size: 8px;
}

.speaker-button {
  width: 33px;
  height: 33px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--green-deep);
  background: var(--green-soft);
  cursor: pointer;
}

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

body.is-speaking .speaker-button,
body.is-speaking .tiny-speaker {
  animation: speakerPulse .7s ease-in-out infinite alternate;
}

@keyframes speakerPulse {
  from { box-shadow: 0 0 0 0 rgba(var(--accent-rgb), .24); }
  to { box-shadow: 0 0 0 7px rgba(var(--accent-rgb), 0); }
}

.study-word-main {
  min-height: 128px;
  padding: 17px 7px 11px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.study-word-main h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(41px, 11vw, 54px);
  font-weight: 700;
  letter-spacing: -.035em;
}

.study-phonetic {
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--ink-soft);
  font-family: Georgia, serif;
  font-size: 12px;
}

.tiny-speaker {
  border: none;
  color: var(--green-deep);
  background: transparent;
  font-size: 15px;
}

.pos-chip {
  margin-top: 8px;
  padding: 4px 8px;
  border-radius: 7px;
  color: #568f5d;
  background: var(--green-soft);
  font-size: 8px;
  font-weight: 750;
}

.reveal-front {
  padding: 15px 3px 4px;
  text-align: center;
}

.dotted-line {
  margin-bottom: 14px;
  border-top: 1px dashed var(--line-strong);
}

.reveal-front p {
  margin-bottom: 12px;
  color: var(--ink-faint);
  font-size: 9px;
}

.soft-pill {
  width: 100%;
  min-height: 37px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  color: var(--green-deep);
  background: var(--panel-soft);
  font-size: 10px;
  cursor: pointer;
}

.word-detail {
  animation: pageIn .22s ease;
}

.translation-box {
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 12px;
  background: var(--green-soft);
}

.translation-box > span {
  color: var(--green-deep);
  font-size: 8px;
  font-weight: 700;
}

.translation-box > b {
  flex: 1;
  font-size: 13px;
}

.translation-box > button {
  border: none;
  color: var(--green-deep);
  background: transparent;
  font-size: 8px;
  cursor: pointer;
}

.example-card {
  position: relative;
  margin-top: 13px;
  padding: 14px 34px 14px 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
}

.example-card p {
  color: var(--ink-soft);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 13px;
  line-height: 1.7;
}

.example-card button {
  position: absolute;
  right: 9px;
  bottom: 10px;
  border: none;
  color: var(--green-deep);
  background: transparent;
}

.word-extra {
  margin-top: 11px;
  border-top: 1px dashed var(--line);
}

.word-extra summary {
  padding: 10px 0 7px;
  color: var(--ink-soft);
  font-size: 9px;
  cursor: pointer;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.detail-panel {
  padding: 10px;
  border-radius: 11px;
  background: var(--panel-soft);
}

.detail-panel > span {
  display: block;
  margin-bottom: 7px;
  color: var(--ink-faint);
  font-size: 8px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.chips span,
.collocation-list span {
  color: var(--ink-soft);
  font-family: Georgia, serif;
  font-size: 9px;
}

.chips span {
  padding: 4px 6px;
  border-radius: 6px;
  background: var(--panel);
}

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

.choice-box {
  margin-top: 12px;
}

.choice-box > p {
  margin-bottom: 9px;
  color: var(--ink-soft);
  font-size: 9px;
  text-align: center;
}

.choice-list {
  display: grid;
  gap: 7px;
}

.choice-option {
  min-height: 43px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink-soft);
  background: var(--panel-soft);
  font-size: 10px;
  text-align: left;
  cursor: pointer;
}

.choice-option.correct {
  border-color: var(--green);
  color: var(--green-deep);
  background: var(--green-soft);
}

.choice-option.wrong {
  border-color: #e9a39f;
  color: #bc655f;
  background: var(--pink-soft);
}

.study-answer-bar {
  margin-top: 13px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.rating-button {
  min-height: 61px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 2px;
  border: 1px solid transparent;
  border-radius: 17px;
  cursor: pointer;
}

.rating-button span {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 13px;
}

.rating-button b {
  font-size: 10px;
}

.rating-button.unknown {
  color: #b95f5d;
  background: #fbdcdb;
}

.rating-button.unknown span {
  background: rgba(201, 102, 99, .12);
}

.rating-button.fuzzy {
  color: #a0833e;
  background: var(--yellow-soft);
}

.rating-button.fuzzy span {
  background: rgba(209, 178, 85, .14);
}

.rating-button.know {
  color: #4f9256;
  background: var(--green-soft);
}

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

.session-complete {
  margin: 20px 0;
  padding: 25px 18px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--panel);
  box-shadow: var(--shadow);
  text-align: center;
}

.reader-intro {
  margin-top: 9px;
  padding: 20px 17px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    radial-gradient(circle at 93% 18%, rgba(195, 229, 237, .68), transparent 31%),
    var(--panel);
  box-shadow: var(--shadow-sm);
}

.reader-intro h2 {
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 23px;
  line-height: 1.35;
}

.reader-intro p {
  margin-top: 6px;
  color: var(--ink-soft);
  font-size: 9px;
  line-height: 1.65;
}

.reader-intro-actions {
  margin-top: 13px;
  display: flex;
  gap: 8px;
}

.reader-intro-actions > * {
  flex: 1;
}

.novel-list-heading {
  align-items: center;
}

.novel-shelf {
  display: grid;
  gap: 8px;
}

.novel-card {
  padding: 11px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: var(--shadow-sm);
}

.novel-card.active {
  border-color: color-mix(in srgb, var(--green) 55%, var(--line));
  background: color-mix(in srgb, var(--green) 5%, var(--panel));
}

.novel-card-cover {
  width: 36px;
  height: 47px;
  flex: 0 0 36px;
  display: grid;
  place-items: center;
  border-radius: 5px 9px 9px 5px;
  color: var(--green-deep);
  background: linear-gradient(145deg, var(--green-soft), #fff8eb);
  font-size: 17px;
}

.novel-card-main {
  min-width: 0;
  flex: 1;
}

.novel-card-main b {
  display: block;
  overflow: hidden;
  font-size: 11px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.novel-card-main small {
  display: block;
  margin-top: 3px;
  color: var(--ink-faint);
  font-size: 8px;
}

.novel-card-actions {
  display: flex;
  gap: 4px;
}

.novel-card-actions button {
  width: 27px;
  height: 27px;
  border: none;
  border-radius: 8px;
  color: var(--ink-soft);
  background: var(--panel-soft);
  font-size: 11px;
  cursor: pointer;
}

.reader-panel {
  margin-top: 13px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.reader-empty-state {
  min-height: 520px;
  padding: 38px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--panel);
  box-shadow: var(--shadow-sm);
  text-align: center;
}

.reader-empty-state img {
  width: 160px;
  height: 130px;
  margin-bottom: 8px;
  object-fit: cover;
  mix-blend-mode: multiply;
  -webkit-mask-image: radial-gradient(ellipse 62% 60% at 50% 52%, #000 58%, transparent 84%);
  mask-image: radial-gradient(ellipse 62% 60% at 50% 52%, #000 58%, transparent 84%);
}

.reader-empty-state h2 {
  margin-top: 3px;
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 23px;
}

.reader-empty-state p {
  max-width: 290px;
  margin: 8px 0 16px;
  color: var(--ink-soft);
  font-size: 9px;
  line-height: 1.65;
}

.reader-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.reader-panel-head h2 {
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 21px;
}

.reader-panel-head p {
  margin-top: 4px;
  color: var(--ink-faint);
  font-size: 8px;
}

.reader-toolbar {
  margin: 12px -16px 0;
  padding: 9px 16px;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--panel-soft);
}

.reader-toolbar button {
  min-width: 31px;
  height: 29px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink-soft);
  background: var(--panel);
  font-size: 9px;
  cursor: pointer;
}

.reader-toolbar button.active {
  color: #fff;
  border-color: var(--green);
  background: var(--green);
}

.reader-content {
  min-height: 250px;
  max-height: 49vh;
  padding: 18px 4px;
  overflow-y: auto;
  color: var(--ink);
  font-family: "Noto Serif SC", "Songti SC", "SimSun", serif;
  font-size: var(--reader-font-size, 18px);
  line-height: var(--reader-line-height, 2);
}

.reader-page-bar {
  padding: 11px 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  border-top: 1px dashed var(--line);
}

.reader-page-bar button {
  min-height: 32px;
  padding: 0 10px;
  font-size: 8px;
}

.reader-page-bar button:last-child {
  justify-self: end;
}

.reader-page-bar span {
  color: var(--ink-faint);
  font-size: 8px;
}

.reader-original-actions {
  padding: 9px 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 5px;
  border-top: 1px dashed var(--line);
}

.reader-original-actions button {
  min-height: 31px;
  padding: 0 4px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink-soft);
  background: var(--panel-soft);
  font-size: 8px;
  cursor: pointer;
}

.reader-original-actions button:hover {
  border-color: var(--green);
  color: var(--green-deep);
}

.reader-content.continuous-reading {
  min-height: 290px;
  max-height: 50vh;
}

body.reader-focus .app-header,
body.reader-focus .bottom-nav,
body.reader-focus .reader-panel-head,
body.reader-focus .reader-toolbar,
body.reader-focus .reader-page-bar,
body.reader-focus .reader-original-actions,
body.reader-focus .reader-panel-foot {
  opacity: .1;
  pointer-events: none;
  transition: opacity .25s ease;
}

body.reader-focus .app-main {
  padding-top: 10px;
}

body.reader-focus .reader-panel {
  min-height: 94vh;
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
}

body.reader-focus .reader-content {
  min-height: calc(94vh - 18px);
  max-height: calc(94vh - 18px);
  padding: 9vh 8px;
  background: color-mix(in srgb, var(--app) 96%, white);
  border-radius: 24px;
}

.reader-progress-block {
  min-width: 130px;
  flex: 1;
}

.reader-progress-block > div {
  height: 5px;
  margin-top: 5px;
  overflow: hidden;
  border-radius: 99px;
  background: var(--line);
}

.reader-progress-block i {
  width: 0;
  height: 100%;
  display: block;
  border-radius: inherit;
  background: var(--green);
  transition: width .25s ease;
}

.reader-content p {
  margin-bottom: 1em;
  text-indent: 2em;
}

.reader-word {
  padding: 1px 2px;
  border: none;
  border-bottom: 1px dashed var(--green);
  border-radius: 3px;
  color: var(--green-deep);
  background: transparent;
  font-family: Georgia, serif;
  font-size: .96em;
  font-weight: 650;
  cursor: pointer;
}

.reader-word.learned {
  background: var(--green-soft);
}

.reader-content.english-only .reader-cn {
  display: none;
}

.reader-panel-foot {
  padding-top: 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid var(--line);
}

.reader-panel-foot span {
  color: var(--ink-faint);
  font-size: 8px;
}

.reader-panel-foot button {
  min-height: 30px;
  padding: 0 10px;
  font-size: 8px;
}

.avatar-settings {
  margin-top: 13px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.avatar-settings > img {
  width: 72px;
  height: 72px;
  flex: 0 0 72px;
  object-fit: cover;
  border: 2px solid #d7e9c9;
  border-radius: 50%;
  background: var(--green-soft);
}

.avatar-settings > div {
  flex: 1;
}

.avatar-settings p {
  color: var(--ink-soft);
  font-size: 8px;
  line-height: 1.55;
}

.avatar-choices {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.avatar-choices button {
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  background: var(--panel-soft);
  font-size: 8px;
  cursor: pointer;
}

.avatar-choices button.active {
  border-color: var(--green);
  color: var(--green-deep);
  background: var(--green-soft);
}

.avatar-upload {
  min-height: 29px;
  margin-top: 7px;
  padding: 0 9px;
  font-size: 8px;
}

.novel-editor h2 {
  margin-top: 4px;
  margin-bottom: 15px;
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 23px;
}

.toc-sheet {
  max-height: 78vh;
}

.toc-sheet h2 {
  margin: 5px 0 13px;
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 23px;
}

.toc-list {
  display: grid;
  gap: 6px;
}

.toc-list button {
  padding: 10px 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink-soft);
  background: var(--panel-soft);
  font-size: 9px;
  text-align: left;
  cursor: pointer;
}

.toc-list button.active {
  border-color: var(--green);
  color: var(--green-deep);
  background: var(--green-soft);
}

.toc-list small {
  color: var(--ink-faint);
  font-size: 8px;
}

.novel-field {
  margin-bottom: 12px;
  display: grid;
  gap: 5px;
}

.novel-field span {
  color: var(--ink-soft);
  font-size: 9px;
  font-weight: 650;
}

.novel-field input,
.novel-field textarea {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
  color: var(--ink);
  background: var(--panel-soft);
  font-size: 10px;
}

.novel-field textarea {
  min-height: 180px;
  resize: vertical;
  line-height: 1.7;
}

.session-complete img {
  width: 155px;
  height: 120px;
  object-fit: cover;
  mix-blend-mode: multiply;
  -webkit-mask-image: radial-gradient(ellipse 62% 60% at 50% 52%, #000 58%, transparent 84%);
  mask-image: radial-gradient(ellipse 62% 60% at 50% 52%, #000 58%, transparent 84%);
}

.session-complete h2 {
  margin-top: 5px;
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 23px;
}

.session-complete > p {
  margin-top: 6px;
  color: var(--ink-soft);
  font-size: 9px;
}

.complete-grid {
  margin: 17px 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}

.complete-grid div {
  padding: 10px 5px;
  display: grid;
  gap: 2px;
  border-radius: 12px;
  background: var(--panel-soft);
}

.complete-grid b {
  color: var(--green-deep);
  font-size: 21px;
}

.complete-grid span {
  color: var(--ink-faint);
  font-size: 8px;
}

.complete-actions {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.complete-actions > * {
  flex: 1;
}

.library-intro {
  margin-top: 9px;
  background:
    radial-gradient(circle at 90% 35%, rgba(229, 239, 192, .7), transparent 28%),
    var(--panel);
}

.library-list {
  margin-top: 13px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.library-list .level-card {
  min-height: 87px;
  padding: 11px;
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 1px 9px;
  align-items: center;
  text-align: left;
}

.library-list .level-emoji {
  width: 38px;
  height: 38px;
  grid-row: span 3;
  margin: 0;
  border-radius: 11px;
  font-size: 11px;
}

.library-list .level-card h4 {
  font-size: 12px;
}

.library-list .level-card p {
  margin: 0;
}

.library-list .level-card-progress {
  position: static;
  justify-self: start;
  padding: 3px 7px;
  border-radius: 999px;
  color: var(--ink-soft);
  background: rgba(255,255,255,.58);
}

.outline-button.full {
  width: 100%;
  margin-top: 13px;
}

.word-browser {
  margin-top: 13px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel);
  box-shadow: var(--shadow-sm);
}

.word-browser summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  list-style: none;
  cursor: pointer;
}

.word-browser summary::-webkit-details-marker {
  display: none;
}

.word-browser summary > div {
  display: grid;
  gap: 2px;
}

.word-browser summary b {
  font-size: 12px;
}

.word-browser summary > span {
  color: var(--ink-faint);
  font-size: 8px;
}

.search-box {
  margin-top: 12px;
  min-height: 37px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  border-radius: 10px;
  background: var(--panel-soft);
}

.search-box svg {
  width: 15px;
  height: 15px;
  color: var(--ink-faint);
}

.search-box input,
.big-search input,
.small-input {
  min-width: 0;
  flex: 1;
  border: none;
  outline: none;
  color: var(--ink);
  background: transparent;
}

.search-box input {
  font-size: 9px;
}

.word-list {
  margin-top: 11px;
  display: grid;
  gap: 6px;
}

.word-row {
  padding: 9px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  background: var(--panel-soft);
  text-align: left;
  cursor: pointer;
}

.word-row-main {
  min-width: 0;
  flex: 1;
}

.word-row b {
  font-family: Georgia, serif;
  font-size: 11px;
}

.word-row p {
  margin-top: 2px;
  overflow: hidden;
  color: var(--ink-faint);
  font-size: 8px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.word-row-status {
  width: 21px;
  height: 21px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: var(--ink-faint);
  background: var(--panel);
  font-size: 8px;
}

.word-row-status.mastered {
  color: #fff;
  background: var(--green);
}

.load-more {
  width: 100%;
  margin-top: 8px;
}

.review-tabs {
  margin: 10px 0 13px;
  padding: 4px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--panel);
}

.review-tabs button {
  height: 35px;
  border: none;
  border-radius: 11px;
  color: var(--ink-soft);
  background: transparent;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}

.review-tabs button.active {
  color: var(--ink);
  background: var(--panel-soft);
  box-shadow: var(--shadow-sm);
}

.review-feature {
  padding: 17px;
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 13px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel);
  box-shadow: var(--shadow-sm);
}

.review-empty-art {
  position: relative;
  height: 113px;
}

.review-empty-art img {
  position: absolute;
  right: -3px;
  bottom: -8px;
  width: 105px;
  height: 95px;
  object-fit: cover;
  mix-blend-mode: multiply;
  -webkit-mask-image: radial-gradient(ellipse 65% 58% at 48% 56%, #000 55%, transparent 84%);
  mask-image: radial-gradient(ellipse 65% 58% at 48% 56%, #000 55%, transparent 84%);
}

.clipboard {
  position: absolute;
  z-index: 2;
  top: 2px;
  left: 5px;
  width: 55px;
  height: 66px;
  padding-top: 17px;
  border: 3px solid #d8b174;
  border-radius: 8px;
  color: #79b27c;
  background: #fff9e7;
  box-shadow: 4px 5px 0 #e4c98f;
  font-size: 24px;
  text-align: center;
}

.clipboard::before {
  content: "";
  position: absolute;
  top: -7px;
  left: 14px;
  width: 23px;
  height: 11px;
  border: 3px solid #d8b174;
  border-radius: 5px;
  background: #f4d797;
}

.review-feature-copy h2 {
  font-size: 13px;
}

.review-feature-copy p {
  margin: 5px 0 10px;
  color: var(--ink-soft);
  font-size: 8px;
  line-height: 1.55;
}

.review-feature-copy .main-pill-button {
  min-height: 37px;
}

.review-list {
  margin-top: 10px;
  display: grid;
  gap: 7px;
}

.review-list:empty {
  display: none;
}

.review-item {
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}

.review-item > span {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--green-deep);
  background: var(--green-soft);
  font-size: 8px;
}

.review-item div {
  min-width: 0;
  flex: 1;
}

.review-item b {
  font-family: Georgia, serif;
  font-size: 11px;
}

.review-item small {
  display: block;
  margin-top: 2px;
  color: var(--ink-faint);
  font-size: 8px;
}

.review-item time {
  color: var(--ink-faint);
  font-size: 8px;
}

.review-data-heading {
  align-items: center;
}

.review-orb-count {
  color: var(--ink-faint);
  font-size: 8px;
}

.review-orb-count b {
  color: var(--green-deep);
  font-size: 18px;
}

.memory-section,
.review-chart-card {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel);
}

.memory-stages {
  display: grid;
  gap: 8px;
}

.memory-stage-row {
  display: grid;
  grid-template-columns: 51px 1fr 22px;
  align-items: center;
  gap: 7px;
  color: var(--ink-soft);
  font-size: 8px;
}

.memory-stage-track {
  height: 6px;
  overflow: hidden;
  border-radius: 99px;
  background: var(--line);
}

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

.memory-stage-row b {
  color: var(--ink);
  text-align: right;
}

.profile-hero {
  margin-top: 8px;
  padding: 17px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 23px;
  background:
    radial-gradient(circle at 92% 10%, rgba(190, 229, 241, .85), transparent 30%),
    var(--panel);
  box-shadow: var(--shadow-sm);
}

.avatar-frame {
  width: 83px;
  height: 83px;
  flex: 0 0 83px;
  overflow: hidden;
  border: 2px solid #d6e8c8;
  border-radius: 50%;
  background: #f4f9e9;
}

.avatar-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 66%;
}

.profile-hero h2 {
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 22px;
}

.profile-hero .level-chip {
  margin-top: 5px;
  color: var(--green-deep);
  background: var(--green-soft);
}

.achievement-card {
  margin-top: 13px;
  padding: 15px;
  border: 1px solid var(--yellow);
  border-radius: 20px;
  background: #fffaf0;
}

body[data-effective-scheme="dark"] .achievement-card {
  background: #352f23;
}

.achievement-title {
  display: flex;
  align-items: center;
  gap: 6px;
}

.achievement-title h3 {
  font-size: 12px;
}

.achievement-stats {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.achievement-stats div {
  padding: 0 9px;
  border-right: 1px solid #eee5ce;
  display: grid;
  gap: 2px;
}

.achievement-stats div:first-child {
  padding-left: 0;
}

.achievement-stats div:last-child {
  border-right: none;
}

.achievement-stats span {
  color: var(--ink-faint);
  font-size: 8px;
}

.achievement-stats b {
  font-size: 20px;
}

.achievement-stats small {
  color: var(--ink-faint);
  font-size: 8px;
}

.profile-menu {
  margin-top: 13px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel);
  box-shadow: var(--shadow-sm);
}

.profile-menu button {
  width: 100%;
  min-height: 51px;
  padding: 0 14px;
  display: grid;
  grid-template-columns: 27px 1fr 18px;
  align-items: center;
  gap: 8px;
  border: none;
  border-bottom: 1px dashed var(--line);
  color: var(--ink);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.profile-menu button:last-child {
  border-bottom: none;
}

.profile-menu button > span {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--green-deep);
  background: var(--green-soft);
  font-size: 13px;
}

.profile-menu button:nth-child(2) > span {
  color: #c76c6c;
  background: var(--pink-soft);
}

.profile-menu button:nth-child(3) > span {
  color: #6d99ab;
  background: var(--blue-soft);
}

.profile-menu button:nth-child(4) > span {
  color: #749eb1;
  background: var(--blue-soft);
}

.profile-menu b {
  font-size: 10px;
  font-weight: 650;
}

.profile-menu i {
  color: var(--ink-faint);
  font-style: normal;
  font-size: 17px;
}

.profile-plan-card,
.heatmap-card,
.trend-card {
  margin-top: 13px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel);
  box-shadow: var(--shadow-sm);
}

.profile-plan-body {
  display: flex;
  align-items: center;
  gap: 15px;
}

.plan-ring {
  position: relative;
  width: 104px;
  height: 104px;
  flex: 0 0 104px;
  display: grid;
  place-items: center;
}

.plan-ring svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.plan-ring circle {
  fill: none;
  stroke: var(--line);
  stroke-width: 8;
  stroke-linecap: round;
}

.plan-ring circle:last-child {
  stroke: var(--green);
  stroke-dasharray: 308;
  stroke-dashoffset: 308;
  transition: stroke-dashoffset .5s ease;
}

.plan-ring > div {
  display: grid;
  text-align: center;
}

.plan-ring b {
  font-size: 20px;
}

.plan-ring span {
  color: var(--ink-faint);
  font-size: 8px;
}

.profile-plan-copy {
  flex: 1;
  display: grid;
  gap: 6px;
}

.profile-plan-copy p {
  color: var(--ink-soft);
  font-size: 8px;
  line-height: 1.5;
}

.profile-plan-copy div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--ink-faint);
  font-size: 8px;
}

.profile-plan-copy b {
  color: var(--ink);
}

.heatmap {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
}

.heatmap span {
  aspect-ratio: 1;
  border-radius: 4px;
  background: var(--line);
}

.heatmap span[data-level="1"] { background: color-mix(in srgb, var(--green) 24%, var(--line)); }
.heatmap span[data-level="2"] { background: color-mix(in srgb, var(--green) 46%, var(--line)); }
.heatmap span[data-level="3"] { background: color-mix(in srgb, var(--green) 68%, var(--line)); }
.heatmap span[data-level="4"] { background: var(--green); }

.stats-chart {
  width: 100%;
  height: 155px;
  overflow: visible;
}

.stats-days {
  padding: 0 18px;
}

.profile-bottom-decor {
  margin-top: 16px;
  padding: 13px;
  display: flex;
  justify-content: center;
  gap: 4px;
  border-top: 1px dashed var(--line-strong);
  color: var(--ink-faint);
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 10px;
}

.profile-bottom-decor b {
  color: var(--pink);
}

.settings-intro {
  margin: 10px 3px 15px;
}

.settings-card {
  margin-bottom: 11px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel);
  box-shadow: var(--shadow-sm);
}

.settings-card > h3 {
  font-size: 13px;
}

.theme-picker {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.theme-option {
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--panel-soft);
  text-align: left;
  cursor: pointer;
}

.theme-option span {
  height: 50px;
  margin-bottom: 5px;
  display: block;
  border-radius: 9px;
}

.theme-option.mint span { background: radial-gradient(circle at 25% 25%, #e8f5d7, transparent 35%), linear-gradient(145deg, #f9fcf4, #dcedd1); }
.theme-option.sakura span { background: radial-gradient(circle at 75% 25%, #fbe1e7, transparent 36%), linear-gradient(145deg, #fff9fa, #f5e1e7); }
.theme-option.sky span { background: radial-gradient(circle at 25% 25%, #d9eff5, transparent 38%), linear-gradient(145deg, #f9fdfd, #dceef1); }
.theme-option.peach span { background: radial-gradient(circle at 75% 20%, #f9e3cb, transparent 36%), linear-gradient(145deg, #fffaf5, #f4e3d4); }

.theme-option b {
  padding: 0 3px 2px;
  display: block;
  color: var(--ink-soft);
  font-size: 9px;
}

.theme-option.active {
  border-color: var(--green);
  box-shadow: 0 0 0 2px var(--accent-wash);
}

.accent-picker {
  margin-top: 14px;
  display: flex;
  gap: 10px;
}

.accent-dot {
  width: 30px;
  height: 30px;
  border: 3px solid var(--panel);
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--line);
  cursor: pointer;
}

.accent-dot.mint { background: #78b77d; }
.accent-dot.coral { background: #e9958d; }
.accent-dot.lavender { background: #a997d1; }
.accent-dot.sky { background: #72bdd8; }
.accent-dot.butter { background: #dbbc62; }
.accent-dot.active { box-shadow: 0 0 0 2px var(--ink); }

.scheme-picker {
  margin-top: 14px;
  padding: 4px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-radius: 12px;
  background: var(--panel-soft);
}

.scheme-picker button {
  height: 31px;
  border: none;
  border-radius: 9px;
  color: var(--ink-faint);
  background: transparent;
  font-size: 9px;
  cursor: pointer;
}

.scheme-picker button.active {
  color: var(--ink);
  background: var(--panel);
  box-shadow: var(--shadow-sm);
}

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

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

.setting-row > div {
  display: grid;
  gap: 3px;
}

.setting-row b {
  font-size: 10px;
}

.setting-row small {
  color: var(--ink-faint);
  font-size: 8px;
}

.toggle {
  position: relative;
  width: 41px;
  height: 24px;
  flex: 0 0 41px;
  border: none;
  border-radius: 99px;
  background: var(--line-strong);
  cursor: pointer;
}

.toggle span {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 5px rgba(0,0,0,.12);
  transition: transform .2s ease;
}

.toggle[aria-pressed="true"] {
  background: var(--green);
}

.toggle[aria-pressed="true"] span {
  transform: translateX(17px);
}

.small-input {
  width: 90px;
  height: 32px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel-soft);
  font-size: 9px;
}

.data-actions {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.danger-button {
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid #efd8d5;
  border-radius: 12px;
  color: #b56561;
  background: var(--pink-soft);
  font-size: 9px;
  cursor: pointer;
}

.tiny-note {
  margin-top: 10px;
  color: var(--ink-faint);
  font-size: 8px;
}

.bottom-nav {
  position: fixed;
  z-index: 50;
  bottom: 0;
  left: 50%;
  width: min(100%, var(--app-width));
  height: calc(70px + env(safe-area-inset-bottom, 0px));
  padding: 6px 9px env(safe-area-inset-bottom, 0px);
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  border-top: 1px solid rgba(235, 237, 225, .9);
  background: color-mix(in srgb, var(--app) 92%, transparent);
  backdrop-filter: blur(18px);
  transform: translateX(-50%);
}

.bottom-nav button {
  position: relative;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--ink-faint);
  background: transparent;
  cursor: pointer;
}

.bottom-nav button > span {
  width: 26px;
  height: 23px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  font-size: 16px;
}

.bottom-nav button.active {
  color: var(--green-deep);
}

.bottom-nav button.active > span {
  color: #fff;
  background: var(--green);
}

.bottom-nav b {
  font-size: 7px;
  font-weight: 700;
}

.nav-badge {
  position: absolute;
  top: 1px;
  right: calc(50% - 22px);
  min-width: 15px;
  height: 15px;
  padding: 0 4px;
  border-radius: 99px;
  color: #fff;
  background: #e48d88;
  font-size: 7px;
  font-style: normal;
  line-height: 15px;
}

.sheet-mask {
  position: fixed;
  z-index: 100;
  inset: 0;
  padding: 18px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(40, 52, 35, .24);
  backdrop-filter: blur(4px);
}

.word-sheet,
.search-sheet {
  position: relative;
  width: min(100%, var(--app-width));
  max-height: 88vh;
  padding: 20px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 26px 26px 0 0;
  background: var(--panel);
  box-shadow: 0 -20px 60px rgba(31, 48, 27, .16);
  animation: sheetUp .25s ease;
}

@keyframes sheetUp {
  from { transform: translateY(24px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.sheet-close {
  position: absolute;
  top: 13px;
  right: 13px;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 9px;
  color: var(--ink-faint);
  background: var(--panel-soft);
  font-size: 17px;
  cursor: pointer;
}

.sheet-close.static {
  position: static;
}

.word-sheet-top {
  padding-right: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.word-sheet > h2 {
  margin-top: 13px;
  font-family: Georgia, serif;
  font-size: 35px;
}

.modal-phonetic {
  margin: 2px 0 7px;
  color: var(--ink-faint);
  font-family: Georgia, serif;
  font-size: 11px;
}

.word-sheet .translation-box {
  margin-top: 13px;
}

.sheet-actions {
  margin-top: 15px;
  display: flex;
  gap: 8px;
}

.sheet-actions > * {
  flex: 1;
}

.search-mask {
  align-items: flex-start;
  padding-top: 10vh;
}

.search-sheet {
  border-radius: 24px;
}

.search-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 15px;
}

.search-title-row h2 {
  font-size: 19px;
}

.big-search {
  min-height: 44px;
  margin-top: 14px;
  padding: 0 11px;
  display: flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-soft);
}

.big-search svg {
  width: 16px;
  height: 16px;
  color: var(--ink-faint);
}

.big-search input {
  font-size: 11px;
}

.big-search kbd {
  padding: 2px 5px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--ink-faint);
  font-size: 7px;
}

.search-results {
  margin-top: 11px;
  display: grid;
  gap: 6px;
}

.search-result {
  padding: 9px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-soft);
  text-align: left;
  cursor: pointer;
}

.search-result b {
  font-family: Georgia, serif;
  font-size: 11px;
}

.search-result p {
  margin-top: 2px;
  color: var(--ink-faint);
  font-size: 8px;
}

.empty-block {
  padding: 18px;
  border-radius: 13px;
  color: var(--ink-faint);
  background: var(--panel-soft);
  font-size: 9px;
  line-height: 1.6;
  text-align: center;
}

.spell-screen {
  position: fixed;
  z-index: 120;
  inset: 0;
  width: min(100%, var(--app-width));
  min-height: 100vh;
  margin: 0 auto;
  padding: 12px 16px 18px;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at 90% 10%, rgba(207, 233, 240, .7), transparent 25%),
    var(--app);
}

.spell-header {
  height: 48px;
  display: grid;
  grid-template-columns: 38px 1fr 60px;
  align-items: center;
}

.spell-header h2 {
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 19px;
  text-align: center;
}

.skip-button {
  border: none;
  color: var(--ink-soft);
  background: transparent;
  font-size: 10px;
  text-align: right;
  cursor: pointer;
}

.spell-progress-row {
  margin: 5px 4px 9px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.spell-progress {
  flex: 1;
  height: 7px;
  overflow: hidden;
  border-radius: 99px;
  background: var(--line);
}

.spell-progress span {
  width: 0;
  height: 100%;
  display: block;
  border-radius: inherit;
  background: var(--green);
}

.spell-progress-row b {
  color: var(--ink-faint);
  font-size: 8px;
}

.spell-main {
  flex: 1;
  padding-top: 4px;
  text-align: center;
}

.spell-main img {
  width: 145px;
  height: 110px;
  object-fit: cover;
  mix-blend-mode: multiply;
  -webkit-mask-image: radial-gradient(ellipse 62% 60% at 50% 52%, #000 58%, transparent 84%);
  mask-image: radial-gradient(ellipse 62% 60% at 50% 52%, #000 58%, transparent 84%);
}

.spell-main > p {
  margin: 2px 0 9px;
  color: var(--ink-soft);
  font-size: 10px;
}

.spell-hint {
  margin: 0 auto 11px;
  padding: 10px;
  border: 1px solid #d6e5c7;
  border-radius: 11px;
  color: var(--green-deep);
  background: var(--green-soft);
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 17px;
}

.spell-slots {
  min-height: 42px;
  display: flex;
  justify-content: center;
  gap: 6px;
}

.spell-slot {
  width: 30px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--ink);
  background: var(--panel-soft);
  font-family: Georgia, serif;
  font-size: 17px;
  font-weight: 700;
  text-transform: uppercase;
}

.spell-slot.filled {
  border-color: var(--green);
  background: var(--green-soft);
}

.prompt-feedback {
  min-height: 20px;
  margin-top: 5px;
  color: var(--ink-faint);
  font-size: 8px;
}

.prompt-feedback.ok {
  color: var(--green-deep);
}

.prompt-feedback.bad {
  color: #bb6661;
}

.spell-keyboard {
  display: grid;
  gap: 6px;
}

.keyboard-row {
  display: flex;
  justify-content: center;
  gap: 4px;
}

.keyboard-row button {
  min-width: 28px;
  height: 37px;
  padding: 0 7px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--ink-soft);
  background: var(--panel);
  font-size: 12px;
  font-weight: 650;
  box-shadow: 0 2px 4px rgba(50,60,45,.05);
  cursor: pointer;
}

.keyboard-row button.wide {
  min-width: 46px;
}

.spell-submit {
  width: 100%;
  margin-top: 9px;
}

.toast {
  position: fixed;
  z-index: 200;
  bottom: calc(82px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  max-width: calc(100vw - 32px);
  padding: 9px 15px;
  border-radius: 99px;
  color: #fff;
  background: rgba(47, 62, 45, .9);
  box-shadow: 0 8px 24px rgba(0,0,0,.16);
  font-size: 9px;
  text-align: center;
  opacity: 0;
  transform: translate(-50%, 10px);
  pointer-events: none;
  transition: .22s ease;
}

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

@media (min-width: 700px) {
  :root {
    --app-width: 760px;
  }

  .app-frame {
    min-height: calc(100vh - 28px);
    margin-top: 14px;
    margin-bottom: 14px;
    border: 1px solid rgba(255,255,255,.7);
    border-radius: 32px;
  }

  .app-header {
    border-radius: 32px 32px 0 0;
  }

  .bottom-nav {
    bottom: 14px;
    border-radius: 0 0 32px 32px;
  }

  .word-sheet,
  .search-sheet {
    width: min(100%, 620px);
  }

  .reader-content {
    padding-right: 28px;
    padding-left: 28px;
  }
}

@media (max-width: 370px) {
  .app-main {
    padding-right: 12px;
    padding-left: 12px;
  }

  .home-sheep-wrap {
    right: -14px;
    transform: scale(.9);
    transform-origin: right top;
  }

  .level-strip {
    grid-template-columns: 1fr 1fr;
  }

  .rating-button b {
    font-size: 9px;
  }

  .spell-slot {
    width: 26px;
  }

  .keyboard-row {
    gap: 3px;
  }

  .keyboard-row button {
    min-width: 24px;
    padding: 0 4px;
  }
}

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