/* 设计 B：仅调整首页、产品设置、报告阅读，正文专题配色与业务控件保持原契约。 */
@font-face {
  font-family: "Ziwei Home Serif";
  src: url("/fonts/home-serif-sc.woff2") format("woff2");
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
}
@media screen {
  #home-view, body[data-view=home] .site-header {
    --serif: "Ziwei Home Serif", "Source Han Serif SC", "Noto Serif SC", "Songti SC", "STSong", serif;
  }
  /* 全站沿用已确认的首页调色与天体背景。 */
  .cosmos-image {
    background:
      radial-gradient(ellipse at 72% 38%,var(--theme-scene-haze, rgba(49,85,123,.18)),transparent 36%),
      radial-gradient(ellipse at 34% 42%,var(--theme-scene-haze, rgba(39,76,112,.16)),transparent 42%),
      linear-gradient(142deg,transparent 18%,var(--theme-scene-haze, rgba(66,94,130,.06)) 42%,var(--theme-scene-haze, rgba(53,86,119,.1)) 53%,transparent 75%),
      linear-gradient(165deg,var(--theme-scene-background, #071526) 0%,var(--theme-scene-background, #142b46) 49%,var(--theme-scene-background, #0b1b31) 100%);
    filter:none;
  }
  .cosmos-image::before {
    background:linear-gradient(90deg,transparent 4%,var(--theme-scene-haze, rgba(116,152,185,.04)) 29%,var(--theme-scene-haze, rgba(76,116,154,.08)) 48%,var(--theme-scene-haze, rgba(70,121,163,.05)) 70%,transparent 92%);
    opacity:.65;
  }
  #home-view { padding:126px max(24px,calc((100vw - 1160px)/2)) 70px; }
  #home-view .hero-copy { position:relative; padding-bottom:36px; }
  .hero-kicker { display:flex; align-items:center; gap:20px; margin:0 0 22px; color:var(--theme-text-accent, #d6c28e); font:12px var(--sans); letter-spacing:.18em; }
  .hero-kicker::before { content:""; display:block; width:28px; height:1px; background:var(--theme-icon-accent, #d6c28e); }
  .hero-kicker span { color:var(--theme-text-accent, #91a3be); font:10px Georgia,serif; letter-spacing:.2em; }
  #home-view .hero-copy h1 { font-size:clamp(48px,5.1vw,72px); line-height:1.25; letter-spacing:.04em; margin:0 0 20px; }
  #home-view .hero-copy > .eyebrow { max-width:480px; color:var(--theme-text-accent, #b9c7db); font:12px/1.9 var(--sans); letter-spacing:.02em; margin:18px 0; }
  #home-view .hero-copy h1 em { color:var(--theme-text-accent, #f5f0e1); }
  #home-view .hero-intro { font:16px/1.85 var(--serif); color:var(--theme-text-primary, #cad3e2); }
  .design-sample-link { border:0; border-bottom:1px solid var(--theme-border-subtle, #dfc58960); background:none; color:var(--theme-text-accent, #e8d3a0); padding:10px 0; margin-top:18px; font-size:13px; cursor:pointer; }
  .design-sample-link span { margin-left:28px; }
  #home-view .home-products { margin-top:4px; padding-top:0; border-top:0; }
  #home-view .selection-heading { margin-bottom:20px; }
  #home-view .selection-heading h2 { font-size:21px; letter-spacing:.06em; }
  #home-view .selection-heading p { font-size:12px; color:var(--theme-text-secondary, #b1c0d4); }
  #home-view .product-grid { gap:18px; }
  #home-view .product-card { min-height:270px; padding:25px; border-radius:10px; border-color:var(--theme-border-entry, #b8c7dc36); background:linear-gradient(140deg,var(--theme-surface-card, #383733cc),var(--theme-surface-card, #2a2b2ccc)); backdrop-filter:none; box-shadow:inset 0 1px 0 var(--theme-shadow-panel, #ffffff09); }
  #home-view .product-card::before { width:168px; height:168px; right:-78px; top:-70px; }
  #home-view .product-card:hover { transform:translateY(-3px); background:linear-gradient(140deg,var(--theme-surface-selected, #403f3bdd),var(--theme-surface-selected, #313233dd)); border-color:var(--theme-border-accent, #dec58c99); box-shadow:0 16px 45px var(--theme-shadow-panel, #020b1826); }
  #home-view .product-card .number { font:11px var(--sans); color:var(--theme-text-secondary, #adc0d9) !important; }
  #home-view .product-card .icon { width:46px; height:46px; border-color:var(--theme-border-entry, #b8a67870); }
  #home-view .card-top { margin-bottom:25px; }
  #home-view .product-card strong { font-size:23px; font-weight:500; }
  #home-view .product-card .icon { font-size:15px; white-space:nowrap; }
  #home-view .product-entry-chevron { display:none; }
  #home-view .card-question { color:var(--theme-text-accent, #e2cd9e); font-size:14px; }
  #home-view .product-card small { font-size:13px; color:var(--theme-text-secondary, #b4c3d7); line-height:1.85; }
  #home-view .card-action { padding-top:22px; font-size:12px; }
  #home-view .profiles-shortcut { position:relative; overflow:hidden; margin-top:18px; border-radius:10px; background:var(--theme-surface-library, #10223b50); padding:20px 25px; border-color:var(--theme-border-subtle, #b8c7dc36); }
  #home-view .profiles-shortcut::before { content:""; position:absolute; width:168px; height:168px; left:-78px; top:-70px; border:1px solid var(--theme-border-subtle, rgba(190,147,67,.22)); border-radius:50%; box-shadow:0 0 0 18px var(--theme-shadow-decoration, rgba(190,147,67,.035)),0 0 0 40px var(--theme-shadow-decoration, rgba(190,147,67,.025)); pointer-events:none; }
  #home-view .profiles-shortcut > span { position:relative; }
  #home-view .profiles-shortcut .shortcut-glyph { display:grid; place-items:center; flex:0 0 42px; width:42px; height:42px; border:1px solid var(--theme-border-subtle, #b8a67870); border-radius:50%; font-size:21px; line-height:1; }
  #home-view .profiles-shortcut strong { font-size:15px; }
  #home-view .profiles-shortcut small { font-size:12px; }
  #home-view .profiles-shortcut #home-profiles-action { display:inline-flex; align-items:center; justify-content:center; flex:0 0 auto; min-height:36px; padding:6px 8px; border:inherit; border-radius:6px; font:400 15px/1.4 var(--sans); white-space:nowrap; }
  #home-view .profiles-shortcut[data-profile-state="guest"] #home-profiles-action { color:var(--theme-text-accent, var(--gold-bright)); }
  #home-view .capability-details { margin-top:18px; }
  #home-view .capability-details .design-sample-link { min-height:44px; margin-top:12px; font-size:13px; }
  /* 设置页：将资料与产品参数分区；短产品表单保持自然宽度。 */
  #configure-view { padding:72px max(24px,calc((100vw - 1040px)/2)) 100px; }
  #configure-view > .text-back { font-size:13px; color:var(--theme-text-secondary, #aebed4); }
  .design-steps { display:flex; gap:0; list-style:none; padding:0; margin:28px 0 32px; font-size:12px; color:var(--theme-text-secondary, #9aacbf); }
  .design-steps li { display:flex; align-items:center; gap:9px; }
  .design-steps li + li::before { content:""; width:48px; height:1px; background:var(--theme-surface-decoration, #b4bfd733); margin:0 20px; }
  .design-steps span { display:grid; place-items:center; width:26px; height:26px; border:1px solid var(--theme-border-subtle, #a7b9d247); border-radius:50%; font:11px Georgia,serif; }
  .design-steps [aria-current] { color:var(--theme-text-accent, #ead39c); }
  .design-steps [aria-current] span { background:var(--theme-surface-selected, #e8ce92); color:var(--theme-text-accent, #1a263c); border-color:var(--theme-border-accent, #e8ce92); }
  #configure-view .configure-heading { margin:0 0 28px; padding:0 0 24px; }
  #configure-view .configure-heading .eyebrow { display:none; }
  #configure-view .configure-heading h1 { font-size:36px; margin:0 0 12px; }
  #configure-view .configure-heading > p { font-size:14px; margin:0; color:var(--theme-text-secondary, #becade); }
  #configure-view .consultation-form { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.14fr); align-items:start; gap:24px; }
  #configure-view .consultation-form:has(#report-options-panel[hidden]) { grid-template-columns:1fr; }
  #configure-view .case-panel { padding:24px; margin:0; border:1px solid var(--theme-border-subtle, #b8c7dc36); border-radius:12px; background:var(--theme-surface-card, #10223b60); min-width:0; }
  .design-panel-label { display:flex; justify-content:space-between; gap:12px; flex-wrap:wrap; padding-bottom:22px; margin-bottom:20px; border-bottom:1px solid var(--theme-border-subtle, #b8c7dc26); font-weight:600; }
  .design-panel-label > span { font-size:12px; color:var(--theme-text-accent, #e5ce9a); letter-spacing:.08em; }
  .design-panel-label small { font-size:11px; color:var(--theme-text-secondary, #afbdd0); }
  #configure-view .profile-selector { margin-bottom:18px; }
  #configure-view .profile-selector h2 { font-size:19px; }
  #configure-view .profile-choice { border-radius:8px; background:var(--theme-surface-card, #0b1d3459); transition:border-color .2s,background .2s; }
  #configure-view .profile-choice.selected { border-color:var(--theme-border-accent, #dfc183); background:var(--theme-surface-selected, #d3b57414); }
  #configure-view .profile-choice label { padding:16px; }
  #configure-view .profile-choice small { font-size:12px; }
  #configure-view .add-profile { border-style:dashed; font-size:13px; background:transparent; }
  #configure-view .case-name-details summary { font-size:12px; }
  #configure-view .case-name-details .edit-name { display:inline-block; }
  #configure-view .form-panel { margin:0; border:1px solid var(--theme-border-subtle, #b8c7dc36); border-radius:12px; padding:24px; background:var(--theme-surface-card, #10223b60); }
  #configure-view .panel-title { align-items:baseline; }
  #configure-view .panel-title h2 { font-size:19px; letter-spacing:0; }
  #configure-view .panel-title p { font-size:12px; margin-bottom:0; }
  #configure-view .option-section h3 { font-size:15px; }
  #configure-view .policy-note { font-size:12px; }
  #configure-view .check-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  #configure-view .line-field { grid-template-columns:1fr; gap:10px; }
  #configure-view .choice-chip span { min-height:44px; padding:12px; font-size:13px; }
  #configure-view .generate-row { grid-column:1 / -1; margin:0; border-top:1px solid var(--theme-border-subtle, #b8c7dc26); background:linear-gradient(0deg,var(--theme-surface-navigation, #0c1a30e8),var(--theme-surface-navigation, #0c1a3080)); padding:18px 0; }
  #configure-view .generate-row p { font-size:12px; max-width:480px; }
  #configure-view .gold-button { min-width:250px; border-radius:8px; }
  #configure-view .consultation-form:has(#report-options-panel[hidden]) #profile-selectors:has([data-new-side=male]) { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:24px; }
  /* 阅读页：深蓝书桌、浅色正文、桌面侧目录；专题原色及人物框不变。 */
  body[data-view=report] .site-header { background:var(--theme-surface-navigation, #0c182beb); border-color:var(--theme-border-subtle, #c6ab6826); }
  body[data-view=report] .site-header .brand strong { color:var(--theme-text-primary, #f5eee0); }
  body[data-view=report] .site-header :is(.brand small,.brand-seal) { color:var(--theme-text-accent, #dcc48d); border-color:var(--theme-border-entry, #dcc48d); }
  body[data-view=report] .site-header nav button { color:var(--theme-text-secondary, #b8c6d9); }
  body[data-view=report] .site-header nav button[aria-current] { color:var(--theme-text-accent, #eedaa5); border-color:var(--theme-border-accent, #dcc48d); }
  body[data-view=report] .site-header .local-mark { color:var(--theme-text-secondary, #b8c6d9); }
  #report-view { background:transparent; padding:150px 28px 110px; }
  #report-view .report-toolbar { max-width:1180px; margin-bottom:22px; }
  #report-view .report-toolbar .text-back { color:var(--theme-text-secondary, #b9c7db); }
  #report-view .report-toolbar .outline-button { color:var(--theme-text-accent, #dec88f); border-color:var(--theme-border-entry, #bba27277); background:var(--theme-surface-card, #15243a50); }
  .reading-layout { display:grid; grid-template-columns:220px minmax(0,1fr); align-items:start; gap:34px; max-width:1180px; margin:auto; }
  .reading-rail { position:sticky; top:142px; max-height:calc(100dvh - 238px); overflow-y:auto; scrollbar-width:thin; scrollbar-color:var(--theme-border-control, #788498) transparent; color:var(--theme-text-primary, #d4dcea); padding:8px 0 20px; }
  .reading-rail-label { margin:0 0 12px; font:10px Georgia,serif; color:var(--theme-text-accent, #d3bd8b); letter-spacing:.15em; }
  .reading-rail h2 { font:25px var(--serif); font-weight:400; color:var(--theme-text-primary, #ede6d6); margin:0 0 26px; }
  #reading-rail-links { display:grid; gap:4px; }
  #reading-rail-links a { display:grid; grid-template-columns:20px 1fr; gap:12px; padding:12px 10px; border-left:2px solid transparent; border-radius:0 6px 6px 0; color:var(--theme-text-secondary, #b9c7d9); text-decoration:none; font:12px/1.6 var(--sans); }
  #reading-rail-links a > span:first-child { font:11px/1.8 Georgia,serif; color:var(--theme-text-accent, #a79a7c); }
  #reading-rail-links a:hover,#reading-rail-links a[aria-current] { color:var(--theme-text-accent, #f1dba4); border-color:var(--theme-border-accent, #d5bb7e); background:var(--theme-surface-selected, #ddc2810e); }
  #reading-rail-links .directory-depth-1 { font-weight:600; margin-top:10px; }
  #reading-rail-links .directory-depth-2 { padding-block:7px; line-height:1.7; }
  #reading-rail-links a > span:last-child { min-width:0; overflow-wrap:anywhere; }
  #reading-rail-links a:focus-visible { outline:2px solid var(--theme-border-accent, #d5bb7e); outline-offset:-2px; }
  #report-view #report-directory .directory-depth-1 { font-weight:600; }
  #report-view #report-directory .directory-depth-2 { padding-left:28px; border-color:transparent; font-weight:400; }
  #report-directory [data-reading-target] > span { min-width:0; overflow-wrap:anywhere; }
  #report-view .report-topic-anchor { scroll-margin-top:142px; }
  #reading-rail-chart { color:var(--theme-text-accent, #e2ce9e); border:0; border-top:1px solid var(--theme-border-subtle, #b8c7dc33); background:none; text-align:left; padding:20px 10px 0; margin-top:16px; width:100%; font-size:12px; cursor:pointer; }
  #report-view .report-paper { min-width:0; min-height:0; width:100%; padding:48px clamp(24px,4vw,64px); border-radius:10px; background:#fffdf8; box-shadow:0 24px 80px #0003; }
  #report-view .report-cover { min-height:0; padding:36px 0; text-align:left; border-top:1px solid #bba274; border-bottom:1px solid #d7c8a9; }
  #report-view .report-cover h1 { font-size:34px; letter-spacing:.03em; margin:22px 0; line-height:1.5; }
  #report-view .report-cover .eyebrow { font:11px var(--sans); letter-spacing:.16em; }
  #report-view .report-meta { justify-content:flex-start; gap:10px 18px; line-height:1.8; color:#777162; font-size:11px; }
  #report-view .report-section { scroll-margin-top:142px; }
  #report-view .report-bottom-bar { background:var(--theme-surface-card, #101e33f5); border-color:var(--theme-border-subtle, #bba27244); }
  #report-view .report-bottom-bar > button { color:var(--theme-text-accent, #dcc797); border-color:var(--theme-border-subtle, #bba27266); }
  #report-view .report-bottom-bar > .gold-button { color:var(--theme-text-primary, #32280f); }
  #report-view .audit-panel { background:#fffdf8; max-width:1180px; margin:24px auto; }
  .design-sample-note { max-width:1180px; margin:0 auto 22px; color:var(--theme-text-secondary, #b7c4d7); font-size:12px; line-height:1.8; padding-left:12px; border-left:2px solid var(--theme-border-subtle, #c4a773); }
}
@media screen and (max-width:980px) {
  #home-view { padding-inline:24px; }
  #home-view .product-card { padding:20px; }
  #home-view .product-card strong { font-size:20px; }
  .reading-layout { grid-template-columns:180px minmax(0,1fr); gap:22px; }
  #configure-view .consultation-form { grid-template-columns:1fr; }
}
/* 本命／合婚中等屏宽先保留正文空间；981px 起继续显示原桌面侧目录。 */
@media screen and (min-width:681px) and (max-width:980px) {
  #report-view:has(:is(.report-paper-natal,.report-paper-marriage-compatibility)) .reading-layout { display:block; }
  #report-view:has(:is(.report-paper-natal,.report-paper-marriage-compatibility)) .reading-rail { display:none; }
}
@media screen and (max-width:680px) {
  /* 顶部内容限定在首页卡片的 32px 左右边界内。 */
  .site-header { padding-inline:32px; }
  .site-header .brand { min-height:44px; gap:8px; }
  .site-header .brand > span:last-child { gap:0; }
  .site-header .brand strong { font-size:12px; line-height:16px; }
  .site-header nav button { font-size:12px; }
  .cosmos-vignette {
    background:linear-gradient(90deg,var(--theme-scene-vignette, rgba(2,8,21,.22)),var(--theme-scene-vignette, rgba(3,10,24,.03)) 50%,var(--theme-scene-vignette, rgba(3,9,22,.12))),linear-gradient(0deg,var(--theme-scene-vignette, rgba(3,8,20,.22)),transparent 35%);
  }
  #home-view { padding:74px 20px 106px; }
  #home-view .hero-copy { display:flex; width:calc(100% - 24px); padding:0; margin-inline:12px; }
  #home-view .hero-kicker { order:-1; margin:0 0 12px; font-size:10px; gap:12px; }
  .hero-kicker span { font-size:8px; }
  #home-view .hero-copy h1 { margin:0; font-size:25px; line-height:1.28; }
  #home-view .hero-copy > .eyebrow { margin:10px 0 0; font-size:12px; line-height:1.85; color:var(--theme-text-accent, #cad6e2); }
  #home-view .home-products { margin-top:18px; padding-top:0; }
  #home-view .selection-heading { display:flex; align-items:baseline; gap:10px; margin-bottom:12px; }
  #home-view .selection-heading h2 { font-size:17px; margin:0; }
  #home-view .selection-heading p { font-size:10px; }
  #home-view .product-grid { gap:12px; margin-inline:12px; }
  #home-view .product-card { min-height:80px; padding:12px 17px; grid-template-columns:minmax(0,1fr) 42px; gap:6px 16px; border-color:var(--theme-border-entry, #cbb074); }
  #home-view .product-card:hover { border-color:var(--theme-border-accent, #e3c789); }
  #home-view .product-card strong { grid-column:1; font-size:19px; }
  #home-view .product-card .icon { grid-column:2; width:42px; height:42px; font-size:15px; }
  #home-view .product-card .product-glyph { display:none; }
  #home-view .product-entry-chevron { display:block; width:16px; height:16px; fill:none; stroke:currentColor; stroke-width:1.6; stroke-linecap:round; stroke-linejoin:round; }
  #home-view .card-question { grid-column:1; font-size:12px; }
  #home-view .profiles-shortcut, #home-view .capability-details { width:calc(100% - 24px); margin-inline:12px; }
  #home-view .profiles-shortcut { padding:18px 17px; gap:8px; background:var(--theme-surface-library, #203c43); border-color:var(--theme-border-subtle, #678884); color:var(--theme-text-primary, #e4eee6); }
  #home-view .profiles-shortcut > span:nth-child(2) { min-width:0; gap:4px; }
  #home-view .profiles-shortcut strong { font:500 15px/1.45 var(--serif); color:var(--theme-text-primary, #e4eee6); }
  #home-view .profiles-shortcut small { font:400 13px/1.6 var(--sans); color:var(--theme-text-secondary, #c4deda); text-wrap:balance; }
  #home-view .profiles-shortcut #home-profiles-action { padding-inline:6px; }
  #home-view .capability-details > summary { min-height:48px; padding:14px 16px; border:1px solid var(--theme-border-subtle, #708eb7); border-radius:10px; background:var(--theme-surface-card, #12233ed9); color:var(--theme-text-secondary, #d8e3f1); }
  #configure-view { padding:58px 18px 76px; }
  .design-steps { justify-content:space-between; margin:24px 0 28px; font-size:10px; gap:6px; }
  .design-steps span { width:22px; height:22px; font-size:10px; }
  .design-steps li { gap:6px; }
  .design-steps li + li::before { display:none; }
  #configure-view .configure-heading { margin-bottom:22px; padding-bottom:20px; }
  #configure-view .configure-heading h1 { font-size:27px; line-height:1.5; }
  #configure-view .configure-heading > p { font-size:13px; }
  #configure-view .consultation-form { gap:18px; }
  #configure-view .case-panel,#configure-view .form-panel { padding:20px 16px; }
  .design-panel-label { padding-bottom:16px; margin-bottom:18px; gap:8px; }
  .design-panel-label > span { font-size:11px; }
  .design-panel-label small { font-size:10px; }
  #configure-view .generate-row { padding:14px 0 max(14px,env(safe-area-inset-bottom)); }
  #configure-view .gold-button { min-width:0; }
  #report-view { padding:118px 14px 100px; }
  #report-view .report-toolbar { margin-bottom:18px; }
  #report-view .report-toolbar .text-back { font-size:12px; }
  #report-view .report-toolbar > div { gap:7px; }
  .reading-layout { display:block; }
  .reading-rail { display:none; }
  #report-view .report-paper { padding:26px 16px; border-radius:8px; }
  #report-view .report-cover { padding:22px 0 28px; }
  #report-view .report-cover h1 { font-size:26px; margin:18px 0; }
  #report-view .report-meta { flex-direction:column; gap:5px; }
  #report-view .report-section { scroll-margin-top:112px; }
  #report-view .report-topic-anchor { scroll-margin-top:112px; }
  #report-view .customer-profile { padding:20px 14px; }
  .design-sample-note { font-size:11px; margin-bottom:18px; }
}
@media screen and (max-width:360px) {
  #home-view .profiles-shortcut { padding-inline:12px; gap:6px; }
  #home-view .profiles-shortcut .shortcut-glyph { flex-basis:32px; width:32px; height:32px; }
  #home-view .profiles-shortcut strong { font-size:14px; }
}
@media screen and (max-width:600px) {
  #configure-view .consultation-form:has(#report-options-panel[hidden]) #profile-selectors:has([data-new-side=male]) { grid-template-columns:1fr; gap:8px; }
}
@media (prefers-reduced-motion:reduce) {
  #home-view .product-card { transition:none; }
}
@media print {
  .reading-rail,.design-sample-note,.design-sample-link { display:none !important; }
  .reading-layout { display:block; }
}
@media screen and (min-width:981px) {
  #home-view.active { display:grid; grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr); gap:0 72px; align-items:start; align-content:start; }
  #home-view .hero-copy { grid-column:1; grid-row:1 / 3; padding:34px 0 0; }
  #home-view .hero-copy h1 { font-size:clamp(46px,4.6vw,64px); margin-top:30px; }
  #home-view .hero-copy > .eyebrow { max-width:370px; }
  #home-view .home-products { grid-column:2; grid-row:1; margin:0; padding:0; border:0; }
  #home-view .product-grid { grid-template-columns:1fr; gap:14px; }
  #home-view .product-card { display:grid; grid-template-columns:46px minmax(0,1fr); gap:7px 22px; min-height:146px; padding:22px; }
  #home-view .card-top { display:contents; }
  #home-view .product-card .number,#home-view .card-action { display:none; }
  #home-view .product-card .icon { grid-column:1; grid-row:1 / 4; align-self:center; }
  #home-view .product-card strong { grid-column:2; margin:0; font-size:21px; }
  #home-view .card-question { grid-column:2; margin:0; font-size:13px; }
  #home-view .product-card small { grid-column:2; font-size:12px; line-height:1.7; }
  #home-view .profiles-shortcut { grid-column:2; grid-row:2; }
  #home-view .capability-details,#home-view .culture-disclaimer { grid-column:1 / -1; }
  #home-view .capability-details { margin-top:34px; border-top:1px solid var(--theme-border-subtle, #b8c7dc26); padding-top:8px; }
}
@media screen {
  /* 进入动画的 transform 会把 fixed 目录和底栏绑在长报告上，阅读页取消该动画。 */
  #report-view.active { animation:none; }
}

/* 所选命盘的真实大限与流年，复用既有排盘结果。 */
.yearly-chart-context { margin:20px 0; min-width:0; }
.yearly-chart-context > p { color:var(--theme-text-secondary, #c5d4e2); font-size:14px; line-height:1.7; }
.yearly-chart-context .decade-guide { margin:0; }
.decade-year.selected { border-color:var(--theme-border-accent, var(--gold-bright)); background:var(--theme-surface-selected, #344856); color:var(--theme-text-accent, #fff); }
.yearly-chart-context .eyebrow { display:none; }
.yearly-chart-context .decade-year.selected small { color:var(--theme-text-accent, #d6e0e9); }

/* 内页紧凑布局：限定内页容器，首页及共用页头不参与。 */
@media screen {
  #configure-view .profile-choice-actions { display:flex; align-items:center; flex-shrink:0; padding-right:8px; }
  #configure-view .profile-choice-actions button { min-width:44px; min-height:36px; padding:6px; border:0; background:none; color:var(--theme-text-accent, var(--gold-bright)); font-size:12px; cursor:pointer; }
  #configure-view .check-grid { display:grid; gap:8px; }
  #configure-view .choice-chip span { display:flex; align-items:center; justify-content:center; height:100%; text-align:center; }
  #configure-view .choice-chip input:focus-visible + span { outline:2px solid var(--theme-border-accent, var(--gold-bright)); outline-offset:2px; }
}
@media screen and (max-width:680px) {
  #configure-view, #birth-view, #review-view, #chart-view, #info-view { padding:16px 16px 64px; }
  #profiles-view, #mine-view, #library-view { padding:82px 16px 88px; }
  :is(#configure-view,#birth-view,#review-view,#chart-view,#info-view) > .text-back { min-height:36px; padding:6px 0; margin:0; font-size:12px; }
  #configure-view .design-steps { margin:12px 0 16px; }
  #configure-view .configure-heading { padding-bottom:12px; margin:0 0 14px; }
  #configure-view .configure-heading h1 { font-size:23px; margin:0 0 6px; line-height:1.4; }
  #configure-view .configure-heading > p { font-size:12px; line-height:1.6; }
  #configure-view .consultation-form { grid-template-columns:minmax(0,1fr); gap:14px; }
  #configure-view :is(.case-panel,.form-panel) { min-width:0; padding:12px; border-radius:10px; }
  #configure-view .design-panel-label { padding-bottom:4px; margin-bottom:4px; gap:4px; }
  #configure-view .profile-selector { margin-bottom:0; }
  #configure-view .profile-selector h2 { font-size:15px; margin:0 0 8px; }
  #configure-view .profile-choice { gap:4px; margin:8px 0; }
  #configure-view .profile-choice label { padding:9px 6px 9px 10px; gap:8px; }
  #configure-view .profile-choice label > span { gap:3px; }
  #configure-view .profile-choice strong { font-size:13px; line-height:1.5; }
  #configure-view .profile-choice small { font-size:11px; line-height:1.5; }
  #configure-view .profile-choice input { width:15px; height:15px; }
  #configure-view .add-profile { min-height:40px; padding:8px; font-size:12px; }
  #configure-view .case-name-details { margin:10px 0 0; padding:8px 0 0; }
  #configure-view .case-name-details summary { font-size:11px; line-height:1.6; }
  #configure-view .panel-title { padding-bottom:8px; margin-bottom:10px; }
  #configure-view .panel-title h2 { font-size:16px; }
  #configure-view .panel-title p { font-size:11px; line-height:1.6; }
  #configure-view .option-section { padding:4px 0 12px; }
  #configure-view .option-section + .option-section { padding-top:12px; }
  #configure-view .option-section :is(h3,h4) { margin:0 0 8px; font-size:13px; }
  #configure-view .line-field { gap:6px; }
  #configure-view .line-field > span { font-size:13px; }
  #configure-view .line-field :is(input,select) { min-height:40px; padding:8px 10px; font-size:16px; }
  #configure-view .choice-chip span { min-height:40px; padding:8px 6px; font-size:12px; }
  #configure-view .policy-note { margin:7px 0 0; font-size:11px; line-height:1.65; }
  #configure-view .generate-row { padding:8px 0 max(8px,env(safe-area-inset-bottom)); }
  :is(#configure-view,#birth-view,#review-view) .gold-button { min-height:44px; padding:10px 16px; font-size:15px; }
  :is(#birth-view,#review-view) :is(.step-action,.entry-action) { padding:8px 0 max(8px,env(safe-area-inset-bottom)); }

  /* 七个大限与十个流年各占一行；其余大限可横向滚动。 */
  #configure-view .yearly-chart-context { margin:4px 0 14px; }
  #configure-view .yearly-chart-context > p { font-size:11px; line-height:1.6; margin:0 0 8px; }
  #yearly-decade-guide { padding:0 0 6px; border:0; border-radius:0; background:none; box-shadow:none; backdrop-filter:none; }
  #yearly-decade-guide .decade-guide-heading { margin-bottom:8px; gap:4px; }
  #yearly-decade-guide .decade-guide-heading h2 { font-size:15px; letter-spacing:0; }
  #yearly-decade-guide .decade-guide-heading > p { font-size:10px; line-height:1.5; color:var(--theme-text-secondary, #b9c7da); }
  #yearly-decade-guide .timeline-row { display:block; padding:6px 0; }
  #yearly-decade-guide .timeline-row-label { display:flex; align-items:center; min-height:0; border:0; padding:0; gap:6px; margin-bottom:5px; }
  #yearly-decade-guide .timeline-row-label span { font:12px var(--sans); letter-spacing:0; }
  #yearly-decade-guide .timeline-row-label small { font-size:9px; color:var(--theme-text-secondary, #acbfd2); letter-spacing:0; }
  #yearly-decade-guide .decade-range-list { grid-auto-columns:calc((100% - 18px)/7); gap:3px; padding:0 0 4px; }
  #yearly-decade-guide .decade-range { min-height:72px; padding:14px 1px 4px; border-radius:5px; gap:3px; text-align:center; }
  #yearly-decade-guide .decade-ganzhi { font:10px/1.2 var(--serif); letter-spacing:0; white-space:nowrap; }
  #yearly-decade-guide .decade-years-range { font:9px/1.2 var(--sans); }
  #yearly-decade-guide .decade-years-range > span { display:block; }
  #yearly-decade-guide .decade-years-range .range-separator { display:none; }
  #yearly-decade-guide .decade-range small { font-size:8px; line-height:1.2; color:var(--theme-text-secondary, #c0ccdc); overflow-wrap:anywhere; }
  #yearly-decade-guide .decade-range em { top:2px; right:2px; font-size:8px; }
  #yearly-decade-guide .selected-decade-panel { padding:0; }
  #yearly-decade-guide .selected-decade-meta { margin:0 0 6px; }
  #yearly-decade-guide .selected-decade-meta > div { gap:6px; flex-wrap:wrap; }
  #yearly-decade-guide .selected-decade-meta strong { font-size:11px; letter-spacing:0; }
  #yearly-decade-guide .selected-decade-meta span { font-size:9px; color:var(--theme-text-accent, #b9c7da); }
  #yearly-decade-guide .decade-year-grid { grid-template-columns:repeat(10,minmax(0,1fr)); gap:2px; padding:0; overflow:visible; }
  #yearly-decade-guide .decade-year { min-width:0; min-height:42px; padding:6px 0; border-radius:4px; gap:4px; text-align:center; }
  #yearly-decade-guide .decade-year strong { font:9px/1 var(--sans); }
  #yearly-decade-guide .decade-year small { font-size:8px; color:var(--theme-text-secondary, #b9c7da); white-space:nowrap; }
  #yearly-decade-guide .decade-year.current small { color:var(--theme-text-accent, #514121); }
  #yearly-decade-guide .decade-year.selected small { color:var(--theme-text-accent, #e2eaf2); }

  /* 完整十二宫直接适配可用宽度，不隐藏星曜或依赖横向拖动。 */
  #chart-view { padding-inline:10px; }
  #chart-view .workflow-heading { margin:4px 0 10px; }
  #chart-view .workflow-heading h1 { font-size:20px; margin:4px 0; }
  #chart-view .workflow-heading p { font-size:11px; margin:4px 0; }
  #chart-view :is(#chart-status,#chart-person-tabs):empty { display:none; }
  #chart-view .natal-chart-section { padding:6px; margin:0; border-radius:10px; }
  #chart-view .natal-chart-heading { margin:2px 0 7px; }
  #chart-view .natal-chart-heading .eyebrow { display:none; }
  #chart-view .natal-chart-heading h2 { font-size:14px; letter-spacing:0; }
  #chart-view .natal-chart-scroll { overflow:visible; padding:0; }
  #chart-view .natal-chart-grid { min-width:0; grid-template-columns:repeat(4,minmax(0,1fr)); grid-template-rows:repeat(4,minmax(108px,auto)); gap:3px; padding:0; border:0; border-radius:0; }
  #chart-view .natal-palace { padding:4px; gap:3px; border-radius:5px; overflow:visible; }
  #chart-view .natal-palace-head { gap:3px; flex-wrap:wrap; padding-bottom:4px; }
  #chart-view .natal-palace-head strong { font-size:12px; line-height:1.2; letter-spacing:0; }
  #chart-view .natal-palace-head small { font-size:9px; }
  #chart-view .natal-palace-head em { font-size:7px; padding:1px 2px; }
  #chart-view .natal-star-row { display:block; }
  #chart-view .natal-star-row > b { display:block; font-size:7px; line-height:1.1; padding:0; margin-bottom:2px; color:var(--theme-text-secondary, #a9bfbd); }
  #chart-view .natal-star-row > span { gap:3px 4px; }
  #chart-view .natal-star { font-size:9px; line-height:1.1; gap:1px; }
  #chart-view .natal-major-stars .natal-star { font-size:10px; }
  #chart-view .natal-adjective-stars .natal-star { font-size:8px; color:var(--theme-text-secondary, #b2c6ce); }
  #chart-view .natal-star-row i { font-size:9px; color:var(--theme-text-secondary, #b2c6ce); }
  #chart-view .natal-star small { font-size:7px; }
  #chart-view .natal-star em { min-width:11px; height:11px; font-size:7px; }
  #chart-view .natal-chart-center { padding:8px; border-radius:5px; }
  #chart-view .natal-chart-center > p { font-size:8px; letter-spacing:0; }
  #chart-view .natal-chart-center h3 { margin:8px 0 12px; font-size:16px; letter-spacing:0; overflow-wrap:anywhere; }
  #chart-view .natal-chart-center dl { gap:7px; }
  #chart-view .natal-chart-center dl div { padding-top:4px; }
  #chart-view .natal-chart-center dt { font-size:8px; letter-spacing:0; }
  #chart-view .natal-chart-center dd { font-size:9px; line-height:1.5; margin-top:3px; white-space:normal; overflow:visible; overflow-wrap:anywhere; }

  :is(#profiles-view,#mine-view,#review-view,#info-view) .workflow-heading { margin:8px 0 16px; }
  :is(#profiles-view,#mine-view,#review-view,#info-view) .workflow-heading h1, #library-view .page-intro h1, #birth-view .birth-intro h1 { font-size:23px; margin:6px 0 8px; }
  :is(#profiles-view,#mine-view,#review-view,#info-view) :is(.workflow-heading p,.workflow-note,.workflow-panel p) { font-size:12px; line-height:1.7; }
  :is(#profiles-view,#mine-view,#review-view,#info-view) .workflow-panel { padding:14px; margin:12px 0; border-radius:10px; }
  :is(#profiles-view,#mine-view,#review-view,#info-view) .workflow-panel h2 { font-size:16px; margin-bottom:10px; }
  #profiles-view .profile-card { margin:0; }
  #profiles-view .profile-card-actions { gap:6px; margin-top:10px; }
  #profiles-view .profile-card-actions button { font-size:12px; padding:6px 10px; }
  #review-view .review-fields { margin:10px 0; padding-bottom:10px; }
  #review-view .review-fields > div { grid-template-columns:84px minmax(0,1fr); gap:8px; padding:5px 0; font-size:12px; }
  #mine-view .account-links button { padding:14px; font-size:13px; }
  #birth-view .birth-form-section { padding:12px; }
  #birth-view .birth-grid, #birth-view .location-row { gap:12px; }
  #birth-view .birth-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  #birth-view .birth-grid > .field { grid-column:auto; }
  #birth-view .birth-grid > .field:first-child { grid-column:1 / -1; }
  #birth-view .birth-intro > p { font-size:12px; line-height:1.65; }
  #birth-view .field > span { font-size:12px; }
  #birth-view :is(.field input,.wheel-trigger) { min-height:40px; padding:9px; }
  #library-view .page-intro { margin-bottom:14px; }
  #library-view .page-intro p { font-size:12px; }
  #library-view .library-filters { gap:4px; margin:10px 0; }
  #library-view .library-filters button { font-size:12px; padding:8px; }
  #library-view .library-card { padding:14px; }
  #library-view .empty-state { min-height:0; padding:24px 12px; font-size:13px; }
  #library-view .empty-state p { margin:8px 0 0; font-size:12px; }
  #library-view .library-toolbar .outline-button { min-height:40px; padding:8px 12px; font-size:12px; }
  #library-view .library-card h3 { font-size:16px; margin:8px 0; }
  #library-view .library-card-actions { margin-top:10px; gap:6px; }
  #report-view { padding:84px 12px 88px; }
  #report-view .report-paper { padding:16px 12px; }
  #report-view .report-cover { padding:16px 0; }
  #report-view .report-cover h1 { font-size:23px; margin:12px 0; }
  #report-view .report-section { padding:32px 0 4px; }
  #report-view .report-section h2 { font-size:22px; margin-bottom:18px; }
  #report-view .report-block { padding:16px 12px; margin-bottom:16px; }
  #report-view .report-block h3 { font-size:17px; margin-bottom:12px; }
  #report-view .customer-profile { padding:12px; }
}

/* 资料选择：仅单选圆圈使用亮金，卡片维持既有深色。 */
@media screen {
  #configure-view .profile-choice input[type=radio] { appearance:none; -webkit-appearance:none; display:grid; place-items:center; border:1px solid var(--theme-border-control, #8495ab); border-radius:50%; background:var(--theme-surface-card, #15273d); }
  #configure-view .profile-choice input[type=radio]::before { content:""; width:55%; height:55%; border-radius:50%; background:var(--theme-surface-decoration, #ffe5a3); transform:scale(0); }
  #configure-view .profile-choice input[type=radio]:checked { border-color:var(--theme-border-accent, #ffe5a3); }
  #configure-view .profile-choice input[type=radio]:checked::before { transform:scale(1); }
  #configure-view .profile-choice input:focus-visible { outline:2px solid var(--theme-border-accent, #ffe5a3); outline-offset:3px; }
  #yearly-decade-guide .decade-guide-heading { display:none; }
  #configure-view .line-field > .option-label-accent { color:var(--theme-text-accent, var(--gold-bright)); }
}
@media screen and (max-width:680px) {
  #yearly-decade-guide .flow-year-timeline-row { display:grid; grid-template-columns:auto minmax(0,1fr); align-items:center; gap:6px; }
  #yearly-decade-guide .flow-year-timeline-row .timeline-row-label { margin:0; gap:4px; white-space:nowrap; }
  #yearly-decade-guide .selected-decade-panel { display:contents; }
  #yearly-decade-guide .selected-decade-meta { margin:0; min-width:0; overflow-x:auto; }
  #yearly-decade-guide .selected-decade-meta > div { flex-direction:row; align-items:center; flex-wrap:nowrap; gap:5px; white-space:nowrap; }
  #yearly-decade-guide .decade-year-grid { grid-column:1 / -1; }
}

/* 出生资料的时间校正：共用控件与说明层级，保留原主题和字段行为。 */
@media screen {
  .correction-section .birth-section-label { margin:0; padding-bottom:11px; }
  .correction-section .solar-row { display:flex; align-items:center; justify-content:space-between; gap:16px; min-height:44px; cursor:pointer; }
  .correction-section .solar-name { display:flex; align-items:baseline; flex-wrap:wrap; gap:8px; }
  .correction-section .solar-name strong { color:var(--theme-text-primary, #e4eaf2); font-size:14px; line-height:1.5; font-weight:600; }
  .correction-section .solar-name small { color:var(--theme-text-secondary, #b8c7dc); font-size:11px; line-height:1.5; }
  .correction-section .solar-toggle { position:relative; display:flex; align-items:center; min-width:44px; min-height:44px; padding-left:8px; flex-shrink:0; }
  .correction-section .solar-toggle input { position:absolute; width:36px; height:20px; margin:0; opacity:0; }
  .correction-section .solar-toggle .switch { display:block; flex-shrink:0; }
  .correction-section .solar-toggle input:checked + .switch { background:var(--theme-surface-switch-on, var(--gold-dark)); }
  .correction-section .solar-toggle input:checked + .switch::after { transform:translateX(16px); }
  .correction-section .solar-toggle input:focus-visible + .switch { outline:2px solid var(--theme-border-accent, #efd896); outline-offset:4px; }
  .correction-section .solar-copy { margin:0; color:var(--theme-text-secondary, #b8c7dc); font-size:13px; line-height:1.8; }
  .correction-section .solar-importance { margin-top:6px; }
  .correction-section .solar-importance strong { color:var(--theme-text-primary, #e4eaf2); font-weight:500; }
  .correction-section .dst-confirmation { margin-top:15px; padding-top:9px; border-top:1px solid var(--theme-border-subtle, #d6bc7b2d); }
  .correction-section .dst-confirmation label { display:flex; align-items:center; gap:8px; min-height:36px; color:var(--theme-text-primary, #dce5f2); font-size:13px; line-height:1.6; cursor:pointer; }
  .correction-section .dst-confirmation input { flex-shrink:0; width:15px; height:15px; margin:0; accent-color:var(--theme-icon-accent, var(--gold-dark)); }
  .correction-section .dst-confirmation p { margin:0 0 0 23px; color:var(--theme-text-secondary, #b8c7dc); font-size:12px; line-height:1.75; }
  .secondary-birth .correction-section :is(.solar-name strong,.solar-importance strong,.dst-confirmation label) { color:var(--theme-text-primary, var(--ink)); }
  .secondary-birth .correction-section :is(.solar-copy,.solar-name small,.dst-confirmation p) { color:var(--theme-text-secondary, #77747a); }
}
@media screen and (min-width:681px) {
  .correction-section .solar-copy br { display:none; }
}

/* 资料卡与操作按钮的基础样式；各页面布局分别覆盖。 */
@media screen {
  #configure-view .design-panel-label, .profile-selector-heading { display:flex; align-items:center; justify-content:space-between; gap:8px; flex-wrap:nowrap; }
  #configure-view .design-panel-label > span { flex-shrink:0; }
  #configure-view .design-panel-label .add-profile, #configure-view .profile-selector-heading .add-profile { width:auto; margin:0; flex-shrink:0; border-style:solid; font-size:12px; letter-spacing:0; padding:6px 8px; min-height:40px; }
  #configure-view .profile-selector-heading h2 { margin:0; }
  :is(#configure-view,#profiles-view) .profile-choice { display:flex; flex-direction:column; align-items:stretch; gap:0; margin:8px 0; border:1px solid var(--theme-border-subtle, #b8c7dc36); border-radius:8px; background:var(--theme-surface-card, #0b1d3459); }
  :is(#configure-view,#profiles-view) .profile-choice.selected { border-color:var(--theme-border-accent, #dfc183); background:var(--theme-surface-selected, #d3b57414); }
  #configure-view #profile-list-primary > .profile-choice.selected { border-width:.5px; }
  :is(#configure-view,#profiles-view) .profile-choice .profile-details { display:flex; align-items:flex-start; gap:8px; padding:10px; min-width:0; }
  :is(#configure-view,#profiles-view) .profile-choice .profile-details > span { display:grid; gap:3px; min-width:0; overflow-wrap:anywhere; }
  :is(#configure-view,#profiles-view) .profile-choice strong { font-size:13px; font-weight:500; line-height:1.5; }
  :is(#configure-view,#profiles-view) .profile-choice small { font-size:11px; line-height:1.5; color:var(--theme-text-secondary, #c1cde0); }
  :is(#configure-view,#profiles-view) .profile-choice-actions { display:flex; justify-content:flex-end; align-items:center; gap:6px; padding:0 10px 10px; }
  :is(#configure-view,#profiles-view) .profile-choice-actions button { min-width:44px; min-height:40px; padding:6px 10px; border:1px solid var(--theme-border-subtle, var(--line)); border-radius:6px; background:transparent; color:var(--theme-text-accent, var(--gold-bright)); font-size:12px; cursor:pointer; }
  :is(#configure-view,#profiles-view) .profile-choice-actions [data-delete-profile] { color:var(--theme-text-error, #eea6a6); }
  :is(#configure-view,#profiles-view) .profile-choice-actions button:focus-visible { outline:2px solid var(--theme-border-accent, var(--gold-bright)); outline-offset:2px; }
}

/* 三个测算入口使用紧凑资料行，资料库保留独立布局。 */
@media screen {
  #configure-view #configure-add-profile { font-size:10px; line-height:16px; min-height:28px; padding:4px 7px; border-radius:6px; }
  #configure-view .profile-choice { flex-direction:row; align-items:center; gap:4px; min-height:44px; }
  #configure-view .profile-choice .profile-details { align-items:center; gap:6px; padding:3px 6px; }
  #configure-view .profile-choice .profile-details > span { gap:2px; }
  #configure-view .profile-choice .profile-details > span > small { font-size:10px; }
  #configure-view .profile-choice input { margin:0; }
  #configure-view .profile-choice-actions { flex-shrink:0; gap:8px; padding:0 6px 0 0; }
  #configure-view .profile-choice-actions button { min-width:30px; min-height:30px; padding:4px 3px; font-size:11px; line-height:16px; border-radius:5px; }
}

/* 资料库独立排版：删除在右上，编辑和排盘分居底部两侧。 */
@media screen {
  #profiles-view .profile-choice { position:relative; margin:0; padding:6px 14px; gap:4px; border:1px solid var(--theme-border-subtle, #b69a64); border-radius:10px; }
  #profiles-view .profile-choice .profile-details { padding:0; }
  #profiles-view .profile-choice .profile-details > [data-profile-details] { display:grid; width:100%; min-width:0; gap:4px; }
  #profiles-view .profile-choice .profile-library-name { min-height:34px; padding-right:72px; font-size:20px; color:var(--theme-text-accent, var(--gold-bright)); line-height:1.4; overflow-wrap:anywhere; }
  #profiles-view .profile-choice small { font-size:12px; line-height:1.65; }
  #profiles-view .profile-choice-actions { display:flex; justify-content:space-between; gap:12px; padding:4px 0 0; border-top:1px solid var(--theme-border-subtle, #b8c7dc26); }
  #profiles-view .profile-choice-actions button { width:auto; min-width:72px; min-height:34px; padding:4px 10px; }
  #profiles-view .profile-choice-actions :is([data-edit-profile],[data-chart-profile]) { width:calc((100% - 24px) / 3); }
  #profiles-view .profile-choice-actions [data-edit-profile] { order:0; }
  #profiles-view .profile-choice-actions [data-chart-profile] { order:1; }
  #profiles-view .profile-choice-actions [data-delete-profile] { position:absolute; top:6px; right:14px; min-width:44px; }
  #profiles-view .profile-info-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); margin:0; border:1px solid var(--theme-border-subtle, #b8c7dc36); border-radius:8px; overflow:hidden; background:var(--theme-surface-card, #0b1d3433); }
  #profiles-view .profile-info-cell { display:grid; grid-template-columns:16px minmax(0,1fr); align-content:start; column-gap:6px; row-gap:3px; padding:4px 8px; min-width:0; }
  #profiles-view .profile-info-cell:nth-child(even) { border-left:1px solid var(--theme-border-subtle, #b8c7dc36); }
  #profiles-view .profile-info-cell:nth-child(n+3) { border-top:1px solid var(--theme-border-subtle, #b8c7dc36); }
  #profiles-view .profile-info-wide { grid-column:1 / -1; grid-template-columns:16px auto minmax(0,1fr); align-items:center; }
  #profiles-view .profile-info-cell dt { display:contents; color:var(--theme-text-secondary, #b8c7dc); font-size:11px; line-height:1.5; }
  #profiles-view .profile-info-cell svg { grid-column:1; grid-row:1 / 3; width:16px; height:16px; margin-top:2px; fill:none; stroke:var(--theme-text-accent, var(--gold-bright)); stroke-width:1.6; stroke-linecap:round; stroke-linejoin:round; }
  #profiles-view .profile-info-cell dd { grid-column:2; margin:0; min-width:0; color:var(--theme-text-primary, #e0e8f3); font-size:12px; line-height:1.5; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
  #profiles-view .profile-info-wide svg { grid-row:1; margin-top:0; }
  #profiles-view .profile-info-wide dt > span { grid-column:2; grid-row:1; }
  #profiles-view .profile-info-wide dd { grid-column:3; grid-row:1; }
}

/* 本命、流年分析范围作为标题下的辅助说明。 */
@media screen {
  #configure-view .configure-heading:has(.report-scope-strip) { border-bottom:0; padding-bottom:0; }
  .report-scope-strip { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:6px; padding:4px 0; border:0; border-radius:0; background:none; color:#A3B1C2; font-size:12px; font-weight:400; line-height:1.5; }
  :root[data-theme="light"] .report-scope-strip { color:#657487; }
  #configure-view .configure-heading > p + .report-scope-strip { margin-top:10px; }
  .report-scope-strip > span { flex-shrink:0; white-space:nowrap; }
  #configure-view:has(#report-options-panel:not([hidden])) .report-scope-strip { color:#8fa1b7; font-weight:300; }
  :root[data-theme="light"] #configure-view:has(#report-options-panel:not([hidden])) .report-scope-strip { color:#677486; }
}
@media screen and (max-width:680px) {
  #configure-view .case-panel { padding-top:6px; padding-bottom:6px; }
  #configure-view .profile-selection-list > .profile-choice:first-child { margin-top:4px; }
  #configure-view .profile-selection-list > .profile-choice:last-child { margin-bottom:4px; }
  #configure-view .panel-title { margin-bottom:4px; }
  #yearly-decade-guide .decade-timeline-row { border-top:0; padding-top:0; }
  #configure-view .configure-heading:has(.report-scope-strip) h1 { margin-bottom:10px; }
  .report-scope-strip { gap:4px; padding:3px 0; font-size:11px; }
}

/* 展开仅控制测算页列表，男女两侧独立。 */
@media screen {
  #configure-view .design-panel-label, #configure-view .profile-selector-heading { gap:4px; }
  #configure-view .profile-list-toggle { display:inline-flex; align-items:center; justify-content:center; gap:4px; min-height:28px; padding:4px; border:0; background:transparent; color:var(--theme-text-secondary, #c1cde0); font-size:10px; line-height:16px; white-space:nowrap; cursor:pointer; }
  #configure-view .profile-list-toggle svg { width:10px; height:10px; fill:none; stroke:currentColor; stroke-width:1.5; }
  #configure-view .profile-list-toggle[aria-expanded=true] svg { transform:rotate(180deg); }
  #configure-view .profile-list-toggle:focus-visible { outline:2px solid var(--theme-border-accent, var(--gold-bright)); outline-offset:2px; border-radius:4px; }
  #configure-view .profile-selector-heading h2 { font-size:11px; }
  #configure-view .profile-selector-heading .add-profile { font-size:10px; line-height:16px; min-height:28px; padding:4px 7px; border-radius:6px; }
}

/* 必填项提示保留到用户补齐，沿用现有风险提示色。 */
#configure-view .option-error { margin:6px 0; color:var(--theme-text-error, #eea6a6); font-size:12px; line-height:1.5; }

/* 流年配置：时间轴与本次设置采用同级分区，内部控件保持。 */
@media screen {
  #configure-view .case-panel { border:1px solid var(--theme-border-subtle, #4f88a1); }
  #configure-view .design-panel-label { font-size:18px; flex-wrap:wrap; }
  #configure-view .design-panel-label > span:first-child { font-size:15px; }
  #configure-view #report-options-panel { display:grid; gap:16px; padding:0; border:0; border-radius:0; background:none; }
  #configure-view #report-options-panel > .yearly-section { min-width:0; padding:24px; border:1.25px solid var(--theme-border-subtle, #607a95); border-radius:12px; background:var(--theme-surface-card, #14283e); }
  #configure-view #yearly-settings-panel > .yearly-settings-heading { padding-bottom:12px; margin-bottom:12px; }
  #configure-view #yearly-settings-heading { margin:0; color:var(--theme-text-accent, var(--gold-bright)); font-weight:500; }
  #configure-view #product-options { margin:0; padding:0; min-width:0; }
  #configure-view #product-options > .option-section:last-child { padding-bottom:0; }
  #configure-view #yearly-settings-panel .line-field:has(#target-start-year) { grid-template-columns:minmax(0,1fr) clamp(128px,35vw,144px); align-items:center; gap:12px; max-width:none; }
  #configure-view #yearly-settings-panel .line-field:has(#target-start-year) > span { white-space:nowrap; letter-spacing:0; }
  #configure-view #yearly-settings-panel:has(#yearly-work-options) :is(.line-field > span, #yearly-work-label) { color:var(--theme-text-primary, #d5ddeb); font:400 14px/1.6 var(--sans); letter-spacing:0; }
  #configure-view #yearly-settings-panel:has(#yearly-work-options) :is(.line-field > span, #yearly-work-label)::before { display:inline-block; width:14px; margin-right:6px; color:var(--theme-text-accent, var(--gold-bright)); font:400 13px/1 var(--sans); }
  #configure-view #yearly-settings-panel:has(#yearly-work-options) .line-field:has(#target-start-year) > span::before { content:"①"; }
  #configure-view #yearly-work-label::before { content:"②"; }
  #configure-view #yearly-relationship-panel .line-field > span::before { content:"③"; }
  #configure-view #past-investment-panel .line-field > span::before { content:"④"; }
  #configure-view #yearly-work-options .choice-chip > span { position:relative; padding-inline:18px; font-size:13px; }
  #configure-view #yearly-relationship-panel #relationship-status { font-size:13px; }
  #configure-view #yearly-work-options .choice-chip > span::after { content:""; display:none; position:absolute; top:50%; right:7px; width:5px; height:9px; border:solid currentColor; border-width:0 1.5px 1.5px 0; transform:translateY(-65%) rotate(45deg); }
  #configure-view #yearly-work-options .choice-chip input:checked + span::after { display:block; }
  #configure-view #past-work-none { grid-column:1 / -1; }
  #configure-view #past-work-none input:not(:checked) + span { color:var(--theme-text-secondary, #bcc9dd); border-color:var(--theme-border-subtle, rgba(186,203,226,.18)); background:transparent; }
  #configure-view #yearly-settings-panel .yearly-automatic-heading { display:flex; flex-wrap:wrap; align-items:baseline; gap:8px; color:var(--theme-text-secondary, #bcc9dd); font:400 13px/1.6 var(--sans); letter-spacing:0; }
  #configure-view #yearly-settings-panel .yearly-automatic-hint { font-size:11px; }
  #configure-view #yearly-settings-panel:has(#yearly-work-options) select { color-scheme:dark; -webkit-appearance:none; appearance:none; padding-right:32px; background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='m2 4 4 4 4-4' fill='none' stroke='%23bcc9dd' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat:no-repeat; background-position:right 12px center; background-size:12px 12px; }
  :root[data-theme="light"] #configure-view #yearly-settings-panel:has(#yearly-work-options) select { color-scheme:light; background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='m2 4 4 4 4-4' fill='none' stroke='%2351647a' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
  #configure-view #yearly-settings-panel .option-section:has(#yearly-work-options) { padding-top:16px; border-top:1px solid var(--theme-border-subtle, rgba(186,203,226,.18)); }
}
@media screen and (max-width:680px) {
  #configure-view #report-options-panel > .yearly-section { padding:12px; border-radius:10px; }
  #configure-view #yearly-timeline-details { margin-bottom:0; }
  #configure-view #yearly-decade-guide { padding-bottom:0; }
  #configure-view #yearly-settings-panel > .yearly-settings-heading { padding-bottom:8px; margin-bottom:4px; }
  #configure-view #yearly-settings-panel .option-section:has(#target-start-year) { padding:0 0 4px; }
  #configure-view #yearly-settings-panel #target-start-year { height:36px; min-height:36px; padding:6px 10px; line-height:20px; }
  #configure-view #yearly-settings-panel:has(#yearly-work-options) :is(.line-field > span, #yearly-work-label) { font-size:13px; }
  #configure-view #yearly-settings-panel #yearly-state-note { margin-bottom:7px; font-size:10.5px; }
  #configure-view #yearly-settings-panel .option-section:has(#yearly-work-options) { padding-top:6px; }
}
@media screen and (max-width:360px) {
  #configure-view #yearly-work-options .choice-chip > span { padding-inline:16px; }
  #configure-view #yearly-settings-panel #yearly-state-note { font-size:11px; }
}

/* 首页说明：双入口在各屏幕并列，展开正文保持整行阅读。 */
@media screen {
  #home-view { --product-action-fill:#DDC995; --product-action-hover:#E6D5AB; --product-action-text:#29323B; }
  :root[data-theme="light"] #home-view { --product-action-fill:#EEE4CC; --product-action-hover:#E9DCB9; }
  #home-view .home-disclosure-buttons { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
  #home-view .home-disclosure-toggle { display:flex; align-items:center; justify-content:space-between; gap:12px; min-width:0; min-height:48px; padding:12px 14px; border:1px solid var(--theme-border-subtle, #b8c7dc60); border-radius:10px; background:var(--theme-surface-card, #10223bd9); color:var(--theme-text-secondary, #b8c7dc); font:400 14px/1.5 var(--sans); text-align:left; cursor:pointer; }
  #home-view .home-disclosure-toggle svg { width:16px; height:16px; flex-shrink:0; fill:none; stroke:currentColor; stroke-width:1.6; stroke-linecap:round; stroke-linejoin:round; }
  #home-view .home-disclosure-toggle > span { text-wrap:balance; }
  #home-view .home-disclosure-toggle:is(:hover,[aria-expanded="true"]) { border-color:var(--theme-border-accent, var(--gold-bright)); }
  #home-view .home-disclosure-toggle[aria-expanded="true"] { background:var(--product-action-fill); border-color:var(--product-action-fill); color:var(--product-action-text); }
  #home-view .home-disclosure-toggle[aria-expanded="true"] svg { transform:rotate(180deg); }
  #home-view .home-disclosure-toggle:focus-visible, #home-view .capability-details .design-sample-link:focus-visible { outline:2px solid var(--theme-border-accent, var(--gold-bright)); outline-offset:3px; }
  #home-view .design-purpose { margin-top:16px; padding:28px; border:1px solid var(--theme-border-subtle, #b8c7dc60); border-radius:12px; background:var(--theme-surface-card, #0d2038ed); }
  /* 恢复报告正文的字体栈，不使用首页标题的专用子集字体。 */
  #home-view .design-purpose-copy { --serif:"Source Han Serif SC", "Noto Serif SC", "Songti SC", "STSong", "Noto Serif CJK SC", serif; max-width:48em; margin-inline:auto; color:var(--theme-text-primary, #dce5f2); font:400 16px/1.95 var(--serif); letter-spacing:.015em; text-align:left; }
  #home-view .design-purpose h2 { margin:0 0 20px; padding-bottom:16px; border-bottom:1px solid var(--theme-border-subtle, #8faac44d); color:inherit; font:600 19px/1.55 var(--sans); letter-spacing:0; text-wrap:balance; }
  #home-view .design-purpose h2 > span { display:inline-block; }
  #home-view .design-purpose p { margin:0 0 1.2em; }
  #home-view .design-purpose strong { font-weight:600; }
  #home-view .design-purpose .design-purpose-principle { margin:24px 0 0; padding-top:20px; border-top:1px solid var(--theme-border-subtle, #8faac44d); }
  #home-view .design-purpose-solar { margin-top:40px; padding-top:32px; border-top:3px solid var(--theme-border-accent, #c7ad73); }
  #home-view .design-purpose-figure { margin:24px 0; }
  #home-view .design-purpose-figure a { display:block; border-radius:12px; overflow:hidden; cursor:zoom-in; }
  #home-view .design-purpose-figure a:focus-visible { outline:2px solid var(--theme-border-accent, var(--gold-bright)); outline-offset:4px; }
  #home-view .design-purpose-figure img { display:block; width:100%; height:auto; }
  #home-view .design-purpose-figure figcaption { margin-top:10px; color:var(--theme-text-secondary, #b8c7dc); font:400 13px/1.7 var(--sans); text-align:center; letter-spacing:0; }
  #home-view .design-purpose .design-purpose-note { margin:16px 0 0; color:var(--theme-text-secondary, #b8c7dc); font:400 13px/1.8 var(--sans); letter-spacing:0; }
  #home-view .scope-intro { margin:12px 0; color:var(--theme-text-secondary, #aec3dc); font-size:12px; line-height:1.7; }
  #home-view .report-scope-cards { display:grid; grid-template-columns:minmax(0,1fr); gap:10px; }
  #home-view .report-scope-card { min-width:0; padding:14px; border:1px solid var(--theme-border-subtle, #b8c7dc60); border-radius:12px; background:var(--theme-surface-card, #0d2038c9); }
  #home-view .report-scope-card header { padding-bottom:8px; border-bottom:1px solid var(--theme-border-subtle, #8faac44d); }
  #home-view .report-scope-card h2 { margin:0; color:var(--theme-text-primary, #efd896); font:500 17px/1.5 var(--serif); letter-spacing:.02em; }
  #home-view .report-scope-card header p { margin:4px 0 0; color:var(--theme-text-secondary, #aec3dc); font-size:11px; line-height:1.6; }
  #home-view .report-scope-card dl { margin:0; }
  #home-view .report-scope-card dl > div { display:grid; grid-template-columns:4em minmax(0,1fr); gap:12px; padding:8px 0; font-size:12px; line-height:1.7; }
  #home-view .report-scope-card dl > div + div { border-top:1px solid var(--theme-border-subtle, #8faac426); }
  #home-view .report-scope-card dl > div:last-child { padding-bottom:0; }
  #home-view .report-scope-card dt { color:var(--theme-text-accent, #e3cb91); font-weight:500; }
  #home-view .report-scope-card dd { margin:0; min-width:0; color:var(--theme-text-primary, #dce5f2); overflow-wrap:anywhere; }
  #home-view .report-scope-card .scope-note { margin:10px 0 0; color:var(--theme-text-secondary, #aec3dc); font-size:11px; line-height:1.7; }
  #home-view .capability-details .design-sample-link { display:inline-flex; align-items:center; gap:12px; min-height:44px; margin-top:12px; font-size:13px; }
  #home-view .capability-details .design-sample-link svg { width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:1.4; stroke-linecap:round; stroke-linejoin:round; }
}
@media screen and (max-width:680px) {
  #home-view .home-disclosure-buttons { gap:8px; }
  #home-view .home-disclosure-toggle { gap:8px; min-height:44px; padding:8px 12px; }
  #home-view .home-disclosure-toggle svg { width:14px; height:14px; }
  #home-view .design-purpose { padding:20px 16px; }
  #home-view .design-purpose-copy { font-size:15px; }
  #home-view .design-purpose h2 { font-size:17px; }
  #home-view .design-purpose-solar { margin-top:32px; padding-top:24px; }
  #home-view .design-purpose-figure { margin-block:20px; }
  #home-view .design-purpose-figure figcaption { font-size:12px; }
}
@media screen and (max-width:360px) {
  #home-view .home-disclosure-toggle { gap:4px; padding-inline:6px; }
}
@media screen and (min-width:1024px) {
  #home-view .report-scope-cards { grid-template-columns:repeat(3,minmax(0,1fr)); align-items:start; gap:16px; }
}

/* 我的报告筛选：四个等宽独立按钮，不影响命盘人物切换栏。 */
@media screen {
  #library-view .library-card-actions { justify-content:flex-end; }
  #library-view .library-card-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; }
  #library-view .library-delete { flex:none; min-height:44px; padding:6px 0; border:0; background:none; color:var(--theme-text-secondary, #b8c7dc); font:400 13px/1.4 var(--sans); text-decoration:underline; text-underline-offset:3px; cursor:pointer; }
  #library-view .library-delete:hover { color:var(--theme-text-error, #edb3aa); }
  #library-view .library-delete:focus-visible { outline:2px solid var(--theme-border-accent, var(--gold-bright)); outline-offset:3px; }
  #delete-report-title { font-weight:500; overflow-wrap:anywhere; }
  #delete-report-status { color:var(--theme-text-error, #edb3aa); }
  #library-view #library-filters { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; width:100%; }
  #library-view #library-filters button { width:100%; min-width:0; min-height:40px; padding:8px 4px; border:1px solid var(--theme-border-subtle, #b8c7dc60); border-radius:8px; background:var(--theme-surface-card, #10223b80); color:var(--theme-text-secondary, #bbc8dc); font-size:12px; line-height:1.5; white-space:nowrap; text-align:center; }
  #library-view #library-filters button[aria-pressed=true] { border-color:var(--theme-border-accent, #d9bd79); background:var(--theme-surface-selected, #d3b57414); color:var(--theme-text-accent, #f1d99a); }
  #library-view #library-filters button:hover { border-color:var(--theme-border-accent, #d9bd79); }
  #library-view #library-filters button:focus-visible { outline:2px solid var(--theme-border-accent, var(--gold-bright)); outline-offset:2px; }
}

/* 我的：常用入口并列，帮助与账号分组；仅影响此页。 */
@media screen {
  #mine-view .mine-heading { display:flex; align-items:center; gap:16px; margin:8px 0 12px; }
  #mine-view .mine-heading h1 { margin:0; }
  #mine-view .mine-status { padding:3px 10px; border:1px solid var(--theme-border-entry, #d9bd79); border-radius:20px; color:var(--theme-text-accent, #efd896); font-size:11px; line-height:1.5; }
  #mine-view svg { fill:none; stroke:currentColor; stroke-width:1.6; stroke-linecap:round; stroke-linejoin:round; flex-shrink:0; }
  #mine-view .mine-account-note { display:flex; align-items:center; gap:10px; margin:0 0 20px; color:var(--theme-text-secondary, #b8c7dc); font-size:12px; line-height:1.6; }
  #mine-view .mine-account-note svg { width:22px; height:22px; color:var(--theme-icon-accent, #efd896); }
  #mine-view .mine-shortcuts { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
  #mine-view .mine-shortcuts button { display:grid; grid-template-columns:24px minmax(0,1fr) 10px; align-items:center; gap:8px; min-width:0; min-height:76px; padding:12px; border:1px solid var(--theme-border-entry, #b69a6480); border-radius:12px; background:var(--theme-surface-card, #0b1d32eb); color:var(--theme-text-accent, #efd896); text-align:left; cursor:pointer; }
  #mine-view .mine-entry-icon { width:24px; height:28px; }
  #mine-view .mine-shortcuts button > span { min-width:0; }
  #mine-view .mine-shortcuts strong { display:block; font-size:13px; line-height:1.5; }
  #mine-view .mine-shortcuts small { display:block; margin-top:4px; color:var(--theme-text-secondary, #b8c7dc); font-size:10px; line-height:1.6; }
  #mine-view .mine-chevron { width:12px; height:16px; color:var(--theme-text-secondary, #c4d2e6); }
  #mine-view .mine-group { margin-top:20px; }
  #mine-view .mine-group h2 { margin:0 0 8px; color:var(--theme-text-primary, #efd896); font:500 17px/1.5 var(--serif); }
  #mine-view .account-links { border-color:var(--theme-border-subtle, #b69a6480); background:var(--theme-surface-card, #0b1d32eb); }
  #mine-view .account-links button { align-items:center; gap:12px; min-height:44px; padding:12px 14px; color:var(--theme-text-primary, #e0e8f3); font-size:13px; line-height:1.5; }
  #mine-view .mine-row-end { display:inline-flex; align-items:center; gap:8px; flex-shrink:0; }
  #mine-view .mine-pending { color:var(--theme-text-secondary, #aebfd5); font-size:11px; white-space:nowrap; }
  #mine-view .account-links button:disabled { opacity:1; color:var(--theme-text-secondary, #b8c7dc); cursor:default; }
  #mine-view .mine-shortcuts button:hover { border-color:var(--theme-border-accent, #d9bd79); background:var(--theme-surface-selected, #142b42); }
  #mine-view .account-links button:enabled:hover { background:var(--theme-surface-selected, #142b42); }
  #mine-view :is(.mine-shortcuts,.account-links) button:focus-visible { outline:2px solid var(--theme-border-accent, #efd896); outline-offset:-4px; }
}
@media screen and (max-width:360px) {
  #mine-view .mine-shortcuts button { grid-template-columns:20px minmax(0,1fr) 10px; gap:6px; padding:10px; }
  #mine-view .mine-entry-icon { width:20px; }
  #mine-view .mine-shortcuts strong { font-size:12px; }
}
@media screen and (min-width:681px) {
  #mine-view .mine-shortcuts button { min-height:96px; grid-template-columns:28px minmax(0,1fr) 16px; gap:14px; padding:20px; }
  #mine-view .mine-shortcuts strong { font-size:16px; }
  #mine-view .mine-shortcuts small, #mine-view .mine-account-note { font-size:13px; }
  #mine-view .account-links button { min-height:52px; font-size:14px; }
}

/* Help, legal reading and support share the existing theme, without report styles. */
@media screen {
  #mine-view .mine-logout { display:block; min-height:44px; margin-top:24px; padding:10px 16px; border:1px solid var(--theme-border-subtle, #b8c7dc60); border-radius:10px; background:var(--theme-surface-card, #0b1d32eb); color:var(--theme-text-secondary, #b8c7dc); font:inherit; font-size:14px; cursor:pointer; }
  #mine-view .mine-logout:focus-visible { outline:2px solid var(--theme-border-accent, #efd896); outline-offset:3px; }
  .auth-info-links { display:flex; flex-wrap:wrap; gap:4px 16px; margin-top:20px; }
  .auth-info-links button { min-height:44px; padding:6px 0; border:0; background:none; color:var(--theme-text-secondary, #b8c7dc); font:inherit; font-size:13px; text-decoration:underline; text-underline-offset:4px; cursor:pointer; }
  .auth-info-links button:focus-visible { outline:2px solid var(--theme-border-accent, #efd896); outline-offset:4px; }
  #info-view { max-width:820px; }
  #info-view.active { animation:none; }
  #info-view .workflow-heading h1 { overflow-wrap:anywhere; }
  #info-view :is(#info-title,h2[tabindex="-1"]):focus { outline:none; }
  #info-view #info-content { padding:24px; background:var(--theme-surface-card, #0b1d32); }
  #info-view #info-content p { margin:12px 0; color:var(--theme-text-primary, #dce5f2); font-size:16px; line-height:1.85; overflow-wrap:anywhere; }
  #info-view #info-content h2 { margin:28px 0 10px; color:var(--theme-text-primary, #e9edf4); font:600 20px/1.55 var(--sans, sans-serif); scroll-margin-top:24px; }
  #info-view #info-content > h2:first-child { margin-top:0; }
  #info-view #info-content strong { font-weight:600; }
  #info-view #info-content a { color:var(--theme-text-accent, #efd896); text-decoration:underline; text-underline-offset:3px; overflow-wrap:anywhere; }
  #info-view #info-content :is(a,button,summary,[tabindex="0"]):focus-visible { outline:2px solid var(--theme-border-accent, #efd896); outline-offset:3px; }
  #info-view #info-content[data-info="terms"] > p:nth-child(-n+3), #info-view #info-content[data-info="privacy"] > p:nth-child(-n+3) { margin:5px 0; color:var(--theme-text-secondary, #b8c7dc); font-size:13px; line-height:1.7; }
  #info-view #info-content .info-operator { color:var(--theme-text-secondary, #b8c7dc); font-size:14px; line-height:1.75; }
  #info-view .info-related { display:flex; flex-wrap:wrap; gap:4px 20px; margin-top:28px; padding-top:12px; border-top:1px solid var(--theme-border-subtle, #b8c7dc45); }
  #info-view .info-related button, #info-view [data-copy-support-email] { min-height:44px; padding:8px 0; border:0; background:none; color:var(--theme-text-accent, #efd896); font:inherit; font-size:14px; text-align:left; text-decoration:underline; text-underline-offset:3px; cursor:pointer; }
  #info-view .support-email { display:flex; align-items:center; flex-wrap:wrap; gap:4px 16px; }
  #info-view .info-directory { margin:18px 0; border-bottom:1px solid var(--theme-border-subtle, #b8c7dc45); }
  #info-view .info-directory > summary { min-height:44px; padding:10px 0; color:var(--theme-text-accent, #efd896); font-size:15px; cursor:pointer; }
  #info-view .info-directory nav { display:grid; padding-bottom:12px; }
  #info-view .info-directory button { min-height:44px; padding:8px 0; border:0; border-radius:0; background:none; color:var(--theme-text-primary, #dce5f2); font:inherit; font-size:14px; text-align:left; }
  #info-view .info-table-wrap { max-width:100%; margin:16px 0; overflow-x:auto; overscroll-behavior-x:contain; }
  #info-view table { width:100%; min-width:560px; border-collapse:collapse; font-size:14px; line-height:1.8; color:var(--theme-text-primary, #dce5f2); }
  #info-view :is(th,td) { padding:12px; border:1px solid var(--theme-border-subtle, #b8c7dc45); vertical-align:top; text-align:left; overflow-wrap:anywhere; }
  #info-view th { color:var(--theme-text-primary, #e9edf4); font-weight:600; }
  #info-view td:first-child { width:22%; }
  #info-view .support-code { margin:24px auto 14px; text-align:center; }
  /* Display only the unchanged original QR region; retain a 16px source quiet zone. */
  #info-view .support-code-crop { position:relative; width:252px; max-width:100%; aspect-ratio:1; margin:auto; overflow:hidden; background:#fff; }
  #info-view .support-code-crop img { position:absolute; width:373.1013%; max-width:none; height:auto; left:-237.3418%; top:-475.9494%; }
  #info-view .support-code figcaption { margin-top:12px; color:var(--theme-text-primary, #dce5f2); font-size:15px; line-height:1.6; }
  #info-view .support-actions { display:flex; justify-content:center; flex-wrap:wrap; gap:8px 12px; }
  #info-view .support-actions a { display:inline-flex; align-items:center; justify-content:center; min-height:44px; padding:8px 12px; border:1px solid var(--theme-border-subtle, #b8c7dc45); border-radius:8px; font-size:14px; text-decoration:none; }
  #info-view #info-content :is(.support-scan-note,.support-operator) { color:var(--theme-text-secondary, #b8c7dc); font-size:14px; }
}
@media screen and (max-width:680px) {
  #info-view #info-content { padding:18px 16px; }
  #info-view #info-content p { font-size:15px; }
  #info-view #info-content h2 { margin-top:24px; font-size:18px; }
  #info-view table:not(:has(th:nth-child(3))) { min-width:0; }
}

/* Desktop composition: approved 2026-09-28. Below 981px retains the existing layout. */
@media screen and (min-width:981px) {
  #home-view.active, #configure-view.active, #mine-view.active { animation:none; }
  #home-view, #configure-view, #mine-view { box-sizing:border-box; width:100%; max-width:1248px; margin-inline:auto; padding-inline:24px; }

  /* Keep the title on the left; desktop supporting copy shares one line. */
  #home-view.active { display:block; padding-top:120px; padding-bottom:32px; }
  #home-view > * { width:100%; margin-inline:0; }
  /* Preserve the original surrounding space, allowing for the removed second copy line. */
  #home-view .hero-copy { width:100%; min-height:316px; margin:0; padding:24px 0 36px; display:flex; flex-flow:row wrap; justify-content:flex-start; align-content:center; align-items:flex-start; column-gap:8px; }
  #home-view .hero-kicker { flex-basis:100%; margin:0 0 22px; }
  #home-view .hero-copy h1 { flex-basis:100%; order:0; font-size:clamp(42px,4vw,60px); margin:0 0 16px; }
  #home-view .hero-copy > .eyebrow, #home-view .hero-intro { width:auto; max-width:100%; margin:0; color:var(--theme-text-accent, #b9c7db); font:400 14px/1.9 var(--sans); letter-spacing:.02em; }
  #home-view .hero-copy > .eyebrow { order:1; }
  #home-view .hero-intro { order:2; }
  #home-view .home-products { margin:0; }
  #home-view .product-grid { grid-template-columns:repeat(3,minmax(0,1fr)); gap:18px; }
  #home-view .product-card { grid-template-columns:minmax(0,1fr) 44px; grid-template-rows:auto auto 1fr auto; gap:12px; min-height:228px; padding:22px; }
  #home-view .product-card strong { grid-column:1; grid-row:1; align-self:center; font-size:clamp(20px,1.7vw,23px); }
  #home-view .product-card .icon { grid-column:2; grid-row:1; width:44px; height:44px; font-size:14px; }
  #home-view .card-question { grid-column:1 / -1; grid-row:2; font-size:13px; }
  #home-view .product-card small { grid-column:1 / -1; grid-row:3; font-size:13px; line-height:1.8; }
  #home-view .card-action { display:flex; grid-column:1 / -1; grid-row:4; align-items:center; justify-content:space-between; min-height:52px; margin:auto -22px -22px; padding:0 22px; border-top:1px solid var(--product-action-fill); border-radius:0; background:var(--product-action-fill); color:var(--product-action-text); font-size:13px; }
  #home-view .product-card:hover .card-action { background:var(--product-action-hover); border-top-color:var(--product-action-hover); }
  #home-view .product-card:focus-visible { outline:2px solid var(--theme-border-accent, #E6D5AB); outline-offset:3px; }
  :root[data-theme="light"] #home-view .product-card { border-color:#B9AA8D; }
  :root[data-theme="light"] #home-view .product-card::before { border-color:rgba(157,130,79,.18); }
  #home-view .profiles-shortcut { margin-top:18px; padding:16px 22px; }
  #home-view .capability-details { margin-top:16px; padding:0; border:0; }
  #home-view .culture-disclaimer { margin-top:12px; }

  /* Configuration: a shared title stage, then a person strip and two task columns. */
  #configure-view { padding-top:40px; padding-bottom:64px; }
  #configure-view .design-steps { width:56%; margin:22px 0 28px; font-size:12px; }
  #configure-view .design-steps li { white-space:nowrap; }
  #configure-view .design-steps li + li::before { width:24px; margin-inline:12px; }
  #configure-view .configure-heading { width:56%; min-height:194px; padding:20px 0 28px; margin:0; border:0; }
  #configure-view .configure-heading h1 { font-size:clamp(30px,3vw,40px); line-height:1.4; }
  #configure-view .report-scope-strip { flex-wrap:wrap; justify-content:flex-start; gap:6px 16px; padding:4px 0; border:0; background:none; font-size:12px; }
  #configure-view .consultation-form { max-width:none; grid-template-columns:minmax(0,1fr); gap:20px; }
  #configure-view .case-panel { padding:18px 20px; }
  #configure-view .design-panel-label { gap:12px; margin-bottom:12px; padding-bottom:12px; }
  #configure-view .design-panel-label > span:first-child { font-size:17px; }
  #configure-view .profile-selector { margin-bottom:0; min-width:0; }
  #configure-view .profile-selector-heading { flex-wrap:wrap; gap:10px; }
  #configure-view .profile-selector-heading h2 { font-size:16px; }
  #configure-view :is(#configure-add-profile,.profile-selector-heading .add-profile) { min-height:36px; padding:7px 10px; font-size:12px; }
  #configure-view .profile-list-toggle { min-height:36px; padding:7px; font-size:12px; }
  #configure-view .profile-list-toggle svg { width:12px; height:12px; }
  #configure-view .profile-choice { gap:12px; margin:8px 0; min-height:62px; }
  #configure-view .profile-choice .profile-details { padding:12px; gap:10px; min-width:0; }
  #configure-view .profile-choice strong { font-size:16px; }
  #configure-view .profile-choice .profile-details > span > small { font-size:13px; }
  #configure-view .profile-choice-actions { gap:12px; padding-right:12px; }
  #configure-view .profile-choice-actions button { min-width:40px; min-height:36px; padding:6px; font-size:12px; }
  #configure-view .case-panel:has(#primary-profile-toggle:not([hidden])) .profile-details > span { display:flex; align-items:center; flex-wrap:wrap; gap:8px 24px; }

  #configure-view #report-options-panel:not([hidden]) { grid-template-columns:repeat(2,minmax(0,1fr)); align-items:start; gap:20px; }
  #configure-view #report-options-panel > .yearly-section { padding:20px; }
  #configure-view #yearly-timeline-panel > .panel-title { padding:0 0 12px; margin:0; border:0; }
  #configure-view .panel-title > span { display:none; }
  #configure-view .panel-title h2 { font-size:20px; line-height:1.5; }
  #configure-view #yearly-timeline-details { padding:0; margin:0; }
  #configure-view #yearly-decade-guide { padding:0; border:0; border-radius:0; background:none; box-shadow:none; backdrop-filter:none; }
  #configure-view #yearly-decade-guide .decade-guide-heading { display:none; }
  #configure-view #yearly-decade-guide .timeline-row { display:block; padding:14px 0; }
  #configure-view #yearly-decade-guide .timeline-row-label { display:flex; gap:8px; align-items:center; min-height:0; padding:0; margin-bottom:12px; border:0; }
  #configure-view #yearly-decade-guide .timeline-row-label span { font-size:16px; letter-spacing:0; }
  #configure-view #yearly-decade-guide .timeline-row-label small { font-size:12px; letter-spacing:0; color:var(--theme-text-secondary, #bcc9dd); }
  #configure-view #yearly-decade-guide .decade-range-list { grid-auto-columns:max(72px,calc((100% - 36px)/7)); gap:6px; padding:0 0 8px; }
  #configure-view #yearly-decade-guide .decade-range { min-height:116px; padding:18px 4px 10px; gap:5px; text-align:center; border-radius:6px; }
  #configure-view #yearly-decade-guide .decade-ganzhi { font-size:13px; letter-spacing:0; white-space:nowrap; }
  #configure-view #yearly-decade-guide .decade-years-range { font:12px/1.4 var(--sans); }
  #configure-view #yearly-decade-guide .decade-years-range > span { display:block; }
  #configure-view #yearly-decade-guide .range-separator { display:none; }
  #configure-view #yearly-decade-guide .decade-range small { font-size:11px; color:var(--theme-text-secondary, #bcc9dd); overflow-wrap:anywhere; }
  #configure-view #yearly-decade-guide .decade-range em { top:3px; right:4px; font-size:10px; }
  #configure-view #yearly-decade-guide .selected-decade-panel { padding:0; }
  #configure-view #yearly-decade-guide .selected-decade-meta > div { flex-wrap:wrap; gap:6px 12px; }
  #configure-view #yearly-decade-guide .selected-decade-meta strong { font-size:14px; }
  #configure-view #yearly-decade-guide .selected-decade-meta span { font-size:12px; color:var(--theme-text-secondary, #bcc9dd); }
  #configure-view #yearly-decade-guide .decade-year-grid { grid-template-columns:repeat(5,minmax(0,1fr)); gap:8px; overflow:visible; padding:0; }
  #configure-view #yearly-decade-guide .decade-year { min-width:0; min-height:58px; padding:10px 4px; text-align:center; border-radius:6px; }
  #configure-view #yearly-decade-guide .decade-year strong { font:13px var(--sans); }
  #configure-view #yearly-decade-guide .decade-year small { font-size:11px; color:var(--theme-text-secondary, #bcc9dd); }
  #configure-view .option-section { padding:0 0 16px; }
  #configure-view .option-section + .option-section { padding-top:16px; }
  #configure-view .policy-note { font-size:12px; line-height:1.7; }
  #configure-view .generate-row { padding:16px 0; background:none; }
  #configure-view .generate-row p { max-width:560px; }
  #configure-view:has(#report-options-panel[hidden]):not(:has([data-new-side=male])) .configure-heading { min-height:0; }
  #configure-view:has(#report-options-panel[hidden]):not(:has([data-new-side=male])) .consultation-form { width:56%; margin:18px 0 0; }
  #configure-view:has(#report-options-panel[hidden]):not(:has([data-new-side=male])) .generate-row { flex-wrap:wrap; justify-content:flex-end; gap:16px; }
  #configure-view:has([data-new-side=male]) .profile-choice { flex-wrap:wrap; }
  #configure-view:has([data-new-side=male]) .profile-choice-actions { margin-left:auto; padding-bottom:10px; }

  /* My: compact functional column, balanced by the full celestial assembly. */
  #mine-view { padding-top:132px; padding-bottom:64px; }
  #mine-view > * { width:56%; }
  #mine-view .mine-heading { margin-top:0; margin-bottom:18px; }
  #mine-view .mine-heading h1 { font-size:42px; }
  #mine-view .mine-account-note { margin-bottom:28px; font-size:14px; }
  #mine-view .mine-shortcuts { gap:16px; }
  #mine-view .mine-shortcuts button { min-height:110px; padding:18px; gap:12px; }
  #mine-view .mine-shortcuts button:first-child { background:var(--theme-surface-library, #102c38); }
  #mine-view .mine-shortcuts strong { font-size:17px; }
  #mine-view .mine-group { margin-top:28px; }
  #mine-view .mine-group h2 { font-size:22px; margin-bottom:12px; }
  #mine-view .account-links button { min-height:58px; padding:16px 20px; font-size:15px; }
}
/* End desktop composition. */

.birth-section-label .birth-location-note { display:block; line-height:1.65; }

/* Reuse the existing dialog palette; equal actions fit narrow screens without shrinking type. */
.age-notice-dialog { width:420px; max-height:calc(100dvh - 32px); box-sizing:border-box; overflow-y:auto; font-family:var(--sans); }
.age-notice-dialog h2 { margin:0 0 16px; font:600 20px/1.5 var(--sans); }
.age-notice-dialog p { margin:0 0 16px; font-size:15px; }
.age-notice-dialog form > .age-notice-actions, #minor-age-dialog form > div { display:flex; gap:12px; margin-top:24px; }
.age-notice-dialog button { flex:1; min-width:0; min-height:48px; padding:10px 8px; font:500 14px/1.5 var(--sans); }
.age-notice-dialog button:focus-visible { outline:2px solid var(--theme-text-accent, var(--gold-bright)); outline-offset:3px; }
.age-notice-dialog #report-age-description { display:block; margin:0; }
