/* ==========================================================================
   到场（Arrive）L1 执行激活主线私有样式
   覆盖 pages/activation.php、pages/step.php、pages/mood.php 三个页面。
   调性：深色、沉静、低刺激（星图修订口径）——不加警示色、不加奖励色，
   进度与动效元素默认弱呈现，点击后才浮现（V1.2 3.2「轻点空白处」）。
   命名前缀：aact-（激活）、astep-/astar-（单步与星图）、amood-（状态）、afeed-（反馈）。
   ========================================================================== */

/* ---------------------------------------------------------------- 页面补充小件 */
.aact-check { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; cursor: pointer; }
.aact-clarify-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 12px 0 4px; }
.aact-preview-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.aact-preview-head h2 { margin: 0; font-size: 17px; }
p.aact-field { margin: 14px 0 0; }
.aact-line {
  width: 100%;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  padding: 10px 12px;
  font-size: 15px;
  min-height: var(--tap);
}
select.aact-chip { height: 36px; font-size: 14px; }
input[type="number"] { background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; color: var(--text); padding: 6px 8px; }
fieldset.astep-stuck { margin-top: 12px; }
fieldset.astep-stuck legend { padding: 0 6px; }

.astep-done-list { list-style: none; margin: 12px 0; padding: 0; display: grid; gap: 8px; }
.astep-done-list li { display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px dashed var(--line); padding-bottom: 6px; }

.amood-curve-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.amood-curve-head h2 { margin: 0; font-size: 16px; }

/* ---------------------------------------------------------------- 共用小件 */
.aact-warn,
.amood-note {
  color: var(--muted);
  font-size: 13px;
  margin-top: 8px;
}

.aact-chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }

.aact-chip {
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--muted);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 14px;
  min-height: 36px;
  cursor: pointer;
}
.aact-chip.on { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }

/* ---------------------------------------------------------------- 激活流程页 */
.aact-form label.aact-field { display: block; margin: 14px 0; }
.aact-form .aact-label { color: var(--muted); font-size: 14px; margin-bottom: 6px; display: block; }
.aact-form input[type="text"],
.aact-form textarea {
  width: 100%;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  padding: 12px;
  font-size: 16px;
  min-height: var(--tap);
}
.aact-clarify {
  border-left: 2px solid var(--line);
  padding: 4px 0 4px 14px;
  margin: 12px 0;
}
.aact-clarify .aact-q { font-size: 14px; color: var(--muted); margin: 10px 0 4px; }
.aact-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }

.aact-preview { margin-top: 18px; }
.aact-preview ol { list-style: none; margin: 0; padding: 0; counter-reset: astep; }
.aact-preview li {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-2);
  padding: 10px 12px;
  margin-bottom: 8px;
  counter-increment: astep;
}
.aact-preview li .aact-seq::before { content: counter(astep) ". "; color: var(--muted); }
.aact-preview li .aact-hint { color: var(--muted); font-size: 13px; margin-top: 2px; }
.aact-preview li .aact-phys {
  font-size: 12px; color: var(--accent);
  border: 1px solid var(--accent-deep); border-radius: 6px; padding: 1px 6px; margin-left: 6px;
}
.aact-edit { display: none; margin-top: 8px; }
.aact-edit.open { display: block; }
.aact-edit input { width: 100%; margin-bottom: 6px; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; color: var(--text); padding: 8px; }

/* B05「换一套」：仅准备阶段可点，进入单步后禁用（灰掉而不是隐藏——让用户知道它存在过） */
button.aact-regen[disabled] { opacity: 0.45; cursor: not-allowed; }

/* ---------------------------------------------------------------- 单步聚焦页 */
.astep-card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 20px 20px;
  margin-bottom: 14px;
  min-height: 260px;
}
.astep-title { font-size: 22px; font-weight: 600; line-height: 1.4; }
.astep-hint { color: var(--muted); margin-top: 10px; font-size: 15px; }

/* V1.2.5 任务卡 4：完成那一下的肯定语。
   它和上一行 .astep-hint 是两种东西：hint 讲进度（系统状态，muted），
   praise 讲你刚做的那件事（给人的话，用正文色）。差别只靠颜色与字号拉开——
   这套界面只有一支无衬线字体，不为一句话引进第二种字形。
   不加边框、不加底色、不做小卡片：它嵌在卡片里，套一层就成「卡中卡」。
   单步页上它是 JS 点亮的那一行（初始 hidden，点完成才出现）；
   收尾屏上是服务端直接写好的，两处同一句式，所以共用这一条样式。 */
.astep-praise {
  margin: 12px 0 0;
  color: var(--text);
  font-size: 16px;
  line-height: 1.5;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity var(--t-2) var(--ease), transform var(--t-1) var(--ease);
}
.astep-praise.show { opacity: 1; transform: translateY(0); }

/* 3.2 第 1 条：进度与时间非常驻，轻点空白处淡入 */
.astep-progress {
  position: absolute;
  left: 20px; right: 20px; top: 8px;
  opacity: 0;
  transition: opacity .35s ease;
  pointer-events: none;
  color: var(--muted);
  font-size: 13px;
}
.astep-progress.show { opacity: 1; }
.astep-bar {
  position: relative;
  height: 6px;
  border-radius: 3px;
  background: var(--panel-2);
  margin: 6px 0 4px;
  overflow: visible;
}
.astep-bar-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; background: var(--accent-deep); transition: width .4s ease; }
/* A08/3.2 第 3 条：完成标记 + 时刻，不只用背景进度条呈现 */
.astep-mark { position: absolute; top: -3px; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); border: 2px solid var(--bg); }
.astep-mark-time { position: absolute; top: 10px; transform: translateX(-50%); font-size: 10px; color: var(--muted); white-space: nowrap; }

.astep-timer {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0 4px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  border-radius: 10px;
  padding: 8px 14px;
  font-variant-numeric: tabular-nums;
}
.astep-timer .astep-clock { font-size: 20px; }

.astep-btns { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.astep-btns .btn { min-width: 92px; }

/* 3.2 第 4 条：退出键常驻可见、一步可达，不藏在空白点击之后 */
.astep-exit {
  position: sticky;
  top: 8px;
  margin-left: auto;
  color: var(--muted);
  font-size: 14px;
  padding: 8px 10px;
  min-height: var(--tap);
  display: inline-flex;
  align-items: center;
  z-index: 5;
}

.astep-stuck,
.astep-retro {
  border: 1px dashed var(--line);
  border-radius: 10px;
  padding: 12px;
  margin-top: 14px;
  background: var(--panel-2);
}
.astep-retro label { display: flex; gap: 8px; align-items: center; margin: 6px 0; min-height: 32px; }

.astep-voice-line { margin-top: 16px; color: var(--muted); font-size: 14px; }
/* V1.2.5 任务卡 6：这一行从「在听」两个字换成一整句原因说明，12px 撑不住一句话的读感 */
.astep-voice-state { font-size: 13px; color: var(--muted); margin-top: 4px; line-height: 1.6; }

.astep-keyboard-note { color: var(--muted); font-size: 12px; margin-top: 10px; }

/* ---------------------------------------------------------------- 星图挂载区 */
.arrive-starfield,
.astar-zone {
  display: block;
  width: 100%;
  height: 132px;               /* 3.1：区域高度固定，不因星点增多伸缩 */
  border-radius: var(--radius);
  border: 1px solid var(--line);
  margin: 4px 0 14px;
  overflow: hidden;
  background: linear-gradient(135deg, #0b1226, #04050a);
}
.astar-zone canvas { display: block; }
.astar-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--muted);
  font-size: 18px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 2px;
}

/* ---------------------------------------------------------------- B01 反馈层 */
.afeed-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 60;
}
.afeed-glow {
  position: fixed;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(143, 191, 174, .35), rgba(143, 191, 174, 0));
  pointer-events: none;
  z-index: 60;
  animation: afeed-fade .65s ease-out forwards;
}
@keyframes afeed-fade {
  from { opacity: 0; transform: scale(.7); }
  30%  { opacity: 1; }
  to   { opacity: 0; transform: scale(1.15); }
}

/* 肯定语的兜底位置：页面没预留 .astep-praise 那一行时（别的页面直接调 say）才用。
   放在底部目的地条与常驻主操作之上，一句话、无底色无边框——它是给人读的话，
   不是提示气泡；和 .toast 的区别也在这里：toast 报系统状态，会自己消失，而这个跟着页面走。 */
.afeed-say {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: calc(var(--tab-h) + 88px + env(safe-area-inset-bottom, 0px));
  z-index: 61;
  margin: 0;
  text-align: center;
  color: var(--text);
  font-size: 16px;
  line-height: 1.5;
  pointer-events: none;
  animation: afeed-say-in var(--t-3) var(--ease);
}
@keyframes afeed-say-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
/* 减少动效不用在这里再写一遍：style.css 末尾的全局降级块把 animation/transition 时长
   一律压到 .001s，这两句直接就是「立刻出现」，位置和颜色都不变。 */
@media (prefers-reduced-motion: reduce) {
  .astep-progress { transition: none; }
  .astep-bar-fill { transition: none; }
  .afeed-glow { animation: none; }
}

/* ---------------------------------------------------------------- 我的状态页 */
.amood-grid { display: grid; gap: 14px; }
.amood-slider-row { display: flex; align-items: center; gap: 12px; margin: 12px 0; }
.amood-slider-row input[type="range"] { flex: 1; accent-color: var(--accent); min-height: var(--tap); }
.amood-slider-val { min-width: 34px; text-align: center; color: var(--text); font-variant-numeric: tabular-nums; }

/* 情绪五个脸（3.3，可选） */
.amood-faces { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.amood-face {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--muted);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 18px; cursor: pointer;
}
.amood-face.on { border-color: var(--accent); color: var(--accent); background: var(--bg); }

/* 3.3：两条线并列展示并标明口径 */
.amood-curves { display: grid; grid-template-columns: 1fr; gap: 8px; }
.amood-curve-block h3 { margin: 6px 0 2px; font-size: 14px; color: var(--muted); font-weight: 500; }
.amood-curve-block canvas { display: block; width: 100%; height: 130px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); }
.amood-legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); margin-top: 6px; }
.amood-legend i { display: inline-block; width: 10px; height: 3px; border-radius: 2px; margin-right: 4px; vertical-align: middle; }

/* 行为对照表：三列 + 预想与实际差值 */
.amood-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.amood-table th, .amood-table td { border-bottom: 1px solid var(--line); padding: 8px 6px; text-align: left; vertical-align: top; }
.amood-table th { color: var(--muted); font-weight: 500; }
.amood-delta-pos { color: var(--warn); }
.amood-delta-neg { color: var(--accent); }
