/* 单栏手机页。颜色和展示字体都来自主题配置，由 JS 写入这些变量；这里的值是首屏未加载配置前的兜底。 */
:root {
  --bg: #05070D; --fg: #ECE6D6; --muted: #9A958A; --accent: #D8B56A; --surface: #0D111C; --line: #232837; --on-accent: #05070D;
  --display: "Songti SC", "STSong", "Source Han Serif SC", "Noto Serif CJK SC", "Noto Serif SC", serif;
  --body: "PingFang SC", "HarmonyOS Sans SC", "MiSans", "Source Han Sans SC", "Noto Sans CJK SC", "Microsoft YaHei", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --nav: 58px;
}
* { box-sizing: border-box; }
/* 后台用浅色，表格更清楚 */
body.light { --bg: #FBF6EC; --fg: #3B3530; --muted: #8A7F74; --accent: #35866B; --surface: #FFFFFF; --line: #EADFCB; --on-accent: #FFFFFF; color-scheme: light; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; overflow-x: hidden; overflow-x: clip; }
body { margin: 0; overflow-x: hidden; overflow-x: clip; overscroll-behavior-x: none; background: var(--bg); color: var(--fg); font: 400 15px/1.65 var(--body); }
main {
  max-width: 480px; margin: 0 auto; min-height: 100dvh;
  padding-top: max(16px, env(safe-area-inset-top)); padding-bottom: calc(32px + env(safe-area-inset-bottom));
  padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right));
  display: flex; flex-direction: column; gap: 24px;
}
body.has-tabs main { padding-bottom: calc(var(--nav) + 32px + env(safe-area-inset-bottom)); }
h1, h2, h3, p { margin: 0; }
img { max-width: 100%; }
.boot { margin: auto; color: var(--muted); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 1px solid var(--line); border-radius: 3px; padding: 10px 14px; min-height: 46px; }
button:disabled { opacity: .55; cursor: default; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 700; width: 100%; }
.ghost { width: 100%; }
.link { border: 0; padding: 6px 0; min-height: 44px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
input, select, textarea { width: 100%; background: transparent; border: 1px solid var(--line); border-radius: 3px; padding: 10px; min-height: 48px; font-size: 16px; }
textarea { min-height: 76px; resize: vertical; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.brandline { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.brand { font: 900 25px/1.1 var(--display); color: var(--accent); }
.date { font: 400 13px var(--display); color: var(--muted); }
h2.sec { font: 700 14px/1.3 var(--display); color: var(--accent); display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
h2.sec::before { content: ""; width: 9px; height: 9px; background: var(--accent); flex: none; }

/* 落地页 */
.frame { border: 5px solid var(--accent); outline: 1px solid var(--accent); outline-offset: -11px; padding: 26px 22px; display: flex; flex-direction: column; gap: 14px; }
.frame-k { display: none; }
.hero-day { font: 900 clamp(96px, 34vw, 150px)/.9 var(--display); color: var(--accent); }
.hero-title { font: 900 32px/1.25 var(--display); text-wrap: balance; }
.yiji { display: grid; gap: 8px; }
.yiji div { display: flex; align-items: center; gap: 10px; font: 700 19px var(--display); }
.yiji i { font-style: normal; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); font-weight: 900; flex: none; }
.yiji div:last-child i { background: var(--fg); color: var(--bg); }
.friendnote { background: var(--accent); color: var(--on-accent); padding: 14px; border-radius: 3px; display: grid; gap: 6px; }
.friendnote strong { font: 700 20px/1.4 var(--display); }
.sync { font: 900 44px/1 var(--mono); }

.tease { display: grid; justify-items: center; gap: 2px; text-align: center; margin-top: -8px; }
.tease b { font: 900 22px/1.4 var(--display); color: var(--accent); min-height: 1.4em; }
.tease b.swap { animation: swap .5s both; }
@keyframes swap { from { opacity: 0; transform: translateY(8px); filter: blur(3px); } }
.how { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.how li { background: var(--surface); border-radius: 16px; padding: 10px 6px; display: grid; justify-items: center; gap: 2px; text-align: center; font-weight: 700; font-size: 14px; box-shadow: 0 3px 0 var(--line); }
.how b { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--sakura-l, #F6DDE3); color: #B5485F; font-size: 12px; }
.how small { font-weight: 400; color: var(--muted); font-size: 11px; }
.frame .hero-day { animation: rise .6s both; }
.frame .hero-title { animation: rise .6s .12s both; }

.ftitle { font-size: 24px !important; color: var(--accent); }
.vs { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 8px; align-items: center; text-align: center; }
.vs div { background: var(--surface); border-radius: 16px; padding: 10px 8px; display: grid; gap: 2px; box-shadow: 0 3px 0 var(--line); }
.vs small { color: var(--muted); font-size: 11px; }
.vs b { font: 800 15px/1.35 var(--display); }
.vs i { font-style: normal; font-size: 11px; color: var(--muted); line-height: 1.3; }
.vs em { font: 900 22px var(--mono); color: #B5485F; font-style: normal; }

/* 分步填写 */
.progress { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; }
.progress i { height: 4px; background: var(--line); }
.progress i.on { background: var(--accent); }
.step-title { font: 900 28px/1.3 var(--display); text-wrap: balance; }

.date-pick { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }

/* 出生城市 */
.city-pick { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 8px; }
.city-list { display: flex; flex-wrap: wrap; gap: 6px; max-height: 40dvh; overflow-y: auto; padding: 2px; }
.city-list button { min-height: 40px; padding: 6px 12px; font-size: 14.5px; }
.city-list button small { color: var(--muted); font-size: 11.5px; margin-left: 2px; }
.city-list button[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.city-list button[aria-selected="true"] small { color: inherit; opacity: .8; }

.occ-list { display: flex; flex-wrap: wrap; gap: 8px; }
.occ-list button { min-height: 44px; padding: 8px 14px; }
.occ-list button[aria-checked="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 700; }
/* 视角切换：窄屏也一行放下，按钮等宽 */
.lens-bar { display: flex; align-items: center; gap: 6px; margin-top: -10px; }
.lens-bar span { flex: none; margin-right: 2px; }
.lens-bar button { flex: 1 1 0; min-width: 0; min-height: 40px; padding: 4px 6px; font-size: 14px; }
.lens-bar button.more { flex: 0 0 auto; padding: 4px 12px; color: var(--muted); }
.ask { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: end; }
.ask textarea { min-height: 52px; }
.ask .primary { width: auto; padding: 0 18px; }
.lens-bar button[aria-pressed="true"] { background: var(--fg); border-color: var(--fg); color: var(--bg); font-weight: 700; }

.facts { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; margin: 0 0 4px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }

/* 揭晓 */
.reveal { display: grid; gap: 18px; }
.reveal div { display: grid; gap: 3px; animation: rise .5s both; }
.title-reveal { display: grid; justify-items: center; gap: 6px; text-align: center; background: var(--surface); border-radius: 22px; padding: 22px 16px; box-shadow: 0 4px 0 var(--line); }
.title-reveal small { font-size: 12px; letter-spacing: 4px; color: var(--muted); }
.title-reveal strong { font: 900 clamp(28px, 9vw, 38px)/1.25 var(--display); color: var(--accent); text-wrap: balance; animation: stamp .55s .15s cubic-bezier(.2, 1.6, .4, 1) both; }
.title-reveal + .reveal div:nth-child(1) { animation-delay: .7s; }
.title-reveal + .reveal div:nth-child(2) { animation-delay: 1.05s; }
.title-reveal + .reveal div:nth-child(3) { animation-delay: 1.4s; }
.reveal div:nth-child(2) { animation-delay: .35s; }
.reveal div:nth-child(3) { animation-delay: .7s; }
.me-title { color: var(--accent); }
.reveal small, .portrait small { color: var(--accent); font-size: 13px; font-weight: 700; }
.reveal b { font: 900 23px/1.4 var(--display); text-wrap: balance; }
.portrait { display: grid; gap: 12px; }
.portrait div { display: grid; gap: 1px; }
.portrait b { font: 700 17px/1.5 var(--display); }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) { .reveal div, .title-reveal strong { animation: none; } }

/* 卡片 */
.card { display: block; width: 100%; height: auto; aspect-ratio: 3 / 4; background: var(--surface); box-shadow: 0 10px 28px rgba(40, 25, 5, .22); -webkit-touch-callout: default; }
.hint { text-align: center; color: var(--muted); font-size: 12.5px; margin-top: 8px; }
.feedback button[aria-pressed="true"] { background: var(--fg); border-color: var(--fg); color: var(--bg); }
.lead { font: 700 19px/1.5 var(--display); margin-bottom: 6px; text-wrap: balance; }
.meters { display: grid; gap: 7px; margin-top: 14px; }
.meter { display: grid; grid-template-columns: 2.6em minmax(0, 1fr) 2.2em; gap: 8px; align-items: center; font-size: 13px; }
.meter b { font: 700 13px var(--mono); text-align: right; font-variant-numeric: tabular-nums; }
.bar { height: 8px; background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent); }
.why { list-style: none; margin: 0; padding: 0; }
.why li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; padding-block: 10px; border-top: 1px solid var(--line); }
.why li:first-child { border-top: 0; }
.why small { grid-column: 1 / -1; color: var(--muted); font-size: 12.5px; }
.why small .tech { display: block; margin-top: 2px; font-size: 11px; opacity: .75; }
.why time { font: 400 12px var(--mono); color: var(--muted); white-space: nowrap; }
.tag { font-size: 11px; color: var(--accent); border: 1px solid var(--accent); padding: 0 4px; margin-left: 5px; white-space: nowrap; }
.result { background: var(--surface); padding: 14px; border-radius: 3px; display: grid; gap: 8px; min-width: 0; }
.result strong { font: 700 17px/1.5 var(--display); }
.locked { color: var(--muted); letter-spacing: .03em; }
.events { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-bottom: 12px; }
.events button { padding: 7px 3px; font-size: 13.5px; }
.events button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 700; }
.answer { white-space: pre-wrap; }

/* 问答卡和问答记录 */
.thread { background: var(--surface); border-radius: 18px; padding: 14px; display: grid; gap: 10px; box-shadow: 0 3px 0 var(--line); }
.t-q { display: grid; gap: 2px; }
.t-q small { color: var(--muted); font-size: 11.5px; }
.t-q strong { font: 700 16px/1.45 var(--display); }
.follow-q { border-top: 1px dashed var(--line); padding-top: 10px; }
.thread .answer { line-height: 1.8; }
.t-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; border-top: 1px dashed var(--line); padding-top: 10px; }
.rate { display: flex; gap: 6px; }
.rate button { min-height: 36px; padding: 4px 14px; font-size: 13.5px; }
.rate button[aria-pressed="true"] { background: var(--accent-l, #E6F2EC); border-color: var(--accent); color: var(--accent); }
.hist-g { display: grid; gap: 8px; }
.hist { text-align: left; display: grid; gap: 4px; border-radius: 16px !important; padding: 12px 14px; min-height: 0; width: 100%; }
.hist strong { font: 700 15px/1.4 var(--display); display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.hist-a { color: var(--muted); font-size: 13px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hist-m { font-size: 11.5px; color: var(--muted); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.badge { font-style: normal; background: #F3ECDF; border-radius: 99px; padding: 0 7px; }
.badge.good { background: var(--accent-l, #E6F2EC); color: var(--accent); }
.danger { color: #B5485F; }

/* 帮助、协议 */
.center { text-align: center; }
.link.inline { min-height: 0; padding: 0; vertical-align: baseline; font-size: inherit; }
.back { min-height: 40px; padding: 4px 0; text-decoration: none; color: var(--accent); font-weight: 600; }
.faq { display: grid; gap: 8px; }
.faq details { background: var(--surface); border-radius: 14px; padding: 12px 14px; }
.faq summary { font-weight: 600; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 8px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--muted); }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin-top: 8px; color: var(--muted); font-size: 14px; }
.legal { display: grid; gap: 8px; }
.legal h4 { margin: 10px 0 0; font-size: 15px; }
.legal p { font-size: 14px; color: var(--fg); }

.code-box { gap: 4px; }
a.btn { display: grid; place-items: center; min-height: 50px; border-radius: 999px; text-decoration: none; }
.steps { margin: 0; padding-left: 1.3em; display: grid; gap: 6px; }
.code { font: 700 22px/1.3 var(--mono); letter-spacing: 1px; user-select: all; -webkit-user-select: all; }
.agree { display: flex; gap: 8px; align-items: flex-start; color: var(--muted); }
.agree input { width: 20px; height: 20px; min-height: 0; margin: 1px 0 0; flex: none; accent-color: var(--accent); }
.shake { animation: shake .4s; }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.paid { text-align: center; justify-items: center; }
.stamp-big { font: 900 26px var(--display); color: #C4455E; border: 3px solid #C4455E; border-radius: 12px; padding: 4px 16px; transform: rotate(-8deg); animation: stamp .45s cubic-bezier(.2, 1.6, .4, 1) both; }
@keyframes stamp { from { opacity: 0; transform: rotate(-8deg) scale(2.4); } }

/* 开签：封着的签 → 翻开 → 盖章 */
.stack-lg { display: flex; flex-direction: column; gap: 24px; }
.draw { display: grid; gap: 4px; }
.seal {
  position: relative; width: 100%; aspect-ratio: 3 / 4; border: 0; border-radius: 22px; padding: 28px 20px;
  display: grid; grid-template-rows: auto 1fr auto auto; justify-items: center; align-items: center; gap: 8px;
  background: linear-gradient(160deg, #3F8F75, #2C6E59); color: #FBF6EC; box-shadow: 0 12px 28px rgba(40, 70, 55, .3), inset 0 0 0 6px rgba(251, 246, 236, .14), inset 0 0 0 7px rgba(251, 246, 236, .35);
  animation: breathe 2.6s ease-in-out infinite; transform-origin: 50% 60%;
}
.seal.gold { background: linear-gradient(160deg, #C9A45C, #A9823B); }
[data-layout="shouzhang"] .seal { border-radius: 22px; background: linear-gradient(160deg, #3F8F75, #2C6E59); }
[data-layout="shouzhang"] .seal.gold { background: linear-gradient(160deg, #C9A45C, #A9823B); }
[data-layout="shouzhang"] .cal-d { border-radius: 50%; background: none; }
[data-layout="shouzhang"] .cal-d.pos { background: #6DB89D; } [data-layout="shouzhang"] .cal-d.neg { background: #DC8EA0; }
.seal::before { content: ""; position: absolute; top: -10px; left: 50%; width: 96px; height: 22px; margin-left: -48px; background: rgba(229, 139, 160, .6); transform: rotate(-4deg); }
.seal-k { font-size: 12px; letter-spacing: 6px; opacity: .85; }
.seal-c { font: 900 clamp(110px, 38vw, 150px)/1 var(--display); width: 1.25em; height: 1.25em; display: grid; place-items: center; border: 3px solid rgba(251, 246, 236, .7); border-radius: 50%; }
.seal-d { font: 700 17px var(--display); }
.seal-h { font-size: 13px; background: rgba(251, 246, 236, .18); border-radius: 99px; padding: 4px 14px; }
.seal.opening { animation: open .52s cubic-bezier(.5, 0, .7, .4) forwards; }
@keyframes breathe { 50% { transform: translateY(-4px) rotate(-.6deg); } }
@keyframes open { 40% { transform: scale(1.02); } 100% { transform: scale(.96); opacity: 0; } }
.card-wrap { position: relative; }
.stamp {
  position: absolute; right: -6px; top: -16px; width: 68px; height: 68px; border-radius: 50%; display: grid; place-items: center; text-align: center;
  font: 800 12px/1.2 var(--display); color: #C4455E; border: 2.5px solid #C4455E; background: rgba(255, 255, 255, .55); transform: rotate(-12deg); opacity: 0;
}
.opened .stamp { opacity: .9; }
.reveal-card .card { animation: unflip .55s cubic-bezier(.2, .8, .3, 1) both; }
.reveal-card .stamp { animation: stamp .45s .55s cubic-bezier(.2, 1.6, .4, 1) both; opacity: .9; }
@keyframes unflip { from { transform: scale(.96); opacity: 0; } }
.fade-in > * { animation: rise .5s both; }
.fade-in > *:nth-child(2) { animation-delay: .08s; } .fade-in > *:nth-child(3) { animation-delay: .16s; } .fade-in > *:nth-child(n+4) { animation-delay: .24s; }
.bar i { width: 0; transition: width .9s cubic-bezier(.2, .8, .3, 1); }
.tomorrow { display: grid; gap: 8px; }

/* 手账 */
.book { background: var(--surface); border-radius: 22px; padding: 16px 12px; box-shadow: 0 4px 0 var(--line); display: grid; gap: 10px; }
.book-head { display: flex; justify-content: space-between; align-items: center; }
.book-head .link { text-decoration: none; font-size: 22px; padding: 0 12px; min-width: 44px; }
.cal-w, .cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; text-align: center; }
.cal-w span { font-size: 11px; color: var(--muted); }
.cal-d { aspect-ratio: 1; min-height: 0; padding: 0; border-radius: 50%; display: grid; place-items: center; align-content: center; font-size: 11px; color: var(--muted); border: 1px dashed var(--line); background: none; }
.cal-d small { font-size: 10px; line-height: 1; }
.cal-d.future { border-color: transparent; opacity: .5; }
.cal-d.today { border: 1.5px solid var(--fg); }
.cal-d.on { border: 0; color: #fff; transform: rotate(-8deg); }
.cal-d.on b { font: 800 12px/1.1 var(--display); }
.cal-d.on small { opacity: .85; }
.cal-d.pos { background: #6DB89D; }
.cal-d.neg { background: #DC8EA0; }
.cal-d.gold { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--gold); }
.dex { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.dex-i { border: 1px dashed var(--line); border-radius: 14px; padding: 8px 10px; display: grid; gap: 2px; color: var(--muted); }
.dex-i b { font: 700 14px var(--display); }
.dex-i small { font-size: 11px; }
.dex-i.on { border-style: solid; background: var(--surface); color: var(--fg); }
.dex-i.on.pos b { color: #2F7A62; } .dex-i.on.neg b { color: #B5485F; }
@media (prefers-reduced-motion: reduce) {
  .seal, .seal.opening, .reveal-card .card, .reveal-card .stamp, .fade-in > *, .stamp-big { animation: none !important; }
  .bar i { transition: none; }
}

/* 细节动效：换页淡入、弹层上滑、提示浮现、按下回弹。全部尊重“减少动态效果” */
main > * { animation: fadein .25s ease-out both; }
@keyframes fadein { from { opacity: 0; } }
button:active:not(:disabled) { transform: scale(.98); }
.sheet:not([hidden]) { animation: up .3s cubic-bezier(.2, .8, .3, 1) both; }
@keyframes up { from { transform: translateY(100%); } }
body:has(.sheet:not([hidden]))::before { content: ""; position: fixed; inset: 0; z-index: 25; background: rgba(40, 30, 20, .32); animation: fadein .2s both; }
.toast:not([hidden]) { animation: toastin .25s ease-out both; }
@keyframes toastin { from { opacity: 0; transform: translate(-50%, 8px); } }
.skeleton { display: grid; gap: 10px; }
.skeleton i { display: block; height: 14px; border-radius: 99px; background: linear-gradient(90deg, var(--line) 25%, #F6EFE2 50%, var(--line) 75%); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
.skeleton i:nth-child(1) { width: 60%; height: 20px; } .skeleton i:nth-child(3) { width: 80%; }
@keyframes shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) {
  main > *, .sheet:not([hidden]), .toast:not([hidden]), body::before, .skeleton i, .tease b.swap, .frame .hero-day, .frame .hero-title { animation: none !important; }
  button:active:not(:disabled) { transform: none; }
}

/* 底部导航 */
.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; background: var(--bg); border-top: 1px solid var(--line);
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr);
  padding-bottom: env(safe-area-inset-bottom); padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right);
}
.tabs button { border: 0; border-radius: 0; height: var(--nav); font: 700 15px var(--display); color: var(--muted); }
.tabs button[aria-current="page"] { color: var(--accent); box-shadow: inset 0 3px 0 var(--accent); }

.side[hidden] { display: none; }
.tabs .tab-qr { display: none; }
.deskshare img { width: 100%; max-height: 52vh; object-fit: contain; border-radius: 8px; }
.deskshare canvas { width: 220px; height: 220px; justify-self: center; border-radius: 8px; }

/* 付费墙 */
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--bg); border-top: 4px solid var(--accent); box-shadow: 0 -14px 44px rgba(40, 20, 0, .35);
  padding-top: 18px; padding-bottom: calc(18px + env(safe-area-inset-bottom));
  padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right));
  max-height: 92dvh; overflow-y: auto;
}
.sheet > div { max-width: 448px; margin: 0 auto; display: grid; gap: 12px; }
.sheet h3 { font: 900 22px/1.3 var(--display); }
.sheet ul { margin: 0; padding-left: 1.2em; }
.price { text-align: left; display: grid; gap: 1px; }
.price b { font: 700 21px var(--mono); }
.price.main { border: 2px solid var(--accent); }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--nav) + 14px + env(safe-area-inset-bottom)); z-index: 40; max-width: calc(100vw - 32px); width: max-content; background: var(--fg); color: var(--bg); padding: 8px 14px; border-radius: 3px; font-size: 14px; }
footer.note { font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 12px; }

/* ---------- 手账版式：圆角白纸、和纸胶带、薄荷绿 / 樱粉印章 ---------- */
[data-layout="shouzhang"] body { background-color: var(--bg); background-image: radial-gradient(var(--dot) 1px, transparent 1px); background-size: 14px 14px; }
[data-layout="shouzhang"] button { border-radius: 999px; border-color: var(--line); background: var(--surface); }
[data-layout="shouzhang"] .primary { background: var(--accent); border-color: var(--accent); box-shadow: 0 4px 0 #276650; min-height: 50px; font-size: 16px; }
[data-layout="shouzhang"] .primary:active { transform: translateY(2px); box-shadow: 0 2px 0 #276650; }
[data-layout="shouzhang"] .link { background: none; }
[data-layout="shouzhang"] input, [data-layout="shouzhang"] select, [data-layout="shouzhang"] textarea { background: var(--surface); border-radius: 14px; }
[data-layout="shouzhang"] .brand { color: var(--fg); font-size: 22px; letter-spacing: 2px; }
[data-layout="shouzhang"] h2.sec { color: var(--fg); font-size: 15px; }
[data-layout="shouzhang"] h2.sec::before { border-radius: 50%; background: var(--sakura); }
/* 白纸卡片 + 胶带 */
[data-layout="shouzhang"] .frame, [data-layout="shouzhang"] .result, [data-layout="shouzhang"] .kpi {
  background: var(--surface); border: 0; outline: 0; border-radius: 22px; box-shadow: 0 4px 0 var(--line); }
[data-layout="shouzhang"] .frame { position: relative; margin-top: 14px; padding: 30px 22px 26px; text-align: center; align-items: center; }
[data-layout="shouzhang"] .frame::before, [data-layout="shouzhang"] .frame::after {
  content: ""; position: absolute; top: -10px; width: 88px; height: 22px; background: rgba(229, 139, 160, .5); transform: rotate(-6deg); left: 22px; }
[data-layout="shouzhang"] .frame::after { left: auto; right: 22px; background: rgba(124, 196, 172, .55); transform: rotate(5deg); }
[data-layout="shouzhang"] .frame-k { display: block; font-size: 12px; letter-spacing: 4px; color: var(--muted); }
[data-layout="shouzhang"] .hero-day { color: var(--fg); font-size: clamp(88px, 28vw, 120px); line-height: 1; }
[data-layout="shouzhang"] .hero-title { font-size: 24px; }
[data-layout="shouzhang"] .frame p { color: var(--muted); font-size: 13.5px; }
[data-layout="shouzhang"] .frame + .stack .muted { text-align: center; }
[data-layout="shouzhang"] .yiji { display: flex; justify-content: center; gap: 22px; margin-top: 6px; }
[data-layout="shouzhang"] .yiji i { width: 44px; height: 44px; background: #7CC4AC; color: #fff; }
[data-layout="shouzhang"] .yiji div:last-child i { background: var(--sakura); color: #fff; }
[data-layout="shouzhang"] .friendnote { background: var(--sakura-l); color: var(--fg); border-radius: 18px; }
[data-layout="shouzhang"] .progress i { border-radius: 99px; height: 6px; }
[data-layout="shouzhang"] .reveal small, [data-layout="shouzhang"] .portrait small { color: var(--sakura); }
/* 今日 */
[data-layout="shouzhang"] .card { border-radius: 22px; background: var(--bg); box-shadow: 0 10px 26px rgba(90, 70, 40, .16); }
[data-layout="shouzhang"] .feedback button[aria-pressed="true"] { background: var(--accent-l); border-color: var(--accent); color: var(--accent); }
[data-layout="shouzhang"] .bar { height: 10px; border: 0; border-radius: 99px; background: #F1EADC; }
[data-layout="shouzhang"] .bar i { border-radius: 99px; background: linear-gradient(90deg, #7CC4AC, var(--gold)); }
[data-layout="shouzhang"] .why li { border-top: 1px dashed var(--line); }
[data-layout="shouzhang"] .tag { border-radius: 99px; border: 0; background: var(--accent-l); padding: 0 8px; }
/* 择日 */
[data-layout="shouzhang"] .events button { border-radius: 999px; background: var(--accent-l); border-color: transparent; color: #2F7A62; }
[data-layout="shouzhang"] .events button[aria-pressed="true"] { background: var(--fg); border-color: var(--fg); color: var(--bg); }
[data-layout="shouzhang"] .locked { display: inline-block; background: var(--accent-l); border-radius: 10px; padding: 0 8px; filter: blur(1.5px); }
/* 导航、付费墙、提示 */
[data-layout="shouzhang"] .tabs { background: var(--bg); }
[data-layout="shouzhang"] .tabs button { background: none; border-radius: 0; font-family: var(--body); font-weight: 600; }
[data-layout="shouzhang"] .tabs button[aria-current="page"] { box-shadow: none; position: relative; }
[data-layout="shouzhang"] .tabs button[aria-current="page"]::after { content: ""; position: absolute; left: 50%; bottom: 9px; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; background: var(--sakura); }
[data-layout="shouzhang"] .sheet { border-top: 0; border-radius: 24px 24px 0 0; box-shadow: 0 -10px 40px rgba(60, 40, 10, .22); }
[data-layout="shouzhang"] .price { border-radius: 18px; padding: 14px 16px; }
[data-layout="shouzhang"] .price b { font: 800 22px var(--body); }
[data-layout="shouzhang"] .price.main { border: 2px solid #7CC4AC; background: var(--accent-l); }
[data-layout="shouzhang"] .toast { border-radius: 999px; }

/* 看板 */
.admin { max-width: 720px; }
.admin table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.admin th, .admin td { text-align: left; padding: 7px 6px; border-bottom: 1px solid var(--line); }
.admin td.n { text-align: right; font-family: var(--mono); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.kpi { background: var(--surface); padding: 12px; display: grid; gap: 2px; min-width: 0; }
.kpi b { font: 700 26px var(--mono); }
.admin h2.gap { margin-top: 22px; }
.admin { max-width: 960px; }
.admin table { display: block; overflow-x: auto; }
.admin tr.muted td { color: var(--muted); }
.admin textarea { min-height: 200px; font-family: var(--mono); }

/* 送签 */
.gift-card { gap: 12px; }
.gift-card .hero-title { font-size: clamp(24px, 7vw, 30px); }
.gift-title { display: grid; gap: 2px; }
.gift-title small { font-size: 12px; letter-spacing: 4px; color: var(--muted); }
.gift-title strong { font: 900 22px/1.3 var(--display); color: var(--accent); }
.gift-card .yiji div { font-size: 16px; }
div.hist { cursor: default; background: var(--surface); }

/* 今日页一屏三行 */
section.today { position: relative; background: var(--surface); border-radius: 22px; padding: 18px 18px 16px; box-shadow: 0 4px 0 var(--line); overflow: hidden; min-height: 196px; }
section.today.gold { box-shadow: 0 4px 0 #C9A45C; }
.today-in { display: grid; gap: 6px; }
.today-k { font-size: 12.5px; color: var(--muted); letter-spacing: 1px; }
.today-k b { color: var(--accent); font: 700 15px var(--mono); }
.today-h { font: 900 clamp(26px, 8vw, 34px)/1.25 var(--display); margin: 2px 0 6px; text-wrap: balance; }
.today-yj { margin: 0; display: flex; align-items: center; gap: 8px; font: 700 16px/1.4 var(--display); }
.today-yj i, .yiji-full i { font-style: normal; flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); font-size: 13px; }
.today-yj.ji i, .yiji-full p:last-child i { background: var(--fg); color: var(--bg); }
section.today.sealed .today-in { filter: blur(9px); opacity: .5; user-select: none; }
.cover { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 6px; border: 0; border-radius: 0; background: color-mix(in srgb, var(--accent) 88%, transparent); color: var(--on-accent); font: 700 17px var(--display); min-height: 0; width: 100%; }
section.today.gold .cover { background: linear-gradient(160deg, #C9A45CEE, #A9823BEE); }
.cover-c { font: 900 56px/1 var(--display); width: 1.4em; height: 1.4em; display: grid; place-items: center; border: 2px solid currentColor; border-radius: 50%; opacity: .9; }
.cover small { font-size: 12px; opacity: .85; font-weight: 400; }
.cover-t { font-size: 13px; font-weight: 400; opacity: .9; letter-spacing: .04em; }
.idcard .feedback { margin-top: 10px; }
section.today.opening .cover { animation: open .42s cubic-bezier(.5, 0, .7, .4) forwards; }
section.today .stamp { right: 12px; top: auto; bottom: 10px; zoom: .72; opacity: .85; }
.row { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 10px; align-items: start; background: var(--surface); border-radius: 16px; padding: 12px 14px; text-align: left; width: 100%; border: 0; min-height: 0; box-shadow: 0 3px 0 var(--line); }
details.row { display: block; }
details.row summary { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 10px; align-items: start; list-style: none; cursor: pointer; }
details.row summary::-webkit-details-marker { display: none; }
details.row p { margin: 8px 0 0; color: var(--muted); }
.row-k { font-size: 12.5px; color: var(--muted); padding-top: 2px; }
.row-v { display: grid; gap: 4px; min-width: 0; }
.row-v b { font: 700 15.5px/1.4 var(--display); }
.row-v small { font-size: 12px; color: var(--muted); }
.pbar { height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; }
.pbar i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--accent); transition: width .8s ease; }
.pbar.neg i { background: #C4455E; }
.quick { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.2fr); gap: 8px; }
.quick button { min-height: 44px; }
.quick button[aria-pressed="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.scroll-hint { text-align: center; font-size: 12px; color: var(--muted); margin: 2px 0 0; }
.yiji-full p { display: flex; gap: 8px; align-items: center; margin: 6px 0; }
[data-layout="shouzhang"] .cover { border-radius: 22px; background: linear-gradient(160deg, #3F8F75EE, #2C6E59EE); border: 0; }
[data-layout="shouzhang"] section.today.gold .cover { background: linear-gradient(160deg, #C9A45CEE, #A9823BEE); }
[data-layout="shouzhang"] .row { border-radius: 18px; border: 0; background: var(--surface); }
[data-layout="shouzhang"] .today-yj i, [data-layout="shouzhang"] .yiji-full i { background: #7CC4AC; color: #fff; }
[data-layout="shouzhang"] .today-yj.ji i, [data-layout="shouzhang"] .yiji-full p:last-child i { background: var(--sakura); color: #fff; }
[data-layout="shouzhang"] .pbar.neg i { background: var(--sakura); }
[data-layout="shouzhang"] .quick button[aria-pressed="true"] { background: var(--accent-l); border-color: var(--accent); color: var(--accent); }
/* 日历：预报格子（小圆点）、事件好日子（宜）、选中 */
.cal-d { position: relative; }
.cal-d.fc, [data-layout] .cal-d.fc { background: none; border: 1px solid transparent; color: var(--fg); gap: 3px; transform: none; }
.cal-d.fc i { display: block; width: 8px; height: 8px; border-radius: 50%; }
.cal-d.fc.pos i { background: #6DB89D; } .cal-d.fc.neg i { background: #DC8EA0; }
.cal-d.fc.gold i { box-shadow: 0 0 0 2px var(--bg), 0 0 0 3.5px var(--gold); }
.cal-d.fc.gold { box-shadow: none; }
.cal-d.good, [data-layout] .cal-d.good { border: 1.5px solid var(--accent); background: var(--accent-l, #E6F2EC); }
.cal-d.sel { outline: 2px solid var(--fg); outline-offset: 1px; }
.cal-mark { position: absolute; top: -4px; right: -3px; font: 700 9.5px/1 var(--display); font-style: normal; padding: 2px 3px; border-radius: 6px; background: var(--accent); color: #fff; }
.cal-mark.avoid { background: #B9AFA3; }
.cal-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 0; }
.cal-legend span { display: inline-flex; align-items: center; gap: 4px; }
.lg { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.lg.pos { background: #6DB89D; } .lg.neg { background: #DC8EA0; } .lg.gold { box-shadow: 0 0 0 2px var(--gold); }
.cal-pick { display: grid; gap: 4px; background: var(--bg); border-radius: 14px; padding: 10px 12px; }
.cal-pick b { font: 700 15px var(--display); }
.cal-pick span { font-size: 13.5px; }
.cal-pick .good-t { color: var(--accent); font-weight: 700; }
.cal-pick button { margin-top: 4px; }

/* 月度一页、人生节点、合盘 */
.month, .pair { text-align: left; align-items: stretch; }
[data-layout="shouzhang"] .month, [data-layout="shouzhang"] .pair { text-align: left; align-items: stretch; }
.month-t { font: 700 17px/1.6 var(--display); color: var(--fg) !important; }
.mbar { height: 10px; border-radius: 99px; background: #DC8EA0; overflow: hidden; }
.mbar i { display: block; height: 100%; width: 0; background: #6DB89D; transition: width .8s ease; }
.keys { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.keys li { display: grid; gap: 2px; padding: 8px 12px; border-radius: 12px; background: var(--bg); border-left: 4px solid #6DB89D; }
.keys li.slow { border-left-color: #DC8EA0; }
.keys li.moon { border-left-color: var(--gold, #C9A45C); }
.keys b { font: 700 14.5px var(--display); }
.keys span { font-size: 13px; color: var(--muted); }
.nodes { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 2px solid var(--line); display: grid; gap: 14px; }
.nodes li { position: relative; display: grid; gap: 4px; }
.nodes li::before { content: ""; position: absolute; left: -21px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.nodes li.now::before { background: var(--accent); box-shadow: 0 0 0 4px var(--accent-l, #E6F2EC); }
.nodes li.soon::before { background: var(--gold, #C9A45C); }
.nodes li.past { opacity: .6; }
.nodes li > div { display: flex; gap: 8px; align-items: center; }
.nodes b { font: 700 16px var(--display); }
.nodes p { margin: 0; }
.pair-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.pair-two div { background: var(--bg); border-radius: 12px; padding: 8px 10px; display: grid; gap: 2px; }
.pair-two small { font-size: 12px; color: var(--muted); }
.pair-two b.pos { color: #2F7A62; } .pair-two b.neg { color: #B5485F; }

/* ===== 2026-11-21 改版：每页一个主角，按轻重排（docs/design/redesign-2026-11-21.md） ===== */
.tiny { font: 400 12px/1.4 var(--display); letter-spacing: 2px; color: var(--muted); margin: 0 0 8px; }
.flow { display: grid; gap: 22px; }
.block { display: grid; gap: 8px; }
.fold { border-top: 1px solid var(--line); padding-top: 12px; }
.fold > summary { cursor: pointer; font: 700 15px var(--display); list-style: none; display: flex; justify-content: space-between; }
.fold > summary::after { content: "＋"; color: var(--muted); font-weight: 400; }
.fold[open] > summary::after { content: "－"; }
.fold > summary::-webkit-details-marker, .more > summary::-webkit-details-marker { display: none; }
.fold[open] > summary { margin-bottom: 10px; }
.more > summary { cursor: pointer; font-size: 13px; color: var(--accent); list-style: none; }
.more p { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.link.strong { font-weight: 700; color: var(--accent); }
.link.danger, .ghost.danger { color: #B5485F; }

/* 今日 */
.hero { position: relative; border-radius: 22px; overflow: hidden; box-shadow: 0 10px 26px rgba(90, 70, 40, .16); }
.hero .card, [data-layout] .hero .card { border-radius: 0; box-shadow: none; }
.hero.sealed img { filter: blur(16px) saturate(.6); transform: scale(1.08); }
.hero .cover { border-radius: 0; }
.hero.opening .cover { animation: open .42s cubic-bezier(.5, 0, .7, .4) forwards; }
.hero.gold { box-shadow: 0 0 0 3px var(--gold, #C9A45C), 0 10px 26px rgba(90, 70, 40, .16); }
.icons { display: flex; justify-content: center; gap: 6px; margin-top: -4px; }
.icons button, [data-layout] .icons button { border: 0; background: none; min-height: 44px; padding: 6px 12px; font-size: 13.5px; color: var(--muted); display: inline-flex; align-items: center; gap: 5px; }
.icons button i { font-style: normal; font-size: 15px; }
.icons button[aria-pressed="true"] { color: var(--accent); font-weight: 700; }
.icons button:first-child { color: var(--fg); font-weight: 700; }
.story { font: 400 18px/1.75 var(--display); margin: 0; text-wrap: pretty; }
.story b { font-weight: 900; color: var(--accent); font-size: 22px; }
.node-link { font-size: 13px; text-align: left; padding: 0; }
.week, [data-layout] .week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; border: 0; background: none; padding: 0; width: 100%; min-height: 0; border-radius: 0; }
.wd { display: grid; justify-items: center; gap: 4px; padding: 8px 0; border-radius: 12px; background: var(--surface); }
.wd small { font-size: 11px; color: var(--muted); }
.wd i { width: 10px; height: 10px; border-radius: 50%; background: #6DB89D; }
.wd.neg i { background: #DC8EA0; }
.wd.gold i { box-shadow: 0 0 0 2px var(--surface), 0 0 0 3.5px var(--gold, #C9A45C); }
.wd em { font-style: normal; font-size: 11px; color: var(--fg); }
.skeleton-line { height: 64px; border-radius: 12px; background: var(--line); opacity: .4; }
.askbar { display: flex; gap: 6px; background: var(--surface); border-radius: 999px; padding: 4px 4px 4px 14px; border: 1px solid var(--line); }
.askbar input, [data-layout] .askbar input { flex: 1; border: 0; background: none; min-width: 0; font-size: 16px; padding: 0; border-radius: 0; }
.askbar button, [data-layout] .askbar button { min-height: 38px; width: 46px; padding: 0; border-radius: 999px; background: var(--accent); color: var(--on-accent); border: 0; font-weight: 700; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags button, [data-layout] .tags button { min-height: 32px; padding: 4px 12px; font-size: 13px; border-radius: 999px; background: none; border: 1px dashed var(--line); color: var(--fg); }
.person-line, [data-layout] .person-line { display: flex; gap: 10px; align-items: center; text-align: left; border: 0; background: none; padding: 4px 0; min-height: 0; border-radius: 0; width: 100%; }
.person-line span:last-child { display: grid; font-size: 13.5px; color: var(--muted); }
.person-line b { color: var(--fg); font: 700 14px var(--display); }
.tomorrow-line { font: 400 14px var(--display); color: var(--muted); text-align: center; margin: 0; }

/* 头像 */
.ava { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--line); color: var(--fg); font: 700 17px var(--display); flex: none; }
.ava.pos { background: #DDF0E7; color: #2F7A62; } .ava.neg { background: #F7DDE4; color: #B5485F; } .ava.mid { background: #F5ECD8; color: #8A6A2F; }
.ava.kid { background: #E8E4F6; color: #5B4FA0; }

/* 日历 */
.mhead { display: grid; gap: 6px; }
.mnav { display: flex; align-items: center; gap: 4px; }
.mnav h1 { font: 900 40px/1 var(--display); margin: 0; flex: 1; text-align: center; }
.mnav .link { font-size: 24px; text-decoration: none; min-width: 44px; }
.mtheme { font: 400 16px/1.6 var(--display); margin: 0; text-align: center; text-wrap: balance; }
.mhead .small { text-align: center; margin: 0; }
.hscroll { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px 2px; }
.hscroll::-webkit-scrollbar { display: none; }
.events2 button, [data-layout] .events2 button { flex: none; min-height: 36px; padding: 4px 14px; font-size: 14px; border-radius: 999px; }
.events2 button[aria-pressed="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); font-weight: 700; }
.zline { margin: 0; font-size: 14px; }
.life, [data-layout] .life { position: relative; display: block; width: 100%; height: 58px; border: 0; background: none; padding: 0; border-radius: 0; min-height: 0; }
.life-line { position: absolute; left: 0; right: 0; top: 20px; height: 2px; background: var(--line); }
.ln { position: absolute; top: 15px; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: var(--surface); border: 2px solid var(--line); }
.ln.past { background: var(--line); }
.ln.now { background: var(--accent); border-color: var(--accent); width: 16px; height: 16px; top: 13px; margin-left: -8px; }
.ln.soon { border-color: var(--gold, #C9A45C); }
.you { position: absolute; top: 0; height: 42px; border-left: 2px solid var(--fg); }
.you em { position: absolute; top: 30px; left: -2px; transform: translateX(-50%); white-space: nowrap; font: 700 12px var(--display); font-style: normal; color: var(--fg); background: var(--bg); padding: 0 4px; }
.life small { position: absolute; top: 28px; font-size: 10.5px; color: var(--muted); }
.life .l0 { left: 0; } .life .l60 { right: 0; }

/* 我的 */
.idcard { display: grid; gap: 6px; padding: 22px 18px; border-radius: 22px; background: var(--surface); box-shadow: 0 4px 0 var(--line); margin-top: 8px; }
.idcard h1 { font: 900 clamp(30px, 10vw, 40px)/1.2 var(--display); color: var(--accent); margin: 0; text-wrap: balance; }
.idcard .portrait { margin-top: 8px; }
.people { display: flex; gap: 14px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.person, [data-layout] .person { flex: none; display: grid; justify-items: center; gap: 3px; border: 0; background: none; padding: 0; min-height: 0; border-radius: 0; width: 58px; }
.person small { font-size: 12px; max-width: 58px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person em { font-style: normal; font-size: 11px; color: var(--muted); }
.person.add .ava { background: none; border: 1.5px dashed var(--muted); color: var(--muted); font-weight: 400; }
.addmenu { display: grid; gap: 8px; }
.addmenu button, [data-layout] .addmenu button { display: grid; gap: 2px; text-align: left; padding: 12px 14px; border-radius: 16px; background: var(--surface); min-height: 0; }
.addmenu b { font: 700 15px var(--display); }
.addmenu small { font-size: 12.5px; color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.stats button, [data-layout] .stats button { display: grid; gap: 2px; padding: 12px 6px; border-radius: 16px; background: var(--surface); border: 0; min-height: 0; }
.stats b { font: 900 26px/1 var(--display); color: var(--fg); }
.stats small { font-size: 12px; color: var(--muted); }
.ticket, [data-layout] .ticket { display: flex; align-items: center; gap: 12px; text-align: left; padding: 14px 16px; border-radius: 16px; border: 1.5px dashed var(--line); background: none; min-height: 0; width: 100%; }
.ticket span { flex: 1; display: grid; gap: 2px; }
.ticket b { font: 700 15px var(--display); }
.ticket small { font-size: 12.5px; color: var(--muted); }
.ticket em { font-style: normal; font-size: 13px; color: var(--accent); font-weight: 700; }
.ticket.on { border-color: var(--accent); }
.list { display: grid; border-top: 1px solid var(--line); }
.list button, [data-layout] .list button { display: flex; justify-content: space-between; align-items: center; gap: 10px; text-align: left; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: none; padding: 14px 2px; min-height: 0; font-size: 15px; }
.list button small { color: var(--muted); font-size: 12.5px; }
.list button::after { content: "›"; color: var(--muted); font-size: 18px; margin-left: 4px; }
.list button small:empty { display: none; }
.list button span { flex: 1; }
.flow .lens-bar { margin-top: 0; justify-content: center; }
.flow .lens-bar button, [data-layout] .flow .lens-bar button { flex: none; min-height: 30px; padding: 2px 12px; font-size: 13px; background: none; border: 1px solid transparent; color: var(--muted); }
.flow .lens-bar button[aria-pressed="true"], [data-layout] .flow .lens-bar button[aria-pressed="true"] { background: none; border-color: var(--fg); color: var(--fg); font-weight: 700; }
.cal span.cal-d { border-color: transparent; }
.cal span.cal-d.future { opacity: .45; }

/* iPhone 上不允许任何内容把页面撑宽（2026-11-21：曾经能左右滑动，底部导航也跟着动） */
main > *, .flow > *, .block > * { min-width: 0; max-width: 100%; }
.hscroll { margin: 0; padding: 0 0 2px; }
.flow .lens-bar { flex-wrap: wrap; }
.hero.sealed img { transform: none; }

/* 今日“今天还可以”入口：每格写跟你有关的实时信息（docs/design/feature-matrix.md） */
.tiles { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.tile, [data-layout] .tile { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 10px; row-gap: 2px; align-items: center; text-align: left; padding: 12px; border-radius: 18px; background: var(--surface); border: 0; min-height: 0; box-shadow: 0 3px 0 var(--line); }
.tile i { grid-row: 1 / 3; font: 900 18px/1 var(--display); font-style: normal; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-l, #E6F2EC); color: var(--accent); }
.tile:first-child i { background: #F7DDE4; color: #B5485F; }
.tile b { font: 700 15px var(--display); }
.tile small { font-size: 12px; line-height: 1.45; color: var(--muted); }
.two-up { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.two-up b { font-size: 14px; }

/* 网格列一律用 minmax(0, 1fr)：1fr 等于 minmax(auto, 1fr)，内容比列宽时不肯缩，iPhone 的中文字体比桌面宽，三张卡片会把页面撑出屏幕（2026-11-21） */
.how li, .tile, .tile small, .stats button, .addmenu button, .two > *, .pair-two > *, .wd, .cal-d { min-width: 0; overflow-wrap: anywhere; }

/* iPhone Safari：输入框字号小于 16px 时，点进去会自动放大页面且不会缩回，页面就能左右拖、底部导航跟着动。
   所有输入框至少 16px；touch-action: manipulation 关掉双击放大（不影响双指缩放）（2026-11-21） */
input, select, textarea { font-size: max(16px, 1em) !important; }
html { touch-action: manipulation; }

/* 角度：紧贴在签下面的分段按钮，选中的那段是实心，切换后签马上换 */
.lens-bar.seg, [data-layout] .lens-bar.seg { display: flex; gap: 0; margin: 12px 0 0; padding: 3px; border-radius: 999px; background: color-mix(in srgb, var(--fg) 7%, transparent); justify-content: stretch; flex-wrap: nowrap; }
.lens-bar.seg button, [data-layout] .lens-bar.seg button { flex: 1 1 0; min-width: 0; min-height: 34px; padding: 2px 6px; border: 0; border-radius: 999px; background: none; box-shadow: none; color: var(--muted); font-size: 14px; font-weight: 500; }
.lens-bar.seg button[aria-pressed="true"], [data-layout] .lens-bar.seg button[aria-pressed="true"] { background: var(--surface, #fff); color: var(--fg); font-weight: 700; box-shadow: 0 1px 3px rgba(60, 40, 20, .14); }
.lens-bar.seg button.more, [data-layout] .lens-bar.seg button.more { flex: 0 0 40px; color: var(--muted); }
.lens-bar.seg + .icons { margin-top: 6px; }

/* 今日小确幸：签下面一行，轻一点的暖色底，不抢签的戏 */
.joy { display: flex; align-items: baseline; gap: 10px; margin: 0; padding: 12px 14px; border-radius: 14px; background: color-mix(in srgb, #E8A33D 14%, transparent); font-size: 15px; line-height: 1.5; }
.joy .tiny { flex: none; margin: 0; color: #B57A1E; }

/* 某个人的今天：合盘、给孩子算、送签共用。所有主题下都左对齐 */
.frame.pcard, [data-layout] .frame.pcard { text-align: left; align-items: stretch; gap: 10px; }
.pc-label { font-size: 13px; color: var(--muted); }
.pc-title { align-self: flex-start; font: 700 14px/1.3 var(--display); color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); padding: 3px 10px; border-radius: 999px; }
.pc-head { margin: 2px 0 0; font: 900 clamp(24px, 7vw, 30px)/1.3 var(--display); text-wrap: balance; }
.pc-sub { margin: 0; font-size: 13px; color: var(--muted); }
.pc-body { margin: 0; color: var(--muted); line-height: 1.65; }
.pc-yj { display: grid; gap: 8px; margin-top: 4px; }
.pc-yj div { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.pc-yj i { font-style: normal; flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: #6DBA9F; color: #fff; font-weight: 900; font-size: 14px; }
.pc-yj span { padding: 4px 10px; border-radius: 999px; background: #E3F2EC; color: #2F7A62; font-weight: 700; font-size: 14px; }
.pc-yj .ji i { background: #D9738B; }
.pc-yj .ji span { background: #FBE6EB; color: #B5485F; }
/* 合盘两个月 */
.pc-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; text-align: center; }
.pc-cal small { font-size: 11px; color: var(--muted); }
.pc-d, [data-layout] .pc-d { min-height: 0; aspect-ratio: 1; padding: 0; border: 0; border-radius: 10px; box-shadow: none; display: grid; place-items: center; font-size: 12px; color: var(--fg); background: var(--surface); }
.pc-d em { font-style: normal; }
.pc-d.both { background: #CDEBDD; } .pc-d.one { background: #F6E6C4; } .pc-d.none { background: #F6D3DC; }
.pc-d.past { opacity: .62; }
.pc-d.now { outline: 2px solid var(--fg); outline-offset: -2px; font-weight: 700; opacity: 1; }
.pc-d.on { outline: 2px solid var(--accent); outline-offset: -2px; opacity: 1; }
.pc-d.empty { background: none; }
.pc-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin: 8px 0 0; }
.pc-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-left: 6px; }
.pc-legend i.both { background: #CDEBDD; } .pc-legend i.one { background: #F6E6C4; } .pc-legend i.none { background: #F6D3DC; }

/* ---------- 星空主题（默认）：深空黑底、象牙白字、香槟金点缀。背景星空由 JS 画在 #sky 上 ---------- */
#sky { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: -1; pointer-events: none; display: block; }
[data-layout="xingkong"] body { background: #03050A; }
[data-layout="xingkong"] main { position: relative; }
[data-layout="xingkong"] .brand { font-weight: 700; letter-spacing: .32em; font-size: 20px; color: var(--accent); }
[data-layout="xingkong"] h2.sec { letter-spacing: .14em; font-weight: 400; color: var(--accent); }
[data-layout="xingkong"] h2.sec::before { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); }
/* 面板：半透明深色玻璃，细金线，不用大圆角和投影 */
[data-layout="xingkong"] section.today, [data-layout="xingkong"] .idcard, [data-layout="xingkong"] .tile, [data-layout="xingkong"] .frame.pcard,
[data-layout="xingkong"] .how li, [data-layout="xingkong"] .vs div {
  background: rgba(13, 17, 28, .72); border: 1px solid rgba(216, 181, 106, .18); box-shadow: none; border-radius: 14px;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
[data-layout="xingkong"] .frame { border: 1px solid rgba(216, 181, 106, .45); outline: 1px solid rgba(216, 181, 106, .16); outline-offset: 5px; background: rgba(8, 11, 20, .55); border-radius: 4px; }
[data-layout="xingkong"] .hero { border-radius: 14px; box-shadow: 0 0 0 1px rgba(216, 181, 106, .25), 0 20px 60px rgba(0, 0, 0, .6); }
[data-layout="xingkong"] .hero.gold { box-shadow: 0 0 0 1px var(--gold), 0 0 40px rgba(216, 181, 106, .25); }
[data-layout="xingkong"] .card { border-radius: 14px; box-shadow: 0 20px 60px rgba(0, 0, 0, .6); }
[data-layout="xingkong"] .cover { background: radial-gradient(ellipse at 50% 35%, rgba(30, 38, 66, .96), rgba(5, 7, 13, .97)); color: var(--fg); }
[data-layout="xingkong"] section.today.gold .cover { background: radial-gradient(ellipse at 50% 35%, rgba(90, 72, 36, .95), rgba(10, 8, 5, .97)); }
[data-layout="xingkong"] .cover-c { border: 1px solid var(--accent); color: var(--accent); font-weight: 400; box-shadow: 0 0 30px rgba(216, 181, 106, .25), inset 0 0 20px rgba(216, 181, 106, .12); }
[data-layout="xingkong"] .seal { background: radial-gradient(ellipse at 50% 30%, #1B2340, #05070D); color: var(--fg); border: 1px solid rgba(216, 181, 106, .4); border-radius: 14px; box-shadow: 0 0 50px rgba(216, 181, 106, .12); }
[data-layout="xingkong"] .seal.gold { background: radial-gradient(ellipse at 50% 30%, #5A4824, #0A0805); }
[data-layout="xingkong"] .seal::before { display: none; }
[data-layout="xingkong"] .seal-c { border: 1px solid var(--accent); color: var(--accent); font-weight: 400; }
[data-layout="xingkong"] .primary { background: linear-gradient(180deg, #E3C47E, #C9A050); border: 0; color: #120E05; border-radius: 999px; min-height: 50px; letter-spacing: .08em; box-shadow: 0 0 24px rgba(216, 181, 106, .25); }
[data-layout="xingkong"] .ghost, [data-layout="xingkong"] button { border-color: rgba(236, 230, 214, .16); border-radius: 999px; }
[data-layout="xingkong"] .link { border-radius: 0; }
[data-layout="xingkong"] input, [data-layout="xingkong"] select, [data-layout="xingkong"] textarea { background: rgba(13, 17, 28, .7); border-color: rgba(236, 230, 214, .16); border-radius: 10px; }
[data-layout="xingkong"] select option { background: #0D111C; }
[data-layout="xingkong"] .tabs { background: rgba(3, 5, 10, .88); border-top: 1px solid rgba(216, 181, 106, .18); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
[data-layout="xingkong"] .tabs button { font-weight: 400; letter-spacing: .12em; }
[data-layout="xingkong"] .tabs button[aria-current="page"] { box-shadow: none; text-shadow: 0 0 12px rgba(216, 181, 106, .6); }
[data-layout="xingkong"] .sheet { background: #0A0D16; border-top: 1px solid rgba(216, 181, 106, .35); border-radius: 18px 18px 0 0; box-shadow: 0 -20px 60px rgba(0, 0, 0, .7); }
[data-layout="xingkong"] body:has(.sheet:not([hidden]))::before { background: rgba(0, 0, 0, .6); }
[data-layout="xingkong"] .toast { background: #ECE6D6; color: #05070D; }
[data-layout="xingkong"] .skeleton i { background: linear-gradient(90deg, #121725 25%, #1C2233 50%, #121725 75%); background-size: 200% 100%; }
[data-layout="xingkong"] .friendnote { background: rgba(216, 181, 106, .12); color: var(--fg); border: 1px solid rgba(216, 181, 106, .3); }
[data-layout="xingkong"] .yiji i, [data-layout="xingkong"] .today-yj i, [data-layout="xingkong"] .yiji-full i { background: transparent; border: 1px solid var(--accent); color: var(--accent); }
[data-layout="xingkong"] .yiji div:last-child i, [data-layout="xingkong"] .today-yj.ji i, [data-layout="xingkong"] .yiji-full p:last-child i { background: transparent; border: 1px solid #C98A9A; color: #C98A9A; }
[data-layout="xingkong"] .badge { background: rgba(236, 230, 214, .08); }
[data-layout="xingkong"] .danger, [data-layout="xingkong"] .link.danger, [data-layout="xingkong"] .ghost.danger { color: #E39AAB; }
[data-layout="xingkong"] .stamp-big { color: #E39AAB; border-color: #E39AAB; }
/* 日历、图鉴、各种色块：降低饱和度，换成夜里看不刺眼的颜色 */
[data-layout="xingkong"] .cal-d.pos, [data-layout="xingkong"] .lg.pos, [data-layout="xingkong"] .wd i, [data-layout="xingkong"] .cal-d.fc.pos i { background: #3E7F6B; }
[data-layout="xingkong"] .cal-d.neg, [data-layout="xingkong"] .lg.neg, [data-layout="xingkong"] .wd.neg i, [data-layout="xingkong"] .cal-d.fc.neg i { background: #8E4E5E; }
[data-layout="xingkong"] .cal-d.on { color: #F4EFE2; }
[data-layout="xingkong"] .dex-i.on.pos b, [data-layout="xingkong"] .pair-two b.pos { color: #8FD0B8; }
[data-layout="xingkong"] .dex-i.on.neg b, [data-layout="xingkong"] .pair-two b.neg, [data-layout="xingkong"] .vs em, [data-layout="xingkong"] .how b { color: #E39AAB; }
[data-layout="xingkong"] .mbar { background: #8E4E5E; } [data-layout="xingkong"] .mbar i { background: #3E7F6B; }
[data-layout="xingkong"] .keys li { background: rgba(13, 17, 28, .7); border-left-color: #3E7F6B; }
[data-layout="xingkong"] .keys li.slow { border-left-color: #8E4E5E; }
[data-layout="xingkong"] .ava.pos { background: rgba(62, 127, 107, .3); color: #8FD0B8; }
[data-layout="xingkong"] .ava.neg { background: rgba(142, 78, 94, .3); color: #E39AAB; }
[data-layout="xingkong"] .ava.mid { background: rgba(216, 181, 106, .18); color: var(--accent); }
[data-layout="xingkong"] .ava.kid { background: rgba(140, 130, 210, .22); color: #B9B0F0; }
[data-layout="xingkong"] .tile i { background: rgba(216, 181, 106, .12); color: var(--accent); }
[data-layout="xingkong"] .tile:first-child i { background: rgba(201, 138, 154, .16); color: #E39AAB; }
[data-layout="xingkong"] .joy { background: rgba(216, 181, 106, .08); border: 1px solid rgba(216, 181, 106, .2); }
[data-layout="xingkong"] .joy .tiny { color: var(--accent); }
[data-layout="xingkong"] .pc-yj i { background: transparent; border: 1px solid #6DBA9F; color: #8FD0B8; }
[data-layout="xingkong"] .pc-yj span { background: rgba(62, 127, 107, .22); color: #A9DCC8; }
[data-layout="xingkong"] .pc-yj .ji i { border-color: #D9738B; color: #E39AAB; }
[data-layout="xingkong"] .pc-yj .ji span { background: rgba(142, 78, 94, .25); color: #F0B7C4; }
[data-layout="xingkong"] .pc-d.both, [data-layout="xingkong"] .pc-legend i.both { background: rgba(62, 127, 107, .55); }
[data-layout="xingkong"] .pc-d.one, [data-layout="xingkong"] .pc-legend i.one { background: rgba(216, 181, 106, .35); }
[data-layout="xingkong"] .pc-d.none, [data-layout="xingkong"] .pc-legend i.none { background: rgba(142, 78, 94, .45); }
[data-layout="xingkong"] .lens-bar.seg { background: rgba(13, 17, 28, .8); border: 1px solid rgba(216, 181, 106, .18); }
[data-layout="xingkong"] .lens-bar.seg button { border: 0; }
[data-layout="xingkong"] .lens-bar.seg button[aria-pressed="true"] { background: rgba(216, 181, 106, .16); color: var(--accent); }
[data-layout="xingkong"] table th, [data-layout="xingkong"] table td { border-color: var(--line); }

/* ---------- 星卡 ---------- */
/* 跟着主题走：星空主题是深色玻璃，手账等浅色主题是普通卡片底 */
.starbox { display: grid; gap: 10px; padding: 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); }
[data-layout="xingkong"] .starbox { border-color: rgba(216, 181, 106, .25); background: rgba(13, 17, 28, .6); }
.starbox .tiny { margin: 0; color: var(--accent); letter-spacing: .12em; }
/* 今日星卡横排，卡多了左右滑，不换行 */
.star-row { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 2px; scrollbar-width: none; }
.star-row::-webkit-scrollbar { display: none; }
.star-row .star-t { flex: 0 0 29%; scroll-snap-align: start; } /* 第四张露出一点，提示能左右滑 */
.star-t, [data-layout] .star-t { padding: 0; border: 0; border-radius: 8px; min-height: 0; display: grid; gap: 4px; justify-items: center; align-content: start; background: none; box-shadow: none; position: relative; }
.star-t img { width: 100%; aspect-ratio: 3 / 4; border-radius: 8px; display: block; }
.star-t small { font-size: 11.5px; color: var(--muted); line-height: 1.35; text-align: center; }
.star-t em { position: absolute; top: 6px; right: 6px; font-style: normal; font-size: 10px; padding: 1px 6px; border-radius: 99px; background: var(--accent); color: var(--on-accent); font-weight: 700; }
.star-next { margin: 0; font-size: 12.5px; color: var(--muted); }
.star-set { display: grid; gap: 8px; }
.star-set h3 { font: 400 15px var(--display); letter-spacing: .1em; display: flex; justify-content: space-between; align-items: baseline; }
.star-set h3 small { color: var(--muted); font-size: 12px; letter-spacing: 0; }
.star-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 10px; }
.star-grid .star-t:not(.on) img { opacity: .55; }
.star-big { width: 100%; border-radius: 12px; display: block; }

/* 后台文案管理 */
.admin [aria-pressed="true"] { border-color: var(--accent); color: var(--accent); font-weight: 700; }
.cp-cell { min-height: 0; padding: 6px 8px; font: 12px var(--mono); white-space: nowrap; border-radius: 6px; }
.cp-cell b { color: var(--accent); }
.cp-cell.h1 { background: #F1ECE0; } .cp-cell.h2 { background: #E8DFC8; } .cp-cell.h3 { background: #DDCFAA; } .cp-cell.h4 { background: #D2BE8B; }
.cp-cell.on { outline: 2px solid var(--accent); }
.cp-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.cp-f { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
.cp-f ol { margin: 4px 0 0; padding-left: 1.4em; font-size: 13.5px; }
.admin #addCopy textarea { min-height: 60px; font-family: var(--body); }

/* 星卡：遇见次数角标 */
.star-t i.cnt { position: absolute; bottom: 30px; right: 6px; font-style: normal; font: 700 12px var(--mono); padding: 1px 7px; border-radius: 99px; background: rgba(0, 0, 0, .55); color: #fff; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.center { text-align: center; }
/* 星卡大图：屏幕正中的弹框，不滚动，图片按屏幕高度缩放 */
.sheet.modal, [data-layout] .sheet.modal {
  top: 50%; bottom: auto; left: 50%; right: auto; width: min(92vw, 420px); max-height: 94dvh; overflow: hidden;
  transform: translate(-50%, -50%); border: 1px solid var(--line); border-radius: 18px; padding: 14px 14px 12px; animation: pop .22s ease-out both;
}
[data-layout="xingkong"] .sheet.modal { border-color: rgba(216, 181, 106, .35); }
@keyframes pop { from { opacity: 0; transform: translate(-50%, -48%) scale(.96); } }
.sheet.modal > div { gap: 8px; }
.sheet.modal .two { margin-top: 2px; }
.flip { display: block; position: relative; width: auto; max-width: 100%; height: min(calc(94dvh - 190px), calc((92vw - 28px) * 4 / 3), 520px); aspect-ratio: 3 / 4; margin: 0 auto; padding: 0; border: 0; min-height: 0; background: none; perspective: 1400px; }
[data-layout] .flip { background: none; border: 0; border-radius: 12px; }
.flip .face { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 12px; backface-visibility: hidden; -webkit-backface-visibility: hidden; transition: transform .5s cubic-bezier(.3, .7, .3, 1); }
.flip .back { transform: rotateY(180deg); }
.flip.flipped .front { transform: rotateY(-180deg); }
.flip.flipped .back { transform: rotateY(0); }
@media (prefers-reduced-motion: reduce) { .flip .face { transition: none; } }
.admin .three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.admin textarea.bk-p { min-height: 72px; font: 12px/1.45 var(--mono); }
.admin .bk-img { width: 96px; height: 96px; object-fit: cover; border-radius: 6px; display: block; }

/* 首页“你在意的事”：问一句 + 合盘 + 帮 ta 看 + 择日 */
.values .vrows { display: grid; gap: 8px; margin-top: 12px; }
.vrow, [data-layout] .vrow { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; text-align: left; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); min-height: 0; width: 100%; }
[data-layout="xingkong"] .vrow { background: rgba(13, 17, 28, .7); border-color: rgba(216, 181, 106, .2); }
.vrow i { font: 900 17px/1 var(--display); font-style: normal; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-l, #E6F2EC); color: var(--accent); }
.vrow span { display: grid; gap: 2px; min-width: 0; }
.vrow b { font: 700 15px var(--display); }
.vrow small { font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.vrow em { font-style: normal; color: var(--muted); font-size: 20px; }
.nudge { display: grid; gap: 8px; }
.guide p { margin: 0 0 12px; line-height: 1.8; }

/* 2026-11-27：视角栏贴着签卡（它换的是上面这张卡），“说中了”挪到页面下方，分享放到日期旁 */
.hero + .lens-bar.seg, [data-layout] .hero + .lens-bar.seg { margin: -14px 0 4px; }
.share-top { margin-left: 10px; border: 0; background: none; padding: 4px 0; min-height: 32px; font: 700 13px var(--display); color: var(--accent); }
.fbline { margin: 0; align-items: center; gap: 2px; font-size: 13px; color: var(--muted); }
.fbline > span { margin-right: 4px; }
.fbline button, [data-layout] .fbline button { min-height: 36px; padding: 4px 10px; font-size: 13px; color: var(--muted); }
.fbline button:first-child, [data-layout] .fbline button:first-of-type { color: var(--muted); font-weight: 400; }
.fbline button[aria-pressed="true"], [data-layout] .fbline button[aria-pressed="true"] { color: var(--accent); font-weight: 700; }
[data-layout="xingkong"] .yiji-full p:first-child i { background: #C4553F; border-color: #C4553F; color: #FFF8EC; }
[data-layout="xingkong"] .yiji-full p:last-child i { background: #4C6CA8; border-color: #4C6CA8; color: #FFF8EC; }
.zdays { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; align-items: center; }
.zdays b { font-size: 13px; margin-right: 2px; }
.zdays button { min-height: 30px; padding: 2px 10px; border-radius: 999px; font-size: 13px; border: 1px solid var(--line, rgba(127,127,127,.3)); background: none; color: var(--fg); }
.zdays button.good { border-color: var(--accent); color: var(--accent); }

/* 今天为什么是这句（2026-12-01）：颜色一律用主题变量，深浅主题都能用 */
.why-box { display: grid; gap: 16px; }
.why-sec h3, .why-more h3 { margin: 0 0 4px; font: 600 12px var(--display); letter-spacing: .15em; color: var(--accent); }
.why-sec h3 small, .why-more h3 small { margin-left: 6px; letter-spacing: 0; font-weight: 400; color: var(--muted); }
.why-sec p { margin: 0; font-size: 15.5px; line-height: 1.75; }
.why-sec p.why-when { margin-top: 6px; font-size: 14px; color: var(--muted); padding-left: 10px; border-left: 2px solid var(--accent); }
.why-chip { display: flex; gap: 10px; align-items: center; margin: 4px 0 !important; }
.why-chip i { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font: 700 13px var(--display); font-style: normal; color: #FFF8EC; }
.why-chip.yi i { background: #C4553F; } .why-chip.ji i { background: #4C6CA8; }
.why-ask, [data-layout] .why-ask { width: 100%; text-align: left; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); color: var(--fg); font-size: 15px; min-height: 0; }
.why-ask small { display: block; color: var(--accent); font-size: 12px; margin-bottom: 2px; }
.why-more { border-top: 1px dashed var(--line); padding-top: 14px; }
.why-more ul { list-style: none; margin: 0 0 6px; padding: 0; }
.why-more li { margin: 0 0 10px; }
.why-more b { font-size: 14px; } .why-more time { font-size: 12px; color: var(--muted); margin-left: 6px; }
.why-more li p { margin: 2px 0 0; font-size: 13.5px; color: var(--muted); }
.why-tag { font-size: 11px; padding: 1px 6px; border-radius: 6px; margin-left: 6px; }
.why-tag.pos { background: color-mix(in srgb, #6DB89D 22%, transparent); color: #4E9C80; } .why-tag.neg { background: color-mix(in srgb, #DC8EA0 22%, transparent); color: #C06A80; }
[data-layout="xingkong"] .why-tag.pos { color: #8FD0B4; } [data-layout="xingkong"] .why-tag.neg { color: #E7A9B7; }

/* 2026-12-04 今日页减到 6 块：签卡下一行小星卡、引导卡、今天和 ta、今天就能用 */
.starline { display: grid; gap: 8px; }
.starline-h { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 13px; color: var(--muted); }
.starline-h .link { font-size: 13px; min-height: 0; padding: 0; }
.star-row.mini .star-t { flex: 0 0 18%; }
.star-row.mini .star-t em { top: 3px; right: 3px; font-size: 9px; padding: 0 4px; }
.guide .two, [data-layout] .guide .two { display: flex; gap: 16px; align-items: center; }
.guide .two .ghost, [data-layout] .guide .two .ghost { flex: none; width: auto; min-height: 40px; padding: 6px 18px; }
.guide .two .link { font-size: 13px; white-space: nowrap; }
.why-ta, [data-layout] .why-ta { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; align-items: center; text-align: left; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); font-size: 15px; line-height: 1.5; }
.why-ta small { grid-column: 1 / -1; color: var(--accent); font-size: 12px; }
.why-ta em { font-style: normal; color: var(--muted); font-size: 20px; grid-row: 2; grid-column: 2; }
.why-fold { display: grid; gap: 14px; margin-top: 12px; }
.use-box { display: grid; gap: 2px; }
.why-chip.fun i { background: #B57A1E; }
/* 2026-12-04 说人话：术语和起止日期放小字 */
.why-term { display: block; margin-top: 4px !important; font-size: 13px !important; line-height: 1.6 !important; color: var(--muted); }
.why-more li .why-term .why-tag { margin-right: 6px; }

/* 身边（2026-12-04 第 4 步） */
.near-list { display: grid; gap: 8px; margin: 8px 0 14px; }
.vrow b .rel { font: 400 12px var(--body, inherit); color: var(--muted); }
.rel-pick button[aria-checked="true"], [data-layout] .rel-pick button[aria-checked="true"] { border-style: solid; border-color: var(--fg); font-weight: 700; }
#pQs .hist { margin-top: 8px; }
#pQs h3 { margin-top: 14px; }

/* 日历点过去的日子回看、图鉴分页（2026-12-04 第 5 步） */
button.cal-d.past, [data-layout] button.cal-d.past { cursor: pointer; }
.cal-jump input { display: block; margin-top: 6px; width: 100%; }
.cal-pick .ghost { margin-top: 8px; }
.seg { margin: 4px 0 10px; }
#meQs .hist { margin-bottom: 8px; }
/* 身边：没选关系的人，在列表里原地问一次；人的页面最下面的关系、移除收成一行 */
.near-list .rel-ask { padding: 4px 12px 12px 52px; }
.near-list .rel-ask small { color: var(--muted); font-size: 13px; }
.near-list .rel-ask .tags { margin-top: 6px; }
details.manage > summary { color: var(--muted); }
details.manage[open] > summary { margin-bottom: 10px; }
details#pGiftBox[open] > summary { margin-bottom: 8px; }
/* 在微信里打开：顶部一条提示去浏览器（境外域名，微信里可能被拦、不能付款） */
.wxbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 8px; max-width: 480px; margin: 0 auto; padding: 8px 14px; background: var(--accent); color: var(--bg); font-size: 13px; }
.wxbar span { flex: 1; }
.wxbar .link { color: var(--bg); font-size: 18px; padding: 0 4px; min-height: 0; }

/* ---------- 电脑上（≥1024px）：左边竖导航，内容区变宽；今日、日历两栏。手机上完全不变（2026-12-04） ---------- */
@media (min-width: 1024px) {
  body.has-tabs { padding-left: 208px; }
  body.has-tabs .tabs {
    top: 0; bottom: 0; right: auto; width: 208px; border-top: 0; border-right: 1px solid var(--line);
    grid-auto-flow: row; grid-auto-rows: 52px; grid-auto-columns: auto; align-content: start; padding: 28px 16px;
  }
  body.has-tabs .tabs::before { content: "星报"; font: 900 26px/1 var(--display); color: var(--accent); letter-spacing: .2em; padding: 0 12px 28px; }
  body.has-tabs .tabs button { height: 52px; text-align: left; padding: 0 14px; border-radius: 10px; font-size: 16px; }
  body.has-tabs .tabs button[aria-current="page"] { box-shadow: inset 3px 0 0 var(--accent); background: var(--surface); }
  body.has-tabs .tabs button:hover { color: var(--fg); }
  body.has-tabs main { max-width: 760px; padding: 40px 40px 64px; }
  .wxbar { max-width: none; }
  body.has-tabs .brandline > .brand { display: none; }
  body.has-tabs .brandline { justify-content: flex-end; }

  /* 今日：签卡在左（跟着滚），其余在右 */
  body.has-tabs main[data-view="today"] { max-width: 1120px; display: grid; grid-template-columns: minmax(0, 440px) minmax(0, 1fr); column-gap: 48px; row-gap: 24px; align-items: start; }
  main[data-view="today"] > .brandline, main[data-view="today"] > .friendnote { grid-column: 1 / -1; }
  main[data-view="today"] > .hero { grid-column: 1; position: sticky; top: 32px; }
  main[data-view="today"] > #rest { grid-column: 2; }
  main[data-view="today"] > .hero:has(.cover) { grid-column: 1 / -1; justify-self: center; width: 440px; position: static; }

  /* 日历：月历在左，“这件事哪天办”和人生节点在右 */
  body.has-tabs main[data-view="cal"] { max-width: 1120px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 400px); column-gap: 48px; row-gap: 24px; align-items: start; }
  main[data-view="cal"] > .mhead { grid-column: 1 / -1; }
  main[data-view="cal"] > .book { grid-column: 1; grid-row: 2 / span 3; }
  main[data-view="cal"] > :not(.mhead):not(.book) { grid-column: 2; }

  body.has-tabs .tabs .tab-qr { display: block; margin-top: 24px; font-size: 14px; color: var(--muted); border: 1px solid var(--line); }

  /* 身边：左边人的列表（固定在导航旁边），右边这个人的页面 */
  body.has-side { padding-left: 528px; }
  .side { position: fixed; top: 0; bottom: 0; left: 208px; width: 320px; overflow-y: auto; border-right: 1px solid var(--line); padding: 40px 20px 32px; display: flex; flex-direction: column; gap: 16px; }
  .side .vrow[aria-current] { background: var(--surface); box-shadow: inset 3px 0 0 var(--accent); }
  body.has-side main .brandline .back { visibility: hidden; }

  /* 付费墙、底部抽屉：电脑上改成屏幕中间的对话框 */
  .sheet { left: 50%; right: auto; bottom: auto; top: 50%; transform: translate(-50%, -50%); width: 520px; max-height: 86vh; overflow: auto; border-radius: 16px; border-top-width: 4px; }
  .toast { bottom: 32px; }
}
