:root {
  color-scheme: light dark;
  --sheet: #f5efdf;
  --page: #fbf6ea;
  --board: #192f38;
  --wood: #645541;
  --thread: #c6b184;
  --ink: #20343b;
  --soft: #5a5b50;
  --rule: #c8bd9f;
  --input-rule: #88806b;
  --tint: #ebe3cd;
  --blush: #f0e8d4;
  --red: #943d2c;
  --serif: "Nanum Myeongjo", "AppleMyungjo", "Batang", "Noto Serif CJK KR", Georgia, serif;
  --sans: "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans CJK KR", system-ui, sans-serif;
  color: var(--ink);
  background: var(--sheet);
  font: 400 100%/1.6 var(--sans);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
@media (prefers-color-scheme: dark) {
  :root {
    --sheet: #252724;
    --page: #2c2e2a;
    --wood: #b3a888;
    --ink: #f4efdd;
    --soft: #babcb1;
    --rule: #655f50;
    --input-rule: #96917d;
    --tint: #393a31;
    --blush: #36352d;
    --red: #f39f80;
  }
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; word-break: keep-all; overflow-wrap: anywhere; }
h1, h2, h3, h4, p, dl, dd, fieldset, legend { margin: 0; }
button, input { font: inherit; color: inherit; }
button { border-radius: 0; -webkit-tap-highlight-color: transparent; }
button, summary, .check-label, .calendar-choices label { cursor: pointer; }
:disabled { cursor: default; }
button:disabled { opacity: .6; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
.skip-link { position: absolute; z-index: 2; left: 1rem; top: -6rem; padding: .65rem 1rem; background: var(--sheet); color: var(--ink); }
.skip-link:focus { top: .5rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.page-width { width: min(calc(100% - 5rem), 70rem); margin-inline: auto; }

.masthead { border-bottom: 3px double var(--wood); }
.masthead-content { display: flex; align-items: center; flex-wrap: wrap; gap: .1rem .85rem; min-height: 4.25rem; padding-block: .18rem; }
.wordmark { display: inline-flex; align-items: center; gap: .55rem; flex: none; white-space: nowrap; font: 700 1.625rem/1 Georgia, "Times New Roman", serif; letter-spacing: -.055em; }
.brand-mark { display: block; flex: none; width: 2.1rem; height: 2.1rem; }
.issue-title { padding-inline-start: .7rem; border-inline-start: 1px solid var(--rule); color: var(--soft); font: 550 .875rem/1.15 var(--serif); letter-spacing: .055em; white-space: nowrap; }
.exit-sample { margin-inline-start: auto; padding: 0; min-height: 2.5rem; color: var(--soft); border: 0; background: transparent; font-size: .8125rem; text-decoration: underline; text-underline-offset: .25em; white-space: nowrap; }
.day-nav { display: inline-flex; align-items: stretch; flex: none; margin-inline-start: auto; border: 1px solid var(--input-rule); background: var(--page); }
.exit-sample:not([hidden]) + .day-nav { margin-inline-start: 0; }
.day-nav button { border: 0; color: var(--soft); background: transparent; min-width: 2.94rem; min-height: 2.125rem; padding: .25rem .65rem; font: 550 .875rem/1.2 var(--serif); white-space: nowrap; }
.day-nav button + button { border-inline-start: 1px solid var(--rule); }
.day-nav button[aria-pressed="true"] { color: #fbf1dd; background: var(--board); }
.day-nav button:not([aria-pressed="true"]):hover, .exit-sample:hover { color: var(--ink); text-decoration: underline; text-underline-offset: .2em; }

.is-form .book-layout {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  width: min(calc(100% - 5rem), 70rem); margin: clamp(1.5rem, 3.5vw, 3.25rem) auto 2rem;
}
.is-form .folio-cover {
  position: relative; isolation: isolate; grid-column: 1; grid-row: 1; overflow: hidden;
  min-height: 32rem; background: var(--board); color: #fbf3df;
  box-shadow: 0 2px 6px #2e281717;
}
.cover-art, .cover-script { display: none; }
.is-form .cover-art {
  display: block; z-index: -2; position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center bottom; pointer-events: none;
}
.is-form .folio-cover::before {
  content: ""; z-index: -1; position: absolute; inset: 0;
  background: linear-gradient(180deg, #10263148 0%, #102631a6 40%, transparent 60%); pointer-events: none;
}
.is-form .folio-cover::after {
  content: ""; position: absolute; top: 5%; bottom: 5%; right: 0; width: 1.3rem; pointer-events: none;
  border-inline-start: 1px solid var(--thread);
  background: repeating-linear-gradient(180deg, var(--thread) 0 1px, transparent 1px 25%);
}
.is-form .hero-inner { width: auto; padding: clamp(2rem, 3.5vw, 3.25rem) clamp(1.9rem, 3.4vw, 3rem); }
.is-form .hero-copy { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "slip meta" "slip title" "slip note"; column-gap: clamp(.8rem, 1.8vw, 1.45rem); align-items: start; }
.is-form .cover-script {
  display: block; grid-area: slip; align-self: start; padding: .55rem .19rem; border: 3px double #766447;
  background: #f0e4ca; color: #253438; writing-mode: vertical-rl; text-orientation: upright;
  font: 600 clamp(1.13rem, 1.8vw, 1.45rem)/1.22 var(--serif); letter-spacing: .13em;
}
.is-form .hero-meta { grid-area: meta; padding-top: .1rem; color: #e9d6aa; }
.is-form .hero h1 { grid-area: title; margin: .55rem 0; font: 550 clamp(2.15rem, 3.8vw, 3.45rem)/1.2 var(--serif); letter-spacing: -.065em; color: #fcf4df; }
.hero-copy { min-width: 0; }
.hero-meta { display: flex; flex-wrap: wrap; gap: .28rem .65rem; align-items: baseline; color: var(--soft); font: 550 .875rem/1.55 var(--serif); }
.selected-issue { font-variant-numeric: tabular-nums; }
.hero-note { grid-area: note; max-width: 22rem; color: #eee6d5; font: 400 1rem/1.7 var(--serif); }
.is-form .calendar-leaf, .is-report .issue-on-phone, .is-report .issue-ganji { display: none; }
.is-report .selected-issue { position: absolute; }
.is-form #status, .is-form .js-note { grid-column: 1 / -1; width: 100%; }
.birth-layout {
  grid-column: 2; grid-row: 1; width: 100%; padding: clamp(1.75rem, 3.3vw, 3rem);
  background: var(--page); border: 1px solid var(--rule); border-inline-start: 0;
  box-shadow: inset 3px 0 0 var(--sheet), inset 4px 0 0 var(--rule), 0 2px 6px #2e281711;
}
.birth-intro { padding-bottom: .95rem; margin-bottom: .85rem; border-bottom: 3px double var(--wood); }
.birth-intro h2, #reading-heading, #natal-heading { font: 650 1.55rem/1.28 var(--serif); letter-spacing: -.05em; }
.birth-intro p { margin-top: .35rem; color: var(--soft); font-size: .9375rem; }

.is-report .hero-inner {
  display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); align-items: center; gap: clamp(1.4rem, 3.1vw, 2.75rem);
  padding: 1.85rem 0 1.6rem; border-bottom: 3px double var(--wood);
}
.calendar-leaf { display: grid; width: 7.5rem; align-self: stretch; align-content: center; color: var(--ink); }
.print-date { display: grid; justify-items: center; gap: .24rem; padding: .6rem .24rem; border: 3px double var(--wood); background: var(--page); }
.print-month, .print-week { font: 500 .8125rem/1.45 var(--serif); color: var(--soft); }
.print-day { color: var(--ink); font: 550 2.75rem/1.2 var(--serif); letter-spacing: .05em; }
.sample-banner { padding-inline-start: .55rem; border-inline-start: 1px solid var(--rule); color: var(--red); font: 550 .8125rem/1.3 var(--serif); }
.is-report h1 { margin: .3rem 0 .72rem; color: var(--ink); font: 550 clamp(2.05rem, 3.5vw, 3.1rem)/1.26 var(--serif); letter-spacing: -.065em; text-wrap: balance; }
.record-birth { color: var(--soft); }
.origin {
  display: inline-flex; flex-wrap: wrap; align-items: stretch; max-width: 100%; min-height: 2.6rem; padding: 0;
  border: 1px solid var(--input-rule); background: var(--page); color: var(--ink); text-align: start;
}
.origin span { display: inline-flex; align-items: baseline; gap: .34rem; align-content: center; padding: .4rem .72rem; }
.origin span + span { border-inline-start: 1px solid var(--rule); }
.origin small { color: var(--soft); font: 400 .8125rem/1.45 var(--sans); }
.origin b { color: var(--ink); font: 650 1rem/1.45 var(--serif); }
.origin:hover b, .origin:focus-visible b { text-decoration: underline; text-underline-offset: .2em; }
.record-branch { margin-top: .45rem; color: var(--soft); font-size: .875rem; line-height: 1.55; }
.birth-form, fieldset { min-width: 0; }
fieldset, legend { padding: 0; border: 0; }
legend { font-size: .9375rem; font-weight: 700; line-height: 1.5; }
.date-fieldset > legend { float: inline-start; display: flex; align-items: center; min-height: 1.875rem; }
.date-controls { display: flex; align-items: center; justify-content: flex-end; min-height: 1.875rem; margin-bottom: .25rem; }
.calendar-choices, .leap-options, .time-row, .remember-row, .submit-row, .profile-actions { display: flex; align-items: center; flex-wrap: wrap; }
.calendar-choices { column-gap: .5rem; }
.calendar-choices label { display: inline-flex; position: relative; }
.calendar-choices input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.calendar-choices span { display: grid; place-items: center; min-height: 1.75rem; padding: 0 .25rem; color: var(--soft); font-size: .875rem; }
.calendar-choices input:checked + span { color: var(--ink); font-weight: 650; text-decoration: underline; text-underline-offset: .25em; text-decoration-thickness: 2px; }
.calendar-choices input:focus-visible + span { outline: 2px solid var(--red); outline-offset: 1px; }
.date-inputs, .time-inputs { display: grid; align-items: center; border: 1px solid var(--input-rule); border-radius: 1px; }
.date-inputs { clear: both; grid-template-columns: 1.45fr 1fr 1fr; }
.numeric-field { position: relative; display: flex; min-width: 0; align-items: center; }
.numeric-field + .numeric-field::before { content: ""; position: absolute; top: 28%; bottom: 28%; left: 0; width: 1px; background: var(--rule); pointer-events: none; }
.numeric-field span { position: absolute; right: .8rem; pointer-events: none; color: var(--soft); font-size: .875rem; }
.numeric-field input { appearance: none; width: 100%; min-width: 0; height: 2.875rem; padding: .45rem 2rem .45rem .87rem; border: 0; border-radius: 1px; background: transparent; color: var(--ink); font-size: 1rem; font-variant-numeric: tabular-nums; }
.numeric-field input::placeholder { opacity: 1; color: var(--soft); font-size: .875rem; }
.numeric-field input:disabled { color: var(--soft); background: var(--tint); }
.numeric-field input:focus-visible, .numeric-field input[aria-invalid="true"] { outline: 2px solid var(--red); outline-offset: -2px; }
.field-hint { color: var(--soft); font-size: .8125rem; line-height: 1.5; }
.field-hint:empty { display: none; }
#form-limit { margin-top: .19rem; }
.leap-field { margin-top: .75rem; }
.leap-field legend { font-weight: 550; }
.leap-options { column-gap: 1.4rem; }
.time-fieldset { margin-top: .875rem; }
.time-row { gap: .5rem 1rem; margin-top: .375rem; }
.time-inputs { width: min(65%, 20rem); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.check-label { display: inline-flex; align-items: center; gap: .5rem; min-height: 2.25rem; font-size: .875rem; }
.check-label input { flex: none; width: 1.1rem; height: 1.1rem; margin: 0; accent-color: var(--ink); }
.remember-row { gap: 0 .8rem; margin: .81rem 0 .875rem; padding-top: .31rem; border-top: 1px solid var(--rule); }
.form-error { color: var(--red); font-size: .9375rem; line-height: 1.5; }
.form-error:not(:empty) { margin: .55rem 0; }
.submit-row { gap: .75rem; }
.primary-button, .quiet-button { min-height: 2.875rem; padding: .55rem 1.25rem; border: 1px solid var(--ink); border-radius: 1px; font-size: 1rem; font-weight: 600; }
.primary-button { flex: 1; border-color: var(--board); background: var(--board); color: #fbf3df; font: 650 1.06rem/1.5 var(--serif); letter-spacing: .035em; }
.primary-button:hover { text-decoration: underline; text-underline-offset: .22em; }
.quiet-button { background: transparent; color: var(--ink); border-color: var(--input-rule); }
.text-button { display: inline-flex; align-items: center; min-height: 2.5rem; padding: .2rem 0; border: 0; background: transparent; color: var(--ink); font-weight: 600; font-size: .9rem; text-decoration: underline; text-decoration-color: var(--input-rule); text-underline-offset: .26em; }
.text-button:hover { text-decoration-color: currentColor; }
.sample-button { display: flex; margin: .38rem auto 0; }

.report-layout { display: grid; align-items: start; grid-template-columns: minmax(0, 1.44fr) minmax(15.94rem, 1fr); gap: clamp(1.5rem, 4.8vw, 3.625rem); padding-block: 1.75rem 2.2rem; }
.reading { min-width: 0; }
.report-layout:has(.date-tools) { row-gap: 1.15rem; }
.date-tools {
  grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: end; gap: .5rem 1.4rem;
  padding-bottom: .85rem; border-bottom: 1px solid var(--rule);
}
.date-select { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; max-width: 100%; }
.date-select label { margin-right: .15rem; color: var(--ink); font-weight: 650; font-size: .875rem; }
.date-select input, .date-select button {
  max-width: 100%; min-height: 2.75rem; border: 1px solid var(--input-rule); border-radius: 1px;
  background: var(--page); color: var(--ink); font: 500 .9375rem/1.3 var(--sans);
}
.date-select input { min-width: 0; padding: .3rem .5rem; }
.date-select button { padding: .3rem .75rem; }
.date-tools .text-button { min-height: 2.75rem; }
.date-comparison { margin-top: .9rem; padding: .8rem 0; border-block: 1px solid var(--rule); }
.date-comparison h3 { font: 650 1.125rem/1.45 var(--serif); }
.compare-days { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: .55rem 0; }
.compare-days > div { min-width: 0; padding-right: .65rem; }
.compare-days > div + div { padding-left: .65rem; padding-right: 0; border-left: 1px solid var(--rule); }
.compare-days h4 { color: var(--red); font: 600 .8125rem/1.55 var(--sans); }
.compare-days p, .comparison-reason { font-size: .875rem; line-height: 1.6; }
.compare-days p { color: var(--soft); }
.compare-days .compare-headline { margin: .2rem 0; color: var(--ink); font: 650 1rem/1.5 var(--serif); }
.comparison-reason { padding-top: .5rem; border-top: 1px solid var(--rule); }
@media (max-width: 43rem) {
  .date-tools { margin-bottom: 1rem; column-gap: .8rem; }
}
@media (max-width: 25rem) {
  .compare-days { grid-template-columns: minmax(0, 1fr); gap: .6rem; }
  .compare-days > div, .compare-days > div + div { padding: 0; border: 0; }
}
.field-nav { display: flex; flex-wrap: wrap; column-gap: 1.25rem; margin-top: .5rem; border-bottom: 1px solid var(--rule); }
.field-nav button { min-height: 2.5rem; padding: 0 .1rem; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--soft); font-size: .875rem; }
.field-nav button[aria-pressed="true"] { border-bottom-color: var(--red); color: var(--ink); font-weight: 700; }
.reading-content { padding-block: 1rem; }
.reading-content h3 { color: var(--ink); font: 600 1.625rem/1.35 var(--serif); letter-spacing: -.055em; }
#reading-body, .action-line p { font-size: 1rem; line-height: 1.72; letter-spacing: -.015em; }
#reading-body { margin-top: .44rem; }
.action-line { margin-top: 1rem; padding: .69rem .94rem .81rem; background: var(--blush); border-inline-start: 2px solid var(--wood); }
.action-line h4 { margin: 0 0 .2rem; color: var(--red); font: 650 .9rem/1.45 var(--serif); }
.natal { min-width: 0; border-inline-start: 1px solid var(--rule); padding-inline-start: clamp(1rem, 2.6vw, 2.125rem); }
.natal-head { display: flex; align-items: center; justify-content: space-between; gap: .65rem; }
.natal-head span, .profile-summary { color: var(--soft); font-size: .8125rem; }
.profile-summary { margin: .62rem 0 .84rem; }
#natal-heading { display: inline-block; padding: .24rem .6rem; border: 3px double var(--wood); background: var(--page); font-size: 1.15rem; letter-spacing: .035em; }
.pillar-table { table-layout: fixed; border-collapse: collapse; width: 100%; text-align: center; font-variant-numeric: tabular-nums; }
.pillar-table + .pillar-table { margin-top: 1rem; }
.pillar-table caption { padding-bottom: .35rem; font-size: .875rem; font-weight: 600; text-align: start; }
.pillar-table { border-block: 3px double var(--wood); background: var(--page); }
.pillar-table thead { border-bottom: 1px solid var(--wood); }
.pillar-table :is(td, th) + :is(td, th) { border-inline-start: 1px solid var(--rule); }
.pillar-table tbody tr + tr { border-top: 1px solid var(--rule); }
.pillar-table :is(th, td) { padding: .5rem .15rem; text-align: center; }
.pillar-table th { font-weight: 500; font-size: .8125rem; color: var(--soft); }
.pillar-table th:first-child { width: 2.65rem; text-align: center; }
.pillar-table td { font-size: .875rem; }
.pillar-table b { display: block; font: 550 clamp(1.9rem, 2.5vw, 2.2rem)/1.2 var(--serif); }
.pillar-table small { display: block; margin-top: .1rem; font-size: .8125rem; color: var(--soft); }
.pillar-table .day-pillar { background: var(--tint); }
.pillar-table th.day-pillar { box-shadow: inset 0 2px var(--red); }
.pillar-table .evidence-cell b { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .13em; }
.natal:has(#intro-details[open]) td[data-pillar="day"][data-character="stem"] { outline: 2px solid var(--red); outline-offset: -2px; }
.pillar-note { margin: .5rem 0 .75rem; color: var(--soft); font-size: .8125rem; }
.report-limit, .evidence-key, .scope-note { margin-top: .5rem; color: var(--soft); font-size: .875rem; }
.report-limit { padding-inline-start: .6rem; margin-bottom: .6rem; border-inline-start: 2px solid var(--input-rule); }
.proof-back { margin-top: .18rem; }
details summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 2.875rem; list-style: none; font-size: .875rem; font-weight: 650; }
details summary::-webkit-details-marker { display: none; }
details summary::after { content: ""; flex: none; width: .48rem; height: .48rem; margin: 0 .28rem .2rem 0; border: 0 solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
details[open] summary::after { transform: rotate(225deg); margin-bottom: -.2rem; }
.reason-details, .intro-details, .calc-details { border-top: 1px solid var(--rule); }
.reason-details, .calc-details { border-bottom: 1px solid var(--rule); }
.details-content { padding-bottom: .85rem; font-size: 1rem; line-height: 1.75; }
.intro-how { margin-top: .5rem; color: var(--soft); font-size: .9375rem; }
.evidence-group { border-top: 1px solid var(--rule); }
.evidence-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: baseline; gap: .31rem; padding: .65rem 0; }
.evidence-grid dt { color: var(--soft); font-size: .8125rem; }
.evidence-grid dd { margin-top: .15rem; font: 650 1rem/1.45 var(--serif); }
#stem-rule { padding-bottom: .65rem; font-size: .9375rem; }
#reading-reason { padding-top: .65rem; border-top: 1px solid var(--rule); }
.profile-actions { gap: .4rem 1rem; margin-top: .3rem; }
.status:not(:empty), .js-note { padding-block: .65rem; }

@media (max-width: 53rem) {
  .page-width, .is-form .book-layout { width: calc(100% - 3rem); }
  .is-form .book-layout { grid-template-columns: minmax(0, .82fr) minmax(0, 1.12fr); }
  .is-form .birth-layout { width: 100%; }
  .is-form .hero-inner { padding: 1.8rem 1.4rem; }
  .is-form .hero-copy { column-gap: .75rem; }
  .is-form .cover-script { font-size: 1rem; }
  .is-form .hero h1 { font-size: clamp(1.8rem, 3.9vw, 2.4rem); }
  .birth-layout { padding: 1.55rem; }
  .report-layout { gap: 1.35rem; grid-template-columns: minmax(0, 1.25fr) minmax(14rem, 1fr); }
  .is-report .hero-inner { gap: 1.3rem; grid-template-columns: 6.5rem minmax(0, 1fr); }
  .calendar-leaf { width: 6.5rem; }
}
@media (max-width: 43rem) {
  .page-width { width: calc(100% - 2.25rem); }
  .is-form .book-layout { display: block; width: 100%; margin: 0 auto; }
  .masthead-content { min-height: 3.375rem; gap: .1rem .55rem; }
  .wordmark { font-size: 1.4rem; }
  .brand-mark { width: 1.75rem; height: 1.75rem; }
  .issue-title { font-size: .8125rem; }
  .is-report .issue-title { display: none; }
  .day-nav button { min-width: 2.44rem; padding-inline: .43rem; }
  .is-form .folio-cover { min-height: 0; box-shadow: none; }
  .is-form .folio-cover::before {
    background: linear-gradient(90deg, #0f2831fc 0%, #0f2831f5 52%, #0f2831ed 65%, #0f2831c9 87%, #0f283130 100%);
    mask-image: linear-gradient(180deg, #000 0% 85%, #00000020 100%);
  }
  .is-form .cover-art { object-position: center 59%; }
  .is-form .folio-cover::after { width: .65rem; }
  .is-form .hero-inner { width: min(calc(100% - 2.55rem), 36rem); margin-inline: auto; padding: 1.32rem .25rem 1.4rem 0; }
  .is-form .hero-copy { column-gap: .85rem; }
  .is-form .hero h1 { font-size: clamp(1.95rem, 6.9vw, 2.55rem); margin: .25rem 0; }
  .hero-note { font-size: .9375rem; max-width: 19rem; }
  .hero-meta { font-size: .8125rem; }
  .is-form .birth-layout { width: min(calc(100% - 2.25rem), 36rem); margin: auto; border: 0; box-shadow: none; background: transparent; padding: 1.2rem 0 1.5rem; }
  .is-form #status, .is-form .js-note { width: calc(100% - 2.25rem); }
  .birth-intro { padding-bottom: .6rem; margin-bottom: .65rem; }
  .birth-intro h2, #reading-heading { font-size: 1.32rem; }
  .birth-intro p { font-size: .875rem; }
  .time-row { gap: .4rem .8rem; }
  .remember-row { display: block; }
  .remember-row .field-hint { margin-inline-start: 1.6rem; }
  .is-report .hero-inner { display: block; padding-block: 1.05rem 1rem; }
  .calendar-leaf { display: none; }
  .is-report .issue-on-phone, .is-report .issue-ganji { display: inline; }
  .is-report .selected-issue { position: static; color: var(--red); }
  .is-report h1 { margin: .35rem 0 .55rem; font-size: clamp(1.82rem, 7.2vw, 2.38rem); }
  .origin span { padding: .36rem .5rem; gap: .25rem; }
  .origin small { font-size: .75rem; }
  .origin b { font-size: .9rem; }
  .report-layout { display: block; padding-block: 1.1rem 1.6rem; }
  .reading-content h3 { font-size: 1.4375rem; }
  .natal { margin-top: 1.35rem; padding: 1.1rem 0 0; border-inline: 0; border-top: 3px double var(--wood); }
}
@media (max-width: 23rem) {
  .masthead-content { column-gap: .35rem; }
  .is-report .masthead-content { width: calc(100% - 1.5rem); column-gap: .18rem; }
  .is-report .wordmark { gap: .31rem; font-size: 1.2rem; }
  .is-report .brand-mark { width: 1.5rem; height: 1.5rem; }
  .is-form .hero-copy { column-gap: .6rem; }
  .is-form .hero-inner { padding-block: 1.05rem; }
  .hero-meta { column-gap: .31rem; }
  .origin span { padding: .35rem .38rem; }
  .numeric-field input { padding-inline: .6rem 1.6rem; }
  .numeric-field span { right: .5rem; }
  .quiet-button { padding-inline: .65rem; }
}
@media (min-width: 43.01rem) and (max-height: 48rem) {
  .is-form .book-layout { margin-block-start: 1.35rem; }
  .is-form .folio-cover { min-height: 28.5rem; }
  .is-report .hero-inner { padding-block: 1.25rem; }
}
@media (pointer: coarse) {
  .day-nav button, .calendar-choices span, .field-nav button { min-width: 44px; }
  .day-nav button, .calendar-choices span, .field-nav button, .exit-sample, .text-button, .origin, .check-label { min-height: 44px; }
  .date-fieldset > legend { min-height: 44px; }
}
@media (prefers-color-scheme: dark) {
  .primary-button, .day-nav button[aria-pressed="true"] { color: var(--board); background: #d9cfb4; border-color: #d9cfb4; }
}
@media (forced-colors: active) {
  :focus-visible, .calendar-choices input:focus-visible + span { outline-color: Highlight; }
  .calendar-choices input:checked + span, button[aria-pressed="true"], .pillar-table th.day-pillar { outline: 2px solid Highlight; outline-offset: -2px; }
  .natal:has(#intro-details[open]) td[data-pillar="day"][data-character="stem"] { outline: 3px double Highlight; }
  .brand-mark { outline: 1px solid CanvasText; border-radius: .2rem; }
  .is-form .cover-art, .is-form .folio-cover::before, .is-form .folio-cover::after { display: none; }
  .is-form .folio-cover { border: 1px solid CanvasText; }
  .is-form .cover-script { border-color: CanvasText; }
  .primary-button { border: 1px solid ButtonText; }
}

/* The journal sits beside the action it records and opens only on request. */
.action-journal { margin: -.38rem 0 .95rem; min-width: 0; }
.journal-controls, .journal-entry-head, .journal-filters, .journal-clear-confirm { display: flex; align-items: center; flex-wrap: wrap; gap: .28rem .85rem; }
.journal-controls > .text-button { gap: .3em; }
.journal-button {
  min-height: 2.5rem; padding: .31rem .72rem; border: 1px solid var(--input-rule);
  color: var(--ink); background: var(--page); font: 600 .9rem/1.45 var(--sans);
}
.journal-button:disabled { color: var(--soft); opacity: 1; border-color: var(--rule); background: transparent; }
.journal-button:not(:disabled):hover { border-color: var(--ink); }
.journal-status, .journal-guide, .journal-empty { color: var(--soft); font-size: .875rem; line-height: 1.55; }
.journal-status:empty { display: none; }
.journal-status:not(:empty) { margin: .3rem 0; }
.journal-panel { margin-top: .5rem; padding: .85rem 0 .35rem; border-top: 3px double var(--wood); }
.journal-filters { align-items: end; margin-block: .6rem; }
.journal-filters label, .journal-memo label { display: grid; gap: .18rem; min-width: 0; font-size: .8125rem; font-weight: 550; color: var(--soft); }
.journal-filters input, .journal-filters select, .journal-note { min-width: 0; max-width: 100%; min-height: 2.5rem; padding: .3rem .5rem; border: 1px solid var(--input-rule); border-radius: 1px; background: var(--page); color: var(--ink); font: 400 1rem/1.4 var(--sans); }
.journal-empty { margin-top: .45rem; }
.journal-list { margin: 0; padding: 0; list-style: none; }
.journal-entry { padding: .5rem 0 .85rem; border-top: 1px solid var(--rule); }
.journal-entry-head { justify-content: space-between; }
.journal-entry-label { font: 600 .875rem/1.6 var(--serif); color: var(--red); }
.journal-delete { font-size: .8125rem; font-weight: 500; }
.journal-task { display: flex; align-items: flex-start; gap: .5rem; min-height: 2rem; cursor: pointer; }
.journal-done { flex: none; margin: .24rem 0 0; width: 1.12rem; height: 1.12rem; accent-color: var(--ink); }
.journal-done:checked ~ .journal-action { color: var(--soft); text-decoration: line-through; }
.journal-memo { display: flex; align-items: end; gap: .45rem; margin-top: .4rem; }
.journal-memo label { flex: 1; }
.journal-note { width: 100%; }
.journal-clear-confirm { border-top: 1px solid var(--rule); padding-top: .55rem; }
.journal-clear-confirm p { width: 100%; font-size: .875rem; }
@media (pointer: coarse) {
  .journal-button, .journal-task, .journal-filters input, .journal-filters select, .journal-note { min-height: 44px; }
}

.account-open {
  flex: none; margin-inline-start: auto; min-height: 44px; padding: .25rem .55rem;
  border: 0; background: none; color: var(--ink); font: 600 .9rem/1.4 var(--sans);
  text-decoration: underline; text-decoration-color: var(--input-rule); text-underline-offset: .28em;
}
.account-open:not([hidden]) ~ .day-nav, .account-open:not([hidden]) ~ .exit-sample { margin-inline-start: 0; }
.account-dialog {
  width: min(23rem, calc(100% - 2rem)); max-height: calc(100% - 2rem);
  padding: 1.2rem 1.35rem 1.4rem; overflow: auto; color: var(--ink); background: var(--page);
  border: 1px solid var(--wood); border-block-start: 4px double var(--wood);
}
.account-dialog::backdrop { background: rgb(18 29 32 / .56); }
.account-heading { display: flex; align-items: center; justify-content: space-between; gap: .7rem; }
.account-heading h2 { font: 600 1.45rem/1.4 var(--serif); }
.account-heading .text-button { min-height: 44px; min-width: 44px; }
.account-note, .account-status { color: var(--soft); font-size: .9rem; }
.account-note { margin: .22rem 0 1rem; }
#account-identity { margin-bottom: .7rem; font-weight: 600; overflow-wrap: anywhere; }
.account-methods { display: grid; gap: .42rem; }
.account-method { width: 100%; min-height: 44px; padding: .5rem .8rem; border: 1px solid var(--input-rule); color: var(--ink); background: var(--page); font-weight: 600; }
.account-method:hover { background: var(--tint); }
.account-methods .text-button, #account-here { min-height: 44px; justify-self: start; }
.account-status:not(:empty) { margin-top: .75rem; }
.account-privacy, .site-footer { color: var(--soft); font-size: .8125rem; }
.account-privacy { margin-top: 1rem; padding-top: .65rem; border-top: 1px solid var(--rule); }
.site-footer { padding-block: 1rem 1.5rem; }
.account-privacy a, .site-footer a { color: inherit; text-underline-offset: .2em; }
.site-footer a { display: inline-flex; min-height: 44px; align-items: center; }
@media (max-width: 32rem) {
  .is-report .masthead-content:has(.account-open:not([hidden])) { row-gap: .1rem; padding-block: .3rem; }
  .is-report .masthead-content:has(.account-open:not([hidden])) .day-nav { margin-inline-start: auto; }
  .is-report .masthead-content:has(.account-open:not([hidden])) .exit-sample { margin-inline-start: .2rem; }
}
@media (max-width: 24rem) {
  .is-report .masthead-content:has(.account-open:not([hidden])) { display: grid; grid-template-columns: auto 1fr auto; }
  .is-report .masthead-content:has(.account-open:not([hidden])) .issue-title { display: none; }
  .is-report .account-open:not([hidden]) { grid-column: 3; grid-row: 1; }
  .is-report .account-open:not([hidden]) ~ .exit-sample { justify-self: start; grid-column: 1; grid-row: 2; }
  .is-report .account-open:not([hidden]) ~ .day-nav { grid-column: 2 / 4; grid-row: 2; justify-self: end; }
}
