/* 金、銀、墨黑、灰、米、卡其、咖棕與墨綠。文字閱讀優先於裝飾。 */
:root { --forest: #263d35; --charcoal: #272a27; --silver: #e3e4de; --coffee: #6c5140; --khaki: #ded5c1; }
body { background: radial-gradient(ellipse at top right,#e1ddce 0,transparent 55%),linear-gradient(180deg,#f7f4ec,#eeeae1 700px); }
.topbar { background: rgba(251,249,242,.96); border-bottom: 1px solid #b6b5a9; box-shadow: 0 4px 22px rgba(39,42,39,.06); }
.top-actions a { text-decoration: none; background: #e3e4de; color: #333b34; border-color: #b7b9ae; }
.brand-banner { border-color: #a99c7b; box-shadow: 0 6px 24px rgba(39,42,39,.06); }
.identity-panel { background: linear-gradient(120deg,#fbf9f2,#e7e8df); border-color: #b5b9aa; }
.identity-heading h2 { color: #263d35; background: transparent; border: 0; padding-left: 0; }
.bazi-pillar { background: #f7f5ef; border-color: #b8b9aa; }
.bazi-pillar strong { color: #34382f; }
.tabs { background: #dedfd7; border-color: #b9b9ac; padding: 7px; gap: 5px; }
.tab { color: #50534a; background: #f7f5ed; border: 1px solid transparent; letter-spacing: .04em; }
.tab:hover { border-color: #9c9277; background: #eee4cf; }
.tab.active { background: #263d35; color: #fffaf0; box-shadow: 0 3px 9px rgba(38,61,53,.17); }
.button-primary { color: #fffaf0; background: #263d35; border-color: #263d35; }
.button-primary:hover { background: #3a5145; }
.reading-controls { border-color: #c4c4b7; background: #eeeee5; }
#app { --page-accent: #65502d; --page-fill: #eee2c9; --page-border: #b5a17b; }
#app[data-view="traditional"] { --page-accent: #263d35; --page-fill: #e3e8df; --page-border: #8e9e8e; }
#app[data-view="palaces"] { --page-accent: #6c5140; --page-fill: #eee1d1; --page-border: #bca38b; }
#app[data-view="time"] { --page-accent: #343a34; --page-fill: #e3e4de; --page-border: #a5ada0; }
#app[data-view="fortune"] { --page-accent: #5b472f; --page-fill: #e5dac4; --page-border: #aa9268; }
#app[data-view="almanac"] { --page-accent: #35483b; --page-fill: #e3e7da; --page-border: #9ba88e; }
#app[data-view="neuro"] { --page-accent: #434840; --page-fill: #e6e7e0; --page-border: #abb1a4; }
#app .card { border-color: var(--page-border); background: #fbf9f2; box-shadow: 0 5px 22px rgba(42,42,34,.045); }
#app h1 { width: 100%; margin: 0 0 18px; padding: 15px 18px; color: #fffaf0; background: var(--page-accent); border: 0; border-left: 4px solid #b79558; border-radius: 9px; font-size: clamp(23px,4vw,30px); letter-spacing: .08em; }
#app h2 { border: 0; border-left: 3px solid var(--page-border); border-radius: 0; background: transparent; color: var(--page-accent); padding: 5px 12px; margin-bottom: 16px; }
#app h3, #app h4 { background: transparent; border: 0; padding: 5px 0; color: var(--page-accent); }
#app details > summary { color: var(--page-accent); background: var(--page-fill); border-color: var(--page-border); border-radius: 8px; padding: 11px 13px; }
#app .palace-report > summary strong, #app .palace-report > summary span { color: var(--page-accent); }
#app .reading-glance > div { background: #f0ede4; border-color: #cbc3b1; border-top: 3px solid #aa9268; }
#app .reading-glance > div:nth-child(2) { background: #e8ede5; border-top-color: #60705e; }
#app .reading-glance > div:nth-child(3) { background: #e8e6df; border-top-color: #62675e; }
#app .reading-glance > div:nth-child(4) { background: #eee3d4; border-top-color: #94715a; }
#app .reading-glance dt { background: transparent; border: 0; padding: 0 0 7px; font-size: 13px; color: #4d473b; }
#app .reading-glance dd { color: #30342d; }
#app .traditional-palace { border-left: 4px solid #596f59; }
#app .traditional-palace > summary { background: #e5e9e0; }
.chart-grid .star.lu, .overlay-mark.lu { color: #263d35; background: #e0e8de; }
.chart-grid .star.quan, .overlay-mark.quan { color: #60491f; background: #eee0bd; }
.chart-grid .star.ke, .overlay-mark.ke { color: #3d4741; background: #e3e5df; }
.chart-grid .star.ji, .overlay-mark.ji { color: #f3eee1; background: #444641; }
.self-transform { border-color: #b7b9ae; background: #e8e9e2; }
.self-transform > strong, .self-transform small { color: #41473c; }
.decade-hua { background: #e8e9e1; border-color: #b2b7a8; }
.decade-hua > strong { background: #263d35; color: #f7f3e6; border-color: #263d35; }
.life-spectrum { margin: 16px 0; display: grid; gap: 12px; }
.spectrum-axis { padding: 12px; border: 1px solid #bdc1b1; border-radius: 10px; background: #eeeee5; }
.app-shell .spectrum-axis dt { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 8px; border: 0; background: transparent; padding: 0; color: #3b4538; font-size: 14px; }
.spectrum-axis dt > strong { border: 1px solid #9ba68e; background: #e1e7d8; color: #3d4f35; border-radius: 20px; padding: 5px 10px; font-size: 12px; }
.spectrum-axis dd { margin: 10px 0 0; }
.reader-spectrum ul { padding-left: 22px; line-height: 1.85; font-size: var(--reading-font); }
.reader-spectrum li + li { margin-top: 8px; }
.reflection-chain dl { display: grid; gap: 9px; margin: 16px 0; }
.reflection-chain dd { margin: 0 0 14px; line-height: 1.85; font-size: var(--reading-font); }
.fortune-views { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.fortune-palace[data-fortune-role="主角"] { border-top: 5px solid #7a5b35; }
.fortune-view { padding: 10px; border: 1px solid #c4b491; border-radius: 10px; background: #f3eee1; }
.fortune-view[data-fortune-view="xiong"], .fortune-view[data-fortune-view="huo"] { background: #e8e6dd; border-color: #b2b1a5; }
.fortune-view .report-prose { margin-top: 14px; }
.fortune-footer { text-align: center; color: #5b472f; border-top: 2px solid #aa9268; line-height: 1.8; }
#app .story-best { background: linear-gradient(135deg,#fffaf0,#eee2c9); border: 1px solid #ae8f52; box-shadow: 0 6px 28px rgba(107,82,42,.08); }
#app .story-best h2 { width: 100%; color: #f9eed9; background: #65502d; border: 0; padding: 15px; border-radius: 8px; }
#app .story-best h3 { color: #65502d; border-bottom: 1px solid #c8b17c; }
#app .story-worst { background: #272a27; border: 1px solid #7d8176; box-shadow: 0 9px 30px rgba(28,32,29,.15); }
#app .story-worst h2 { width: 100%; background: #dedfd7; color: #272a27; border: 0; border-radius: 8px; padding: 15px; }
#app .story-worst h3 { color: #dbc89a; border-bottom: 1px solid #6a6c60; }
#app .story-worst p { color: #e5e2d5; }
#app .story-worst details > summary { color: #e5e2d5; background: #363c35; border-color: #777b6c; }
.story-best article, .story-worst article { max-width: 720px; margin: 0 auto; }
.story-best article p, .story-worst article p { margin-bottom: 25px; font-size: var(--reading-font); line-height: 2; }
.story-basis { margin-top: 24px; }
.story-basis details { margin-top: 12px; }
.story-basis p { padding: 0 12px; }
.inline-topic { display: inline; padding: 3px 7px; border: 1px solid var(--page-border,#b5a17b); border-radius: 5px; background: var(--page-fill,#eee2c9); color: var(--page-accent,#65502d); font-weight: 700; line-height: 1.9; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
#app .reading-glance dt { display: inline-block; width: fit-content; padding: 3px 8px; margin-bottom: 12px; border: 1px solid #b6ae9c; border-radius: 5px; background: #e7e0cf; color: #494337; }
#app .reading-glance > div:nth-child(2) dt { background: #dce3d8; border-color: #a4b09d; color: #344532; }
#app .reading-glance > div:nth-child(3) dt { background: #d9dbd4; border-color: #a8aca1; color: #3d4339; }
#app .reading-glance > div:nth-child(4) dt { background: #e6d6c2; border-color: #b59c81; color: #5f4938; }
#app .life-reminder h3 { padding: 8px 11px; border-left: 3px solid var(--page-accent); border-radius: 5px; background: var(--page-fill); }
.chart-portrait p { font-size: var(--reading-font); line-height: 1.95; }
.button:focus-visible, .tab:focus-visible, summary:focus-visible { outline-color: #65502d; outline-offset: 3px; }
@media (max-width:700px) {
  .topbar { gap: 12px; padding: 10px 16px; flex-wrap: wrap; }
  .top-actions { flex-wrap: wrap; gap: 6px; }
  .top-actions .button { padding: 0 11px; }
  .tab { padding: 0 4px; min-width: 0; font-size: 13px; letter-spacing: 0; }
  .fortune-views { grid-template-columns: 1fr; }
  #app .card { padding: 16px; }
  #app .chart-card { padding: 12px 8px; }
  #app h1 { padding: 13px 14px; }
  .spectrum-axis dt { flex-wrap: wrap; }
}
