/* ==========================================================
   跟读小站 · 移动端样式
   设计：暖纸色底 + 珊瑚橙主色 + 大圆角卡片
   ========================================================== */

:root {
  --bg: #faf3e8;
  --bg-deep: #f2e5d5;
  --card: #fffdf9;
  --ink: #2c241f;
  --ink-2: #5b4a3d;
  --muted: #7c6a5b;
  --line: #eedfd0;
  --line-strong: #e3ceb9;
  --primary: #ff6f4f;
  --primary-deep: #ec5237;
  --primary-soft: #ffe8e0;
  --amber: #ffb23e;
  --amber-deep: #e89413;
  --amber-soft: #fff1d5;
  --teal: #1fa79a;
  --teal-soft: #d9f3ee;
  --violet: #7c6cf0;
  --violet-soft: #ece9ff;
  --green: #2e9b6b;
  --green-soft: #ddf3e7;
  --red: #cf4427;
  --red-soft: #ffe4dc;
  --radius-xl: 30px;
  --radius-lg: 24px;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 12px 30px rgba(125, 83, 48, 0.09);
  --shadow-strong: 0 20px 45px rgba(125, 83, 48, 0.16);
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    "Noto Sans SC", "Segoe UI", sans-serif;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
}

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

[hidden] {
  display: none !important;
}

html {
  height: 100%;
  background: #efe2d1;
}

body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1200px 620px at 6% -12%, #ffe9d2 0%, rgba(255, 233, 210, 0) 62%),
    radial-gradient(900px 520px at 104% -4%, #ffdcc8 0%, rgba(255, 220, 200, 0) 55%),
    #efe2d1;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.sheet-open {
  overflow: hidden;
}

img,
video {
  max-width: 100%;
}

button {
  font-family: inherit;
  color: inherit;
  cursor: pointer;
}

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

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

ul {
  margin: 0;
  padding: 0;
}

.ic {
  flex: none;
  display: block;
}

.app-shell {
  position: relative;
  width: 100%;
  max-width: 520px;
  min-height: 100dvh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(520px 320px at 105% 4%, rgba(255, 212, 176, 0.28) 0%, rgba(255, 212, 176, 0) 70%),
    linear-gradient(180deg, #fdf9f2 0%, #faf3e8 38%, #f6ecdf 100%);
}

@media (min-width: 640px) {
  .app-shell {
    min-height: calc(100dvh - 32px);
    margin: 16px auto;
    border-radius: 36px;
    overflow: hidden;
    box-shadow: 0 34px 80px rgba(98, 63, 32, 0.2), 0 2px 0 rgba(255, 255, 255, 0.6) inset;
  }

  .view {
    padding-top: calc(26px + var(--safe-t));
  }

  .view.read-page {
    min-height: calc(100dvh - 32px);
  }

  .tabbar {
    bottom: 30px;
  }

  .flow-actions {
    bottom: 16px;
    width: 520px;
    border-radius: 0 0 36px 36px;
  }

  .read-dock {
    bottom: 16px;
  }

  .sheet {
    margin-bottom: 16px;
    border-radius: 28px;
  }
}

.view {
  flex: 1;
  padding: calc(18px + var(--safe-t)) 20px 118px;
  animation: viewIn 0.24s ease;
}

@keyframes viewIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.view--flush {
  padding-bottom: 0;
}

.view.read-page {
  padding: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.quote-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 18px;
  background: linear-gradient(150deg, #fff8e9, #ffefd6);
  border: 1px solid #f3e2c2;
  font-size: 13px;
  line-height: 1.6;
  color: #7b5c2e;
}

.quote-note .ic {
  flex: none;
  margin-top: 2px;
}

.media-card {
  width: 100%;
}

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

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

.transcript-text {
  padding: 4px 2px 8px;
  font-size: 15px;
  line-height: 1.95;
  white-space: pre-wrap;
  color: var(--ink-2);
}

.rp-sample {
  width: 100%;
  margin: 0 0 2px;
  padding: 8px 10px;
  border-radius: 12px;
  background: #fff7e8;
  border: 1px solid #f3e2c2;
  font-size: 11.5px;
  line-height: 1.6;
  color: #7b5c2e;
  text-align: left;
}

/* ----------------------------------------------------------
   通用控件
   ---------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 50px;
  padding: 0 20px;
  border: none;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 650;
  letter-spacing: 0.01em;
  transition: transform 0.12s ease, box-shadow 0.16s ease, background 0.16s ease;
  user-select: none;
}

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

.btn.primary {
  color: #fff;
  background: linear-gradient(150deg, #ff8a63, var(--primary) 55%, #f95a3b);
  box-shadow: 0 12px 22px rgba(238, 82, 55, 0.28);
}

.btn.primary:disabled {
  opacity: 0.5;
  box-shadow: none;
}

.btn.soft {
  color: var(--primary-deep);
  background: var(--primary-soft);
}

.btn.ghost {
  color: var(--ink-2);
  background: #fff;
  border: 1.5px solid var(--line);
}

.btn.danger {
  color: #fff;
  background: linear-gradient(150deg, #e2684f, #c53a20);
  box-shadow: 0 12px 22px rgba(197, 58, 32, 0.24);
}

.btn.block {
  width: 100%;
}

.btn.sm {
  height: 40px;
  padding: 0 14px;
  font-size: 14px;
}

.btn.link {
  height: auto;
  padding: 4px;
  background: none;
  color: var(--primary-deep);
  font-size: 14px;
  font-weight: 600;
}

.icon-btn {
  width: 42px;
  height: 42px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink-2);
  transition: transform 0.12s ease, background 0.16s ease;
}

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

.icon-btn--plain {
  border-color: transparent;
  background: transparent;
}

.input,
.textarea,
.select {
  width: 100%;
  border: 1.5px solid var(--line);
  border-radius: 16px;
  background: #fffcf7;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
  padding: 13px 14px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.input::placeholder,
.textarea::placeholder {
  color: #b8a795;
}

.input:focus,
.textarea:focus,
.select:focus {
  outline: none;
  border-color: #ffb09a;
  box-shadow: 0 0 0 4px rgba(255, 111, 79, 0.14);
}

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

.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239a8879' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 24px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 560;
  color: var(--ink-2);
  background: #f4e9dc;
  white-space: nowrap;
}

.chip.primary {
  color: var(--primary-deep);
  background: var(--primary-soft);
}

.chip.teal {
  color: #15766d;
  background: var(--teal-soft);
}

.chip.amber {
  color: #96620a;
  background: var(--amber-soft);
}

.chip.ghost {
  background: #fff;
  border: 1px solid var(--line);
}

.seg {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 16px;
  background: #f4e8da;
}

.seg button {
  flex: 1;
  min-height: 38px;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: var(--ink-2);
  font-size: 13.5px;
  font-weight: 600;
  transition: background 0.16s ease, box-shadow 0.16s ease;
}

.seg button.active {
  background: #fff;
  color: var(--primary-deep);
  box-shadow: 0 4px 12px rgba(125, 83, 48, 0.12);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin: 22px 2px 12px;
}

.section-head h2 {
  font-size: 19px;
  font-weight: 750;
  letter-spacing: -0.01em;
}

.section-head span {
  font-size: 12.5px;
  color: var(--muted);
}

.card {
  background: var(--card);
  border: 1px solid rgba(238, 223, 208, 0.9);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

/* ----------------------------------------------------------
   底部导航
   ---------------------------------------------------------- */

.tabbar {
  position: fixed;
  left: 50%;
  bottom: calc(12px + var(--safe-b));
  transform: translateX(-50%);
  width: min(492px, calc(100% - 28px));
  z-index: 40;
  display: flex;
  gap: 6px;
  padding: 7px;
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: rgba(255, 252, 247, 0.9);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  box-shadow: 0 16px 34px rgba(110, 74, 42, 0.16);
}

.tabbar .tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 52px;
  border: none;
  border-radius: 19px;
  background: transparent;
  color: #7f6d5e;
  font-size: 11px;
  font-weight: 650;
  transition: background 0.18s ease, color 0.18s ease;
}

.tabbar .tab.active {
  color: var(--primary-deep);
  background: var(--primary-soft);
}

.tabbar .tab .ic {
  width: 21px;
  height: 21px;
}

/* ----------------------------------------------------------
   Toast / 弹层 / 遮罩
   ---------------------------------------------------------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(96px + var(--safe-b));
  transform: translate(-50%, 12px);
  z-index: 120;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: min(440px, calc(100% - 40px));
  padding: 11px 16px;
  border-radius: 999px;
  background: rgba(44, 36, 31, 0.94);
  color: #fffaf4;
  font-size: 13.5px;
  line-height: 1.4;
  box-shadow: 0 14px 30px rgba(40, 25, 15, 0.28);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.toast.error {
  background: rgba(139, 42, 24, 0.96);
}

.toast.success {
  background: rgba(27, 116, 82, 0.96);
}

.toast .ic {
  width: 16px;
  height: 16px;
}

.sheet-wrap {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 1;
}

.sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(46, 31, 20, 0.44);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity 0.22s ease;
}

.sheet {
  position: relative;
  width: min(520px, 100%);
  max-height: 90dvh;
  overflow-y: auto;
  padding: 8px 20px calc(18px + var(--safe-b));
  border-radius: 28px 28px 0 0;
  background: #fffbf5;
  box-shadow: 0 -20px 50px rgba(60, 38, 20, 0.2);
  transform: translateY(24px);
  opacity: 0;
  transition: transform 0.26s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.2s ease;
}

.sheet-wrap.open .sheet {
  transform: none;
  opacity: 1;
}

.sheet-wrap.open .sheet-backdrop {
  opacity: 1;
}

.sheet-wrap.closing {
  opacity: 0;
  transition: opacity 0.2s ease;
}

.sheet-grab {
  width: 38px;
  height: 4px;
  margin: 2px auto 10px;
  border-radius: 999px;
  background: #e7d6c4;
}

.sheet-head {
  padding: 2px 2px 8px;
}

.sheet-head h2 {
  font-size: 20px;
  font-weight: 750;
  letter-spacing: -0.01em;
}

.sheet-head p {
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
}

.sheet-body {
  padding: 6px 0 2px;
  font-size: 14.5px;
  color: var(--ink-2);
}

.sheet-actions {
  display: flex;
  gap: 10px;
  padding-top: 14px;
}

.sheet-actions .btn {
  flex: 1;
  min-width: 0;
}

.confirm-text {
  padding: 6px 2px 10px;
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--ink-2);
}

.overlay {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(45, 30, 18, 0.5);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  text-align: center;
  color: #fffaf3;
}

.overlay[hidden] {
  display: none;
}

.overlay .overlay-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.spinner {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  animation: spin 0.9s linear infinite;
}

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

.overlay h3 {
  font-size: 19px;
  font-weight: 700;
}

.overlay p {
  font-size: 13.5px;
  color: rgba(255, 250, 243, 0.76);
}

/* countdown */
.countdown-screen {
  position: fixed;
  inset: 0;
  z-index: 115;
  display: grid;
  place-items: center;
  background: rgba(40, 27, 16, 0.42);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.countdown-num {
  font-size: 108px;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
  animation: countPop 0.9s ease both;
}

@keyframes countPop {
  0% {
    transform: scale(0.5);
    opacity: 0;
  }
  22% {
    transform: scale(1.1);
    opacity: 1;
  }
  100% {
    transform: scale(0.94);
    opacity: 0.9;
  }
}

/* ----------------------------------------------------------
   首页
   ---------------------------------------------------------- */

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

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

.brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, #ff8a63, #ff5d3d);
  box-shadow: 0 10px 20px rgba(238, 82, 55, 0.28);
}

.brand-name {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-sub {
  margin-top: 1px;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.avatar {
  width: 42px;
  height: 42px;
  flex: none;
  border-radius: 50%;
  border: 2px solid #fff;
  background: linear-gradient(145deg, #fff0cf, #ffd79a);
  display: grid;
  place-items: center;
  font-size: 20px;
  box-shadow: var(--shadow);
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 22px 22px 18px;
  border-radius: var(--radius-xl);
  color: #fff9f2;
  background:
    radial-gradient(340px 180px at 92% -10%, rgba(255, 255, 255, 0.42) 0%, rgba(255, 255, 255, 0) 62%),
    linear-gradient(145deg, #ff8a63 0%, #ff7a56 44%, #f7593b 100%);
  box-shadow: 0 22px 40px rgba(226, 79, 49, 0.26);
}

.hero::after {
  content: "";
  position: absolute;
  right: -36px;
  bottom: -46px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  border: 22px solid rgba(255, 255, 255, 0.12);
}

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

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 650;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(6px);
}

.hero-date {
  font-size: 12px;
  opacity: 0.82;
}

.hero h1 {
  position: relative;
  z-index: 1;
  font-size: 27px;
  line-height: 1.38;
  font-weight: 800;
  letter-spacing: -0.025em;
}

.hero p {
  position: relative;
  z-index: 1;
  margin-top: 8px;
  max-width: 82%;
  font-size: 13px;
  line-height: 1.65;
  color: rgba(255, 250, 243, 0.94);
}

.hero-stats {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 4px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.24);
}

.hero-stat {
  flex: 1;
}

.hero-stat b {
  display: block;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.1;
}

.hero-stat span {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: rgba(255, 250, 243, 0.86);
}

.task-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.task-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  padding: 13px 14px;
  border: 1px solid rgba(238, 223, 208, 0.9);
  border-radius: var(--radius-lg);
  background: var(--card);
  box-shadow: var(--shadow);
  text-align: left;
  transition: transform 0.14s ease, box-shadow 0.2s ease;
}

.task-card:active {
  transform: scale(0.985);
  box-shadow: 0 6px 16px rgba(125, 83, 48, 0.12);
}

.task-cover {
  position: relative;
  width: 58px;
  height: 58px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 19px;
  font-size: 27px;
  background: linear-gradient(150deg, #ffe4c5, #ffc987);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.55);
}

.task-cover.c1 {
  background: linear-gradient(150deg, #d9f4ee, #9adfd3);
}
.task-cover.c2 {
  background: linear-gradient(150deg, #ece9ff, #c4bafe);
}
.task-cover.c3 {
  background: linear-gradient(150deg, #ffe1e1, #ffb9b2);
}
.task-cover.c4 {
  background: linear-gradient(150deg, #e8f0d8, #c4db9d);
}
.task-cover.c5 {
  background: linear-gradient(150deg, #ffeccc, #ffd28f);
}

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

.task-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 16.5px;
  font-weight: 720;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.task-title .dot {
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 50%;
  background: var(--primary);
}

.task-snippet {
  margin-top: 3px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 7px;
}

.task-score {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding-left: 4px;
}

.score-badge {
  min-width: 46px;
  height: 46px;
  padding: 0 8px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
  background: linear-gradient(150deg, #59c79a, #1e9a6b);
  box-shadow: 0 8px 16px rgba(30, 154, 107, 0.24);
}

.score-badge.mid {
  background: linear-gradient(150deg, #ffc469, #f19b22);
  box-shadow: 0 8px 16px rgba(241, 155, 34, 0.24);
}

.score-badge.low {
  background: linear-gradient(150deg, #ff9b83, #e75a3a);
  box-shadow: 0 8px 16px rgba(231, 90, 58, 0.22);
}

.score-badge.unread {
  background: #f1e7da;
  color: #756253;
  box-shadow: none;
  font-size: 12px;
  font-weight: 650;
}

.score-label {
  font-size: 10px;
  color: var(--muted);
}

.fab {
  position: fixed;
  right: max(20px, calc(50% - 246px));
  bottom: calc(96px + var(--safe-b));
  z-index: 35;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 52px;
  padding: 0 20px 0 16px;
  border: none;
  border-radius: 999px;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  background: linear-gradient(145deg, #ff8a63, #f45637);
  box-shadow: 0 16px 30px rgba(238, 82, 55, 0.34);
  transition: transform 0.14s ease;
}

.fab:active {
  transform: scale(0.95);
}

.fab .ic {
  width: 20px;
  height: 20px;
}

/* ----------------------------------------------------------
   空状态
   ---------------------------------------------------------- */

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 30px 22px;
  border: 1.5px dashed #e2cdb7;
  border-radius: var(--radius-lg);
  background: rgba(255, 253, 249, 0.7);
  text-align: center;
}

.empty-art {
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  margin-bottom: 12px;
  border-radius: 50%;
  font-size: 40px;
  background: radial-gradient(circle at 35% 25%, #fff6df, #ffe2b6);
  box-shadow: 0 12px 24px rgba(175, 121, 52, 0.16);
}

.empty h3 {
  font-size: 17px;
  font-weight: 720;
}

.empty p {
  max-width: 260px;
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.65;
  color: var(--muted);
}

.empty .btn {
  margin-top: 16px;
}

/* ----------------------------------------------------------
   流程页头
   ---------------------------------------------------------- */

.flow-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.flow-head .flow-title {
  flex: 1;
  min-width: 0;
}

.flow-head h1 {
  font-size: 20px;
  font-weight: 780;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.flow-head p {
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.form-card {
  margin-bottom: 14px;
  padding: 16px;
  border-radius: var(--radius-lg);
  background: var(--card);
  border: 1px solid rgba(238, 223, 208, 0.9);
  box-shadow: var(--shadow);
}

.field {
  margin-bottom: 14px;
}

.field:last-child {
  margin-bottom: 0;
}

.field-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
  font-size: 12.5px;
  font-weight: 680;
  letter-spacing: 0.02em;
  color: var(--ink-2);
}

.field-label .hint {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
}

.emoji-pick {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0 4px;
  scrollbar-width: none;
}

.emoji-pick::-webkit-scrollbar {
  display: none;
}

.emoji-option {
  width: 44px;
  height: 44px;
  flex: none;
  display: grid;
  place-items: center;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: #fffcf7;
  font-size: 22px;
  transition: transform 0.12s ease, border-color 0.16s ease, background 0.16s ease;
}

.emoji-option.active {
  border-color: #ffb09a;
  background: var(--primary-soft);
  transform: translateY(-2px);
}

.upload-zone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 18px 12px;
  border: 1.5px dashed #e0c9b2;
  border-radius: 18px;
  background: #fffcf7;
  text-align: center;
  transition: border-color 0.16s ease, background 0.16s ease;
}

.upload-zone:active {
  background: #fff7ec;
  border-color: #ffb09a;
}

.upload-zone .uz-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--primary-deep);
  background: var(--primary-soft);
}

.upload-zone b {
  font-size: 14px;
  font-weight: 650;
}

.upload-zone span {
  font-size: 11.5px;
  color: var(--muted);
}

.upload-zone input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.media-attached {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 16px;
  background: #fffcf7;
  border: 1.5px solid var(--line);
}

.media-attached .ma-icon {
  width: 38px;
  height: 38px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--teal-soft);
  color: #15766d;
}

.media-attached .ma-info {
  flex: 1;
  min-width: 0;
}

.media-attached b {
  display: block;
  font-size: 13.5px;
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.media-attached span {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: var(--muted);
}

.mini-btn {
  width: 34px;
  height: 34px;
  flex: none;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 50%;
  background: #f6ebdf;
  color: var(--ink-2);
}

.media-tools {
  display: flex;
  gap: 8px;
  margin-top: 9px;
}

.media-tools .btn {
  flex: 1;
  height: 38px;
  font-size: 12.5px;
  padding: 0 10px;
}

.flow-actions {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  z-index: 45;
  width: min(520px, 100%);
  padding: 12px 20px calc(14px + var(--safe-b));
  background: linear-gradient(180deg, rgba(250, 243, 232, 0) 0%, rgba(250, 243, 232, 0.92) 34%, #f9f1e6 100%);
}

.flow-actions .btn {
  width: 100%;
  box-shadow: 0 14px 26px rgba(238, 82, 55, 0.28);
}

/* ----------------------------------------------------------
   任务详情
   ---------------------------------------------------------- */

.detail-title {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 16px;
}

.detail-emoji {
  width: 66px;
  height: 66px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 22px;
  font-size: 32px;
  background: linear-gradient(150deg, #ffe7c8, #ffc98a);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6), 0 12px 22px rgba(184, 124, 47, 0.16);
}

.detail-title h1 {
  font-size: 23px;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: -0.02em;
}

.detail-title .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 7px;
}

.media-block {
  margin-bottom: 14px;
}

.video-frame {
  width: 100%;
  border-radius: 20px;
  background: #1f1712;
  box-shadow: var(--shadow);
  max-height: 320px;
}

.media-empty {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  background: #fff9ef;
  border: 1.5px dashed #e4cdb5;
}

.media-empty .me-icon {
  width: 42px;
  height: 42px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--amber-soft);
  color: var(--amber-deep);
}

.media-empty p {
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--muted);
}

.text-card {
  margin-bottom: 14px;
  padding: 16px;
  border-radius: var(--radius-lg);
  background: var(--card);
  border: 1px solid rgba(238, 223, 208, 0.9);
  box-shadow: var(--shadow);
}

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

.text-card .tc-head h3 {
  font-size: 14px;
  font-weight: 720;
}

.text-card .tc-head .chip {
  font-size: 11px;
}

.text-body {
  position: relative;
  font-size: 16px;
  line-height: 1.95;
  color: var(--ink-2);
  letter-spacing: 0.01em;
  max-height: 132px;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.text-body.expanded {
  max-height: 2000px;
}

.text-body::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 44px;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 253, 249, 0), #fffdf9 80%);
}

.text-body.expanded::after {
  display: none;
}

.text-toggle {
  margin-top: 6px;
  font-size: 12.5px;
}

.attempts-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.attempt-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border-radius: 18px;
  background: var(--card);
  border: 1px solid rgba(238, 223, 208, 0.9);
  box-shadow: 0 8px 20px rgba(125, 83, 48, 0.06);
  text-align: left;
}

.attempt-score {
  width: 44px;
  height: 44px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 800;
  color: #fff;
}

.attempt-score.t-teal {
  background: linear-gradient(150deg, #59c79a, #1e9a6b);
}
.attempt-score.t-amber {
  background: linear-gradient(150deg, #ffc469, #f19b22);
}
.attempt-score.t-red {
  background: linear-gradient(150deg, #ff9b83, #e75a3a);
}

.attempt-info {
  flex: 1;
  min-width: 0;
}

.attempt-info b {
  display: block;
  font-size: 13.5px;
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.attempt-info span {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: var(--muted);
}

.attempt-arrow {
  flex: none;
  color: #c1ae9c;
}

.detail-actions {
  display: flex;
  gap: 10px;
  margin-top: 6px;
}

.detail-actions .btn {
  flex: 1;
}

/* ----------------------------------------------------------
   跟读页
   ---------------------------------------------------------- */

.read-page {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding-bottom: 0;
}

.read-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: calc(14px + var(--safe-t)) 18px 10px;
}

.read-title {
  flex: 1;
  min-width: 0;
  text-align: center;
}

.read-title h1 {
  font-size: 16px;
  font-weight: 750;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.read-title p {
  margin-top: 1px;
  font-size: 11px;
  color: var(--muted);
}

.read-mode-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  margin-top: 3px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 10.5px;
  color: var(--muted);
}

.read-scroll {
  flex: 1;
  padding: 8px 20px 178px;
  overflow-y: auto;
  scrollbar-width: none;
}

.read-scroll::-webkit-scrollbar {
  display: none;
}

.read-guide {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding: 13px 14px;
  border-radius: 20px;
  background: linear-gradient(150deg, #fff8ec, #fff1db);
  border: 1px solid #f3e0c4;
}

.read-guide .rg-icon {
  width: 42px;
  height: 42px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: var(--amber-deep);
  background: #ffe7b5;
}

.read-guide .rg-text {
  flex: 1;
  min-width: 0;
}

.read-guide b {
  font-size: 13.5px;
  font-weight: 700;
}

.read-guide p {
  margin-top: 2px;
  font-size: 11.5px;
  color: var(--muted);
}

.read-guide .rg-play {
  width: 40px;
  height: 40px;
  flex: none;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, #ffb03f, #f08a12);
  box-shadow: 0 8px 16px rgba(240, 138, 18, 0.28);
}

.read-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  padding: 0 2px;
}

.rp-track {
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: #f2e5d5;
  overflow: hidden;
}

.rp-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #58c79b, #1fa079);
  transition: width 0.35s ease;
}

.rp-text {
  flex: none;
  font-size: 11px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.read-card {
  position: relative;
  padding: 20px 20px 24px;
  border-radius: 26px;
  background:
    radial-gradient(400px 200px at 100% 0, rgba(255, 226, 186, 0.35), transparent 70%),
    #fffdf8;
  border: 1px solid rgba(238, 223, 208, 0.9);
  box-shadow: 0 16px 34px rgba(125, 83, 48, 0.1);
}

.read-text {
  font-size: 27px;
  line-height: 2.02;
  letter-spacing: 0.015em;
  font-weight: 550;
  color: #3a2d24;
}

.rtoken {
  border-radius: 7px;
  transition: color 0.18s ease, background 0.18s ease;
}

.rtoken.done {
  color: #1b8257;
}

.rtoken.current {
  color: #37261a;
  background: #ffe0a0;
  box-shadow: 0 0 0 4px #ffe0a0, 0 4px 12px rgba(240, 165, 38, 0.25);
}

.read-placeholder {
  color: #c2ae9a;
  font-size: 13.5px;
  line-height: 1.7;
  margin-top: 14px;
}

.read-tip {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 14px;
  font-size: 11.5px;
  color: var(--muted);
}

.read-dock {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  z-index: 30;
  width: min(520px, 100%);
  padding: 6px 20px calc(16px + var(--safe-b));
  background: linear-gradient(180deg, rgba(250, 243, 232, 0) 0%, rgba(250, 243, 232, 0.94) 26%, #f9f1e6 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.dock-wave {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
  height: 24px;
  opacity: 0.9;
}

.dock-wave i {
  width: 5px;
  min-height: 5px;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffd08a, #ff9d45);
  transition: height 0.11s ease;
}

.dock-wave.recording i {
  background: linear-gradient(180deg, #ffb1a0, #ff6f4f);
}

.dock-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--ink-2);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.dock-status .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #d8c6b2;
}

.dock-status.recording .dot {
  background: #ff5a3c;
  box-shadow: 0 0 0 4px rgba(255, 90, 60, 0.16);
  animation: blink 1.2s ease infinite;
}

@keyframes blink {
  50% {
    opacity: 0.35;
  }
}

.mic-wrap {
  position: relative;
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
}

.mic-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(255, 111, 79, 0.28);
  animation: ringPulse 2.4s ease infinite;
}

.mic-btn {
  position: relative;
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border: 4px solid #fff;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, #ff9069, #f45436);
  box-shadow: 0 14px 26px rgba(238, 82, 55, 0.34);
  transition: transform 0.14s ease;
}

.mic-btn:active {
  transform: scale(0.95);
}

.mic-btn.recording {
  background: linear-gradient(145deg, #ff6a4d, #e33f22);
  animation: micPulse 1.6s ease infinite;
}

.mic-btn .ic {
  width: 30px;
  height: 30px;
}

@keyframes ringPulse {
  0% {
    transform: scale(0.94);
    opacity: 0.55;
  }
  70% {
    transform: scale(1.16);
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}

@keyframes micPulse {
  0% {
    box-shadow: 0 14px 26px rgba(238, 82, 55, 0.34), 0 0 0 0 rgba(227, 63, 34, 0.32);
  }
  70% {
    box-shadow: 0 14px 26px rgba(238, 82, 55, 0.34), 0 0 0 16px rgba(227, 63, 34, 0);
  }
}

.dock-links {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 20px;
}

.dock-links .btn.link {
  font-size: 12px;
  color: var(--primary-deep);
}

.dock-links .btn.link.muted {
  color: var(--muted);
}

.dock-finish {
  display: none;
  height: 36px;
  padding: 0 16px;
  border: none;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 650;
  color: #fff;
  background: #2c9b70;
}

.dock-finish.show {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ----------------------------------------------------------
   报告
   ---------------------------------------------------------- */

.report-hero {
  position: relative;
  overflow: hidden;
  padding: 22px;
  border-radius: var(--radius-xl);
  color: #fffaf3;
  background:
    radial-gradient(300px 200px at 88% -14%, rgba(255, 255, 255, 0.34), transparent 62%),
    linear-gradient(145deg, #3a2b23 0%, #5a3b2b 48%, #7a4a31 100%);
  box-shadow: 0 22px 40px rgba(58, 43, 35, 0.26);
}

.report-hero.great {
  background:
    radial-gradient(300px 200px at 88% -14%, rgba(255, 255, 255, 0.4), transparent 62%),
    linear-gradient(145deg, #ff8a63, #ff6c4c 60%, #ef5134);
  box-shadow: 0 22px 40px rgba(238, 82, 55, 0.28);
}

.report-hero.good {
  background:
    radial-gradient(300px 200px at 88% -14%, rgba(255, 255, 255, 0.34), transparent 62%),
    linear-gradient(145deg, #f3a63a, #ee8b1b 62%, #dd7810);
  box-shadow: 0 22px 40px rgba(221, 120, 16, 0.26);
}

.report-hero.low {
  background:
    radial-gradient(300px 200px at 88% -14%, rgba(255, 255, 255, 0.3), transparent 62%),
    linear-gradient(145deg, #e9755c, #d2482c 62%, #b9351f);
  box-shadow: 0 22px 40px rgba(185, 53, 31, 0.24);
}

.report-hero::after {
  content: "";
  position: absolute;
  right: -30px;
  top: -40px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  border: 26px solid rgba(255, 255, 255, 0.1);
}

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

.rh-date {
  font-size: 11.5px;
  color: rgba(255, 250, 243, 0.82);
}

.rh-band {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 650;
  background: rgba(255, 255, 255, 0.18);
}

.rh-main {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  gap: 14px;
  margin-top: 14px;
}

.rh-score {
  display: flex;
  align-items: flex-start;
  line-height: 1;
}

.rh-score b {
  font-size: 62px;
  font-weight: 800;
  letter-spacing: -0.05em;
}

.rh-score span {
  margin-top: 8px;
  margin-left: 3px;
  font-size: 14px;
  font-weight: 600;
  opacity: 0.72;
}

.rh-side {
  padding-bottom: 6px;
}

.rh-side .stars {
  display: flex;
  gap: 2px;
}

.star-slot {
  display: inline-flex;
  color: rgba(255, 250, 243, 0.3);
}

.star-slot.on {
  color: #ffd36a;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.18));
}

.star-slot .star {
  display: block;
}

.rh-side p {
  margin-top: 6px;
  max-width: 230px;
  font-size: 12px;
  line-height: 1.6;
  color: rgba(255, 250, 243, 0.88);
}

.rh-comment {
  position: relative;
  z-index: 1;
  margin-top: 12px;
  font-size: 13.5px;
  line-height: 1.65;
  color: rgba(255, 250, 243, 0.94);
}

.metric-card {
  margin-top: 14px;
  padding: 16px;
  border-radius: var(--radius-lg);
  background: var(--card);
  border: 1px solid rgba(238, 223, 208, 0.9);
  box-shadow: var(--shadow);
}

.metric-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 13px;
}

.metric-row:last-child {
  margin-bottom: 0;
}

.metric-name {
  width: 52px;
  flex: none;
  font-size: 12px;
  font-weight: 650;
  color: var(--ink-2);
}

.metric-track {
  flex: 1;
  height: 9px;
  border-radius: 999px;
  background: #f4e9dc;
  overflow: hidden;
}

.metric-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  transition: width 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.metric-fill.teal {
  background: linear-gradient(90deg, #63d0ac, #1c9b72);
}
.metric-fill.amber {
  background: linear-gradient(90deg, #ffd37e, #f0a01f);
}
.metric-fill.violet {
  background: linear-gradient(90deg, #b3a8ff, #7b6cef);
}
.metric-fill.gray {
  background: #e4d7c8;
}

.metric-value {
  width: 40px;
  flex: none;
  text-align: right;
  font-size: 14px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.metric-note {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  font-size: 11px;
  color: var(--muted);
  line-height: 1.5;
}

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

.stat-tile {
  padding: 10px 8px;
  border-radius: 16px;
  background: #fffcf6;
  border: 1px solid var(--line);
  text-align: center;
}

.stat-tile b {
  display: block;
  font-size: 17px;
  font-weight: 780;
  letter-spacing: -0.02em;
}

.stat-tile span {
  display: block;
  margin-top: 2px;
  font-size: 10.5px;
  color: var(--muted);
}

.sentence-card {
  margin-top: 12px;
  padding: 13px 15px 12px;
  border-radius: 18px;
  background: var(--card);
  border: 1px solid rgba(238, 223, 208, 0.9);
  border-left: 4px solid #3fae83;
  box-shadow: 0 8px 20px rgba(125, 83, 48, 0.06);
}

.sentence-card.warn {
  border-left-color: #f0a01f;
}

.sentence-card.bad {
  border-left-color: #e15b3d;
}

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

.sc-index {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-transform: uppercase;
}

.sc-badge {
  font-size: 10.5px;
  font-weight: 650;
  padding: 2px 7px;
  border-radius: 999px;
  color: #157a55;
  background: var(--green-soft);
}

.sc-badge.warn {
  color: #96620a;
  background: var(--amber-soft);
}

.sc-badge.bad {
  color: #a5361d;
  background: var(--red-soft);
}

.sc-text {
  font-size: 16.5px;
  line-height: 1.95;
  letter-spacing: 0.01em;
  color: var(--ink);
}

.tok.ok {
  color: var(--ink);
}

.tok.sub {
  color: #a86307;
  background: #fff0ce;
  border-radius: 4px;
  border-bottom: 1.5px dotted #e0a03b;
}

.tok.missing {
  color: #b23b23;
  background: #ffe3da;
  border-radius: 4px;
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}

.tok.punct {
  color: #8f7f71;
}

.sc-detail {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}

.detail-chip {
  font-size: 10.5px;
  line-height: 1.4;
  padding: 2px 7px;
  border-radius: 6px;
  color: #8e4d05;
  background: #fff6e3;
}

.detail-chip.miss {
  color: #a5361d;
  background: #fff0eb;
}

.advice-card {
  margin-top: 14px;
  padding: 16px;
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, #fff8e8, #fff2d9);
  border: 1px solid #f3e2c2;
}

.ac-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.ac-head h3 {
  font-size: 14.5px;
  font-weight: 750;
}

.ac-head .ic {
  color: var(--amber-deep);
}

.advice-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.advice-item {
  display: flex;
  gap: 8px;
  font-size: 13.5px;
  line-height: 1.7;
  color: #5d4525;
}

.advice-num {
  width: 19px;
  height: 19px;
  flex: none;
  margin-top: 2px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 10.5px;
  font-weight: 700;
  color: #fff;
  background: #eaa02a;
}

.note-card {
  margin-top: 14px;
  padding: 16px;
  border-radius: var(--radius-lg);
  background: var(--card);
  border: 1px solid rgba(238, 223, 208, 0.9);
  box-shadow: var(--shadow);
}

.note-card h3 {
  margin-bottom: 8px;
  font-size: 14.5px;
  font-weight: 720;
}

.note-card .textarea {
  min-height: 80px;
  font-size: 14px;
}

.note-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}

.report-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.report-actions .btn {
  flex: 1;
}

.report-missing {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  background: var(--red-soft);
  color: #8c3a26;
  font-size: 12.5px;
  line-height: 1.6;
}

.more-sentences {
  margin-top: 12px;
  text-align: center;
}

/* ----------------------------------------------------------
   播放器
   ---------------------------------------------------------- */

.player {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 20px;
  background: #fffcf7;
  border: 1.5px solid var(--line);
}

.player-btn {
  width: 46px;
  height: 46px;
  flex: none;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, #ff8a63, #f45436);
  box-shadow: 0 8px 16px rgba(238, 82, 55, 0.26);
}

.player-btn .ic {
  width: 20px;
  height: 20px;
}

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

.player-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.player-top b {
  font-size: 12.5px;
  font-weight: 650;
}

.player-top span {
  font-size: 10.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.player-track {
  position: relative;
  height: 22px;
  display: flex;
  align-items: center;
}

.player-track input[type="range"] {
  width: 100%;
  height: 22px;
  margin: 0;
  appearance: none;
  background: transparent;
  position: relative;
  z-index: 2;
}

.player-track input[type="range"]::-webkit-slider-runnable-track {
  height: 5px;
  border-radius: 999px;
  background: #f1e4d4;
}

.player-track input[type="range"]::-moz-range-track {
  height: 5px;
  border-radius: 999px;
  background: #f1e4d4;
}

.player-track input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 13px;
  height: 13px;
  margin-top: -4px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--primary);
  box-shadow: 0 2px 6px rgba(238, 82, 55, 0.25);
}

.player-track .pt-fill {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 5px;
  border-radius: 999px;
  background: linear-gradient(90deg, #ffb07d, #ff6f4f);
  pointer-events: none;
  z-index: 1;
  width: 0%;
}

.player-speed {
  display: flex;
  gap: 2px;
  flex: none;
  padding: 2px;
  border-radius: 999px;
  background: #f6ecdf;
}

.player-speed button {
  width: 34px;
  height: 26px;
  border: none;
  border-radius: 999px;
  background: transparent;
  font-size: 10.5px;
  font-weight: 650;
  color: var(--muted);
}

.player-speed button.active {
  background: #fff;
  color: var(--primary-deep);
  box-shadow: 0 2px 6px rgba(125, 83, 48, 0.12);
}

/* ----------------------------------------------------------
   记录页
   ---------------------------------------------------------- */

.history-summary {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.summary-tile {
  flex: 1;
  padding: 13px 12px;
  border-radius: 18px;
  background: var(--card);
  border: 1px solid rgba(238, 223, 208, 0.9);
  box-shadow: var(--shadow);
}

.summary-tile b {
  display: block;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--primary-deep);
}

.summary-tile span {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: var(--muted);
}

.day-group {
  margin-bottom: 16px;
}

.day-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 2px 8px;
  font-size: 12.5px;
  font-weight: 650;
  color: var(--muted);
}

.day-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.history-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px;
  border-radius: 18px;
  background: var(--card);
  border: 1px solid rgba(238, 223, 208, 0.9);
  box-shadow: 0 8px 20px rgba(125, 83, 48, 0.06);
  text-align: left;
}

.history-emoji {
  width: 44px;
  height: 44px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 14px;
  font-size: 21px;
  background: #fdf0dd;
}

.history-info {
  flex: 1;
  min-width: 0;
}

.history-info b {
  display: block;
  font-size: 13.5px;
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history-info span {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: var(--muted);
}

.history-score {
  flex: none;
  min-width: 42px;
  height: 42px;
  padding: 0 7px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 800;
  color: #1e8a61;
  background: var(--green-soft);
}

.history-score.mid {
  color: #96620a;
  background: var(--amber-soft);
}

.history-score.low {
  color: #a5361d;
  background: var(--red-soft);
}

/* ----------------------------------------------------------
   设置页
   ---------------------------------------------------------- */

.settings-group {
  margin-bottom: 14px;
  border-radius: var(--radius-lg);
  background: var(--card);
  border: 1px solid rgba(238, 223, 208, 0.9);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.settings-group > h3 {
  padding: 14px 16px 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-transform: uppercase;
}

.settings-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-top: 1px solid #f4e9dc;
}

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

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

.settings-row b {
  display: block;
  font-size: 13.5px;
  font-weight: 650;
}

.settings-row span {
  display: block;
  margin-top: 2px;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--muted);
}

.settings-row input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  text-align: right;
  font-size: 14px;
  color: var(--ink-2);
  padding: 4px;
}

.settings-row input:focus {
  outline: none;
}

.settings-pad {
  padding: 4px 16px 16px;
}

.settings-pad .field-label {
  margin-top: 10px;
}

.settings-actions {
  display: flex;
  gap: 8px;
  padding: 0 16px 16px;
}

.settings-actions .btn {
  flex: 1;
  height: 42px;
  font-size: 13px;
}

.about-card {
  padding: 18px 16px;
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, #fff8ec, #ffefd8);
  border: 1px solid #f3e2c2;
}

.about-card h3 {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  font-weight: 720;
}

.about-card p {
  margin-top: 6px;
  font-size: 11.5px;
  line-height: 1.7;
  color: #7b6347;
}

.about-card .version {
  margin-top: 10px;
  font-size: 10.5px;
  color: #a08a70;
  letter-spacing: 0.04em;
}

/* ----------------------------------------------------------
   小工具 / 响应式
   ---------------------------------------------------------- */

.tip-line {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-top: 10px;
  font-size: 11.5px;
  line-height: 1.55;
  color: var(--muted);
}

.tip-line .ic {
  margin-top: 1px;
}

.record-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 10px 0 2px;
}

.record-panel .rp-wave {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 30px;
}

.record-panel .rp-wave i {
  width: 5px;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffd08a, #ff9d45);
}

.record-panel .rp-time {
  font-size: 22px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.record-panel .rp-btn {
  width: 64px;
  height: 64px;
  border: 4px solid #fff;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, #ff8a63, #f45436);
  box-shadow: 0 12px 24px rgba(238, 82, 55, 0.3);
  display: grid;
  place-items: center;
}

.record-panel .rp-btn.recording {
  background: linear-gradient(145deg, #ff6a4d, #e33f22);
}

.record-panel .rp-hint {
  font-size: 11.5px;
  color: var(--muted);
}

.record-panel .rp-preview {
  width: 100%;
}

@media (max-width: 380px) {
  .view {
    padding-left: 16px;
    padding-right: 16px;
  }
  .hero h1 {
    font-size: 24px;
  }
  .rh-score b {
    font-size: 54px;
  }
  .read-text {
    font-size: 24px;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .tabbar {
    width: calc(100% - 24px);
  }
}
