:root {
  color-scheme: light;
  --ink: #17231f;
  --ink-soft: #4c5b54;
  --muted: #7a847e;
  --paper: #f4f0e7;
  --paper-light: #faf8f2;
  --line: rgba(37, 56, 47, 0.14);
  --jade: #2d6a58;
  --jade-soft: #dbe9df;
  --cinnabar: #a84132;
  --gold: #b58b49;
  --shadow: 0 22px 70px rgba(44, 50, 42, 0.09);
  --serif: "Songti SC", "STSong", "Noto Serif SC", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 0%, rgba(151, 174, 158, 0.2), transparent 31rem),
    linear-gradient(rgba(35, 52, 44, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(35, 52, 44, 0.02) 1px, transparent 1px),
    var(--paper);
  background-size: auto, 48px 48px, 48px 48px, auto;
  font-family: var(--sans);
}

button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
[hidden] { display: none !important; }

.wash {
  position: fixed;
  z-index: -1;
  border-radius: 50%;
  filter: blur(28px);
  opacity: 0.42;
  pointer-events: none;
}
.wash-one { width: 460px; height: 460px; right: -170px; top: 20%; background: rgba(70, 104, 89, 0.12); }
.wash-two { width: 360px; height: 360px; left: -140px; bottom: 4%; background: rgba(168, 65, 50, 0.08); }

.site-header, main, footer { width: min(1240px, calc(100% - 40px)); margin-inline: auto; }
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 0;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-seal {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 11px;
  color: #fff9ed;
  background: var(--cinnabar);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.28), 0 8px 20px rgba(137, 47, 36, .18);
  font-family: var(--serif);
  font-size: 25px;
}
.brand strong, .brand small { display: block; }
.brand strong { font-family: var(--serif); font-size: 19px; letter-spacing: .12em; }
.brand small { margin-top: 3px; color: var(--muted); font-size: 11px; letter-spacing: .08em; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.home-link, .lang-switch {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(250, 248, 242, .7);
  color: var(--ink-soft);
  font-size: 13px;
  text-decoration: none;
}
.home-link { display: inline-flex; align-items: center; padding: 0 15px; }
.lang-switch { min-width: 48px; padding: 0 12px; cursor: pointer; font-weight: 750; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(310px, .8fr);
  min-height: 490px;
  align-items: center;
  gap: 60px;
  padding: 62px clamp(24px, 5vw, 72px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 36px 36px 12px 36px;
  background:
    linear-gradient(130deg, rgba(250,248,242,.96), rgba(240,239,229,.86)),
    var(--paper-light);
  box-shadow: var(--shadow);
}
.eyebrow { margin: 0 0 18px; color: var(--cinnabar); font-size: 12px; font-weight: 780; letter-spacing: .22em; text-transform: uppercase; }
.hero h1 { margin: 0; font-family: var(--serif); font-size: clamp(48px, 7vw, 84px); font-weight: 550; line-height: 1.08; letter-spacing: -.05em; }
.hero h1 em { color: var(--jade); font-style: normal; }
.hero-intro { max-width: 680px; margin: 28px 0 0; color: var(--ink-soft); font-size: 17px; line-height: 1.9; }
.principles { display: flex; flex-wrap: wrap; gap: 18px 26px; margin-top: 30px; }
.principles span { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-soft); font-size: 13px; }
.principles i { width: 7px; height: 7px; border-radius: 50%; background: var(--jade); box-shadow: 0 0 0 4px rgba(45,106,88,.12); }
.principles b { font-weight: 650; }
#aiBadge.is-off i { background: var(--muted); box-shadow: 0 0 0 4px rgba(122,132,126,.12); }

.orbit-card { position: relative; width: min(360px, 34vw); aspect-ratio: 1; justify-self: center; }
.orbit { position: absolute; inset: 0; border: 1px solid rgba(45,106,88,.2); border-radius: 50%; animation: turn 48s linear infinite; }
.orbit::before, .orbit::after { position: absolute; inset: 11%; border: 1px dashed rgba(45,106,88,.13); border-radius: 50%; content: ""; }
.orbit::after { inset: 23%; border-style: solid; }
.orbit span { position: absolute; display: grid; width: 38px; height: 38px; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: var(--paper-light); color: var(--jade); font-family: var(--serif); animation: turn-reverse 48s linear infinite; }
.orbit span:nth-child(1) { left: 50%; top: -19px; transform: translateX(-50%); }
.orbit span:nth-child(2) { right: -19px; top: 50%; transform: translateY(-50%); }
.orbit span:nth-child(3) { left: 50%; bottom: -19px; transform: translateX(-50%); }
.orbit span:nth-child(4) { left: -19px; top: 50%; transform: translateY(-50%); }
.orbit-inner { inset: 17%; animation-direction: reverse; animation-duration: 34s; }
.orbit-inner span { width: 32px; height: 32px; animation-direction: reverse; animation-duration: 34s; font-size: 13px; }
.orbit-core { position: absolute; inset: 35%; display: grid; place-items: center; border-radius: 50%; background: radial-gradient(circle at 32% 28%, #fdfbf6, #dfe8df); box-shadow: inset 0 0 0 1px rgba(45,106,88,.15), 0 18px 36px rgba(45,106,88,.1); }
.orbit-core b { font-family: var(--serif); font-size: 20px; font-weight: 520; }
.orbit-core span { position: absolute; color: var(--muted); font-size: 10px; letter-spacing: .1em; }
.orbit-core span:first-child { top: 18%; }
.orbit-core span:last-child { bottom: 18%; }
@keyframes turn { to { transform: rotate(360deg); } }
@keyframes turn-reverse { to { rotate: -360deg; } }
@media (prefers-reduced-motion: reduce) { .orbit, .orbit span { animation: none; } }

.workspace { display: grid; grid-template-columns: minmax(330px, .72fr) minmax(0, 1.28fr); align-items: start; gap: 20px; margin-top: 22px; }
.input-panel, .result-panel { border: 1px solid var(--line); background: rgba(250,248,242,.84); box-shadow: var(--shadow); backdrop-filter: blur(18px); }
.input-panel { position: sticky; top: 18px; padding: 30px; border-radius: 12px 30px 30px 30px; }
.result-panel { min-width: 0; max-width: 100%; min-height: 720px; overflow: hidden; padding: clamp(24px, 4vw, 44px); border-radius: 30px 12px 30px 30px; }
.panel-heading { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 28px; }
.step-number, .section-title > span { display: grid; flex: 0 0 auto; place-items: center; color: var(--cinnabar); background: rgba(168,65,50,.09); font-family: var(--serif); }
.step-number { width: 38px; height: 38px; border-radius: 50%; font-size: 13px; }
.panel-heading h2, .result-heading h2, .method-heading h2 { margin: 0; font-family: var(--serif); font-weight: 540; }
.panel-heading h2 { font-size: 24px; }
.panel-heading p { margin: 8px 0 0; color: var(--muted); font-size: 12px; line-height: 1.65; }

fieldset { min-width: 0; margin: 0 0 22px; padding: 0; border: 0; }
legend, .field > span { display: block; margin-bottom: 9px; color: var(--ink-soft); font-size: 12px; font-weight: 720; letter-spacing: .04em; }
.segment-control { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; padding: 5px; border: 1px solid var(--line); border-radius: 14px; background: rgba(31,48,40,.035); }
.segment-control input, .mode-options input { position: absolute; opacity: 0; pointer-events: none; }
.segment-control label span { display: grid; min-height: 40px; place-items: center; border-radius: 10px; color: var(--muted); cursor: pointer; font-size: 13px; }
.segment-control input:checked + span { background: var(--paper-light); color: var(--jade); box-shadow: 0 3px 12px rgba(45,60,50,.08); font-weight: 720; }
.calendar-control label span { min-height: 46px; align-content: center; padding: 6px 10px; }
.calendar-control b { font-size: 13px; font-weight: 720; }
.calendar-note { display: block; margin-top: 8px; color: var(--cinnabar); font-size: 10px; line-height: 1.55; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 22px; }
.field-grid > *, .field { min-width: 0; }
.field input, .field textarea { display: block; width: 100%; min-width: 0; max-width: 100%; border: 1px solid var(--line); border-radius: 13px; outline: 0; background: rgba(255,255,255,.52); color: var(--ink); padding: 0 13px; }
.field input { min-height: 50px; }
.field textarea { min-height: 82px; padding-block: 12px; resize: vertical; line-height: 1.6; }
.field input:focus, .field textarea:focus { border-color: rgba(45,106,88,.48); box-shadow: 0 0 0 3px rgba(45,106,88,.08); }
.date-time-field { padding: 13px; border: 1px solid rgba(45,106,88,.1); border-radius: 16px; background: linear-gradient(145deg, rgba(255,255,255,.42), rgba(45,106,88,.035)); }
.date-time-field > span:first-child { margin-bottom: 8px; }
.field > .native-input-shell { display: flex; width: 100%; min-width: 0; max-width: 100%; align-items: center; margin-bottom: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.52); }
.native-input-shell:focus-within { border-color: rgba(45,106,88,.48); box-shadow: 0 0 0 3px rgba(45,106,88,.08); }
.date-time-field .native-input-shell input { display: flex; flex: 1 1 0; width: 0; min-width: 0; max-width: 100%; height: 52px; min-height: 52px; align-items: center; padding: 0 12px; border: 0; border-radius: 0; background: transparent; box-shadow: none; font-family: inherit; font-size: 14px; font-weight: 500; line-height: normal; }
.date-time-field .native-input-shell input:focus { border: 0; box-shadow: none; }
.date-time-field input[type="date"]::-webkit-date-and-time-value, .date-time-field input[type="time"]::-webkit-date-and-time-value { display: flex; min-width: 0; height: 52px; align-items: center; margin: 0; padding: 0; text-align: left; }
.date-time-field input[type="date"]::-webkit-datetime-edit, .date-time-field input[type="time"]::-webkit-datetime-edit { display: flex; min-width: 0; align-items: center; padding: 0; }
.date-time-field input[type="date"]::-webkit-calendar-picker-indicator, .date-time-field input[type="time"]::-webkit-calendar-picker-indicator { flex: 0 0 auto; min-width: 22px; margin: 0; padding: 6px; opacity: .72; cursor: pointer; }
.input-hint { display: block; margin: 7px 2px 0; color: var(--muted); font-size: 9px; line-height: 1.45; }
.focus-field { display: block; margin-bottom: 20px; }
.focus-field small { display: block; margin-top: 7px; color: var(--muted); font-size: 10px; line-height: 1.55; }
.mode-options { display: grid; gap: 8px; }
.mode-options label > span { display: grid; grid-template-columns: 1fr; gap: 3px; min-height: 62px; justify-content: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.34); cursor: pointer; }
.mode-options b { font-size: 13px; font-weight: 720; }
.mode-options small { color: var(--muted); font-size: 11px; line-height: 1.5; }
.mode-options input:checked + span { border-color: rgba(45,106,88,.5); background: var(--jade-soft); box-shadow: inset 3px 0 0 var(--jade); }
.form-error { margin: -6px 0 14px; padding: 10px 12px; border-radius: 10px; background: rgba(168,65,50,.09); color: var(--cinnabar); font-size: 12px; line-height: 1.55; }
.form-actions { display: grid; grid-template-columns: .9fr 1.1fr; gap: 8px; }
.button { min-height: 52px; border-radius: 14px; cursor: pointer; font-weight: 760; transition: transform .16s ease, opacity .16s ease; }
.button:hover:not(:disabled) { transform: translateY(-2px); }
.button:disabled { cursor: not-allowed; opacity: .45; }
.button-secondary { border: 1px solid var(--line); background: transparent; color: var(--ink-soft); }
.button-primary { display: grid; place-content: center; gap: 2px; border: 0; background: var(--jade); color: white; box-shadow: 0 10px 24px rgba(45,106,88,.2); }
.privacy-note { display: flex; gap: 10px; align-items: flex-start; margin-top: 20px; padding-top: 18px; border-top: 1px dashed var(--line); }
.privacy-note > span { display: grid; width: 25px; height: 25px; flex: 0 0 auto; place-items: center; border-radius: 50%; background: rgba(181,139,73,.12); color: #80632f; font-family: var(--serif); font-size: 12px; }
.privacy-note p { margin: 1px 0 0; color: var(--muted); font-size: 11px; line-height: 1.7; }

.empty-state, .loading-state { display: grid; min-height: 620px; place-content: center; justify-items: center; text-align: center; }
.empty-mark { display: grid; width: 90px; height: 90px; place-items: center; margin-bottom: 25px; border: 1px solid rgba(45,106,88,.17); border-radius: 50%; color: rgba(45,106,88,.56); background: radial-gradient(circle, rgba(45,106,88,.08), transparent 70%); font-family: var(--serif); font-size: 40px; }
.empty-state h2, .loading-state h2 { margin: 0; font-family: var(--serif); font-weight: 520; }
.empty-state p, .loading-state p { max-width: 440px; margin: 14px 0 0; color: var(--muted); font-size: 13px; line-height: 1.75; }
.loader { display: flex; gap: 8px; margin-bottom: 24px; }
.loader span { width: 10px; height: 10px; border-radius: 50%; background: var(--jade); animation: pulse 1.2s ease-in-out infinite; }
.loader span:nth-child(2) { animation-delay: .14s; }
.loader span:nth-child(3) { animation-delay: .28s; }
@keyframes pulse { 0%, 100% { opacity: .22; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-6px); } }

.result-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.numbered-heading { display: flex; min-width: 0; align-items: flex-start; gap: 14px; }
.result-heading .eyebrow { margin-bottom: 8px; }
.result-heading h2 { font-size: 32px; }
.birth-summary { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.birth-summary span, .ziwei-meta span { display: inline-flex; align-items: center; min-height: 30px; padding: 0 11px; border-radius: 999px; background: rgba(35,52,44,.055); color: var(--ink-soft); font-size: 11px; }
.result-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }
.mini-button { min-height: 34px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.48); color: var(--ink-soft); cursor: pointer; font-size: 10px; font-weight: 720; }
.mini-button:hover { border-color: rgba(45,106,88,.35); color: var(--jade); }
.export-status { margin: 9px 0 0; color: var(--jade); font-size: 10px; line-height: 1.5; }
.export-status.is-error { color: var(--cinnabar); }
.chart-section { margin-top: 34px; padding-top: 28px; border-top: 1px solid var(--line); }
.section-title { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.section-title > span { width: 32px; height: 32px; border-radius: 10px; }
.section-title h3 { margin: 0; font-family: var(--serif); font-size: 21px; font-weight: 560; }
.pillars { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.pillar { padding: 15px 10px; border: 1px solid var(--line); border-radius: 15px; background: rgba(255,255,255,.34); text-align: center; }
.pillar small { display: block; color: var(--muted); font-size: 10px; }
.pillar b { display: block; margin: 10px 0 4px; font-family: var(--serif); font-size: clamp(25px, 4vw, 36px); font-weight: 530; letter-spacing: .08em; }
.pillar em { color: var(--jade); font-size: 10px; font-style: normal; }
.insight-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.insight { min-width: 0; padding: 12px; border-radius: 12px; background: rgba(181,139,73,.08); }
.insight small, .insight b { display: block; }
.insight small { color: var(--muted); font-size: 9px; }
.insight b { margin-top: 5px; overflow: hidden; color: var(--ink-soft); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.ziwei-meta { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 12px; }
.palace-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.palace { min-height: 126px; padding: 12px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.3); }
.palace.is-ming { border-color: rgba(168,65,50,.38); background: rgba(168,65,50,.055); }
.palace-head { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.palace-head b { font-family: var(--serif); font-size: 15px; }
.palace-head span { color: var(--muted); font-size: 10px; }
.palace-stars { margin: 12px 0 0; color: var(--jade); font-family: var(--serif); font-size: 14px; line-height: 1.5; }
.palace-aux, .palace-cycle { margin: 6px 0 0; color: var(--muted); font-size: 9px; line-height: 1.5; }
.palace-cycle { color: #8a6b35; }
.palace-daxian { color: #8a6b35; font-weight: 650; }
.luck-cycles { display: flex; width: 100%; min-width: 0; max-width: 100%; gap: 8px; overflow-x: auto; padding-bottom: 7px; scrollbar-width: thin; }
.luck-cycle { min-width: 104px; padding: 12px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.3); }
.luck-cycle.is-current { border-color: rgba(45,106,88,.42); background: var(--jade-soft); }
.luck-cycle b { display: block; font-family: var(--serif); font-size: 20px; font-weight: 540; }
.luck-cycle small { display: block; margin-top: 6px; color: var(--muted); font-size: 9px; line-height: 1.45; }
.liu-nian-block { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line); }
.liu-nian-heading { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; margin-bottom: 9px; }
.liu-nian-heading b { color: var(--cinnabar); font-family: var(--serif); font-size: 15px; font-weight: 560; }
.liu-nian-heading small { color: var(--muted); font-size: 10px; }
.liu-nian-list { display: flex; width: 100%; min-width: 0; max-width: 100%; gap: 7px; overflow-x: auto; padding-bottom: 7px; scrollbar-width: thin; }
.liu-nian-card { min-width: 82px; padding: 10px 11px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.28); }
.liu-nian-card.is-current { border-color: rgba(168,65,50,.4); background: rgba(168,65,50,.07); }
.liu-nian-card b { display: block; color: var(--ink); font-family: var(--serif); font-size: 15px; font-weight: 560; }
.liu-nian-card small { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; line-height: 1.35; }

.analysis-divider { display: flex; align-items: center; gap: 14px; margin: 40px 0 18px; color: var(--cinnabar); font-family: var(--serif); font-size: 16px; }
.analysis-divider::before, .analysis-divider::after { height: 1px; flex: 1; background: var(--line); content: ""; }
.analysis-meta { margin-bottom: 24px; color: var(--muted); font-size: 10px; text-align: center; }
.report { color: var(--ink-soft); font-family: var(--serif); font-size: 15px; line-height: 1.95; }
.report h2, .report h3 { color: var(--ink); font-weight: 560; line-height: 1.45; }
.report h2 { margin: 32px 0 12px; font-size: 22px; }
.report h3 { margin: 25px 0 10px; font-size: 18px; }
.report h2.report-conclusion-detail, .report h3.report-conclusion-detail { margin: 0 0 13px; font-size: inherit; line-height: inherit; }
.report p { margin: 0 0 13px; }
.report p.report-conclusion-line { margin-left: clamp(14px, 2.8vw, 28px); padding-left: 12px; border-left: 2px solid rgba(45,106,88,.14); }
.report li { margin-bottom: 7px; }
.report blockquote { margin: 18px 0; padding: 12px 16px; border-left: 3px solid var(--gold); background: rgba(181,139,73,.07); }
.report strong { color: var(--ink); }
.report-table-wrap { width: 100%; margin: 20px 0 26px; overflow-x: auto; border: 1px solid rgba(45,106,88,.18); border-radius: 15px; background: rgba(255,255,255,.34); box-shadow: 0 10px 28px rgba(45,60,50,.05); scrollbar-width: thin; scrollbar-color: rgba(45,106,88,.28) transparent; }
.report-table-wrap:focus { outline: 3px solid rgba(45,106,88,.1); outline-offset: 2px; }
.report-table-content { width: max-content; min-width: 100%; }
.report-table { width: 100%; min-width: 100%; border-collapse: separate; border-spacing: 0; color: var(--ink-soft); font-family: var(--sans); font-size: 12px; line-height: 1.65; }
.report-table th, .report-table td { min-width: 128px; padding: 13px 15px; border-right: 1px solid rgba(45,106,88,.1); border-bottom: 1px solid rgba(45,106,88,.1); vertical-align: top; font-size: 12px; overflow-wrap: anywhere; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
.report-table th { position: sticky; top: 0; z-index: 1; background: #e7eee8; color: var(--ink); font-weight: 760; white-space: nowrap; }
.report-table th:first-child { border-top-left-radius: 14px; }
.report-table th:last-child { border-top-right-radius: 14px; }
.report-table th:last-child, .report-table td:last-child { border-right: 0; }
.report-table tbody tr:last-child td { border-bottom: 0; }
.report-table tbody tr:nth-child(even) td { background: rgba(45,106,88,.035); }
.report-table tbody tr:hover td { background: rgba(181,139,73,.07); }
.report-table td:first-child { color: var(--ink); font-weight: 650; }
.report-table strong { font-size: inherit; }
.report-code-block { overflow-x: auto; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: rgba(35,52,44,.035); font: 11px/1.7 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre; }
.table-scroll-hint { display: none; margin: 0; padding: 8px 13px; border-bottom: 1px solid rgba(45,106,88,.1); background: rgba(45,106,88,.045); color: var(--muted); font-family: var(--sans); font-size: 9px; text-align: left; }
.cloud-section { margin-top: 22px; padding: clamp(24px, 4vw, 40px); border: 1px solid var(--line); border-radius: 30px; background: rgba(250,248,242,.84); box-shadow: var(--shadow); }
.cloud-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.cloud-heading .eyebrow { margin-bottom: 8px; }
.cloud-heading h2 { margin: 0; font-family: var(--serif); font-size: clamp(26px, 4vw, 36px); font-weight: 540; }
.cloud-badge { display: inline-flex; min-height: 31px; align-items: center; padding: 0 12px; border-radius: 999px; background: rgba(45,106,88,.08); color: var(--jade); font-size: 10px; font-weight: 750; white-space: nowrap; }
.cloud-badge.is-off { background: rgba(122,132,126,.1); color: var(--muted); }
.cloud-intro { max-width: 820px; margin: 18px 0; color: var(--muted); font-size: 12px; line-height: 1.75; }
.cloud-safeguards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 22px; }
.cloud-safeguards span { display: flex; min-width: 0; align-items: center; gap: 9px; padding: 11px 12px; border: 1px solid rgba(45,106,88,.1); border-radius: 12px; background: rgba(45,106,88,.045); color: var(--ink-soft); }
.cloud-safeguards i { display: grid; width: 25px; height: 25px; flex: 0 0 auto; place-items: center; border-radius: 8px; background: rgba(45,106,88,.1); color: var(--jade); font-family: var(--serif); font-size: 11px; font-style: normal; }
.cloud-safeguards b { overflow: hidden; font-size: 10px; font-weight: 650; line-height: 1.45; text-overflow: ellipsis; }
.cloud-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: end; }
.cloud-form .field > span { margin-bottom: 8px; }
.cloud-actions { display: grid; grid-column: 1 / -1; grid-template-columns: 1fr 1fr; gap: 8px; }
.cloud-actions .button { min-width: 0; padding: 0 16px; }
.cloud-status { margin: 18px 0 0; padding: 11px 14px; border-radius: 12px; background: rgba(45,106,88,.08); color: var(--jade); font-size: 12px; text-align: center; }
.cloud-status.is-error { background: rgba(168,65,50,.09); color: var(--cinnabar); }
.history-notice { margin-top: 22px; padding: 16px 18px; border: 1px solid rgba(181,139,73,.2); border-radius: 14px; background: rgba(181,139,73,.075); text-align: center; }
.history-notice strong { color: #795d2d; font-family: var(--serif); font-weight: 560; }
.history-notice p { max-width: 780px; margin: 7px auto 0; color: var(--ink-soft); font-size: 11px; line-height: 1.75; }
.history-list { display: grid; gap: 9px; margin-top: 18px; }
.history-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 15px 17px; border: 1px solid var(--line); border-radius: 15px; background: rgba(255,255,255,.34); }
.history-copy { min-width: 0; }
.history-copy strong { display: block; font-family: var(--serif); font-size: 15px; font-weight: 560; }
.history-copy p { margin: 5px 0 0; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.history-buttons { display: flex; gap: 6px; }
.history-buttons button { min-height: 36px; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; font-size: 11px; font-weight: 760; transition: border-color .16s ease, background .16s ease, transform .16s ease; }
.history-buttons button:hover { transform: translateY(-1px); }
.history-buttons .read-history { padding: 0 15px; border-color: rgba(45,106,88,.28); background: var(--jade-soft); color: #205345; }
.history-buttons .read-history:hover { border-color: rgba(45,106,88,.52); background: #cfe2d5; }
.history-buttons .delete-history { width: 36px; border-color: rgba(168,65,50,.25); background: rgba(168,65,50,.09); color: var(--cinnabar); font-size: 19px; font-weight: 650; line-height: 1; }
.history-buttons .delete-history:hover { border-color: rgba(168,65,50,.48); background: rgba(168,65,50,.15); }
.history-empty { padding: 20px; color: var(--muted); font-size: 12px; text-align: center; }

.method-section { display: grid; grid-template-columns: .8fr 1.2fr; gap: 50px; margin-top: 82px; padding: 0 clamp(10px, 3vw, 40px); }
.method-heading h2 { max-width: 360px; font-size: clamp(31px, 4vw, 46px); line-height: 1.25; }
.method-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.method-grid article { padding: 24px 20px; border-top: 2px solid var(--jade); background: rgba(250,248,242,.42); }
.method-grid article > span { color: var(--cinnabar); font-family: var(--serif); font-size: 13px; }
.method-grid h3 { margin: 24px 0 9px; font-family: var(--serif); font-size: 18px; font-weight: 560; }
.method-grid p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.8; }
.disclaimer { margin-top: 74px; padding: 22px 26px; border: 1px solid rgba(168,65,50,.17); border-radius: 18px; background: rgba(168,65,50,.045); text-align: center; }
.disclaimer span { display: block; color: var(--cinnabar); font-size: 12px; font-weight: 750; }
.disclaimer p { max-width: 900px; margin: 8px auto 0; color: var(--ink-soft); font-size: 12px; line-height: 1.75; }
footer { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; padding: 34px 0; color: var(--muted); font-size: 11px; text-align: center; }

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .orbit-card { display: none; }
  .workspace { grid-template-columns: minmax(0, 1fr); }
  .input-panel { position: static; }
  .result-panel { min-height: 540px; }
  .empty-state, .loading-state { min-height: 460px; }
  .method-section { grid-template-columns: 1fr; }
  .cloud-form { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .site-header, main, footer { width: min(100% - 24px, 1240px); }
  .site-header { padding: 15px 0; }
  .brand { gap: 9px; }
  .brand-seal { width: 38px; height: 38px; font-size: 21px; }
  .brand strong { font-size: 17px; }
  .brand small { font-size: 9px; }
  .header-actions { gap: 6px; }
  .lang-switch { min-width: 44px; min-height: 40px; }
  .home-link { min-height: 40px; padding: 0 10px; font-size: 11px; white-space: nowrap; }
  .hero { gap: 20px; padding: 34px 20px; border-radius: 24px 24px 8px 24px; }
  .hero .eyebrow { margin-bottom: 13px; }
  .hero h1 { font-size: clamp(40px, 13vw, 58px); line-height: 1.12; }
  .hero-intro { margin-top: 20px; font-size: 14px; line-height: 1.75; }
  .principles { gap: 12px 16px; margin-top: 22px; }
  .principles span { font-size: 11px; }
  .workspace { gap: 12px; margin-top: 12px; }
  .input-panel, .result-panel { padding: 20px 16px; border-radius: 22px; }
  .panel-heading { margin-bottom: 22px; }
  fieldset { margin-bottom: 18px; }
  .mode-options label > span { min-height: 58px; }
  .field-grid, .form-actions { grid-template-columns: 1fr; }
  .date-time-grid { gap: 10px; }
  .date-time-field { width: 100%; max-width: 100%; padding: 10px; overflow: hidden; }
  .native-input-shell { width: calc(100% - 2px); margin-inline: auto; }
  .date-time-field .native-input-shell input { width: 0; min-width: 0; max-width: 100%; padding-inline: 11px; font-size: 16px; }
  .button { min-height: 54px; }
  .result-panel { min-height: 440px; }
  .empty-state, .loading-state { min-height: 380px; }
  .result-heading { flex-direction: column; }
  .result-heading h2 { font-size: 27px; }
  .result-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mini-button { min-height: 40px; padding: 0 5px; border-radius: 11px; line-height: 1.3; }
  .pillars { gap: 6px; }
  .pillar { padding: 12px 4px; }
  .pillar b { font-size: clamp(22px, 8vw, 30px); }
  .insight-strip { grid-template-columns: 1fr; }
  .palace-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .palace { min-height: 116px; padding: 10px; }
  .method-section { margin-top: 54px; padding: 0 4px; }
  .method-grid { grid-template-columns: 1fr; }
  .cloud-section { margin-top: 12px; padding: 20px 16px; border-radius: 22px; }
  .cloud-heading { align-items: flex-start; flex-direction: column; }
  .cloud-heading h2 { font-size: 27px; line-height: 1.3; }
  .cloud-badge { display: none; }
  .cloud-intro { margin: 16px 0; }
  .cloud-safeguards { grid-template-columns: 1fr; gap: 6px; margin-bottom: 18px; }
  .cloud-safeguards span { min-height: 44px; }
  .cloud-safeguards b { font-size: 11px; }
  .cloud-form { grid-template-columns: 1fr; }
  .cloud-actions { display: grid; grid-column: auto; grid-template-columns: 1fr; }
  .cloud-actions .button { min-width: 0; }
  .history-item { grid-template-columns: 1fr; }
  .history-copy strong { font-size: 14px; line-height: 1.5; }
  .history-buttons { display: grid; grid-template-columns: 1fr 44px; }
  .history-buttons button { min-height: 40px; }
  .history-buttons .delete-history { width: 44px; }
  .report-table-wrap { margin-block: 18px 24px; }
  .report-table { min-width: 680px; font-size: 11px; }
  .report .report-table th, .report .report-table td { min-width: 116px; padding: 11px 12px; font-size: 10px; line-height: 1.55; }
  .report .report-table strong { font-size: 10px; line-height: inherit; }
  .table-scroll-hint { display: block; }
  .report { font-size: 13px; line-height: 1.82; }
  .report h2 { margin: 26px 0 10px; font-size: 18px; }
  .report h3 { margin: 21px 0 8px; font-size: 15px; }
  .report p, .report li, .report blockquote { font-size: 13px; }
  .report blockquote { margin: 14px 0; padding: 10px 12px; }
  .disclaimer { margin-top: 46px; padding: 20px 16px; }
}

@media (max-width: 390px) {
  .site-header, main, footer { width: calc(100% - 18px); }
  .hero { padding: 30px 16px; }
  .hero h1 { font-size: 39px; }
  .result-actions { grid-template-columns: 1fr; }
  .palace-grid { gap: 6px; }
}

.export-stage { position: fixed; top: 0; left: -12000px; z-index: -1; width: 900px; overflow: visible; padding: 42px; background: var(--paper-light); color: var(--ink); }
.export-surface .result-heading { flex-direction: row; }
.export-surface .pillars { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.export-surface .insight-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.export-surface .palace-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.export-surface .luck-cycles { flex-wrap: wrap; overflow: visible; }
.export-surface .liu-nian-list { flex-wrap: wrap; overflow: visible; }
.export-surface .report { font-size: 14px; line-height: 1.85; }
.export-surface .report h2 { font-size: 20px; }
.export-surface .report h3 { font-size: 16px; }
.export-surface .report h2.report-conclusion-detail, .export-surface .report h3.report-conclusion-detail { font-size: inherit; line-height: inherit; }
.export-surface .report-table-wrap { overflow: visible; box-shadow: none; }
.export-surface .report-table-content { width: 100%; min-width: 0; }
.export-surface .report-table { width: 100%; min-width: 0; table-layout: fixed; font-size: 10px; }
.export-surface .report-table th, .export-surface .report-table td { min-width: 0; padding: 9px 10px; font-size: 10px; line-height: 1.5; white-space: normal; }
.export-surface .report-table strong { font-size: 10px; line-height: inherit; }
.export-surface .table-scroll-hint { display: none; }
.export-disclaimer { margin: 36px 0 0; padding: 16px 18px; border: 1px solid rgba(168,65,50,.18); border-radius: 14px; background: rgba(168,65,50,.05); color: var(--ink-soft); font-size: 11px; line-height: 1.75; text-align: center; }

@media print {
  body { background: white; }
  .site-header, .hero, .input-panel, .cloud-section, .method-section, footer, .result-actions { display: none !important; }
  main, .workspace { width: 100%; margin: 0; display: block; }
  .result-panel { min-height: 0; padding: 0; border: 0; box-shadow: none; background: white; }
  .chart-result, .analysis-result, .disclaimer { break-inside: avoid; }
  .palace-grid { grid-template-columns: repeat(3, 1fr); }
  .disclaimer { margin-top: 24px; }
}
