/* 起名 H5：浅色宣纸主题，墨色文字、朱砂点缀。背景画在 bg.css（body::before / ::after），揭晓特效在 brush-fx.js。
   约定：html 不设背景（bg.css 的两层才看得见）；名字大字用霞鹜文楷（assets/fonts/fonts.css 的 --naming-kai-sc / -tc），
   正文用系统衬线字体。所有颜色在 :root 定义；内容色不随特效变化，保证可读。 */
:root {
  --paper: #efe6d4; --paper-card: #fbf7ef; --paper-deep: #e9dfca;
  --ink: #1f1c1a; --ink-2: #3d3832; --muted: #73695d; --faint: #6c6255;   /* faint 用于 11–12px 小字：对纸色对比度不低于 4.5:1 */
  --line: rgba(74, 54, 30, .15); --line-2: rgba(74, 54, 30, .28);
  --zhu: #b5382b; --zhu-2: #cf4a37; --zhu-soft: rgba(181, 56, 43, .09); --zhu-line: rgba(181, 56, 43, .42);
  --notice: #8a5a14; --notice-bg: rgba(214, 160, 70, .16); --notice-line: rgba(160, 110, 30, .38);
  --jade: #3f6a5c; --jade-soft: rgba(63, 106, 92, .1);
  --serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", serif;
  /* 楷体：随附的两套子集在前；子集里没有的生僻字（多在扩展 B 区）再找系统里收字多的字体 */
  --extb: "SimSun-ExtB", "MingLiU-ExtB", "MingLiU_HKSCS-ExtB", "HanaMinB", "Plangothic P1", "Noto Serif CJK SC";
  --kai: var(--naming-kai-sc), var(--extb);
  --radius: 14px;
  --shadow: 0 1px 0 rgba(255, 255, 255, .7) inset, 0 10px 24px -14px rgba(64, 42, 18, .45), 0 2px 6px -3px rgba(64, 42, 18, .18);
  --tile: url("assets/fx/xuan-tile.webp");
}
body.tc { --kai: var(--naming-kai-tc), var(--extb); }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scrollbar-gutter: stable; }   /* 卡片出现时滚动条不挤窄舞台（揭晓特效遇宽度变化会直接跳到终态） */
html:has(.app[data-view="home"]) { scrollbar-gutter: auto; }         /* 首页没有揭晓舞台：不留空白的滚动条位置（宽屏右边那一条平色） */
html.sheet-open { scrollbar-gutter: auto; overflow: hidden; }       /* 弹层打开时不留滚动条位置，遮罩盖满整个宽度（app.js lockScroll 用右内边距补上） */
body { margin: 0; min-height: 100vh; font-family: var(--serif); color: var(--ink); background-color: var(--paper); overflow-x: clip;
  font-size: 15px; line-height: 1.7; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
a { color: var(--zhu); }
:focus-visible { outline: 2px solid var(--zhu-line); outline-offset: 2px; }

.app { position: relative; max-width: 940px; margin: 0 auto; padding: 0 16px calc(28px + env(safe-area-inset-bottom)); }
.screen { padding-top: 4px; }

/* ---------- 顶栏 ---------- */
.topbar { position: sticky; top: 0; z-index: 12; display: flex; align-items: center; gap: 8px; min-height: 56px;
  padding: calc(6px + env(safe-area-inset-top)) 0 6px; margin: 0 -16px; padding-left: 16px; padding-right: 16px; }
.topbar::before { content: ""; position: absolute; z-index: -1; top: 0; bottom: 0; left: calc(50% - 50vw); width: 100vw; pointer-events: none;
  background: linear-gradient(to bottom, rgba(239, 230, 212, .94), rgba(239, 230, 212, .82));
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.topbar.scrolled::before { border-bottom-color: var(--line); }
.brand { display: inline-flex; align-items: center; gap: 8px; background: none; border: 0; padding: 4px 2px; }
.brand-seal { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 6px; background: var(--zhu); color: #fbf1e3;
  font-family: var(--kai); font-size: 19px; line-height: 1; box-shadow: inset 0 0 0 2px rgba(251, 241, 227, .35); }
.brand-text { font-family: var(--kai); font-size: 21px; letter-spacing: .14em; }
.topbar-title { flex: 1; min-width: 0; margin: 0; font-family: var(--kai); font-weight: 400; font-size: 19px; letter-spacing: .1em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app[data-view="home"] .topbar-title, .app[data-view="home"] .brand { visibility: hidden; }
.app:not([data-view="home"]) .brand-text { display: none; }
.topbar-actions { display: flex; gap: 6px; margin-left: auto; }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line);
  background: rgba(251, 247, 239, .7); color: var(--ink-2); padding: 0; transition: background .15s, transform .15s; }
.icon-btn:hover { background: var(--paper-card); }
.icon-btn:active { transform: scale(.95); }
.icon-btn.small { width: 32px; height: 32px; border-radius: 10px; }
.icon-btn.small svg { width: 16px; height: 16px; }
/* 顶栏「备选」：星标右上角一个小数字 */
.fav-btn { position: relative; }
.fav-count { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--zhu); color: #fbf1e3;
  font-size: 11px; font-style: normal; font-weight: 600; line-height: 18px; text-align: center; letter-spacing: 0; box-shadow: 0 0 0 2px var(--paper); }

/* ---------- 首页 ---------- */
.hero { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; align-items: center; padding: 6px 2px 16px; }
.hero-mark { flex: none; grid-row: 1; }
.hero-copy { display: contents; }
.hero-title { grid-row: 1; grid-column: 2; }
.hero-epigraph { grid-column: 1 / -1; }
.hero-seal { display: grid; place-items: center; width: 68px; height: 68px; border-radius: 12px; background: var(--zhu); color: #fbf1e3;
  font-family: var(--kai); font-size: 46px; line-height: 1; transform: rotate(-4deg);
  box-shadow: inset 0 0 0 3px rgba(251, 241, 227, .5), inset 0 0 0 6px var(--zhu), inset 0 0 18px rgba(80, 10, 0, .35), 0 8px 18px -10px rgba(120, 20, 10, .6); }
.hero-title { margin: 0; font-family: var(--kai); font-weight: 400; font-size: 44px; line-height: 1.1; letter-spacing: .3em; }
.hero-epigraph { margin: 6px 0 0; font-size: 13px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.hero-epigraph .raw { font-family: var(--kai); font-size: 16px; letter-spacing: .12em; color: var(--ink-2); }   /* 首页不为一句引文另下载繁体字体 */
.hero-epi-loc { font-size: 12px; letter-spacing: .06em; }

.tabs { display: flex; gap: 4px; padding: 4px; margin: 4px 0 12px; border-radius: 14px; background: rgba(233, 223, 202, .72); border: 1px solid var(--line); }
.tab { flex: 1; border: 0; border-radius: 10px; background: none; padding: 9px 10px; font-size: 15px; letter-spacing: .2em; color: var(--muted); transition: background .2s, color .2s; }
.tab.active { background: var(--paper-card); color: var(--ink); box-shadow: 0 2px 8px -4px rgba(64, 42, 18, .45); font-weight: 600; }
.small-tabs .tab { font-size: 14px; letter-spacing: .08em; padding: 7px 6px; }

.panel { position: relative; background: linear-gradient(rgba(251, 247, 239, .9), rgba(251, 247, 239, .9)), var(--tile);
  background-size: auto, 256px; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; margin: 12px 0; }
.form-panel { padding: 18px 16px 20px; }
.field { display: flex; flex-direction: column; gap: 4px; margin: 0 0 12px; min-width: 0; flex: 1; }
.field-label { display: block; margin: 0 0 6px; font-size: 13px; color: var(--muted); letter-spacing: .06em; }
.field .field-label { margin: 0; }
.hint-inline { font-size: 12px; color: var(--faint); letter-spacing: 0; margin-left: 4px; }
.field input { width: 100%; border: 0; border-bottom: 1.5px solid var(--line-2); border-radius: 0; background: transparent; padding: 8px 2px;
  font-size: 17px; color: var(--ink); transition: border-color .2s; }
.field input::placeholder { color: #b2a796; }
.field input:focus { outline: none; border-bottom-color: var(--zhu); }
#g-surname, #c-name { font-family: var(--kai); font-size: 26px; letter-spacing: .14em; padding: 6px 2px; }
#g-surname::placeholder, #c-name::placeholder { font-family: var(--serif); font-size: 16px; letter-spacing: .04em; }
.row2 { display: flex; gap: 14px; flex-wrap: wrap; }
.row2 > .field { min-width: 140px; }
#g-gen-pos { flex-wrap: wrap; margin: 4px 0 0; }
#g-gen-pos .chip { padding: 6px 12px; }
.seg { display: flex; gap: 6px; margin: 0 0 14px; }
.seg.wrap { flex-wrap: wrap; }
.sub-seg { margin-top: -6px; }
.chip { border: 1px solid var(--line-2); background: rgba(255, 255, 255, .45); border-radius: 999px; padding: 6px 14px; font-size: 14px; color: var(--ink-2);
  transition: background .15s, color .15s, border-color .15s, transform .15s; white-space: nowrap; }
.chip:hover { border-color: var(--zhu-line); }
.chip:active { transform: scale(.97); }
.chip.active, .chip[aria-checked="true"], .chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #f8f1e4; }
.seg > .chip { flex: 0 1 auto; }
#g-region .chip, #c-region .chip, #g-length .chip { flex: 1; text-align: center; padding: 7px 6px; }
.chip[disabled] { opacity: .4; pointer-events: none; }
.hint { margin: -6px 0 12px; font-size: 12px; color: var(--muted); line-height: 1.6; }
.switch { display: flex; gap: 8px; align-items: flex-start; margin: -2px 0 12px; font-size: 14px; color: var(--ink-2); cursor: pointer; line-height: 1.5; }
.switch input { flex: none; width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--zhu); }
.reading-pick { margin: -4px 0 14px; padding: 10px 12px 2px; border-radius: 12px; background: var(--notice-bg); border: 1px dashed var(--notice-line); }
.reading-confirm { margin: 0 0 8px; font-size: 13px; color: var(--notice); }
.reading-pick .chip { font-size: 15px; }
.reading-pick .hint { margin: -4px 0 8px; }
.more { margin: 4px 0 6px; border-top: 1px solid var(--line); }
.more > summary { list-style: none; display: flex; align-items: center; gap: 8px; padding: 12px 0 10px; cursor: pointer; font-size: 15px; color: var(--ink-2); }
.more > summary::-webkit-details-marker { display: none; }
.more > summary::after { content: ""; width: 8px; height: 8px; border-right: 1.6px solid var(--muted); border-bottom: 1.6px solid var(--muted); transform: rotate(45deg); margin: -4px 0 0 auto; transition: transform .2s; }
.more[open] > summary::after { transform: rotate(-135deg); margin-top: 4px; }
.more-count { font-size: 12px; color: var(--zhu); }
.more-body { padding-top: 4px; }
.private-box { margin: 2px 0 14px; padding: 12px 12px 4px; border-radius: 12px; border: 1px solid var(--line); background: rgba(233, 223, 202, .35); }
.privacy { display: flex; gap: 6px; align-items: flex-start; margin: 0 0 10px; font-size: 12px; color: var(--jade); line-height: 1.6; }
.privacy svg { width: 15px; height: 15px; margin-top: 2px; }
/* 开关后面跟一个 ※（点按看一句说明）：※ 放在 label 外面，点它不会拨动开关 */
.switch-row { display: flex; align-items: flex-start; gap: 2px; margin: 0 0 12px; }
.switch-row .switch { margin: 0; }
.switch-row .vm { font-size: 12px; margin: 2px 0 0 2px; line-height: 1; vertical-align: baseline; }
.form-error { margin: 4px 0 10px; font-size: 13px; color: var(--zhu); }
.form-error:empty { margin: 0; }

/* 主按钮：朱砂印色 */
.btn-seal { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; border-radius: 12px;
  padding: 11px 22px; background: linear-gradient(160deg, var(--zhu-2), var(--zhu) 55%, #9c2d22); color: #fbf1e3; font-size: 16px; letter-spacing: .14em;
  box-shadow: inset 0 0 0 1.5px rgba(251, 241, 227, .35), 0 8px 18px -10px rgba(140, 30, 18, .8); transition: transform .15s, filter .15s; }
.btn-seal span { font-family: var(--kai); }
a.btn-seal, a.btn-ghost { text-decoration: none; }
.btn-seal:hover { filter: brightness(1.05); }
.btn-seal:active { transform: translateY(1px) scale(.99); }
.btn-seal.big { width: 100%; padding: 14px; font-size: 21px; letter-spacing: .3em; }
.btn-seal.small { padding: 7px 14px; font-size: 14px; border-radius: 10px; }
.btn-seal[disabled] { filter: grayscale(.6); opacity: .55; pointer-events: none; }
.btn-seal.busy span::after { content: "…"; }
.btn-ghost { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line-2); border-radius: 12px;
  padding: 9px 16px; background: rgba(251, 247, 239, .72); color: var(--ink-2); font-size: 14px; transition: background .15s, border-color .15s; }
.btn-ghost:hover { border-color: var(--zhu-line); background: var(--paper-card); }
.btn-ghost[disabled] { opacity: .5; pointer-events: none; }
.btn-ghost svg { width: 18px; height: 18px; }
.link-btn { border: 0; background: none; padding: 0; color: var(--zhu); text-decoration: underline; text-underline-offset: 3px; font-size: 13px; }

/* ---------- 候选页 ---------- */
.cond { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 10px; }
.cond span { font-size: 12px; padding: 2px 10px; border-radius: 999px; background: rgba(233, 223, 202, .75); border: 1px solid var(--line); color: var(--ink-2); }
.saved-note { margin: 0 0 10px; font-size: 12px; color: var(--notice); }
.saved-note::before { content: "※ "; }
.stage-wrap { position: relative; margin: 4px 0 6px; }
.stage { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; height: clamp(250px, 66vw, 330px);
  padding: 20px 12px; text-align: center; overflow: hidden; }
.stage-name { margin: 0; font-family: var(--kai); font-size: clamp(54px, 16.5vw, 104px); line-height: 1.18; letter-spacing: .12em; color: var(--ink);
  white-space: nowrap; padding-left: .12em; }
.stage-name.n4 { font-size: clamp(46px, 13.5vw, 92px); }
.stage-name.n5 { font-size: clamp(40px, 11.5vw, 82px); }
.stage-src { margin: .55em 0 0; max-width: 92%; display: flex; flex-direction: column; gap: 2px; align-items: center; }
.stage-src .q { font-family: var(--kai); font-size: clamp(16px, 4.4vw, 21px); letter-spacing: .16em; color: var(--ink-2); }
.stage-src .q mark { background: none; color: var(--zhu); }
.stage-src .l { font-size: 12px; letter-spacing: .12em; color: var(--muted); }
.stage-btn { position: absolute; right: 10px; bottom: 10px; z-index: 6; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--line); background: rgba(251, 247, 239, .78); color: var(--muted); padding: 0; }
.stage-btn svg { width: 17px; height: 17px; }
.stage[data-nfx-state="playing"] ~ .stage-btn { visibility: hidden; }
/* 听一听：舞台左下角，与右下角的「再看一次落笔」相对；揭晓播放中先收起（那时点一下是跳过揭晓） */
.stage-say { position: absolute; left: 10px; bottom: 10px; z-index: 6; display: inline-flex; align-items: center; gap: 4px; height: 34px; max-width: calc(100% - 64px);
  padding: 0 13px 0 9px; border-radius: 17px; border: 1px solid var(--line); background: rgba(251, 247, 239, .82); color: var(--ink-2);
  font-size: 13px; letter-spacing: .1em; white-space: nowrap; transition: color .15s, background .15s, border-color .15s; }
.stage-say svg { width: 19px; height: 19px; }
.stage-say:hover { border-color: var(--zhu-line); }
.stage-say[aria-pressed="true"] { color: var(--zhu); border-color: var(--zhu-line); background: rgba(251, 236, 226, .92); }
.stage-say[aria-pressed="true"] .w1 { animation: say-wave 1.1s ease-in-out infinite; }
.stage-say[aria-pressed="true"] .w2 { animation: say-wave 1.1s ease-in-out .25s infinite; }
@keyframes say-wave { 0%, 100% { opacity: 1; } 50% { opacity: .2; } }
.stage-say.busy { opacity: .6; }
.stage-say.none { cursor: default; color: var(--muted); border-style: dashed; background: rgba(251, 247, 239, .7); font-size: 12px; letter-spacing: .02em; }
.stage-say.none .w1, .stage-say.none .w2 { display: none; }
.stage[data-nfx-state="playing"] ~ .stage-say { visibility: hidden; }

/* 研墨等待：砚台、墨条打圈、墨池涟漪、墨雾 */
.ink-wait { position: absolute; inset: 0; z-index: 7; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  border-radius: 18px; background: radial-gradient(ellipse at 50% 42%, rgba(251, 247, 239, .97), rgba(244, 237, 223, .95) 70%, rgba(239, 230, 212, .9));
  border: 1px solid var(--line); text-align: center; padding: 10px 16px; }
.inkstone { position: relative; width: 168px; height: 118px; margin-bottom: 4px; }
.mist { position: absolute; inset: -18px -40px -8px; pointer-events: none; }
.mist i { position: absolute; left: 50%; top: 50%; width: 120px; height: 70px; margin: -35px 0 0 -60px; border-radius: 50%;
  background: radial-gradient(ellipse at 40% 50%, rgba(30, 27, 26, .3), rgba(30, 27, 26, 0) 70%); filter: blur(7px); animation: mist 6s ease-in-out infinite; }
.mist i:nth-child(2) { width: 90px; height: 54px; margin: -27px 0 0 -45px; animation-duration: 7.5s; animation-direction: reverse; opacity: .8; }
.mist i:nth-child(3) { width: 150px; height: 40px; margin: -10px 0 0 -75px; animation-duration: 9s; opacity: .55; }
@keyframes mist { 0% { transform: rotate(0) translateX(18px) scale(1); } 50% { transform: rotate(180deg) translateX(26px) scale(1.15); } 100% { transform: rotate(360deg) translateX(18px) scale(1); } }
.stone { position: absolute; left: 14px; right: 14px; bottom: 6px; height: 74px; border-radius: 38px 38px 30px 30px / 34px 34px 26px 26px;
  background: radial-gradient(ellipse at 40% 28%, #5a544d, #2d2925 60%, #1b1816); box-shadow: 0 10px 18px -8px rgba(30, 20, 10, .55), inset 0 2px 0 rgba(255, 255, 255, .14); }
.pool { position: absolute; left: 18px; right: 18px; top: 12px; bottom: 16px; border-radius: 50%; overflow: hidden;
  background: radial-gradient(ellipse at 45% 35%, #2a2826, #0b0a0a 70%); box-shadow: inset 0 3px 6px rgba(0, 0, 0, .7), inset 0 -1px 0 rgba(255, 255, 255, .08); }
.pool::before { content: ""; position: absolute; inset: -30%; background: conic-gradient(from 0deg, rgba(255,255,255,0), rgba(255,255,255,.12) 12%, rgba(255,255,255,0) 26%,
  rgba(255,255,255,.07) 48%, rgba(255,255,255,0) 62%, rgba(255,255,255,.1) 80%, rgba(255,255,255,0)); border-radius: 50%; animation: swirl 2.6s linear infinite; }
@keyframes swirl { to { transform: rotate(360deg); } }
.pool::after { content: ""; position: absolute; left: 18%; top: 14%; width: 34%; height: 22%; border-radius: 50%; background: rgba(255, 255, 255, .13); filter: blur(2px);
  animation: sheen 3.2s ease-in-out infinite; }
@keyframes sheen { 50% { transform: translateX(70%); opacity: .45; } }
.ripple { position: absolute; left: 50%; top: 50%; width: 20px; height: 9px; margin: -4.5px 0 0 -10px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .28);
  animation: ripple 2.4s ease-out infinite; }
.ripple.r2 { animation-delay: .8s; } .ripple.r3 { animation-delay: 1.6s; }
@keyframes ripple { from { transform: scale(.4); opacity: .9; } to { transform: scale(5); opacity: 0; } }
.stick-orbit { position: absolute; left: 50%; top: 2px; width: 0; height: 0; animation: orbit 1.9s linear infinite; }
.stick { position: absolute; left: -12px; top: 0; width: 24px; height: 74px; border-radius: 4px 4px 3px 3px;
  background: linear-gradient(90deg, #121011, #34302d 40%, #171515); box-shadow: 0 6px 10px -4px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .12);
  display: flex; justify-content: center; padding-top: 10px; }
.stick { animation: tilt 1.9s ease-in-out infinite; transform-origin: 50% 100%; }
@keyframes tilt { 0%, 100% { transform: rotate(-5deg); } 50% { transform: rotate(5deg); } }
.stick span { writing-mode: vertical-rl; font-family: var(--kai); font-size: 11px; letter-spacing: .1em; color: #cfa24e; opacity: .9; }
@keyframes orbit { 0% { transform: translate(14px, 0); } 25% { transform: translate(0, 5px); } 50% { transform: translate(-14px, 0); } 75% { transform: translate(0, -5px); } 100% { transform: translate(14px, 0); } }
.wait-line { margin: 4px 0 0; padding-left: 1.4em; font-family: var(--kai); font-size: 18px; letter-spacing: .06em; color: var(--ink-2); }
.wait-line::after { content: ""; display: inline-block; width: 1.4em; text-align: left; animation: dots 1.5s steps(4, end) infinite; }
@keyframes dots { 0% { content: ""; } 25% { content: "·"; } 50% { content: "··"; } 75%, 100% { content: "···"; } }

/* 两个视图的切换：吸在顶栏下面，滚到哪里都能切；吸住时下面铺一条与顶栏同色的底 */
.view-bar { position: sticky; top: var(--bar-h, 56px); z-index: 11; padding: 2px 0 8px; }
.view-bar::before { content: ""; position: absolute; z-index: -1; top: 0; bottom: 0; left: calc(50% - 50vw); width: 100vw; pointer-events: none; opacity: 0;
  background: linear-gradient(to bottom, rgba(239, 230, 212, .97), rgba(239, 230, 212, .95)); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line); transition: opacity .15s; }
.view-bar.stuck::before { opacity: 1; }
.view-tabs { margin: 0; }
.view-tabs .tab { display: inline-flex; align-items: center; justify-content: center; letter-spacing: .12em; }
.vtab-busy { flex: none; width: 10px; height: 10px; margin-left: 6px; border-radius: 50%; border: 1.5px solid rgba(31, 28, 26, .2); border-top-color: var(--ink-2);
  animation: swirl .9s linear infinite; }
.vtab-new { flex: none; display: inline-grid; place-items: center; min-width: 18px; height: 18px; margin-left: 6px; padding: 0 4px; border-radius: 9px;
  background: var(--zhu); color: #fbf1e3; font-size: 11px; font-style: normal; font-weight: 600; letter-spacing: 0; line-height: 1; }
/* AI 视图里还没有名字或这次没成：一句话加按钮；已有一批时收成一行，放在卡片上方 */
.ai-state { display: flex; flex-direction: column; align-items: center; gap: 12px; margin: 4px 0; padding: 28px 16px; text-align: center;
  border-radius: var(--radius); border: 1px dashed var(--line-2); background: rgba(251, 247, 239, .72); }
.ai-state-msg { margin: 0; font-size: 14px; color: var(--ink-2); }
.ai-state.slim { flex-direction: row; justify-content: space-between; gap: 10px; padding: 8px 8px 8px 12px; text-align: left;
  border-style: solid; border-color: var(--notice-line); background: var(--notice-bg); }
.ai-state.slim .ai-state-msg { font-size: 13px; color: var(--notice); }
.ai-state.slim .btn-ghost { flex: none; padding: 6px 12px; }

.gen-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 8px 0 4px; }
.origin-tag { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; padding: 2px 10px; border-radius: 999px; color: var(--jade); background: var(--jade-soft); border: 1px solid rgba(63, 106, 92, .25); }
.origin-tag:empty { display: none; }
.order-note { font-size: 12px; color: var(--muted); }
.gen-note { margin: 2px 0 6px; font-size: 13px; color: var(--ink-2); }
.gen-notes p { margin: 2px 0 6px; font-size: 13px; color: var(--ink-2); }
.gen-notes p.notice { color: var(--notice); }
.cards-slot { margin: 10px 0 4px; }
.cards { display: grid; grid-template-columns: 1fr; gap: 12px; }
.cards.waiting { visibility: hidden; }
.gen-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: center; margin: 18px 0 6px; }
.gen-actions .btn-seal { min-width: 140px; }
.gen-hint { text-align: center; font-size: 12px; color: var(--muted); margin: 4px 0; }

/* 候选卡片 */
.card { position: relative; display: flex; flex-direction: column; border-radius: var(--radius); border: 1px solid var(--line);
  background: linear-gradient(rgba(252, 249, 242, .9), rgba(252, 249, 242, .9)), var(--tile); background-size: auto, 256px; box-shadow: var(--shadow);
  padding: 14px 14px 10px; transition: transform .2s, box-shadow .2s, border-color .2s; }
.card:hover { transform: translateY(-2px); border-color: var(--line-2); }
.card.picked { border-color: var(--zhu-line); box-shadow: 0 0 0 2px var(--zhu-soft), var(--shadow); }
.card-main { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 0; }
.card-name, .card-py { padding-right: 74px; }
.card-name, .card-py, .card-jp, .card-line, .card-ai { display: block; }
.card-name { font-family: var(--kai); font-size: 38px; line-height: 1.15; letter-spacing: .1em; color: var(--ink); white-space: nowrap; }
.card-name .sur { color: var(--ink-2); opacity: .7; }
.card-py { margin-top: 2px; font-size: 13px; color: var(--muted); letter-spacing: .04em; }
.card-jp { font-size: 12px; color: var(--faint); letter-spacing: .03em; }
.card-jp::before { content: "粤拼 "; font-size: 11px; }
.card-line { margin: 8px 0 0; font-family: var(--kai); font-size: 17px; line-height: 1.6; color: var(--ink-2); letter-spacing: .06em; }
mark { background: none; color: var(--zhu); }
.card-line mark, .quote mark, .cmp-table .q mark { background: linear-gradient(transparent 62%, rgba(207, 74, 55, .2) 62%); color: var(--zhu); padding: 0 1px; }
.card-ai { margin: 6px 0 0; font-size: 14px; color: var(--ink-2); line-height: 1.6; display: -webkit-box !important; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ai-label { display: inline-block; font-size: 11px; padding: 0 6px; margin-right: 6px; border-radius: 6px; color: var(--jade); background: var(--jade-soft); border: 1px solid rgba(63, 106, 92, .25); vertical-align: 1px; letter-spacing: .04em; }
.card-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 2px; }
.card-chips:empty { display: none; }
.src-chip { display: inline-flex; align-items: center; font-size: 12px; padding: 2px 9px; border-radius: 999px; color: var(--zhu); background: var(--zhu-soft); border: 1px solid var(--zhu-line); }
.src-chip.none { color: var(--muted); background: none; border-style: dashed; border-color: var(--line-2); }
.fact-chip { display: inline-flex; align-items: center; font-size: 12px; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--notice-line); color: var(--notice); background: var(--notice-bg); }
button.fact-chip { cursor: pointer; }
.card-acts { position: absolute; top: 10px; right: 10px; display: flex; gap: 4px; }
.mini-btn { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; border: 1px solid var(--line); background: rgba(251, 247, 239, .8);
  color: var(--muted); padding: 0; transition: color .15s, background .15s, border-color .15s; }
.mini-btn svg { width: 17px; height: 17px; }
.mini-btn[aria-pressed="true"] { color: var(--zhu); border-color: var(--zhu-line); background: var(--zhu-soft); }
.mini-btn.star[aria-pressed="true"] svg { fill: var(--zhu); }
.star-btn[aria-pressed="true"] { color: var(--zhu); border-color: var(--zhu-line); }
.star-btn[aria-pressed="true"] svg { fill: var(--zhu); }

.compare-bar { position: fixed; z-index: 16; right: calc(14px + env(safe-area-inset-right)); bottom: calc(12px + env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 14px; border-radius: 16px; background: rgba(31, 28, 26, .9); color: #f4ead8;
  box-shadow: 0 10px 26px -10px rgba(0, 0, 0, .55); font-size: 13px; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.compare-bar .icon-btn { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .18); color: #f4ead8; }
@media (max-width: 359px) { .compare-bar { bottom: calc(60px + env(safe-area-inset-bottom)); } }
/* 宿主的追问框：发送按钮用本页的朱砂色 */
.bg-chat-send { background: linear-gradient(160deg, var(--zhu-2), var(--zhu) 55%, #9c2d22) !important; color: #fbf1e3 !important; }

/* ---------- 单个名字报告 ---------- */
.report-stage { height: clamp(230px, 60vw, 300px); }
.rep-unsaved { text-align: center; font-size: 13px; color: var(--notice); margin: 0 0 10px; }
.rep-unsaved .link-btn { margin-left: 10px; }
.rep-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 4px 0 14px; }
.rep-chars { margin: 6px 0 0; }
.rep-block { margin: 0 0 12px; padding: 14px 16px; }
.rep-block h3, .rep-sec h3 { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 0 0 8px; font-family: var(--kai); font-weight: 400; font-size: 19px; letter-spacing: .16em; }
.rep-block h3::before, .rep-sec h3::before { content: ""; width: 9px; height: 9px; border-radius: 2px; background: var(--zhu); transform: rotate(45deg); flex: none; }
.char-rows { margin: 0; padding: 0; list-style: none; }
.char-row { display: flex; gap: 14px; align-items: flex-start; padding: 8px 0; border-top: 1px dashed var(--line); }
.char-row:first-child { border-top: 0; padding-top: 2px; }
.char-row .ch { flex: none; width: 1.25em; font-family: var(--kai); font-size: 36px; line-height: 1.15; text-align: center; color: var(--ink); }
.char-row.surname .ch { color: var(--ink-2); }
.cr-body { flex: 1; min-width: 0; padding-top: 4px; }
.cr-main { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; }
.cr-main .py { font-size: 17px; color: var(--ink); letter-spacing: .02em; }
.cr-main .jp, .cr-main .st, .cr-main .role { font-size: 13px; color: var(--muted); }
.cr-main .poly { font-size: 12px; color: var(--notice); }
/* 字形结构：每个字一行短句（「左右结构（木字旁＋「同」）」） */
.char-row .xs { display: block; margin-top: 1px; font-size: 13px; color: var(--ink-2); letter-spacing: .02em; font-feature-settings: "halt"; }
/* 声调白话：每个字下面一行（阳平·去声·阴平　平仄：平仄平（按普通话）），窄屏时在两段之间换行 */
.tone-line { display: flex; flex-wrap: wrap; gap: 0 1em; margin: 6px 0 0; padding: 8px 0 0; border-top: 1px dashed var(--line); font-size: 14px; color: var(--ink-2); letter-spacing: .04em; }
.tone-line span { white-space: nowrap; }
.tone-line span:first-child { color: var(--ink); }
.char-row .opts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.char-row .opts .chip { padding: 3px 12px; font-size: 13px; }
.sw { display: flex; gap: 8px; align-items: baseline; margin-top: 3px; font-size: 14px; color: var(--ink-2); }
.sw .raw { font-family: var(--naming-kai-tc); font-size: 15px; letter-spacing: .04em; }
.sw-l { flex: none; font-size: 11px; padding: 0 5px; border-radius: 5px; border: 1px solid var(--line-2); color: var(--muted); }
.src-label { margin: 0 0 4px; font-size: 13px; color: var(--zhu); }
/* 笔顺：「每个字」标题右侧一个小按钮；弹层里米字格逐笔书写 */
.bishun-btn { margin-left: auto; border: 1px solid var(--zhu-line); border-radius: 999px; background: var(--zhu-soft); color: var(--zhu);
  font-family: var(--serif); font-size: 12px; letter-spacing: .12em; padding: 2px 10px 2px 12px; line-height: 1.6; }
.bishun-btn:hover { background: rgba(181, 56, 43, .15); }
.bishun { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 4px 0 2px; }
.bishun-stage { width: 100%; }
.bishun-stage .empty { padding: 18px 10px; }
.bishun .nfx-w-box { border: 1px solid var(--zhu-line); background: linear-gradient(rgba(250, 244, 233, .92), rgba(250, 244, 233, .92)), var(--tile); background-size: auto, 256px;
  box-shadow: inset 0 0 0 3px rgba(251, 247, 239, .8), 0 6px 14px -10px rgba(64, 42, 18, .5); border-radius: 4px; }
.bishun .nfx-w-font { font-family: var(--kai); color: var(--ink); }
.nfx-w-cap { font-family: var(--kai); font-size: 16px; letter-spacing: .08em; color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.nfx-w-cap.none { font-family: var(--serif); font-size: 12px; letter-spacing: .04em; color: var(--muted); }
.bishun-ctl { display: flex; align-items: center; justify-content: center; gap: 10px; }
.bishun-ctl .btn-seal { min-width: 92px; }
.bishun-ctl .btn-ghost { padding: 8px 14px; }
.bishun-speed { margin: 0; justify-content: center; }
.bishun-speed .chip { padding: 4px 16px; }
.bishun-pro { text-align: center; margin: 0; }
@media (min-width: 720px) { .bishun .nfx-w-cell { flex-basis: 136px; } }
.notice-block.has { background: linear-gradient(rgba(250, 238, 214, .92), rgba(250, 238, 214, .92)), var(--tile); background-size: auto, 256px; border-color: var(--notice-line); }
.notice-block.has h3 { color: var(--notice); }
.notice-block.has h3::before { background: var(--notice); }
.notice-list { margin: 0; padding: 0; list-style: none; }
.notice-list li { position: relative; padding: 0 0 8px 16px; font-size: 14px; line-height: 1.7; }
.notice-list li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 6px; height: 6px; border-radius: 1px; background: var(--notice); transform: rotate(45deg); }
.all-clear { margin: 0; font-size: 14px; color: var(--ink-2); }
.notice-block:not(.has) h3 { color: var(--jade); }
.notice-block:not(.has) h3::before { background: var(--jade); }
.ai-block { padding: 10px 14px; }
.ai-block .ai-text { margin: 0; font-size: 15px; }
.more-facts { margin: 6px 0 0; }
.more-facts > summary { list-style: none; display: flex; align-items: baseline; justify-content: center; gap: 8px; flex-wrap: wrap; padding: 12px 10px; border-radius: 12px;
  border: 1px dashed var(--line-2); color: var(--ink-2); cursor: pointer; font-size: 15px; text-align: center; background: rgba(251, 247, 239, .55); }
.more-facts > summary::-webkit-details-marker { display: none; }
.more-facts > summary::after { content: ""; width: 7px; height: 7px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(45deg) translateY(-2px); }
.more-facts[open] > summary { margin-bottom: 12px; }
.more-facts[open] > summary::after { transform: rotate(-135deg); }
.more-facts .more-close { display: none; }
.more-facts[open] .more-open { display: none; }
.more-facts[open] .more-close { display: inline; }
.rep-sec { margin: 0 0 12px; }
.rep-sec h3 .sub { font-family: var(--serif); font-size: 12px; letter-spacing: .04em; color: var(--muted); flex-basis: 100%; }
.items { margin: 0; padding: 0; list-style: none; }
.items > li { padding: 8px 0; border-top: 1px dashed var(--line); font-size: 14px; line-height: 1.75; color: var(--ink-2); }
.items > li:first-child { border-top: 0; padding-top: 2px; }
.items > li.notice { color: var(--ink); }
.items > li.notice > .txt::before { content: "需留意"; display: inline-block; margin-right: 6px; padding: 0 6px; border-radius: 6px; font-size: 11px; line-height: 1.7;
  color: var(--notice); background: var(--notice-bg); border: 1px solid var(--notice-line); vertical-align: 1px; }
.items > li.sub-head { padding: 10px 0 0; border-top: 0; font-size: 12px; letter-spacing: .14em; color: var(--muted); }
.quote { margin: 6px 0 2px; padding: 8px 12px; border-left: 3px solid var(--zhu-line); background: rgba(233, 223, 202, .38); border-radius: 0 10px 10px 0;
  font-family: var(--kai); font-size: 18px; line-height: 1.7; letter-spacing: .06em; color: var(--ink); }
.quote .aid { display: block; margin-top: 2px; font-family: var(--serif); font-size: 13px; letter-spacing: .02em; color: var(--muted); }
.quote .aid small { font-size: 11px; color: var(--faint); }
.cite { display: block; font-size: 12px; color: var(--muted); }
.vm { position: relative; color: var(--zhu); font-size: 11px; margin-left: 2px; cursor: help; vertical-align: super; line-height: 0; }
.vm::after { content: ""; position: absolute; left: 50%; top: 50%; width: 32px; height: 32px; transform: translate(-50%, -50%); }
.vm-pop { position: absolute; z-index: 40; max-width: min(300px, calc(100vw - 16px)); padding: 8px 10px; border-radius: 10px; background: var(--ink); color: #f4ead8;
  font-size: 12px; line-height: 1.6; box-shadow: 0 8px 20px -8px rgba(0, 0, 0, .5); }
.ai-sec .ai-text { margin: 0 0 6px; font-size: 15px; color: var(--ink); }
.ai-sec .ai-meta { font-size: 12px; color: var(--muted); }
.checked-summary:empty { display: none; }
.checked-summary { margin: 14px 0 8px; padding: 10px 12px; border-radius: 12px; background: rgba(233, 223, 202, .5); border: 1px solid var(--line); font-size: 12px; color: var(--ink-2); line-height: 1.7; }

/* 专业标注：默认不显示 */
.pro-only { display: none !important; }
body.pro .pro-only { display: block !important; }
body.pro span.pro-only, body.pro a.pro-only { display: inline !important; }
.pro-box { margin: 6px 0 0; border-radius: 10px; border: 1px dashed var(--line-2); background: rgba(255, 255, 255, .35); font-size: 12px; color: var(--ink-2); }
.pro-box > summary { cursor: pointer; padding: 4px 10px; color: var(--jade); font-size: 12px; }
.pro-box dl { margin: 0; padding: 2px 10px 8px; display: grid; grid-template-columns: max-content 1fr; gap: 2px 10px; }
.pro-box dt { color: var(--muted); white-space: nowrap; }
.pro-box dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.pro-block { font-size: 12px; color: var(--ink-2); }
.pro-tag { display: inline-block; font-size: 11px; padding: 0 6px; margin: 0 4px; border-radius: 6px; color: var(--jade); background: var(--jade-soft); }
.pro-line { display: block; font-size: 12px; color: var(--jade); overflow-wrap: anywhere; }

/* ---------- 记录 ---------- */
.rec-list { display: flex; flex-direction: column; gap: 10px; margin: 6px 0 12px; }
.rec { position: relative; display: flex; align-items: stretch; gap: 10px; border-radius: var(--radius); border: 1px solid var(--line); background: rgba(251, 247, 239, .86); box-shadow: var(--shadow); }
.rec-open { flex: 1; min-width: 0; text-align: left; border: 0; background: none; padding: 12px 0 12px 14px; }
.rec-title { display: flex; align-items: baseline; gap: 8px; font-size: 16px; }
.rec-title b { font-family: var(--kai); font-weight: 400; font-size: 21px; letter-spacing: .08em; }
.rec-kind { font-size: 11px; padding: 0 7px; border-radius: 6px; border: 1px solid var(--line-2); color: var(--muted); }
.rec-kind.ai { color: var(--jade); border-color: rgba(63, 106, 92, .35); background: var(--jade-soft); }
.rec-names { display: block; margin-top: 2px; font-family: var(--kai); font-size: 16px; color: var(--ink-2); letter-spacing: .06em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rec-meta { display: block; font-size: 12px; color: var(--muted); }
.rec-date { white-space: nowrap; }
.rec-side { display: flex; flex-direction: column; justify-content: center; gap: 6px; padding: 8px 10px 8px 0; }
.rec-del.confirm { width: auto; padding: 0 10px; color: #fbf1e3; background: var(--zhu); border-color: var(--zhu); font-size: 12px; }
.rec.picked { border-color: var(--zhu-line); box-shadow: 0 0 0 2px var(--zhu-soft), var(--shadow); }
/* 备选：每行名字按这条记录的简繁用各自的楷体 */
.rec.sc { --kai: var(--naming-kai-sc), var(--extb); }
.rec.tc { --kai: var(--naming-kai-tc), var(--extb); }
.sl-hint { margin: 2px 0 8px; }
.sl-row .rec-title b { font-size: 26px; }
.sl-py { display: block; font-size: 13px; color: var(--muted); letter-spacing: .04em; }
.sl-meta { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; margin-top: 4px; }
.sl-meta .src-chip { font-size: 11px; padding: 1px 8px; }
.empty-sub { display: block; margin-top: 4px; font-size: 12px; color: var(--faint); }
@media (min-width: 720px) { #sl-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } #sl-list > .empty { grid-column: 1 / -1; } }
.empty { text-align: center; padding: 30px 10px; color: var(--muted); font-size: 14px; }
.empty b { display: block; font-family: var(--kai); font-weight: 400; font-size: 40px; color: var(--faint); opacity: .6; }

/* ---------- 底部 ---------- */
.site-foot { margin: 28px 0 0; padding: 14px 0 8px; border-top: 1px solid var(--line); text-align: center; }
.disclaimer { margin: 0 auto 10px; max-width: 640px; font-size: 12px; line-height: 1.75; color: var(--muted); }
.foot-row { display: flex; justify-content: center; align-items: center; gap: 18px; }
.pro-switch { margin: 0; font-size: 13px; align-items: center; }
.pro-switch input { margin: 0; }
.sources-panel { margin: 14px 0 0; text-align: left; }
.src-group { margin: 0 0 12px; }
.src-group h4 { margin: 0 0 6px; font-family: var(--kai); font-weight: 400; font-size: 17px; letter-spacing: .1em; }
.src-group p.lead { margin: 0 0 6px; font-size: 13px; color: var(--ink-2); }
.src-group ul { margin: 0; padding-left: 1.1em; font-size: 13px; line-height: 1.75; color: var(--ink-2); }
.src-group li .k { color: var(--muted); font-size: 12px; margin-left: 4px; }

/* ---------- 弹层 ---------- */
.sheet { position: fixed; inset: 0 auto 0 0; width: 100vw; z-index: 30;   /* 100vw：连保留的滚动条位置一起盖住 */ display: flex; align-items: flex-end; justify-content: center; background: rgba(28, 22, 16, .42);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); animation: fade .2s ease; }
.sheet-card { width: 100%; max-width: 720px; max-height: 88vh; display: flex; flex-direction: column; border-radius: 20px 20px 0 0;
  background: linear-gradient(rgba(251, 247, 239, .97), rgba(251, 247, 239, .97)), var(--tile); background-size: auto, 256px; box-shadow: 0 -10px 30px -12px rgba(0, 0, 0, .4);
  animation: rise .26s cubic-bezier(.2, .8, .25, 1); padding-bottom: env(safe-area-inset-bottom); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 14px 8px 18px; border-bottom: 1px solid var(--line); }
.sheet-head h3 { margin: 0; font-family: var(--kai); font-weight: 400; font-size: 20px; letter-spacing: .14em; }
.sheet-body { overflow: auto; padding: 14px 18px 20px; -webkit-overflow-scrolling: touch; }
@media (min-width: 720px) { .sheet { align-items: center; } .sheet-card { border-radius: 20px; } }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(30px); opacity: .4; } }
.toast { position: fixed; z-index: 50; left: 50%; top: calc(64px + env(safe-area-inset-top)); transform: translateX(-50%); max-width: min(92vw, 460px);
  padding: 10px 16px; border-radius: 12px; background: rgba(31, 28, 26, .92); color: #f4ead8; font-size: 14px; line-height: 1.6; text-align: center;
  box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .55); animation: fade .2s ease; }
/* 候选页：提示放在视图切换下面，不挡住切换（吸住时与没吸住时都不挡） */
#app[data-view="gen"] ~ .toast { top: calc(var(--bar-h, 56px) + 110px); }
.toast-act { margin-left: 12px; border: 0; background: none; padding: 2px 0; color: #f3c2a2; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }

/* 对比 */
.cmp-wrap { overflow-x: auto; margin: 0 -18px; padding: 0 18px; }
.cmp-table { border-collapse: separate; border-spacing: 0; min-width: 100%; font-size: 13px; line-height: 1.65; }
.cmp-table th, .cmp-table td { vertical-align: top; text-align: left; padding: 8px 10px; border-bottom: 1px dashed var(--line); }
.cmp-table thead th { border-bottom: 1px solid var(--line-2); }
.cmp-table tbody th { position: sticky; left: 0; z-index: 1; width: 4.6em; color: var(--muted); font-weight: 400; white-space: nowrap; background: rgba(247, 241, 230, .97); }
.cmp-table td { min-width: 168px; max-width: 260px; color: var(--ink-2); }
.cmp-table .cmp-name { font-family: var(--kai); font-size: 30px; font-weight: 400; letter-spacing: .08em; color: var(--ink); white-space: nowrap; }
.cmp-table .q { font-family: var(--kai); font-size: 15px; color: var(--ink); }
.cmp-table ul { margin: 0; padding-left: 1em; }
.cmp-table .cmp-line { display: block; }
.cmp-table .cmp-aside { display: block; font-size: 11px; color: var(--muted); white-space: nowrap; }
.cmp-table .cmp-line .raw { font-family: var(--kai); font-size: 15px; color: var(--ink); }
.cmp-note { margin: 10px 0 0; font-size: 12px; color: var(--muted); }
@media (max-width: 479px) {
  /* 滚动阴影：右边还有内容时显出一道阴影，滑到头时被随内容移动的纸色盖住 */
  .cmp-wrap { background: linear-gradient(to left, rgb(250, 246, 238) 40%, rgba(250, 246, 238, 0)) right / 22px 100% no-repeat local,
    linear-gradient(to left, rgba(64, 42, 18, .18), rgba(64, 42, 18, 0)) right / 12px 100% no-repeat scroll; }
  .cmp-table { font-size: 12px; }
  .cmp-table th, .cmp-table td { padding: 7px 6px; }
  .cmp-table tbody th { width: 3.4em; }
  .cmp-table td { min-width: 112px; max-width: 150px; }
  .cmp-table .cmp-name { font-size: 24px; }
  .cmp-table .q { font-size: 14px; }
}

/* 分享图预览 */
.share-preview { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.share-preview img { width: min(62vw, 300px); height: auto; border-radius: 12px; box-shadow: 0 12px 30px -12px rgba(0, 0, 0, .45); border: 1px solid var(--line); }
.share-preview .btns { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.share-preview p { margin: 0; font-size: 12px; color: var(--muted); text-align: center; }

/* 设置与表单弹层 */
.set-row { padding: 10px 0; border-bottom: 1px dashed var(--line); }
.set-row .switch { margin: 0; }
.set-row p { margin: 4px 0 0 26px; font-size: 12px; color: var(--muted); }
.ai-form .field input, .ai-form select { width: 100%; border: 1px solid var(--line-2); border-radius: 10px; background: rgba(255, 255, 255, .5); padding: 8px 10px; font-size: 14px; }
.ai-form .btns { display: flex; gap: 8px; margin-top: 4px; }
.ai-status { font-size: 13px; color: var(--ink-2); margin: 8px 0 0; }

/* ---------- 宽屏 ---------- */
@media (min-width: 640px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-title { font-size: 52px; }
}
@media (min-width: 900px) {
  .app[data-view="home"] .screen[data-screen="home"] { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 0 34px; align-items: start; }
  .screen[data-screen="home"] .hero { grid-row: 1 / span 3; display: flex; flex-direction: column; align-items: flex-start; padding-top: 40px; position: sticky; top: 70px; }
  .hero-copy { display: block; }
  .hero-seal { width: 96px; height: 96px; font-size: 64px; }
  .hero-title { font-size: 64px; }
  .hero-epigraph { flex-direction: column; gap: 4px; margin-top: 22px; padding-left: 14px; border-left: 2px solid var(--zhu-line); }
  .hero-epigraph .raw { font-size: 20px; letter-spacing: .16em; }
  .tabs { margin-top: 18px; }
  .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stage { height: 340px; }
  .report-stage { height: 300px; }
  .rep-chars { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 14px; align-items: start; }
  .rep-chars > .rep-block { grid-column: 1 / -1; }
  .rep-chars > #blk-chars { grid-column: 1; }
  .rep-chars > #blk-source { grid-column: 2; }
}

/* 首页入场：印章压下、标题如笔锋扫出、引句淡入（只在首次载入；系统减少动态效果时不播） */
@media (prefers-reduced-motion: no-preference) {
  .hero-seal { animation: seal-in .9s cubic-bezier(.2, .9, .25, 1.15) .2s both; }
  .hero-title { animation: brush-in 1.1s cubic-bezier(.3, .7, .2, 1) .05s both; }
  .hero-epigraph { animation: fade-up .8s ease .55s both; }
  .btn-seal::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
    background: linear-gradient(105deg, transparent 35%, rgba(255, 240, 220, .28) 50%, transparent 65%) -150% 0 / 220% 100% no-repeat; }
  .btn-seal:hover::after { animation: sheen-sweep .9s ease; }
}
.intro-done .hero-seal, .intro-done .hero-title, .intro-done .hero-epigraph { animation: none !important; }
@keyframes seal-in { 0% { transform: translateY(-30px) rotate(-16deg) scale(1.4); opacity: 0; } 55% { transform: translateY(0) rotate(-3deg) scale(.93); opacity: 1; }
  72% { transform: rotate(-5deg) scale(1.03); } 100% { transform: rotate(-4deg) scale(1); } }
@keyframes brush-in { from { clip-path: inset(0 100% 0 0); filter: blur(3px); } to { clip-path: inset(0 0 0 0); filter: blur(0); } }
@keyframes fade-up { from { opacity: 0; transform: translateY(8px); } }
@keyframes sheen-sweep { from { background-position: -150% 0; } to { background-position: 250% 0; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
@media print { .topbar, .site-foot, .compare-bar, .gen-actions, .rep-actions, .stage-btn { display: none !important; } }
