:root {
  --bg: #070b10;
  --bg2: #0b1118;
  --card: #101a24;
  --line: rgba(255, 255, 255, 0.09);
  --line2: rgba(255, 255, 255, 0.14);
  --txt: #e9f0f7;
  --dim: #93a3b6;
  --mint: #79f2c0;
  --mint2: #38c99a;
  --blue: #8ab4ff;
  --amber: #ffc46b;
  --red: #ff8b8b;
  --r: 22px;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100dvh;
  color: var(--txt);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Hiragino Sans GB",
    "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  background: radial-gradient(120% 70% at 50% -10%, #132230 0%, #070b10 55%) fixed, var(--bg);
  overscroll-behavior-y: none;
}

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

#app {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 16px calc(86px + env(safe-area-inset-bottom));
}

body.session #app {
  padding: 0;
}

body.session #top,
body.session #tabs {
  display: none;
}

/* ---------- 顶栏 ---------- */
#top {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(10px + env(safe-area-inset-top)) 0 10px;
  background: rgba(7, 11, 16, 0.78);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

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

.logo {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--mint), var(--mint2));
  color: #05231a;
  font-weight: 800;
  display: grid;
  place-items: center;
  font-size: 18px;
}

.brand b {
  display: block;
  font-size: 15px;
  letter-spacing: -0.01em;
}

.brand i {
  display: block;
  font-style: normal;
  font-size: 11px;
  color: var(--dim);
}

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

.flame {
  font-size: 13px;
  color: var(--amber);
  background: rgba(255, 196, 107, 0.1);
  border: 1px solid rgba(255, 196, 107, 0.22);
  padding: 5px 10px;
  border-radius: 99px;
}

.icon-btn {
  width: 38px;
  height: 38px;
  min-width: 38px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--txt);
  display: grid;
  place-items: center;
  font-size: 15px;
  padding: 0;
  touch-action: manipulation;
}

.icon-btn:active {
  transform: scale(0.94);
}

/* ---------- 底部标签 ---------- */
#tabs {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  display: flex;
  justify-content: space-around;
  max-width: 640px;
  margin: 0 auto;
  padding: 8px 6px calc(6px + env(safe-area-inset-bottom));
  background: rgba(9, 14, 20, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--line);
}

.tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: none;
  border: 0;
  color: var(--dim);
  font-size: 11px;
  padding: 5px 0;
  border-radius: 12px;
  touch-action: manipulation;
}

.tab.on {
  color: var(--mint);
}

.tab.on svg {
  filter: drop-shadow(0 0 8px rgba(121, 242, 192, 0.35));
}

/* ---------- 通用 ---------- */
.page {
  padding-top: 4px;
  animation: fade 0.25s ease;
}

@keyframes fade {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

.page-head {
  padding: 8px 2px 4px;
}

.page-head h1 {
  font-size: 30px;
  line-height: 1.15;
  margin: 10px 0 2px;
  letter-spacing: -0.03em;
}

.sub {
  color: var(--dim);
  font-size: 14px;
  margin: 4px 0;
}

.scene {
  color: var(--dim);
  font-size: 12.5px;
  margin: 4px 0 0;
}

.kicker {
  color: var(--mint);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 2px;
}

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

.tiny {
  font-size: 12px;
  color: var(--dim);
  line-height: 1.55;
}

.center {
  text-align: center;
}

.card {
  position: relative;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 18px;
  margin: 14px 0;
}

.card.quiet {
  background: rgba(255, 255, 255, 0.025);
}

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

.card-h h2 {
  font-size: 15px;
  margin: 0;
  letter-spacing: 0.01em;
}

h2 {
  font-size: 17px;
  line-height: 1.35;
}

.body-text {
  font-size: 14.5px;
  color: #cdd8e4;
  margin: 8px 0;
}

.row {
  display: flex;
  align-items: center;
}

.between {
  justify-content: space-between;
}

.pill {
  font-size: 11.5px;
  color: var(--dim);
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.03);
}

.pill.hot {
  color: var(--amber);
  border-color: rgba(255, 196, 107, 0.25);
  background: rgba(255, 196, 107, 0.08);
}

/* ---------- 今日 ---------- */
.hero {
  overflow: hidden;
  background: radial-gradient(120% 100% at 0% 0%, rgba(121, 242, 192, 0.16), transparent 62%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02));
}

.hero-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
}

.hero-text h1 {
  font-size: 27px;
  line-height: 1.15;
  margin: 2px 0 4px;
  letter-spacing: -0.03em;
}

.hero-text .sub {
  font-size: 14px;
  color: #c8d4e2;
}

.ring {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.ring-in {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #0a1017;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1.05;
}

.ring-in b {
  font-size: 23px;
}

.ring-in span {
  font-size: 9.5px;
  color: var(--dim);
}

.tip {
  border-color: rgba(121, 242, 192, 0.22);
  background: rgba(121, 242, 192, 0.06);
  font-size: 13.5px;
  color: #d5e5e0;
  line-height: 1.6;
}

.tip .link {
  color: var(--mint);
  white-space: nowrap;
}

/* ---------- 按钮 ---------- */
.btn {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid var(--line2);
  background: rgba(255, 255, 255, 0.055);
  color: var(--txt);
  border-radius: 14px;
  padding: 11px 16px;
  min-height: 46px;
  font-size: 15px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease;
  touch-action: manipulation;
  text-align: center;
}

.btn:active {
  transform: scale(0.97);
}

.btn:disabled {
  opacity: 0.42;
}

.btn.primary {
  background: linear-gradient(180deg, #8ff7cb, var(--mint));
  color: #05231a;
  border-color: transparent;
  box-shadow: 0 10px 26px rgba(121, 242, 192, 0.16);
}

.btn.ghost {
  background: transparent;
  color: #dce7f2;
}

.btn.big {
  width: 100%;
  min-height: 54px;
  font-size: 16px;
  margin-top: 12px;
  border-radius: 16px;
}

.btn.sm {
  min-height: 34px;
  padding: 5px 11px;
  font-size: 12.5px;
  border-radius: 10px;
  font-weight: 500;
}

.btn.recording {
  background: rgba(255, 139, 139, 0.16);
  border-color: rgba(255, 139, 139, 0.45);
  color: #ffc9c9;
}

.btn-row {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.btn-row .btn {
  flex: 1;
}

/* ---------- 句子列表 ---------- */
.chunklist {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.chunk {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.055);
  padding: 12px 2px;
  color: var(--txt);
  touch-action: manipulation;
}

.chunk:last-child {
  border-bottom: 0;
}

.chunk:active {
  background: rgba(255, 255, 255, 0.04);
}

.chunk-play {
  width: 30px;
  height: 30px;
  min-width: 30px;
  border-radius: 50%;
  background: rgba(121, 242, 192, 0.1);
  border: 1px solid rgba(121, 242, 192, 0.25);
  color: var(--mint);
  display: grid;
  place-items: center;
  font-size: 10px;
  margin-top: 1px;
}

.chunk-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.chunk-body b {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.3;
}

.chunk-body i {
  font-style: normal;
  font-size: 13px;
  color: var(--dim);
}

.chunk-body small {
  font-size: 12px;
  color: #7f8ea1;
  line-height: 1.5;
}

.chunk-body small.link {
  color: var(--blue);
}

.dialogue {
  display: flex;
  flex-direction: column;
}

.line {
  display: flex;
  gap: 10px;
  text-align: left;
  background: none;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding: 10px 2px;
  color: var(--txt);
  touch-action: manipulation;
}

.line:last-child {
  border-bottom: 0;
}

.who {
  width: 20px;
  min-width: 20px;
  font-size: 11px;
  color: var(--mint);
  padding-top: 4px;
  font-weight: 700;
}

.what b {
  display: block;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.4;
}

.what i {
  display: block;
  font-style: normal;
  font-size: 12.5px;
  color: var(--dim);
  margin-top: 1px;
}

/* ---------- 站内 ---------- */
.st-count {
  font-size: 12px;
  color: var(--dim);
  letter-spacing: 0.04em;
  margin-bottom: 12px;
}

.st-title {
  font-size: 22px;
  margin: 4px 0 6px;
  letter-spacing: -0.02em;
}

.st-hint {
  font-size: 13px;
  color: var(--dim);
  line-height: 1.6;
  margin: 8px 0;
}

.st-q {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.4;
  margin: 14px 0 6px;
}

.st-en {
  font-size: 23px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.01em;
  margin: 10px 0;
}

.st-zh-big {
  font-size: 25px;
  font-weight: 600;
  line-height: 1.45;
  margin: 26px 0 8px;
}

.st-zh-sm {
  font-size: 13.5px;
  color: var(--dim);
  margin: 6px 0;
}

.st-link {
  font-size: 12.5px;
  color: var(--blue);
  margin: 4px 0;
  line-height: 1.55;
}

.st-say {
  font-size: 12.5px;
  color: var(--amber);
  margin: 4px 0;
}

.st-note {
  font-size: 12.5px;
  color: #7f8ea1;
  line-height: 1.55;
  margin: 6px 0;
}

.say-card {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  margin: 12px 0;
  transition: filter 0.2s;
}

.hidden-text .st-en {
  filter: blur(7px);
  user-select: none;
}

.ear {
  width: 92px;
  height: 92px;
  margin: 26px auto 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 34px;
  color: var(--mint);
  background: radial-gradient(circle, rgba(121, 242, 192, 0.18), rgba(121, 242, 192, 0.02) 70%);
  border: 1px solid rgba(121, 242, 192, 0.2);
  animation: breathe 3.2s ease-in-out infinite;
}

@keyframes breathe {
  50% {
    transform: scale(1.06);
    opacity: 0.85;
  }
}

.big-emoji {
  font-size: 54px;
  text-align: center;
  margin: 8px 0;
}

.frame {
  font-size: 22px;
  font-weight: 600;
  line-height: 1.5;
  margin: 18px 0 10px;
}

.slot {
  color: var(--mint);
  border-bottom: 2px solid rgba(121, 242, 192, 0.5);
  padding: 0 3px;
}

.slot-chip {
  display: inline-block;
  background: rgba(121, 242, 192, 0.12);
  border: 1px solid rgba(121, 242, 192, 0.3);
  color: var(--mint);
  border-radius: 10px;
  padding: 6px 12px;
  font-size: 15px;
  font-weight: 600;
}

.reveal {
  font-size: 20px;
  font-weight: 600;
  margin: 14px 0;
  color: #dff8ee;
  animation: fade 0.2s ease;
}

.reveal-model {
  background: rgba(138, 180, 255, 0.08);
  border: 1px solid rgba(138, 180, 255, 0.22);
  color: #cfe0ff;
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 14.5px;
  line-height: 1.6;
  margin: 10px 0;
}

/* 选项 */
.opts {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

.opt {
  text-align: left;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--line2);
  background: rgba(255, 255, 255, 0.04);
  color: var(--txt);
  font-size: 16px;
  line-height: 1.4;
  touch-action: manipulation;
}

.opt:active {
  transform: scale(0.99);
}

.opt.correct {
  border-color: rgba(121, 242, 192, 0.65);
  background: rgba(121, 242, 192, 0.13);
}

.opt.wrong {
  border-color: rgba(255, 139, 139, 0.5);
  background: rgba(255, 139, 139, 0.1);
}

.opt:disabled {
  opacity: 0.9;
}

/* 输入 */
.inline {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.input {
  flex: 1;
  min-width: 0;
  min-height: 50px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line2);
  border-radius: 14px;
  color: var(--txt);
  padding: 12px 14px;
  font-size: 16px;
}

.input:focus,
.textarea:focus {
  outline: none;
  border-color: rgba(121, 242, 192, 0.55);
  background: rgba(121, 242, 192, 0.06);
}

.textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line2);
  border-radius: 14px;
  color: var(--txt);
  padding: 12px 14px;
  font-size: 16px;
  line-height: 1.6;
  margin: 10px 0;
  resize: vertical;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 10px 0;
}

.chip {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--line2);
  color: var(--txt);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 15px;
  touch-action: manipulation;
}

.chip:active {
  background: rgba(121, 242, 192, 0.18);
}

.must-chip {
  display: inline-block;
  font-size: 12px;
  border: 1px dashed rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 3px 8px;
  color: var(--dim);
  margin: 0 6px 6px 0;
}

.must-chip.ok {
  border-style: solid;
  border-color: rgba(121, 242, 192, 0.5);
  color: var(--mint);
}

.must-chip.bad {
  border-color: rgba(255, 139, 139, 0.45);
  color: #ffb4b4;
}

.built {
  min-height: 58px;
  font-size: 19px;
  line-height: 1.5;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.025);
  color: var(--txt);
}

.blank {
  color: var(--amber);
  letter-spacing: 0.06em;
}

/* 结果 / 评分 */
.result {
  font-size: 14px;
  border-radius: 12px;
  padding: 9px 12px;
  margin: 12px 0;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.result.ok {
  color: var(--mint);
  border-color: rgba(121, 242, 192, 0.35);
  background: rgba(121, 242, 192, 0.08);
}

.result.bad {
  color: #ffb4b4;
  border-color: rgba(255, 139, 139, 0.3);
  background: rgba(255, 139, 139, 0.07);
}

.marks {
  font-size: 16px;
  line-height: 1.8;
  word-break: break-word;
}

.marks .ok {
  color: var(--mint);
}

.marks .bad {
  color: #ff9d9d;
  border-bottom: 1px dashed rgba(255, 157, 157, 0.6);
}

.gradebar {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.grade {
  flex: 1;
  min-height: 46px;
  border-radius: 12px;
  border: 1px solid var(--line2);
  background: rgba(255, 255, 255, 0.04);
  color: var(--txt);
  font-size: 13.5px;
  font-weight: 600;
  padding: 6px 4px;
  touch-action: manipulation;
}

.grade.hot {
  border-color: rgba(121, 242, 192, 0.5);
  background: rgba(121, 242, 192, 0.12);
  color: var(--mint);
}

.grade:active {
  transform: scale(0.97);
}

/* 计时 */
.timer {
  font-size: 64px;
  font-weight: 700;
  text-align: center;
  letter-spacing: -0.04em;
  margin: 22px 0 4px;
  font-variant-numeric: tabular-nums;
}

/* ---------- 训练外壳 ---------- */
.session {
  position: fixed;
  inset: 0;
  z-index: 40;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: calc(10px + env(safe-area-inset-top)) 18px calc(26px + env(safe-area-inset-bottom));
  background: radial-gradient(90% 55% at 50% 0%, #12212c 0%, #070b10 60%) fixed, var(--bg);
  display: flex;
  flex-direction: column;
}

.session-top {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 560px;
  width: 100%;
  margin: 0 auto;
}

.sp {
  flex: 1;
  height: 5px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.09);
  overflow: hidden;
}

.sp i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--mint2), var(--mint));
  transition: width 0.35s ease;
}

.smin {
  font-size: 13px;
  color: var(--dim);
  font-variant-numeric: tabular-nums;
  min-width: 28px;
  text-align: right;
}

.st-flag {
  max-width: 560px;
  width: 100%;
  margin: 14px auto 0;
  font-size: 12.5px;
  color: var(--dim);
  display: flex;
  align-items: center;
  gap: 8px;
}

.st-flag b {
  color: var(--txt);
  font-weight: 600;
}

.st-flag.flash {
  animation: fade 0.3s ease;
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 10px rgba(121, 242, 192, 0.8);
}

.stage {
  max-width: 560px;
  width: 100%;
  margin: 0 auto;
  padding: 10px 0 40px;
  flex: 1;
  animation: fade 0.25s ease;
}

/* ---------- 总结 ---------- */
.summary {
  margin-top: 40px;
  text-align: center;
  padding: 26px 20px;
}

.summary h2 {
  font-size: 23px;
  margin: 6px 0;
}

.summary-stats {
  display: flex;
  justify-content: space-around;
  margin: 22px 0 10px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.summary-stats div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.summary-stats b {
  font-size: 26px;
  color: var(--mint);
}

.summary-stats span {
  font-size: 11.5px;
  color: var(--dim);
}

/* ---------- 进度 ---------- */
.statgrid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  text-align: center;
}

.statgrid div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.statgrid b {
  font-size: 24px;
  color: var(--mint);
  letter-spacing: -0.03em;
}

.statgrid span {
  font-size: 11px;
  color: var(--dim);
}

.heatmap {
  display: grid;
  grid-template-rows: repeat(7, 11px);
  grid-auto-flow: column;
  grid-auto-columns: 11px;
  gap: 5px;
  justify-content: space-between;
  margin: 12px 0 8px;
}

.cell {
  width: 11px;
  height: 11px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.06);
}

.cell.l1 {
  background: rgba(121, 242, 192, 0.2);
}

.cell.l2 {
  background: rgba(121, 242, 192, 0.38);
}

.cell.l3 {
  background: rgba(121, 242, 192, 0.62);
}

.cell.l4 {
  background: var(--mint);
}

.legend {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
}

.journal {
  border-top: 1px solid var(--line);
  padding: 10px 0;
}

.journal:first-of-type {
  border-top: 0;
}

.journal small {
  color: var(--dim);
  font-size: 11.5px;
}

.journal p {
  font-size: 14px;
  margin: 3px 0 0;
  color: #d5e0ec;
}

/* ---------- 句库 ---------- */
.lessonlist {
  display: flex;
  flex-direction: column;
}

.lessonrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: none;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.055);
  padding: 12px 2px;
  color: var(--txt);
  text-align: left;
  touch-action: manipulation;
}

.lessonrow:last-child {
  border-bottom: 0;
}

.lesson-main b {
  display: block;
  font-size: 16px;
  font-weight: 600;
}

.lesson-main i {
  display: block;
  font-style: normal;
  font-size: 12.5px;
  color: var(--dim);
  margin-top: 1px;
}

.lesson-side {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--dim);
  font-size: 12px;
}

.lesson-side .done {
  color: var(--mint);
  font-style: normal;
}

.pattern {
  border-top: 1px solid var(--line);
  padding: 12px 0;
}

.pattern:first-of-type {
  border-top: 0;
}

.pattern b {
  font-size: 16px;
}

.pattern i {
  display: block;
  font-style: normal;
  font-size: 12.5px;
  color: var(--dim);
  margin: 2px 0 4px;
}

.pattern small {
  font-size: 12px;
  color: #7f8ea1;
}

/* ---------- 方法页 ---------- */
.method .card h2 {
  font-size: 18px;
  margin-top: 2px;
}

.list {
  margin: 8px 0;
  padding-left: 18px;
  color: #b9c7d6;
  font-size: 14px;
  line-height: 1.7;
}

.list li {
  margin: 7px 0;
}

.list b {
  color: var(--txt);
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 12px 0;
}

.split div {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.split b {
  color: var(--mint);
  font-size: 13px;
}

.split span {
  font-size: 12.5px;
  color: var(--txt);
}

.split em {
  font-style: normal;
  font-size: 11.5px;
  color: var(--dim);
  line-height: 1.5;
}

.table div {
  display: grid;
  grid-template-columns: 30px 46px 1fr;
  gap: 10px;
  align-items: baseline;
  padding: 9px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 13px;
}

.table div:last-child {
  border-bottom: 0;
}

.table b {
  color: var(--mint);
  font-size: 13px;
}

.table span {
  color: var(--txt);
  font-weight: 600;
}

.table em {
  font-style: normal;
  color: var(--dim);
  line-height: 1.55;
}

/* ---------- 设置 ---------- */
.sheet-wrap {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: fade 0.2s ease;
}

.sheet {
  width: 100%;
  max-width: 640px;
  background: #0d151d;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 24px 24px 0 0;
  padding: 18px 18px calc(24px + env(safe-area-inset-bottom));
  animation: up 0.25s ease;
}

@keyframes up {
  from {
    transform: translateY(40px);
    opacity: 0.6;
  }
}

.sheet-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.sheet-h h3 {
  margin: 0;
  font-size: 17px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 13.5px;
  color: var(--dim);
}

.field.row {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}

.field select,
.field input[type="number"] {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line2);
  border-radius: 10px;
  color: var(--txt);
  padding: 10px 12px;
  font-size: 15px;
  width: 100%;
}

.field.row input[type="number"] {
  width: 84px;
  text-align: center;
}

.field input[type="range"] {
  width: 100%;
  accent-color: var(--mint);
}

.field input[type="checkbox"] {
  width: 24px;
  height: 24px;
  accent-color: var(--mint);
}

.field b {
  color: var(--txt);
}

/* ---------- toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(96px + env(safe-area-inset-bottom));
  transform: translate(-50%, 12px);
  background: rgba(20, 30, 40, 0.96);
  border: 1px solid var(--line2);
  color: var(--txt);
  font-size: 13.5px;
  padding: 10px 16px;
  border-radius: 99px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.22s ease;
  z-index: 80;
  max-width: 84vw;
  text-align: center;
}

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

@media (max-width: 360px) {
  .ring {
    width: 76px;
    height: 76px;
  }
  .ring-in {
    width: 62px;
    height: 62px;
  }
  .hero-text h1 {
    font-size: 23px;
  }
}

/* ---------- AI ---------- */
.ai-key .inline {
  margin-top: 10px;
}

.ai-card {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 4px 12px;
  align-items: start;
}

.ai-emoji {
  font-size: 25px;
  line-height: 1.3;
}

.ai-copy h2 {
  font-size: 16px;
  margin: 0 0 3px;
}

.ai-copy p {
  font-size: 13px;
  color: var(--dim);
  margin: 0;
  line-height: 1.55;
}

.ai-card .btn {
  grid-column: 1 / -1;
  margin-top: 10px;
  width: 100%;
}

.seg {
  display: flex;
  gap: 8px;
  margin: 8px 0 14px;
}

.seg-btn {
  flex: 1;
  min-height: 40px;
  border-radius: 11px;
  border: 1px solid var(--line2);
  background: rgba(255, 255, 255, 0.04);
  color: var(--dim);
  font-size: 14px;
  font-weight: 500;
  touch-action: manipulation;
}

.seg-btn.on {
  border-color: rgba(121, 242, 192, 0.5);
  background: rgba(121, 242, 192, 0.12);
  color: var(--mint);
  font-weight: 700;
}

.passage p {
  font-size: 17px;
  line-height: 1.75;
  color: #dce7f3;
  margin: 12px 0;
}

.qa {
  border-top: 1px solid var(--line);
  padding-top: 10px;
  margin-top: 10px;
}

.qa:first-of-type {
  border-top: 0;
  margin-top: 0;
  padding-top: 0;
}

.score-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 6px 0 10px;
}

.score {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 24px;
  font-weight: 800;
  color: var(--mint);
  background: rgba(121, 242, 192, 0.1);
  border: 1px solid rgba(121, 242, 192, 0.35);
  flex: 0 0 auto;
  font-variant-numeric: tabular-nums;
}

.grade-h {
  font-size: 12.5px;
  color: var(--dim);
  margin: 16px 0 5px;
  letter-spacing: 0.04em;
}

.grade-line {
  font-size: 16px;
  line-height: 1.6;
  color: #e6eef7;
  margin: 0 0 6px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 10px;
  padding: 10px 12px;
}

.issue {
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.issue-from {
  font-size: 13px;
  color: var(--dim);
  text-decoration: line-through;
  margin: 0;
}

.issue-to {
  font-size: 15px;
  color: var(--mint);
  margin: 2px 0;
}

.issue-why {
  font-size: 12.5px;
  color: #8fa0b4;
  margin: 0;
  line-height: 1.55;
}

.ai-grade {
  margin-top: 12px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}
