/* =========================================================
   心识 · 心理学知识库
   设计语言：专业理性 / 白底 / 墨绿主色 / 细线 / 克制
   ========================================================= */

:root{
  --bg:#FFFFFF;
  --bg-soft:#F6F8F7;
  --bg-mute:#EFF3F1;
  --ink:#131C1A;
  --ink-2:#4A5654;
  --ink-3:#8A9591;
  --line:#E4E8E6;
  --line-soft:#EFF2F1;
  --brand:#17564B;
  --brand-2:#0D3E36;
  --brand-soft:#EAF2EF;
  --hero-a:#17564B;
  --hero-b:#0B3A32;
  --warm:#96552F;
  --warm-soft:#F8F1EB;
  --danger:#9A3B33;
  --tab-h:58px;
  --maxw:480px;
  --shadow:0 1px 2px rgba(19,28,26,.04);
}

@media (prefers-color-scheme: dark){
  :root{
    --bg:#0E1413;
    --bg-soft:#161D1B;
    --bg-mute:#1C2523;
    --ink:#E9EEEC;
    --ink-2:#AAB4B1;
    --ink-3:#79847F;
    --line:#26302D;
    --line-soft:#1F2725;
    --brand:#63BFA8;
    --brand-2:#8FD5C4;
    --brand-soft:#152622;
    --hero-a:#1B4F45;
    --hero-b:#10312A;
    --warm:#CE8F65;
    --warm-soft:#241A14;
    --danger:#D9786F;
    --shadow:none;
  }
  body{background:#060908}
}

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

html,body{margin:0;padding:0}

body{
  font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Hiragino Sans GB","Microsoft YaHei","Helvetica Neue",sans-serif;
  background:#EDEFEE;
  color:var(--ink);
  font-size:16px;
  line-height:1.6;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
  overflow-x:hidden;
}

@media (prefers-color-scheme: dark){
  body{background:#060908}
}

button{font-family:inherit;font-size:inherit;color:inherit;background:none;border:none;padding:0;cursor:pointer}
input,textarea{font-family:inherit;font-size:inherit;color:inherit}
a{color:inherit;text-decoration:none}
::selection{background:var(--brand-soft);color:var(--brand-2)}

/* ---------- 容器 ---------- */
.app{
  max-width:var(--maxw);
  margin:0 auto;
  min-height:100vh;
  background:var(--bg);
  position:relative;
  display:flex;
  flex-direction:column;
  box-shadow:0 0 0 1px rgba(19,28,26,.05);
}

/* ---------- 顶栏 ---------- */
.topbar{
  position:sticky;top:0;z-index:40;
  display:flex;align-items:center;justify-content:space-between;
  gap:12px;
  padding:calc(14px + env(safe-area-inset-top, 0px)) 20px 12px;
  background:var(--bg);
  background:color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter:saturate(180%) blur(14px);
  -webkit-backdrop-filter:saturate(180%) blur(14px);
  border-bottom:1px solid transparent;
  transition:border-color .2s ease;
  min-height:56px;
}
.topbar.scrolled{border-bottom-color:var(--line-soft)}

.brand{display:flex;align-items:center;gap:9px;min-width:0}
.brand-mark{
  width:26px;height:26px;flex:0 0 26px;
  display:grid;place-items:center;
  background:var(--brand);color:#fff;
  border-radius:7px;
  font-size:13px;font-weight:600;
  letter-spacing:0;
  line-height:1;
}
@media (prefers-color-scheme: dark){
  .brand-mark{color:#0E1413}
}
.brand-text{
  display:flex;align-items:baseline;gap:7px;
  font-size:16px;font-weight:600;letter-spacing:.02em;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.brand-text em{
  font-style:normal;font-size:11.5px;font-weight:400;
  color:var(--ink-3);letter-spacing:.04em;
}

.tb-actions{display:flex;align-items:center;gap:4px}

.icon-btn{
  width:34px;height:34px;display:grid;place-items:center;
  border-radius:8px;color:var(--ink-2);
  transition:background .15s ease;
}
.icon-btn:active{background:var(--bg-mute)}
.icon-btn svg{width:19px;height:19px;stroke:currentColor;fill:none;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}

/* 返回栏 */
.topbar.back-mode{justify-content:flex-start}
.backbtn{
  display:flex;align-items:center;gap:5px;
  font-size:14.5px;color:var(--ink-2);
  padding:4px 8px 4px 0;border-radius:8px;
}
.backbtn svg{width:20px;height:20px;stroke:currentColor;fill:none;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.backbtn:active{opacity:.6}

/* ---------- 视图 ---------- */
.view{
  flex:1;
  padding-bottom:calc(var(--tab-h) + 18px + env(safe-area-inset-bottom, 0px));
}
.view.no-tab{padding-bottom:32px}

.view-head{padding:6px 20px 18px}
.view-title{
  font-size:25px;font-weight:600;letter-spacing:-.015em;
  line-height:1.28;margin:0 0 7px;
}
.view-sub{font-size:13.5px;color:var(--ink-3);line-height:1.65;margin:0}

/* 页脚声明 */
.micro-foot{
  padding:26px 20px 10px;
  font-size:11.5px;line-height:1.75;color:var(--ink-3);
  border-top:1px solid var(--line-soft);
  margin-top:8px;
}
.micro-foot b{color:var(--ink-2);font-weight:500}

/* ---------- 分类横滑 ---------- */
.chips{
  display:flex;gap:8px;
  padding:2px 20px 16px;
  overflow-x:auto;
  scrollbar-width:none;
  -webkit-overflow-scrolling:touch;
}
.chips::-webkit-scrollbar{display:none}
.chip{
  flex:0 0 auto;
  padding:7px 14px;
  border:1px solid var(--line);
  border-radius:100px;
  font-size:13px;color:var(--ink-2);
  background:var(--bg);
  transition:all .16s ease;
  white-space:nowrap;
}
.chip.on{
  background:var(--brand);border-color:var(--brand);color:#fff;font-weight:500;
}
@media (prefers-color-scheme: dark){
  .chip.on{color:#0E1413}
}

/* ---------- 卡片列表 ---------- */
.list{padding:0 20px;display:flex;flex-direction:column;gap:10px}

.card{
  display:block;width:100%;text-align:left;
  padding:16px 16px 15px;
  border:1px solid var(--line);
  border-radius:11px;
  background:var(--bg);
  box-shadow:var(--shadow);
  transition:transform .14s ease,border-color .14s ease,background .14s ease;
}
.card:active{transform:scale(.988);background:var(--bg-soft)}

.card-kicker{
  display:flex;align-items:center;gap:7px;
  font-size:11px;color:var(--ink-3);letter-spacing:.05em;
  margin-bottom:7px;
}
.card-kicker .dot{width:2px;height:2px;border-radius:50%;background:var(--ink-3)}
.card-cat{color:var(--brand);font-weight:500;letter-spacing:.06em}
@media (prefers-color-scheme: dark){.card-cat{color:var(--brand-2)}}

.card-title{
  font-size:16.5px;font-weight:600;line-height:1.42;
  letter-spacing:-.005em;margin:0 0 6px;
}
.card-desc{
  font-size:13.5px;color:var(--ink-2);line-height:1.62;margin:0;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;
}
.card-foot{
  display:flex;align-items:center;gap:6px;
  margin-top:11px;font-size:11.5px;color:var(--ink-3);
}
.tagpill{
  padding:2px 8px;border-radius:5px;
  background:var(--bg-soft);color:var(--ink-3);
  font-size:11px;letter-spacing:.02em;
}

/* 精选头条 */
.hero{
  margin:0 20px 18px;
  padding:20px;
  border-radius:12px;
  background:linear-gradient(152deg,var(--hero-a) 0%,var(--hero-b) 100%);
  color:#fff;
  position:relative;overflow:hidden;
}
.hero::after{
  content:"";position:absolute;right:-40px;top:-50px;
  width:150px;height:150px;border-radius:50%;
  border:1px solid rgba(255,255,255,.14);
}
.hero::before{
  content:"";position:absolute;right:-14px;top:-24px;
  width:96px;height:96px;border-radius:50%;
  border:1px solid rgba(255,255,255,.1);
}
.hero-kicker{
  font-size:10.5px;letter-spacing:.14em;text-transform:uppercase;
  opacity:.72;margin-bottom:10px;font-weight:500;
}
.hero-title{
  font-size:19px;font-weight:600;line-height:1.4;
  letter-spacing:-.01em;margin:0 0 8px;position:relative;z-index:1;
}
.hero-desc{
  font-size:13px;line-height:1.65;opacity:.82;margin:0 0 14px;
  position:relative;z-index:1;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;
}
.hero-btn{
  display:inline-flex;align-items:center;gap:5px;
  font-size:13px;font-weight:500;
  padding:7px 14px;border-radius:100px;
  background:rgba(255,255,255,.15);
  border:1px solid rgba(255,255,255,.2);
  position:relative;z-index:1;
}
.hero-btn svg{width:14px;height:14px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}

/* 小节标题 */
.sec-head{
  display:flex;align-items:center;justify-content:space-between;
  padding:0 20px;margin:6px 0 12px;
}
.sec-title{font-size:14px;font-weight:600;letter-spacing:.01em;margin:0}
.sec-more{font-size:12px;color:var(--ink-3)}
.sec-right{display:flex;align-items:center;gap:8px}
.fx-mini{display:flex;gap:3px}
.fx-minibtn{
  width:27px;height:27px;flex:0 0 27px;
  display:grid;place-items:center;
  border:1px solid var(--line);border-radius:6px;
  background:var(--bg);color:var(--ink-2);
  transition:background .14s ease;
}
.fx-minibtn:active{background:var(--bg-soft)}
.fx-minibtn:disabled{opacity:.28}
.fx-minibtn svg{width:13px;height:13px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}

/* ---------- 文章详情 ---------- */
.article{padding:8px 20px 0}
.art-cat{
  display:inline-flex;align-items:center;gap:6px;
  font-size:11.5px;letter-spacing:.06em;color:var(--brand);
  padding:4px 9px;border-radius:5px;background:var(--brand-soft);
  margin-bottom:14px;font-weight:500;
}
@media (prefers-color-scheme: dark){.art-cat{color:var(--brand-2)}}
.art-title{
  font-size:25px;font-weight:600;line-height:1.36;
  letter-spacing:-.02em;margin:0 0 12px;
}
.art-meta{
  display:flex;align-items:center;gap:8px;flex-wrap:wrap;
  font-size:12px;color:var(--ink-3);
  padding-bottom:18px;border-bottom:1px solid var(--line-soft);
}
.art-meta .dot{width:2px;height:2px;border-radius:50%;background:var(--ink-3)}

.lede{
  margin:20px 0 6px;
  padding-left:13px;
  border-left:2px solid var(--brand);
  font-size:15.5px;line-height:1.72;color:var(--ink-2);
}

/* 要点 */
.points{
  margin:22px 0 6px;
  padding:16px 16px 6px;
  border:1px solid var(--line);
  border-radius:11px;
  background:var(--bg-soft);
}
.points-h{
  font-size:11px;letter-spacing:.12em;color:var(--ink-3);
  margin-bottom:12px;font-weight:500;
}
.point{
  display:flex;gap:10px;
  padding-bottom:12px;margin-bottom:0;
  font-size:14px;line-height:1.68;color:var(--ink);
}
.point-n{
  flex:0 0 17px;height:17px;margin-top:3px;
  display:grid;place-items:center;
  border:1px solid var(--line);border-radius:4px;
  font-size:10px;color:var(--ink-3);
  background:var(--bg);
}

.body-block{margin:26px 0}
.body-block h3{
  font-size:16px;font-weight:600;letter-spacing:-.005em;
  margin:0 0 10px;line-height:1.5;
  display:flex;align-items:baseline;gap:8px;
}
.body-block h3 .num{
  font-size:11px;font-weight:500;color:var(--brand);
  letter-spacing:.08em;flex:0 0 auto;
  transform:translateY(-1px);
}
@media (prefers-color-scheme: dark){.body-block h3 .num{color:var(--brand-2)}}
.body-block p{
  margin:0 0 12px;
  font-size:15.5px;line-height:1.82;color:var(--ink);
  letter-spacing:.002em;
}
.body-block p:last-child{margin-bottom:0}

/* 引用 / 机制说明 */
.note{
  margin:14px 0;
  padding:12px 14px;
  background:var(--brand-soft);
  border-radius:8px;
  font-size:13.5px;line-height:1.72;color:var(--brand-2);
}
@media (prefers-color-scheme: dark){
  .note{color:var(--ink-2)}
}

/* 行动卡 */
.action{
  margin:28px 0 0;
  padding:18px;
  border-radius:11px;
  border:1px solid var(--line);
  background:var(--warm-soft);
}
.action-h{
  display:flex;align-items:center;gap:7px;
  font-size:11px;letter-spacing:.12em;color:var(--warm);
  font-weight:500;margin-bottom:10px;
}
.action-h svg{width:14px;height:14px;stroke:currentColor;fill:none;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.action p{
  margin:0;font-size:14.5px;line-height:1.75;color:var(--ink);
}

/* 出处 */
.src{
  margin:20px 0 0;
  font-size:12px;line-height:1.7;color:var(--ink-3);
  padding-top:14px;border-top:1px solid var(--line-soft);
}
.src b{font-weight:500;color:var(--ink-2)}

/* 底部工具条 */
.artbar{
  display:flex;align-items:center;gap:10px;
  margin:24px 0 0;
}
.btn-ghost{
  flex:1;display:flex;align-items:center;justify-content:center;gap:6px;
  height:44px;border:1px solid var(--line);border-radius:9px;
  font-size:14px;color:var(--ink-2);background:var(--bg);
  transition:all .15s ease;
}
.btn-ghost:active{background:var(--bg-soft)}
.btn-ghost svg{width:17px;height:17px;stroke:currentColor;fill:none;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.btn-ghost.on{color:var(--brand);border-color:var(--brand);background:var(--brand-soft)}
@media (prefers-color-scheme: dark){.btn-ghost.on{color:var(--brand-2)}}

.btn-solid{
  display:flex;align-items:center;justify-content:center;gap:6px;
  width:100%;height:48px;border-radius:9px;
  background:var(--brand);color:#fff;
  font-size:15px;font-weight:500;
  transition:opacity .15s ease,transform .12s ease;
}
.btn-solid:active{opacity:.86;transform:scale(.99)}
@media (prefers-color-scheme: dark){.btn-solid{color:#0E1413}}
.btn-solid:disabled{
  background:var(--bg-mute);color:var(--ink-3);
  opacity:1;
}

/* 相关阅读 */
.related{margin-top:30px}
.related-h{
  font-size:12px;letter-spacing:.08em;color:var(--ink-3);
  margin-bottom:10px;font-weight:500;
}
.rel-item{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  padding:13px 0;
  border-top:1px solid var(--line-soft);
  font-size:14.5px;line-height:1.5;text-align:left;
  width:100%;
}
.rel-item span{flex:1}
.rel-item svg{width:15px;height:15px;stroke:var(--ink-3);fill:none;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;flex:0 0 15px}

/* ---------- 测评 ---------- */
.assess-card{
  padding:17px 16px;
  border:1px solid var(--line);
  border-radius:11px;
  background:var(--bg);
  text-align:left;width:100%;
  box-shadow:var(--shadow);
  transition:transform .14s ease,background .14s ease;
}
.assess-card:active{transform:scale(.988);background:var(--bg-soft)}
.ac-top{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin-bottom:8px}
.ac-title{font-size:16px;font-weight:600;line-height:1.45;margin:0}
.ac-badge{
  flex:0 0 auto;font-size:10.5px;letter-spacing:.04em;
  padding:3px 7px;border-radius:4px;
  background:var(--brand-soft);color:var(--brand);font-weight:500;
}
@media (prefers-color-scheme: dark){.ac-badge{color:var(--brand-2)}}
.ac-desc{font-size:13px;color:var(--ink-2);line-height:1.65;margin:0 0 11px}
.ac-meta{display:flex;align-items:center;gap:14px;font-size:11.5px;color:var(--ink-3)}
.ac-meta span{display:flex;align-items:center;gap:4px}
.ac-meta svg{width:13px;height:13px;stroke:currentColor;fill:none;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}

/* 答题 */
.quiz{padding:6px 20px 0}
.quiz-progress{
  height:3px;background:var(--bg-mute);border-radius:2px;
  overflow:hidden;margin-bottom:8px;
}
.quiz-progress i{
  display:block;height:100%;background:var(--brand);border-radius:2px;
  transition:width .32s cubic-bezier(.4,0,.2,1);
}
.quiz-count{
  display:flex;justify-content:space-between;
  font-size:11.5px;color:var(--ink-3);margin-bottom:26px;
  letter-spacing:.03em;
}
.q-text{
  font-size:20px;font-weight:600;line-height:1.5;
  letter-spacing:-.01em;margin:0 0 6px;
}
.q-hint{font-size:12.5px;color:var(--ink-3);margin:0 0 22px}

.opts{display:flex;flex-direction:column;gap:9px}
.opt{
  display:flex;align-items:center;gap:11px;
  padding:15px 15px;
  border:1px solid var(--line);border-radius:9px;
  font-size:15px;line-height:1.45;text-align:left;
  background:var(--bg);
  transition:all .15s ease;
}
.opt:active{transform:scale(.99)}
.opt .radio{
  flex:0 0 17px;height:17px;border-radius:50%;
  border:1.5px solid var(--line);
  display:grid;place-items:center;
  transition:all .15s ease;
}
.opt .radio::after{
  content:"";width:7px;height:7px;border-radius:50%;
  background:transparent;transition:background .15s ease;
}
.opt.sel{border-color:var(--brand);background:var(--brand-soft)}
.opt.sel .radio{border-color:var(--brand)}
.opt.sel .radio::after{background:var(--brand)}

.quiz-nav{display:flex;gap:10px;margin-top:28px}
.quiz-nav .btn-ghost{flex:0 0 auto;padding:0 20px}

/* 结果 */
.result{padding:4px 20px 0}
.res-kicker{
  font-size:11px;letter-spacing:.14em;color:var(--ink-3);
  font-weight:500;margin-bottom:10px;text-transform:uppercase;
}
.res-level{
  font-size:27px;font-weight:600;line-height:1.3;
  letter-spacing:-.02em;margin:0 0 8px;
}
.res-level em{
  font-style:normal;color:var(--brand);
}
@media (prefers-color-scheme: dark){.res-level em{color:var(--brand-2)}}
.res-score{
  font-size:13px;color:var(--ink-3);margin:0 0 20px;
}
.res-summary{
  font-size:15px;line-height:1.82;color:var(--ink-2);
  margin:0 0 24px;
}
.res-score b{
  font-size:19px;color:var(--ink);font-weight:600;
  font-variant-numeric:tabular-nums;
}

.gauge{
  height:6px;border-radius:3px;background:var(--bg-mute);
  position:relative;margin:0 0 6px;overflow:hidden;
}
.gauge i{
  position:absolute;left:0;top:0;height:100%;border-radius:3px;
  background:var(--brand);
  transition:width .6s cubic-bezier(.2,.8,.2,1);
}
.gauge-legend{
  display:flex;justify-content:space-between;
  font-size:10.5px;color:var(--ink-3);margin-bottom:26px;
  letter-spacing:.03em;
}

.res-block{
  padding:16px 0;
  border-top:1px solid var(--line-soft);
}
.res-block h4{
  font-size:12px;letter-spacing:.1em;color:var(--ink-3);
  font-weight:500;margin:0 0 9px;
}
.res-block p{
  margin:0 0 10px;font-size:15px;line-height:1.8;color:var(--ink);
}
.res-block p:last-child{margin-bottom:0}
.res-block ul{margin:0;padding-left:17px}
.res-block li{
  font-size:14.5px;line-height:1.8;color:var(--ink);margin-bottom:6px;
}
.res-dim{
  display:flex;align-items:center;gap:10px;
  margin-bottom:11px;font-size:13px;
}
.res-dim .lb{flex:0 0 62px;color:var(--ink-2)}
.res-dim .bar{flex:1;height:5px;border-radius:3px;background:var(--bg-mute);overflow:hidden}
.res-dim .bar i{display:block;height:100%;background:var(--brand);border-radius:3px;transition:width .5s ease}
.res-dim .vl{flex:0 0 34px;text-align:right;color:var(--ink-3);font-variant-numeric:tabular-nums;font-size:12px}

/* ---------- 工具 ---------- */
.tool-card{
  padding:18px 16px;
  border:1px solid var(--line);border-radius:11px;
  background:var(--bg);
  margin-bottom:10px;
}
.tc-head{display:flex;align-items:center;gap:11px;margin-bottom:6px}
.tc-icon{
  flex:0 0 34px;height:34px;border-radius:9px;
  background:var(--brand-soft);
  display:grid;place-items:center;
  color:var(--brand);
}
@media (prefers-color-scheme: dark){.tc-icon{color:var(--brand-2)}}
.tc-icon svg{width:17px;height:17px;stroke:currentColor;fill:none;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.tc-title{font-size:15.5px;font-weight:600;margin:0;line-height:1.4}
.tc-count{
  margin-left:auto;flex:0 0 auto;
  font-size:11.5px;color:var(--ink-3);letter-spacing:.02em;
}
.tc-desc{font-size:13px;color:var(--ink-3);line-height:1.6;margin:0 0 4px}

/* 情绪记录 */
.emo-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:14px 0 18px}
.emo{
  padding:12px 6px;border:1px solid var(--line);border-radius:9px;
  display:flex;flex-direction:column;align-items:center;gap:5px;
  font-size:12.5px;color:var(--ink-2);
  transition:all .15s ease;
}
.emo .e-dot{width:9px;height:9px;border-radius:50%;background:var(--line)}
.emo.sel{border-color:var(--brand);background:var(--brand-soft);color:var(--brand)}
@media (prefers-color-scheme: dark){.emo.sel{color:var(--brand-2)}}
.emo.sel .e-dot{background:currentColor}

.field{margin-bottom:16px}
.field label{
  display:block;font-size:12px;letter-spacing:.05em;
  color:var(--ink-3);margin-bottom:7px;font-weight:500;
}
.field textarea,.field input[type=text]{
  width:100%;padding:11px 13px;
  border:1px solid var(--line);border-radius:8px;
  background:var(--bg-soft);
  font-size:14.5px;line-height:1.7;
  resize:vertical;outline:none;
  transition:border-color .15s ease;
}
.field textarea:focus,.field input:focus{border-color:var(--brand)}
.field textarea::placeholder,.field input::placeholder{color:var(--ink-3)}

.range-wrap{display:flex;align-items:center;gap:12px}
.range-wrap input[type=range]{
  flex:1;-webkit-appearance:none;height:3px;border-radius:2px;
  background:linear-gradient(90deg,var(--brand) 0%,var(--brand) var(--p,50%),var(--bg-mute) var(--p,50%));
  outline:none;
}
.range-wrap input[type=range]::-webkit-slider-thumb{
  -webkit-appearance:none;width:20px;height:20px;border-radius:50%;
  background:#fff;border:1.5px solid var(--brand);
  box-shadow:0 1px 3px rgba(0,0,0,.14);cursor:pointer;
}
.range-val{
  flex:0 0 auto;font-size:13px;color:var(--ink-2);
  font-variant-numeric:tabular-nums;min-width:34px;text-align:right;
}

/* 呼吸 */
.breath-stage{
  display:grid;place-items:center;
  padding:20px 0 8px;
}
.breath-orb{
  width:180px;height:180px;border-radius:50%;
  background:radial-gradient(circle at 50% 45%, var(--brand-soft) 0%, var(--bg-mute) 100%);
  border:1px solid var(--line);
  display:grid;place-items:center;
  position:relative;
  transition:transform 4s cubic-bezier(.4,0,.6,1), background 1s ease;
}
.breath-orb.run{transform:scale(1.06)}
.breath-txt{
  position:absolute;inset:0;
  display:grid;place-items:center;align-content:center;gap:4px;
  text-align:center;
}
.breath-phase{font-size:17px;font-weight:600;letter-spacing:.02em}
.breath-sec{
  font-size:12px;color:var(--ink-3);
  font-variant-numeric:tabular-nums;
}
.breath-note{
  text-align:center;font-size:12.5px;color:var(--ink-3);
  line-height:1.7;margin:6px 0 16px;
}

/* 记录列表 */
.rec-list{margin-top:16px}
.rec-item{
  display:flex;gap:12px;
  padding:13px 0;
  border-top:1px solid var(--line-soft);
  font-size:13.5px;line-height:1.6;
}
.rec-date{
  flex:0 0 46px;color:var(--ink-3);font-size:11.5px;
  font-variant-numeric:tabular-nums;padding-top:2px;letter-spacing:.02em;
}
.rec-body{flex:1;min-width:0}
.rec-tag{
  display:inline-block;font-size:11px;padding:1px 7px;border-radius:4px;
  background:var(--brand-soft);color:var(--brand);margin-bottom:4px;
}
@media (prefers-color-scheme: dark){.rec-tag{color:var(--brand-2)}}
.rec-text{color:var(--ink-2);word-break:break-word}

.empty{
  padding:34px 10px;text-align:center;
  font-size:13px;color:var(--ink-3);line-height:1.7;
}

/* ---------- 我的 ---------- */
.stat-row{
  display:grid;grid-template-columns:repeat(3,1fr);
  gap:1px;background:var(--line-soft);
  border:1px solid var(--line);border-radius:11px;
  overflow:hidden;margin:0 20px 20px;
}
.stat{
  background:var(--bg);padding:15px 8px;text-align:center;
}
.stat b{
  display:block;font-size:21px;font-weight:600;
  font-variant-numeric:tabular-nums;line-height:1.2;letter-spacing:-.02em;
}
.stat span{font-size:11px;color:var(--ink-3);letter-spacing:.03em}

.chart-wrap{
  margin:0 20px 8px;
  padding:16px 14px 10px;
  border:1px solid var(--line);border-radius:11px;
  background:var(--bg);
}
.chart-h{
  display:flex;align-items:baseline;justify-content:space-between;
  font-size:12px;color:var(--ink-3);margin-bottom:10px;letter-spacing:.03em;
}
.chart-h b{font-size:12.5px;color:var(--ink-2);font-weight:500}

.menu{margin:0 20px}
.menu-item{
  display:flex;align-items:center;justify-content:space-between;
  width:100%;padding:15px 0;text-align:left;
  border-bottom:1px solid var(--line-soft);
  font-size:14.5px;
}
.menu-item:last-child{border-bottom:none}
.menu-item .mi-l{display:flex;align-items:center;gap:10px;color:var(--ink)}
.menu-item svg{width:17px;height:17px;stroke:var(--ink-3);fill:none;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.menu-item .mi-r{color:var(--ink-3);font-size:13px;display:flex;align-items:center;gap:4px}

/* ---------- 心理效应 ---------- */
.fx-search{
  position:relative;
  margin:0 20px 16px;
}
.fx-search-ico{
  position:absolute;left:13px;top:50%;transform:translateY(-50%);
  display:flex;color:var(--ink-3);pointer-events:none;
}
.fx-search-ico svg{width:16px;height:16px;stroke:currentColor;fill:none;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.fx-search input{
  width:100%;
  padding:11px 13px 11px 37px;
  border:1px solid var(--line);
  border-radius:9px;
  background:var(--bg-soft);
  font-size:14.5px;
  outline:none;
  transition:border-color .15s ease,background .15s ease;
  -webkit-appearance:none;
}
.fx-search input:focus{border-color:var(--brand);background:var(--bg)}
.fx-search input::placeholder{color:var(--ink-3)}

.fx-list{padding:0 20px}
.fx-item{
  display:flex;align-items:flex-start;gap:12px;
  width:100%;text-align:left;
  padding:14px 0;
  border-bottom:1px solid var(--line-soft);
  transition:opacity .12s ease;
}
.fx-item:active{opacity:.55}
.fx-num{
  flex:0 0 30px;
  font-size:11px;color:var(--ink-3);
  font-variant-numeric:tabular-nums;
  letter-spacing:.02em;
  padding-top:3px;
}
.fx-main{flex:1;min-width:0}
.fx-name{
  display:block;
  font-size:15.5px;font-weight:600;line-height:1.45;
  letter-spacing:-.005em;
  margin-bottom:4px;
}
.fx-def{
  display:block;
  font-size:12.5px;color:var(--ink-3);line-height:1.62;
}
.fx-arrow{
  flex:0 0 14px;padding-top:3px;display:flex;
}
.fx-arrow svg{width:14px;height:14px;stroke:var(--ink-3);fill:none;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}

/* 翻页 */
.fx-pagerbar{
  display:flex;align-items:center;justify-content:space-between;
  gap:12px;
  margin:20px 20px 4px;
  padding-top:16px;
}
.fx-pagebtn{
  flex:0 0 auto;
  min-width:86px;
  height:40px;
  padding:0 16px;
  border:1px solid var(--line);
  border-radius:8px;
  background:var(--bg);
  font-size:13.5px;color:var(--ink-2);
  transition:background .15s ease;
}
.fx-pagebtn:active{background:var(--bg-soft)}
.fx-pagebtn:disabled{opacity:.32}
.fx-pageno{
  font-size:12.5px;color:var(--ink-3);
  font-variant-numeric:tabular-nums;
  letter-spacing:.04em;
  white-space:nowrap;
}
.fx-pageno b{
  font-size:14.5px;font-weight:600;color:var(--ink);
}

/* 效应详情 */
.effect{padding:8px 20px 0}
.fx-meta{
  display:flex;align-items:center;gap:9px;
  margin-bottom:13px;
}
.fx-badge{
  font-size:11px;font-weight:500;
  padding:3px 8px;border-radius:4px;
  background:var(--brand);color:#fff;
  letter-spacing:.04em;
  font-variant-numeric:tabular-nums;
}
@media (prefers-color-scheme: dark){
  .fx-badge{color:#0E1413}
}
.fx-group{
  font-size:11.5px;color:var(--ink-3);letter-spacing:.05em;
}
.fx-title{
  font-size:25px;font-weight:600;line-height:1.35;
  letter-spacing:-.02em;margin:0 0 10px;
}
.fx-story-head{
  display:flex;align-items:center;gap:8px;
  font-size:11px;font-weight:500;letter-spacing:.12em;
  color:var(--ink-3);
  margin:28px 0 12px;
}
.fx-story-head::after{
  content:"";flex:1;height:1px;background:var(--line-soft);
}
.fx-story{
  margin:0;
  font-size:15.5px;line-height:1.88;
  color:var(--ink);
  letter-spacing:.002em;
}

.fx-pager{
  display:grid;grid-template-columns:1fr 1fr;gap:10px;
  margin:28px 0 0;
}
.fx-pg{
  display:flex;flex-direction:column;gap:3px;
  padding:12px 13px;
  border:1px solid var(--line);
  border-radius:9px;
  background:var(--bg);
  text-align:left;
  min-width:0;
  transition:background .15s ease;
}
.fx-pg:active{background:var(--bg-soft)}
.fx-pg.right{text-align:right}
.fx-pg.disabled{opacity:.42}
.fx-pg-dir{
  font-size:11px;color:var(--ink-3);letter-spacing:.05em;
}
.fx-pg-name{
  font-size:13.5px;color:var(--ink);line-height:1.45;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}

/* 首页入口 */
.fx-entry{
  display:flex;align-items:center;gap:12px;
  width:calc(100% - 40px);
  margin:8px 20px 4px;
  padding:15px 16px;
  border:1px solid var(--line);
  border-radius:10px;
  background:var(--bg-soft);
  text-align:left;
  transition:background .15s ease;
}
.fx-entry:active{background:var(--bg-mute)}
.fx-entry-ico{
  flex:0 0 34px;height:34px;border-radius:9px;
  display:grid;place-items:center;
  background:var(--bg);
  border:1px solid var(--line);
  color:var(--brand);
}
@media (prefers-color-scheme: dark){.fx-entry-ico{color:var(--brand-2)}}
.fx-entry-ico svg{width:17px;height:17px;stroke:currentColor;fill:none;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.fx-entry-main{flex:1;min-width:0}
.fx-entry-main b{
  display:block;font-size:14.5px;font-weight:600;margin-bottom:2px;
}
.fx-entry-main span{
  display:block;font-size:12px;color:var(--ink-3);line-height:1.5;
}
.fx-entry > svg{
  width:15px;height:15px;flex:0 0 15px;
  stroke:var(--ink-3);fill:none;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;
}

/* ---------- 底部 Tab ---------- */
.tabbar{
  position:fixed;bottom:0;left:50%;transform:translateX(-50%);
  width:100%;max-width:var(--maxw);
  height:calc(var(--tab-h) + env(safe-area-inset-bottom, 0px));
  padding-bottom:env(safe-area-inset-bottom, 0px);
  background:var(--bg);
  background:color-mix(in srgb, var(--bg) 94%, transparent);
  backdrop-filter:saturate(180%) blur(18px);
  -webkit-backdrop-filter:saturate(180%) blur(18px);
  border-top:1px solid var(--line);
  display:flex;z-index:50;
}
.tab{
  flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;
  gap:3px;color:var(--ink-3);
  font-size:10.5px;letter-spacing:.02em;
  transition:color .15s ease;
}
.tab svg{width:21px;height:21px;stroke:currentColor;fill:none;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.tab.on{color:var(--brand)}
@media (prefers-color-scheme: dark){.tab.on{color:var(--brand-2)}}
.tab.on svg{stroke-width:1.8}

/* ---------- 搜索层 ---------- */
.searchlayer{
  position:fixed;inset:0;z-index:100;
  background:var(--bg);
  max-width:var(--maxw);margin:0 auto;
  display:flex;flex-direction:column;
  animation:fadeIn .18s ease;
}
.searchlayer[hidden]{display:none}
@keyframes fadeIn{from{opacity:0}to{opacity:1}}
.searchbar{
  display:flex;align-items:center;gap:10px;
  padding:calc(14px + env(safe-area-inset-top, 0px)) 16px 14px;
  border-bottom:1px solid var(--line-soft);
}
.searchbar input{
  flex:1;padding:10px 13px;
  border:1px solid var(--line);border-radius:8px;
  background:var(--bg-soft);outline:none;font-size:15px;
}
.searchbar input:focus{border-color:var(--brand)}
.search-cancel{font-size:14px;color:var(--brand);flex:0 0 auto}
@media (prefers-color-scheme: dark){.search-cancel{color:var(--brand-2)}}
.searchresults{
  flex:1;overflow-y:auto;padding:12px 20px 40px;
}

/* 结果图浮层 */
.imgmodal{
  position:fixed;inset:0;z-index:300;
  background:rgba(8,14,12,.76);
  display:flex;align-items:center;justify-content:center;
  padding:22px;overflow-y:auto;
  animation:fadeIn .2s ease;
}
.imgmodal-inner{max-width:330px;width:100%;text-align:center;margin:auto}
.imgmodal img{
  width:100%;height:auto;display:block;border-radius:12px;
  box-shadow:0 16px 48px rgba(0,0,0,.34);
}
.imgmodal-tip{
  font-size:12.5px;color:rgba(255,255,255,.72);
  margin:14px 0 16px;letter-spacing:.02em;
}
.imgmodal .btn-solid{
  background:#fff;color:#17564B;max-width:210px;margin:0 auto;height:44px;
}

/* 提示条 */
.toast{
  position:fixed;left:50%;bottom:calc(var(--tab-h) + 26px);
  transform:translate(-50%,10px);
  background:var(--ink);color:var(--bg);
  padding:9px 16px;border-radius:100px;
  font-size:13px;z-index:200;
  opacity:0;pointer-events:none;
  transition:opacity .22s ease,transform .22s ease;
  white-space:nowrap;
  max-width:88vw;overflow:hidden;text-overflow:ellipsis;
}
.toast.show{opacity:1;transform:translate(-50%,0)}

/* 免责 */
.disclaimer{
  margin:22px 20px 0;
  padding:13px 14px;
  border-radius:8px;
  background:var(--bg-soft);
  font-size:11.5px;line-height:1.75;color:var(--ink-3);
}
.disclaimer b{color:var(--ink-2);font-weight:500}
