/* 专注页：FAB 是 fixed 元素，禁用 transform 动画，否则 fixed 会相对动画容器先跳一下 */
#v-focus.on {
  animation: fadeinOpacity 0.35s ease;
}
@keyframes fadeinOpacity {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* 专注台 · Focus Desk */
#fx-desk {
  position: relative;
  flex: 1; /* 撑满 tabview 可用高 */
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center; /* 屏高富余时整组垂直居中，消除下方大片空白 */
  padding: 8px 0 0;
}
/* 顶部：倒计时 / 正计时 两个轻声切换 */
.fxmode {
  display: flex;
  gap: 26px;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.2em;
}
.fxmode button {
  background: none;
  border: none;
  padding: 0 0 6px;
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  letter-spacing: inherit;
  color: var(--ink-muted);
  border-bottom: 1px solid transparent;
}
.fxmode button.on {
  color: var(--ink);
  border-bottom-color: var(--sage);
}
/* 中央圆环计时器 */
.fxring {
  position: relative;
  width: 210px; /* 环缩小，突出内容而非占据整屏 */
  height: 210px;
  margin: 20px 0 0;
}
.fxring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.fxring .r-track {
  fill: none;
  stroke: var(--hairline);
  stroke-width: 1.5;
}
.fxring .r-arc {
  fill: none;
  stroke: var(--sage);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 628.3; /* 2π·r(100) */
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 0.9s linear;
}
.fxring .rtime {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fxring .rtime span {
  font-family: var(--serif);
  font-size: 38px;
  letter-spacing: 0.02em;
  color: var(--ink);
}
.fxring .rphase {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 40px;
  text-align: center;
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: 0.22em;
  color: var(--ink-muted);
  text-transform: uppercase;
}
/* 预设时长条（倒计时用） */
.fxpreset {
  display: flex;
  gap: 18px;
  margin-top: 24px;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.14em;
}
.fxpreset button {
  background: none;
  border: none;
  border-bottom: 1px solid transparent;
  padding: 2px 0;
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  letter-spacing: inherit;
  color: var(--ink-muted);
}
.fxpreset button.on {
  color: var(--ink);
  border-bottom-color: var(--sage);
}
/* 正计时占位提示（保持与预设行同高，避免布局跳动） */
.fx-up-hint {
  margin-top: 24px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 13px;
  color: var(--ink-muted);
  text-align: center;
}
/* 控制区三段式布局 */
.fxctrl {
  display: flex;
  align-items: center;
  justify-content: center; /* 确保中间的“开始”处于页面正中轴 */
  gap: 18px;
  margin-top: 26px;
}

/* 核心开始按钮 */
.fxctrl .cta {
  margin-top: 0;
  padding: 10px 22px;
  background-color: var(--sage-soft);
  color: #ffffff;
  border: none;
  font-family: var(--serif);
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s;
}
/* 呼吸主按钮：图标+文字同排 */
.fxctrl .cta svg {
  margin-right: 6px;
  vertical-align: -2px;
}

/* 左右两边的辅助图标（统一幽灵按钮样式） */
.fxctrl .ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  background: transparent;
  border: none;
  color: var(--ink-muted);
  cursor: pointer;
  transition: color 0.2s;
}

.fxctrl .ghost:hover {
  color: var(--sage);
}
/* 呼吸入口：一行轻邀请，不抢主体 */
.fxquiet {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 26px;
  font-family: var(--serif);
  font-size: 13px;
  color: var(--ink-muted);
}
.fxquiet .link {
  background: none;
  border: none;
  border-bottom: 1px solid var(--sage-soft);
  color: var(--sage);
  cursor: pointer;
  font-family: var(--serif);
  font-size: 13px;
}
/* 环境声：安静一行，圆点指示 */
.fxsnd {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 14px;
  margin-top: 36px;
}
.fxsnd .t {
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: 0.2em;
  color: var(--ink-muted);
  text-transform: uppercase;
}
.fxsnd #fx-sndlist {
  display: flex;
  gap: 12px;
}
.fxsnd button {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--serif);
  font-size: 12px;
  color: var(--ink-muted);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0;
}
.fxsnd button::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: transparent;
}
.fxsnd button.on {
  color: var(--ink);
}
.fxsnd button.on::before {
  background: var(--sage);
}
/* 声波等化器：低饱和细条，非静默时错峰跳动 */
.fxwave {
  flex-basis: 100%;
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 20px;
  padding: 0 2px;
}
.fxwave i {
  display: block;
  width: 2px;
  background: var(--sage);
  opacity: 0.55;
  height: 40%;
  transform-origin: bottom;
  animation: fxwave-bounce 0.9s ease-in-out infinite;
}
.fxwave i:nth-child(2n) {
  animation-duration: 0.72s;
}
.fxwave i:nth-child(3n) {
  animation-duration: 1.1s;
}
.fxwave i:nth-child(odd) {
  animation-delay: -0.3s;
}
@keyframes fxwave-bounce {
  0%,
  100% {
    transform: scaleY(0.35);
  }
  50% {
    transform: scaleY(1);
  }
}
/* 静默：整排收平、不跳 */
.fxwave.off i {
  animation: none;
  height: 20%;
  transform: scaleY(1);
}

/* 呼吸仪式子视图 */
#fx-breathe {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 0 40px;
}
.bglow {
  position: relative;
  width: 250px;
  height: 250px;
  margin: 18px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.bgcore {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--sage-soft) 0%, rgba(162, 178, 159, 0.35) 55%, transparent 72%);
  transition: transform 3.8s ease-in-out;
}
.bglow.inhale .bgcore,
.bglow.hold .bgcore {
  transform: scale(1.7); /* 吸 / 吸后屏息：扩张并保持 */
}
.bglow.exhale .bgcore,
.bglow.holdsmall .bgcore {
  transform: scale(1); /* 呼 / 呼后屏息：收缩并保持 */
}
.bphase {
  margin-top: 20px;
  font-family: var(--serif);
  font-size: 26px;
  color: var(--sage);
}
.btime {
  margin-top: 8px;
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0.16em;
  color: var(--ink-muted);
}
#fx-bpreset {
  margin-top: 26px;
}
