@charset "UTF-8";

:root {
  color-scheme: light dark;
  --canvas: #f7f6f1;
  --canvas: light-dark(#f7f6f1, #171e1a);
  --paper: light-dark(#fffefa, #222b25);
  --ink: light-dark(#263e31, #e9eee7);
  --muted: light-dark(#6c776e, #adb8ae);
  --line: light-dark(#dde3d9, #3c493e);
  --green: light-dark(#284c3b, #c2d9b6);
  --on-green: light-dark(#fffefa, #203322);
  --tint: light-dark(#eaf0e5, #2c3c2d);
  --sun: light-dark(#efe8d7, #3a3628);
  --sun-ink: light-dark(#6f603c, #ddcea0);
  --wood: light-dark(#3c704b, #b1d6a4);
  --wood-bg: light-dark(#edf3e9, #30432d);
  --fire: light-dark(#a15043, #efb2a2);
  --fire-bg: light-dark(#f9eee8, #49332c);
  --earth: light-dark(#8b6a35, #e1cd99);
  --earth-bg: light-dark(#f5efdf, #443d29);
  --metal: light-dark(#596c76, #c4d2d5);
  --metal-bg: light-dark(#ebf0f1, #344044);
  --water: light-dark(#486b91, #b3cff0);
  --water-bg: light-dark(#eaf1f7, #2a3c51);
  --error: light-dark(#a64033, #f0b2a4);
  --error-bg: light-dark(#fbefeb, #49332c);
  --serif: "AppleMyungjo", "Noto Serif KR", "Batang", Georgia, serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 28px; }
body { margin: 0; background: var(--canvas); color: var(--ink); font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif; font-size: 15px; line-height: 1.65; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button, input, select { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .55; }
a { color: inherit; text-underline-offset: 4px; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; }
button, input, select { min-height: 44px; }
[hidden] { display: none !important; }
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3, h4 { font-weight: 600; line-height: 1.45; word-break: keep-all; }
strong, b { font-weight: 600; }
.shell { width: min(1120px, calc(100% - 80px)); margin-inline: auto; }
.muted { color: var(--muted); }
.small { font-size: 11px; line-height: 1.8; }
.eyebrow { color: var(--muted); font-size: 11px; font-weight: 500; letter-spacing: .08em; }
.skip-link { position: absolute; top: -100px; left: 20px; z-index: 10; padding: 10px 18px; background: var(--paper); border: 1px solid var(--green); border-radius: 8px; }
.skip-link:focus { top: 12px; }

.site-header { display: flex; align-items: center; justify-content: space-between; gap: 28px; min-height: 102px; border-bottom: 1px solid var(--line); }
.site-logo { display: flex; align-items: center; gap: 12px; text-decoration: none; flex-shrink: 0; }
.logo-mark { display: grid; place-items: center; width: 43px; height: 43px; color: var(--on-green); background: var(--green); border-radius: 14px 14px 4px 14px; font-family: var(--serif); font-size: 27px; }
.logo-name { font-family: var(--serif); font-size: 24px; font-weight: 500; letter-spacing: -.06em; }
.logo-name span { margin-left: 8px; font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", sans-serif; color: var(--muted); font-size: 12px; font-weight: 400; letter-spacing: 0; }
.main-nav { display: flex; align-items: center; gap: 27px; }
.main-nav a { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); text-decoration: none; font-size: 13px; white-space: nowrap; }
.main-nav a[aria-current="page"] { color: var(--green); font-weight: 600; box-shadow: inset 0 -2px var(--green); }
.main-nav a:hover { color: var(--green); }
.language-switch { flex: 0 0 auto; min-height: 44px; width: 96px; padding: 8px 9px; border: 1px solid var(--line); border-radius: 9px; background: var(--paper); font-size: 12px; }
.site-header .main-nav { margin-left: auto; order: 2; }
.site-header .language-switch { order: 3; }
html[lang="en"] { --serif: Georgia, "Times New Roman", serif; }
html[lang="en"] h1, html[lang="en"] h2, html[lang="en"] h3 { letter-spacing: -.025em; word-break: normal; }
html[lang="en"] .logo-mark { font-family: Georgia, serif; font-size: 19px; }
html[lang="en"] .logo-name { letter-spacing: -.025em; font-size: 23px; }
html[lang="en"] .pillars th:first-child { width: 54px; }
.reading-module .module-evidence { margin-top: 10px; font-size: 11px; color: var(--muted); }
.module-evidence summary { min-height: 44px; padding: 10px 0; }
.module-evidence p { padding-bottom: 7px; font-size: 11px; }
.reading-panel > p { white-space: pre-line; }
.reading-module > p { white-space: pre-line; }
.reading-loading p { margin-block: 12px; }

.hero { display: grid; grid-template-columns: minmax(0, 1fr) 310px; align-items: center; gap: 80px; padding: 57px 0 43px; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); background: var(--paper); font-size: 11px; line-height: 1.6; font-weight: 500; }
.hero-badge { background: var(--tint); border-color: transparent; color: var(--green); padding: 5px 10px; }
.hero h1 { margin-top: 18px; font-family: var(--serif); font-weight: 400; font-size: clamp(35px, 4vw, 47px); letter-spacing: -.085em; line-height: 1.45; }
.hero-copy > p { margin-top: 15px; color: var(--muted); font-size: 14px; line-height: 1.9; }
.hero-copy > .hero-meta { margin-top: 22px; font-size: 11px; }
.hero-meta span { padding-inline: 7px; }
.season-card { display: flex; flex-direction: column; align-items: start; justify-content: center; min-height: 244px; padding: 25px 27px; background: var(--sun); color: var(--sun-ink); border-radius: 22px 22px 5px 22px; text-decoration: none; border: 1px solid color-mix(in srgb, var(--sun-ink) 10%, transparent); }
.season-year { display: flex; align-items: center; gap: 12px; font-family: var(--serif); font-size: 16px; letter-spacing: .12em; }
.season-year > span { font-family: -apple-system, BlinkMacSystemFont, sans-serif; font-size: 10px; letter-spacing: .13em; opacity: .75; }
.season-title { margin-top: 17px; font-family: var(--serif); font-size: 24px; letter-spacing: -.045em; line-height: 1.55; }
.season-description { margin-top: 10px; font-size: 11px; }
.season-link { display: flex; justify-content: space-between; align-items: center; width: 100%; margin-top: 22px; padding-top: 13px; border-top: 1px solid color-mix(in srgb, var(--sun-ink) 20%, transparent); font-size: 12px; }
.season-link > span { font-size: 20px; line-height: 1; }

.workspace { display: grid; grid-template-columns: 310px minmax(0, 1fr); gap: 25px; align-items: start; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; }
.input-panel { padding: 25px 24px; }
.form-heading { display: flex; gap: 12px; align-items: start; margin-bottom: 25px; }
.section-number { padding-top: 2px; color: var(--muted); font-family: var(--serif); font-size: 16px; }
.form-heading h2 { font-size: 18px; letter-spacing: -.045em; font-weight: 500; }
.form-heading p { margin-top: 4px; font-size: 11px; }
.field { margin-top: 19px; }
.field > label, .field-label { display: block; margin-bottom: 7px; font-size: 12px; font-weight: 500; }
.optional { margin-left: 5px; color: var(--muted); font-size: 10px; font-weight: 400; }
.field input:not([type="checkbox"]), .field select { width: 100%; min-width: 0; height: 46px; padding: 10px 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); color: var(--ink); font-size: 16px; }
.field input::placeholder { color: var(--muted); font-size: 13px; }
.field input:disabled, .field select:disabled { background: var(--canvas); opacity: .6; }
.field input[type="date"], .field input[type="time"] { appearance: auto; -webkit-appearance: auto; }
.field input::-webkit-date-and-time-value { text-align: left; }
.field-hint { margin-top: 7px; color: var(--muted); font-size: 11px; line-height: 1.65; }
.field-hint a { text-decoration-color: var(--line); }
.calendar-switch { display: flex; gap: 4px; padding: 3px; background: var(--canvas); border: 1px solid var(--line); border-radius: 9px; }
.calendar-switch button { flex: 1; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font-size: 13px; }
.calendar-switch button[aria-pressed="true"] { background: var(--paper); color: var(--green); font-weight: 600; box-shadow: 0 1px 4px color-mix(in srgb, var(--ink) 8%, transparent); }
.check-field { margin-top: 3px; }
.check-field label { display: flex; align-items: center; gap: 8px; min-height: 44px; color: var(--muted); font-size: 12px; cursor: pointer; }
.check-field input[type="checkbox"] { width: 17px; height: 17px; min-height: 0; margin: 0; accent-color: var(--green); flex: 0 0 auto; }
.calculation-options { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line); color: var(--muted); }
summary { cursor: pointer; }
.calculation-options summary { min-height: 44px; padding: 10px 0; font-size: 12px; }
.calculation-options .field { margin-top: 4px; }
.button, button.primary { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 44px; padding: 10px 15px; border: 1px solid var(--line); border-radius: 9px; background: var(--paper); color: var(--ink); text-decoration: none; font-size: 13px; font-weight: 500; line-height: 1.5; }
.primary { background: var(--green) !important; color: var(--on-green) !important; border-color: var(--green) !important; }
.calculate-button { width: 100%; margin-top: 22px; min-height: 48px; }
.calculate-button > span { margin-left: auto; font-size: 19px; line-height: 1; }
.form-error { margin-top: 12px; padding: 10px 12px; border-radius: 8px; background: var(--error-bg); color: var(--error); font-size: 12px; }
.form-status { margin-top: 11px; color: var(--muted); font-size: 12px; }
.form-status:empty { display: none; }
.input-note { margin-top: 13px; color: var(--muted); text-align: center; font-size: 10px; line-height: 1.85; }
.result-column { min-width: 0; }
.empty-panel { padding: 24px 30px 0; min-height: 566px; overflow: hidden; }
.empty-topline { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 12px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.empty-topline > .muted { font-size: 10px; }
.empty-pillars { display: flex; justify-content: center; gap: 16px; margin-top: 36px; }
.empty-pillars > span { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px; width: 58px; height: 88px; padding-top: 6px; border: 1px solid var(--line); background: var(--canvas); border-radius: 27px 27px 8px 8px; font-family: var(--serif); font-size: 28px; color: var(--muted); }
.empty-pillars > span:nth-child(2) { color: var(--green); background: var(--tint); border-color: color-mix(in srgb, var(--green) 20%, var(--line)); }
.empty-pillars small { font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", sans-serif; font-size: 10px; font-weight: 400; }
.empty-panel h2 { margin-top: 24px; font-family: var(--serif); font-size: 24px; letter-spacing: -.06em; font-weight: 400; line-height: 1.65; text-align: center; }
.empty-description { margin-top: 10px; color: var(--muted); text-align: center; font-size: 12px; line-height: 1.85; }
.empty-flow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 33px; text-align: center; }
.empty-flow > div { padding-inline: 5px; }
.empty-flow > div + div { border-left: 1px solid var(--line); }
.flow-number { display: block; margin-bottom: 5px; color: var(--muted); font-family: var(--serif); font-size: 15px; }
.empty-flow strong { font-size: 12px; font-weight: 500; }
.empty-flow p { margin-top: 5px; color: var(--muted); font-size: 10px; line-height: 1.8; }
.empty-guide-link { display: flex; align-items: center; justify-content: space-between; min-height: 60px; margin: 25px -30px 0; padding: 13px 30px; border-top: 1px solid var(--line); background: var(--canvas); text-decoration: none; color: var(--muted); font-size: 11px; }
.empty-guide-link > span { color: var(--green); font-size: 19px; }

/* Shared classes used by the calculated results. */
#result > .panel, #result > section, #result > article { margin-top: 20px; }
#result > :first-child { margin-top: 0; }
#result-panel > .panel, #result-panel > section, #result-panel > article { margin-top: 20px; }
#result-panel > :first-child { margin-top: 0; }
#result .panel { padding: 21px 23px; }
.result-header { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.result-header h2 { font-size: 21px; letter-spacing: -.05em; font-weight: 500; }
.result-header p { color: var(--muted); font-size: 12px; margin-top: 5px; }
.result-header .badge { margin-top: 7px; }
.result-tabs { display: flex; gap: 18px; border-bottom: 1px solid var(--line); margin-bottom: 19px; overflow-x: auto; scrollbar-width: thin; }
.result-tabs button { flex: 0 0 auto; padding: 10px 2px; border: 0; background: transparent; color: var(--muted); font-size: 13px; white-space: nowrap; }
.result-tabs button[aria-selected="true"] { color: var(--green); font-weight: 600; box-shadow: inset 0 -2px var(--green); }
.panel h3 { font-size: 15px; font-weight: 600; letter-spacing: -.025em; }
.panel > h3 + p { margin-top: 8px; }
.panel > .small { margin-top: 11px; }
.inline > a { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); font-size: 11px; margin-left: auto; }
.pillars { width: 100%; border-collapse: separate; border-spacing: 5px; table-layout: fixed; font-size: 12px; }
.pillar-scroll { max-width: 100%; overflow-x: auto; scrollbar-width: thin; }
.chart-scroll-hint { display: none; }
.pillars th { color: var(--muted); font-weight: 400; text-align: center; padding: 8px 1px; font-size: 11px; word-break: keep-all; }
.pillars th:first-child { width: 43px; text-align: left; }
.pillars th.day, .pillars th[data-day] { color: var(--green); font-weight: 600; }
.pillars td { text-align: center; vertical-align: middle; padding: 6px 2px; border-radius: 9px; overflow-wrap: anywhere; }
.pillars td button { width: 100%; border: 0; background: transparent; padding: 4px 1px; }
.pillar-stem, .pillar-branch { display: block; font-family: var(--serif); font-size: 34px; font-weight: 400; line-height: 1.45; padding: 4px 0; }
.pillar-stem, .pillar-branch { border-radius: 9px; padding-block: 10px; }
.pillar-stem strong, .pillar-branch strong { font-weight: 400; }
.pillars small { display: block; font-size: 10px; font-weight: 400; line-height: 1.6; }
.pillar-stem small, .pillar-branch small { font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", sans-serif; margin-top: 3px; }
.day-intro, .reading-intro { display: flex; align-items: center; gap: 15px; }
.day-intro p { margin-top: 5px; color: var(--muted); font-size: 12px; line-height: 1.85; }
.day-symbol { flex: 0 0 auto; display: grid; place-items: center; min-width: 47px; min-height: 57px; font-family: var(--serif); font-size: 35px; color: var(--green); border-left: 1px solid var(--green); }
.reading-intro { margin-block: 9px 15px; }
.reading-intro h3 { font-size: 20px; font-weight: 500; letter-spacing: -.05em; margin-top: 4px; }
.reading-intro p { font-size: 11px; }
.result-next { padding: 24px 3px 5px; }
.result-next h3 { font-size: 15px; font-weight: 500; }
.result-next p { margin-top: 7px; font-size: 12px; }
.result-next .button { margin-top: 15px; }
.reflection { padding: 20px 22px; border-left: 2px solid var(--green); background: var(--tint); border-radius: 0 11px 11px 0; margin-block: 21px; }
.reflection p { margin-top: 5px; font-family: var(--serif); font-size: 19px; line-height: 1.7; letter-spacing: -.025em; }
.wood, .element-wood, [data-element="wood"], [data-element="木"] { background: var(--wood-bg); color: var(--wood); }
.fire, .element-fire, [data-element="fire"], [data-element="火"] { background: var(--fire-bg); color: var(--fire); }
.earth, .element-earth, [data-element="earth"], [data-element="土"] { background: var(--earth-bg); color: var(--earth); }
.metal, .element-metal, [data-element="metal"], [data-element="金"] { background: var(--metal-bg); color: var(--metal); }
.water, .element-water, [data-element="water"], [data-element="水"] { background: var(--water-bg); color: var(--water); }
.element-list { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin: 15px 0 0; padding: 0; list-style: none; }
.element-list > * { min-width: 0; padding: 10px 5px; border-radius: 8px; text-align: center; font-size: 12px; background: var(--canvas); }
.element-list strong { display: block; margin-top: 4px; font-size: 20px; font-weight: 500; }
.element-list small { display: block; margin-top: 3px; font-size: 10px; color: var(--muted); }
.element-list .wood, .element-list .element-wood { background: var(--wood-bg); }
.element-list .fire, .element-list .element-fire { background: var(--fire-bg); }
.element-list .earth, .element-list .element-earth { background: var(--earth-bg); }
.element-list .metal, .element-list .element-metal { background: var(--metal-bg); }
.element-list .water, .element-list .element-water { background: var(--water-bg); }
.reading-categories { display: flex; gap: 7px; flex-wrap: wrap; margin-block: 17px; }
.reading-categories button { min-height: 44px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); color: var(--muted); font-size: 12px; }
.reading-categories button[aria-pressed="true"] { background: var(--green); color: var(--on-green); border-color: var(--green); }
.reading-panel { padding-block: 3px; }
.reading-panel > h3 { margin-bottom: 10px; }
.reading-panel > p { color: var(--muted); font-size: 13px; line-height: 1.85; }
.reading-module { padding: 17px 18px; margin-top: 12px; background: var(--canvas); border: 1px solid var(--line); border-radius: 11px; }
.reading-module h3, .reading-module h4 { font-size: 14px; font-weight: 500; }
.reading-module p { margin-top: 8px; color: var(--muted); font-size: 13px; line-height: 1.9; }
.reading-module .badge { margin-top: 11px; }
.evidence { margin-top: 15px; }
.evidence details, details.evidence { border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.evidence summary { min-height: 44px; padding-block: 11px; font-size: 12px; }
.evidence details p, .evidence details ul, details.evidence p, details.evidence ul { margin-top: 4px; padding-bottom: 12px; font-size: 12px; line-height: 1.85; }
.evidence ul { padding-left: 19px; }
.year-summary { padding: 24px; background: var(--tint); border: 1px solid var(--line); border-radius: 14px; }
.year-summary h2, .year-summary h3 { font-family: var(--serif); font-weight: 400; font-size: 23px; }
.year-summary p { margin-top: 11px; font-size: 13px; line-height: 1.85; }
.year-summary .badge { margin-bottom: 12px; }
.annual-basis { margin-top: 15px; color: var(--muted); font-size: 11px; }
.tojeong-result > div:first-child > h3 { margin-top: 11px; font-family: var(--serif); font-size: 23px; font-weight: 400; }
.tojeong-result > div:first-child > p { margin-top: 9px; font-size: 12px; }
.gua { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; width: min(370px, 100%); margin: 22px auto; }
.gua > div { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 15px 8px; background: var(--tint); border-radius: 13px; }
.gua strong { font-family: var(--serif); font-size: 44px; color: var(--green); font-weight: 400; line-height: 1.5; }
.gua span { color: var(--muted); font-size: 11px; }
.category-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.category-grid > * { min-width: 0; padding: 17px; border: 1px solid var(--line); border-radius: 11px; background: var(--paper); }
.category-grid h3, .category-grid h4 { font-size: 14px; font-weight: 500; }
.category-grid p { margin-top: 7px; color: var(--muted); font-size: 12px; line-height: 1.85; }
.month-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; margin-top: 17px; }
.month-card { min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 11px; background: var(--paper); }
.month-card h3, .month-card h4 { font-size: 14px; font-weight: 500; }
.month-card p { margin-top: 9px; color: var(--muted); font-size: 12px; line-height: 1.85; }
.month-card .badge { margin-top: 10px; }
.month-card summary { min-height: 44px; }
.month-number { display: block; margin-bottom: 9px; color: var(--muted); font-family: var(--serif); font-size: 18px; }
.monthly-section { margin-top: 25px; }
.monthly-section > p { margin-top: 7px; }
.ad-area { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-height: 115px; margin-block: 28px; padding: 18px 12px; border: 1px dashed var(--line); border-radius: 9px; background: var(--canvas); color: var(--muted); text-align: center; font-size: 11px; }
.ad-area > .adsbygoogle { width: 100%; }
.ad-area:has(.adsbygoogle[data-ad-status="unfilled"]) { display: none; }
.ad-area .ad-label { letter-spacing: .07em; font-size: 10px; }
.record-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-block: 18px; }
.record-actions button { border: 1px solid var(--line); border-radius: 8px; padding: 9px 13px; background: var(--paper); color: var(--ink); font-size: 12px; }
.record-actions button.primary { background: var(--green); }
.inline { display: inline-flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.notice { margin-block: 15px; padding: 13px 15px; border: 1px solid var(--line); border-radius: 10px; background: var(--tint); color: var(--muted); font-size: 12px; line-height: 1.85; }
.notice h3, .notice strong { color: var(--ink); }
.notice p + p { margin-top: 7px; }

.trust-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; padding: 30px 14px; margin-top: 15px; }
.trust-strip p { display: grid; grid-template-columns: 33px 1fr; column-gap: 11px; align-items: center; }
.trust-strip p > span:first-child { grid-row: 1 / 3; font-family: var(--serif); font-size: 24px; color: var(--green); }
.trust-strip strong { font-size: 12px; font-weight: 500; }
.trust-strip p > span:last-child { margin-top: 3px; color: var(--muted); font-size: 10px; }
.editorial-band { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; padding-block: 20px 48px; border-top: 1px solid var(--line); }
.guide-card, .principle-card { padding: 24px 25px; border-radius: 13px; }
.guide-card { background: var(--tint); text-decoration: none; }
.principle-card { border: 1px solid var(--line); }
.editorial-band h2 { margin-top: 10px; font-family: var(--serif); font-size: 22px; font-weight: 400; letter-spacing: -.045em; }
.editorial-band p { margin-top: 10px; font-size: 12px; color: var(--muted); line-height: 1.9; }
.text-link { display: inline-flex; align-items: center; gap: 20px; min-height: 44px; margin-top: 12px; font-size: 12px; }
.text-link > span { font-size: 18px; }
.site-footer { display: flex; justify-content: space-between; align-items: start; flex-wrap: wrap; gap: 24px; padding-block: 27px 36px; border-top: 1px solid var(--line); color: var(--muted); }
.footer-brand { text-decoration: none; color: var(--ink); font-size: 13px; font-weight: 500; }
.site-footer p { margin-top: 6px; font-size: 10px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 5px 21px; }
.site-footer nav a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; font-size: 11px; }
.site-footer nav a:hover { color: var(--green); }

/* Content pages share the same navigation and reading rhythm. */
.document-shell { width: min(1120px, calc(100% - 80px)); margin-inline: auto; }
.document-page .site-header { width: 100%; }
.document-main { width: min(760px, 100%); margin-inline: auto; padding: 57px 0 64px; }
.document-intro { margin-bottom: 35px; }
.document-intro h1, .document-content > h1 { margin-top: 13px; font-family: var(--serif); font-size: clamp(30px, 4vw, 38px); font-weight: 400; letter-spacing: -.06em; }
.document-intro > p { margin-top: 16px; color: var(--muted); font-size: 14px; line-height: 1.95; }
.document-intro .updated { margin-top: 13px; font-size: 11px; }
.document-content { min-width: 0; }
.document-content section { padding-block: 26px; border-top: 1px solid var(--line); scroll-margin-top: 30px; }
.document-content section h2 { font-size: 18px; letter-spacing: -.035em; font-weight: 500; margin-bottom: 13px; }
.document-content section h3 { font-size: 14px; margin-block: 18px 8px; }
.document-content section p, .document-content section li { color: var(--muted); font-size: 14px; line-height: 1.95; overflow-wrap: anywhere; }
.document-content section p + p { margin-top: 11px; }
.document-content section ul, .document-content section ol { margin: 12px 0 0; padding-left: 20px; }
.document-content section li + li { margin-top: 7px; }
.document-content a { text-decoration-color: var(--line); }
.document-content a:hover { text-decoration-color: var(--green); }
.document-content .notice { margin-block: 15px 0; }
.document-content .notice p { font-size: 12px; }
.document-page .site-footer { width: 100%; }
.guide-toc { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.guide-toc a { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 13px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); color: var(--muted); text-decoration: none; font-size: 12px; }
.term-heading { display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px; }
.term-heading span { color: var(--muted); font-family: var(--serif); font-size: 14px; }
.term-example { display: flex; gap: 10px; align-items: center; margin-top: 15px; padding: 17px; background: var(--tint); border-radius: 10px; }
.term-example .term-character { flex: 0 0 auto; width: 42px; font-family: var(--serif); font-size: 33px; color: var(--green); text-align: center; }
.term-example p { font-size: 12px !important; }
.reference-note { margin-top: 20px; color: var(--muted); font-size: 11px; line-height: 1.85; }
.definition-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 17px; }
.definition-grid > div { padding: 16px; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; }
.definition-grid h3 { margin: 0 0 7px !important; }
.definition-grid p { font-size: 12px !important; }

@media (max-width: 950px) {
  .site-header { flex-wrap: wrap; gap: 10px 18px; padding-block: 18px 10px; }
  .site-header .main-nav { order: 3; width: 100%; margin: 0; justify-content: space-between; }
  .site-header .language-switch { margin-left: auto; order: 2; }
  .shell, .document-shell { width: calc(100% - 48px); }
  .hero { grid-template-columns: minmax(0, 1fr) 270px; gap: 35px; padding-top: 42px; }
  .season-card { padding: 22px; }
  .workspace { grid-template-columns: 280px minmax(0, 1fr); gap: 18px; }
  .input-panel { padding: 22px 20px; }
  .empty-panel { padding: 23px 20px 0; }
  .empty-topline { flex-wrap: wrap; gap: 4px; }
  .empty-guide-link { margin-inline: -20px; padding-inline: 20px; }
  .empty-panel h2 { font-size: 22px; }
  #result .panel { padding: 17px; }
  .pillars { border-spacing: 3px; }
  .pillars th:first-child { width: 30px; }
  .pillar-stem, .pillar-branch { font-size: 29px; }
  .month-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 740px) {
  .site-header { min-height: 87px; gap: 16px; }
  .main-nav { gap: 18px; }
  .main-nav a { font-size: 12px; }
  .hero { grid-template-columns: minmax(0, 1fr) 225px; gap: 25px; padding-block: 36px; }
  .hero h1 { font-size: 36px; }
  .hero-copy > p { font-size: 12px; }
  .season-card { min-height: 221px; padding: 21px 19px; }
  .season-title { font-size: 22px; }
  .season-description { font-size: 10px; }
  .workspace { grid-template-columns: 1fr; gap: 23px; }
  .input-panel { padding: 24px; }
  .form-heading { margin-bottom: 17px; }
  .empty-panel { min-height: 535px; padding: 22px 28px 0; }
  .empty-topline { flex-wrap: nowrap; }
  .empty-guide-link { margin-inline: -28px; padding-inline: 28px; }
  .empty-flow { margin-top: 28px; }
  .trust-strip { padding-inline: 0; gap: 12px; }
  .trust-strip p { grid-template-columns: 25px 1fr; gap: 7px; }
  .trust-strip p > span:first-child { font-size: 20px; }
  .trust-strip strong { font-size: 11px; }
  .trust-strip p > span:last-child { font-size: 9px; }
  .editorial-band { gap: 15px; padding-bottom: 30px; }
  .guide-card, .principle-card { padding: 21px 18px; }
  .editorial-band h2 { font-size: 20px; }
  .pillar-stem, .pillar-branch { font-size: 33px; }
  .document-main { padding-top: 40px; }
}

@media (max-width: 540px) {
  .shell, .document-shell { width: calc(100% - 36px); }
  .site-header { align-items: center; flex-direction: row; gap: 10px; padding-block: 20px 10px; }
  .site-logo { gap: 10px; }
  .logo-mark { width: 36px; height: 36px; border-radius: 11px 11px 3px 11px; font-size: 24px; }
  .logo-name { font-size: 22px; }
  html[lang="en"] .logo-name { font-size: 18px; }
  .language-switch { width: 83px; font-size: 11px; }
  .logo-name span { margin-left: 3px; }
  .main-nav { width: 100%; justify-content: space-between; gap: 12px; }
  .main-nav a { min-height: 44px; font-size: 12px; }
  .hero { grid-template-columns: 1fr; gap: 22px; padding-block: 29px 25px; }
  .hero h1 { font-size: 36px; margin-top: 15px; }
  .hero-copy > p { font-size: 13px; margin-top: 12px; }
  .hero-copy > .hero-meta { margin-top: 13px; font-size: 10px; }
  .season-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 15px; min-height: 0; padding: 18px 19px; border-radius: 13px 13px 4px 13px; }
  .season-year { font-size: 11px; grid-column: 1; gap: 8px; }
  .season-year > span { font-size: 9px; }
  .season-title { font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", sans-serif; font-size: 15px; font-weight: 500; margin-top: 3px; grid-column: 1; }
  .season-title br { display: none; }
  .season-description { display: none; }
  .season-link { display: flex; flex-direction: column; align-items: end; width: auto; border: 0; margin: 0; padding: 0; grid-column: 2; grid-row: 1 / 3; gap: 7px; font-size: 10px; }
  .season-link > span { font-size: 22px; }
  .workspace { gap: 20px; }
  .input-panel { padding: 22px 20px; }
  .form-heading h2 { font-size: 18px; }
  .form-heading p { font-size: 11px; }
  .field { margin-top: 17px; }
  .field > label, .field-label { font-size: 12px; }
  .input-note { font-size: 11px; }
  .calculate-button { min-height: 48px; }
  .empty-panel { min-height: 0; padding: 20px 19px 0; }
  .empty-topline { flex-wrap: wrap; font-size: 12px; }
  .empty-topline > .muted { font-size: 10px; }
  .empty-pillars { gap: 11px; margin-top: 29px; }
  .empty-pillars > span { width: 52px; height: 81px; font-size: 26px; }
  .empty-panel h2 { font-size: 21px; margin-top: 22px; }
  .empty-description { font-size: 11px; }
  .empty-description br { display: none; }
  .empty-flow { gap: 4px; margin-top: 25px; }
  .empty-flow strong { font-size: 11px; }
  .empty-flow p { font-size: 10px; }
  .empty-guide-link { min-height: 57px; margin-inline: -19px; padding-inline: 19px; font-size: 10px; }
  .trust-strip { grid-template-columns: 1fr; gap: 18px; padding-block: 25px; margin-top: 0; }
  .trust-strip p { grid-template-columns: 27px auto 1fr; gap: 10px; }
  .trust-strip p > span:first-child { grid-row: 1; }
  .trust-strip strong { font-size: 11px; }
  .trust-strip p > span:last-child { margin: 0; font-size: 10px; }
  .editorial-band { grid-template-columns: 1fr; padding-block: 19px 28px; gap: 12px; }
  .guide-card, .principle-card { padding: 21px 22px; }
  .editorial-band h2 { font-size: 22px; }
  .editorial-band p { font-size: 12px; }
  .site-footer { padding-block: 23px 28px; gap: 13px; }
  .site-footer nav { gap: 0 15px; }
  .site-footer nav a { font-size: 10px; }
  #result .panel { padding: 16px 13px; border-radius: 14px; }
  .result-header h2 { font-size: 19px; }
  .result-header p { font-size: 11px; }
  .result-tabs { gap: 18px; }
  .result-tabs button { font-size: 12px; }
  .pillars { border-spacing: 3px; }
  .pillars th:first-child { width: 29px; }
  .pillars th { font-size: 10px; }
  .pillars td { font-size: 10px; }
  .pillar-stem, .pillar-branch { font-size: 28px; }
  .pillars small { font-size: 9px; }
  .element-list { gap: 5px; }
  .element-list > * { font-size: 11px; padding-inline: 3px; }
  .element-list strong { font-size: 19px; }
  .reading-categories { gap: 6px; }
  .reading-categories button { padding-inline: 12px; font-size: 12px; }
  .reading-module { padding: 15px; }
  .reading-module p { font-size: 12px; }
  .reading-intro h3 { font-size: 18px; }
  .reflection { padding: 16px 17px; }
  .reflection p { font-size: 17px; }
  .gua { gap: 8px; }
  .gua strong { font-size: 37px; }
  .category-grid { gap: 9px; }
  .category-grid > * { padding: 14px; }
  .month-grid { gap: 9px; }
  .month-card { padding: 14px; }
  .year-summary { padding: 19px; }
  .year-summary h2, .year-summary h3 { font-size: 22px; }
  .notice { padding: 12px 13px; }
  .document-main { padding-block: 34px 42px; }
  .document-intro { margin-bottom: 25px; }
  .document-intro h1, .document-content > h1 { font-size: 30px; }
  .document-intro > p { font-size: 13px; }
  .document-content section { padding-block: 23px; }
  .document-content section h2 { font-size: 17px; }
  .document-content section p, .document-content section li { font-size: 13px; }
  .definition-grid { grid-template-columns: 1fr; }
  .guide-toc { gap: 6px; }
  .guide-toc a { padding-inline: 10px; font-size: 11px; }
}

@media (max-width: 360px) {
  .shell, .document-shell { width: calc(100% - 28px); }
  .main-nav { gap: 8px; }
  .main-nav a { font-size: 11px; }
  .hero h1 { font-size: 33px; }
  .season-card { gap: 4px 9px; padding-inline: 16px; }
  .season-title { font-size: 14px; }
  .season-link { font-size: 9px; }
  .input-panel { padding-inline: 18px; }
  .empty-panel { padding-inline: 14px; }
  .empty-panel h2 { font-size: 20px; }
  .empty-pillars { gap: 9px; }
  .empty-pillars > span { width: 48px; }
  .empty-guide-link { margin-inline: -14px; padding-inline: 14px; }
  .trust-strip p { gap: 7px; }
  .trust-strip p > span:last-child { font-size: 9px; }
  .category-grid, .month-grid { grid-template-columns: 1fr; }
  .pillar-stem, .pillar-branch { font-size: 24px; }
}

@media (prefers-reduced-motion: no-preference) {
  button, .button, .main-nav a, .guide-card, .season-card { transition: background-color .15s ease, color .15s ease, border-color .15s ease; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

@media (max-width: 540px) {
  html[lang="en"] .pillars { min-width: 440px; }
  html[lang="en"] .pillars th, html[lang="en"] .pillars td { overflow-wrap: normal; word-break: normal; font-size: 11px; }
  html[lang="en"] .chart-scroll-hint { display: block; margin-top: 8px; }
}
