:root {
  --green: #1F4A3F;
  --green-2: #2B5D50;
  --green-soft: #E7F0EC;
  --teal: #4C9A8C;
  --orange: #E8663D;
  --orange-soft: #FBE9E1;
  --blue: #5B7FD4;
  --blue-soft: #E9EEFA;
  --purple: #7B6BB0;
  --purple-soft: #EEEAF7;
  --gold: #C9A227;
  --gold-soft: #F8F0D3;
  --paper: #F7F4EC;
  --white: #FFFFFF;
  --ink: #1D2B27;
  --muted: #6D7772;
  --line: #E7E2D7;
  --shadow: 0 10px 30px rgba(31, 74, 63, 0.075);
  --shadow-strong: 0 14px 34px rgba(31, 74, 63, 0.14);
  color-scheme: light;
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: #EEE9DE;
  color: var(--ink);
  font-size: 14px;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 15% 8%, rgba(76, 154, 140, 0.12), transparent 28rem),
    #EEE9DE;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.55;
}

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

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

button {
  cursor: pointer;
}

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

a {
  color: inherit;
}

svg {
  display: block;
}

h1,
h2,
h3,
p {
  margin: 0;
  overflow-wrap: anywhere;
}

h1 {
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: 0;
}

h2 {
  font-size: 18px;
  line-height: 1.35;
  letter-spacing: 0;
}

h3 {
  font-size: 15px;
  line-height: 1.4;
  letter-spacing: 0;
}

.hidden {
  display: none !important;
}

.app-frame {
  width: min(100%, 430px);
  min-height: 100vh;
  margin: 0 auto;
  position: relative;
  background: var(--paper);
  box-shadow: 0 0 60px rgba(31, 74, 63, 0.12);
}

.app-content {
  min-height: 100vh;
  padding-bottom: calc(88px + env(safe-area-inset-bottom));
}

.page {
  min-height: 100vh;
  padding-bottom: 12px;
}

.loading-state {
  min-height: 70vh;
  padding: 32px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 16px;
  color: var(--muted);
}

.loading-ring {
  width: 34px;
  height: 34px;
  border: 3px solid rgba(31, 74, 63, 0.16);
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.page-hero {
  min-height: 178px;
  padding: calc(18px + env(safe-area-inset-top)) 20px 28px;
  position: relative;
  overflow: hidden;
  border-radius: 0 0 28px 28px;
  color: var(--white);
  background: var(--green);
}

.page-hero::after {
  content: "";
  width: 124px;
  height: 124px;
  position: absolute;
  top: -48px;
  right: -32px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 50%;
  box-shadow:
    0 0 0 24px rgba(255, 255, 255, 0.035),
    0 0 0 52px rgba(255, 255, 255, 0.025);
  pointer-events: none;
}

.hero-top {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: relative;
  z-index: 1;
}

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

.brand-mini {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.brand-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
}

.hero-eyebrow {
  margin-top: 24px;
  color: rgba(255, 255, 255, 0.64);
  font-size: 12px;
  font-weight: 650;
}

.page-hero h1 {
  margin-top: 5px;
  color: var(--white);
}

.hero-subtitle {
  max-width: 340px;
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
  line-height: 1.6;
}

.hero-chip {
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.86);
  background: rgba(255, 255, 255, 0.08);
  font-size: 11px;
  font-weight: 700;
}

.icon-button {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: var(--white);
  background: rgba(255, 255, 255, 0.1);
  font-size: 19px;
  line-height: 1;
}

.icon-button.light {
  color: var(--green);
  background: var(--green-soft);
}

.page-body {
  padding: 16px;
}

.page-body.pull-up {
  margin-top: -22px;
  position: relative;
  z-index: 2;
}

.card {
  min-width: 0;
  padding: 18px;
  border: 1px solid rgba(231, 226, 215, 0.85);
  border-radius: 16px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.card + .card,
.stack > * + * {
  margin-top: 12px;
}

.section {
  margin-top: 20px;
}

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

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

.section-head p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-mark {
  width: 4px;
  height: 18px;
  flex: 0 0 4px;
  border-radius: 4px;
  background: var(--teal);
}

.text-link {
  border: 0;
  padding: 4px 0;
  color: var(--teal);
  background: transparent;
  font-size: 12px;
  font-weight: 750;
}

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

.tiny {
  font-size: 12px;
}

.strong {
  font-weight: 800;
}

.positive {
  color: var(--teal);
}

.negative,
.danger {
  color: var(--orange);
}

.gold {
  color: var(--gold);
}

.button {
  min-height: 48px;
  padding: 10px 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
}

.button.primary {
  color: var(--white);
  background: var(--green);
  box-shadow: 0 8px 18px rgba(31, 74, 63, 0.18);
}

.button.teal {
  color: var(--white);
  background: var(--teal);
  box-shadow: 0 8px 18px rgba(76, 154, 140, 0.18);
}

.button.gold {
  color: #5B4810;
  background: var(--gold-soft);
}

.button.soft {
  color: var(--green);
  background: var(--green-soft);
}

.button.outline {
  border: 1px solid var(--line);
  color: var(--ink);
  background: var(--white);
}

.button.danger-soft {
  color: var(--orange);
  background: var(--orange-soft);
}

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

.button.wide {
  width: 100%;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.button-row .button {
  flex: 1 1 120px;
}

.pill {
  min-height: 24px;
  padding: 3px 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--green);
  background: var(--green-soft);
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
}

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

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

.pill.gold {
  color: #8F7114;
  background: var(--gold-soft);
}

.pill.gray {
  color: var(--muted);
  background: #F1EFE9;
}

.hero-progress {
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.progress-ring {
  --progress: 0;
  width: 102px;
  height: 102px;
  flex: 0 0 102px;
  display: grid;
  place-items: center;
  position: relative;
  border-radius: 50%;
  background:
    conic-gradient(var(--gold) calc(var(--progress) * 1%), rgba(255, 255, 255, 0.13) 0);
}

.progress-ring::before {
  content: "";
  width: 80px;
  height: 80px;
  position: absolute;
  border-radius: 50%;
  background: var(--green);
}

.ring-copy {
  position: relative;
  z-index: 1;
  text-align: center;
}

.ring-copy strong {
  display: block;
  color: var(--white);
  font-size: 25px;
  line-height: 1.05;
}

.ring-copy span {
  color: rgba(255, 255, 255, 0.62);
  font-size: 10px;
}

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

.hero-progress-copy strong {
  display: block;
  color: var(--white);
  font-size: 16px;
}

.hero-progress-copy p {
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.65);
  font-size: 12px;
  line-height: 1.55;
}

.hero-stat-row {
  margin-top: 18px;
  padding-top: 14px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid rgba(255, 255, 255, 0.11);
}

.hero-stat {
  padding: 0 8px;
  text-align: center;
}

.hero-stat + .hero-stat {
  border-left: 1px solid rgba(255, 255, 255, 0.11);
}

.hero-stat strong {
  display: block;
  color: var(--white);
  font-size: 19px;
  line-height: 1.2;
}

.hero-stat span {
  color: rgba(255, 255, 255, 0.56);
  font-size: 10px;
}

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

.metric-card {
  min-width: 0;
  padding: 13px 8px;
  text-align: center;
  border-radius: 12px;
  background: #F5F3ED;
}

.metric-card strong {
  display: block;
  font-size: 20px;
  line-height: 1.25;
}

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

.metric-card span {
  margin-top: 2px;
  display: block;
  color: var(--muted);
  font-size: 10px;
}

.points-badge {
  padding: 7px 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  color: #876A13;
  background: var(--gold-soft);
  font-size: 12px;
  font-weight: 800;
}

.points-badge::before {
  content: "◆";
  color: var(--gold);
  font-size: 10px;
}

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

.progress-track > span {
  width: 0;
  height: 100%;
  display: block;
  border-radius: inherit;
  background: var(--teal);
  transition: width 300ms ease;
}

.progress-track.gold > span {
  background: var(--gold);
}

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

.subject-card {
  width: 100%;
  min-width: 0;
  padding: 15px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--ink);
  background: var(--white);
  text-align: left;
  box-shadow: 0 5px 18px rgba(31, 74, 63, 0.045);
}

.subject-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 900;
}

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

.subject-title-row {
  display: flex;
  align-items: center;
  gap: 7px;
}

.subject-title {
  font-size: 15px;
  font-weight: 850;
}

.subject-chapter {
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.subject-meta {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 10px;
}

.subject-score {
  text-align: right;
}

.subject-score strong {
  display: block;
  font-size: 18px;
  line-height: 1.1;
}

.subject-score span {
  color: var(--muted);
  font-size: 9px;
}

.subject-score .chevron {
  margin-top: 4px;
  color: #A6ADA9;
  font-size: 17px;
}

.subject-progress {
  margin-top: 7px;
  height: 4px;
}

.home-page {
  background: #F4F2EC;
}

.home-header {
  height: 128px;
  padding: 40px 16px 18px;
  overflow: hidden;
  color: var(--white);
  background: linear-gradient(112deg, #214B47 0%, #2E6862 100%);
}

.home-topline {
  height: 18px;
  padding-left: 2px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.home-date {
  color: rgba(255, 255, 255, 0.78);
  font-size: 9.5px;
  font-weight: 600;
  line-height: 18px;
  transform: translateY(-1.5px);
  white-space: nowrap;
}

.home-checkin-link {
  min-height: 24px;
  margin: -6px 0 -3px;
  padding: 0;
  border: 0;
  color: rgba(255, 255, 255, 0.72);
  background: transparent;
  font-size: 11.5px;
  font-weight: 650;
  line-height: 18px;
  white-space: nowrap;
}

.home-profile {
  width: calc(100% - 6px);
  height: 42px;
  margin: 10px 0 0 2px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.home-avatar {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  color: #7B4637;
  background: #F4DFC4;
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
}

.home-welcome {
  min-width: 0;
}

.home-welcome h1 {
  overflow: hidden;
  color: var(--white);
  font-size: 19px;
  font-weight: 800;
  line-height: 24px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-welcome p {
  margin-top: 2px;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.7);
  font-size: 10px;
  line-height: 16px;
  text-overflow: ellipsis;
  transform: translateY(1px);
  white-space: nowrap;
}

.home-points-badge {
  min-width: 63px;
  height: 30px;
  padding: 0 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid rgba(240, 196, 110, 0.22);
  border-radius: 999px;
  color: var(--white);
  background: rgba(240, 196, 110, 0.19);
  line-height: 1;
  white-space: nowrap;
}

.home-points-badge span {
  color: #F0C46E;
  font-size: 15px;
}

.home-points-badge strong {
  font-size: 15px;
  font-weight: 750;
}

.home-progress-card {
  height: 147px;
  margin: 0 16px;
  padding: 0 18px;
  overflow: hidden;
  border-radius: 16px;
  color: var(--white);
  background: #223733;
}

.home-progress-main {
  height: 93px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 66px;
  gap: 18px;
}

.home-progress-copy {
  min-width: 0;
  padding-top: 23px;
}

.home-progress-kicker {
  display: block;
  color: rgba(255, 255, 255, 0.52);
  font-size: 11.5px;
  font-weight: 700;
  line-height: 11px;
}

.home-progress-copy h2 {
  margin-top: 1px;
  overflow: hidden;
  color: var(--white);
  font-size: 17px;
  font-weight: 800;
  line-height: 22px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-progress-copy p {
  margin-top: 4px;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.58);
  font-size: 10px;
  line-height: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-progress-ring {
  --progress: 0;
  width: 66px;
  height: 66px;
  margin-top: 15px;
  display: grid;
  place-items: center;
  position: relative;
  border-radius: 50%;
  background: conic-gradient(
    #EFA68F calc(var(--progress) * 1%),
    #394B48 0
  );
}

.home-progress-ring::before {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: #223733;
}

.home-progress-ring > span {
  position: relative;
  z-index: 1;
  transform: translateY(2px);
  text-align: center;
}

.home-progress-ring strong,
.home-progress-ring small {
  display: block;
}

.home-progress-ring strong {
  color: var(--white);
  font-size: 17px;
  font-weight: 750;
  line-height: 19px;
}

.home-progress-ring small {
  margin-top: 1px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 8px;
  line-height: 11px;
}

.home-progress-metrics {
  width: 100%;
  height: 54px;
  margin: 0;
  padding-top: 5px;
  display: grid;
  position: relative;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  transform: translateX(-15px);
}

.home-progress-metrics::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  transform: translateX(15px);
}

.home-progress-metric {
  min-width: 0;
  text-align: center;
}

.home-progress-metric + .home-progress-metric {
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.home-metric-value {
  display: flex;
  align-items: baseline;
  justify-content: center;
  color: var(--white);
  font-size: 17px;
  font-weight: 750;
  line-height: 20px;
  white-space: nowrap;
}

.home-metric-value i {
  margin-right: 3px;
  color: rgba(255, 255, 255, 0.66);
  font-size: 10px;
  font-style: normal;
}

.home-metric-value small {
  margin-left: 2px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 10px;
  font-weight: 600;
}

.home-metric-label {
  display: block;
  margin-top: 1px;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.48);
  font-size: 8px;
  line-height: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-subjects {
  margin: 14px 16px 0;
}

.home-subjects-heading h2 {
  color: #1F2B29;
  font-size: 17px;
  font-weight: 850;
  line-height: 22px;
  transform: translateY(-1px);
}

.home-subjects-subrow {
  min-height: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.home-subjects-subrow p {
  min-width: 0;
  overflow: hidden;
  color: #747C78;
  font-size: 9px;
  line-height: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-week-goal {
  min-height: 18px;
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  color: #4C6962;
  background: transparent;
  font-size: 9px;
  font-weight: 700;
  line-height: 18px;
  transform: translateY(-1px);
  white-space: nowrap;
}

.home-subject-grid {
  margin-top: 5px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 10px;
}

.home-subject-card {
  width: 100%;
  height: 110px;
  min-width: 0;
  padding: 11px 9px 6px 10px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  border: 1px solid #E1E6E2;
  border-radius: 12px;
  color: #1F2B29;
  background: #FFFDF9;
  text-align: left;
  box-shadow: none;
}

.home-subject-card:nth-child(even) {
  padding-left: 9px;
}

.home-subject-topline {
  height: 32px;
  flex: 0 0 32px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.home-subject-icon {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--subject-color);
  background: var(--subject-soft);
  font-size: 15px;
  font-weight: 850;
  line-height: 1;
}

.home-subject-quiz {
  max-width: calc(100% - 40px);
  height: 18px;
  margin-top: 5.5px;
  padding: 0 6px;
  overflow: hidden;
  border-radius: 999px;
  color: var(--subject-color);
  background: var(--subject-soft);
  font-size: 9.5px;
  font-weight: 650;
  line-height: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-subject-name {
  margin-top: 6px;
  overflow: hidden;
  color: #1F2B29;
  font-size: 14px;
  font-weight: 800;
  line-height: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-subject-chapter {
  overflow: hidden;
  color: #737A76;
  font-size: 9px;
  line-height: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-subject-score-row {
  height: 16px;
  margin-top: auto;
  display: flex;
  align-items: center;
}

.home-subject-progress {
  height: 5px;
  min-width: 0;
  flex: 1;
  overflow: hidden;
  border-radius: 999px;
  background: #F4F2EC;
}

.home-subject-progress > span {
  width: 0;
  height: 100%;
  display: block;
  border-radius: inherit;
  background: var(--subject-color);
}

.home-subject-score {
  margin-left: 12px;
  flex: 0 0 auto;
  color: #707873;
  font-size: 8px;
  font-weight: 600;
  line-height: 16px;
  transform: translateY(-1px);
  white-space: nowrap;
}

.subject-tabs {
  padding: 4px;
  display: flex;
  gap: 4px;
  overflow-x: auto;
  border-radius: 12px;
  background: #ECE8DF;
  scrollbar-width: none;
}

.subject-tabs::-webkit-scrollbar {
  display: none;
}

.subject-tabs a,
.subject-tabs button {
  min-width: 58px;
  min-height: 36px;
  padding: 6px 10px;
  flex: 1 0 auto;
  border: 0;
  border-radius: 9px;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
  font-weight: 750;
  text-align: center;
  text-decoration: none;
}

.subject-tabs .active {
  color: var(--white);
  background: var(--green);
  box-shadow: 0 5px 12px rgba(31, 74, 63, 0.16);
}

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

.task-item {
  min-height: 58px;
  padding: 11px 12px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #FCFBF8;
}

.task-item.completed {
  background: #F1F7F4;
}

.task-check {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border: 1.5px solid #C9CFCB;
  border-radius: 8px;
  color: transparent;
  background: var(--white);
  font-size: 13px;
  font-weight: 900;
}

.task-item.completed .task-check {
  border-color: var(--teal);
  color: var(--white);
  background: var(--teal);
}

.task-title {
  display: block;
  font-size: 13px;
  font-weight: 760;
}

.task-meta {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.task-points {
  color: var(--gold);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.cycle-card {
  padding: 17px;
  color: var(--white);
  border-radius: 16px;
  background: var(--green);
}

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

.cycle-head strong {
  font-size: 17px;
}

.cycle-days {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 7px;
}

.cycle-day {
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 9px;
  color: rgba(255, 255, 255, 0.48);
  background: rgba(255, 255, 255, 0.06);
  font-size: 11px;
  font-weight: 750;
}

.cycle-day.done {
  border-color: rgba(201, 162, 39, 0.55);
  color: #FFF4C4;
  background: rgba(201, 162, 39, 0.2);
}

.cycle-card .progress-track {
  margin-top: 13px;
  background: rgba(255, 255, 255, 0.13);
}

.cycle-card .progress-track > span {
  background: var(--gold);
}

.chart {
  height: 138px;
  padding-top: 10px;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  align-items: end;
  gap: 8px;
}

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

.chart-value {
  color: var(--muted);
  font-size: 9px;
}

.chart-bar {
  width: min(22px, 76%);
  min-height: 5px;
  position: relative;
  border-radius: 6px 6px 3px 3px;
  background: #D9E5E0;
}

.chart-bar.filled {
  background: var(--teal);
}

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

.chart-label {
  color: var(--muted);
  font-size: 9px;
}

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

.record-item {
  padding: 12px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #FCFBF8;
}

.record-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  border: 2px solid var(--teal);
  border-radius: 50%;
  background: var(--white);
}

.record-title {
  display: block;
  font-size: 13px;
  font-weight: 760;
}

.record-meta {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.stars {
  color: var(--gold);
  font-size: 11px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.timeline {
  position: relative;
}

.timeline::before {
  content: "";
  width: 1px;
  position: absolute;
  top: 18px;
  bottom: 18px;
  left: 12px;
  background: #D8E3DE;
}

.timeline-item {
  min-height: 66px;
  padding-left: 32px;
  position: relative;
}

.timeline-item::before {
  content: "";
  width: 10px;
  height: 10px;
  position: absolute;
  top: 18px;
  left: 8px;
  border: 2px solid var(--paper);
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 2px #CFE1DA;
}

.timeline-item + .timeline-item {
  margin-top: 2px;
}

.timeline-time {
  color: var(--muted);
  font-size: 10px;
}

.timeline-content {
  padding: 4px 0 14px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.summary-banner {
  padding: 17px;
  border-radius: 16px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.summary-main {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.summary-main strong {
  display: block;
  font-size: 28px;
  line-height: 1;
}

.summary-main strong small {
  margin-left: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.summary-main p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
}

.summary-grid {
  margin-top: 15px;
  padding-top: 15px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
}

.summary-grid > div {
  padding: 0 7px;
  text-align: center;
}

.summary-grid > div + div {
  border-left: 1px solid var(--line);
}

.summary-grid strong {
  display: block;
  font-size: 17px;
}

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

.notice {
  padding: 13px 14px;
  display: flex;
  align-items: center;
  gap: 11px;
  border: 1px solid #D8E7E1;
  border-radius: 13px;
  color: var(--green);
  background: #EEF7F3;
  font-size: 12px;
  font-weight: 650;
}

.notice.warning {
  border-color: #F3D8CB;
  color: #A24928;
  background: var(--orange-soft);
}

.notice-mark {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--white);
  background: var(--teal);
  font-size: 12px;
  font-weight: 900;
}

.notice.warning .notice-mark {
  background: var(--orange);
}

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

.subject-status {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #FCFBF8;
}

.subject-status.failed {
  border-color: #F0D3C8;
  background: #FFF7F3;
}

.subject-status-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.subject-status strong {
  display: block;
  font-size: 12px;
}

.subject-status-score {
  margin-top: 8px;
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
}

.subject-status-score small {
  margin-left: 2px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 600;
}

.subject-status-copy {
  margin-top: 5px;
  color: var(--muted);
  font-size: 9px;
}

.quiz-detail {
  overflow: hidden;
}

.quiz-detail-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.quiz-big-score {
  color: var(--green);
  font-size: 42px;
  font-weight: 900;
  line-height: 1;
}

.quiz-big-score small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.breakdown-list {
  margin-top: 15px;
  display: grid;
  gap: 9px;
}

.breakdown-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) 38px;
  align-items: center;
  gap: 9px;
  font-size: 10px;
}

.breakdown-row span:last-child {
  color: var(--muted);
  text-align: right;
}

.knowledge-list {
  counter-reset: knowledge;
  display: grid;
  gap: 9px;
}

.knowledge-row {
  min-height: 44px;
  padding: 9px 10px;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  border-radius: 11px;
  background: #F7F5EF;
}

.knowledge-row::before {
  counter-increment: knowledge;
  content: counter(knowledge);
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: var(--orange);
  background: var(--orange-soft);
  font-size: 10px;
  font-weight: 850;
}

.knowledge-row span {
  font-size: 12px;
  font-weight: 650;
}

.knowledge-row b {
  color: var(--orange);
  font-size: 10px;
}

.points-hero {
  padding: 20px;
  color: var(--white);
  border-radius: 16px;
  background: var(--green);
  box-shadow: var(--shadow);
}

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

.points-hero strong {
  display: block;
  font-size: 38px;
  line-height: 1;
}

.points-hero p {
  margin-top: 7px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 11px;
}

.points-books {
  margin-top: 17px;
  padding-top: 14px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.points-books div {
  text-align: center;
}

.points-books div + div {
  border-left: 1px solid rgba(255, 255, 255, 0.12);
}

.points-books strong {
  font-size: 16px;
}

.points-books span {
  color: rgba(255, 255, 255, 0.55);
  font-size: 9px;
}

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

.reward-card {
  min-width: 0;
  padding: 13px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--white);
  box-shadow: 0 5px 16px rgba(31, 74, 63, 0.045);
}

.reward-icon {
  width: 35px;
  height: 35px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: #8C6E15;
  background: var(--gold-soft);
  font-size: 13px;
  font-weight: 900;
}

.reward-card h3 {
  margin-top: 11px;
  font-size: 13px;
}

.reward-card p {
  min-height: 30px;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.reward-footer {
  margin-top: 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.reward-cost {
  color: #896C15;
  font-size: 12px;
  font-weight: 850;
}

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

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

.ledger-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.ledger-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--green);
  background: var(--green-soft);
  font-size: 12px;
  font-weight: 900;
}

.ledger-row.negative .ledger-icon {
  color: var(--orange);
  background: var(--orange-soft);
}

.ledger-row strong {
  display: block;
  font-size: 11px;
}

.ledger-row p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.ledger-amount {
  color: var(--teal);
  font-size: 13px;
  font-weight: 850;
}

.ledger-row.negative .ledger-amount {
  color: var(--orange);
}

.pin-page {
  min-height: 100vh;
  padding: calc(24px + env(safe-area-inset-top)) 24px 32px;
  display: flex;
  flex-direction: column;
  background: var(--paper);
}

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

.pin-mark {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: var(--white);
  background: var(--green);
  font-size: 22px;
  font-weight: 900;
  box-shadow: var(--shadow);
}

.pin-copy {
  margin-top: 34px;
  text-align: center;
}

.pin-copy h1 {
  font-size: 24px;
}

.pin-copy p {
  margin-top: 9px;
  color: var(--muted);
  font-size: 12px;
}

.pin-dots {
  min-height: 54px;
  margin-top: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
}

.pin-dot {
  width: 13px;
  height: 13px;
  border: 1.5px solid #C2C9C5;
  border-radius: 50%;
  background: transparent;
}

.pin-dot.filled {
  border-color: var(--green);
  background: var(--green);
}

.pin-error {
  min-height: 20px;
  margin-top: 2px;
  color: var(--orange);
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}

.keypad {
  width: min(100%, 296px);
  margin: 8px auto 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 11px;
}

.keypad button {
  aspect-ratio: 1.45;
  border: 1px solid var(--line);
  border-radius: 15px;
  color: var(--ink);
  background: var(--white);
  box-shadow: 0 5px 14px rgba(31, 74, 63, 0.05);
  font-size: 19px;
  font-weight: 700;
}

.keypad button.action {
  color: var(--green);
  background: var(--green-soft);
  font-size: 13px;
  font-weight: 800;
}

.keypad button.enter {
  color: var(--white);
  background: var(--green);
}

.pin-help {
  margin-top: auto;
  padding-top: 24px;
  color: var(--muted);
  font-size: 10px;
  text-align: center;
}

.parent-bar {
  min-height: 42px;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  background: rgba(247, 244, 236, 0.94);
  font-size: 11px;
}

.parent-lock {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--green);
  font-weight: 750;
}

.parent-lock::before {
  content: "●";
  color: var(--teal);
  font-size: 8px;
}

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

.overview-metric {
  padding: 14px;
  border-radius: 15px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.overview-metric strong {
  display: block;
  font-size: 23px;
  line-height: 1.1;
}

.overview-metric span {
  margin-top: 4px;
  display: block;
  color: var(--muted);
  font-size: 10px;
}

.overview-metric small {
  margin-top: 8px;
  display: block;
  color: var(--teal);
  font-size: 9px;
}

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

.seven-item {
  min-height: 50px;
  padding: 9px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  border-radius: 11px;
  background: #F6F4EE;
}

.seven-item span {
  font-size: 11px;
  font-weight: 750;
}

.seven-item b {
  color: var(--teal);
  font-size: 9px;
}

.seven-item.warn b {
  color: var(--orange);
}

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

.action-row {
  min-height: 54px;
  padding: 11px 12px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--white);
  text-decoration: none;
}

.action-row strong {
  display: block;
  font-size: 12px;
}

.action-row p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.action-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--green);
  background: var(--green-soft);
  font-size: 13px;
  font-weight: 900;
}

.action-chevron {
  color: #A8ADA9;
  font-size: 18px;
}

.form-grid {
  display: grid;
  gap: 13px;
}

.form-row {
  display: grid;
  gap: 6px;
}

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

.form-row label,
.field-label {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.input,
.select,
.textarea {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid #DCD8CF;
  border-radius: 10px;
  color: var(--ink);
  background: #FCFBF8;
  font-size: 12px;
  outline: none;
}

.textarea {
  min-height: 74px;
  resize: vertical;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(76, 154, 140, 0.11);
}

.input.compact {
  min-height: 34px;
  padding: 6px 8px;
  font-size: 11px;
}

.goal-row {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #FCFBF8;
}

.goal-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

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

.goal-row-head span {
  color: var(--muted);
  font-size: 9px;
}

.goal-fields {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.setting-row {
  min-height: 54px;
  padding: 10px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.setting-row + .setting-row {
  border-top: 1px solid var(--line);
}

.setting-copy strong {
  display: block;
  font-size: 12px;
}

.setting-copy p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.number-stepper {
  display: flex;
  align-items: center;
  gap: 5px;
}

.number-stepper button {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 9px;
  color: var(--green);
  background: var(--green-soft);
  font-size: 15px;
  font-weight: 800;
}

.number-stepper input {
  width: 48px;
  min-height: 30px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  text-align: center;
}

.switch {
  width: 44px;
  height: 26px;
  flex: 0 0 44px;
  padding: 3px;
  position: relative;
  border: 0;
  border-radius: 999px;
  background: #D9DDD9;
}

.switch::after {
  content: "";
  width: 20px;
  height: 20px;
  display: block;
  border-radius: 50%;
  background: var(--white);
  box-shadow: 0 2px 4px rgba(31, 74, 63, 0.18);
  transition: transform 180ms ease;
}

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

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

.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.segmented button {
  min-height: 36px;
  border: 0;
  color: var(--muted);
  background: var(--white);
  font-size: 11px;
  font-weight: 700;
}

.segmented button + button {
  border-left: 1px solid var(--line);
}

.segmented button.active {
  color: var(--white);
  background: var(--green);
}

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

.day-tabs button {
  min-height: 38px;
  padding: 5px 2px;
  border: 0;
  border-radius: 9px;
  color: var(--muted);
  background: #F1EEE7;
  font-size: 10px;
}

.day-tabs button.active {
  color: var(--white);
  background: var(--green);
}

.task-editor {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #FCFBF8;
}

.task-editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.task-editor-fields {
  margin-top: 9px;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.7fr;
  gap: 7px;
}

.request-card {
  padding: 14px;
  border: 1px solid #EFE0B2;
  border-radius: 14px;
  background: #FFFDF7;
}

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

.request-head strong {
  display: block;
  font-size: 13px;
}

.request-head p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.request-actions {
  margin-top: 10px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.request-actions .note-input {
  grid-column: 1 / -1;
}

.device-item {
  padding: 13px 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
}

.device-item + .device-item {
  border-top: 1px solid var(--line);
}

.device-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--green);
  background: var(--green-soft);
  font-size: 12px;
  font-weight: 900;
}

.device-copy strong {
  display: block;
  font-size: 12px;
}

.device-copy p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.device-remove {
  border: 0;
  padding: 6px;
  color: var(--orange);
  background: transparent;
  font-size: 10px;
  font-weight: 750;
}

.data-status {
  padding: 15px;
  display: flex;
  align-items: center;
  gap: 13px;
  border-radius: 14px;
  color: var(--green);
  background: var(--green-soft);
}

.data-status-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--white);
  background: var(--teal);
  font-size: 16px;
  font-weight: 900;
}

.data-status strong {
  display: block;
  font-size: 12px;
}

.data-status p {
  margin-top: 3px;
  font-size: 9px;
  opacity: 0.72;
}

.empty-box {
  padding: 24px 16px;
  border: 1px dashed #D7D2C8;
  border-radius: 13px;
  color: var(--muted);
  background: #FBFAF6;
  font-size: 11px;
  text-align: center;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  padding: 18px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(17, 32, 27, 0.48);
  backdrop-filter: blur(4px);
}

.modal-sheet {
  width: min(100%, 430px);
  max-height: 92vh;
  overflow-y: auto;
  border-radius: 22px 22px 16px 16px;
  background: var(--paper);
  box-shadow: 0 24px 70px rgba(17, 32, 27, 0.32);
}

.modal-backdrop.modal-centered {
  align-items: center;
}

.modal-sheet.modal-sheet-centered {
  width: min(calc(100vw - 36px), 430px);
  position: fixed;
  top: 50%;
  left: 50%;
  max-height: min(84vh, 760px);
  margin: 0;
  border-radius: 10px;
  transform: translate(-50%, -50%);
}

.modal-head {
  padding: 18px 20px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  background: var(--white);
}

.modal-head h2 {
  font-size: 17px;
}

.modal-body {
  padding: 16px;
}

.toast {
  position: fixed;
  right: max(16px, calc((100vw - 430px) / 2 + 16px));
  bottom: calc(92px + env(safe-area-inset-bottom));
  left: max(16px, calc((100vw - 430px) / 2 + 16px));
  z-index: 130;
  max-width: 398px;
  margin: 0 auto;
  padding: 12px 15px;
  border-radius: 12px;
  color: var(--white);
  background: #263E36;
  box-shadow: 0 12px 30px rgba(32, 48, 42, 0.24);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.bottom-nav {
  width: min(100%, 430px);
  min-height: calc(60px + env(safe-area-inset-bottom));
  padding: 5px 6px calc(5px + env(safe-area-inset-bottom));
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 40;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border-top: 1px solid rgba(231, 226, 215, 0.9);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 -8px 24px rgba(31, 74, 63, 0.06);
  backdrop-filter: blur(12px);
}

.bottom-nav a {
  min-width: 0;
  min-height: 50px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border-radius: 11px;
  color: #8B948F;
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
}

.nav-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  font-size: 22px;
  line-height: 1;
}

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

.bottom-nav a.active .nav-icon {
  color: var(--white);
  background: var(--green);
}

.count-dot {
  min-width: 18px;
  height: 18px;
  margin-left: 4px;
  padding: 0 5px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: var(--white);
  background: var(--orange);
  font-size: 9px;
  font-weight: 800;
}

.timer-card {
  padding: 24px 18px 18px;
  text-align: center;
  border-radius: 18px;
  color: var(--white);
  background: var(--green);
  box-shadow: var(--shadow-strong);
}

.timer-label {
  color: rgba(255, 255, 255, 0.58);
  font-size: 11px;
}

.timer-value {
  margin-top: 12px;
  font-variant-numeric: tabular-nums;
  font-size: 45px;
  font-weight: 650;
  letter-spacing: 0.06em;
  line-height: 1;
}

.timer-status {
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, 0.64);
  font-size: 10px;
}

.timer-status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
}

.timer-actions {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 9px;
}

.timer-actions .button {
  width: 100%;
}

.timer-actions .primary-timer {
  color: var(--green);
  background: var(--white);
  box-shadow: none;
}

.timer-actions .secondary-timer {
  color: rgba(255, 255, 255, 0.86);
  background: rgba(255, 255, 255, 0.12);
}

.rating-panel {
  text-align: center;
}

.rating-stars {
  margin-top: 15px;
  display: flex;
  justify-content: center;
  gap: 9px;
}

.rating-star {
  width: 43px;
  height: 43px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: #C4C5BF;
  background: var(--white);
  font-size: 23px;
}

.rating-star.selected {
  border-color: #E6D9A8;
  color: var(--gold);
  background: var(--gold-soft);
}

.quiz-question {
  padding: 17px;
  border-radius: 16px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.quiz-question .question-stem {
  margin-top: 12px;
  font-size: 15px;
  font-weight: 750;
  line-height: 1.7;
}

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

.answer-option {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--ink);
  background: #FCFBF8;
  font-size: 12px;
  line-height: 1.55;
  text-align: left;
}

.answer-option.selected {
  border-color: var(--teal);
  color: var(--green);
  background: var(--green-soft);
  box-shadow: inset 0 0 0 1px var(--teal);
}

.answer-letter {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: var(--green);
  background: var(--green-soft);
  font-size: 10px;
  font-weight: 850;
}

.answer-option.selected .answer-letter {
  color: var(--white);
  background: var(--teal);
}

.text-answer {
  margin-top: 14px;
}

.quiz-counter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 10px;
}

.result-score {
  padding: 9px 0 14px;
  color: var(--green);
  font-size: 64px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
}

.result-score small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.result-title {
  text-align: center;
}

.result-title p {
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.study-feedback {
  margin-top: 12px;
  padding: 13px;
  border: 1px solid #CCE2D9;
  border-radius: 12px;
  color: var(--green);
  background: #EFF8F4;
  font-size: 11px;
}

.study-feedback.wrong {
  border-color: #F3D1C3;
  color: #9A4324;
  background: var(--orange-soft);
}

.check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
}

.check-row input {
  width: 17px;
  height: 17px;
  accent-color: var(--green);
}

:focus-visible {
  outline: 3px solid rgba(91, 127, 212, 0.42);
  outline-offset: 2px;
}

/* Secondary information stays readable at the same 12px baseline as the mockups. */
.hero-chip,
.pill,
.metric-card small,
.metric-card span,
.subject-chapter,
.subject-meta,
.subject-score span,
.task-meta,
.chart-value,
.chart-label,
.record-meta,
.timeline-time,
.summary-main p,
.summary-grid span,
.subject-status-copy,
.points-hero p,
.points-books span,
.reward-card p,
.reward-stock,
.ledger-row p,
.parent-bar,
.overview-metric span,
.overview-metric small,
.seven-item b,
.action-row p,
.form-row label,
.field-label,
.goal-row-head span,
.setting-copy p,
.day-tabs button,
.request-head p,
.device-copy p,
.device-remove,
.data-status p,
.timer-label,
.timer-status,
.answer-letter,
.quiz-counter,
.rating-panel .tiny,
.check-row,
.pin-error,
.pin-help {
  font-size: 12px;
}

.bottom-nav a {
  font-size: 11px;
}

.button.small,
.reward-cost,
.task-points,
.points-badge {
  font-size: 12px;
}

@media (hover: hover) {
  .button.primary:hover {
    background: #173C32;
  }

  .button.teal:hover {
    background: #438B7E;
  }

  .button.soft:hover {
    background: #DCEAE4;
  }

  .subject-card:hover {
    border-color: #CFDCD6;
    transform: translateY(-1px);
  }

  .action-row:hover {
    border-color: #D3DDD8;
    background: #FDFCF9;
  }

  .bottom-nav a:hover {
    background: #F6F4EE;
  }
}

@media (max-width: 365px) {
  .page-body {
    padding-right: 13px;
    padding-left: 13px;
  }

  .card {
    padding: 15px;
  }

  .timer-value {
    font-size: 39px;
  }

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

.subject-detail-page .subject-tabs {
  flex-wrap: wrap;
  overflow: visible;
}

.subject-detail-page .subject-tabs a {
  min-width: 62px;
  flex: 1 1 auto;
  white-space: nowrap;
}

.subject-detail-page .page-body {
  padding-top: 14px;
}

.subject-task-card {
  padding: 15px;
}

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

.subject-card-kicker {
  display: block;
  margin-bottom: 4px;
  color: var(--orange);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.8px;
}

.subject-task-head h2 {
  color: var(--ink);
  font-size: 16px;
  font-weight: 850;
}

.subject-task-head p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 8px;
}

.subject-task-list {
  margin-top: 12px;
  display: grid;
  gap: 7px;
}

.study-motivation {
  margin-top: 11px;
  padding: 12px 13px;
  border-left: 3px solid var(--orange);
  color: var(--green);
  background: linear-gradient(90deg, #FFF5F1, #FFFDF9);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.65;
}

.task-marker {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
}

.subject-task-row {
  min-height: 48px;
  padding: 9px 2px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

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

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

.subject-task-copy strong {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-size: 10px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.subject-task-copy span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
}

.subject-task-row > b {
  color: var(--orange);
  font-size: 9px;
  white-space: nowrap;
}

.subject-task-row.completed .subject-task-copy strong {
  color: var(--green);
}

.subject-cycle-progress {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.subject-cycle-copy {
  color: var(--muted);
  font-size: 8px;
}

.subject-task-card .progress-track {
  margin-top: 7px;
}

.subject-main-action {
  margin-top: 13px;
}

.subject-timer-link {
  width: 100%;
  margin-top: 8px;
  padding: 2px;
  border: 0;
  color: var(--green);
  background: transparent;
  font-size: 8px;
  font-weight: 800;
}

.subject-section-title {
  margin: 13px 0 7px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.subject-section-title h2 {
  color: var(--ink);
  font-size: 14px;
  font-weight: 850;
}

.subject-section-title > span,
.subject-section-title .text-link {
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
}

.subject-chart-card {
  padding: 8px 13px 10px;
}

.subject-chart-card .chart {
  height: 112px;
}

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

.subject-record-row {
  padding: 10px 11px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #FFFDF9;
}

.subject-record-icon {
  width: 31px;
  height: 31px;
  flex: 0 0 31px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 900;
}

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

.subject-record-copy strong {
  display: block;
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.subject-record-copy span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
}

.subject-record-score {
  color: var(--green);
  font-size: 11px;
  font-weight: 850;
  white-space: nowrap;
}

.subject-record-score small {
  font-size: 7px;
  font-weight: 600;
}

.compact-page-hero {
  min-height: 0;
  padding: calc(13px + env(safe-area-inset-top)) 17px 15px;
}

.compact-hero-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.compact-hero-leading {
  min-width: 0;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 9px;
}

.compact-hero-copy {
  min-width: 0;
}

.compact-hero-eyebrow {
  display: block;
  margin-bottom: 3px;
  color: #F0AD98;
  font-size: 8px;
  font-weight: 850;
  line-height: 1.25;
}

.compact-hero-copy h1 {
  overflow: hidden;
  color: #fff;
  font-size: 18px;
  font-weight: 850;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-hero-copy p {
  margin-top: 3px;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.64);
  font-size: 8px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-hero-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 6px;
}

.compact-hero-actions .icon-button {
  width: 30px;
  height: 30px;
  flex-basis: 30px;
  font-size: 8px;
  font-weight: 800;
}

.compact-hero-actions .hero-chip {
  max-width: 82px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-page-hero .hero-stat-row {
  margin-top: 12px;
}

.compact-page-hero > .progress-track {
  margin-top: 12px;
}

@media (max-width: 365px) {
  .compact-hero-actions .icon-button {
    display: none;
  }

  .compact-hero-actions .hero-chip {
    max-width: 76px;
  }
}

.plain-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.plain-card + .plain-card {
  margin-top: 9px;
}

.card-kicker {
  margin-bottom: 4px;
  color: var(--orange);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.8px;
}

.card-title {
  color: var(--ink);
  font-size: 16px;
  font-weight: 850;
}

.card-sub {
  margin-top: 5px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.45;
}

.progress-line {
  height: 7px;
  overflow: hidden;
  border-radius: 5px;
  background: #E9EDE9;
}

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

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

.primary-btn,
.secondary-btn {
  min-height: 40px;
  border-radius: 7px;
  font-size: 10px;
  font-weight: 850;
}

.primary-btn {
  width: 100%;
  border: 0;
  color: #fff;
  background: var(--green);
}

.primary-btn.coral {
  background: var(--orange);
}

.secondary-btn {
  padding: 0 12px;
  border: 1px solid var(--line);
  color: var(--green);
  background: #fff;
}

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

.admin-tag {
  padding: 4px 7px;
  border-radius: 9px;
  color: var(--green);
  background: var(--green-soft);
  font-size: 8px;
  font-weight: 900;
  white-space: nowrap;
}

.timer-light-card {
  padding: 8px 14px 17px;
  text-align: center;
}

.timer-wrap {
  padding: 12px 0 9px;
  display: grid;
  place-items: center;
}

.timer-ring {
  width: 162px;
  height: 162px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  border-radius: 50%;
  background: conic-gradient(var(--orange) 0 67%, #E8ECE9 67% 100%);
}

.timer-ring::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  background: var(--white);
}

.timer-ring strong,
.timer-ring span {
  position: relative;
  z-index: 1;
}

.timer-ring strong {
  color: var(--ink);
  font-size: 27px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.03em;
}

.timer-ring span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
}

.timer-action-row {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.timer-action {
  width: 56px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--green);
  background: #fff;
  font-size: 12px;
  font-weight: 800;
}

.timer-action.coral {
  border-color: var(--orange);
  color: #fff;
  background: var(--orange);
}

.timer-quality-card {
  margin-top: 9px;
}

.quality-row {
  margin-top: 13px;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.quality-star {
  padding: 0;
  border: 0;
  color: #D6DDD9;
  background: transparent;
  font-size: 24px;
  line-height: 1;
}

.quality-star.on {
  color: var(--gold);
}

.note-field {
  width: 100%;
  min-height: 58px;
  margin-top: 11px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--ink);
  background: #fff;
  font: inherit;
  font-size: 9px;
  resize: vertical;
}

.filter-row {
  display: flex;
  gap: 7px;
  margin-bottom: 11px;
}

.chip {
  height: 28px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 15px;
  color: var(--muted);
  background: #fff;
  font-size: 9px;
}

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

.metric {
  padding: 12px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  text-align: center;
}

.metric strong {
  display: block;
  color: var(--ink);
  font-size: 18px;
}

.metric span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 8px;
}

.mini-title {
  margin: 14px 0 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mini-title h2 {
  color: var(--ink);
  font-size: 14px;
  font-weight: 850;
}

.mini-title span {
  color: var(--muted);
  font-size: 8px;
}

.target-record-list {
  gap: 7px;
}

.record-row {
  padding: 10px 11px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.subject-dot {
  width: 31px;
  height: 31px;
  flex: 0 0 31px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 900;
}

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

.record-copy strong {
  display: block;
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.record-copy span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
}

.record-value {
  text-align: right;
}

.record-value strong {
  display: block;
  color: var(--green);
  font-size: 11px;
}

.record-value span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
}

.record-note-line {
  margin-top: 12px;
  padding: 11px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: var(--white);
  font-size: 9px;
}

.record-note-line .text-link {
  color: var(--green);
  font-size: 9px;
  font-weight: 850;
}

.test-summary {
  padding: 16px;
  color: #fff;
  border-radius: 8px;
  background: linear-gradient(145deg, #234A46, #326B65);
}

.test-summary-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.test-summary h2 {
  color: #fff;
  font-size: 16px;
  line-height: 1.35;
}

.test-summary p {
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.65);
  font-size: 9px;
}

.test-score-side {
  flex: 0 0 auto;
  text-align: right;
}

.test-score-side strong {
  display: block;
  font-size: 34px;
  font-weight: 900;
  line-height: 1;
}

.test-score-side small {
  display: block;
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 8px;
}

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

.test-subject {
  min-width: 0;
  padding: 9px 5px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--ink);
  background: #fff;
  text-align: center;
}

.test-subject strong {
  display: block;
  overflow: hidden;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.test-subject span {
  display: block;
  margin-top: 4px;
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
}

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

.test-subject.pass {
  border-color: #C9DDD7;
  background: #F1F8F5;
}

.test-subject.fail {
  border-color: #F1D1C8;
  background: #FFF4F1;
}

.test-subject.fail span {
  color: var(--orange);
}

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

.question-stat {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.question-stat strong {
  display: block;
  font-size: 14px;
}

.question-stat span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
}

.insight {
  margin-top: 9px;
  padding: 12px;
  border-left: 3px solid var(--orange);
  background: #fff;
}

.insight.green {
  border-left-color: var(--green);
}

.insight strong {
  font-size: 10px;
}

.insight p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.55;
}

.report-hero {
  padding: 16px;
  color: #fff;
  border-radius: 8px;
  background: linear-gradient(145deg, #1F3D39, #2D625C);
}

.report-hero h2 {
  color: #fff;
  font-size: 17px;
}

.report-hero > p {
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.65);
  font-size: 9px;
}

.report-metrics {
  margin-top: 15px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.report-metrics > div + div {
  border-left: 1px solid rgba(255, 255, 255, 0.12);
}

.report-metrics strong {
  display: block;
  color: #fff;
  font-size: 19px;
}

.report-metrics span {
  display: block;
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 8px;
}

.reward-balance {
  padding: 18px;
  color: #fff;
  border-radius: 8px;
  background: linear-gradient(145deg, #A45944, #D2765E);
}

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

.reward-balance h2 {
  color: #fff;
  font-size: 15px;
}

.reward-balance p {
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 9px;
}

.reward-gift {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: #7C4A24;
  background: #FFD992;
  font-size: 13px;
  font-weight: 900;
}

.reward-balance > strong {
  display: inline-block;
  margin-top: 9px;
  color: #fff;
  font-size: 34px;
  line-height: 1;
}

.reward-balance > small {
  margin-left: 5px;
  font-size: 10px;
  opacity: 0.75;
}

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

.reward-item {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.reward-item-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--orange);
  background: var(--orange-soft);
  font-size: 11px;
  font-weight: 900;
}

.reward-item h3 {
  margin-top: 8px;
  color: var(--ink);
  font-size: 12px;
}

.reward-item p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
}

.reward-item b {
  display: block;
  margin-top: 8px;
  color: var(--green);
  font-size: 10px;
}

.reward-item .secondary-btn {
  width: 100%;
  min-height: 31px;
  margin-top: 8px;
  font-size: 8px;
}

.parent-body {
  padding: 13px 16px calc(86px + env(safe-area-inset-bottom));
}

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

.overview-card {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.overview-card span {
  display: block;
  color: var(--muted);
  font-size: 8px;
}

.overview-card strong {
  display: block;
  margin-top: 5px;
  color: var(--ink);
  font-size: 19px;
}

.overview-card small {
  display: block;
  margin-top: 4px;
  color: var(--green);
  font-size: 8px;
}

.parent-section {
  margin-top: 13px;
}

.parent-section-head {
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.parent-section-head h2 {
  color: var(--ink);
  font-size: 14px;
  font-weight: 850;
}

.parent-section-head span {
  color: var(--green);
  font-size: 8px;
  font-weight: 800;
}

.parent-section .subject-status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.parent-section .subject-status {
  padding: 9px 5px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  text-align: center;
}

.parent-section .subject-status strong {
  display: block;
  font-size: 9px;
}

.parent-section .subject-status span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 7px;
}

.parent-section .subject-status.done span {
  color: var(--green);
}

.parent-section .subject-status.warn {
  border-color: #F0D0C5;
  background: #FFF5F1;
}

.parent-section .subject-status.warn span {
  color: var(--orange);
}

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

.admin-row {
  width: 100%;
  min-height: 44px;
  padding: 9px 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--ink);
  background: #fff;
  text-align: left;
  text-decoration: none;
}

.admin-row-icon {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: var(--green);
  background: var(--green-soft);
  font-size: 10px;
  font-weight: 900;
}

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

.admin-row-copy strong {
  display: block;
  overflow: hidden;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-row-copy span {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted);
  font-size: 7px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-row-value {
  color: var(--green);
  font-size: 9px;
  font-weight: 900;
  white-space: nowrap;
}

.admin-row-value.coral {
  color: var(--orange);
}

.parent-exit-chip {
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.admin-card {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.admin-card + .admin-card {
  margin-top: 9px;
}

.admin-card-head h2 {
  color: var(--ink);
  font-size: 15px;
  font-weight: 850;
}

.admin-card-head p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.5;
}

.parent-page .section-head {
  margin-bottom: 8px;
}

.parent-page .section-title h2 {
  font-size: 14px;
}

.parent-page .section-head p {
  font-size: 8px;
}

.parent-page .form-row,
.parent-page .goal-row,
.parent-page .task-editor,
.parent-page .setting-row {
  border-radius: 7px;
}

.subject-select-row {
  margin-top: 10px;
  display: grid;
  gap: 7px;
}

.subject-select {
  padding: 10px 11px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.subject-select.active {
  border-color: #9CBAB4;
  background: #F3F9F7;
}

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

.subject-select-copy strong {
  display: block;
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.subject-select-copy span {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.edit-pill {
  padding: 4px 7px;
  border-radius: 8px;
  color: var(--green);
  background: var(--green-soft);
  font-size: 8px;
  font-weight: 900;
  list-style: none;
}

.edit-pill::-webkit-details-marker {
  display: none;
}

.subject-edit-details {
  flex: 0 0 auto;
}

.subject-edit-details[open] {
  width: 100%;
}

.subject-edit-details[open] summary {
  margin-bottom: 8px;
  text-align: right;
}

.goal-row {
  flex-wrap: wrap;
}

.goal-fields {
  width: 100%;
  padding-top: 2px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.compact-task-editor {
  padding: 0;
  border: 0;
  background: transparent;
}

.compact-task-editor .subject-select {
  min-height: 48px;
}

.task-edit-details {
  margin: 5px 0 0 41px;
}

.task-edit-details summary {
  display: inline-block;
  margin-bottom: 7px;
}

.task-edit-details[open] {
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #FAFBF9;
}

.task-editor-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.task-edit-field {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.task-edit-field > span {
  color: var(--muted);
  font-size: 8px;
  font-weight: 750;
}

.task-edit-field .input,
.task-edit-field .select {
  width: 100%;
  min-width: 0;
}

.task-title-field {
  margin-top: 8px;
}

.task-editor-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.task-editor-actions .check-row {
  margin-right: auto;
}

.task-editor-actions .button {
  min-height: 32px;
  white-space: nowrap;
}

@media (max-width: 365px) {
  .task-editor-fields {
    grid-template-columns: 1fr;
  }
}

.add-task-card summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  list-style: none;
}

.add-task-card summary::-webkit-details-marker {
  display: none;
}

.add-task-card summary strong {
  font-size: 14px;
}

.add-task-card summary span {
  color: var(--muted);
  font-size: 8px;
}

.add-task-card[open] summary {
  margin-bottom: 11px;
}

.pending-card {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.pending-card + .pending-card {
  margin-top: 8px;
}

.pending-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pending-avatar {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #7F493B;
  background: #F5DFC7;
  font-size: 14px;
  font-weight: 900;
}

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

.pending-copy strong {
  display: block;
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pending-copy span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
}

.pending-points {
  color: var(--orange);
  font-size: 10px;
  font-weight: 900;
  white-space: nowrap;
}

.pending-actions {
  margin-top: 10px;
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 7px;
}

.pending-actions button {
  min-height: 32px;
  padding: 0 11px;
  border: 0;
  border-radius: 6px;
  font-size: 9px;
  font-weight: 900;
}

.pending-actions .accept {
  color: #fff;
  background: var(--green);
}

.pending-actions .decline {
  color: var(--green);
  background: var(--green-soft);
}

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

.device-card {
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.device-card .device-icon {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--green);
  background: var(--green-soft);
  font-size: 11px;
  font-weight: 900;
}

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

.device-copy strong {
  display: block;
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.device-copy span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 8px;
}

.current-tag {
  padding: 0;
  border: 0;
  color: var(--green);
  background: transparent;
  font-size: 8px;
  font-weight: 900;
  white-space: nowrap;
}

.backup-card {
  margin-top: 12px;
  padding: 15px;
  color: #fff;
  border-radius: 8px;
  background: linear-gradient(145deg, #234742, #32645D);
}

.backup-card h2 {
  color: #fff;
  font-size: 15px;
}

.backup-card p {
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.65);
  font-size: 8px;
}

.backup-row {
  margin-top: 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.backup-row strong {
  font-size: 17px;
}

.backup-row button {
  min-height: 30px;
  padding: 0 11px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  font-size: 8px;
  font-weight: 900;
}

.profile-card summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  list-style: none;
}

.profile-card summary::-webkit-details-marker {
  display: none;
}

.profile-summary strong {
  display: block;
  font-size: 14px;
}

.profile-summary span {
  color: var(--muted);
  font-size: 8px;
}

.profile-card[open] summary {
  margin-bottom: 10px;
}

.child-profile-card {
  margin-bottom: 12px;
}

.student-home-return {
  width: 100%;
  min-height: 57px;
  margin-bottom: 10px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #C9DDD7;
  border-radius: 8px;
  color: var(--ink);
  background: linear-gradient(135deg, #F1F8F5, #FBFDFC);
  text-align: left;
}

.student-home-return-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: #7B4637;
  background: #F4DFC4;
  font-size: 14px;
  font-weight: 900;
}

.student-home-return > span:nth-child(2) {
  min-width: 0;
  flex: 1;
}

.student-home-return strong {
  display: block;
  font-size: 11px;
  font-weight: 850;
}

.student-home-return small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
}

.student-home-return-arrow {
  color: var(--green);
  font-size: 20px;
  line-height: 1;
}

.child-profile-layout {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  align-items: center;
  gap: 13px;
}

.profile-avatar-preview {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 3px solid #F4DFC4;
  border-radius: 50%;
  color: #7B4637;
  background: #F4DFC4;
  font-size: 27px;
  font-weight: 900;
}

.profile-avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.child-profile-fields {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.child-profile-fields .profile-label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 750;
}

.child-profile-fields .profile-label input[type="text"] {
  width: 100%;
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--ink);
  background: #fff;
  font-size: 11px;
}

.profile-upload-label input[type="file"] {
  width: 100%;
  color: var(--muted);
  font-size: 8px;
}

.profile-upload-label input[type="file"]::file-selector-button {
  min-height: 32px;
  margin-right: 8px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--green);
  background: var(--green-soft);
  font: inherit;
  font-weight: 850;
}

.child-profile-actions {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 8px;
}

.child-profile-actions .secondary-btn,
.child-profile-actions .primary-btn {
  width: 100%;
  min-height: 38px;
}

.profile-hint {
  margin-top: 8px;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.5;
}

@media (max-width: 365px) {
  .child-profile-layout {
    grid-template-columns: 62px minmax(0, 1fr);
  }

  .profile-avatar-preview {
    width: 62px;
    height: 62px;
  }

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

.pin-page {
  min-height: 100vh;
  padding: calc(18px + env(safe-area-inset-top)) 24px calc(86px + env(safe-area-inset-bottom));
  background: #F8F7F3;
}

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

.pin-top-label {
  color: var(--muted);
  font-size: 9px;
  font-weight: 750;
}

.pin-page .pin-copy {
  margin-top: 34px;
  text-align: center;
}

.pin-page .pin-mark {
  width: 66px;
  height: 66px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--green);
  background: var(--green-soft);
  font-size: 20px;
  font-weight: 900;
}

.pin-page .pin-copy h1 {
  color: var(--ink);
  font-size: 21px;
}

.pin-page .pin-copy p {
  margin-top: 7px;
  color: var(--muted);
  font-size: 10px;
}

.pin-page .pin-dots {
  margin: 26px 0 7px;
  gap: 12px;
}

.pin-page .pin-dot {
  width: 13px;
  height: 13px;
}

.pin-page .pin-dot.filled {
  background: var(--green);
}

.pin-page .pin-error {
  min-height: 18px;
  text-align: center;
  font-size: 9px;
}

.pin-page .keypad {
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.pin-page .keypad button {
  height: 54px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  font-size: 17px;
  font-weight: 700;
}

.pin-page .keypad button.action {
  color: var(--green);
  font-size: 10px;
  font-weight: 900;
}

.pin-submit-btn {
  margin-top: 15px;
}

.pin-page .pin-help {
  margin-top: 13px;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.6;
  text-align: center;
}

@media (min-width: 431px) {
  .app-frame {
    margin-top: 18px;
    margin-bottom: 18px;
    min-height: calc(100vh - 36px);
    border-radius: 24px;
    overflow: clip;
  }

  .app-content {
    min-height: calc(100vh - 36px);
  }

  .bottom-nav {
    bottom: 18px;
    border-radius: 0 0 24px 24px;
  }
}

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


.profile-edit { display: grid; gap: 10px; margin-top: 10px; }
.profile-label { display: grid; gap: 6px; font-size: 12px; color: var(--muted); font-weight: 650; }
.profile-label input[type="text"] { padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); font-size: 14px; background: var(--white); color: var(--ink); }
.profile-label input[type="file"] { font-size: 12px; }
.profile-preview { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.profile-preview img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.home-avatar-image { object-fit: cover; padding: 0; }

/* 底部导航最终定稿尺寸（覆盖前面所有规则） */
.bottom-nav {
  min-height: calc(56px + env(safe-area-inset-bottom)) !important;
  padding: 4px 6px calc(4px + env(safe-area-inset-bottom)) !important;
}
.bottom-nav a {
  min-height: 46px !important;
  gap: 1px !important;
  font-size: 11px !important;
}
.nav-icon {
  width: 30px !important;
  height: 30px !important;
  font-size: 19px !important;
  border-radius: 9px !important;
}

/* 仅"记录"图标放大 2.5 倍，文字大小不变 */
.bottom-nav a[data-nav="records"] .nav-icon {
  width: 75px !important;
  height: 75px !important;
  font-size: 47px !important;
  border-radius: 18px !important;
  margin: -20px 0 !important;
  overflow: visible !important;
}

/* 修正：记录图标放大但点击高亮框不再变大 */
.bottom-nav a[data-nav="records"] .nav-icon {
  width: 34px !important;
  height: 34px !important;
  font-size: 47px !important;
  line-height: 0.7 !important;
  border-radius: 10px !important;
  margin: -6px 0 !important;
  overflow: visible !important;
  background: transparent !important;
}
.bottom-nav a[data-nav="records"].active .nav-icon {
  background: transparent !important;
  color: var(--green) !important;
}

/* 微调：记录图标上移，避免压住文字 */
.bottom-nav a[data-nav="records"] .nav-icon {
  margin: -14px 0 2px !important;
  line-height: 0.6 !important;
}

/* 最终：记录图标放大并上移，避免压字 */
.bottom-nav a[data-nav="records"] {
  overflow: visible !important;
}
.bottom-nav a[data-nav="records"] .nav-icon {
  width: 34px !important;
  height: 34px !important;
  font-size: 42px !important;
  line-height: 1 !important;
  margin: 0 !important;
  position: relative !important;
  top: -12px !important;
  overflow: visible !important;
  background: transparent !important;
  border-radius: 10px !important;
}
.bottom-nav a[data-nav="records"] .nav-icon + span,
.bottom-nav a[data-nav="records"] span:last-child {
  position: relative !important;
  top: -2px !important;
}

/* 定稿2：导航高度与记录图标协调，避免压字 */
.bottom-nav {
  min-height: calc(64px + env(safe-area-inset-bottom)) !important;
  padding: 4px 6px calc(4px + env(safe-area-inset-bottom)) !important;
}
.bottom-nav a {
  min-height: 54px !important;
  gap: 0 !important;
}
.bottom-nav a[data-nav="records"] .nav-icon {
  width: 34px !important;
  height: 34px !important;
  font-size: 40px !important;
  line-height: 0.85 !important;
  margin: 0 !important;
  position: static !important;
  top: auto !important;
  overflow: visible !important;
  background: transparent !important;
}
.bottom-nav a[data-nav="records"].active .nav-icon {
  background: transparent !important;
  color: var(--green) !important;
}
.bottom-nav a[data-nav="records"] span:last-child {
  position: static !important;
  top: auto !important;
  margin-top: 1px !important;
}

/* 定稿3：记录图标按行高排布，避免压字 */
.bottom-nav {
  min-height: calc(68px + env(safe-area-inset-bottom)) !important;
  padding: 4px 6px calc(4px + env(safe-area-inset-bottom)) !important;
}
.bottom-nav a {
  min-height: 58px !important;
  gap: 0 !important;
}
.bottom-nav a[data-nav="records"] .nav-icon {
  width: auto !important;
  height: auto !important;
  min-width: 0 !important;
  font-size: 40px !important;
  line-height: 1 !important;
  margin: 0 0 2px !important;
  position: static !important;
  background: transparent !important;
  border-radius: 0 !important;
  overflow: visible !important;
}
.bottom-nav a[data-nav="records"].active .nav-icon {
  background: transparent !important;
  color: var(--green) !important;
}

/* 定稿4：五个标签文字基线对齐，记录图标略缩 */
.bottom-nav a {
  justify-content: flex-end !important;
  padding-bottom: 3px !important;
  gap: 1px !important;
}
.bottom-nav .nav-icon {
  width: 30px !important;
  height: 26px !important;
  font-size: 18px !important;
  line-height: 1 !important;
  border-radius: 8px !important;
  margin: 0 !important;
  position: static !important;
  top: auto !important;
}
.bottom-nav a[data-nav="records"] .nav-icon {
  width: auto !important;
  height: 26px !important;
  font-size: 34px !important;
  line-height: 1 !important;
  background: transparent !important;
  border-radius: 0 !important;
  overflow: visible !important;
}
.bottom-nav a[data-nav="records"].active .nav-icon {
  background: transparent !important;
  color: var(--green) !important;
}
.bottom-nav a > span:last-child {
  line-height: 1 !important;
  margin: 0 !important;
  position: static !important;
  top: auto !important;
}

/* 定稿5：记录标签与其它标签统一，图标略大但框一致 */
.bottom-nav a[data-nav="records"] {
  font-size: 11px !important;
  font-weight: 650 !important;
  gap: 4px !important;
}
.bottom-nav a[data-nav="records"] .nav-icon {
  width: 30px !important;
  height: 26px !important;
  font-size: 24px !important;
  line-height: 1 !important;
  border-radius: 8px !important;
  margin: 0 !important;
  position: static !important;
  top: auto !important;
  overflow: visible !important;
  background: transparent !important;
}
.bottom-nav a[data-nav="records"].active .nav-icon {
  background: var(--green) !important;
  color: var(--white) !important;
}
.bottom-nav a[data-nav="records"] > span:last-child {
  font-size: 11px !important;
  font-weight: 650 !important;
}

/* 定稿6：导航栏高度再缩 1/4，图标与字号不变 */
.bottom-nav {
  min-height: calc(52px + env(safe-area-inset-bottom)) !important;
  padding: 3px 6px calc(3px + env(safe-area-inset-bottom)) !important;
}
.bottom-nav a {
  min-height: 46px !important;
}

/* 下午效果图定稿：青禾学习移动端页面体系 */
:root {
  --green: #2B5E58;
  --green-2: #1F3D39;
  --green-soft: #E9F1EE;
  --teal: #4C9A8C;
  --orange: #DD745D;
  --orange-soft: #FFF0EB;
  --blue: #4778B8;
  --blue-soft: #EDF4FF;
  --purple: #7866A2;
  --purple-soft: #F2EEFB;
  --gold: #D8A74B;
  --gold-soft: #FBF1E4;
  --paper: #F4F2EC;
  --white: #FFFDF9;
  --ink: #1F2B29;
  --muted: #74817E;
  --line: #E1E6E2;
  --shadow: 0 10px 26px rgba(33, 61, 57, 0.07);
  --shadow-strong: 0 14px 30px rgba(33, 61, 57, 0.14);
}

html,
body {
  background: #DFE4E0;
}

body {
  background: #DFE4E0;
  font-size: 13px;
}

.app-frame {
  background: var(--paper);
  box-shadow: 0 0 36px rgba(31, 61, 57, 0.12);
}

.page-hero {
  min-height: 104px;
  padding: calc(13px + env(safe-area-inset-top)) 17px 16px;
  overflow: hidden;
  border-radius: 0 0 8px 8px;
  background: linear-gradient(145deg, #214B47, #2F6A64);
}

.page-hero::after {
  display: none;
}

.hero-top {
  min-height: 32px;
  gap: 9px;
}

.brand-mini {
  gap: 6px;
  font-size: 10px;
  letter-spacing: 0;
}

.brand-dot {
  width: 6px;
  height: 6px;
}

.hero-eyebrow {
  margin-top: 12px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.8px;
}

.page-hero h1,
.page-hero .home-welcome h1 {
  margin-top: 4px;
  font-size: 18px;
  font-weight: 850;
  line-height: 1.28;
}

.hero-subtitle {
  max-width: 360px;
  margin-top: 5px;
  font-size: 9px;
  line-height: 1.5;
}

.hero-chip {
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 14px;
  font-size: 9px;
}

.icon-button {
  width: 32px;
  height: 32px;
  flex-basis: 32px;
  font-size: 16px;
}

.page-body {
  padding: 14px 16px calc(82px + env(safe-area-inset-bottom));
}

.page-body.pull-up {
  margin-top: 0;
  padding-top: 14px;
}

.card,
.quiz-question,
.english-practice-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: none;
}

.card + .card,
.card + .section,
.section + .card {
  margin-top: 9px;
}

.section-title {
  gap: 7px;
}

.section-mark {
  width: 3px;
  height: 16px;
  border-radius: 2px;
}

.section-title h2 {
  font-size: 15px;
  font-weight: 850;
}

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

.button,
.text-link,
.action-row,
.setting-row,
.modal-sheet,
.input,
.textarea,
.segmented,
.day-tabs,
.subject-tabs {
  border-radius: 8px;
}

.button {
  min-height: 40px;
  font-size: 10px;
  font-weight: 850;
}

.button.primary {
  background: var(--green);
}

.button.soft {
  color: var(--green);
  background: var(--green-soft);
}

.pill {
  min-height: 22px;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 8px;
}

.notice {
  padding: 10px 11px;
  border-radius: 7px;
  font-size: 9px;
}

.home-header {
  height: 128px;
  padding: 40px 16px 18px;
  background: linear-gradient(145deg, #214B47, #2F6A64);
}

.home-progress-card {
  border-radius: 0 0 8px 8px;
}

.home-subject-card {
  border-radius: 8px;
}

.home-subject-progress,
.home-subject-progress > span,
.progress-track,
.progress-track > span {
  border-radius: 4px;
}

.bottom-nav {
  min-height: calc(66px + env(safe-area-inset-bottom)) !important;
  padding: 6px 10px calc(6px + env(safe-area-inset-bottom)) !important;
  border-top: 1px solid #E5E8E3 !important;
  background: rgba(255, 253, 249, 0.98) !important;
  box-shadow: 0 -10px 26px rgba(42, 67, 62, 0.08) !important;
}

.bottom-nav a,
.bottom-nav a[data-nav="records"] {
  min-height: 52px !important;
  gap: 2px !important;
  justify-content: center !important;
  padding: 0 !important;
  border-radius: 0 !important;
  color: #97A19F !important;
  font-size: 8px !important;
  font-weight: 700 !important;
}

.bottom-nav .nav-icon,
.bottom-nav a[data-nav="records"] .nav-icon {
  width: 24px !important;
  height: 22px !important;
  margin: 0 !important;
  display: grid !important;
  place-items: center !important;
  position: static !important;
  border-radius: 0 !important;
  color: inherit !important;
  background: transparent !important;
  font-size: 17px !important;
  line-height: 1 !important;
}

.bottom-nav a.active,
.bottom-nav a[data-nav="records"].active {
  color: var(--orange) !important;
}

.bottom-nav a.active .nav-icon,
.bottom-nav a[data-nav="records"].active .nav-icon {
  color: var(--orange) !important;
  background: transparent !important;
}

.bottom-nav a > span:last-child,
.bottom-nav a[data-nav="records"] > span:last-child {
  display: block !important;
  font-size: 8px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
}

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

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

.english-mode-card {
  min-width: 0;
  min-height: 92px;
  padding: 10px 7px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #FFFDF9;
  text-align: center;
}

.english-mode-card.done {
  border-color: #B9D6CE;
  background: #F1F8F5;
}

.english-mode-icon {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--green);
  background: var(--green-soft);
  font-size: 13px;
  font-weight: 900;
}

.english-mode-card strong {
  font-size: 11px;
  line-height: 1.2;
}

.english-mode-card > span:last-child {
  color: var(--muted);
  font-size: 8px;
  line-height: 1.3;
}

.english-mode-progress {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 9px;
}

.english-mode-progress .progress-track {
  flex: 1;
}

.english-mode-progress small {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 8px;
}

.english-practice-tabs {
  margin-top: 13px;
  padding: 3px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
}

.english-practice-tabs a {
  min-height: 29px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 9px;
  font-weight: 800;
  text-decoration: none;
}

.english-practice-tabs a span {
  font-size: 10px;
}

.english-practice-tabs a.active {
  color: var(--green);
  background: #F7F4EC;
}

.practice-progress-row {
  margin-bottom: 7px;
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 8px;
}

.practice-progress {
  margin-bottom: 11px;
}

.english-practice-card {
  min-height: 440px;
}

.english-listen-stage {
  min-height: 178px;
  padding: 23px 0 18px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 11px;
}

.listen-orb {
  width: 104px;
  height: 104px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, #2B5E58, #3B746D);
  box-shadow: 0 14px 28px rgba(39, 91, 86, 0.2);
}

.listen-orb.playing,
.listen-orb:active {
  transform: scale(0.97);
}

.listen-orb span {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  font-size: 16px;
}

.english-listen-stage p {
  color: var(--muted);
  font-size: 9px;
}

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

.english-answer-list .answer-option {
  min-height: 52px;
}

.spelling-prompt {
  margin-top: 18px;
  padding: 17px 14px;
  border-radius: 8px;
  background: var(--green-soft);
  text-align: center;
}

.spelling-prompt > span,
.shadowing-sentence > span,
.speech-transcript > span {
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.spelling-prompt h2,
.shadowing-sentence h2 {
  margin-top: 7px;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.3;
}

.spelling-prompt p {
  margin-top: 8px;
  color: #52615E;
  font-size: 10px;
  line-height: 1.6;
}

.spelling-prompt small {
  display: block;
  margin-top: 8px;
  color: var(--green);
  font-size: 8px;
}

.english-answer-label {
  display: block;
  margin: 17px 0 7px;
  color: var(--ink);
  font-size: 10px;
  font-weight: 800;
}

.english-answer-input {
  height: 49px;
  font-size: 16px;
  font-weight: 750;
  text-align: center;
}

.shadowing-sentence {
  margin-top: 18px;
  padding: 19px 15px;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(145deg, #214B47, #326B65);
  text-align: center;
}

.shadowing-sentence > span {
  color: rgba(255, 255, 255, 0.62);
}

.shadowing-sentence h2 {
  color: #fff;
  font-size: 18px;
}

.shadowing-actions {
  margin-top: 13px;
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 8px;
}

.record-button {
  min-height: 40px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: var(--orange);
  font-size: 10px;
  font-weight: 850;
}

.record-button span {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 50%;
  font-size: 9px;
}

.record-button.recording {
  animation: recordPulse 1.1s ease-in-out infinite;
}

@keyframes recordPulse {
  50% { opacity: 0.72; }
}

.speech-transcript {
  margin-top: 11px;
  padding: 12px;
  border: 1px dashed #CBD5D0;
  border-radius: 8px;
  background: #FAFBF9;
}

.speech-transcript.has-result {
  border-style: solid;
  border-color: #B9D6CE;
  background: #F1F8F5;
}

.speech-transcript p {
  margin-top: 6px;
  color: var(--ink);
  font-size: 11px;
  line-height: 1.5;
}

.speech-transcript small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 8px;
}

.english-practice-actions {
  margin-top: 12px;
}

.english-score-card {
  padding: 16px;
}

.english-result-score {
  display: grid;
  grid-template-columns: 44px 1fr;
  align-items: center;
  column-gap: 12px;
}

.english-result-score > span {
  width: 44px;
  height: 44px;
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--green);
  background: var(--green-soft);
  font-size: 18px;
  font-weight: 900;
}

.english-result-score strong {
  color: var(--ink);
  font-size: 31px;
  line-height: 1;
}

.english-result-score strong small {
  margin-left: 4px;
  font-size: 10px;
  font-weight: 600;
}

.english-result-score p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 9px;
}

.english-result-stats {
  margin-top: 14px;
  padding-top: 12px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
}

.english-result-stats > div {
  text-align: center;
}

.english-result-stats > div + div {
  border-left: 1px solid var(--line);
}

.english-result-stats strong {
  display: block;
  font-size: 14px;
}

.english-result-stats span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
}

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

.english-result-item {
  padding: 10px;
  display: flex;
  align-items: flex-start;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #FFFDF9;
}

.english-result-index {
  width: 23px;
  height: 23px;
  flex: 0 0 23px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--green);
  background: var(--green-soft);
  font-size: 8px;
  font-weight: 900;
}

.english-result-item > div {
  min-width: 0;
  flex: 1;
}

.english-result-item strong {
  font-size: 9px;
}

.english-result-item p,
.english-result-item small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.45;
}

.english-result-item b {
  color: var(--green);
  font-size: 12px;
}

@media (max-width: 365px) {
  .english-mode-grid {
    gap: 5px;
  }

  .english-mode-card {
    min-height: 86px;
    padding-inline: 5px;
  }

  .english-answer-list {
    grid-template-columns: 1fr;
  }

  .shadowing-actions,
  .english-practice-actions {
    grid-template-columns: 1fr;
  }
}
