:root {
  color-scheme: light;
  --paper: #f8f4ec;
  --sheet: #fdfaf4;
  --tint: #f1e8dd;
  --ink: #282024;
  --subtle: #665955;
  --wine: #743844;
  --wine-deep: #512631;
  --line: #dcd0c2;
  --line-dark: #bca699;
  --body: "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans CJK KR", system-ui, sans-serif;
  --numerals: Georgia, "Times New Roman", serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 24px; }
body {
  margin: 0;
  min-width: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  line-height: 1.6;
}
main { flex: 1; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, p, figure, dl, dd { margin: 0; }
h1, h2, h3 { line-height: 1.21; letter-spacing: -.055em; word-break: keep-all; overflow-wrap: anywhere; }
:focus-visible { outline: 2px solid var(--wine); outline-offset: 4px; }
h1:focus, h2:focus, main:focus { outline: none; }
.shell { width: min(1200px, calc(100% - 96px)); margin-inline: auto; }
.skip-link { position: absolute; z-index: 2; inset: 8px auto auto 8px; padding: 10px 16px; color: white; background: var(--wine-deep); transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }

.site-header { border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 72px; gap: 14px; }
.brand { display: inline-flex; align-items: center; gap: 9px; min-height: 44px; font-weight: 800; font-size: 21px; letter-spacing: -.07em; }
.brand svg { color: var(--wine); }
.site-nav { display: flex; align-items: center; gap: 30px; font-size: 15px; font-weight: 700; }
.site-nav a { min-height: 44px; display: grid; align-items: center; color: var(--subtle); position: relative; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--wine); }
.site-nav a[aria-current="page"]::after { content: ""; position: absolute; bottom: 3px; width: 100%; height: 1px; background: var(--wine); }
.site-footer { border-top: 1px solid var(--line); color: var(--subtle); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 20px; padding-block: 23px; font-size: 13px; }
.footer-brand { font-weight: 800; color: var(--ink); }
.footer-brand span { color: var(--wine); margin-inline-end: 5px; }

.eyebrow { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; color: var(--wine); font-size: 13px; font-weight: 800; letter-spacing: .045em; }
.eyebrow-divider { display: inline-block; background: currentColor; width: 16px; height: 1px; opacity: .48; flex: none; }
.ink-mark, .spark { color: var(--wine); }
.ink-mark { font-size: 17px; line-height: 1; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-height: 46px;
  max-width: 100%;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 780;
  line-height: 1.35;
  text-align: center;
}
.button--primary { background: var(--wine); border-color: var(--wine); color: #fffaf4; }
.button--primary:hover { background: var(--wine-deep); border-color: var(--wine-deep); }
.button--outline { border-color: var(--line-dark); color: var(--ink); background: var(--sheet); }
.button--outline:hover, .button--quiet:hover { background: var(--tint); }
.button--quiet { color: var(--subtle); background: transparent; }
.button--danger { border-color: var(--line-dark); color: var(--wine-deep); background: var(--sheet); }
.button--danger:hover { border-color: var(--wine); background: #f6e6e4; }
.arrow { display: inline-block; font-weight: 500; line-height: 1; }

.home { padding-bottom: 80px; }
.hero { display: grid; align-items: center; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 88px); padding: 59px 0 42px; }
.hero-copy { padding-block: 6px; }
.hero h1 { margin: 18px 0 21px; font-size: clamp(45px, 5.4vw, 79px); line-height: 1.09; letter-spacing: -.083em; }
.hero-period { color: var(--wine); margin-left: 3px; }
.hero-summary { color: var(--subtle); font-size: clamp(15px, 1.35vw, 18px); line-height: 1.8; word-break: keep-all; overflow-wrap: anywhere; }
.hero .button { margin-top: 29px; }
.feature { border: 1px solid #6d4a4b; border-radius: 11px; overflow: hidden; background: #361f28; color: #fff6e9; box-shadow: 0 14px 30px #32202718; }
.feature-art { position: relative; padding-bottom: 59%; }
.theatre-art { display: block; position: absolute; width: 100%; height: 100%; object-fit: cover; }
.feature-index {
  position: absolute;
  top: 16px;
  left: 17px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  border: 1px solid #b98673;
  border-radius: 3px;
  background: #38202b;
  color: #f4d3b6;
  font-size: 12px;
  font-weight: 700;
}
.feature-index strong { font-family: var(--numerals); letter-spacing: .025em; }
.feature-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 20px 15px;
  border-top: 1px solid #a368596b;
  background: #391f2a;
}
.feature-caption p { font-size: 12px; font-weight: 750; color: #e9b99d; margin-bottom: 3px; }
.feature-caption h2 { font-size: 26px; }
.feature-caption a { flex: none; display: grid; place-items: center; width: 45px; height: 45px; border: 1px solid #a7786d; border-radius: 50%; font-size: 20px; color: #ffedda; }
.feature-caption a:hover { color: #38202b; background: #f6dec5; }
.feature-caption a:focus-visible { outline-color: #f6dec5; }

.daily-strip { min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 15px; padding: 14px 17px; border: 1px solid var(--line); border-radius: 7px; background: var(--tint); }
.daily-icon { color: var(--wine); font-family: var(--numerals); font-size: 28px; display: grid; place-items: center; width: 46px; height: 46px; border: 1px solid var(--line-dark); border-radius: 50%; }
.daily-strip h2 { font-size: 20px; margin-bottom: 3px; }
.daily-strip p { color: var(--subtle); font-size: 14px; word-break: keep-all; }
.text-link { display: inline-flex; align-items: center; gap: 9px; min-height: 44px; color: var(--wine-deep); white-space: nowrap; font-weight: 800; font-size: 14px; }
.text-link:hover { text-decoration: underline; text-underline-offset: 4px; }

.catalog { padding-top: 62px; }
.catalog-header { display: flex; align-items: end; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); padding-bottom: 15px; }
.catalog-header h2 { margin-top: 6px; font-size: clamp(32px, 4.3vw, 48px); }
.catalog-count { font-size: 14px; color: var(--subtle); flex: none; }
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; padding: 15px 0 17px; }
.filters button { background: transparent; color: var(--subtle); border: 1px solid var(--line-dark); border-radius: 40px; min-height: 43px; padding: 6px 12px; font-size: 13px; font-weight: 735; }
.filters button:hover { background: var(--tint); color: var(--ink); }
.filters button[aria-pressed="true"] { background: var(--wine-deep); border-color: var(--wine-deep); color: #fffaf4; }
.filters button span, .card-category span { font-family: var(--numerals); margin-right: 3px; font-weight: 700; }
.catalog-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.catalog-card { padding: 13px 14px; min-height: 172px; position: relative; display: flex; flex-direction: column; height: 100%; border: 1px solid var(--line); border-radius: 7px; background: var(--sheet); }
.catalog-card.is-available { padding: 0; background: #f3e7e1; border-color: #b58a89; }
.card-anchor { display: flex; min-height: 100%; flex-direction: column; padding: 13px 14px; border-radius: 7px; }
.card-anchor:hover { background: #ead7d0; }
.card-anchor .arrow { position: absolute; bottom: 15px; right: 15px; color: var(--wine); }
.card-anchor .card-category { padding-right: 15px; }
.card-meta { display: flex; align-items: center; justify-content: space-between; gap: 5px; padding-bottom: 10px; }
.card-number { color: var(--wine); font-family: var(--numerals); font-size: 23px; line-height: 1; letter-spacing: -.025em; }
.card-status { display: inline-block; padding: 1px 6px; border: 1px solid var(--line); border-radius: 4px; color: var(--subtle); font-weight: 750; font-size: 11px; }
.is-available .card-status { border-color: #b58a89; color: var(--wine-deep); }
.catalog-card h3 { font-size: 19px; margin-bottom: 7px; }
.catalog-card p { color: var(--subtle); font-size: 13px; line-height: 1.64; margin-bottom: 11px; word-break: keep-all; overflow-wrap: anywhere; }
.card-category { display: block; margin-top: auto; color: var(--subtle); font-size: 11px; }

.reading { width: min(730px, calc(100% - 96px)); padding-block: 35px 75px; }
.reading--form { max-width: 650px; }
.back { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; color: var(--subtle); font-size: 14px; font-weight: 750; }
.back:hover { color: var(--wine); text-decoration: underline; text-underline-offset: 4px; }
.page-intro { margin: 14px 0 22px; }
.page-intro h1 { font-size: clamp(34px, 6.2vw, 59px); line-height: 1.12; margin-top: 10px; }
.page-summary { margin-top: 12px; color: var(--subtle); font-size: 17px; word-break: keep-all; overflow-wrap: anywhere; }
.fiction { display: flex; align-items: baseline; gap: 9px; padding: 12px 15px; margin-bottom: 21px; border-inline-start: 2px solid var(--wine); background: var(--tint); color: var(--subtle); font-size: 14px; word-break: keep-all; }
.fiction .spark { flex: none; }
.form-panel { border: 1px solid var(--line); border-radius: 9px; background: var(--sheet); padding: clamp(16px, 5vw, 31px); }
.form-field + .form-field { margin-top: 20px; }
.form-field > label:first-child { display: block; font-size: 17px; font-weight: 800; margin-bottom: 6px; }
.form-field > input { display: block; width: 100%; min-width: 0; min-height: 48px; padding: 9px 12px; border: 1px solid var(--line-dark); border-radius: 5px; background: #fffdf8; }
.form-field > input:disabled { opacity: .65; background: var(--tint); }
.form-field > input[aria-invalid="true"] { border-color: var(--wine); border-width: 2px; }
.form-field small, .form-actions p { display: block; color: var(--subtle); font-size: 13px; }
.form-field small { margin-top: 4px; }
.field-error { font-size: 14px; color: var(--wine-deep); font-weight: 750; }
.field-error:not(:empty) { margin-top: 4px; }
.checkbox { display: flex; align-items: center; gap: 8px; width: fit-content; min-height: 44px; margin-top: 4px; cursor: pointer; font-size: 15px; font-weight: 700; }
.checkbox input { width: 18px; height: 18px; margin: 0; accent-color: var(--wine); }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 13px; margin-top: 14px; padding-top: 17px; border-top: 1px solid var(--line); }

.story-profile { border: 1px solid var(--line); border-radius: 7px; padding: clamp(16px, 4vw, 27px); background: var(--sheet); }
.genre-tag { display: inline-flex; align-items: baseline; flex-wrap: wrap; gap: 6px; color: var(--wine-deep); font-size: 17px; font-weight: 800; margin-bottom: 6px; }
.genre-tag span { color: var(--wine); font-size: 13px; }
.story-profile dl > div, .record-meta > div { display: grid; grid-template-columns: 60px minmax(0, 1fr); gap: 8px; padding-block: 10px; }
.story-profile dl > div + div, .record-meta > div + div { border-top: 1px solid var(--line); }
.story-profile dt, .record-meta dt { font-size: 14px; font-weight: 800; color: var(--wine-deep); }
.story-profile dd { line-height: 1.75; }
.chapter-menu { display: flex; flex-wrap: wrap; gap: 7px; padding: 21px 0 13px; }
.chapter-menu a { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 6px 11px; border: 1px solid var(--line-dark); border-radius: 4px; font-size: 14px; font-weight: 750; }
.chapter-menu a:hover { background: var(--tint); }
.chapter-menu a span:first-child { color: var(--wine); font-family: var(--numerals); }
.chapters { margin-top: 6px; }
.chapter { border-top: 1px solid var(--line); padding: 20px 0 23px; }
.chapter h2 { font-size: 27px; }
.chapter .eyebrow + h2 { margin-top: 5px; }
.prose { margin-top: 10px; line-height: 1.85; font-size: 17px; white-space: pre-wrap; overflow-wrap: anywhere; }
.story-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.feedback { font-size: 14px; font-weight: 700; }
.feedback:not(:empty) { margin-top: 13px; padding: 10px 13px; border: 1px solid; border-radius: 5px; }
.feedback--success:not(:empty) { color: #354d3c; background: #eaf0e5; border-color: #a3b3a2; }
.feedback--error:not(:empty) { color: var(--wine-deep); background: #f4e5e3; border-color: #c4a29d; }

.daily-page { padding: clamp(20px, 5vw, 39px); border: 1px solid var(--line-dark); border-radius: 9px; background: var(--sheet); }
.daily-meta { display: flex; gap: 6px 11px; align-items: center; flex-wrap: wrap; font-size: 14px; color: var(--subtle); }
.date-tag { font-variant-numeric: tabular-nums; }
.daily-meta time { border: 1px solid var(--line); border-radius: 4px; padding: 1px 6px; font-weight: 800; color: var(--wine-deep); }
.daily-page h2 { margin-top: 12px; font-size: clamp(27px, 5.2vw, 43px); }
.daily-end { display: flex; gap: 9px; align-items: center; color: var(--line-dark); margin-top: 23px; }
.daily-end::before { content: ""; width: 27px; border-top: 1px solid; }

.record-note { margin-bottom: 15px; font-size: 14px; color: var(--subtle); }
.record-list { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 8px; }
.record-entry { position: relative; text-align: start; background: var(--sheet); width: 100%; display: flex; flex-direction: column; padding: 12px 44px 12px 14px; border: 1px solid var(--line); border-radius: 6px; }
.record-entry:hover { border-color: var(--line-dark); background: var(--tint); }
.record-entry span { color: var(--subtle); font-size: 13px; }
.record-entry strong { font-size: 21px; line-height: 1.35; letter-spacing: -.045em; overflow-wrap: anywhere; }
.record-entry .entry-arrow { position: absolute; right: 15px; top: 50%; transform: translateY(-50%); color: var(--wine); font-size: 18px; }
.record-timestamp { margin-top: 4px; }
.empty-state { padding: 28px 16px; text-align: center; border: 1px solid var(--line); border-radius: 7px; background: var(--sheet); }
.empty-state .spark { display: block; font-size: 25px; }
.empty-state h2 { margin: 4px 0 7px; font-size: 24px; }
.empty-state p { color: var(--subtle); font-size: 15px; word-break: keep-all; }
.empty-state .button { margin-top: 11px; }
.record-meta { margin-block: 16px; border: 1px solid var(--line); border-radius: 6px; background: var(--sheet); padding: 5px 13px; }
.record-meta dt { font-size: 13px; }
.record-meta dd { font-size: 14px; }

dialog { width: min(440px, calc(100% - 32px)); max-width: none; padding: 22px; color: var(--ink); background: var(--sheet); border: 1px solid var(--line-dark); border-radius: 9px; box-shadow: 0 16px 40px #2a16224a; }
dialog::backdrop { background: #27172288; }
dialog h2 { margin: 8px 0; font-size: 29px; }
dialog p:not(.eyebrow) { color: var(--subtle); font-size: 15px; }

@media (max-width: 1080px) {
  .shell { width: calc(100% - 64px); max-width: 1200px; }
  .reading { max-width: 730px; }
  .reading--form { max-width: 650px; }
  .wide-only { display: none; }
  .catalog-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .shell { width: calc(100% - 40px); }
  .header-inner { min-height: 63px; }
  .site-nav { gap: 18px; font-size: 14px; }
  .hero { grid-template-columns: minmax(0, 1fr); gap: 25px; padding: 35px 0 23px; }
  .hero h1 { font-size: clamp(41px, 8.7vw, 65px); margin-block: 13px 12px; }
  .hero-summary { max-width: 37ch; }
  .hero .button { margin-top: 17px; }
  .feature-art { padding-bottom: 55%; }
  .catalog { padding-top: 37px; }
  .catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home { padding-bottom: 50px; }
  .reading { padding-block: 22px 45px; }
}
@media (max-width: 500px) {
  .shell { width: calc(100% - 32px); }
  .brand { font-size: 20px; gap: 6px; }
  .hero h1 { font-size: clamp(36px, 11.6vw, 56px); }
  .feature-art { padding-bottom: 61%; }
  .feature-caption { padding: 10px 13px 12px; }
  .feature-caption h2 { font-size: 23px; }
  .feature-index { left: 12px; top: 12px; }
  .daily-strip { padding: 11px; gap: 9px; grid-template-columns: auto minmax(0, 1fr); }
  .daily-icon { width: 39px; height: 39px; font-size: 23px; }
  .daily-strip h2 { font-size: 18px; }
  .daily-strip p { font-size: 13px; }
  .daily-strip a { grid-column: 2; justify-self: start; min-height: 38px; }
  .catalog-grid { grid-template-columns: minmax(0, 1fr); }
  .catalog-card { min-height: 147px; }
  .filters button { font-size: 12px; padding-inline: 9px; }
  .page-summary, .prose { font-size: 16px; }
  .story-profile dl > div { grid-template-columns: minmax(0, 1fr); gap: 3px; }
}

.tarot-reading { max-width: 820px; }
.form-field > textarea, .form-field > select {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 9px 12px;
  border: 1px solid var(--line-dark);
  border-radius: 5px;
  background: #fffdf8;
  color: inherit;
  font: inherit;
}
.form-field > textarea { resize: vertical; }
.form-field > textarea[aria-invalid="true"], .form-field > select[aria-invalid="true"] { border-color: var(--wine); }
.tarot-counselors { min-width: 0; margin: 20px 0 0; padding: 0; border: 0; }
.tarot-counselors legend { padding: 0; margin-bottom: 7px; font-size: 17px; font-weight: 800; }
.tarot-counselor-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tarot-counselor {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  min-width: 0;
  padding: 11px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
}
.tarot-counselor:has(input:checked) { background: var(--tint); border-color: var(--wine); }
.tarot-counselor:has(input:focus-visible) { outline: 2px solid var(--wine); outline-offset: 3px; }
.tarot-counselor input { flex: none; margin: 4px 0 0; accent-color: var(--wine); }
.tarot-counselor-name { display: flex; flex-wrap: wrap; align-items: baseline; gap: 3px 6px; }
.tarot-counselor-name > span { color: var(--wine); }
.tarot-counselor-name small { color: var(--subtle); font-size: 12px; }
.tarot-counselor-intro { display: block; margin-top: 3px; color: var(--subtle); font-size: 13px; word-break: keep-all; }
.tarot-question { font-weight: 750; white-space: pre-wrap; overflow-wrap: anywhere; }
.tarot-context { margin: 0 0 16px; padding: 13px 15px; background: var(--tint); border-radius: 6px; }
.tarot-context h2 { color: var(--wine-deep); font-size: 16px; margin-bottom: 3px; }
.tarot-context-heading { margin-top: 8px; color: var(--subtle); font-size: 13px; font-weight: 800; }
.tarot-context .prose { margin-top: 2px; font-size: 14px; }
.tarot-deck-panel {
  padding: clamp(10px, 3vw, 22px);
  border: 1px solid #765154;
  border-radius: 9px;
  background: #33232f;
  color: #f4dfc6;
}
.tarot-deck-summary { margin-bottom: 14px; }
.tarot-deck-summary > p { margin-top: 6px; font-size: 13px; text-align: right; }
.tarot-slots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding: 0; margin: 0; list-style: none; }
.tarot-slots li { padding: 4px 6px; border-bottom: 1px solid #957476; font-size: 13px; font-weight: 750; }
.tarot-slots li > span { margin-right: 2px; color: #ffba86; font-family: var(--numerals); }
.tarot-slots small { display: block; color: #ecd0b4; font-weight: 400; }
.tarot-deck { display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); gap: 6px; }
.tarot-card-back {
  position: relative;
  display: grid;
  place-content: center;
  min-height: 57px;
  min-width: 0;
  aspect-ratio: 0.68;
  padding: 3px;
  color: #f6d6af;
  background: radial-gradient(ellipse at center, #744555, #42283c 78%);
  border: 1px solid #ad7d76;
  border-radius: 5px;
}
.tarot-card-back::before { position: absolute; content: ""; inset: 4px; border: 1px solid #bf968074; border-radius: 3px; pointer-events: none; }
.tarot-card-mark { font-family: var(--numerals); font-size: clamp(15px, 3vw, 25px); line-height: 1; }
.tarot-card-number { color: #f1cbb2; font: 700 11px var(--numerals); }
.tarot-card-back:hover { border-color: #ffdbaf; }
.tarot-card-back:focus-visible { outline-color: #ffe4ab; outline-offset: 2px; z-index: 1; }
.tarot-card-back[aria-pressed="true"] { color: #ffe8b7; border-color: #ffe4ab; background: #79483d; }
.tarot-card-back[aria-disabled="true"] { opacity: .67; cursor: default; }
.tarot-card-order:not(:empty) {
  position: absolute;
  inset: 1px 1px auto auto;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffdfa4;
  color: #45262c;
  font: 700 12px var(--numerals);
}
.button:disabled { opacity: .62; cursor: default; }
.tarot-reading-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 5px 9px; margin: 0 0 13px; color: var(--subtle); font-size: 14px; overflow-wrap: anywhere; }
.record-badge, .record-entry .record-badge {
  display: inline-block;
  padding: 0 6px;
  border: 1px solid var(--line-dark);
  border-radius: 4px;
  color: var(--wine-deep);
  font-size: 12px;
  font-weight: 800;
}
.record-entry > span, .record-meta dd { overflow-wrap: anywhere; }
.tarot-interpretations { display: grid; gap: 8px; }
.tarot-interpretation {
  min-width: 0;
  display: grid;
  grid-template-columns: clamp(65px, 15vw, 102px) minmax(0, 1fr);
  align-items: start;
  gap: clamp(10px, 3vw, 23px);
  padding: clamp(12px, 3vw, 22px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--sheet);
}
.tarot-interpretation h2 { color: var(--wine-deep); font-size: clamp(22px, 4vw, 29px); }
.tarot-card-face {
  min-height: 98px;
  aspect-ratio: 0.7;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 4px;
  padding: 7px 4px;
  border: 3px double #c89273;
  border-radius: 5px;
  background: radial-gradient(ellipse at center, #704251, #392536);
  color: #ffe5b5;
  text-align: center;
}
.tarot-card-face > span { font: 400 clamp(24px, 6vw, 45px)/1 var(--numerals); }
.tarot-card-face figcaption { font-size: 12px; font-weight: 750; word-break: keep-all; overflow-wrap: anywhere; }
.tarot-turns { margin: 19px 0 16px; }
.tarot-turns h2 { font-size: 23px; }
.tarot-turn-list { display: grid; gap: 6px; margin: 8px 0 0; padding: 0; list-style: none; }
.tarot-turn-list button {
  display: grid;
  gap: 2px;
  width: 100%;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--sheet);
  text-align: start;
  overflow-wrap: anywhere;
}
.tarot-turn-list button[aria-pressed="true"] { border-color: var(--wine); background: var(--tint); }
.tarot-turn-list button span { color: var(--subtle); font-size: 13px; }
.tarot-comparison .filters { padding-bottom: 0; }
.tarot-comparison .tarot-viewed { margin: 0 0 0 7px; font: 400 11px var(--body); }
.tarot-save { border-top: 1px solid var(--line); margin-top: 23px; padding-top: 12px; }
.tarot-save .record-note { margin-bottom: 5px; }
.tarot-save .story-actions { margin-top: 4px; }
.tarot-save [hidden] { display: none; }

@media (max-width: 735px) {
  .tarot-deck { grid-template-columns: repeat(8, minmax(0, 1fr)); }
}
@media (max-width: 540px) {
  .tarot-deck { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .tarot-counselor-grid { grid-template-columns: 1fr; }
  .tarot-counselor { padding: 7px 9px; }
}

.dream-form { margin-top: 16px; }
.dream-input dd { white-space: pre-wrap; }
.dream-save [hidden] { display: none; }
.dream-save .record-note { margin-top: 8px; }
.dream-month-field { margin-top: 12px; }
.dream-month-field select { max-width: 200px; }
.dream-recurring { margin-top: 14px; overflow-wrap: anywhere; }
.dream-recurring p, .dream-recurring ul { margin-top: 8px; }
.dream-recurring ul { padding-left: 22px; }

.manual-reading { max-width: 820px; }
.manual-form { display: grid; gap: 14px; }
.manual-progress { color: var(--wine-deep); font-size: 14px; font-weight: 800; }
.manual-area { padding: clamp(16px, 4vw, 26px); }
.manual-area h2 { padding-bottom: 11px; border-bottom: 1px solid var(--line); color: var(--wine-deep); font-size: clamp(23px, 4vw, 29px); }
.manual-question { min-width: 0; margin: 17px 0 0; padding: 0; border: 0; }
.manual-question legend { padding: 0; margin-bottom: 8px; font-size: 16px; font-weight: 800; word-break: keep-all; overflow-wrap: anywhere; }
.manual-options { display: grid; gap: 6px; }
.manual-option {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fffdf8;
  cursor: pointer;
  font-size: 15px;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.manual-option:has(input:checked) { background: var(--tint); border-color: var(--wine); }
.manual-option:has(input:focus-visible) { outline: 2px solid var(--wine); outline-offset: 2px; }
.manual-option input { flex: none; width: 17px; height: 17px; margin: 0; accent-color: var(--wine); }
.manual-option input:focus-visible { outline: none; }

.manual-chapters { display: grid; gap: 10px; }
.manual-chapters .chapter { padding: clamp(15px, 3vw, 22px); border: 1px solid var(--line); border-radius: 7px; background: var(--sheet); }
.manual-chapters h2 { color: var(--wine-deep); font-size: clamp(22px, 4vw, 27px); }
.manual-save { margin-top: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.manual-save .record-note { margin-bottom: 0; }
.manual-save .story-actions { margin-top: 8px; }
.manual-reading [hidden] { display: none; }
.manual-tool-panel { padding: clamp(14px, 4vw, 22px); margin-top: 11px; border: 1px solid var(--line); border-radius: 7px; background: var(--sheet); }
.manual-tool-panel > h2 { margin-bottom: 9px; color: var(--wine-deep); font-size: 24px; }
.manual-tool-panel select { text-overflow: ellipsis; }
.manual-tool-panel .record-note:last-child { margin-bottom: 0; }
.manual-tool-panel .fiction { margin-block: 14px 0; }
.manual-comparison-list { display: grid; gap: 12px; margin-top: 16px; }
.manual-comparison-row { padding-top: 12px; border-top: 1px solid var(--line); }
.manual-comparison-row header { display: flex; flex-wrap: wrap; align-items: baseline; gap: 5px 9px; margin-bottom: 8px; }
.manual-comparison-row h3 { font-size: 21px; }
.manual-match { color: var(--wine-deep); font-size: 13px; font-weight: 750; }
.manual-comparison-columns { display: grid; gap: 7px; }
.manual-comparison-cell { padding: 12px; border: 1px solid var(--line); border-radius: 5px; background: var(--paper); }
.manual-comparison-cell:last-child { background: #fffdf8; }
.manual-comparison-cell .prose { margin-top: 5px; font-size: 15px; }
.manual-comparison-label { color: var(--subtle); font-size: 13px; font-weight: 800; }
.manual-comparison-cell h4 { margin: 4px 0 0; overflow-wrap: anywhere; }
#manual-share-text { line-height: 1.7; }

@media (min-width: 700px) {
  .manual-options, .manual-chapters, .manual-comparison-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.past-life-reading { max-width: 820px; }
[data-past-life-screen] [hidden] { display: none; }
.past-life-start .fiction { margin-bottom: 0; overflow-wrap: anywhere; }
.past-life-progress { margin-block: 13px 10px; }
.past-life-options { display: grid; gap: 7px; border: 0; margin: 0; padding: 0; min-width: 0; }
.past-life-options legend { padding: 0; margin-bottom: 15px; }
.past-life-options h1 { font-size: clamp(24px, 5vw, 37px); line-height: 1.38; word-break: keep-all; overflow-wrap: anywhere; }
.past-life-option {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 47px;
  padding: 10px 12px;
  border: 1px solid var(--line-dark);
  border-radius: 5px;
  background: #fffdf8;
  cursor: pointer;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.past-life-option:has(input:checked) { border-color: var(--wine); background: var(--tint); }
.past-life-option:has(input:focus-visible) { outline: 2px solid var(--wine); outline-offset: 2px; }
.past-life-option input { flex: none; width: 18px; height: 18px; margin: 0; accent-color: var(--wine); }
.past-life-option input:focus-visible { outline: none; }
.past-life-profile .page-intro h1,
.past-life-facts dd,
.past-life-chapters h2,
.past-life-pair-result h2,
.past-life-collection-list .record-entry span { overflow-wrap: anywhere; }
.past-life-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 16px;
  margin-block: 16px 14px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--sheet);
}
.past-life-facts dt { color: var(--wine-deep); font-size: 13px; font-weight: 800; }
.past-life-facts dd { line-height: 1.5; }
.past-life-epilogue,
.past-life-pair-result { margin-top: 16px; }
.past-life-epilogue { padding: 15px; background: var(--sheet); border: 1px solid var(--line); border-radius: 6px; }
.past-life-pickers { display: grid; gap: 12px; }
.past-life-pickers .form-field + .form-field { margin-top: 0; }
.past-life-pickers select { display: block; width: 100%; min-width: 0; text-overflow: ellipsis; }
.past-life-pair-result .fiction { margin-block: 9px 0; overflow-wrap: anywhere; }
.past-life-pair-result .chapter { margin-top: 11px; padding-block: 11px 0; }
[data-action="past-life-filter"] { max-width: 100%; overflow-wrap: anywhere; }
.past-life-excerpt { margin-top: 5px; }

.chemistry-reading { max-width: 820px; overflow-wrap: anywhere; }
[data-chemistry-screen] [hidden] { display: none; }
.chemistry-relationship { margin-top: 0; }
.chemistry-relationship .manual-options { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.chemistry-relationship .manual-option { gap: 6px; padding-inline: 7px; }
.chemistry-aliases, .chemistry-compare-columns { display: grid; gap: 12px; }
.chemistry-aliases { margin-top: 16px; }
.chemistry-aliases .form-field + .form-field,
.chemistry-compare-columns .form-field + .form-field { margin-top: 0; }
.chemistry-alias-help { margin-block: 9px 0; }
.chemistry-questions, .chemistry-scenes { display: grid; gap: 12px; }
.chemistry-questions .story-actions { margin-top: 4px; }
.chemistry-record-meta { margin-bottom: 16px; }
.chemistry-scene > h2, .chemistry-scene > h3 { color: var(--wine-deep); }
.chemistry-scene > h2 { font-size: 25px; }
.chemistry-dialogue { display: grid; gap: 6px; margin-top: 10px; }
.chemistry-dialogue > div { display: grid; grid-template-columns: minmax(32px, 24%) minmax(0, 1fr); gap: 10px; }
.chemistry-dialogue dt { color: var(--wine-deep); font-weight: 750; }
.chemistry-dialogue dd { line-height: 1.7; }
.chemistry-prompt { margin-top: 14px; padding: 10px 12px; border-radius: 5px; background: var(--tint); font-size: 14px; }
.chemistry-prompt strong { display: block; margin-bottom: 3px; color: var(--wine-deep); }
.chemistry-compare-columns select { width: 100%; min-width: 0; text-overflow: ellipsis; }
.chemistry-comparison { display: grid; gap: 12px; margin-top: 22px; }
.chemistry-comparison .chemistry-compare-columns { margin-top: 10px; }
.chemistry-compare-side { min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 5px; background: var(--paper); }
.chemistry-compare-side h4 { margin: 0; }
.chemistry-compare-side .prose { font-size: 15px; }
.chemistry-compare-person { color: var(--subtle); font-size: 14px; }
.chemistry-compare-side:nth-child(2) { background: #fffdf8; }

@media (min-width: 700px) {
  .chemistry-aliases, .chemistry-compare-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 650px) {
  .past-life-facts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .past-life-pickers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.sitcom [hidden] { display: none; }
.sitcom-form { margin-top: 16px; }
.sitcom-members, .sitcom-member { min-inline-size: 0; margin: 0; }
.sitcom-members { padding: 0; border: 0; }
.sitcom-members > legend { font-size: 20px; font-weight: 800; color: var(--wine-deep); }
.sitcom-count { margin-inline-start: 5px; color: var(--subtle); font-size: 14px; }
.sitcom-member {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--sheet);
  padding: 10px 15px 14px;
  margin: 10px 0;
}
.sitcom-member legend { padding-inline: 5px; font-size: 14px; font-weight: 800; }
.sitcom-member-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 10px; align-items: start; }
.sitcom .form-field { display: block; min-width: 0; font-size: 15px; font-weight: 750; }
.sitcom-member-fields .form-field + .form-field { margin-top: 0; }
.sitcom .form-field > :is(input, select) { margin-top: 4px; }
.sitcom .field-error { display: block; }
.sitcom-remove-member { margin-top: 26px; }
.sitcom-choice { max-width: 460px; margin-block: 20px 12px; }
.sitcom-meta dd, .sitcom .record-note { overflow-wrap: anywhere; }
.sitcom-cast { padding: 12px 0; }
.sitcom-cast h2 { font-size: 20px; margin-bottom: 6px; }
.sitcom-cast ul { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; }
.sitcom-cast li { max-width: 100%; border: 1px solid var(--line); border-radius: 4px; padding: 4px 8px; overflow-wrap: anywhere; }
.sitcom-cast li span { font-size: 13px; color: var(--subtle); }
.sitcom-lines { list-style: none; margin: 12px 0 0; padding: 0; }
.sitcom-lines li {
  display: grid;
  grid-template-columns: minmax(85px, 26%) minmax(0, 1fr);
  gap: 6px 12px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
  overflow-wrap: anywhere;
}
.sitcom-speaker { color: var(--wine-deep); }

@media (max-width: 550px) {
  .sitcom-member-fields { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .sitcom-remove-member { grid-column: 1 / -1; justify-self: end; margin-top: 0; }
}

.court-reading { max-width: 850px; }
[data-court-screen] [hidden] { display: none; }
.court-case .page-intro h1, .court-case-meta { overflow-wrap: anywhere; }
.court-case-meta { display: flex; gap: 6px 10px; align-items: baseline; flex-wrap: wrap; color: var(--subtle); font-size: 14px; }
.court-start-actions { margin-block: 14px 26px; }
.court-docket h2, .court-edit h2 { font-size: clamp(22px, 4vw, 27px); }
.court-samples { margin-top: 10px; }
.court-samples .record-entry { height: 100%; }
.court-brief { display: grid; gap: 10px; margin-top: 12px; }
.court-arguments { display: grid; gap: 10px; }
.court-section, .court-edit {
  padding: clamp(13px, 3vw, 21px);
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--sheet);
}
.court-section h2 { font-size: clamp(19px, 3vw, 23px); color: var(--wine-deep); }
.court-section .prose { margin-top: 5px; }
.court-verdict { background: var(--tint); border-color: var(--line-dark); }
.court-edit { margin-top: 14px; }
.court-edit .filters { margin-block: 8px; }
.court-edit .record-note { margin-bottom: 8px; }
.court-edit .filters button { min-height: 42px; }
.court-follow-up-list { margin: 8px 0 14px; padding-inline-start: 24px; }
.court-follow-up-list .prose { margin-top: 6px; }
[data-court-screen] .field-note { margin: 2px 0 4px; color: var(--subtle); font-size: 13px; }
.court-feedback > .button { margin-top: 9px; }
.court-links { margin-top: 18px; }

@media (min-width: 680px) {
  .court-samples, .court-arguments { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.atlas-reading { width: min(950px, calc(100% - 96px)); max-width: none; }
.atlas-screen :is(p, dd, li) { overflow-wrap: anywhere; }
.atlas-form { display: grid; gap: 24px; }
.atlas-question {
  min-width: 0;
  margin: 0;
  padding: 10px 0 0;
  border: 0;
  border-top: 1px solid var(--line);
}
.atlas-question legend { padding-inline-end: 10px; color: var(--wine-deep); font-weight: 800; }
.atlas-option {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  margin-top: 5px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
}
.atlas-option:has(input:checked) { border-color: var(--wine); background: var(--tint); }
.atlas-option input { accent-color: var(--wine); flex: none; }
.atlas-option:has(input:focus-visible) { outline: 2px solid var(--wine); outline-offset: 2px; }
.atlas-option input:focus-visible { outline: none; }
.atlas-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.atlas-reading > .atlas-grid { margin-block: 16px; }
.atlas-panel, .atlas-perspective {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: clamp(12px, 2.4vw, 24px);
  background: var(--sheet);
}
.atlas-reading > .atlas-panel, .atlas-review { margin-block: 14px; }
.atlas-perspective[data-atlas-view="self"] { border-top: 3px solid var(--wine); }
.atlas-perspective[data-atlas-view="friend"] { border-top: 3px solid #517767; }
.atlas-compare-results .atlas-perspective { margin-top: 12px; }
.atlas-panel > h2, .atlas-perspective > :is(h2, h3) { margin-bottom: 10px; }
.atlas-trait { font-weight: 800; color: var(--wine-deep); }
.atlas-scores { margin-block: 10px 14px; }
.atlas-scores > div, .atlas-difference-list > div {
  display: grid;
  grid-template-columns: minmax(70px, 1fr) minmax(0, 2fr);
  align-items: center;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-block: 6px;
}
.atlas-scores dd { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; }
.atlas-scores meter { width: min(90px, 55%); }
.atlas-scores dt, .atlas-voice dt, .atlas-review dt, .atlas-difference-list dt { font-weight: 750; }
.atlas-voice > div + div, .atlas-review > div + div { margin-top: 9px; }
.atlas-voice dd, .atlas-review dd { color: var(--subtle); }
.atlas-responses { margin: 0; padding-inline-start: 22px; }
.atlas-responses li { padding-block: 5px; }
.atlas-responses span { margin-inline-start: 10px; color: var(--subtle); }
.atlas-screen select { max-width: 100%; }
.atlas-screen button:disabled { opacity: .62; cursor: default; }
.atlas-screen [hidden] { display: none; }
@media (max-width: 680px) {
  .atlas-grid { grid-template-columns: minmax(0, 1fr); }
  .atlas-reading { width: min(950px, calc(100% - 36px)); }
}
.pet-links { margin-block: 16px; }
.pet-personalities { min-width: 0; margin-inline: 0; padding: 0; border: 0; }
.pet-personalities legend { font-size: 17px; font-weight: 800; }
.pet-choices { display: flex; flex-wrap: wrap; column-gap: 17px; }
.pet-diary .page-intro h1, .pet-diary .chapter h2 { overflow-wrap: anywhere; }
.pet-input dd { white-space: pre-wrap; }
.pet-week-date { max-width: 230px; }
.pet-week-date .button { margin-top: 8px; }
.pet-week-section { margin-top: 16px; }
.pet-week-section .record-list { margin-bottom: 18px; }
.pet-diary [hidden] { display: none; }

[data-parallel-life-screen] [hidden] { display: none; }
[data-parallel-life-screen] :is(h1, .prose, .record-entry, button) { overflow-wrap: anywhere; }
.parallel-life-options { display: grid; gap: 9px; margin-block: 16px; }
.parallel-life-options .button { justify-content: space-between; text-align: left; }
.parallel-life-options [data-story] { flex-wrap: wrap; }
.parallel-life-options [data-story] strong { flex-basis: 100%; }
.parallel-life-choices { padding-inline-start: 24px; margin-block: 12px; }
.parallel-life-options .button, .parallel-life-candidates .button { white-space: normal; }
.parallel-life-candidates .button { display: grid; justify-items: start; width: 100%; text-align: left; }
.parallel-life-candidates [aria-pressed="true"] { background: var(--tint); border-color: var(--wine-deep); }
.parallel-life-candidates button:disabled { opacity: .62; cursor: default; }
.parallel-life-compare { max-width: 920px; }
.parallel-life-results { display: grid; gap: 14px; margin-top: 24px; }
.parallel-life-compare-columns { display: grid; gap: 10px; margin-top: 8px; }
.parallel-life-side { min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--sheet); }
.parallel-life-side-title { color: var(--wine-deep); margin-bottom: 6px; }
.parallel-life-side h4 { overflow-wrap: anywhere; }
.parallel-life-side .prose { margin-top: 4px; }
@media (min-width: 680px) {
  .parallel-life-compare-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.mystery-page { max-width: 860px; overflow-wrap: anywhere; }
.mystery-feature, .mystery-summary, .mystery-result {
  margin-block: 20px;
  border-block: 1px solid var(--line-dark);
  padding-block: 17px;
}
.mystery-feature { border-top: 3px double var(--wine); }
.mystery-feature .prose { margin-block: 8px 16px; }
.mystery-edition-status { margin-block: 5px 12px; font-size: 14px; color: var(--subtle); }
.mystery-archive { margin-block: 22px; }
.mystery-archive .record-list { margin-block: 10px 0; }
.mystery-stat-values { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-block: 10px; }
.mystery-stat-values dt { color: var(--subtle); font-size: 14px; }
.mystery-stat-values dd { color: var(--wine-deep); font-size: 20px; font-weight: 800; }
.mystery-source {
  margin-block: 14px 22px;
  border-block: 1px solid var(--line-dark);
  padding: 8px 0 14px;
}
.mystery-source summary { padding-block: 5px; color: var(--wine-deep); cursor: pointer; font-weight: 800; }
.mystery-article, .mystery-notes { padding-top: 14px; }
.mystery-article h2, .mystery-notes h2 { margin-bottom: 8px; font-size: clamp(20px, 3vw, 24px); }
.mystery-notes dl { display: grid; gap: 8px; }
.mystery-notes dl > div, .mystery-solution { padding: 12px; border: 1px solid var(--line); background: var(--sheet); }
.mystery-notes dt, .mystery-result-choices dt { font-weight: 800; color: var(--wine-deep); }
.mystery-notes dd { margin-top: 3px; }
.mystery-form { margin-block: 18px; }
.mystery-form fieldset { margin: 16px 0; min-inline-size: 0; border: 1px solid var(--line); padding: 8px 12px 12px; }
.mystery-form legend { max-width: 100%; padding-inline: 4px; font-weight: 800; }
.mystery-option {
  display: flex; align-items: flex-start; gap: 8px; min-height: 44px;
  padding: 10px 8px; border-radius: 4px; cursor: pointer;
}
.mystery-option:hover, .mystery-option:has(input:checked) { background: var(--tint); }
.mystery-option input { flex: none; margin: 4px 0 0; accent-color: var(--wine); }
.mystery-option span { min-width: 0; }
.mystery-solutions { display: grid; gap: 10px; list-style: none; margin: 12px 0 0; padding: 0; }
.mystery-result-choices { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-block: 8px; }
.mystery-result-choices > div { min-width: 0; }
.mystery-footer { margin-block: 20px; }

.survival { max-width: 850px; }
.survival-grid, .survival-journal { display: grid; gap: 12px; }
.survival-grid { margin-block: 18px 12px; }
.survival-panel {
  min-width: 0;
  padding: clamp(15px, 3vw, 24px);
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--sheet);
}
.survival-panel h2, .survival-archive h2 { font-size: clamp(20px, 3.4vw, 26px); color: var(--wine-deep); }
.survival-panel .prose, .survival-panel > .button { margin-top: 8px; }
.survival .fiction, .survival-feedback, .survival-archive { margin-block: 14px; }
.survival-feedback:has(> :only-child:empty) { margin: 0; }
.survival-feedback > .button { margin: 6px 6px 0 0; }
.survival-feedback .record-note { margin-block: 4px; }
.survival-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding-inline: 0; }
.survival-stats > div { display: block; padding-inline: 10px; }
.survival-stats > div + div { border-top: 0; border-inline-start: 1px solid var(--line); }
.survival-stats dd { font-variant-numeric: tabular-nums; }
.survival-stats dd span { font-size: .85em; color: var(--subtle); }
.survival-choices { display: grid; gap: 8px; margin-block-start: 15px; }
.survival-choices .button { justify-content: start; text-align: start; }
.survival-selected { color: var(--wine-deep); font-weight: 750; margin-block-start: 9px; }
.survival-changes { margin-block-start: 8px; color: var(--subtle); font-size: 14px; }
.survival-ending { margin-block-start: 12px; background: var(--tint); border-color: var(--line-dark); }
.survival-journal .survival-ending { margin: 0; }
.survival-endings { margin: 8px 0 0; padding: 0; list-style: none; }
.survival-endings li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 10px; padding-block: 8px; border-top: 1px solid var(--line); }
.survival-endings span { color: var(--subtle); font-size: 14px; }

@media (min-width: 650px) {
  .survival-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

#fiction-form select {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 9px 12px;
  border: 1px solid var(--line-dark);
  border-radius: 5px;
  background: #fffdf8;
}
#fiction-form select[aria-invalid] { border: 2px solid var(--wine); }
.fiction-reading-note { margin-block: 17px 10px; color: var(--subtle); font-size: 14px; }
.fiction-body {
  padding: clamp(15px, 4vw, 30px);
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--sheet);
}
.fiction-body .prose { margin: 0; }
.fiction-body .prose + .prose { margin-top: 1.2em; }
.fiction-sentence-save {
  display: inline-grid;
  place-items: center;
  min-width: 26px;
  min-height: 26px;
  margin-inline: 4px 1px;
  vertical-align: baseline;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--tint);
  color: var(--wine-deep);
  font-weight: 750;
}
.fiction-sentence-save[data-saved="true"] { background: #eaf0e5; color: #354d3c; }
.fiction-sentence-save[aria-disabled="true"] { opacity: .55; }
.fiction-archive-group { margin-block: 22px; }
.fiction-archive-group > .record-note { margin-top: 8px; }
.fiction-saved-item { padding-block: 10px; overflow-wrap: anywhere; border-bottom: 1px solid var(--line); }
.fiction-saved-item .button { margin-top: 7px; }
[data-fiction-reading] [hidden] { display: none; }

.world-registry h1 { overflow-wrap: anywhere; }
.world-registry [hidden] { display: none; }
.world-section { margin-block: 24px; }
.world-section h2 { margin-bottom: 8px; }
.world-affiliations {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 175px), 1fr));
  gap: 12px;
  margin-top: 12px;
}
.world-affiliations > div {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--sheet);
}
.world-affiliations dt { color: var(--wine-deep); font-weight: 800; }
.world-affiliations dd { margin-top: 5px; }
.world-card { max-width: 520px; }
.world-growth {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  max-width: 360px;
  margin-block: 14px;
}
.world-growth > div {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--sheet);
}
.world-growth dt { color: var(--wine-deep); font-size: 13px; }
.world-growth dd { font-size: 18px; font-weight: 800; }
.world-options { display: grid; gap: 9px; margin-top: 16px; }
.world-options .button { justify-content: flex-start; text-align: left; white-space: normal; }
.world-options .button span { flex: none; color: var(--wine-deep); font-weight: 800; }
.world-honor { margin-block: 12px; }
.world-chronicle { margin-top: 14px; padding-inline-start: 22px; }
.world-chronicle li { padding: 12px 0; overflow-wrap: anywhere; }
.world-chronicle li + li { border-top: 1px solid var(--line); }

[data-action="taste-cancel-save"][hidden] { display: none; }

.taste-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.taste-reading {
  overflow-wrap: anywhere;
}
.taste-topics,
.taste-options {
  margin-block-start: 14px;
}
.taste-panel {
  margin-block-start: 20px;
}
.taste-panel h3 {
  margin-block-start: 14px;
}
.taste-panel .record-note,
.taste-panel .prose {
  margin-block-start: 6px;
}
.taste-progress {
  color: var(--wine);
  font-weight: 800;
}
.taste-choice {
  display: grid;
  gap: 6px;
  align-content: start;
  min-height: 110px;
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line-dark);
  border-radius: 12px;
  background: var(--sheet);
  text-align: start;
}
.taste-choice strong { font-size: 1.125rem; }
.taste-choice span { color: var(--subtle); }
.taste-choice:hover,
.taste-choice[aria-pressed="true"] { border-color: var(--wine); }
.taste-choice[aria-pressed="true"] {
  background: var(--tint);
  box-shadow: inset 0 0 0 1px var(--wine);
}
.taste-choice[aria-pressed="true"] strong { color: var(--wine-deep); }
.taste-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
  padding: 0;
  list-style: none;
}
.taste-counts li {
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--tint);
}
.taste-match-list {
  display: grid;
  gap: 8px;
  padding-inline-start: 1.55rem;
}
.taste-match-list li {
  padding-block: 6px;
  border-bottom: 1px solid var(--line);
}
.taste-match-list li > * { display: block; }
.taste-evidence { padding-inline-start: 1.2rem; }
.taste-comparison-side { min-width: 0; }
.taste-reading .form-field { min-width: 0; }
.taste-reading .form-field select { width: 100%; min-width: 0; }

@media (max-width: 560px) {
  .taste-grid { grid-template-columns: minmax(0, 1fr); }
  .taste-choice { min-height: 72px; padding: 12px 14px; }
}

.habit-roast-choices { min-width: 0; margin: 0; padding: 0; border: 0; }
.habit-roast-choices + .habit-roast-choices { margin-top: 20px; }
.habit-roast-choices legend { margin-bottom: 8px; padding: 0; font-weight: 800; }
.habit-roast-options { display: flex; flex-wrap: wrap; gap: 8px; }
.habit-roast-option {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 8px 13px;
  border: 1px solid var(--line-dark);
  border-radius: 6px;
  background: var(--sheet);
  cursor: pointer;
}
.habit-roast-option input { margin: 0; accent-color: var(--wine); }
.habit-roast-option:has(input:checked), .habit-roast-toggle[aria-pressed="true"] {
  border-color: var(--wine);
  background: var(--tint);
  color: var(--wine-deep);
}
.habit-roast-option:has(input:focus-visible) { outline: 2px solid var(--wine); outline-offset: 3px; }
.habit-roast-lines { margin: 12px 0 20px; padding: 0; list-style: none; }
.habit-roast-lines li {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.habit-roast-lines li:last-child { border-bottom: 1px solid var(--line); }
.habit-roast-lines .prose { flex: 1 1 260px; }
.habit-roast-card {
  padding: clamp(14px, 4vw, 23px);
  border: 1px solid var(--line);
  border-inline-start: 4px solid var(--wine);
  border-radius: 6px;
  background: var(--tint);
}
.habit-roast-card h2 { font-size: 21px; }
.habit-roast-card .habit-roast-toggle, .habit-roast-card .habit-roast-empathy-mark { margin-top: 10px; }
.habit-roast-empathy-mark { display: inline-block; color: var(--wine-deep); font-size: 14px; font-weight: 800; }
.habit-roast-report [hidden] { display: none; }

.balance-reading { max-width: 820px; overflow-wrap: anywhere; }
.balance-reading [hidden] { display: none; }
.balance-flow, .balance-options, .balance-stories, .balance-compare-controls, .balance-compare-columns { display: grid; gap: 12px; min-width: 0; }
.balance-flow .story-actions, .balance-flow .record-note { margin-block: 0; }
.balance-options { margin: 0; padding: 0; border: 0; }
.balance-options legend { padding: 0; margin-bottom: 10px; font-weight: 750; }
.balance-option { min-height: 52px; }
.balance-option small { display: block; margin-top: 2px; color: var(--subtle); }
.balance-option input { flex: none; }
.balance-reading .balance-answers, .balance-reading .balance-save, .balance-reading .balance-compare { margin-top: 20px; }
.balance-stories h3, .balance-compare h3, .balance-match-label { color: var(--wine-deep); }
.balance-answer-list { display: grid; gap: 8px; margin: 0; padding-inline-start: 24px; }
.balance-answer-list > li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.balance-answer-list > li:last-child { border-bottom: 0; }
.balance-answer-list > li > p { margin: 0 0 4px; }
.balance-compare-controls .button { justify-self: start; align-self: end; }
.balance-compare-controls select { width: 100%; min-width: 0; text-overflow: ellipsis; }
.balance-compare-columns > * { min-width: 0; }
.balance-compare-columns dt, .balance-match-label { font-size: 14px; font-weight: 750; }
.balance-compare-columns dd { margin: 0; }

@media (min-width: 680px) {
  .balance-compare-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .balance-compare-controls { grid-template-columns: minmax(0, 1fr) auto; }
}

.newspaper { max-width: 860px; }
.newspaper [hidden] { display: none; }
.newspaper-date-field { width: min(100%, 238px); }
.newspaper-actions { margin-block: 16px; }
.newspaper-article {
  margin-block: 12px 22px;
  padding: clamp(17px, 4vw, 43px);
  background: #fffaf0;
  border: 1px solid var(--line-dark);
  box-shadow: 0 9px 25px #4b30200c;
}
.newspaper-masthead {
  border-block: 4px double var(--ink);
  padding-block: 12px;
  margin-bottom: 18px;
}
.newspaper-name {
  font-family: Georgia, "AppleMyungjo", "Noto Serif CJK KR", serif;
  font-size: clamp(28px, 6vw, 52px);
  font-weight: 900;
  letter-spacing: -.06em;
  line-height: 1.2;
}
.newspaper-date {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 14px;
  margin-top: 10px;
  color: var(--wine-deep);
  font-size: 14px;
  font-weight: 750;
}
.newspaper-article :is(h1, h2, h3) {
  font-family: Georgia, "AppleMyungjo", "Noto Serif CJK KR", serif;
  letter-spacing: -.045em;
}
.newspaper-headline { font-size: clamp(27px, 5vw, 45px); }
.newspaper-section { border-top: 1px solid var(--line-dark); margin-top: 20px; padding-top: 16px; }
.newspaper-section :is(h2, h3) { font-size: clamp(20px, 3vw, 27px); }
.newspaper-article .fiction { margin: 23px 0 0; }
.newspaper-article .fiction span:last-child { min-width: 0; overflow-wrap: anywhere; }
.newspaper-week-controls { display: flex; flex-wrap: wrap; align-items: end; gap: 8px; }
.newspaper-week-controls .form-field { flex-basis: 194px; max-width: 100%; min-width: 0; }
.newspaper-week-controls .button { min-height: 48px; }
.newspaper-week-range { margin-block: 16px; }
.record-list:has(> li > .record-entry > [data-newspaper-text]) { grid-template-columns: minmax(0, 1fr); }
.newspaper-example { margin-block: 12px; }
.newspaper-example summary {
  cursor: pointer;
  padding: 12px 16px;
  min-height: 46px;
  background: var(--sheet);
  border: 1px solid var(--line-dark);
  border-radius: 6px;
  overflow-wrap: anywhere;
}
.newspaper-example summary:hover { background: var(--tint); }

.memory-entrance { margin-top: 0; }
[data-memory-screen] [hidden] { display: none; }
.memory-exhibit dd { min-width: 0; overflow-wrap: anywhere; }
.memory-exhibit .chapter:last-child { padding-bottom: 0; }
.memory-exhibit .chapter h3 { font-size: 22px; }
.memory-examples { display: grid; gap: 26px; }
.memory-examples h2 { margin: 8px 0 12px; }
.memory-filter { margin-top: 14px; }
.memory-filter > .button { margin-top: 14px; }
.memory-anniversary:not([hidden]) {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.memory-anniversary .form-field + .form-field { margin-top: 0; }

.dialogue-log { margin: 1.4rem 0; }
.dialogue-question { border-left: 3px solid var(--wine); padding: 0.3rem 0.9rem; color: var(--wine-deep); white-space: pre-wrap; overflow-wrap: anywhere; }
.dialogue-text { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.8; }
.dialogue-turn h2 { margin-top: 1rem; }
.dialogue-selectors { display: grid; gap: 0.8rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); }
.dialogue-selectors select { min-width: 0; width: 100%; }

.dialogue-atlas { width: min(1180px, calc(100% - 80px)); max-width: none; }
.map-back { background: none; border: 0; padding: 0; }
.map-intro { display: flex; justify-content: space-between; align-items: end; flex-wrap: wrap; gap: 12px 30px; margin: 14px 0 22px; }
.map-intro h1 { font-size: clamp(36px, 6vw, 57px); }
.map-stats { color: var(--subtle); font-size: 14px; }
.map-board { border: 1px solid var(--line-dark); border-radius: 13px; overflow: hidden; }
.map-board-head { display: flex; align-items: center; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; padding: 13px 20px; background: var(--wine-deep); color: var(--sheet); }
.map-board-head h2 { font-size: 17px; }
.map-board-head button { min-height: 36px; padding: 4px 10px; color: inherit; background: transparent; border: 1px solid #b79898; border-radius: 5px; }
.map-canvas { overflow: auto; max-height: min(65vh, 660px); padding: 22px; background: radial-gradient(#d4c4b5 0.85px, transparent 1px) 0 0 / 13px 13px, var(--sheet); }
.map-canvas:focus-visible { outline-offset: -4px; }
.map-tree, .map-tree ul, .map-scenes { list-style: none; margin: 0; padding: 0; }
.map-tree { --stem: 18px; --thread: #a38179; display: flex; width: max-content; min-height: 145px; align-items: center; }
.map-tree li, .map-tree ul { position: relative; }
.map-tree li { display: flex; align-items: center; padding-block: 8px; }
.map-tree li > ul { padding-left: calc(2 * var(--stem)); }
.map-tree li > ul::before, .map-tree ul > li::before, .map-tree ul > li::after { content: ""; position: absolute; pointer-events: none; }
.map-tree li > ul::before { left: 0; top: 50%; width: var(--stem); border-top: 1.5px solid var(--thread); }
.map-tree ul > li::before { left: calc(-1 * var(--stem)); top: 0; bottom: 0; border-left: 1.5px solid var(--thread); }
.map-tree ul > li:first-child::before { top: 50%; }
.map-tree ul > li:last-child::before { bottom: 50%; }
.map-tree ul > li::after { left: calc(-1 * var(--stem)); width: var(--stem); top: 50%; border-top: 1.5px solid var(--thread); }
.map-node-group { display: flex; align-items: center; background: var(--sheet); border: 1px solid var(--line-dark); border-radius: 7px; width: 206px; box-shadow: 0 2px 3px #5126310b; }
.map-node-group:has(.map-node[aria-pressed="true"]) { background: var(--wine-deep); border-color: var(--wine-deep); color: var(--sheet); }
.map-node, .map-fold { border: 0; background: transparent; color: inherit; }
.map-node { flex: 1; min-width: 0; text-align: left; padding: 13px; }
.map-node-top { display: flex; align-items: center; gap: 5px; font-size: 12px; line-height: 1.4; color: var(--subtle); overflow-wrap: anywhere; }
.map-node-dot { flex: none; width: 7px; height: 7px; border: 1px solid currentColor; border-radius: 50%; }
.map-node[aria-current] .map-node-dot { background: currentColor; }
.map-node-status { margin-left: auto; white-space: nowrap; font-size: 10px; font-weight: 800; }
.map-node[aria-pressed="true"] .map-node-top { color: #f5d9d8; }
.map-node strong, .map-scene strong { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; }
.map-node strong { margin-top: 7px; font-size: 15px; line-height: 1.5; }
.map-fold { flex: none; min-height: 44px; width: 32px; border-left: 1px solid var(--line-dark); font-size: 18px; line-height: 1; }
.map-node:focus-visible, .map-fold:focus-visible { outline: 3px double currentColor; outline-offset: -4px; border-radius: 6px; }
.map-branch-bar { padding: 23px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.map-branch-bar h2 { font-size: clamp(22px, 3vw, 30px); }
.map-branch-bar > p, .map-detail > p { margin-top: 8px; }
.map-caption, .map-results-count, .map-scene-date, .map-scene small { color: var(--subtle); font-size: 13px; }
.map-caption { display: block; margin-bottom: 5px; font-weight: 700; }
.map-tools, .map-rename { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.map-tools .button, .map-rename .button { min-height: 40px; font-size: 14px; }
.map-tools select { min-width: 0; max-width: 100%; min-height: 40px; font: inherit; border: 1px solid var(--line-dark); border-radius: 5px; background: var(--sheet); }
.map-branch-bar > button { margin-top: 10px; }
.dialogue-origin { margin: 16px 0; color: var(--subtle); }
.dialogue-origin summary { cursor: pointer; width: fit-content; font-weight: 700; }
.dialogue-origin p { margin-top: 8px; }
.map-rename input, .map-search input[type="search"] { min-width: 0; max-width: 100%; padding: 8px 10px; background: var(--sheet); border: 1px solid var(--line-dark); border-radius: 5px; }
.map-rename input { width: 15rem; }
.map-workspace { display: grid; grid-template-columns: minmax(230px, 1fr) minmax(0, 1.75fr); gap: clamp(22px, 4vw, 58px); align-items: start; margin: 26px 0; }
.map-search h2 { margin-bottom: 12px; font-size: 22px; }
.map-search label { display: block; margin-block: 7px; }
.map-search input[type="search"] { display: block; width: 100%; min-height: 44px; }
.map-search input[type="checkbox"] { accent-color: var(--wine); }
.map-scenes { margin-top: 7px; border-top: 1px solid var(--line); max-height: 380px; overflow-y: auto; }
.map-scene { display: block; width: 100%; padding: 8px 12px; text-align: left; border: 0; border-bottom: 1px solid var(--line); border-left: 3px solid transparent; background: none; }
.map-scene[aria-pressed="true"] { background: var(--tint); border-left-color: var(--wine); }
.map-scene:focus-visible { outline-offset: -3px; }
.map-scene strong { font-size: 14px; font-weight: 750; }
.map-scene small { display: block; overflow-wrap: anywhere; }
.map-detail { min-width: 0; padding: 21px clamp(16px, 3vw, 32px); border: 1px solid var(--line); background: var(--sheet); border-radius: 8px; overflow-wrap: anywhere; }
.map-detail h2 { font-size: 25px; }
.map-detail .dialogue-question { margin: 16px 0 10px; }
.map-detail .dialogue-text { line-height: 1.85; }
.map-detail h2:focus-visible, .map-branch-bar h2:focus-visible { outline: 2px solid var(--wine); outline-offset: 3px; }
.map-entry { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 18px; padding: 12px 16px; margin-block: 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--sheet); }
.map-entry .map-stats { margin: 0; }
@media (max-width: 700px) {
  .dialogue-atlas { width: calc(100% - 32px); }
  .map-intro { display: block; }
  .map-intro .map-stats { margin-top: 8px; }
  .map-workspace { grid-template-columns: minmax(0, 1fr); }
  .map-canvas { padding: 15px; max-height: 50vh; }
  .map-tree { --stem: 14px; display: block; min-height: 0; }
  .map-tree li { display: block; padding-block: 4px; }
  .map-tree li > ul { padding-left: calc(2 * var(--stem)); }
  .map-tree li > ul::before { display: none; }
  .map-tree ul > li::before, .map-tree ul > li:first-child::before { top: -4px; }
  .map-tree ul > li:last-child::before { bottom: auto; height: 32px; }
  .map-tree ul > li::after { top: 27px; }
  .map-node-group { width: 213px; }
  .map-scenes { max-height: 250px; }
}
