/* 雾里有灯 · 水墨 */
:root {
  --paper: #f3eee3;
  --paper-hi: #fbf8f1;
  --paper-lo: #e8e1d2;
  --ink: #1f1d1a;
  --ink-soft: #45413b;
  --muted: #7d776d;
  --line: rgba(31, 29, 26, 0.16);
  --line-strong: rgba(31, 29, 26, 0.42);
  --wash: rgba(31, 29, 26, 0.05);
  --cinnabar: #a8352a;
  --cinnabar-deep: #872a21;
  --shadow: 0 6px 22px rgba(31, 29, 26, 0.08);
  --font: "LXGW WenKai Screen", "Kaiti SC", "STKaiti", "KaiTi", "楷体", "Noto Serif SC", "Songti SC", serif;
  --radius: 6px;
}

/* ---------- 基础 ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; color: var(--ink); font-family: var(--font); line-height: 1.8;
  background-color: var(--paper);
  background-image: url("/img/ink-mountains.svg"), url("/img/paper.svg"), radial-gradient(ellipse at 50% 0%, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0) 65%);
  background-repeat: no-repeat, repeat, no-repeat;
  background-position: bottom center, 0 0, top center;
  background-size: 100% 36vh, 240px 240px, 100% 100%;
  background-attachment: fixed;
}
body.art-bg {
  background-image: linear-gradient(rgba(243, 238, 227, 0.45), rgba(243, 238, 227, 0.45)), var(--bg-art), url("/img/paper.svg");
  background-repeat: no-repeat, no-repeat, repeat;
  background-position: center, center bottom, 0 0;
  background-size: cover, cover, 240px 240px;
}
button, input, textarea, select { font: inherit; color: inherit; }
a { color: var(--cinnabar-deep); }
h1, h2, h3 { font-weight: 400; letter-spacing: 0.08em; line-height: 1.4; }
h2 { font-size: 1.5rem; text-align: center; margin: 18px 0 8px; }
h2:focus, h1:focus { outline: none; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.hidden { display: none !important; }
.invisible { visibility: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: 0.86rem; }
.center { text-align: center; }
.err { color: var(--cinnabar); font-size: 0.9rem; min-height: 1.2em; margin: 0; }
@keyframes fadein { from { opacity: 0; transform: translateY(8px); } }
@keyframes breathe { 50% { opacity: 0.45; } }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- 雾 ---------- */
.mist { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.mist span { position: absolute; width: 80vw; height: 26vh; border-radius: 50%; background: rgba(255, 255, 255, 0.55); filter: blur(46px); animation: drift 40s ease-in-out infinite alternate; }
.mist span:nth-child(1) { top: 18%; left: -25%; }
.mist span:nth-child(2) { top: 58%; left: 35%; animation-duration: 48s; }
.mist span:nth-child(3) { top: 78%; left: -15%; animation-duration: 56s; }
@keyframes drift { to { transform: translateX(30vw); } }

/* ---------- 顶栏 ---------- */
.top { position: relative; z-index: 2; display: flex; justify-content: space-between; align-items: center; max-width: 620px; margin: 0 auto; padding: 14px 18px; }
.brand { display: flex; align-items: center; gap: 10px; background: none; border: 0; cursor: pointer; font-size: 1.1rem; letter-spacing: 0.12em; padding: 4px; }
.seal { display: inline-grid; place-items: center; width: 30px; height: 30px; background: var(--cinnabar); color: var(--paper-hi); border-radius: 3px; font-size: 1.05rem; box-shadow: inset 0 0 0 2px rgba(251, 248, 241, 0.25); }
.top-right { display: flex; gap: 8px; align-items: center; }
.top select, .icon-btn { background: var(--paper-hi); border: 1px solid var(--line-strong); border-radius: var(--radius); }
.top select { padding: 6px 8px; font-size: 0.85rem; }
.icon-btn { width: 34px; height: 34px; display: grid; place-items: center; color: var(--ink); cursor: pointer; padding: 0; }
.icon-btn .mute { display: none; }
.icon-btn.off { color: var(--muted); }
.icon-btn.off .mute { display: inline; }
.icon-btn.off .wave { display: none; }

/* ---------- 版面 ---------- */
main { position: relative; z-index: 1; }
.screen { max-width: 560px; margin: 0 auto; padding: 8px 20px 40px; animation: fadein 0.6s ease; }
.loading { display: grid; place-items: center; align-content: center; gap: 20px; min-height: 60vh; }
.load-bar { width: 120px; height: 2px; border-radius: 2px; background: var(--line); overflow: hidden; }
.load-bar i { display: block; height: 100%; width: calc(var(--p, 0) * 100%); background: var(--ink-soft); transition: width 0.3s ease; }
.seal.big { width: 56px; height: 56px; font-size: 1.9rem; border-radius: 5px; animation: breathe 1.8s ease-in-out infinite; }
.title { font-size: 2.6rem; text-align: center; margin: 10px 0 0; letter-spacing: 0.3em; text-indent: 0.3em; }
.tagline { text-align: center; color: var(--ink-soft); margin: 0 0 20px; letter-spacing: 0.16em; }
.intro { color: var(--ink-soft); text-align: center; margin: 8px 0; }
.note { font-size: 0.8rem; color: var(--muted); text-align: center; margin-top: 18px; }
.hint { color: var(--muted); font-size: 0.9rem; }
.fineprint { color: var(--muted); font-size: 0.82rem; line-height: 1.7; }
.thanks { color: var(--cinnabar-deep); text-align: center; }
.row-gap { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 16px 0; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
:lang(en) .title { font-size: 2.1rem; letter-spacing: 0.08em; text-indent: 0; }
:lang(en) .brand, :lang(en) .tagline { letter-spacing: 0.03em; }

/* ---------- 按钮 ---------- */
.btn { display: inline-flex; justify-content: center; align-items: center; gap: 6px; border-radius: var(--radius); padding: 10px 22px; border: 1px solid transparent; cursor: pointer; text-decoration: none; letter-spacing: 0.1em; transition: transform 0.15s, background 0.2s, opacity 0.2s; }
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.45; cursor: default; }
.btn.primary { background: var(--cinnabar); color: var(--paper-hi); box-shadow: inset 0 0 0 2px rgba(251, 248, 241, 0.18); }
.btn.primary:hover:not(:disabled) { background: var(--cinnabar-deep); }
.btn.ghost { border-color: var(--line-strong); color: var(--ink); background: rgba(251, 248, 241, 0.6); }
.btn.ghost:hover:not(:disabled) { background: var(--paper-hi); border-color: var(--ink); }
.btn.text { background: none; border: 0; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; padding: 8px 10px; }
.btn.big { display: flex; width: 100%; padding: 13px 22px; font-size: 1.12rem; margin-top: 18px; }
.btn.small { padding: 7px 16px; font-size: 0.9rem; }

/* ---------- 角色 ---------- */
.portrait { display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 8px auto 4px; }
.portrait-art { width: 144px; height: 180px; object-fit: contain; object-position: center bottom; border-radius: 80px 80px 8px 8px; border: 1px solid var(--line-strong); background: var(--paper-hi); }
.portrait.small .portrait-art { width: 120px; height: 150px; }
.portrait-art.placeholder { display: grid; place-items: center; padding: 14px; text-align: center; font-size: 0.85rem; color: var(--muted); border-style: dashed; background: var(--wash); }
.portrait-name { font-size: 0.9rem; color: var(--ink-soft); letter-spacing: 0.16em; }
#s-closed .portrait-art { filter: grayscale(1) opacity(0.7); }

/* ---------- 对话框 ---------- */
.say { margin: 14px 0; }
.say:empty { display: none; }
.dlg { position: relative; display: flex; gap: 12px; align-items: flex-start; background: var(--paper-hi); border: 1px solid var(--line); border-left: 3px solid var(--ink); border-radius: 2px var(--radius) var(--radius) 2px; padding: 14px 14px 16px; box-shadow: var(--shadow); cursor: pointer; animation: fadein 0.4s ease; }
.avatar { flex: 0 0 48px; width: 48px; height: 48px; border-radius: 50%; object-fit: cover; object-position: center top; border: 1px solid var(--line-strong); }
.avatar.placeholder { display: grid; place-items: center; background: var(--ink); color: var(--paper-hi); font-size: 1.25rem; border: 0; }
.dlg-body { flex: 1; min-width: 0; }
.dlg-name { font-size: 0.8rem; color: var(--cinnabar-deep); letter-spacing: 0.14em; margin-bottom: 2px; }
.dlg-text { margin: 0; white-space: pre-line; line-height: 1.9; color: var(--ink); min-height: 1.9em; }
.dlg-text.typing::after { content: '▍'; color: var(--ink-soft); animation: blink 0.9s steps(1) infinite; }
.dlg.looking .dlg-text { color: var(--muted); animation: breathe 1.8s ease-in-out infinite; }

/* ---------- 静心 ---------- */
.incense { position: relative; height: 150px; width: 60px; margin: 10px auto 0; }
.stick { position: absolute; left: 50%; bottom: 18px; width: 3px; height: 92px; margin-left: -1.5px; background: #6b5440; border-radius: 2px; }
.stick b { position: absolute; top: -4px; left: -2px; width: 7px; height: 7px; border-radius: 50%; background: #d4572f; box-shadow: 0 0 8px 2px rgba(212, 87, 47, 0.45); animation: ember 2.4s ease-in-out infinite; }
.burner { position: absolute; bottom: 0; left: 50%; width: 56px; height: 20px; margin-left: -28px; border-radius: 3px 3px 14px 14px; background: var(--ink); }
.smoke { position: absolute; left: 50%; bottom: 112px; }
.smoke i { position: absolute; left: -6px; width: 12px; height: 36px; border-radius: 50%; background: rgba(31, 29, 26, 0.16); filter: blur(4px); animation: smoke 4s ease-out infinite; opacity: 0; }
.smoke i:nth-child(2) { animation-delay: 1.3s; }
.smoke i:nth-child(3) { animation-delay: 2.6s; }
@keyframes ember { 50% { box-shadow: 0 0 12px 4px rgba(212, 87, 47, 0.6); } }
@keyframes smoke { 0% { opacity: 0; transform: translate(0, 0) scale(0.6); } 20% { opacity: 1; } 100% { opacity: 0; transform: translate(14px, -60px) scale(1.6) rotate(20deg); } }
.breath { display: grid; place-items: center; width: 160px; height: 160px; margin: 22px auto 6px; border-radius: 50%; background: radial-gradient(circle, rgba(31, 29, 26, 0.22) 0%, rgba(31, 29, 26, 0.09) 45%, rgba(31, 29, 26, 0) 70%); transform: scale(0.7); transition: transform 2.6s ease-in-out; color: var(--ink); letter-spacing: 0.3em; text-indent: 0.3em; }
.breath.in { transform: scale(1.1); }
.breath.out { transform: scale(0.7); }
#s-calm .muted { text-align: center; }
#s-calm .btn { display: flex; margin: 8px auto; }

/* ---------- 心事 / 提问 ---------- */
.group h3 { font-size: 0.9rem; color: var(--muted); text-align: center; margin: 18px 0 2px; letter-spacing: 0.14em; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 6px 0; }
.chip { border: 1px solid var(--line-strong); background: rgba(251, 248, 241, 0.7); border-radius: var(--radius); padding: 5px 13px; cursor: pointer; font-size: 0.93rem; transition: background 0.2s, color 0.2s; }
.chip:hover { border-color: var(--ink); }
.chip.on { background: var(--ink); border-color: var(--ink); color: var(--paper-hi); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 2px 0; }
.tag { font-size: 0.8rem; padding: 1px 10px; border-radius: var(--radius); border: 1px solid var(--line-strong); color: var(--ink-soft); }
.tag.wish { border-color: var(--cinnabar); color: var(--cinnabar-deep); }
.ask-block { animation: fadein 0.6s ease; }
.ask-block h3 { text-align: center; font-size: 1.12rem; margin: 18px 0 2px; }
.ask-block .hint { text-align: center; margin: 2px 0 8px; }
.suggest { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.suggest-chip { text-align: left; border: 1px dashed var(--line-strong); background: rgba(251, 248, 241, 0.7); border-radius: var(--radius); padding: 9px 12px; cursor: pointer; color: var(--ink); }
.suggest-chip:hover { border-style: solid; }
textarea, .contact input[type="text"] { width: 100%; background: var(--paper-hi); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 12px 14px; resize: vertical; line-height: 1.7; }
textarea:focus, .contact input[type="text"]:focus { border-color: var(--ink); outline: none; }

/* ---------- 抽牌 ---------- */
.spread { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 22px 0 14px; perspective: 1200px; }
.card { position: relative; aspect-ratio: 5 / 8; padding: 0; border: 0; background: none; cursor: pointer; transition: transform 0.7s cubic-bezier(.2, .8, .2, 1); }
.card-inner { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform 0.8s cubic-bezier(.2, .8, .2, 1); }
.card.flipped .card-inner { transform: rotateY(180deg); }
.card-back, .card-face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 6px; display: flex; flex-direction: column; align-items: center; }
.card-back { justify-content: space-between; padding: 12px 6px; color: var(--paper-hi); background: radial-gradient(ellipse at 50% 115%, #5c5852 0%, #2a2724 55%, var(--ink) 100%); box-shadow: inset 0 0 0 4px var(--ink), inset 0 0 0 5px rgba(243, 238, 227, 0.35), 0 4px 14px rgba(31, 29, 26, 0.18); }
.art-cardback .card-back { background: var(--card-back-art) center / cover; }
.art-cardback .card-back .sigil { visibility: hidden; }
.card-back .pos { font-size: 1.5rem; }
.card-back .sigil { display: grid; place-items: center; width: 2.4em; height: 2.4em; border-radius: 50%; font-size: 1.4rem; opacity: 0.9; background: rgba(243, 238, 227, 0.1); box-shadow: 0 0 0 1px rgba(243, 238, 227, 0.3); }
.card-back .pos-hint { font-size: 0.68rem; opacity: 0.75; text-align: center; line-height: 1.3; }
.card-face { transform: rotateY(180deg); justify-content: flex-start; gap: 3px; padding: 8px 6px; background: var(--paper-hi); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-strong), inset 0 0 0 4px var(--paper-hi), inset 0 0 0 5px var(--line), 0 4px 14px rgba(31, 29, 26, 0.12); }
.card-face .no { font-size: 0.75rem; color: var(--muted); }
.card-art { width: 86%; aspect-ratio: 1; flex: none; object-fit: cover; border-radius: 3px; }
.card-art.placeholder { display: grid; place-items: center; text-align: center; font-size: 0.66rem; line-height: 1.3; padding: 4px; color: var(--muted); border: 1px dashed var(--line-strong); background: var(--wash); }
.card-face.rev img.card-art { transform: rotate(180deg); }
.card-face .name { margin-top: auto; font-size: 1.05rem; line-height: 1.25; text-align: center; }
.card-face .ori { margin-bottom: 2px; font-size: 0.66rem; color: var(--cinnabar-deep); }
.card-face.rev .ori { padding: 0 5px; border-radius: 2px; background: var(--cinnabar); color: var(--paper-hi); }
.spread.shuffling .card { transform: translateX(calc((1 - var(--i)) * (100% + 12px))) rotate(calc((var(--i) - 1) * 5deg)); }
.spread.shuffling .card-inner { animation: wiggle 0.35s ease-in-out infinite alternate; }
.spread.shuffling .card-back .pos, .spread.shuffling .card-back .pos-hint { opacity: 0; transition: opacity 0.3s; }
.spread.shuffling.resting .card-inner { animation: none; }
.spread.resting .card { opacity: 0.7; }
@keyframes wiggle { from { transform: translateY(-3px) rotate(-2deg); } to { transform: translateY(3px) rotate(2deg); } }
.card.locked { opacity: 0.5; filter: grayscale(0.4); }
.card.next .card-back { animation: glow 1.8s ease-in-out infinite; }
.card.pending .card-back { animation: think 2.4s ease-in-out infinite; }
@keyframes glow { 50% { box-shadow: inset 0 0 0 4px var(--ink), inset 0 0 0 5px rgba(243, 238, 227, 0.35), 0 0 0 2px var(--cinnabar), 0 0 18px 2px rgba(168, 53, 42, 0.35); } }
@keyframes think { 50% { box-shadow: inset 0 0 0 4px var(--ink), inset 0 0 0 5px rgba(243, 238, 227, 0.2), 0 0 14px 2px rgba(31, 29, 26, 0.25); } }
.card.active .card-face { outline: 2px solid var(--cinnabar); outline-offset: 3px; }
.card.nudge { animation: nudge 0.45s ease; }
@keyframes nudge { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.card-detail { background: var(--paper-hi); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px 12px; margin: 4px 0 14px; box-shadow: var(--shadow); scroll-margin: 16px; }
.card-detail.rise { animation: rise 0.5s ease; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.detail-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.d-pos { width: 100%; font-size: 0.8rem; color: var(--cinnabar-deep); letter-spacing: 0.1em; }
.d-name { font-size: 1.4rem; }
.d-ori { font-size: 0.85rem; color: var(--muted); }
.d-kw { margin: 4px 0; font-size: 0.88rem; color: var(--muted); }
.d-rev { margin: 6px 0; font-size: 0.85rem; color: var(--cinnabar-deep); }
.d-quote { margin: 6px 0; font-size: 0.88rem; color: var(--ink-soft); border-left: 2px solid var(--line-strong); padding-left: 10px; }
.d-meaning { margin: 8px 0; font-size: 0.95rem; }
.d-meaning b { font-weight: 400; color: var(--cinnabar-deep); margin-right: 8px; }
.card-detail .say { margin: 10px 0 0; }
.card-detail .dlg { background: var(--paper); box-shadow: none; }
#draw-say { margin-bottom: 10px; }
#s-draw .btn { display: flex; margin: 8px auto; }
.defer { margin: 14px 0 8px; animation: fadein 0.6s ease; }
.defer .say { margin: 0; }
.defer .row-gap { margin-top: 10px; align-items: center; }

/* ---------- 签文 ---------- */
.scroll-paper { background: var(--paper-hi); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 20px; margin-top: 16px; box-shadow: var(--shadow); transition: box-shadow 0.6s; }
.scroll-paper h3 { color: var(--cinnabar-deep); font-size: 1.05rem; margin: 20px 0 6px; padding-bottom: 4px; border-bottom: 1px solid var(--line); }
.scroll-paper p { margin: 6px 0; }
.scroll-paper .label { font-size: 0.82rem; color: var(--muted); margin: 0; }
.scroll-paper.golden { box-shadow: 0 0 0 2px var(--cinnabar), 0 8px 26px rgba(168, 53, 42, 0.18); }
.question { font-size: 1.15rem; margin: 2px 0 10px !important; }
.repeat { font-size: 0.85rem; color: var(--cinnabar-deep); background: rgba(168, 53, 42, 0.07); padding: 8px 10px; border-radius: var(--radius); }
.mini-cards { display: flex; flex-wrap: wrap; gap: 6px; }
.mini { font-size: 0.8rem; padding: 2px 10px; border-radius: var(--radius); background: var(--paper-lo); border: 1px solid var(--line); }
.mini.rev { border-style: dashed; }
.card-readings { list-style: none; padding: 0; margin: 0; }
.card-readings li { margin: 10px 0; }
.card-readings p { margin: 2px 0 0; }
.card-readings strong { font-weight: 400; color: var(--cinnabar-deep); }
.card-readings .d-quote { margin: 4px 0 6px; }
.action-card { margin-top: 18px; padding: 4px 16px 14px; border-left: 3px solid var(--cinnabar); background: rgba(168, 53, 42, 0.05); border-radius: 0 var(--radius) var(--radius) 0; }
.action-card h3 { border: 0; }
.action-text { font-size: 1.08rem; }
.ifthen { color: var(--ink-soft); }
.pro { font-size: 0.85rem; color: var(--cinnabar-deep); }
.poem { white-space: pre-line; text-align: center; font-size: 1.2rem; line-height: 2.1; letter-spacing: 0.14em; margin: 10px 0 !important; }
.closing { text-align: right; color: var(--muted); font-size: 0.95rem; }
.source { text-align: right; font-size: 0.72rem; color: var(--muted); margin-top: 14px !important; }
#s-reading .say { margin-top: 6px; }
.offer { margin: 22px 0 6px; padding-top: 16px; border-top: 1px solid var(--line); text-align: center; }
.offer-text { margin: 0 0 10px; color: var(--muted); font-size: 0.92rem; line-height: 1.7; }

/* ---------- 咖啡摊 ---------- */
.tabs { display: flex; justify-content: center; margin: 14px 0 0; }
.tab { border: 1px solid var(--line-strong); background: rgba(251, 248, 241, 0.7); padding: 5px 16px; cursor: pointer; font-size: 0.9rem; margin-left: -1px; }
.tab:first-child { border-radius: var(--radius) 0 0 var(--radius); margin-left: 0; }
.tab:last-child { border-radius: 0 var(--radius) var(--radius) 0; }
.tab[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper-hi); }
.tip-box { display: flex; justify-content: center; margin: 14px 0 6px; }
.tip-qr { width: 230px; max-width: 70vw; background: #fff; padding: 10px; border-radius: var(--radius); border: 1px solid var(--line); }
.tip-qr.placeholder { display: grid; place-items: center; height: 200px; color: var(--muted); background: var(--wash); text-align: center; font-size: 0.9rem; border-style: dashed; }
#tip-intl { display: flex; width: fit-content; margin: 10px auto; }

/* ---------- 慢慢说 ---------- */
.brew { text-align: center; padding: 24px 0 10px; }
.cup { position: relative; width: 72px; height: 90px; margin: 0 auto 12px; }
.cup b { position: absolute; bottom: 0; left: 6px; width: 54px; height: 44px; border: 2px solid var(--ink); border-top: 0; border-radius: 0 0 16px 16px; }
.cup b::after { content: ''; position: absolute; right: -16px; top: 8px; width: 12px; height: 18px; border: 2px solid var(--ink); border-left: 0; border-radius: 0 10px 10px 0; }
.cup i { position: absolute; bottom: 48px; width: 6px; height: 26px; border-radius: 50%; background: rgba(31, 29, 26, 0.18); filter: blur(3px); animation: smoke 2.6s ease-out infinite; opacity: 0; }
.cup i:nth-child(1) { left: 18px; }
.cup i:nth-child(2) { left: 32px; animation-delay: 0.8s; }
.cup i:nth-child(3) { left: 46px; animation-delay: 1.6s; }
#brew-text { min-height: 1.8em; transition: opacity 0.3s; }
.panel { background: var(--paper-hi); border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 16px 16px; margin: 16px 0; box-shadow: var(--shadow); }
.panel h3 { font-size: 1.05rem; color: var(--cinnabar-deep); margin: 14px 0 6px; }
.paths { list-style: none; padding: 0; margin: 4px 0; }
.paths li { padding: 8px 0; border-bottom: 1px dashed var(--line); }
.paths li:last-child { border-bottom: 0; }
.paths strong { font-weight: 400; font-size: 1.05rem; }
.paths p { margin: 4px 0 0; color: var(--ink-soft); font-size: 0.95rem; }
.plan { padding-left: 1.2em; margin: 6px 0; }
.plan li { margin: 4px 0; }
.timer { text-align: center; font-size: 2.6rem; letter-spacing: 0.1em; font-variant-numeric: tabular-nums; margin: 8px 0 0; }
.follow-list .qa { border-bottom: 1px dashed var(--line); padding: 6px 0; }
.qa .q { color: var(--cinnabar-deep); margin: 4px 0; }
.qa .a { margin: 4px 0; }
#btn-follow, #btn-plan, #btn-back-reading { display: flex; margin: 10px auto 0; }
#s-deep > .btn { display: flex; margin: 14px auto; }
#deep-body .panel, #deep-body .contact-slot { transition: opacity 0.6s ease, transform 0.6s ease; }
#deep-body.writing .panel, #deep-body.writing .contact-slot { opacity: 0; transform: translateY(10px); pointer-events: none; }
.contact .contact-form { display: grid; gap: 8px; }
.consent { display: flex; gap: 8px; align-items: flex-start; font-size: 0.85rem; color: var(--muted); }
.consent input { margin-top: 5px; accent-color: var(--ink); }
.contact .btn { justify-self: center; }

/* ---------- 回访 / 危机 / 限流 / 熄灯 ---------- */
.big-q { font-size: 1.3rem; margin-top: 20px; }
#ret-after { text-align: center; }
#ret-after .btn { margin-top: 10px; }
.resources { list-style: none; padding: 0; margin: 18px 0; }
.resources li { background: var(--paper-hi); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; margin: 10px 0; display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; }
.resources .tel { font-size: 1.25rem; text-decoration: none; }
#s-crisis .btn, #s-limited .btn, #s-closed .btn { display: flex; margin: 16px auto; }

/* ---------- 页脚 / 咖啡角 / 浮层 ---------- */
.foot { display: none; position: relative; z-index: 1; max-width: 560px; margin: 10px auto 0; padding: 14px 64px 90px; color: var(--muted); font-size: 0.74rem; text-align: center; line-height: 1.6; }
.foot p { margin: 4px 0; }
body[data-screen="s-gate"] .foot, body[data-screen="s-reading"] .foot { display: block; }
.cafe-corner { display: none; position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 5; width: 40px; height: 40px; place-items: center; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--paper-hi); color: var(--ink-soft); cursor: pointer; opacity: 0.6; transition: opacity 0.2s; }
.cafe-corner:hover { opacity: 1; }
.cafe-corner .steam { animation: steam 3s ease-in-out infinite; }
@keyframes steam { 50% { opacity: 0.3; transform: translateY(-1px); } }
body[data-screen="s-gate"] .cafe-corner, body[data-screen="s-limited"] .cafe-corner, body[data-screen="s-return"] .cafe-corner { display: grid; }
.overlay { position: fixed; inset: 0; z-index: 10; background: rgba(31, 29, 26, 0.72); display: grid; place-items: center; padding: 20px; }
.overlay-box { max-width: 420px; width: 100%; }
.overlay-box img { width: 100%; border-radius: var(--radius); display: block; }
.overlay .muted { color: #d9d3c6; }
.toast { position: fixed; left: 50%; top: 68px; transform: translateX(-50%); z-index: 11; background: var(--ink); color: var(--paper-hi); padding: 9px 18px; border-radius: var(--radius); font-size: 0.9rem; box-shadow: 0 6px 20px rgba(31, 29, 26, 0.25); }

/* ---------- 声音设定 ---------- */
.sound-wrap { position: relative; }
.sound-panel { position: absolute; right: 0; top: 42px; z-index: 20; width: 240px; padding: 12px 14px 6px; border-radius: var(--radius); border: 1px solid var(--line-strong); background: var(--paper-hi); box-shadow: 0 10px 30px rgba(31, 29, 26, 0.15); animation: fadein 0.2s ease; }
.sp-title { margin: 0 0 4px; color: var(--cinnabar-deep); font-size: 0.82rem; letter-spacing: 0.12em; }
.sp-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; font-size: 0.92rem; cursor: pointer; }
.sp-row + .sp-row { border-top: 1px solid var(--line); }
input.switch { appearance: none; -webkit-appearance: none; flex: none; width: 42px; height: 24px; margin: 0; border-radius: 12px; background: #d3ccbe; position: relative; cursor: pointer; transition: background 0.2s; }
input.switch::before { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--paper-hi); box-shadow: 0 1px 2px rgba(31, 29, 26, 0.25); transition: transform 0.2s; }
input.switch:checked { background: var(--ink); }
input.switch:checked::before { transform: translateX(18px); }
input.switch:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

@media (min-width: 640px) {
  .title { font-size: 3rem; }
  .card-face .name { font-size: 1.15rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
