:root {
  color-scheme: light;
  --ink: #26231f;
  --muted: #81776d;
  --paper: #fffefa;
  --canvas: #f3efe8;
  --line: #e6ded2;
  --red: #8d302b;
  --red-dark: #68211f;
  --red-pale: #f7ebe6;
  --gold: #ad8b5d;
  --champagne: #c5ad87;
  --element-wood: #008000;
  --element-fire: #b00020;
  --element-earth: #7b3f00;
  --element-metal: #d4a000;
  --element-water: #003b8e;
  --element-wood-pale: #eaf5ec;
  --element-fire-pale: #fff0ef;
  --element-earth-pale: #fff5e7;
  --element-metal-pale: #fbf6df;
  --element-water-pale: #eaf3ff;
  --serif: 'Noto Serif SC', 'Songti SC', SimSun, serif;
  --sans: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --shadow-soft: 0 18px 46px #392d1e0b;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--canvas); }
body { margin: 0; color: var(--ink); font-family: var(--sans); background: radial-gradient(ellipse at 12% 0%, #fffaf2 0, transparent 44rem), var(--canvas); }
button, input { font: inherit; }
button { cursor: pointer; }
.app-shell { width: min(100% - 36px, 1000px); margin: 0 auto; padding: 34px 0 25px; }
.app-header { display: flex; align-items: center; gap: 17px; margin: 0 auto 28px; }
.brand-mark { display: grid; place-items: center; width: 56px; height: 56px; color: #fff9ed; font: 600 28px var(--serif); background: var(--red); border: 1px solid #be7465; outline: 1px solid #e3c6a5; outline-offset: -6px; box-shadow: 0 7px 18px #70212022; }
.eyebrow { margin: 0 0 5px; color: var(--gold); font-size: 10px; font-weight: 700; letter-spacing: .17em; }
.app-header h1 { margin: 0; font: 600 27px/1.25 var(--serif); letter-spacing: .08em; }
.header-subtitle { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.input-card { position: relative; padding: 23px 25px 20px; border: 1px solid #e9dfd2; background: #fffefa; box-shadow: 0 12px 32px #6045200c; }
.section-heading, .report-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.section-heading { margin-bottom: 21px; }
.section-heading h2, .report-toolbar h2 { margin: 0; font: 600 18px var(--serif); letter-spacing: .04em; }
.timezone-chip { padding: 7px 10px; color: #785c36; font-size: 11px; background: #f6f0e5; border: 1px solid #ece2d2; border-radius: 2px; }
.form-grid { display: grid; grid-template-columns: 1.1fr .72fr 1.15fr 1fr; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; color: #514a41; font-size: 12px; }
.field > span:first-child, .field legend { font-weight: 600; }
.field small { margin-left: 4px; color: #a49a8c; font-size: 10px; font-weight: 400; }
.field input[type="text"], .field input[type="date"], .field input[type="time"] { width: 100%; height: 42px; padding: 0 11px; border: 1px solid #e2dbd0; border-radius: 2px; outline: 0; color: #322f2b; background: #fff; font-size: 13px; }
.field-picker-trigger { width: 100%; min-height: 42px; padding: 0 11px; border: 1px solid #e2dbd0; border-radius: 2px; outline: 0; color: #322f2b; background: #fff; font-size: 13px; text-align: left; }
.field-picker-trigger:focus-visible { border-color: #b98468; box-shadow: 0 0 0 3px #a63b2512; }
.field input:focus { border-color: #b98468; box-shadow: 0 0 0 3px #a63b2512; }
.field-gender { margin: 0; padding: 0; border: 0; }
.field-gender legend { margin: 0 0 7px; padding: 0; }
.segmented-control { display: grid; grid-template-columns: 1fr 1fr; height: 42px; padding: 3px; border: 1px solid #e2dbd0; background: #f8f6f2; }
.segmented-control label { position: relative; display: grid; place-items: center; color: #756d63; font-size: 12px; cursor: pointer; }
.segmented-control input { position: absolute; opacity: 0; }
.segmented-control input:checked + span { width: 100%; height: 100%; display: grid; place-items: center; color: var(--red-dark); background: #fff; box-shadow: 0 1px 4px #3921131b; font-weight: 600; }
.segmented-control input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: -2px; }
.lunar-preview { display: flex; align-items: center; gap: 10px; min-height: 49px; margin-top: 16px; padding: 8px 11px; color: #665643; background: #f8f5ed; border-left: 2px solid #c6a365; }
.lunar-icon { display: grid; place-items: center; width: 27px; height: 27px; flex: 0 0 auto; border-radius: 50%; color: #fff; font: 500 13px var(--serif); background: #9b6c32; }
.lunar-preview strong, .lunar-preview small { display: block; }
.lunar-preview strong { font-size: 11px; font-weight: 600; }
.lunar-preview small { margin-top: 2px; color: #928575; font-size: 10px; }
.lunar-date { margin-left: auto; color: #504437; font: 500 13px var(--serif); }
.form-footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 16px; }
.form-message { margin: 0; color: #8e857a; font-size: 10px; line-height: 1.6; }
.form-message.error { color: #ad3430; }
.wheel-open { overflow: hidden; }
.wheel-overlay[hidden] { display: none !important; }
.wheel-overlay { position: fixed; z-index: 20; inset: 0; display: grid; place-items: center; padding: 20px; }
.wheel-backdrop { position: absolute; inset: 0; background: #2018128c; }
.wheel-dialog { position: relative; z-index: 1; width: min(100%, 470px); padding: 22px; border: 1px solid #e5d8c8; background: #fffdf9; box-shadow: 0 22px 70px #120b0870; }
.wheel-dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wheel-dialog-header .eyebrow { margin-bottom: 3px; }
.wheel-dialog-header h2 { margin: 0; color: #5b3428; font: 600 18px var(--serif); }
.wheel-close { width: 34px; height: 34px; border: 1px solid #e5dcd0; color: #76695b; background: #faf7f1; font-size: 22px; line-height: 1; }
.wheel-picker-hint { margin: 9px 0 14px; color: #918577; font-size: 11px; }
.wheel-columns { display: grid; grid-auto-columns: minmax(0, 1fr); grid-auto-flow: column; gap: 9px; }
.wheel-column-group { position: relative; min-width: 0; }
.wheel-column-label { display: block; margin-bottom: 6px; color: #9b8060; font-size: 10px; text-align: center; }
.wheel-column { position: relative; height: 176px; overflow-y: auto; padding: 66px 0; border: 1px solid #e6ddd1; background: #faf7f1; scroll-snap-type: y mandatory; overscroll-behavior: contain; touch-action: pan-y; -webkit-overflow-scrolling: touch; scrollbar-width: thin; scrollbar-color: #c8b69e transparent; }
.wheel-column:focus-visible { outline: 2px solid #b68b4b; outline-offset: 2px; }
.wheel-column::after { position: absolute; top: 66px; right: 0; left: 0; height: 44px; border-top: 1px solid #c9a77e; border-bottom: 1px solid #c9a77e; background: #c49a6320; content: ''; pointer-events: none; }
.wheel-option { display: grid; height: 44px; place-items: center; color: #817362; font: 14px var(--serif); scroll-snap-align: center; user-select: none; }
.wheel-option[aria-selected="true"] { color: #772b27; font-size: 17px; font-weight: 600; }
.wheel-dialog-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 17px; }
.wheel-cancel, .wheel-confirm { min-width: 80px; min-height: 38px; border: 1px solid #dcd0c1; font-size: 12px; }
.wheel-cancel { color: #665849; background: #fffdfa; }
.wheel-confirm { color: #fffaf3; border-color: var(--red); background: var(--red); }
.primary-button, .secondary-button { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 42px; padding: 0 17px; border: 0; border-radius: 2px; font-size: 12px; font-weight: 600; letter-spacing: .03em; }
.primary-button { flex: 0 0 auto; color: #fffaf3; background: var(--red); box-shadow: 0 4px 12px #81282522; }
.primary-button:hover { background: var(--red-dark); }
.report-section { margin-top: 33px; }
.report-toolbar { margin: 0 0 13px; }
.print-actions { display: flex; max-width: 250px; flex-direction: column; align-items: flex-end; gap: 5px; }
.report-export-buttons { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.save-pdf-button { color: #fffaf3; border-color: #315b57; background: #315b57; font-weight: 700; }
.save-pdf-button:hover { color: #fff; border-color: #244743; background: #244743; }
.pdf-download-link { color: #315b57; font-size: 12px; font-weight: 700; text-decoration: underline; }
.pdf-download-link[hidden] { display: none; }
.pdf-share-button { min-height: 28px; padding: 3px 9px; color: #315b57; border: 1px solid currentColor; background: transparent; font-size: 11px; font-weight: 700; cursor: pointer; }
.pdf-share-button[hidden] { display: none; }
.image-dialog { width: min(94vw, 560px); max-height: 92vh; padding: 18px; border: 1px solid #8b704a; background: #242824; color: #e6e1d5; font: 12px/1.5 var(--sans); }
.image-dialog::backdrop { background: #080b09c9; }
.image-dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.image-dialog h2 { margin: 0; color: #b2d7d7; font: 600 18px var(--serif); }
.image-dialog-header button { width: 34px; height: 34px; border: 1px solid #8b704a; background: #30332d; color: #fff; font-size: 23px; cursor: pointer; }
.image-dialog img { display: block; width: 100%; max-height: 58vh; margin: 12px auto; object-fit: contain; }
.image-dialog-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 9px; }
.image-dialog-actions a, .image-dialog-actions button { padding: 8px 10px; border: 1px solid #a3cacc; color: #c7e7e7; background: #30332d; font: 700 11px var(--sans); text-decoration: none; cursor: pointer; }
.image-dialog-actions [hidden] { display: none; }
.secondary-button:disabled { opacity: .6; cursor: wait; }
.print-message { margin: 0; color: #8e765a; font-size: 10px; line-height: 1.5; text-align: right; }
.print-message.error { color: #ad3430; }
.secondary-button { min-height: 37px; padding: 0 12px; color: #5f4938; border: 1px solid #dcd0c1; background: #fffdfa; }
.secondary-button:hover { border-color: #b9896c; background: #fff8ef; }
.report-viewport { overflow-x: auto; padding: 0 0 8px; }
.report-paper { width: 794px; min-height: 1123px; margin: 0 auto; padding: 39px 46px 27px; color: #352c25; background: var(--paper); border: 1px solid #e9e0d5; box-shadow: 0 14px 38px #46331e14; font-family: var(--serif); }
.paper-header { display: flex; align-items: center; gap: 15px; padding: 0 0 15px; border-bottom: 2px solid var(--red); }
.paper-emblem { display: grid; place-items: center; width: 43px; height: 43px; color: #fff7e8; font: 600 24px var(--serif); background: var(--red); outline: 1px solid #bc8c56; outline-offset: -5px; }
.paper-title-group { flex: 1; }
.paper-title-group p { margin: 0 0 3px; color: #aa8152; font: 600 9px var(--sans); letter-spacing: .18em; }
.paper-title-group h2 { margin: 0; color: #702321; font: 600 23px var(--serif); letter-spacing: .14em; }
.paper-seal { padding: 3px 6px; color: var(--red); border: 1px solid #c78675; text-align: center; font: 500 10px/1.3 var(--serif); }
.report-meta { display: grid; grid-template-columns: 1.12fr 1.35fr 1.2fr .7fr .68fr; margin-top: 10px; border: 1px solid #e5dcd0; background: #f7f2e9; }
.meta-item { min-height: 43px; padding: 7px 9px; border-right: 1px solid #e5dcd0; }
.meta-item:last-child { border-right: 0; }
.meta-label { display: block; color: #8d7c66; font: 500 8px var(--sans); letter-spacing: .08em; }
.meta-value { display: block; overflow: hidden; margin-top: 3px; color: #46382c; font: 500 11px var(--serif); text-overflow: ellipsis; white-space: nowrap; }
.paper-section { margin-top: 22px; }
.paper-section-heading { display: flex; align-items: baseline; gap: 8px; margin-bottom: 9px; }
.paper-section-heading > span { color: #b49360; font: 600 9px var(--sans); letter-spacing: .08em; }
.paper-section-heading h3 { margin: 0; color: #5b3428; font: 600 14px var(--serif); letter-spacing: .05em; white-space: nowrap; }
.paper-section-heading i { flex: 1; height: 1px; background: #e6dbca; }
.paper-section-heading small { color: #b2a493; font: 8px var(--sans); letter-spacing: .08em; white-space: nowrap; }
.pillars-wrap { overflow: hidden; border: 1px solid #dcd1c2; }
.pillars-table { width: 100%; border-collapse: collapse; table-layout: fixed; text-align: center; }
.pillars-table th { height: 29px; color: #fffaf1; background: var(--red); font: 500 10px var(--sans); letter-spacing: .08em; }
.pillars-table th:first-child { width: 62px; color: #efdbbb; background: #792422; }
.pillars-table td { height: 67px; padding: 7px 3px; border-right: 1px solid #e6ddd2; border-top: 1px solid #e6ddd2; }
.pillars-table tr td:last-child { border-right: 0; }
.pillars-table td:first-child { color: #84715b; background: #f7f2e9; font: 500 10px var(--sans); }
.pillars-table .day-column { background: #a8433c; }
.pillar-stem, .pillar-branch { display: block; color: #782d29; font: 600 25px/1.1 var(--serif); }
.pillar-branch { margin-top: 4px; color: #514236; }
.pillar-cell { display: flex; align-items: center; justify-content: center; gap: 14px; min-height: 34px; }
.pillar-cell .pillar-stem, .pillar-cell .pillar-branch { flex: 0 0 1em; margin: 0; }
.pillar-ten-god { min-width: 3em; color: #a65939; font: 600 10px var(--sans); text-align: left; }
.pillar-hidden-gods { display: flex; flex-direction: column; gap: 2px; text-align: left; }
.pillar-hidden-god { display: grid; grid-template-columns: 1em auto; align-items: center; gap: 5px; color: #786c5c; font: 9px var(--sans); white-space: nowrap; }
.pillar-hidden-god b { font-weight: 500; }
.pillar-hidden-god small { color: #a65939; font: 8px var(--sans); }
.pillar-wuxing { display: block; margin-top: 5px; color: #9a825f; font: 9px var(--sans); }
.table-note { margin: 7px 0 0; color: #988d80; font: 9px/1.5 var(--sans); }
.annual-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.annual-layout .annual-cards { display: contents; }
.noble-summary { display: flex; grid-column: 2; grid-row: 2; min-width: 0; flex-direction: column; justify-content: center; align-self: stretch; padding: 7px; border: 1px solid #e8e0d5; background: #fbf9f4; }
.noble-heading { display: flex; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.noble-heading strong { color: #45372b; font: 600 11px var(--serif); letter-spacing: .06em; }
.noble-heading span { color: #a08e75; font: 8px var(--sans); }
.noble-grid { display: grid; grid-template-columns: repeat(2, 52px); justify-content: center; gap: 5px; }
.noble-card { display: flex; width: 52px; aspect-ratio: 1; min-width: 0; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 4px; border: 1px solid #ebe4d9; background: #fffefa; text-align: center; }
.noble-card.found { border-color: #e5d5c4; background: #f8f3eb; }
.noble-name { color: #826744; font: 8px var(--sans); }
.noble-card strong { color: #4c4034; font: 600 8px/1.4 var(--sans); overflow-wrap: anywhere; }
.noble-card:not(.found) strong { color: #a29a8f; font-weight: 400; }
.twelve-star-section { margin-top: 17px; }
.twelve-star-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border: 1px solid #dbd0c0; }
.twelve-star-card { display: flex; min-width: 0; min-height: 65px; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border-right: 1px solid #e3d9cc; background: #fbf8f2; }
.twelve-star-card:last-child { border-right: 0; }
.twelve-star-card.current { background: #f9ece7; box-shadow: inset 0 3px var(--red); }
.twelve-star-label { color: #99846a; font: 8px var(--sans); }
.twelve-star-card strong { color: #782d29; font: 600 17px var(--serif); }
.twelve-star-card small { color: #847463; font: 8px var(--sans); }
.luck-section { margin-top: 18px; }
.luck-grid { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); border: 1px solid #dbd0c0; }
.luck-card { min-width: 0; min-height: 139px; padding: 8px 4px; border-right: 1px solid #e3d9cc; text-align: center; }
.luck-card:last-child { border-right: 0; }
.luck-card.current { background: #fbefea; box-shadow: inset 0 3px var(--red); }
.luck-age { color: #93836e; font: 8px var(--sans); white-space: nowrap; }
.luck-pillar { display: block; margin: 8px 0 4px; color: #782d29; font: 600 16px/1.45 var(--serif); }
.luck-years { color: #847463; font: 8px var(--sans); }
.luck-ten-god { display: block; margin-top: 5px; color: #a65939; font: 8px var(--sans); }
.luck-hidden { min-height: 23px; margin-top: 7px; color: #746958; font: 8px/1.5 var(--sans); word-break: break-all; }
.paper-bottom-grid { display: grid; grid-template-columns: 1fr 1fr; align-items: stretch; gap: 20px; margin-top: 20px; }
.paper-bottom-grid .paper-section { min-width: 0; margin-top: 0; }
.paper-bottom-grid .elements-section { display: flex; flex-direction: column; }
.paper-bottom-grid .paper-section-heading small { display: none; }
.annual-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.annual-card { min-height: 96px; padding: 9px; background: #f7f3eb; border: 1px solid #e8dfd2; }
.annual-card.current { background: #f9ece7; border-color: #e8cec6; }
.annual-label { display: block; color: #99846a; font: 9px var(--sans); }
.annual-value { display: block; margin-top: 5px; color: #6f2925; font: 600 17px var(--serif); }
.annual-sub { display: block; margin-top: 3px; color: #7f7468; font: 8px var(--sans); }
.annual-ten-gods { display: block; margin-top: 6px; color: #a65939; font: 8px/1.45 var(--sans); }
.element-chart { display: flex; flex-direction: column; gap: 5px; }
.element-row { display: grid; grid-template-columns: 21px 1fr 22px; align-items: center; gap: 6px; }
.element-name { color: #675d51; font: 10px var(--serif); }
.element-track { height: 9px; background: #f0ece5; }
.element-fill { height: 100%; min-width: 0; }
.element-count { color: #786e61; font: 9px var(--sans); text-align: right; }
.element-row[data-element="木"] .element-fill { background: #6c9c6d; }
.element-row[data-element="火"] .element-fill { background: #c86455; }
.element-row[data-element="土"] .element-fill { background: #bd8a49; }
.element-row[data-element="金"] .element-fill { background: #b7a16f; }
.element-row[data-element="水"] .element-fill { background: #698ea9; }
.paper-footer { display: flex; justify-content: space-between; gap: 12px; margin-top: 20px; padding-top: 8px; border-top: 1px solid #e9dfd3; color: #9b8d7c; font: 8px var(--sans); }
.screen-note { margin: 9px 1px 0; color: #95897b; font-size: 10px; text-align: center; }
.app-footer { display: flex; justify-content: space-between; gap: 12px; padding: 17px 2px 0; color: #a1978a; font-size: 10px; }

/* Modern quiet-luxury art direction: restrained ink, paper, cinnabar and champagne. */
body { background: radial-gradient(ellipse at 50% -18rem, #fffdf8 0, transparent 48rem), var(--canvas); }
.app-shell { width: min(100% - 48px, 1040px); padding-top: 48px; }
.app-header { gap: 20px; margin-bottom: 35px; }
.brand-mark { width: 54px; height: 54px; color: #fffaf2; background: var(--ink); border: 1px solid var(--champagne); outline-color: #fffaf2; box-shadow: none; }
.eyebrow { color: var(--gold); letter-spacing: .22em; }
.app-header h1 { color: #302720; font-size: 29px; letter-spacing: .14em; }
.header-subtitle { margin-top: 8px; color: #8c8174; letter-spacing: .025em; }
.input-card { padding: 29px 31px 26px; border: 1px solid #e7dfd3; border-top: 2px solid var(--ink); background: #fffefa; box-shadow: var(--shadow-soft); }
.section-heading { margin-bottom: 25px; }
.section-heading h2, .report-toolbar h2 { font-size: 20px; letter-spacing: .08em; }
.timezone-chip { color: #77644c; background: #f8f5ee; border-color: #ebe3d7; letter-spacing: .04em; }
.form-grid { gap: 18px; }
.field { gap: 9px; color: #514a41; }
.field input[type="text"], .field-picker-trigger { min-height: 46px; height: 46px; padding: 0 13px; border-color: #ded6ca; background: #fffefa; transition: border-color .18s ease, box-shadow .18s ease, background .18s ease; }
.field-picker-trigger:hover { border-color: #b49b78; background: #fffdf8; }
.field-picker-trigger:focus-visible { border-color: var(--gold); box-shadow: 0 0 0 3px #ad8b5d1a; }
.segmented-control { height: 46px; border-color: #ded6ca; background: #f8f6f1; }
.segmented-control input:checked + span { color: #fffaf2; background: var(--ink); box-shadow: none; }
.lunar-preview { min-height: 55px; margin-top: 20px; padding: 10px 14px; background: #f8f6f0; border-left: 2px solid var(--champagne); }
.lunar-icon { color: var(--ink); background: #e9dfcf; }
.lunar-date { color: #3d342a; font-size: 14px; }
.form-footer { margin-top: 20px; }
.primary-button, .secondary-button { min-height: 44px; letter-spacing: .07em; transition: transform .18s ease, background .18s ease, border-color .18s ease; }
.primary-button { color: #fffaf2; background: var(--ink); box-shadow: none; }
.primary-button:hover { background: var(--red-dark); transform: translateY(-1px); }
.wheel-dialog { border-color: #ddd2c1; box-shadow: 0 24px 80px #17130f55; }
.wheel-dialog-header h2 { color: var(--ink); letter-spacing: .06em; }
.wheel-column { border-color: #e5ddcf; background: #faf8f3; }
.wheel-column::after { border-color: var(--champagne); background: #c5ad8717; }
.wheel-option[aria-selected="true"] { color: var(--red); }
.wheel-confirm { border-color: var(--ink); background: var(--ink); }
.wheel-confirm:hover { background: var(--red-dark); }
.report-section { margin-top: 48px; }
.report-toolbar { margin-bottom: 17px; }
.secondary-button { color: #4e4438; border-color: #d9cdbb; background: #fffefa; }
.secondary-button:hover { border-color: var(--champagne); background: #f9f6ef; transform: translateY(-1px); }
.report-viewport { overflow-x: hidden; padding-bottom: 0; }
.report-paper { width: min(100%, 794px); max-width: 794px; min-height: 1123px; margin: 0 auto; padding: 39px 46px 27px; border: 1px solid #e5dccf; box-shadow: 0 20px 55px #392d1e12; }
.paper-header { gap: 17px; padding-bottom: 17px; border-bottom-color: var(--ink); }
.paper-emblem { color: #fffaf2; background: var(--ink); outline-color: var(--champagne); }
.paper-title-group p { color: var(--gold); letter-spacing: .22em; }
.paper-title-group h2 { color: #382c24; letter-spacing: .17em; }
.paper-seal { color: var(--red); border-color: var(--champagne); }
.report-meta { border-color: #e6ded2; background: #f8f6f0; }
.meta-item { border-color: #e6ded2; }
.paper-section { margin-top: 25px; }
.paper-section-heading { gap: 10px; margin-bottom: 11px; }
.paper-section-heading > span { color: var(--gold); letter-spacing: .12em; }
.paper-section-heading h3 { color: #3b3027; font-size: 15px; letter-spacing: .08em; }
.paper-section-heading i { background: #e5dccf; }
.pillars-wrap { border-color: #ded4c5; }
.pillars-table th { background: var(--ink); }
.pillars-table th:first-child { color: #e9ddc9; background: #413a31; }
.pillars-table .day-column { background: var(--red); }
.pillars-table tbody tr td:nth-child(4) { background: #f8f2ec; }
.pillars-table td { border-color: #e9e1d6; }
.pillars-table td:first-child { background: #f8f6f0; }
.pillar-stem { color: var(--red); font-size: 27px; }
.pillar-branch { color: #453a30; }
.pillar-main[data-element="木"], .pillar-hidden-god b[data-element="木"], .pillar-wuxing b[data-element="木"] { color: var(--element-wood); }
.pillar-main[data-element="火"], .pillar-hidden-god b[data-element="火"], .pillar-wuxing b[data-element="火"] { color: var(--element-fire); }
.pillar-main[data-element="土"], .pillar-hidden-god b[data-element="土"], .pillar-wuxing b[data-element="土"] { color: var(--element-earth); }
.pillar-main[data-element="金"], .pillar-hidden-god b[data-element="金"], .pillar-wuxing b[data-element="金"] { color: var(--element-metal); }
.pillar-main[data-element="水"], .pillar-hidden-god b[data-element="水"], .pillar-wuxing b[data-element="水"] { color: var(--element-water); }
.pillar-ten-god, .pillar-hidden-god small { color: #956944; }
.table-note { color: #8e8477; }
.twelve-star-grid { gap: 9px; border: 0; background: transparent; }
.twelve-star-card { min-height: 68px; padding: 10px 5px; border: 1px solid #e9e0d5; background: #fffefa; box-shadow: 0 4px 13px #33281a0c; transition: transform .18s ease, box-shadow .18s ease; text-align: center; }
.twelve-star-card:last-child { border-right: 1px solid #e9e0d5; }
.twelve-star-card:hover { transform: translateY(-2px); box-shadow: 0 8px 20px #33281a12; }
.twelve-star-card.current { border-color: #dfc8bb; background: #f8efeb; box-shadow: inset 0 2px var(--red), 0 7px 19px #67231d14; }
.twelve-star-card strong { color: var(--red); }
.luck-grid { gap: 9px; overflow: visible; border: 0; background: transparent; }
.luck-card { border: 1px solid #e9e0d5; background: #fffefa; box-shadow: 0 4px 13px #33281a0c; transition: transform .18s ease, box-shadow .18s ease; }
.luck-card:hover { transform: translateY(-2px); box-shadow: 0 8px 20px #33281a12; }
.luck-card.current { border-color: #dfc8bb; background: #f8efeb; box-shadow: inset 0 2px var(--red), 0 7px 19px #67231d14; }
.luck-pillar, .annual-value { color: var(--red); }
.luck-card { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 3px; padding: 10px 5px; }
.luck-age { color: #99846a; font-size: 8px; }
.luck-pillar { display: flex; justify-content: center; gap: 2px; margin: 7px 0 2px; font-size: 23px; line-height: 1.1; }
.luck-pillar b { font-weight: 600; }
.annual-value [data-element="木"], .luck-pillar b[data-element="木"] { color: var(--element-wood); }
.annual-value [data-element="火"], .luck-pillar b[data-element="火"] { color: var(--element-fire); }
.annual-value [data-element="土"], .luck-pillar b[data-element="土"] { color: var(--element-earth); }
.annual-value [data-element="金"], .luck-pillar b[data-element="金"] { color: var(--element-metal); }
.annual-value [data-element="水"], .luck-pillar b[data-element="水"] { color: var(--element-water); }
.luck-years { color: #8e8477; font-size: 8px; }
.luck-ten-god { color: #956944; font-size: 8px; }
.luck-hidden { min-height: 24px; margin-top: 4px; color: #8e8477; font-size: 7px; line-height: 1.5; overflow-wrap: anywhere; }
.annual-card { border: 0; border-top: 1px solid #e5dccf; background: #f8f6f0; }
.annual-card.current { border-color: #d9b8a8; background: #f6ede8; }
.element-track { background: #eeeae2; }
.element-row[data-element="木"] { --element-accent: var(--element-wood); --element-pale: var(--element-wood-pale); }
.element-row[data-element="火"] { --element-accent: var(--element-fire); --element-pale: var(--element-fire-pale); }
.element-row[data-element="土"] { --element-accent: var(--element-earth); --element-pale: var(--element-earth-pale); }
.element-row[data-element="金"] { --element-accent: var(--element-metal); --element-pale: var(--element-metal-pale); }
.element-row[data-element="水"] { --element-accent: var(--element-water); --element-pale: var(--element-water-pale); }
.element-row .element-name { color: var(--element-accent); font-weight: 600; }
.element-row .element-track { background: var(--element-pale); }
.element-row .element-fill { background: linear-gradient(90deg, var(--element-accent), color-mix(in srgb, var(--element-accent), white 20%)); box-shadow: 0 1px 6px color-mix(in srgb, var(--element-accent), transparent 62%); }
.paper-footer { border-top-color: #ded4c5; }
.screen-note { margin-top: 13px; }

/* Bright coral, apricot and jade palette, shared by screen and print. */
:root {
  --ink: #563749;
  --muted: #896779;
  --paper: #fffefd;
  --canvas: #fff2eb;
  --line: #f1d5ce;
  --red: #d83f57;
  --red-dark: #b92945;
  --red-pale: #fff0ee;
  --gold: #b96718;
  --champagne: #f2b36d;
  --shadow-soft: 0 18px 46px #de694217;
}
body { background: radial-gradient(ellipse at 0 0, #ffdfc7 0, transparent 42rem), radial-gradient(ellipse at 100% 28rem, #e2f4ee 0, transparent 38rem), var(--canvas); }
.brand-mark, .paper-emblem { background: linear-gradient(145deg, #ef6c43, #d83f57); border-color: #f0a16e; outline-color: #ffe5ba; box-shadow: 0 6px 18px #d83f5724; }
.app-header h1, .paper-title-group h2 { color: #bb3650; }
.header-subtitle, .field { color: #80576a; }
.input-card { border-color: #f2d9ce; border-top-color: #ed7855; background: #fffefd; }
.section-heading h2, .report-toolbar h2, .paper-section-heading h3 { color: #ae3e59; }
.timezone-chip { color: #9c531d; border-color: #f4d2aa; background: #fff2dd; }
.field input[type="text"], .field-picker-trigger { border-color: #eed5d0; background: #fffaf7; color: #644459; }
.field-picker-trigger:hover { border-color: #e58475; background: #fff3ed; }
.field input:focus, .field-picker-trigger:focus-visible { border-color: #db6074; box-shadow: 0 0 0 3px #e45f721c; }
.segmented-control { border-color: #efd3cd; background: #fff0e9; }
.segmented-control input:checked + span { color: #fff; background: var(--red); }
.lunar-preview { background: #eaf7f0; border-left-color: #36a37f; color: #327b64; }
.lunar-icon { background: #329a77; color: #fff; }
.lunar-date { color: #28785f; }
.primary-button, .wheel-confirm { color: #fff; background: linear-gradient(120deg, #d83f57, #cf4c27); border-color: #d83f57; box-shadow: 0 5px 16px #d83f5729; }
.primary-button:hover, .wheel-confirm:hover { background: var(--red-dark); }
.secondary-button, .wheel-cancel { color: #bc3651; border-color: #edb4be; background: #fff1f3; }
.secondary-button:hover { background: #ffe5ea; border-color: #df7e91; }
.wheel-dialog { background: #fffaf7; border-color: #efc4bb; }
.wheel-dialog-header h2 { color: #bc3651; }
.wheel-column { background: #fff1e8; border-color: #f0d2bd; scrollbar-color: #e89e86 transparent; }
.wheel-column::after { background: #f18d7718; border-color: #edab93; }
.wheel-close { color: #c74260; background: #fff0ee; border-color: #efc7c3; }
.paper-header { border-bottom-color: #e77357; }
.report-paper, .pillars-wrap { border-color: #f0d3c7; }
.report-meta, .pillars-table td:first-child { background: #fff3e5; }
.pillars-table th { background: #ce5265; }
.pillars-table th:first-child { background: #b53f56; color: #fff3db; }
.pillars-table .day-column { background: #b63850; }
.pillars-table tbody tr td:nth-child(4) { background: #fff3eb; }
.paper-section-heading i { background: linear-gradient(90deg, #efaa82, #f6e6db); }
.twelve-star-grid { background: #f0d7d2; }
.twelve-star-card { background: #fff6ef; }
.twelve-star-card.current { background: #ffe5df; }
.luck-card { background: #fffbf5; border-color: #f1d7c4; box-shadow: 0 5px 15px #d9764312; }
.luck-card.current { background: #ffe8df; border-color: #ecad96; }
.annual-card { background: #edf8f2; border-color: #a9d9c1; }
.annual-card.current { background: #fff0e1; border-color: #eab77f; }
.noble-summary { background: #fff0f3; border-color: #f0ced6; }
.noble-heading strong { color: #ae3e59; }
.noble-card { background: #fffcfd; border-color: #eed5dd; }
.noble-card.found { background: #e4f6ee; border-color: #9ed7bd; }
.noble-card.found strong { color: #267454; }
.noble-name { color: #a94469; }
.paper-seal { border-color: #e99682; }
.paper-footer { border-top-color: #eed0c4; }
@media (max-width: 760px) {
  .app-shell { width: min(100% - 30px, 580px); padding-top: 25px; }
  .app-header { margin-bottom: 24px; }
  .input-card { padding: 21px 19px 19px; }
  .report-section { margin-top: 34px; }
  .report-paper { width: 100%; min-height: 0; padding: 27px 24px 20px; }
  .report-meta { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .meta-item { min-width: 0; }
  .meta-item:nth-child(3) { border-right: 0; }
  .meta-item:nth-child(n + 4) { border-top: 1px solid #e6ded2; }
  .luck-grid { display: flex; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scrollbar-color: #c5ad87 transparent; scrollbar-width: thin; }
  .luck-card { flex: 0 0 88px; scroll-snap-align: start; }
  .paper-bottom-grid { gap: 20px; }
}

@media (max-width: 520px) {
  .app-shell { width: min(100% - 24px, 440px); padding-top: 20px; }
  .app-header { gap: 14px; }
  .brand-mark { width: 46px; height: 46px; font-size: 23px; }
  .app-header h1 { font-size: 23px; }
  .header-subtitle { max-width: 26em; font-size: 10px; line-height: 1.6; }
  .input-card { padding: 18px 14px 15px; }
  .section-heading { align-items: flex-end; gap: 8px; margin-bottom: 18px; }
  .section-heading h2, .report-toolbar h2 { font-size: 17px; }
  .timezone-chip { padding: 6px 7px; font-size: 9px; white-space: nowrap; }
  .form-grid { gap: 13px 9px; }
  .field { font-size: 11px; }
  .field input[type="text"], .field-picker-trigger { min-height: 44px; height: 44px; padding: 0 9px; font-size: 12px; }
  .lunar-preview { flex-wrap: wrap; gap: 8px; padding: 9px; }
  .lunar-date { width: 100%; margin: 0 0 0 35px; font-size: 12px; }
  .form-footer { align-items: stretch; flex-direction: column; }
  .form-message { max-width: none; }
  .primary-button { width: 100%; }
  .report-toolbar { align-items: flex-end; gap: 9px; }
  .print-actions { max-width: none; }
  .secondary-button { min-height: 39px; padding: 0 9px; font-size: 10px; white-space: nowrap; }
  .report-paper { padding: 20px 12px 16px; }
  .paper-header { gap: 10px; padding-bottom: 12px; }
  .paper-emblem { width: 38px; height: 38px; font-size: 21px; }
  .paper-title-group p { font-size: 7px; }
  .paper-title-group h2 { font-size: 17px; letter-spacing: .09em; }
  .paper-seal { padding: 2px 4px; font-size: 8px; }
  .report-meta { margin-top: 8px; }
  .meta-item { min-height: 39px; padding: 6px; }
  .meta-value { font-size: 9px; }
  .paper-section { margin-top: 19px; }
  .paper-section-heading { gap: 6px; margin-bottom: 8px; }
  .paper-section-heading h3 { font-size: 13px; }
  .paper-section-heading small { font-size: 6px; letter-spacing: .04em; }
  .pillars-table th { height: 27px; font-size: 8px; }
  .pillars-table th:first-child { width: 38px; }
  .pillars-table td { height: 59px; padding: 5px 1px; }
  .pillars-table td:first-child { font-size: 8px; }
  .pillar-stem, .pillar-branch { font-size: 22px; }
  .pillar-cell { gap: 2px; min-height: 29px; }
  .pillar-cell .pillar-stem, .pillar-cell .pillar-branch { flex-basis: .85em; }
  .pillar-ten-god { min-width: 0; font-size: 7px; line-height: 1.15; overflow-wrap: anywhere; }
  .pillar-hidden-gods { gap: 1px; }
  .pillar-hidden-god { grid-template-columns: .85em minmax(0, auto); gap: 2px; font-size: 7px; }
  .pillar-hidden-god small { font-size: 6px; white-space: normal; }
  .pillar-wuxing { font-size: 7px; }
  .table-note { font-size: 8px; line-height: 1.45; }
  .twelve-star-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .twelve-star-card { min-height: 58px; }
  .twelve-star-card strong { font-size: 15px; }
  .noble-grid { grid-template-columns: repeat(2, 48px); gap: 4px; }
  .noble-card { width: 48px; }
  .noble-card strong { font-size: 7px; }
  .luck-card { flex-basis: 78px; padding: 7px 3px; }
  .paper-bottom-grid { grid-template-columns: 1fr; gap: 18px; margin-top: 18px; }
  .annual-cards { gap: 6px; }
  .annual-card { min-height: 84px; padding: 8px; }
  .annual-sub, .annual-ten-gods { font-size: 7px; }
  .paper-footer { flex-direction: column; gap: 4px; margin-top: 15px; font-size: 7px; }
  .screen-note { font-size: 9px; }
  .app-footer { flex-direction: column; gap: 5px; }
}

@media (max-width: 760px) {
  .app-shell { width: min(100% - 26px, 580px); padding-top: 22px; }
  .app-header { margin-bottom: 21px; }
  .brand-mark { width: 49px; height: 49px; font-size: 25px; }
  .app-header h1 { font-size: 24px; }
  .header-subtitle { font-size: 11px; }
  .input-card { padding: 18px 16px 16px; }
  .form-grid { grid-template-columns: 1fr 1fr; gap: 14px 11px; }
  .field-name { grid-column: 1 / -1; }
  .timezone-chip { font-size: 9px; }
  .form-footer { align-items: flex-end; }
  .form-message { max-width: 51%; }
  .primary-button { padding: 0 12px; font-size: 11px; }
  .report-section { margin-top: 27px; }
  .report-paper { margin: 0; }
  .app-footer { font-size: 9px; }
}

@media (max-width: 390px) {
  .app-shell { width: calc(100% - 20px); }
  .input-card { padding-right: 12px; padding-left: 12px; }
  .timezone-chip { padding: 6px 7px; }
  .form-footer { align-items: stretch; flex-direction: column; }
  .form-message { max-width: none; }
  .primary-button { width: 100%; }
  .report-toolbar { align-items: flex-end; }
  .secondary-button { gap: 6px; padding: 0 8px; font-size: 10px; }
  .wheel-overlay { align-items: end; padding: 0; }
  .wheel-dialog { width: 100%; padding: 20px 17px max(20px, env(safe-area-inset-bottom)); border-right: 0; border-bottom: 0; border-left: 0; }
}

@page { size: A4 portrait; margin: 0; }
@media print {
  html, body { width: auto; min-width: 0; background: #fff; }
  body { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .app-shell { width: auto; margin: 0; padding: 0; }
  .app-header, .input-card, .report-toolbar, .screen-note, .app-footer, .image-dialog { display: none !important; }
  .report-section { display: block !important; margin: 0; }
  .report-viewport { overflow: visible; padding: 0; }
  .wheel-overlay { display: none !important; }
  .report-paper { display: flex; width: 210mm; height: 297mm; min-height: 297mm; flex-direction: column; justify-content: space-between; margin: 0; padding: 8mm 13mm; border: 0; box-shadow: none; break-after: avoid-page; }
  .paper-header { padding-bottom: 4mm; }
  .report-meta { margin-top: 3mm; }
  .paper-section { flex-shrink: 0; margin-top: 3mm; }
  .twelve-star-section { margin-top: 3mm; }
  .pillars-table td { height: 11mm; }
  .twelve-star-card { min-height: 17mm; }
  .twelve-star-card, .twelve-star-card.current { box-shadow: none; transform: none; }
  .luck-card { min-height: 34mm; }
  .paper-bottom-grid { flex-shrink: 0; margin-top: 3mm; }
  .paper-footer { flex-shrink: 0; margin-top: 3mm; }
  .paper-section, .paper-bottom-grid, .paper-footer { break-inside: avoid; }
  .luck-grid { display: grid; overflow: visible; gap: 1px; }
  .luck-card, .luck-card.current { box-shadow: none; transform: none; }
  .twelve-star-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .paper-bottom-grid { grid-template-columns: 1fr 1fr; }
  .annual-layout { grid-template-columns: 1fr 1fr; gap: 1mm; }
  .noble-summary { padding: 1mm; }
  .noble-grid { grid-template-columns: repeat(2, 11mm); gap: 1mm; }
  .noble-card { width: 11mm; height: 11mm; min-height: 0; aspect-ratio: 1; gap: .5mm; padding: .5mm; }
  .noble-name { font-size: 5.5px; }
  .noble-card strong { font-size: 5px; line-height: 1.15; }
}

/* Screen report: annual ratings follow the five-element chart; monthly detail remains below. */
.report-paper-second { display: flex; flex-direction: column; margin-top: 24px; }
.report-paper-second .paper-footer { margin-top: auto; }
.fortune-panel { width: min(100%, 540px); margin: 36px auto 0; }
.annual-compact { margin-top: 18px; padding-top: 0; }
.annual-compact .paper-section-heading { align-items: center; margin-bottom: 5px; }
.annual-compact .fortune-year-select { flex: 0 0 auto; width: 78px; height: 26px; margin: 0; padding: 2px 4px; border-radius: 5px; font-size: 11px; }
.annual-compact .fortune-ratings { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; margin-top: 6px; }
.annual-compact .fortune-ratings > div { min-width: 0; min-height: 24px; gap: 3px; padding: 3px 5px; border: 1px solid #efd9ce; border-radius: 3px; font-size: 9px; }
.annual-compact .fortune-ratings strong { font-size: 11px; letter-spacing: 0; white-space: nowrap; }
.annual-compact .fortune-note { margin-top: 4px; font-size: 7.5px; }
.fortune-year-label { display: block; margin: 24px 0 8px; text-align: center; color: #755c50; font: 12px var(--sans); }
.fortune-year-select { display: block; width: 110px; margin: 0 auto; padding: 7px 10px; border: 1px solid #dcb5ac; border-radius: 8px; background: #fffaf7; color: #b63850; font: 700 15px var(--sans); cursor: pointer; }
.fortune-year-select:focus-visible { outline: 2px solid #d83f57; outline-offset: 3px; }
.fortune-selected-year { display: none; }
.fortune-ratings { display: grid; gap: 0; margin-top: 24px; }
.fortune-ratings > div { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 13px 16px; border-bottom: 1px solid #efd9ce; font: 14px var(--sans); }
.fortune-ratings > div:first-child { color: #ad3852; background: #fff3ed; font-weight: 700; }
.fortune-ratings strong { color: #b96718; letter-spacing: .12em; }
.fortune-explanation { margin-top: 25px; padding: 17px 20px; border: 1px solid #efd9ce; border-radius: 9px; background: #fffaf6; }
.fortune-explanation h4 { margin: 0 0 11px; color: #ae3e59; font: 600 16px var(--serif); }
.fortune-explanation p { margin: 0 0 9px; color: #55443c; font: 12px/1.7 var(--sans); }
.fortune-explanation p:first-child { font-weight: 600; }
.fortune-explanation .fortune-explanation-method { margin: 11px 0 0; color: #8e765a; font-size: 10px; }
.fortune-note { margin-top: 18px; }
@media print {
  /* The on-screen monthly report is intentionally excluded from PDF/print. */
  .report-paper-second { display: none !important; }
  .fortune-panel { margin-top: 7mm; }
  .fortune-year-label { display: none; }
  .fortune-year-select { display: none; }
  .fortune-selected-year { display: block; text-align: center; margin: 5mm 0 0; font: 600 17px var(--serif); }
  .fortune-ratings { margin-top: 4mm; }
  .fortune-ratings > div { padding: 2mm 4mm; font-size: 11px; }
  .fortune-explanation { margin-top: 4mm; padding: 3mm 4mm; break-inside: avoid; }
  .fortune-explanation h4 { margin-bottom: 2mm; font-size: 12px; }
  .fortune-explanation p { margin-bottom: 1.5mm; font-size: 8.5px; line-height: 1.35; }
  .fortune-explanation .fortune-explanation-method { margin-top: 2mm; font-size: 8px; }
}

.term-trigger { min-height: 24px; min-width: 24px; padding: 2px; border: 0; border-radius: 3px; background: transparent; color: inherit; font: inherit; text-decoration: underline dotted currentColor; text-underline-offset: 3px; cursor: help; }
.term-trigger:hover { color: #b63850; background: #fff0e5; }
.term-trigger:focus-visible, .term-dialog-close:focus-visible { outline: 2px solid #b63850; outline-offset: 2px; }
.term-dialog { width: min(92vw, 460px); max-height: min(85vh, 620px); overflow-y: auto; padding: 22px 24px 20px; border: 1px solid #e7cbb8; border-radius: 12px; background: #fffdf8; color: #3b3028; box-shadow: 0 18px 56px #30211c45; font-family: var(--sans); }
.term-dialog::backdrop { background: #21191499; }
.term-dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.term-dialog-header h2 { margin: 0; color: #83352e; font: 600 21px var(--serif); }
.term-dialog-close { width: 34px; height: 34px; border: 1px solid #e6d4c9; border-radius: 50%; background: #fff8f2; color: #704b43; font: 25px/1 var(--sans); cursor: pointer; }
.term-dialog h3 { margin: 17px 0 6px; color: #8a5448; font: 600 12px var(--sans); }
.term-dialog p { margin: 0; font: 13px/1.7 var(--sans); }
.term-dialog .term-dialog-note { margin-top: 20px; padding-top: 12px; border-top: 1px solid #f1e4da; color: #89776c; font-size: 11px; }
@media (max-width: 480px) {
  .term-dialog { padding: 18px; }
  .term-trigger { min-width: 30px; min-height: 30px; }
}
@media print {
  .term-dialog { display: none !important; }
  .term-trigger { min-width: 0; min-height: 0; padding: 0; text-decoration: none; cursor: auto; }
}

.report-section[hidden], .report-paper-second[hidden], .monthly-panel[hidden] { display: none !important; }
.time-clear-button { float: right; padding: 0; border: 0; background: transparent; color: #b63850; font: 11px var(--sans); text-decoration: underline; cursor: pointer; }
.time-clear-button[hidden] { display: none; }
.time-clear-button:focus-visible { outline: 2px solid #b63850; outline-offset: 2px; }
.brand-mark {
  display: block;
  flex: 0 0 auto;
  width: 64px;
  height: 64px;
  padding: 0;
  border: 0;
  border-radius: 5px;
  outline: 0;
  background: #fffaf3;
  box-shadow: 0 4px 12px #8d302b1c;
}
.paper-emblem-logo { display: block; flex: 0 0 auto; width: 48px; height: 48px; border: 0; outline: 0; background: #4d2633; box-shadow: none; }
.brand-mark, .paper-emblem-logo { object-fit: cover; clip-path: circle(47% at 50% 50%); }
.time-field-heading { display: flex; align-items: center; justify-content: space-between; gap: 5px; min-height: 17px; white-space: nowrap; }
.time-input-row { display: flex; align-items: center; gap: 9px; min-width: 0; }
.time-input-row .field-picker-trigger { flex: 1 1 auto; min-width: 0; }
.unknown-time-option { display: inline-flex; align-items: center; gap: 3px; color: #80576a; font-size: 10px; font-weight: 400; cursor: pointer; }
.time-input-row .unknown-time-option { flex: 0 0 auto; white-space: nowrap; }
.unknown-time-option input { width: 14px; height: 14px; margin: 0; accent-color: #bd3751; cursor: pointer; }
.unknown-time-option input:focus-visible { outline: 2px solid #bd3751; outline-offset: 2px; }
.field-picker-trigger:disabled { color: #a79b94; background: #f5f1ee; border-color: #e5ddd8; cursor: not-allowed; }
.page-watermark { position: fixed; z-index: 10; top: 50%; left: 50%; width: min(100vw, 100vh); height: min(100vw, 100vh); transform: translate(-50%, -50%); object-fit: contain; clip-path: circle(47% at 50% 50%); opacity: .07; pointer-events: none; user-select: none; }
@media print {
  .page-watermark { width: 190mm; height: 190mm; opacity: .05; }
}
@media (max-width: 520px) {
  .brand-mark { width: 58px; height: 58px; }
  .paper-emblem-logo { width: 42px; height: 42px; }
  .field-time { grid-column: 1 / -1; }
  .form-footer { align-items: stretch; flex-direction: column; }
  .form-message { max-width: none; }
}
.monthly-panel { margin-top: 28px; padding: 22px; border: 1px solid #efd9ce; border-radius: 12px; background: #fffdf9; }
.fortune-panel .monthly-panel { margin-top: 24px; }
.monthly-panel-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.monthly-panel h3 { margin: 0; color: #9b3b50; font: 600 22px var(--serif); }
.monthly-panel-heading span, .monthly-note, .uncertain-note { color: #846e67; font: 12px/1.6 var(--sans); }
.monthly-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin: 18px 0; }
.monthly-item { border: 1px solid #e9d8cf; border-radius: 8px; background: white; }
.monthly-item summary { display: flex; justify-content: space-between; gap: 8px; padding: 12px; cursor: pointer; list-style: none; font: 600 13px var(--sans); }
.monthly-item summary::-webkit-details-marker { display: none; }
.monthly-item summary strong, .monthly-ratings strong { color: #b96718; letter-spacing: .08em; }
.monthly-item[open] { grid-column: 1 / -1; }
.monthly-detail { padding: 0 13px 13px; font: 12px/1.6 var(--sans); }
.monthly-ratings { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px 18px; }
.monthly-ratings > div { display: flex; justify-content: space-between; gap: 8px; border-bottom: 1px solid #f1e4da; }
.monthly-detail p { margin: 12px 0 0; }
.monthly-terms { color: #846e67; font-size: 11px; overflow-wrap: anywhere; }
.unavailable-card { padding: 12px; color: #846e67; text-align: center; }
.print-year-overview { display: none; }
@media (max-width: 650px) {
  .monthly-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 420px) {
  .monthly-panel { padding: 14px; }
  .monthly-list { grid-template-columns: 1fr; }
  .monthly-ratings { grid-template-columns: 1fr; }
}
@media print {
  .annual-compact { display: block; margin-top: 2mm; padding-top: 0; }
  .annual-compact .paper-section-heading { margin-bottom: 1mm; }
  .annual-compact .fortune-selected-year { display: block; margin: 0; text-align: left; font: 600 9px var(--sans); }
  .annual-compact .fortune-ratings { gap: .6mm; margin-top: 1mm; }
  .annual-compact .fortune-ratings > div { min-height: 0; padding: .6mm 1mm; font-size: 8px; }
  .annual-compact .fortune-ratings strong { font-size: 8px; }
  .annual-compact .fortune-note { display: none; }
  #report { break-after: avoid-page; page-break-after: auto; }
  /* The separate monthly summary pushed the first report onto another sheet. */
  .print-year-overview { display: none !important; }
  .print-year-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 4mm; margin-bottom: 1.5mm; }
  .print-year-heading strong { color: #ae3e59; font-size: 11px; white-space: nowrap; }
  .print-year-heading > span { overflow: hidden; color: #806b62; font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
  .print-annual-ratings { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1mm 2mm; }
  .print-annual-ratings { display: none; }
  .print-annual-ratings > div, .print-monthly-ratings > div { display: flex; align-items: center; justify-content: space-between; gap: 1mm; min-width: 0; padding: .8mm 1mm; border: 1px solid #f1e4da; font-size: 9px; white-space: nowrap; }
  .print-annual-ratings strong, .print-monthly-ratings strong { color: #b96718; font-size: 10px; letter-spacing: -.04em; }
  .print-monthly-heading { margin: 1.5mm 0 .5mm; color: #85596a; font-size: 8px; font-weight: 600; }
  .print-monthly-ratings { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1mm; }
  .report-section[hidden] { display: none !important; }
  .report-paper-second[hidden] { display: none !important; }
  .partial-report #report { break-after: avoid-page; page-break-after: auto; }
}

/* Parchment, jade and cinnabar palette inspired by the four-symbol artwork. */
:root {
  --ink: #283b39;
  --muted: #766a59;
  --paper: #fffaf0;
  --canvas: #f3e8d3;
  --line: #d8c6a6;
  --red: #a34f34;
  --red-dark: #763925;
  --red-pale: #f7ead8;
  --gold: #9a713d;
  --champagne: #c9aa72;
  --shadow-soft: 0 18px 46px #44392618;
}
html, body { background: #f3e8d3; }
body { color: var(--ink); background: radial-gradient(ellipse at 0 0, #faefd9 0, transparent 44rem), radial-gradient(ellipse at 100% 38rem, #dce9de 0, transparent 42rem), var(--canvas); }
.app-header h1, .paper-title-group h2 { color: #274747; }
.header-subtitle, .field, .form-message, .app-footer { color: #756957; }
.eyebrow, .paper-title-group p { color: #9a713d; }
.input-card { border-color: #d9c7a8; border-top-color: #a45135; background: #fffaf0; }
.section-heading h2, .report-toolbar h2, .paper-section-heading h3 { color: #315353; }
.timezone-chip { color: #765431; border-color: #d9bf91; background: #f8eed9; }
.field input[type="text"], .field-picker-trigger { color: #314441; border-color: #dac8a9; background: #fffdf6; }
.field-picker-trigger:hover { border-color: #b99a67; background: #fff8e8; }
.field input:focus, .field-picker-trigger:focus-visible { border-color: #668b7d; box-shadow: 0 0 0 3px #668b7d29; }
.segmented-control { border-color: #dbc8a7; background: #f4ead8; }
.segmented-control input:checked + span { color: #fff9ed; background: #355958; }
.lunar-preview { color: #315f58; border-left-color: #5f8776; background: #e9f0e7; }
.lunar-icon { color: #fffdf3; background: #44766d; }
.lunar-date { color: #315f58; }
.primary-button, .wheel-confirm { color: #fff8e8; border-color: #284c4b; background: linear-gradient(120deg, #315b57, #244442); box-shadow: 0 5px 16px #2444422b; }
.primary-button:hover, .wheel-confirm:hover { background: #1f3b39; }
.secondary-button, .wheel-cancel { color: #375b55; border-color: #c4b18e; background: #faf1df; }
.secondary-button:hover { border-color: #9d855c; background: #f3e4c9; }
.wheel-dialog { border-color: #d8c5a5; background: #fffaf0; }
.wheel-dialog-header h2 { color: #315353; }
.wheel-column { border-color: #d9c7a7; background: #f8eedb; }
.wheel-column::after { border-color: #bb9c6c; background: #b89c7021; }
.paper-header { border-bottom-color: #a45135; }
.report-paper, .pillars-wrap { border-color: #d9c7a8; }
.report-meta, .pillars-table td:first-child { background: #f7eedb; }
.pillars-table th, .pillars-table th:first-child { color: #fff9eb; background: #315553; }
.pillars-table .day-column { background: #9d5038; }
.pillars-table tbody tr td:nth-child(4) { background: #fff4e5; }
.paper-section-heading i { background: linear-gradient(90deg, #b98a5b, #e7d8bb); }
.twelve-star-grid { background: transparent; }
.twelve-star-card, .twelve-star-card:last-child { border-color: #ddcbaa; background: #fffbf2; box-shadow: 0 5px 15px #6c583a16; }
.twelve-star-card.current { border-color: #c59b76; background: #f5e7d0; box-shadow: inset 0 2px var(--red), 0 7px 19px #67231d14; }
.luck-card { border-color: #ddcbaa; background: #fffbf2; box-shadow: 0 5px 15px #6c583a16; }
.luck-card.current { border-color: #c59b76; background: #f5e7d0; }
.annual-card { border-color: #b6cdbc; background: #edf3eb; }
.annual-card.current { border-color: #d5b88a; background: #f9edd8; }
.noble-summary { border-color: #dcc7aa; background: #f7ecda; }
.noble-heading strong { color: #315353; }
.noble-card { border-color: #ddcba9; background: #fffaf0; }
.noble-card.found { border-color: #9fc4aa; background: #e8f2e8; }
.fortune-year-select { color: #315553; border-color: #cbb58c; background: #fff9ed; }
.fortune-ratings > div { border-bottom-color: #deceb0; }
.fortune-ratings > div:first-child { color: #8e4b31; background: #f8ead4; }
.fortune-ratings strong, .monthly-item summary strong, .monthly-ratings strong { color: #a66d2f; }
.fortune-explanation, .monthly-panel { border-color: #ddc9a5; background: #fffaf0; }
.fortune-explanation h4, .monthly-panel h3 { color: #315353; }
.monthly-item { border-color: #ddc9a5; background: #fffdf6; }
.print-year-overview { border-color: #ddc9a5; }
.print-year-heading strong { color: #315353; }
.meta-item, .pillars-table td, .twelve-star-card, .monthly-ratings > div { border-color: #e2d4bc; }
.meta-label, .twelve-star-label, .annual-label, .noble-heading span { color: #806e56; }
.meta-value, .pillar-branch, .pillar-hidden-god, .noble-card strong { color: #2d3f3c; }
.paper-section-heading > span, .paper-section-heading small { color: #a27643; }
.paper-section-heading i { position: relative; background: #d8c7a7; }
.paper-section-heading i::after { position: absolute; top: 50%; right: 8px; width: 48px; height: 13px; transform: translateY(-50%); background: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMjAgMjgiIGFyaWEtaGlkZGVuPSJ0cnVlIj4KICA8ZyBmaWxsPSJub25lIiBzdHJva2U9IiNhOTg1NTMiIHN0cm9rZS13aWR0aD0iMS41IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiPgogICAgPHBhdGggZD0iTTIgMThoMjRjNiAwIDYtOCAwLTgtNCAwLTYgMi02IDUgMCAyIDIgMyA0IDIgTTM1IDE4aDIyYzcgMCAxMC00IDEwLTkgMC01LTQtOC05LTgtNSAwLTggMy04IDcgMCAzIDIgNSA1IDUgMiAwIDQtMSA0LTMiLz4KICAgIDxwYXRoIGQ9Ik02NiAxOGgyNGM3IDAgMTEtNCAxMS05IDAtNC0zLTYtNi02LTQgMC02IDItNiA1IDAgMiAyIDMgNCAyIE0xMDIgMThoMTYgTTEwIDIzaDMxIE03MiAyM2gzNyIvPgogIDwvZz4KPC9zdmc+Cg==') center / contain no-repeat; content: ''; pointer-events: none; }
.pillar-ten-god, .pillar-hidden-god small, .luck-ten-god, .annual-ten-gods { color: #815b39; }
.table-note, .luck-age, .luck-years, .luck-hidden, .annual-sub, .paper-footer, .screen-note { color: #776b59; }
.twelve-star-card strong, .luck-pillar, .annual-value { color: #8d4830; }
.noble-name { color: #775736; }
.fortune-explanation p, .monthly-detail, .monthly-item summary { color: #304542; }
.fortune-explanation .fortune-explanation-method, .monthly-note, .monthly-terms, .monthly-panel-heading span { color: #776b59; }
.term-dialog { color: #304542; border-color: #d8c5a5; background: #fffaf0; }
.term-dialog-header h2, .term-dialog h3 { color: #315353; }
.term-trigger:hover { color: #875337; background: #f7ead8; }
.unknown-time-option { color: #53675e; }
.unknown-time-option input { accent-color: #315b57; }
@media print {
  html, body { background: #fff; }
}

/* The report keeps its dark jade and antique gold palette on screen and paper. */
@media screen, print {
  html:not(.pdf-export-light) {
    --ink: #e6e1d5;
    --muted: #b9b5a8;
    --paper: #232824;
    --canvas: #151910;
    --line: #695a40;
    --red: #a3cacc;
    --red-dark: #82afb1;
    --red-pale: #29332d;
    --gold: #c4a170;
    background: #151910;
  }
  html:not(.pdf-export-light) body { color: #e6e1d5; background: radial-gradient(ellipse at 10% 0, #2a2b1e 0, transparent 36rem), #151910; }
  html:not(.pdf-export-light) .app-header h1,
  html:not(.pdf-export-light) .section-heading h2,
  html:not(.pdf-export-light) .report-toolbar h2,
  html:not(.pdf-export-light) .paper-title-group h2,
  html:not(.pdf-export-light) .paper-section-heading h3 { color: #b2d7d7; }
  html:not(.pdf-export-light) .header-subtitle,
  html:not(.pdf-export-light) .field,
  html:not(.pdf-export-light) .form-message,
  html:not(.pdf-export-light) .app-footer,
  html:not(.pdf-export-light) .screen-note { color: #c7c1b3; }
  html:not(.pdf-export-light) .eyebrow,
  html:not(.pdf-export-light) .paper-title-group p { color: #c6a777; }
  html:not(.pdf-export-light) .input-card,
  html:not(.pdf-export-light) .report-paper { color: #e6e1d5; border-color: #786044; background: #242824; }
  html:not(.pdf-export-light) .input-card { border-top-color: #c98a6f; box-shadow: 0 18px 42px #0005; }
  html:not(.pdf-export-light) .timezone-chip,
  html:not(.pdf-export-light) .fortune-year-select { color: #dcc8a1; border-color: #866c45; background: #27251c; }
  html:not(.pdf-export-light) .field input[type="text"],
  html:not(.pdf-export-light) .field-picker-trigger { color: #f0eadf; border-color: #746448; background: #30332d; }
  html:not(.pdf-export-light) .field input::placeholder { color: #a9a69b; }
  html:not(.pdf-export-light) .field-picker-trigger:hover { border-color: #a3cacc; background: #343e38; }
  html:not(.pdf-export-light) .segmented-control { border-color: #796847; background: #302b21; }
  html:not(.pdf-export-light) .segmented-control input + span { color: #ded6c8; }
  html:not(.pdf-export-light) .segmented-control input:checked + span { color: #142526; background: #a7ced0; }
  html:not(.pdf-export-light) .lunar-preview { color: #b8d9d4; border-left-color: #86b8ae; background: #20352f; }
  html:not(.pdf-export-light) .lunar-date { color: #c2e1da; }
  html:not(.pdf-export-light) .lunar-icon { color: #172625; background: #a3cacc; }
  html:not(.pdf-export-light) .primary-button,
  html:not(.pdf-export-light) .wheel-confirm,
  html:not(.pdf-export-light) .save-pdf-button { color: #172526; border-color: #a3cacc; background: linear-gradient(120deg, #9cc8ca, #b8dddc); box-shadow: 0 4px 14px #0004; }
  html:not(.pdf-export-light) .primary-button:hover,
  html:not(.pdf-export-light) .wheel-confirm:hover,
  html:not(.pdf-export-light) .save-pdf-button:hover { color: #102021; background: #c9e6e4; }
  html:not(.pdf-export-light) .secondary-button:not(.save-pdf-button),
  html:not(.pdf-export-light) .wheel-cancel { color: #d8cebb; border-color: #78684d; background: #30332d; }
  html:not(.pdf-export-light) .pdf-download-link { color: #b6dddd; }
  html:not(.pdf-export-light) .pdf-share-button { color: #b6dddd; }
  html:not(.pdf-export-light) .wheel-dialog,
  html:not(.pdf-export-light) .term-dialog { color: #e6e1d5; border-color: #8b704a; background: #242824; }
  html:not(.pdf-export-light) .wheel-dialog-header h2,
  html:not(.pdf-export-light) .term-dialog-header h2,
  html:not(.pdf-export-light) .term-dialog h3 { color: #b6dada; }
  html:not(.pdf-export-light) .wheel-column { border-color: #695b42; background: #30332d; }
  html:not(.pdf-export-light) .wheel-column::after { border-color: #b99b6d; background: #b99b6d22; }
  html:not(.pdf-export-light) .paper-header { border-bottom-color: #bd8164; }
  html:not(.pdf-export-light) .report-meta,
  html:not(.pdf-export-light) .pillars-table td:first-child { background: #30362e; }
  html:not(.pdf-export-light) .pillars-table th,
  html:not(.pdf-export-light) .pillars-table th:first-child { color: #d7e4de; background: #31514d; }
  html:not(.pdf-export-light) .pillars-table .day-column { color: #fff0dc; background: #805340; }
  html:not(.pdf-export-light) .pillars-table tbody tr td:nth-child(4) { background: #38382d; }
  html:not(.pdf-export-light) .pillars-table td,
  html:not(.pdf-export-light) .meta-item { border-color: #5d5c4b; }
  html:not(.pdf-export-light) .pillars-wrap { border-color: #695b43; }
  html:not(.pdf-export-light) .paper-section-heading i { background: #806c4d; }
  html:not(.pdf-export-light) .twelve-star-grid { background: transparent; }
  html:not(.pdf-export-light) .twelve-star-card,
  html:not(.pdf-export-light) .luck-card,
  html:not(.pdf-export-light) .noble-card,
  html:not(.pdf-export-light) .monthly-item { color: #e5dfd1; border-color: #695b43; background: #2c342e; }
  html:not(.pdf-export-light) .twelve-star-card.current,
  html:not(.pdf-export-light) .luck-card.current,
  html:not(.pdf-export-light) .annual-card.current { border-color: #a98a5d; background: #3b372c; }
  html:not(.pdf-export-light) .annual-card { border-color: #678076; background: #293b35; }
  html:not(.pdf-export-light) .noble-summary,
  html:not(.pdf-export-light) .fortune-explanation,
  html:not(.pdf-export-light) .monthly-panel { color: #e5dfd1; border-color: #746346; background: #2d332d; }
  html:not(.pdf-export-light) .noble-card.found { border-color: #79a99a; background: #344d43; }
  html:not(.pdf-export-light) .noble-heading strong,
  html:not(.pdf-export-light) .fortune-explanation h4,
  html:not(.pdf-export-light) .monthly-panel h3 { color: #b6dada; }
  html:not(.pdf-export-light) .fortune-ratings > div { border-bottom-color: #6a5d45; }
  html:not(.pdf-export-light) .annual-compact .fortune-ratings > div { border-color: #6a5d45; }
  html:not(.pdf-export-light) .fortune-ratings > div:first-child { color: #d9be8e; background: #3b3527; }
  html:not(.pdf-export-light) .fortune-ratings strong,
  html:not(.pdf-export-light) .monthly-item summary strong,
  html:not(.pdf-export-light) .monthly-ratings strong { color: #e4bb76; }
  html:not(.pdf-export-light) .meta-label,
  html:not(.pdf-export-light) .twelve-star-label,
  html:not(.pdf-export-light) .annual-label,
  html:not(.pdf-export-light) .noble-heading span,
  html:not(.pdf-export-light) .paper-footer,
  html:not(.pdf-export-light) .table-note,
  html:not(.pdf-export-light) .luck-age,
  html:not(.pdf-export-light) .luck-years,
  html:not(.pdf-export-light) .annual-sub,
  html:not(.pdf-export-light) .monthly-note,
  html:not(.pdf-export-light) .monthly-terms { color: #bdb6a8; }
  html:not(.pdf-export-light) .meta-value,
  html:not(.pdf-export-light) .pillar-branch,
  html:not(.pdf-export-light) .pillar-hidden-god,
  html:not(.pdf-export-light) .noble-card strong,
  html:not(.pdf-export-light) .monthly-item summary,
  html:not(.pdf-export-light) .monthly-detail,
  html:not(.pdf-export-light) .fortune-explanation p { color: #e5dfd1; }
  html:not(.pdf-export-light) .pillar-ten-god,
  html:not(.pdf-export-light) .pillar-hidden-god small,
  html:not(.pdf-export-light) .luck-ten-god,
  html:not(.pdf-export-light) .annual-ten-gods { color: #d1b585; }
  html:not(.pdf-export-light) .twelve-star-card strong,
  html:not(.pdf-export-light) .luck-pillar,
  html:not(.pdf-export-light) .annual-value,
  html:not(.pdf-export-light) .noble-name { color: #e3b99a; }
  html:not(.pdf-export-light) .unknown-time-option { color: #d1cdc3; }
  html:not(.pdf-export-light) .page-watermark { opacity: .11; mix-blend-mode: screen; }
}

@media print {
  .twelve-star-card, .twelve-star-card.current { box-shadow: none; transform: none; }
}

/* Keep the report's wide page layout intact on phones; scale only its canvas. */
.report-page-frame { width: min(100%, 794px); margin: 0 auto; }
.report-page-frame[hidden] { display: none !important; }

@media screen and (max-width: 760px) {
  .report-viewport { overflow: visible; }
  .report-page-frame { position: relative; width: 100%; margin: 0 auto 24px; }
  .report-page-frame > .report-paper {
    position: absolute;
    top: 0;
    left: 0;
    width: 794px;
    max-width: none;
    min-height: 1123px;
    margin: 0;
    padding: 39px 46px 27px;
    transform-origin: top left;
  }
  .report-meta { grid-template-columns: 1.12fr 1.35fr 1.2fr .7fr .68fr; }
  .meta-item:nth-child(3) { border-right: 1px solid #e6ded2; }
  .meta-item:nth-child(n + 4) { border-top: 0; }
  .luck-grid { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); overflow: visible; }
  .luck-card { min-height: 139px; padding: 10px 5px; }
  .paper-bottom-grid { grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 20px; }
}

@media screen and (max-width: 520px) {
  .report-page-frame .paper-header { gap: 17px; padding-bottom: 17px; }
  .report-page-frame .paper-emblem { width: 43px; height: 43px; font-size: 24px; }
  .report-page-frame .paper-title-group p { font-size: 8px; }
  .report-page-frame .paper-title-group h2 { font-size: 20px; }
  .report-page-frame .paper-seal { font-size: 9px; }
  .report-page-frame .report-meta { margin-top: 10px; }
  .report-page-frame .meta-item { min-height: 43px; padding: 7px 9px; }
  .report-page-frame .meta-value { font-size: 11px; }
  .report-page-frame .paper-section { margin-top: 17px; }
  .report-page-frame .paper-section-heading { gap: 10px; margin-bottom: 11px; }
  .report-page-frame .paper-section-heading h3 { font-size: 15px; }
  .report-page-frame .paper-section-heading small { font-size: 8px; letter-spacing: .08em; }
  .report-page-frame .pillars-table th { height: 29px; font-size: 10px; }
  .report-page-frame .pillars-table th:first-child { width: 62px; }
  .report-page-frame .pillars-table td { height: 67px; padding: 7px 3px; }
  .report-page-frame .pillars-table td:first-child { font-size: 10px; }
  .report-page-frame .pillar-stem, .report-page-frame .pillar-branch { font-size: 27px; }
  .report-page-frame .pillar-cell { gap: 14px; min-height: 34px; }
  .report-page-frame .pillar-cell .pillar-stem, .report-page-frame .pillar-cell .pillar-branch { flex-basis: 1em; }
  .report-page-frame .pillar-ten-god { min-width: 3em; font-size: 10px; line-height: normal; overflow-wrap: normal; }
  .report-page-frame .pillar-hidden-gods { gap: 2px; }
  .report-page-frame .pillar-hidden-god { grid-template-columns: 1em auto; gap: 5px; font-size: 9px; }
  .report-page-frame .pillar-hidden-god small { font-size: 8px; white-space: nowrap; }
  .report-page-frame .pillar-wuxing { font-size: 8px; }
  .report-page-frame .table-note { font-size: 9px; line-height: 1.5; }
  .report-page-frame .twelve-star-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .report-page-frame .twelve-star-card { min-height: 68px; }
  .report-page-frame .twelve-star-card strong { font-size: 17px; }
  .report-page-frame .noble-grid { grid-template-columns: repeat(2, 52px); gap: 5px; }
  .report-page-frame .noble-card { width: 52px; }
  .report-page-frame .noble-card strong { font-size: 8px; }
  .report-page-frame .annual-cards { gap: 7px; }
  .report-page-frame .annual-card { min-height: 96px; padding: 9px; }
  .report-page-frame .annual-sub, .report-page-frame .annual-ten-gods { font-size: 8px; }
  .report-page-frame .paper-footer { flex-direction: row; gap: 0; margin-top: 16px; font-size: 8px; }
  .report-page-frame .monthly-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .report-page-frame .monthly-panel { padding: 22px; }
  .report-page-frame .monthly-ratings { grid-template-columns: repeat(2, 1fr); }
}

@media print {
  .report-page-frame { position: static !important; width: auto !important; height: auto !important; margin: 0 !important; }
  .report-page-frame > .report-paper { position: static !important; transform: none !important; }
  .report-page-frame-second { display: none !important; }
  html, body { background: #242824 !important; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .report-paper { color: #e6e1d5 !important; background: #242824 !important; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .page-watermark { opacity: .06 !important; }
}
