/* 提肛陪伴 — 移动优先样式表(零依赖,纯 CSS) */

:root {
  --teal: #0f9b8e;
  --teal-dark: #0b7d73;
  --teal-soft: #e4f2f0;
  --teal-line: #bfe2dd;
  --bg: #f6f8f7;
  --surface: #ffffff;
  --text: #1c2b2a;
  --muted: #6d8280;
  --line: #e3ebe9;
  --danger: #c2544d;
  /* 暖色只服务于两件事:连续天数(火苗)与「维持」阶段 —— 全局唯一的暖调,用来标记「最需要使劲的地方」 */
  --flame: #e0913a;
  --flame-soft: #fbeedc;
  --flame-ink: #9a5f16;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(16, 50, 47, .05), 0 8px 22px rgba(16, 50, 47, .06);
  --tabbar-h: 58px;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  padding: 0 0 calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px));
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Source Han Sans SC",
    Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overscroll-behavior-y: none;
}

/*
 * 撑满一屏并让引导圆吃掉剩余空间:高屏上圆居中而不是内容堆在顶部、底下一大块空;
 * 矮屏上 .coach 的 min-height 兜底,圆不会被压扁。
 */
.app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: calc(100dvh - var(--tabbar-h) - env(safe-area-inset-bottom, 0px));
  max-width: 480px;
  margin: 0 auto;
  padding: 0 16px;
}

.app-main {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}

/* ---------------- 顶栏 ---------------- */

.app-header {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  flex-wrap: wrap; /* 第二行放全站统计,见 .site-stats */
  align-items: center;
  gap: 10px;
  padding: 12px 0 8px;
  /* 必须不透明:v1 用半透明渐变,滚动时卡片文字会从标题后面透出来 */
  background: var(--bg);
}

/* 顶栏下缘的一小段淡出,让滚动内容不是硬切进标题栏 */
.app-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 10px;
  background: linear-gradient(var(--bg), rgba(246, 248, 247, 0));
  pointer-events: none;
}

.app-title {
  flex: 1;
  margin: 0;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--text);
}

/* 连续天数常驻顶栏:每次打开应用第一眼就看到自己的连续记录 */
.streak-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  padding: 5px 11px 5px 9px;
  border-radius: 999px;
  background: var(--flame-soft);
  color: var(--flame-ink);
  font-size: 13px;
  line-height: 1;
  white-space: nowrap;
}

.streak-chip b {
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.streak-chip-unit { font-size: 11.5px; opacity: .75; }

/* 全站统计(顶栏第二行,参考站样式):此刻在做人数 + 总访问。
   一行浅色小字,占整行宽度,数值用等宽数字避免跳动。 */
.site-stats {
  flex: 0 0 100%;
  margin: 0;
  text-align: center;
  font-size: 12px;
  line-height: 1.4;
  color: var(--muted);
  letter-spacing: .02em;
}

.site-stats b {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  transition: color .2s ease, border-color .2s ease;
}

.icon-btn svg { width: 20px; height: 20px; }
.icon-btn:hover { color: var(--teal); border-color: var(--teal-line); }
.icon-btn:active { transform: translateY(1px); }

/* ---------------- 通用块 ---------------- */

.panel {
  flex: 1 1 auto;
  padding-bottom: 4px;
}

#panel-train {
  display: flex;
  flex-direction: column;
}

.card {
  margin: 0 0 14px;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.card-title {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--muted);
}

.hint {
  margin: 10px 0 0;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--muted);
}

/* ---------------- 方案选择 ---------------- */

/*
 * 方案卡默认折叠成一行:v1 展开的 5 个胶囊 + 摘要把引导圆挤出了首屏,
 * 手机上要滚动才能看到最重要的东西。方案是「设一次就不动」的,收起来才对。
 */
.plan-card { padding: 0; overflow: hidden; }

.plan-head {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 14px;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.plan-head-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.plan-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.plan-chevron {
  flex: none;
  width: 18px;
  height: 18px;
  color: var(--muted);
  transition: transform .22s ease;
}

.plan-head[aria-expanded="true"] .plan-chevron { transform: rotate(180deg); }

.plan-head:disabled { cursor: not-allowed; }
.plan-head:disabled .plan-chevron { opacity: .35; }

.plan-body {
  padding: 2px 14px 14px;
  border-top: 1px solid var(--line);
}

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

.pill { position: relative; }

.pill input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.pill span {
  display: inline-block;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fbfdfc;
  font-size: 14px;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}

.pill input:checked + span {
  border-color: var(--teal);
  background: var(--teal);
  color: #fff;
  font-weight: 600;
}

.pill input:focus-visible + span {
  outline: 2px solid var(--teal-dark);
  outline-offset: 2px;
}

.pill input:disabled + span {
  opacity: .45;
  cursor: not-allowed;
}

.custom-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
}

.field { display: flex; flex-direction: column; gap: 4px; }

.field label {
  font-size: 12px;
  color: var(--muted);
}

.field input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fbfdfc;
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
}

.field input:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(15, 155, 142, .14);
}

.field input:disabled { opacity: .5; }

/* 开了维持之后摘要会变长,允许折到第二行 —— 截断成「约 9 分 4…」等于没说 */
.plan-summary {
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--muted);
}

/* 「维持」开关:放在方案卡里而不是设置里,因为它直接改变训练时长与摘要 */
.hold-block {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}

.hold-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
}

.hold-sec {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
}

.hold-sec label { font-size: 13px; color: var(--muted); }

.hold-sec-input {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}

.hold-sec-input input {
  width: 72px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fbfdfc;
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  text-align: center;
}

.hold-sec-input input:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(15, 155, 142, .14);
}

.hold-block .hint { margin-top: 10px; }

/* ---------------- 引导圆 ---------------- */

.coach {
  position: relative;
  display: grid;
  place-items: center;
  flex: 1 1 auto;
  min-height: 244px;
  margin: 2px 0 4px;
}

.coach-circle {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  /*
   * 底色用 background-color(可过渡),立体感交给一层固定不变的叠加渐变。
   * v1 每个阶段各写一条 linear-gradient —— 渐变之间无法补间,所以颜色是硬切的。
   */
  background-color: #4bb3a7;
  background-image: linear-gradient(160deg, rgba(255, 255, 255, .17), rgba(0, 0, 0, .13));
  color: #fff;
  box-shadow: 0 10px 30px rgba(15, 155, 142, .25);
  transform: scale(1);
  transition-property: transform, background-color, color, box-shadow;
  /*
   * transform 的时长由 JS 按阶段秒数改写;配色固定 .9s。
   * 这是边界上唯一还在动的东西,也正因为唯一,它得慢一点才能把前后两个阶段「连起来」——
   * 太短(试过 .5s)会让阶段之间显得各自独立、缺少连贯感。
   * 各阶段同属青色系,插值干净,不会像青→琥珀那样发浑。
   */
  transition-duration: .4s, .9s, .9s, .9s;
  transition-timing-function: cubic-bezier(.37, 0, .63, 1), ease, ease, ease;
  will-change: transform;
}

/* 圆内侧一圈高光,只在「维持」时脉动 —— 提示「别松,稳住」 */
.coach-circle::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 2px solid rgba(255, 255, 255, .45);
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
}

.coach-circle.is-pulsing::after { animation: hold-pulse 1.5s ease-in-out infinite; }
.coach-circle.is-paused::after { animation-play-state: paused; }

@keyframes hold-pulse {
  0%, 100% { opacity: .15; transform: scale(1); }
  50%      { opacity: .7;  transform: scale(.965); }
}

/*
 * 相位配色按「用力程度」由浅到深排列,余光扫一眼就能分辨:
 * 放松/休息浅、收紧深、维持最深(唯一带暖色环的阶段)。
 */
/* 空闲态底色浅,白字几乎看不清 —— 这里换成深色文字 */
.coach-circle[data-phase="idle"] {
  background-color: #c4dcd8;
  box-shadow: 0 8px 24px rgba(28, 43, 42, .1);
  color: #486a66;
}
.coach-circle[data-phase="prepare"]  { background-color: #5cbdb0; }
.coach-circle[data-phase="contract"] { background-color: #0f8d80; }
.coach-circle[data-phase="hold"] {
  background-color: #07514a;
  box-shadow: 0 10px 30px rgba(7, 81, 74, .34);
}
.coach-circle[data-phase="relax"] { background-color: #52b8ab; }
.coach-circle[data-phase="rest"]  { background-color: #7fbfae; }
.coach-circle[data-phase="done"]  { background-color: #0e9084; }

.phase-label {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: .26em;
  text-indent: .26em;
  opacity: .95;
  /*
   * 换字时只做一次极短的提亮,不做位移、也不从 0 起。
   * 阶段名是当前最要紧的指令,让它淡入 300ms 等于在最该看清的时刻看不清。
   */
  animation: phase-in .16s ease-out;
}

@keyframes phase-in {
  from { opacity: .4; }
  to   { opacity: .95; }
}

.countdown {
  font-size: 58px;
  font-weight: 300;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  letter-spacing: .01em;
}

/* ---------------- 进度 ---------------- */

.set-progress {
  margin: 0 0 8px;
  text-align: center;
  font-size: 13.5px;
  color: var(--muted);
  min-height: 1.6em;
}

.progress-track {
  height: 6px;
  margin-bottom: 14px;
  border-radius: 999px;
  background: #e4ecea;
  overflow: hidden;
}

.progress-bar {
  width: 0%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #4bbfb0, var(--teal));
  transition: width .15s linear;
}

/* ---------------- 按钮 ---------------- */

.controls {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.btn {
  padding: 12px 10px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background .18s ease, color .18s ease, border-color .18s ease, opacity .18s ease;
}

.btn:active { transform: translateY(1px); }

.btn:disabled {
  opacity: .42;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background: var(--teal);
  color: #fff;
  box-shadow: 0 6px 16px rgba(15, 155, 142, .25);
}
.btn-primary:not(:disabled):hover { background: var(--teal-dark); }
.btn-primary:disabled { box-shadow: none; }

.btn-ghost {
  border-color: var(--teal-line);
  background: var(--surface);
  color: var(--teal-dark);
}
.btn-ghost:not(:disabled):hover { background: var(--teal-soft); }

.btn-danger {
  border-color: #eccdcb;
  background: var(--surface);
  color: var(--danger);
}
.btn-danger:hover { background: #fbf1f0; }

.row-btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

/* 数据管理卡:导出/导入一排,危险操作独占整行,避免误触 */
.row-btns > .btn-danger {
  grid-column: 1 / -1;
}

/* ---------------- 完成面板 ---------------- */

.done-panel {
  border: 1px solid var(--teal-line);
  background: var(--teal-soft);
  box-shadow: none;
}

.done-title {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 700;
  color: var(--teal-dark);
}

.done-line {
  margin: 0;
  font-size: 14px;
  color: var(--text);
}

.done-line strong,
.done-streak strong {
  font-weight: 700;
  color: var(--teal-dark);
  font-variant-numeric: tabular-nums;
}

/* 连续天数 + 距下一枚徽章还差多少 —— 完成的那一刻正是最想再来一次的时候 */
.done-streak {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}

.done-streak-head { font-size: 14px; }
.done-streak-head strong { color: var(--flame-ink); }

.mini-track {
  height: 5px;
  border-radius: 999px;
  background: #d7e8e4;
  overflow: hidden;
}

.mini-bar {
  width: 0%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--flame), #d97b2b);
  transition: width .6s cubic-bezier(.2, .8, .3, 1);
}

.done-next {
  font-size: 12.5px;
  color: var(--muted);
}

.done-unlocked {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--teal-line);
}

.done-unlocked-title {
  margin: 0 0 8px;
  font-size: 12.5px;
  letter-spacing: .1em;
  color: var(--flame-ink);
}

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

.badge-row .badge {
  animation: badge-pop .5s cubic-bezier(.2, 1.5, .4, 1) both;
}

@keyframes badge-pop {
  from { opacity: 0; transform: scale(.5) rotate(-8deg); }
  to   { opacity: 1; transform: none; }
}

/* ---------------- 统计 ---------------- */

.streak-card { text-align: center; padding: 22px 16px 18px; }

.streak-num {
  font-size: 60px;
  font-weight: 700;
  line-height: 1.05;
  color: var(--teal);
  font-variant-numeric: tabular-nums;
}

.streak-label {
  font-size: 13px;
  letter-spacing: .18em;
  text-indent: .18em;
  color: var(--muted);
}

.today-goal {
  margin: 12px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}

.today-goal[data-met="true"] { color: var(--teal-dark); font-weight: 600; }

/* ---------------- 徽章墙 ---------------- */

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

.card-head .card-title { margin-bottom: 12px; }

.badge-count {
  font-size: 12.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

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

.badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 4px 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfdfc;
  text-align: center;
}

.badge-icon {
  font-size: 22px;
  line-height: 1.1;
}

.badge-name {
  font-size: 10.5px;
  line-height: 1.3;
  color: var(--muted);
}

.badge[data-unlocked="true"] {
  border-color: var(--teal-line);
  background: var(--teal-soft);
}

.badge[data-unlocked="true"] .badge-name {
  color: var(--teal-dark);
  font-weight: 600;
}

/* 未解锁只留轮廓,不剧透难度也不喧宾夺主 */
.badge[data-unlocked="false"] .badge-icon {
  filter: grayscale(1);
  opacity: .35;
}

.next-badge {
  margin: 12px 0 0;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--muted);
}

.next-badge strong {
  color: var(--flame-ink);
  font-weight: 600;
}

.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.stat-cell {
  margin: 0;
  padding: 14px 12px;
  text-align: center;
}

.stat-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.stat-label {
  font-size: 12px;
  color: var(--muted);
}

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

.heat-cell {
  display: block;
  aspect-ratio: 1 / 1;
  border-radius: 5px;
  background: #e7edeb;
}

.heat-cell[data-level="0"] { background: #e7edeb; }
.heat-cell[data-level="1"] { background: #bfe4dd; }
.heat-cell[data-level="2"] { background: #64c1b4; }
.heat-cell[data-level="3"] { background: var(--teal); }

.heat-cell.is-today {
  outline: 2px solid var(--text);
  outline-offset: 1px;
}

.heat-legend {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  margin-top: 10px;
  font-size: 11px;
  color: var(--muted);
}

.heat-legend .heat-cell {
  width: 11px;
  height: 11px;
  aspect-ratio: auto;
  border-radius: 3px;
}

/* ---------------- 知识 ---------------- */

.kb-list {
  margin: 0;
  padding-left: 1.15em;
  font-size: 14.5px;
  line-height: 1.85;
  color: #263a38;
}

.kb-list li + li { margin-top: 6px; }
.kb-list strong { color: var(--teal-dark); }

.kb-warn { border-left: 3px solid #e0b8a0; }

.kb-source {
  margin: 0 0 6px;
  padding: 0 4px;
  font-size: 12.5px;
  font-style: italic;
  line-height: 1.7;
  color: var(--muted);
}

/* ---------------- 页脚 & tab 栏 ---------------- */

.app-footer {
  padding: 4px 0 12px;
  text-align: center;
  font-size: 12px;
  color: #93a5a3;
}

.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  display: flex;
  max-width: 480px;
  margin: 0 auto;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, .94);
  backdrop-filter: saturate(1.4) blur(8px);
}

.tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  height: var(--tabbar-h);
  padding: 0;
  border: 0;
  background: none;
  color: #93a5a3;
  font-family: inherit;
  font-size: 11.5px;
  cursor: pointer;
  transition: color .18s ease;
}

.tab svg { width: 21px; height: 21px; }
.tab.is-active { color: var(--teal); font-weight: 600; }

/* ---------------- 设置弹窗 ---------------- */

.dlg {
  width: min(92vw, 380px);
  padding: 20px;
  border: 0;
  border-radius: 18px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 20px 50px rgba(16, 50, 47, .22);
}

.dlg::backdrop { background: rgba(20, 40, 38, .38); }

.dlg-title {
  margin: 0 0 14px;
  font-size: 17px;
  font-weight: 700;
}

.opt-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}

.opt-text { font-size: 15px; }

/*
 * 自绘开关:原生 checkbox 在 iOS 上是带蓝色聚焦框的方块勾,和整个应用格格不入。
 * 用 appearance:none 接管,不需要额外 DOM 节点。
 */
.switch {
  position: relative;
  flex: none;
  width: 46px;
  height: 28px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #d3dedb;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  transition: background .2s ease;
}

.switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(16, 50, 47, .3);
  transition: transform .2s cubic-bezier(.3, 1.4, .6, 1);
}

.switch:checked { background: var(--teal); }
.switch:checked::after { transform: translateX(18px); }

.switch:focus-visible {
  outline: 2px solid var(--teal-dark);
  outline-offset: 2px;
}

.switch:disabled { opacity: .45; cursor: not-allowed; }

.time-input {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fbfdfc;
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
}

.dlg-actions {
  display: flex;
  margin-top: 16px;
}

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

/* ---------------- 无障碍 / 动效偏好 ---------------- */

@media (prefers-reduced-motion: reduce) {
  .coach-circle {
    transition-duration: .01ms !important;
    transform: scale(1) !important;
  }
  /* 相位环是逐帧写入的数值,不是动画,减弱动效时保留 —— 它是唯一还能表达「还剩多久」的视觉线索 */
  .coach-circle.is-pulsing::after { animation: none; opacity: .35; }
  .badge-row .badge,
  .phase-label { animation: none; }
  .progress-bar,
  .mini-bar { transition: none; }
}

@media (min-width: 420px) {
  .countdown { font-size: 62px; }
}

/*
 * 极矮屏(如 iPhone SE、或浏览器地址栏占位后)优先保住「圆 + 要领 + 呼吸 + 按钮」全部可见。
 * 注意这里必须覆盖 min-height:基础规则用的是 min-height + flex:1,只改 height 是不起作用的。
 */
@media (max-height: 700px) {
  .coach { min-height: 186px; }
  .coach-circle { width: 168px; height: 168px; }
  .countdown { font-size: 46px; }
  .phase-label { font-size: 15px; }
}
