/* 理想所在 · 抉择篇「岔路」
   纸色系外壳 —— 旧纸米白 + 深褐 + 宋体点睛 + 大留白
   少即是多，结构优于装饰，留白胜过填充。零外部依赖，移动端优先。 */
:root {
  --paper:   #f8f3ea;   /* 背景：旧纸/米白 */
  --paper-2: #f2ebdd;   /* 次背景：略深的纸 */
  --panel:   #fbf7ef;   /* 面板：比纸更亮一点 */
  --ink:     #43362f;   /* 主文字：深褐 */
  --ink-2:   #65574e;   /* 次文字 */
  --ink-3:   #8f7f71;   /* 辅助/提示文字 */
  --ink-4:   #b3a795;   /* 极弱：占位、页脚 */
  --line:    rgba(87, 70, 61, 0.10);   /* 极细分隔线 */
  --line-2:  rgba(87, 70, 61, 0.18);   /* 稍显的边线 */
  --wash:    rgba(87, 70, 61, 0.04);   /* 极淡填充 */
  --wash-2:  rgba(87, 70, 61, 0.07);   /* 次淡填充 */
  --accent:  #8a5a3c;   /* 唯一暖强调（赭石），极少用 */
  --radius:  18px;
  --serif:  "Songti SC", "STSong", "SimSun", Georgia, serif;       /* 点睛/标题/长文 */
  --sans:   "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif; /* 界面正文 */
}
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { font-size: 16px; }
html, body { overflow-x: clip; }
body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.9;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: rgba(138, 90, 60, 0.16); color: var(--ink); }
::-webkit-scrollbar { width: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(87, 70, 61, 0.16); border-radius: 5px; border: 3px solid var(--paper); }

/* 纸纹：极淡颗粒，让米白有温度，不喧哗 */
body::after {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='200' height='200' filter='url(%23n)' opacity='0.025'/></svg>");
}
.page { position: relative; z-index: 1; max-width: 480px; margin: 0 auto; padding: 24px 22px 64px; }

/* 桌面宽屏：让中间窄栏像一张安放在桌上的纸，消解两侧空旷（手机端不变） */
@media (min-width: 700px) {
  .page {
    margin: 44px auto;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 26px;
    box-shadow: 0 12px 54px rgba(67, 54, 47, 0.07);
    padding: 44px 46px 60px;
  }
}

/* 页面元素依次浮现（克制的入场仪式，呼吸式渐入） */
@media (prefers-reduced-motion: no-preference) {
  .page > * { opacity: 0; animation: rise .8s cubic-bezier(.22, .6, .3, 1) forwards; }
  .page > *:nth-child(2) { animation-delay: .10s; }
  .page > *:nth-child(3) { animation-delay: .20s; }
  .page > *:nth-child(4) { animation-delay: .30s; }
  .page > *:nth-child(5) { animation-delay: .40s; }
  .page > *:nth-child(n+6) { animation-delay: .50s; }
}
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.font-display { font-family: var(--serif); }

/* ---------- 面板（极简：纸面 + 一条极细边，不堆叠阴影） ---------- */
.card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 26px;
  margin-bottom: 22px;
}
.card.soft { background: var(--wash); border-color: var(--line); }
.card.no-orn { /* 无装饰角，留作兼容 */ }
.card h2 { letter-spacing: .04em; font-weight: 400; }

/* 分隔：一条极细的线，中间一个极小的点（呼应未闭合圆环 logo） */
.orn-divider {
  display: flex; align-items: center; gap: 14px; margin: 22px 0; color: var(--ink-4);
  font-size: 11px; letter-spacing: .4em; justify-content: center;
}
.orn-divider::before, .orn-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--line);
}

/* ---------- 按钮（深褐底纸字，克制有力；幽灵按钮描线） ---------- */
.btn {
  display: block; width: 100%; border: none; cursor: pointer; text-align: center; text-decoration: none;
  position: relative;
  background: var(--ink); color: var(--paper);
  font-family: var(--serif); font-size: 16px; font-weight: 400; letter-spacing: .18em; text-indent: .18em;
  padding: 17px 24px; border-radius: 14px;
  transition: background .35s, transform .15s, opacity .3s;
}
.btn:hover { background: #34291f; }
.btn:active { transform: scale(0.99); }
.btn:disabled { opacity: 0.4; pointer-events: none; }
.btn-ghost {
  background: transparent; color: var(--ink-2);
  border: 1px solid var(--line-2);
}
.btn-ghost:hover { background: var(--wash); color: var(--ink); }
.btn-sm { font-size: 14px; padding: 10px 18px; border-radius: 11px; width: auto; display: inline-block; letter-spacing: .1em; text-indent: .1em; }

.tag {
  display: inline-block; font-size: 11px; padding: 3px 13px; border-radius: 999px;
  border: 1px solid var(--line-2); color: var(--ink-3); letter-spacing: .25em; text-indent: .25em;
}
.muted { color: var(--ink-3); font-size: 14px; }
.small { color: var(--ink-4); font-size: 12px; }
.center { text-align: center; }
.mt8 { margin-top: 8px; } .mt16 { margin-top: 16px; } .mt24 { margin-top: 26px; }
.hidden { display: none !important; }

/* ---------- 品牌（未闭合圆环 + 圆点 logo，纯 CSS） ---------- */
.brand { text-align: center; padding: 40px 0 26px; }
.brand .logo {
  width: 40px; height: 40px; margin: 0 auto 18px; position: relative;
  display: block;
}
.brand .logo::before {
  content: ''; position: absolute; inset: 0; border-radius: 50%;
  border: 1px solid var(--ink-2);
  /* 顶部留出缺口：未闭合圆环 */
  clip-path: polygon(0 0, 42% 0, 42% 18%, 58% 18%, 58% 0, 100% 0, 100% 100%, 0 100%);
}
.brand .logo::after {
  content: ''; position: absolute; left: 50%; top: -2px; transform: translateX(-50%);
  width: 5px; height: 5px; border-radius: 50%; background: var(--accent);
}
.brand h1 {
  font-family: var(--serif);
  font-size: 30px; font-weight: 300; letter-spacing: .42em; text-indent: .42em; margin-top: 4px;
  color: var(--ink);
}
.brand .slogan {
  color: var(--ink-3); font-size: 13px; letter-spacing: .12em; margin-top: 14px;
  font-family: var(--serif); line-height: 1.9;
}

/* 母品牌细标（出现在最顶，极小字 + 大字距） */
.parent-brand {
  text-align: center; font-size: 11px; color: var(--ink-4);
  letter-spacing: .5em; text-indent: .5em; margin-bottom: 2px;
}

/* ---------- 首页主视觉：一段安静的题词，不用宫格罗列 ---------- */
.hero { position: relative; text-align: center; padding: 8px 6px; }
.hero .halo { display: none; }
.hero h2 {
  font-family: var(--serif); font-size: 19px; font-weight: 300;
  letter-spacing: .14em; color: var(--ink); line-height: 1.9;
}
.hero p { position: relative; }

/* 题词列（替代功能宫格：四行短句，竖向呼吸，不卖功能卖存在方式） */
.creed { margin: 8px 0; }
.creed .line {
  font-family: var(--serif); font-size: 15px; color: var(--ink-2);
  letter-spacing: .04em; line-height: 2.4; text-align: center;
}
.creed .line + .line { border-top: 1px solid var(--line); }

/* 兼容旧 .values 结构：退化为竖排细线列表，去掉宫格与图标 */
.values { display: block; }
.values .v {
  display: flex; align-items: baseline; gap: 14px;
  padding: 16px 4px; border-bottom: 1px solid var(--line);
  background: none; border-radius: 0; text-align: left;
}
.values .v i { display: none; }
.values .v b {
  font-family: var(--serif); font-weight: 400; font-size: 15px; color: var(--ink);
  letter-spacing: .06em; flex: 0 0 auto; min-width: 5em;
}
.values .v span { font-size: 13.5px; color: var(--ink-3); }

/* ---------- 输入 ---------- */
textarea, input[type="text"], input[type="password"] {
  width: 100%; border: 1px solid var(--line-2); border-radius: 12px; padding: 15px;
  font-size: 16px; font-family: var(--sans); background: var(--panel);
  color: var(--ink); outline: none; resize: none; line-height: 1.8;
  transition: border-color .25s;
}
textarea::placeholder, input::placeholder { color: var(--ink-4); }
textarea:focus, input:focus { border-color: var(--ink-3); }

/* ---------- 提问页（书写仪式：像在纸上落笔） ---------- */
.candle { position: relative; }
.candle::before { display: none; }  /* 去掉烛光光晕 */
.ask-card { padding: 24px 22px 16px; }
.ask-card textarea {
  border: none; background: transparent; border-radius: 0;
  padding: 6px 4px 16px; font-size: 16.5px; line-height: 2.1; min-height: 180px;
  letter-spacing: .01em; caret-color: var(--accent); font-family: var(--serif);
}
.ask-card textarea:focus { border: none; }
.ask-card textarea::placeholder { color: var(--ink-4); line-height: 2.1; }
/* 墨线：落笔时由浅入深 */
.ask-card .ink-line {
  height: 1px; margin: 0 2px; background: var(--line);
  transition: background .4s;
}
.ask-card:focus-within .ink-line { background: var(--ink-3); }
.ask-meta { display: flex; align-items: center; gap: 10px; margin-top: 14px; min-height: 24px; }
.voice-side { display: flex; align-items: center; gap: 8px; }

/* 「他们曾这样问」引言列 */
.eg-list { margin-top: 6px; }
.eg-list button {
  display: block; width: 100%; text-align: left; cursor: pointer; font-family: var(--serif);
  background: none;
  border: none; border-bottom: 1px solid var(--line);
  color: var(--ink-2); font-size: 14.5px; line-height: 1.9; padding: 15px 4px;
  transition: color .25s, padding-left .25s;
}
.eg-list button:hover { color: var(--ink); padding-left: 8px; }

/* 语音输入按钮（仅桌面端） */
.mic-btn {
  flex: 0 0 auto; width: 44px; height: 44px; border-radius: 50%; cursor: pointer;
  border: 1px solid var(--line-2); background: var(--wash);
  color: var(--ink-2); font-size: 18px; display: flex; align-items: center; justify-content: center;
  transition: all .2s;
}
.mic-btn.mic-sm { width: 34px; height: 34px; font-size: 14px; }
.mic-btn.listening { background: var(--wash-2); border-color: var(--ink-3); animation: micPulse 1.6s ease-out infinite; }
@keyframes micPulse {
  0% { box-shadow: 0 0 0 0 rgba(138, 90, 60, 0.22); }
  100% { box-shadow: 0 0 0 14px rgba(138, 90, 60, 0); }
}
.voice-hint { font-size: 12px; color: var(--ink-4); }

/* ---------- 抽牌（洗牌 → 弧形扇牌 → 飞牌入位 → 翻牌；纸面上的牌，不发光） ---------- */
.ritual-head { text-align: center; }
.ritual-head h2 { font-family: var(--serif); font-size: 20px; font-weight: 300; letter-spacing: .2em; color: var(--ink); }
.deck-area { position: relative; }
.deck-area::before { display: none; }  /* 去掉中央烛光 */

/* 牌背：旧纸卡背 + 极细描边 + 中心一个未闭合圆环（呼应 logo），不发光 */
.backskin {
  background:
    radial-gradient(circle at 50% 42%, transparent 8px, rgba(87,70,61,0.22) 8.5px 9.5px, transparent 10px),
    var(--paper-2);
  border: 1px solid var(--line-2);
  box-shadow: inset 0 0 0 3px var(--paper), inset 0 0 0 3.6px var(--line);
  border-radius: 7px;
}

/* 去掉星盘魔法阵（神秘营销元素，不符合调性） */
.magic-circle { display: none; }

/* 弧形扇牌 */
.fan2 { position: relative; height: 272px; }
.fan2 .fcard { z-index: 1; }
.fcard {
  position: absolute; left: 50%; top: 28px; width: 54px; height: 88px; margin-left: -27px;
  cursor: pointer; z-index: 1;
  transform-origin: 50% 290%;
  transform: rotate(var(--a, 0deg)) translateY(var(--lift, 0px));
  transition: transform .55s cubic-bezier(.25,.8,.3,1.12), opacity .3s;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-4); font-size: 13px;
}
.fan2.ready .fcard:hover { --lift: -18px; z-index: 5; box-shadow: 0 10px 22px rgba(67,54,47,.18); }
.fcard.picked { opacity: 0 !important; pointer-events: none; }
/* 洗牌：三股牌交错切洗 */
.shuffling2 .fcard { pointer-events: none; }
.shuffling2 .fcard:nth-child(3n)   { animation: cutL .42s ease-in-out infinite; }
.shuffling2 .fcard:nth-child(3n+1) { animation: cutR .42s ease-in-out infinite .14s; }
.shuffling2 .fcard:nth-child(3n+2) { animation: cutC .42s ease-in-out infinite .28s; }
@keyframes cutL { 50% { transform: translate(-38px, -8px) rotate(-8deg); } }
@keyframes cutR { 50% { transform: translate(38px, 5px) rotate(8deg); } }
@keyframes cutC { 50% { transform: translate(0, -15px) rotate(2deg); } }

/* 飞行中的牌 */
.flyclone {
  position: fixed; z-index: 60; pointer-events: none;
  transition: left .55s cubic-bezier(.45,.08,.25,1), top .55s cubic-bezier(.45,.08,.25,1),
              width .55s ease, height .55s ease;
}

/* 三张牌位 */
.drawn { display: flex; gap: 14px; justify-content: center; margin: 22px 0; }
.slot { width: 30%; max-width: 112px; text-align: center; position: relative; }
.slot::before { display: none; }  /* 去掉牌后光环 */
.slot.unlit::before { opacity: 0; }
.face2 { position: relative; width: 100%; aspect-ratio: 0.6; }
.face2 .empty {
  position: absolute; inset: 0; border: 1px dashed var(--line-2); border-radius: 9px;
  display: flex; align-items: center; justify-content: center; color: var(--ink-4); font-size: 16px;
  background: var(--wash); transition: opacity .3s;
}
.face2.has-card .empty { opacity: 0; }
.face2 .flip { position: absolute; inset: 0; perspective: 700px; opacity: 0; }
.face2.has-card .flip { opacity: 1; }
.flip-inner {
  position: relative; width: 100%; height: 100%;
  transform-style: preserve-3d;
  transition: transform .75s cubic-bezier(.3,.05,.25,1);
}
.flip.flipped .flip-inner { transform: rotateY(180deg); }
.ff {
  position: absolute; inset: 0; border-radius: 9px; overflow: hidden;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
}
.ff.fback { border-radius: 9px; }
.ff.ffront {
  transform: rotateY(180deg); background: var(--paper-2);
  border: 1px solid var(--line-2);
  box-shadow: 0 8px 22px rgba(67, 54, 47, 0.14);
}
.ff.ffront::after {
  content: ''; position: absolute; inset: 3px; pointer-events: none; z-index: 1;
  border: 1px solid var(--line); border-radius: 6px;
}
.ff.ffront img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ff.ffront img.reversed { transform: rotate(180deg); }
/* 静态牌面（解读页头部回显） */
.slot .face {
  position: relative; width: 100%; aspect-ratio: 0.6; border-radius: 9px; overflow: hidden;
  background: var(--paper-2); border: 1px solid var(--line-2);
  box-shadow: 0 8px 22px rgba(67, 54, 47, 0.14);
}
.slot .face::after {
  content: ''; position: absolute; inset: 3px; pointer-events: none;
  border: 1px solid var(--line); border-radius: 6px;
}
.slot .face img { width: 100%; height: 100%; object-fit: cover; display: block; }
.slot .face img.reversed { transform: rotate(180deg); }
.slot .slotname { font-size: 11px; color: var(--ink-3); letter-spacing: .25em; text-indent: .25em; margin-top: 12px; }
.slot .cardname { font-family: var(--serif); font-size: 14px; font-weight: 400; color: var(--ink); transition: opacity .4s; }
.slot .cardname.pending { opacity: .35; }
.slot .pos { font-size: 11px; color: var(--ink-4); letter-spacing: .12em; }

/* ---------- 解读正文（像一本书：宋体、宽行距、细线分隔） ---------- */
.analysis { color: var(--ink); font-family: var(--serif); }
.analysis p { text-wrap: pretty; }
.analysis h2, .analysis h3 { text-wrap: balance; }
.analysis h2 {
  font-size: 17px; font-weight: 400; margin: 36px 0 16px; color: var(--ink);
  letter-spacing: .12em; text-align: center; position: relative; padding-bottom: 12px;
}
.analysis h2::after {
  content: ''; display: block; width: 28px; height: 1px; background: var(--line-2);
  margin: 12px auto 0;
}
.analysis h3 { font-size: 15.5px; font-weight: 400; margin: 18px 0 6px; color: var(--ink-2); }
.analysis p { margin: 12px 0; font-size: 15.5px; line-height: 2.05; text-align: justify; letter-spacing: .01em; }
.analysis li { margin: 8px 0 8px 20px; font-size: 15.5px; line-height: 2.0; }
.analysis blockquote {
  background: var(--wash); border-left: 2px solid var(--line-2);
  border-radius: 0 8px 8px 0; padding: 12px 16px; font-size: 14px; color: var(--ink-2); margin: 14px 0;
}
.analysis strong { color: var(--ink); font-weight: 600; }
.analysis hr {
  border: none; height: 1px; margin: 26px auto; width: 60%; background: var(--line);
}
.analysis h2.md-title { font-size: 19px; margin-top: 8px; }
/* 解读收笔印记 */
.analysis .seal {
  margin: 36px 0 6px; color: var(--ink-4); font-size: 12px;
  letter-spacing: .5em; text-indent: .5em; text-align: center;
  animation: rise 1s ease both;
}
/* 解读页头部：所问之事 */
.q-label { font-size: 11px; color: var(--ink-4); letter-spacing: .3em; text-indent: .3em; }
.q-quote { font-family: var(--serif); font-weight: 400; font-size: 16px; color: var(--ink); line-height: 1.95; margin-top: 6px; text-wrap: pretty; }
.cursor { display: inline-block; width: 2px; height: 1em; background: var(--ink-3); vertical-align: -2px; animation: blink 0.9s infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- 付费墙（一段未读完的续篇，不叫卖） ---------- */
.paywall { position: relative; margin-top: -10px; }
.paywall .fade { height: 110px; background: linear-gradient(rgba(251,247,239,0), var(--paper)); margin-top: -110px; position: relative; }
.price-row { display: flex; gap: 12px; margin: 18px 0; }
.price-opt {
  flex: 1; border: 1px solid var(--line-2); border-radius: 12px;
  padding: 16px 10px; text-align: center; cursor: pointer; background: var(--panel);
  transition: border-color .2s, background .2s;
}
.price-opt:hover { border-color: var(--ink-3); }
.price-opt.sel { border-color: var(--ink); background: var(--wash); }
.price-opt .p { font-family: var(--serif); font-size: 22px; font-weight: 400; color: var(--ink); }
.price-opt .d { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.qrbox { text-align: center; padding: 12px 0; }
.qrbox img { width: 200px; height: 200px; border-radius: 12px; border: 1px solid var(--line-2); background: #fff; }

/* ---------- 危机干预（庄重、明亮、不惊扰） ---------- */
.crisis {
  background: var(--panel); color: var(--ink);
  border: 1px solid var(--line-2); border-radius: var(--radius); padding: 28px 24px;
}
.crisis h2 { font-family: var(--serif); font-size: 17px; font-weight: 400; color: var(--accent); margin-bottom: 12px; }
.crisis .muted { color: var(--ink-2); }
.crisis .hotline {
  background: var(--wash); border-radius: 12px; padding: 14px 16px; margin: 10px 0;
  display: flex; justify-content: space-between; align-items: center;
}
.crisis .hotline a { color: var(--accent); font-weight: 600; font-size: 17px; text-decoration: none; }
.crisis .small { color: var(--ink-3); }

/* ---------- 历史 ---------- */
.hist-item {
  display: block; text-decoration: none; color: inherit;
  background: var(--panel);
  border: 1px solid var(--line); border-radius: 13px;
  padding: 18px 18px; margin-bottom: 12px;
  transition: border-color .3s, transform .3s;
}
.hist-item:hover { border-color: var(--line-2); transform: translateY(-1px); }
.hist-item .q { font-family: var(--serif); font-size: 15px; font-weight: 400; color: var(--ink); }
.hist-item .meta { font-size: 12px; color: var(--ink-4); margin-top: 6px; }

/* ---------- admin ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px; text-align: center; }
.stat .n { font-family: var(--serif); font-size: 22px; font-weight: 400; color: var(--ink); }
.stat .l { font-size: 12px; color: var(--ink-3); }
table.orders { width: 100%; border-collapse: collapse; font-size: 13px; }
table.orders td, table.orders th { padding: 9px 6px; border-bottom: 1px solid var(--line); text-align: left; }

/* ---------- 页脚与导航 ---------- */
.disclaimer { font-size: 12px; color: var(--ink-4); text-align: center; margin-top: 36px; line-height: 2.1; }
.topnav { display: flex; justify-content: space-between; align-items: center; padding: 4px 0 18px; }
.topnav a { color: var(--ink-3); text-decoration: none; font-size: 14px; letter-spacing: .06em; transition: color .25s; }
.topnav a:hover { color: var(--ink); }

/* ---------- 等待动效（缓慢呼吸的环，不闪烁） ---------- */
.spinner {
  width: 42px; height: 42px; border-radius: 50%; margin: 0 auto; position: relative;
  border: 1px solid var(--line); border-top-color: var(--ink-3);
  animation: spin 1.8s cubic-bezier(.45, .15, .55, .85) infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
/* 等待提示文字：极淡的呼吸，不流光 */
.shimmer { color: var(--ink-3); animation: breathe 3s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { opacity: .5; } 50% { opacity: 1; } }
