:root {
  color-scheme: light;
  --gold: #c8960c;
  --gold-dark: #8b6508;
  --ink: #140700;
  --ink-soft: #241103;
  --paper: #f7efdc;
  --panel: #fffdf8;
  --text: #2c1a00;
  --muted: #6f5a39;
  --line: #dfd0ae;
  --danger: #9d2f20;
  --shadow: 0 18px 42px rgba(27, 12, 1, .12);
  --serif: "Songti TC", "Songti SC", STSong, "Noto Serif CJK SC", SimSun, serif;
  --sans: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

html { background: var(--ink); }

body {
  margin: 0;
  min-width: 320px;
  background: var(--paper);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.65;
}

a { color: inherit; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.site-header {
  background: var(--ink);
  color: #fff8e8;
}

.header-inner {
  min-height: 66px;
  max-width: 1240px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: #e8b84b;
  font-family: var(--serif);
  font-size: 1.28rem;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: .08em;
  white-space: nowrap;
}

.nav { display: flex; align-items: center; gap: 18px; font-size: .9rem; }
.nav a { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.nav a[aria-current="page"] { color: #e8b84b; }
.nav form { margin: 0; }
.nav-button { min-width: 44px; min-height: 44px; border: 0; background: transparent; color: inherit; cursor: pointer; }

.demo-strip {
  padding: 8px 20px;
  background: #f2e2b4;
  color: #513b0e;
  text-align: center;
  font-size: .8rem;
  border-bottom: 1px solid #d8c28d;
}

main { min-height: calc(100dvh - 178px); }

.workbench {
  max-width: 1240px;
  margin: 0 auto;
  padding: 36px 20px 28px;
  display: grid;
  gap: 28px;
}

.login-required-dialog { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 20px; }
.login-required-backdrop { position: absolute; inset: 0; background: rgba(20, 7, 0, .58); }
.login-required-card { position: relative; width: min(440px, 100%); padding: 30px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); box-shadow: 0 24px 60px rgba(27, 12, 1, .26); }
.login-required-card h2 { margin: 6px 0 10px; font-family: var(--serif); font-size: clamp(1.45rem, 3vw, 2rem); }
.login-required-card > p:not(.eyebrow) { color: var(--muted); }
.login-required-close { position: absolute; top: 10px; right: 12px; width: 40px; height: 40px; border: 0; background: transparent; color: var(--muted); font-size: 1.7rem; cursor: pointer; }
.login-required-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

.intro-pane { display: flex; flex-direction: column; gap: 30px; justify-content: space-between; }

h1, h2, h3 { margin: 0; font-family: var(--serif); line-height: 1.2; }
h1 { font-size: clamp(2.45rem, 7vw, 4rem); letter-spacing: -.025em; }
h2 { font-size: clamp(1.45rem, 3vw, 2rem); }
p { margin: 0; }

.lead { max-width: 27rem; margin-top: 18px; color: var(--muted); font-size: 1.05rem; }
.eyebrow, .step-kicker { margin-bottom: 8px; color: var(--gold-dark); font-size: .76rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }

.seal-line { width: 168px; margin-top: 22px; display: flex; align-items: center; gap: 10px; }
.seal-line span { height: 1px; flex: 1; background: var(--gold); }
.seal-line i { width: 10px; height: 10px; border: 2px solid var(--gold); border-radius: 50%; }

.quota-block, .guest-callout {
  padding-top: 24px;
  border-top: 1px solid #bcae8e;
}
.quota-label { color: var(--muted); font-size: .82rem; }
.quota-value { margin: 4px 0; font-family: var(--serif); font-size: 2rem; font-weight: 700; }
.guest-callout h2 { margin-bottom: 8px; }
.guest-callout p { margin-bottom: 18px; color: var(--muted); }
.privacy-note { max-width: 29rem; color: var(--muted); font-size: .82rem; }

.form-pane {
  padding: 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.pane-heading { margin-bottom: 24px; }
.pane-heading p { max-width: 48rem; margin-top: 8px; color: var(--muted); }

.birth-form { display: grid; gap: 20px; }
.field { min-width: 0; }
.field label, .fieldset legend { display: block; margin-bottom: 7px; font-size: .86rem; font-weight: 600; }
.field input, .field select {
  width: 100%;
  min-height: 48px;
  padding: 10px 13px;
  border: 1px solid #cdbb97;
  border-radius: 10px;
  background: #fffefa;
  color: var(--text);
}
.field input::placeholder { color: #806e50; }
.field input:disabled, .field select:disabled { cursor: not-allowed; background: #eee7d8; color: #7c705b; }
.field input:focus-visible, .field select:focus-visible, .button:focus-visible, .nav a:focus-visible, .nav-button:focus-visible, .text-link:focus-visible {
  outline: 3px solid rgba(200, 150, 12, .38);
  outline-offset: 2px;
  border-color: var(--gold-dark);
}
.field input[aria-invalid="true"] { border-color: var(--danger); }
.field-help { margin-top: 6px; color: var(--muted); font-size: .78rem; }
.fieldset { margin: 0; padding: 0; border: 0; }

.segmented { display: grid; grid-template-columns: repeat(auto-fit, minmax(112px, 1fr)); gap: 8px; }
.segmented-two { grid-template-columns: repeat(2, minmax(130px, 1fr)); }
.reading-focus-options { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.segmented label { min-height: 48px; margin: 0; padding: 8px 10px; display: flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid #cdbb97; border-radius: 10px; cursor: pointer; text-align: center; }
.segmented label:has(input:checked) { border-color: var(--gold-dark); background: #f5e7bd; }
.segmented input { width: 16px; min-height: auto; accent-color: var(--gold-dark); }

.conditional-group { min-width: 0; }
.lunar-fields { display: grid; gap: 14px; }
.date-selects { display: grid; grid-template-columns: minmax(0, 1.35fr) repeat(2, minmax(0, .8fr)); gap: 8px; }
.date-selects select { width: 100%; min-height: 48px; padding: 10px 12px; border: 1px solid #cdbb97; border-radius: 10px; background: #fffefa; color: var(--text); }
.date-selects select:focus-visible { outline: 3px solid rgba(200, 150, 12, .38); outline-offset: 2px; border-color: var(--gold-dark); }
.date-wheels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; overflow: hidden; }
.date-wheel-column { height: 180px; overflow-y: auto; scroll-snap-type: y mandatory; overscroll-behavior: contain; padding-block: 68px; border: 1px solid #cdbb97; border-radius: 12px; background: #fffefa; scrollbar-width: thin; }
.date-wheel-item { width: 100%; min-height: 44px; padding: 8px 4px; border: 0; background: transparent; color: var(--muted); font: inherit; scroll-snap-align: center; cursor: pointer; }
.date-wheel-item[aria-selected="true"] { color: var(--text); font-weight: 700; background: #f5e7bd; }
.date-wheel-item:focus-visible { outline: 3px solid rgba(200, 150, 12, .38); outline-offset: -3px; }
.place-selects { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.place-select-field { min-width: 0; }
.place-select-field label { min-height: 2.6em; display: flex; align-items: flex-end; }
.custom-place-input { margin-top: 9px; }
.calendar-preview, .inline-notice { padding: 11px 13px; border-block: 1px solid #e4d2a6; background: #f5ead0; color: #594317; font-size: .84rem; }
.check-row { min-height: 48px; display: flex; align-items: center; gap: 11px; cursor: pointer; }
.check-row input { width: 20px; height: 20px; flex: 0 0 auto; accent-color: var(--gold-dark); }
.check-row span { display: grid; }
.check-row small { color: var(--muted); }
.place-help { margin-top: 7px; color: var(--muted); font-size: .8rem; }
.place-help summary { width: fit-content; min-height: 32px; cursor: pointer; color: var(--gold-dark); }
.place-help p { margin-top: 5px; }
.advanced-settings { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.advanced-settings > summary, .report-details > summary, .calculation-note > summary { min-height: 48px; display: flex; align-items: center; font-weight: 700; cursor: pointer; }
.advanced-settings .switch-row { padding-bottom: 16px; }

.switch-row, .consent { min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 18px; cursor: pointer; }
.switch-row span { display: grid; }
.switch-row small { color: var(--muted); }
.switch-row input { width: 42px; height: 24px; accent-color: var(--gold-dark); }
.consent { justify-content: flex-start; align-items: flex-start; font-size: .86rem; }
.consent input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--gold-dark); flex: 0 0 auto; }

.button {
  min-height: 48px;
  padding: 12px 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.button-primary { background: var(--ink); color: #fff9eb; }
.button-wide { width: 100%; white-space: nowrap; }
.button-wide span { color: #e6c772; font-size: .78rem; font-weight: 500; }
.button:disabled { cursor: wait; opacity: .72; }
.form-status { min-height: 1.5em; margin-top: 8px; color: var(--danger); text-align: center; font-size: .86rem; }

.method-section { max-width: 1240px; margin: 0 auto; padding: 28px 20px 64px; }
.method-section > h2 { margin-bottom: 22px; }
.method-grid { display: grid; gap: 22px; }
.method-grid > div { padding-top: 16px; border-top: 1px solid #bcae8e; }
.method-grid strong { font-family: var(--serif); font-size: 1.1rem; }
.method-grid p { margin-top: 6px; color: var(--muted); }

.auth-shell { max-width: 960px; margin: 0 auto; padding: 54px 20px 72px; display: grid; gap: 30px; align-items: center; }
.auth-copy p { max-width: 30rem; margin-top: 16px; color: var(--muted); }
.auth-card { padding: 26px; display: grid; gap: 18px; background: var(--panel); border-radius: 16px; box-shadow: var(--shadow); }
.demo-code { padding: 10px 12px; background: #f2e2b4; border-radius: 10px; color: #513b0e; }
.error-message { padding: 10px 12px; border: 1px solid #c47164; border-radius: 10px; color: #7c2015; background: #fff4f1; }
.text-link { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); }

.message-page { max-width: 720px; margin: 0 auto; padding: 80px 20px; text-align: center; }
.message-page p { margin: 18px 0 24px; color: var(--muted); }

.report-shell, .unlock-shell { max-width: 1160px; margin: 0 auto; padding: 40px 20px 72px; }
.report-header { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 22px; align-items: flex-end; margin-bottom: 24px; }
.report-header h1 { font-size: clamp(2rem, 5vw, 3.35rem); }
.report-header p { margin-top: 8px; color: var(--muted); }
.report-quota { min-width: 140px; padding-left: 18px; border-left: 1px solid #bcae8e; display: grid; }
.report-quota span { color: var(--muted); font-size: .8rem; }
.report-quota strong { font-family: var(--serif); font-size: 1.55rem; }
.report-warning { margin-bottom: 26px; padding: 12px 16px; background: #f2e2b4; color: #513b0e; border-radius: 10px; }
.report-year-picker { margin: 0 0 24px; padding: 14px 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fbf4e2; }
.report-year-picker label { font-weight: 700; }
.report-year-picker select { min-height: 42px; padding: 8px 30px 8px 11px; border: 1px solid #cdbb97; border-radius: 9px; background: #fffefa; color: var(--text); }
.report-year-picker span { color: var(--muted); font-size: .8rem; }
.annual-quick-summary { margin-bottom: 28px; }
.annual-theme-note { max-width: 72ch; margin: 0 0 16px; padding: 10px 12px; border: 1px solid #e4d6b9; background: #fbf4e2; color: var(--muted); font-size: .9rem; line-height: 1.7; overflow-wrap: anywhere; }
.annual-theme-note strong { color: var(--text); }
.annual-quick-summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.annual-quick-summary-card { min-width: 0; padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); box-shadow: var(--shadow); }
.annual-quick-summary-card-heading { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.annual-quick-summary-card h3 { margin: 0; font-size: 1.05rem; }
.quick-status { flex: 0 0 auto; padding: 4px 8px; border: 1px solid currentColor; border-radius: 999px; font-size: .74rem; font-weight: 700; white-space: nowrap; }
.quick-status-favorable { color: #4d6d23; background: #eef4df; }
.quick-status-stable { color: var(--gold-dark); background: #fbf0d0; }
.quick-status-cautious { color: var(--danger); background: #fae7df; }
.annual-quick-summary-card > p { margin: 14px 0; color: var(--muted); font-size: .9rem; }
.annual-quick-summary-action { display: grid; gap: 4px; font-size: .86rem; }
.annual-quick-summary-action strong { color: var(--gold-dark); }
.annual-quick-summary-action span { color: var(--text); overflow-wrap: anywhere; }
.report-reading-guide { margin-bottom: 28px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.report-reading-guide > summary { min-height: 48px; display: flex; align-items: center; color: var(--ink); font-family: var(--serif); font-size: clamp(1.2rem, 2.5vw, 1.55rem); font-weight: 700; cursor: pointer; }
.report-reading-guide-body { padding: 0 0 22px; }
.report-reading-guide-body > ol { max-width: 70ch; padding-left: 1.35rem; }
.report-reading-guide-body > ol li + li { margin-top: 10px; }
.report-confidence-explainer { max-width: 70ch; margin-top: 18px; padding-top: 18px; border-top: 1px solid #e4d6b9; }
.report-confidence-explainer h3 { margin: 0; font-size: 1rem; }
.report-confidence-explainer p { margin-top: 7px; color: var(--muted); font-size: .9rem; line-height: 1.75; }
.report-glossary { max-width: 70ch; margin-top: 16px; border-top: 1px solid #e4d6b9; }
.report-glossary > summary { min-height: 48px; display: flex; align-items: center; color: var(--gold-dark); font-weight: 700; cursor: pointer; }
.report-glossary-list { margin: 0; }
.report-glossary-list > div { padding: 12px 0; border-top: 1px solid #eee3ce; }
.report-glossary-list > div:first-child { border-top: 0; }
.report-glossary-list dt { font-weight: 700; }
.report-glossary-list dd { margin: 5px 0 0; color: var(--muted); font-size: .88rem; line-height: 1.7; }
.annual-highlights { margin-bottom: 28px; }
.annual-highlights-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.annual-highlight { min-width: 0; padding: 18px; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.annual-highlight-index { width: 30px; height: 30px; display: inline-grid; place-items: center; border-radius: 50%; background: var(--ink); color: #f6e5b7; font-family: var(--serif); font-size: 1.05rem; }
.annual-highlight h3 { margin: 0; font-size: .94rem; color: var(--gold-dark); }
.annual-highlight strong { display: block; margin-top: 7px; }
.annual-highlight p { margin-top: 8px; color: var(--muted); font-size: .86rem; }
.key-periods .period-item small { grid-column: 1 / -1; color: var(--muted); font-size: .78rem; }
.plain-summary { margin-bottom: 28px; padding: 22px 24px; border: 1px solid #cdbb97; border-radius: 14px; background: #fff9e9; box-shadow: 0 10px 26px rgba(27, 12, 1, .08); }
.plain-summary-heading { display: flex; justify-content: space-between; gap: 18px; align-items: flex-start; }
.plain-summary h2 { font-size: clamp(1.35rem, 3vw, 1.8rem); }
.plain-summary-heading > span { color: var(--muted); font-size: .78rem; white-space: nowrap; }
.plain-summary > p { max-width: 70ch; margin-top: 14px; font-size: 1.02rem; line-height: 1.85; }
.plain-summary > small { display: block; margin-top: 12px; color: var(--muted); font-size: .78rem; }
.report-followup { margin-bottom: 28px; padding: 22px 24px; border: 1px solid #cdbb97; border-radius: 14px; background: #fffdf6; }
.followup-form { display: grid; gap: 8px; margin-top: 16px; max-width: 70ch; }
.followup-form label, .followup-history h3 { font-weight: 700; }
.followup-form textarea { width: 100%; min-height: 92px; resize: vertical; }
.followup-allowance { color: #685022; font-size: .86rem; }
.followup-form-actions { display: flex; align-items: center; gap: 12px; min-height: 42px; }
.followup-form-actions .form-status { margin: 0; }
.followup-history { margin-top: 22px; padding-top: 18px; border-top: 1px solid #e4d6b9; }
.followup-history h3 { margin: 0 0 10px; font-size: 1rem; }
.followup-record { padding: 14px 0; border-top: 1px solid #eee3ce; }
.followup-record:first-of-type { border-top: 0; }
.followup-question, .followup-answer { margin: 0; }
.followup-answer { margin-top: 8px; max-width: 70ch; line-height: 1.8; white-space: pre-line; }
.followup-record small, .followup-empty { display: block; margin-top: 8px; color: var(--muted); font-size: .8rem; }
.report-section { padding: 30px 0; border-top: 1px solid #bcae8e; }
.report-section h2, .recommendation-empty h2 { margin-bottom: 8px; }
.section-intro { margin-bottom: 20px; color: var(--muted); }
.pillars { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--panel); }
.submitted-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.submitted-facts div { min-width: 0; padding: 16px 0; display: grid; gap: 4px; border-bottom: 1px solid var(--line); }
.submitted-facts div:nth-child(odd) { padding-right: 24px; }
.submitted-facts div:nth-child(even) { padding-left: 24px; }
.submitted-facts span { color: var(--muted); font-size: .8rem; }
.submitted-facts strong { overflow-wrap: anywhere; }
.pillar { min-width: 0; padding: 16px 5px; text-align: center; border-right: 1px solid var(--line); }
.pillar:last-child { border-right: 0; }
.pillar > span, .pillar > small { display: block; color: var(--muted); }
.pillar > span { font-size: .76rem; }
.pillar > strong { display: block; margin: 4px 0; font-family: var(--serif); font-size: clamp(1.15rem, 5vw, 2rem); line-height: 1.2; white-space: nowrap; }
.pillar > small { font-size: .7rem; }
.pillar-unknown { background: #f1eadb; }
.pillar p { margin-top: 10px; font-size: .75rem; }
.report-reading { max-width: 68ch; font-size: 1.05rem; }
.report-meta { font-size: .86rem; }
.report-meta strong { color: var(--gold-dark); }
.report-focus { display: flex; flex-wrap: wrap; gap: 4px; align-items: baseline; }
.report-tabs { margin-top: 18px; }
.report-tablist { display: flex; gap: 4px; border-bottom: 1px solid #bcae8e; }
.report-tablist [role="tab"] { min-height: 48px; padding: 10px 18px; border: 0; border-bottom: 3px solid transparent; background: transparent; color: var(--muted); font-weight: 700; cursor: pointer; }
.report-tablist [role="tab"][aria-selected="true"] { border-bottom-color: var(--gold-dark); color: var(--ink); }
.report-tablist [role="tab"]:focus-visible { outline: 3px solid rgba(200, 150, 12, .38); outline-offset: 2px; }
.report-panel { min-width: 0; }
.report-section-lead { padding-top: 28px; }
.confidence-tag { flex: 0 0 auto; color: var(--gold-dark); font-size: .82rem; font-weight: 700; }
.reading-facts { margin: 22px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-block: 1px solid var(--line); }
.reading-facts div { padding: 13px 14px 13px 0; display: grid; gap: 3px; border-right: 1px solid var(--line); }
.reading-facts div + div { padding-left: 14px; }
.reading-facts div:last-child { border-right: 0; }
.reading-facts dt { color: var(--muted); font-size: .78rem; }
.reading-facts dd { margin: 0; font-weight: 700; }
.name-grid-facts { margin: 16px 0 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-block: 1px solid var(--line); }
.name-grid-facts + .name-grid-facts { margin-top: 12px; }
.name-grid-facts div { min-width: 0; padding: 12px 10px; display: grid; gap: 4px; border-right: 1px solid var(--line); }
.name-grid-facts div:last-child { border-right: 0; }
.name-grid-facts dt { color: var(--muted); font-size: .76rem; }
.name-grid-facts dd { margin: 0; font-size: .84rem; font-weight: 700; overflow-wrap: anywhere; }
.luck-cycle-card { margin: 12px 0 30px; padding: 24px; border: 1px solid #cdbb97; border-radius: 14px; background: #fff9e9; }
.luck-cycle-card .section-heading { align-items: flex-start; }
.luck-phase-heading { display: grid; grid-template-columns: minmax(150px, .42fr) minmax(0, 1fr); gap: 18px; align-items: end; }
.luck-phase-heading span, .luck-candidate-list span, .luck-position-item span { display: block; color: var(--muted); font-size: .78rem; }
.luck-phase-heading strong { display: block; margin-top: 3px; font-family: var(--serif); font-size: clamp(1.75rem, 4vw, 2.4rem); line-height: 1.2; }
.luck-phase-heading p { max-width: 58ch; color: var(--muted); }
.luck-domain-grid { margin-top: 24px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 22px; }
.luck-domain { min-width: 0; padding-top: 16px; border-top: 1px solid var(--line); }
.luck-domain-heading { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.luck-domain-heading h3 { font-size: 1.08rem; }
.luck-domain-status { flex: 0 0 auto; color: var(--gold-dark); font-size: .76rem; font-weight: 700; }
.luck-domain-status-supportive { color: #4d6d23; }
.luck-domain-status-cautious { color: var(--danger); }
.luck-domain > strong { display: block; margin-top: 8px; }
.luck-domain > p { margin-top: 7px; color: var(--muted); font-size: .88rem; }
.luck-domain dl { margin: 14px 0 0; }
.luck-domain dl div { padding: 8px 0; display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 10px; border-top: 1px solid #ece2cd; }
.luck-domain dt { color: var(--muted); font-size: .76rem; }
.luck-domain dd { min-width: 0; margin: 0; font-size: .86rem; overflow-wrap: anywhere; }
.luck-evidence { margin-top: 22px; }
.luck-candidate-list { margin-top: 18px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.luck-candidate-list > div { min-width: 0; padding-top: 14px; display: grid; gap: 3px; border-top: 1px solid var(--line); }
.luck-candidate-list strong { font-family: var(--serif); font-size: 1.45rem; }
.luck-candidate-list small, .luck-reason, .luck-position-item small { color: var(--muted); }
.luck-reason { margin-top: 14px; font-size: .84rem; }
.luck-position-section .section-intro { margin-bottom: 18px; }
.luck-position-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.luck-position-item { min-width: 0; padding: 14px; display: grid; gap: 4px; border-top: 1px solid var(--line); }
.luck-position-item strong { font-family: var(--serif); font-size: 1.35rem; }
.luck-position-item small { overflow-wrap: anywhere; }
.luck-position-item-current { border-color: var(--gold-dark); background: #f5e7bd; }
.domain-sections { padding-bottom: 8px; }
.domain-section { padding: 22px 0 26px; border-top: 1px solid var(--line); }
.domain-heading { display: flex; justify-content: space-between; gap: 16px; align-items: baseline; }
.domain-heading h3 { font-size: 1.35rem; }
.domain-heading > strong { max-width: 34ch; font-size: .96rem; text-align: right; }
.domain-status { margin-top: 4px; color: var(--gold-dark); font-size: .8rem; }
.status-marker { width: 10px; height: 10px; margin-right: 6px; display: inline-block; border: 2px solid currentColor; vertical-align: -1px; }
.status-marker-favorable { border-radius: 50%; }
.status-marker-stable { border-radius: 2px; }
.status-marker-cautious { transform: rotate(45deg); border-radius: 1px; }
.status-favorable { border-bottom: 2px solid #5b7a2a; color: #4d6d23; }
.status-stable { border-bottom: 2px dashed var(--gold-dark); color: var(--gold-dark); }
.status-cautious { border-bottom: 2px dotted var(--danger); color: var(--danger); }
.domain-evidence { margin-top: 16px; border-top: 1px solid var(--line); }
.domain-evidence > summary { min-height: 44px; padding: 10px 0; display: flex; align-items: center; cursor: pointer; font-weight: 700; }
.domain-evidence > summary:focus-visible, .evidence-list > details > summary:focus-visible { outline: 3px solid rgba(200, 150, 12, .38); outline-offset: 2px; }
.domain-evidence-body { display: grid; gap: 10px; padding-bottom: 8px; }
.evidence-record { padding: 10px 0; display: grid; gap: 3px; border-top: 1px solid #ece2cd; }
.evidence-record span, .evidence-record small { color: var(--muted); }
.domain-section > p { max-width: 68ch; margin-top: 12px; }
.domain-columns { margin-top: 16px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.domain-action-checklist { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 18px 0 0; }
.domain-action-checklist > div { padding: 12px; border-radius: 10px; background: #fbf4e2; }
.domain-action-checklist dt { color: var(--gold-dark); font-size: .8rem; font-weight: 700; }
.domain-action-checklist dd { margin: 6px 0 0; overflow-wrap: anywhere; }
.domain-columns h4 { margin: 0 0 6px; font-size: .82rem; color: var(--muted); }
.domain-columns ul, .report-disclaimers ul { margin: 0; padding-left: 1.2rem; }
.domain-columns li + li, .report-disclaimers li + li { margin-top: 6px; }
.evidence-inline { margin-top: 16px; color: var(--muted); font-size: .78rem; }
.period-list { border-top: 1px solid var(--line); }
.period-item { padding: 14px 0; display: grid; grid-template-columns: 1fr auto; gap: 2px 18px; border-bottom: 1px solid var(--line); }
.period-item span { color: var(--muted); font-size: .8rem; }
.period-item p { grid-column: 1 / -1; color: var(--muted); font-size: .9rem; }
.report-disclaimers { color: var(--muted); }
.evidence-list { padding-top: 14px; }
.evidence-list > details { border-top: 1px solid var(--line); }
.evidence-list > details > summary { min-height: 44px; padding: 10px 0; display: flex; align-items: center; cursor: pointer; font-weight: 700; }
.evidence-list dl { margin: 0 0 14px; }
.evidence-list dl div { padding: 7px 0; display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 12px; border-top: 1px solid #ece2cd; }
.evidence-list dt { color: var(--muted); font-size: .78rem; }
.evidence-list dd { margin: 0; }
.evidence-details { padding-bottom: 12px; }
.reasoning-list { margin: 24px 0 0; }
.reasoning-list div { padding: 16px 0; display: grid; gap: 5px; border-top: 1px solid #d8c9aa; }
.reasoning-list dt { font-family: var(--serif); font-weight: 700; }
.reasoning-list dd { margin: 0; color: var(--muted); }
.source-list { margin: 14px 0 0; padding-left: 1.25rem; }
.source-list li + li { margin-top: 8px; }
.recommendation-empty { padding: 24px; background: #eee5d2; border-radius: 14px; }
.recommendation-empty p { color: var(--muted); }
.recommendation-cards { display: grid; gap: 16px; }
.recommendation-top { margin-bottom: 28px; }
.recommendation-top .recommendation-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.recommendation-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); box-shadow: var(--shadow); }
.recommendation-card-image { width: 100%; height: 150px; display: block; object-fit: cover; background: #eee5d2; }
.recommendation-card-body { padding: 14px 16px 16px; }
.recommendation-card-category { margin: 0 0 7px; color: var(--gold-dark); font-size: .75rem; }
.recommendation-card-body h3 { min-height: 2.5em; font-size: 1rem; }
.recommendation-card-price { display: block; margin: 12px 0; color: #bf3626; font-size: 1.05rem; }
.recommendation-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 9px; }
.recommendation-tags span { padding: 3px 7px; border-radius: 999px; background: #f5e7bd; color: var(--gold-dark); font-size: .7rem; }
.recommendation-reason { margin-top: 9px; color: var(--muted); font-size: .78rem; }
.recommendation-card-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 12px; }
.recommendation-card-actions .text-link { font-size: .78rem; }
.recommendation-more { margin-top: 16px; }
.recommendation-more > summary { min-height: 44px; padding: 10px 0; cursor: pointer; color: var(--gold-dark); font-weight: 700; }
.recommendation-secondary-cards { margin-top: 12px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.recommendation-card-heading { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; }
.recommendation-card-heading h3 { font-size: 1.08rem; }
.recommendation-card-heading p { margin-top: 5px; color: var(--muted); font-size: .84rem; }
.recommendation-card-heading img { width: 64px; height: 64px; flex: 0 0 auto; object-fit: cover; border-radius: 10px; }
.recommendation-copy { margin: 16px 0; max-width: 58ch; color: var(--muted); }
.recommendation-disclaimer { margin-top: 14px; color: var(--muted); font-size: .8rem; }
.report-actions { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 12px; }
.button-secondary { border: 1px solid #9d8a63; background: transparent; color: var(--text); }
.section-heading { margin-bottom: 20px; display: flex; justify-content: space-between; gap: 18px; }
.section-heading p { margin-top: 6px; color: var(--muted); }
.time-correction { display: grid; border-block: 1px solid var(--line); }
.time-correction div { padding: 13px 0; display: grid; gap: 3px; border-bottom: 1px solid var(--line); }
.time-correction div:last-child { border-bottom: 0; }
.time-correction span, .alternate-list span { color: var(--muted); font-size: .78rem; }
.alternate-list { display: grid; gap: 10px; }
.alternate-list > div { padding: 14px 16px; display: grid; gap: 4px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.alternate-list strong { overflow-wrap: anywhere; word-spacing: .35em; }
.report-details { padding-bottom: 30px; }
.report-details > summary { font-family: var(--serif); font-size: clamp(1.45rem, 3vw, 2rem); }
.pillar-detail-list { display: grid; gap: 24px; padding-top: 20px; }
.pillar-detail-list section { padding-top: 16px; border-top: 1px solid var(--line); }
.pillar-detail-list h3, .detail-facts h3 { margin-bottom: 12px; font-size: 1.05rem; }
.pillar-detail-list dl, .detail-facts dl { margin: 0; }
.pillar-detail-list dl div, .detail-facts dl div { padding: 7px 0; display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; border-bottom: 1px solid #ece2cd; }
.pillar-detail-list dt, .detail-facts dt { color: var(--muted); font-size: .8rem; }
.pillar-detail-list dd, .detail-facts dd { margin: 0; }
.detail-facts { margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line); }
.detail-facts > p { margin-bottom: 12px; color: var(--muted); }
.dayun-line { margin-top: 14px; display: grid; gap: 5px; }
.dayun-line span { color: var(--muted); font-size: .8rem; }
.dayun-line strong { overflow-wrap: anywhere; line-height: 2; }
.calculation-note { margin-top: 18px; color: var(--muted); }
.calculation-note p { max-width: 70ch; padding: 2px 0 14px; }
.advanced-settings > summary:focus-visible, .report-details > summary:focus-visible, .calculation-note > summary:focus-visible, .place-help summary:focus-visible { outline: 3px solid rgba(200, 150, 12, .38); outline-offset: 2px; }
.report-reading-guide > summary:focus-visible, .report-glossary > summary:focus-visible { outline: 3px solid rgba(200, 150, 12, .38); outline-offset: 2px; }

@media (max-width: 680px) {
  .plain-summary { padding: 18px; }
  .report-followup { padding: 18px; }
  .followup-form-actions { align-items: flex-start; flex-direction: column; }
  .report-year-picker { align-items: stretch; flex-direction: column; }
  .report-year-picker select, .report-year-picker .button { width: 100%; }
  .annual-highlights-grid { grid-template-columns: 1fr; }
  .recommendation-top .recommendation-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .recommendation-card-image { height: 120px; }
  .recommendation-secondary-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .annual-quick-summary-grid { grid-template-columns: 1fr; }
  .report-reading-guide-body { padding-bottom: 18px; }
  .report-reading-guide-body > ol { padding-left: 1.2rem; }
  .reading-focus-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .date-selects { display: grid; }
  .suanming-enhanced .date-selects[hidden] { display: none; }
  .suanming-enhanced .date-wheels:not([hidden]) { display: grid; }
  .report-tablist [role="tab"] { flex: 1; padding-inline: 8px; }
  .reading-facts { grid-template-columns: 1fr; }
  .reading-facts div, .reading-facts div + div { padding: 11px 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .reading-facts div:last-child { border-bottom: 0; }
  .name-grid-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .name-grid-facts div { border-right: 0; border-bottom: 1px solid var(--line); }
  .name-grid-facts div:last-child { border-bottom: 0; }
  .luck-cycle-card { padding: 20px 18px; }
  .luck-cycle-card .section-heading { display: block; }
  .luck-cycle-card .confidence-tag { display: block; margin-top: 8px; }
  .luck-phase-heading { grid-template-columns: 1fr; gap: 10px; }
  .luck-domain-grid,
  .luck-position-strip { grid-template-columns: 1fr; }
  .luck-candidate-list { grid-template-columns: 1fr; gap: 12px; }
  .domain-heading { display: block; }
  .domain-heading > strong { display: block; margin-top: 8px; text-align: left; }
  .domain-columns { grid-template-columns: 1fr; gap: 14px; }
  .domain-action-checklist { grid-template-columns: 1fr; }
  .period-item { grid-template-columns: 1fr; gap: 3px; }
}

.unlock-shell { display: grid; gap: 30px; align-items: start; }
.unlock-copy > p { max-width: 35rem; margin-top: 16px; color: var(--muted); }
.verification-code { margin-top: 28px; padding: 22px 0; border-block: 1px solid #bcae8e; }
.verification-code span { display: block; color: var(--muted); font-size: .82rem; }
.verification-code strong { display: block; margin: 4px 0; font-family: var(--serif); font-size: clamp(2rem, 8vw, 3rem); letter-spacing: .06em; }
.verification-code p { color: var(--muted); font-size: .86rem; }
.unlock-steps { margin: 24px 0 0; padding-left: 1.4rem; }
.unlock-steps li + li { margin-top: 10px; }
.qr-panel { padding: 22px; background: var(--panel); border-radius: 16px; box-shadow: var(--shadow); text-align: center; }
.qr-panel img { width: min(100%, 340px); height: auto; display: block; margin: 0 auto 12px; }
.qr-panel > p { margin-bottom: 18px; color: var(--muted); }

.account-shell, .admin-shell { max-width: 1160px; margin: 0 auto; padding: 44px 20px 72px; }
.account-header, .admin-header { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px; }
.account-header h1, .admin-header h1 { font-size: clamp(2rem, 5vw, 3.35rem); }
.account-header p, .admin-header p { margin-top: 8px; color: var(--muted); }
.account-header-actions { display: flex; flex-wrap: wrap; gap: 16px; }
.admin-header p { max-width: 45rem; }
.admin-header-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.account-summary { margin: 28px 0 44px; display: grid; grid-template-columns: repeat(3, 1fr); border-block: 1px solid #bcae8e; }
.account-summary div { padding: 20px 12px; border-right: 1px solid #cdbf9f; display: grid; gap: 3px; }
.account-summary div:last-child { border-right: 0; }
.account-summary span { color: var(--muted); font-size: .78rem; }
.account-summary strong { font-family: var(--serif); font-size: clamp(1.2rem, 4vw, 1.8rem); }
.history-section h2 { margin-bottom: 18px; }
.history-list { border-top: 1px solid #bcae8e; }
.history-entry { min-height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid #cdbf9f; }
.history-entry > a { flex: 1; min-width: 0; padding: 16px 4px; display: grid; gap: 3px; text-decoration: none; }
.history-list span, .history-list small { color: var(--muted); font-size: .8rem; }
.history-delete { min-height: 44px; flex: 0 0 auto; padding: 9px 14px; font-size: .82rem; }
.privacy-management { margin-top: 48px; padding-top: 24px; border-top: 1px solid #bcae8e; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px 24px; align-items: center; }
.privacy-management h2 { margin: 0; font-size: 1.2rem; }
.privacy-management p { margin: 6px 0 0; color: var(--muted); font-size: .84rem; line-height: 1.6; }
.privacy-delete-all { min-height: 44px; color: #8a3726; border-color: #cba092; }
.privacy-status { grid-column: 1 / -1; min-height: 1.4em; color: var(--danger) !important; }
.history-comparison { margin-top: 42px; }
.comparison-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.comparison-card { min-width: 0; padding: 18px; display: grid; gap: 6px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); text-decoration: none; }
.comparison-card strong { font-family: var(--serif); font-size: 1.5rem; }
.comparison-card span { color: var(--gold-dark); font-size: .82rem; font-weight: 700; }
.comparison-card p { color: var(--muted); font-size: .86rem; overflow-wrap: anywhere; }
.empty-state { padding: 32px; background: #eee5d2; border-radius: 14px; }
.empty-state p { margin-bottom: 18px; color: var(--muted); }
.empty-state.compact { padding: 22px; }
.empty-state.compact p { margin: 0; }

.invite-shell { max-width: 820px; margin: 0 auto; padding: 44px 20px 72px; }
.invite-header p { max-width: 42rem; }
.invite-link-section { margin-top: 32px; padding: 28px 0; border-block: 1px solid #bcae8e; }
.invite-link-section > p { margin-top: 8px; color: var(--muted); }
.invite-copy-row { margin-top: 18px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; }
.invite-copy-row input { min-width: 0; min-height: 44px; padding: 10px 13px; border: 1px solid #cdbb97; border-radius: 10px; background: #fffefa; color: var(--text); }
.invite-copy-row input:focus-visible, .invite-copy-button:focus-visible { outline: 3px solid rgba(200, 150, 12, .38); outline-offset: 2px; border-color: var(--gold-dark); }
.invite-copy-button { min-height: 44px; white-space: nowrap; }
.invite-copy-status { min-height: 1.65em; margin-top: 8px; color: var(--muted); font-size: .84rem; }
.invite-summary { margin: 32px 0 44px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-block: 1px solid #bcae8e; }
.invite-summary div { padding: 20px 12px; display: grid; gap: 3px; border-right: 1px solid #cdbf9f; }
.invite-summary div:last-child { border-right: 0; }
.invite-summary span, .invite-status-list span, .invite-status-list small { color: var(--muted); font-size: .8rem; }
.invite-summary strong { font-family: var(--serif); font-size: clamp(1.2rem, 4vw, 1.8rem); }
.invite-status-list { border-top: 1px solid #bcae8e; }
.invite-status-list > div { min-height: 72px; padding: 14px 4px; display: grid; gap: 3px; border-bottom: 1px solid #cdbf9f; }

.admin-layout { margin-top: 32px; display: grid; gap: 26px; }
.admin-nav { display: flex; gap: 18px; overflow-x: auto; padding-bottom: 12px; border-bottom: 1px solid #bcae8e; white-space: nowrap; }
.admin-nav strong { color: var(--gold-dark); }
.admin-nav span { color: var(--muted); }
.admin-content { min-width: 0; display: grid; gap: 24px; }
.admin-content-main { margin-top: 32px; }
.admin-section { min-width: 0; max-width: 100%; padding: 24px; background: var(--panel); border-radius: 16px; }
.admin-section-heading { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px; margin-bottom: 22px; }
.admin-section-heading p { margin-top: 5px; color: var(--muted); }
.admin-section-heading > strong { font-family: var(--serif); font-size: 1.5rem; }
.admin-form { display: grid; gap: 16px; align-items: end; }
.button-compact { min-height: 44px; padding: 9px 16px; white-space: nowrap; }
.admin-table-wrap { width: 100%; min-width: 0; max-width: 100%; overflow-x: auto; }
.admin-table { width: 100%; min-width: 680px; border-collapse: collapse; text-align: left; }
.admin-table th { padding: 10px 12px; color: var(--muted); font-size: .78rem; font-weight: 600; border-bottom: 1px solid #bcae8e; }
.admin-table td { padding: 14px 12px; border-bottom: 1px solid #e2d6bd; }
.admin-account-list { display: grid; gap: 18px; }
.admin-account { padding: 22px 0 0; border-top: 1px solid #d8c9aa; }
.admin-account-summary { margin-bottom: 18px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.admin-account-summary div { min-width: 0; display: grid; gap: 3px; }
.admin-account-summary span { color: var(--muted); font-size: .76rem; }
.admin-account-summary strong { overflow-wrap: anywhere; }
.unlimited-form { margin-top: 26px; padding-top: 22px; border-top: 1px solid #d8c9aa; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.unlimited-form p { color: var(--muted); font-size: .84rem; }
.switch-control { min-height: 44px; display: flex; align-items: center; gap: 9px; cursor: pointer; }
.switch-control input { width: 22px; height: 22px; accent-color: var(--gold-dark); }
.switch-control span { font-size: .86rem; }
.recommendation-list { display: grid; gap: 18px; }
.recommendation-product { padding-top: 20px; border-top: 1px solid #d8c9aa; }
.recommendation-product-summary { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.recommendation-product-summary h3 { font-size: 1.05rem; }
.recommendation-product-summary p { margin-top: 5px; color: var(--muted); font-size: .84rem; }
.status-chip { min-height: 28px; padding: 4px 9px; display: inline-flex; align-items: center; border: 1px solid currentColor; border-radius: 999px; font-size: .75rem; white-space: nowrap; }
.status-chip-active { color: #4d6d23; }
.status-chip-muted { color: var(--muted); }
.recommendation-form { margin-top: 16px; display: grid; gap: 14px; }
.recommendation-tags { margin: 0; padding: 0; border: 0; }
.recommendation-tags legend { margin-bottom: 7px; font-size: .86rem; font-weight: 600; }
.check-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.check-grid .check-row { min-height: 44px; padding: 7px 9px; border: 1px solid #cdbb97; border-radius: 10px; }
.check-grid .check-row:has(input:checked) { border-color: var(--gold-dark); background: #f5e7bd; }
.recommendation-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.recommendation-toggle { justify-self: start; }
.recommendation-form textarea { width: 100%; padding: 10px 13px; border: 1px solid #cdbb97; border-radius: 10px; background: #fffefa; color: var(--text); resize: vertical; }
.recommendation-form textarea:focus-visible { outline: 3px solid rgba(200, 150, 12, .38); outline-offset: 2px; border-color: var(--gold-dark); }
.ledger-list { border-top: 1px solid #d8c9aa; }
.ledger-list > div { min-height: 64px; padding: 10px 0; display: grid; grid-template-columns: 1fr auto; gap: 2px 16px; align-items: center; border-bottom: 1px solid #d8c9aa; }
.ledger-list span { color: var(--muted); font-size: .76rem; }
.ledger-list strong { grid-column: 1; }
.ledger-list b { grid-column: 2; grid-row: 1 / span 2; font-family: var(--serif); font-size: 1.2rem; }

.site-footer { padding: 26px 20px max(26px, env(safe-area-inset-bottom)); background: var(--ink); color: #d8cdb9; text-align: center; font-size: .78rem; }

@media (max-width: 980px) {
  .annual-quick-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .annual-highlights-grid { grid-template-columns: 1fr; }
}

@media (min-width: 768px) {
  .date-wheels { display: none !important; }
  .form-pane { padding: 34px; }
  .birth-form { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 28px; }
  .field-wide { grid-column: 1 / -1; }
  .lunar-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lunar-fields .check-row { grid-column: 1 / -1; }
  .method-grid { grid-template-columns: repeat(3, 1fr); }
  .auth-shell { grid-template-columns: 1fr 1fr; padding-top: 86px; }
  .time-correction { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .time-correction div { padding: 14px 18px; border-right: 1px solid var(--line); border-bottom: 0; }
  .time-correction div:last-child { border-right: 0; }
  .pillar-detail-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .reasoning-list div { grid-template-columns: 150px 1fr; }
  .unlock-shell { grid-template-columns: minmax(0, 1.3fr) minmax(300px, .7fr); padding-top: 70px; }
  .admin-layout { grid-template-columns: 180px minmax(0, 1fr); }
  .admin-nav { display: grid; align-content: start; border: 0; overflow: visible; }
  .admin-form { grid-template-columns: 160px minmax(220px, 1fr) auto; }
}

@media (min-width: 900px) {
  .workbench { grid-template-columns: minmax(280px, .72fr) minmax(0, 1.6fr); padding-top: 58px; }
  .intro-pane { padding: 24px 8px 24px 0; }
}

@media (hover: hover) {
  .nav a:hover, .nav-button:hover { color: #e8b84b; }
  .button-primary:hover { background: var(--ink-soft); }
}

@media (max-width: 480px) {
  .header-inner { padding-inline: 16px; }
  .nav { gap: 8px; }
  .workbench, .method-section { padding-inline: 16px; }
  .form-pane { padding: 20px 16px; }
  .segmented { grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); }
  .segmented-two { grid-template-columns: repeat(2, minmax(120px, 1fr)); }
  .segmented label { min-height: 46px; padding-inline: 6px; }
  .account-summary { grid-template-columns: 1fr; }
  .history-entry { align-items: stretch; flex-direction: column; gap: 0; }
  .history-entry > a { width: 100%; }
  .history-delete { width: 100%; margin: 0 0 14px; }
  .privacy-management { grid-template-columns: 1fr; }
  .privacy-delete-all { width: 100%; }
  .comparison-grid { grid-template-columns: 1fr; }
  .account-summary div { border-right: 0; border-bottom: 1px solid #cdbf9f; }
  .account-summary div:last-child { border-bottom: 0; }
  .unlimited-form { align-items: flex-start; flex-direction: column; }
  .submitted-facts { grid-template-columns: 1fr; }
  .submitted-facts div:nth-child(n) { padding-inline: 0; }
  .admin-account-summary { grid-template-columns: 1fr; }
  .recommendation-top .recommendation-cards { grid-template-columns: 1fr; }
  .recommendation-secondary-cards { grid-template-columns: 1fr; }
  .recommendation-product-summary { display: block; }
  .recommendation-product-summary .status-chip { margin-top: 9px; }
  .check-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-table { min-width: 0; }
  .admin-table thead { display: none; }
  .admin-table tbody, .admin-table tr, .admin-table td { display: block; }
  .admin-table tr { padding: 4px 0 12px; border-bottom: 1px solid #d8c9aa; }
  .admin-table td { padding: 9px 0; display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 12px; align-items: center; border: 0; }
  .admin-table td::before { content: attr(data-label); color: var(--muted); font-size: .76rem; }
  .admin-table td .button { width: 100%; }
}

@media (max-width: 640px) {
  .invite-copy-row, .invite-summary { grid-template-columns: 1fr; }
  .invite-copy-button { width: 100%; }
  .invite-summary div { border-right: 0; border-bottom: 1px solid #cdbf9f; }
  .invite-summary div:last-child { border-bottom: 0; }
}

@media (prefers-reduced-motion: no-preference) {
  .button, .nav a, .nav-button { transition: color 160ms ease-out, background-color 160ms ease-out; }
  .conditional-group:not([hidden]), .inline-notice:not([hidden]) { animation: field-in 160ms ease-out; }
}

@keyframes field-in {
  from { opacity: 0; transform: translateY(-3px); }
  to { opacity: 1; transform: translateY(0); }
}
