/* Opt-in shell for the independent reading routes. The tarot master keeps its own shell. */
.nr4-body .nr4-celestial {
  --nr-celestial-art: url("../tarot-formal/celestial/sanctuary.webp");
  --nr-celestial-divider: url("../tarot-formal/celestial/divider.webp");
  --celestial-serif: "Yu Mincho","Hiragino Mincho ProN","Noto Serif CJK JP","Noto Serif JP",serif;
  --nr-serif: var(--celestial-serif);
  --nr-gutter: clamp(17px,5vw,36px);
  --nr-fine-rule: #cda2698c;
  --nr-heading: #593415;
  --nr-ink: #39281f;
  --nr-section-gap: 26px;
  --nr-paragraph-gap: 12px;
  position: relative;
  isolation: isolate;
  width: min(100%,48rem);
  min-height: 100svh;
  margin: 0 auto;
  padding: 0 0 clamp(24px,7vw,46px);
  background:
    linear-gradient(#fff8eb15,#fff8eb58 22%,#fff8ecd9 66%,#fff8eb 100%) center top / 100% min(150vw,72rem) no-repeat,
    var(--nr-celestial-art) center top / 100% auto no-repeat,
    linear-gradient(#fff8eb 70%,#f8ecd8);
  box-shadow: 0 13px 65px #78522719;
  font-family: var(--celestial-serif);
  color: var(--nr-ink);
}
.nr4-celestial::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 7px;
  border: 1px solid var(--nr-fine-rule);
  pointer-events: none;
  background:
    url("../tarot-formal/celestial/corner-bottom.webp") left bottom / clamp(21px,6vw,38px) auto no-repeat,
    url("../tarot-formal/celestial/corner-bottom-right.webp") right bottom / clamp(21px,6vw,38px) auto no-repeat;
}
.nr4-celestial .nr4-celestial-mast {
  grid-template-columns: minmax(0,1fr);
  padding: 9px 12px 8px;
}
.nr4-celestial-mast a { text-align: center; color: inherit; text-decoration: none; }
.nr4-celestial .nr4-hero {
  margin: 16px var(--nr-gutter) 10px;
  max-width: none;
}
.nr4-celestial .nr4-hero img {
  aspect-ratio: 2.15;
  object-position: center 48%;
  border: 1px solid #ab844f;
  border-radius: 5px;
  box-shadow: 0 6px 16px #78522726;
}
.nr4-celestial .nr4-hero h1 {
  margin: 4px 0;
  color: var(--nr-heading);
  font: 700 clamp(22px,6vw,36px)/1.25 var(--celestial-serif);
  text-wrap: balance;
}
.nr4-celestial .nr4-hero > p:last-child {
  max-width: 37ch;
  margin: 8px auto 0;
  font-size: 13px;
  line-height: 1.7;
}
.nr4-celestial:is([data-stage="question"],[data-stage="result"],[data-stage="reveal"]) .nr4-hero { display: none; }
.nr4-celestial #nr4-reading {
  width: 100%;
  min-width: 0;
  max-width: none;
  padding: 18px var(--nr-gutter) 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: none;
}
.nr4-celestial .nr4-ending.nr-edition {
  background: none;
  border: 0;
  padding: 0;
  max-width: none;
}
.nr4-celestial .nr4-progress-label { text-align: center; }
.nr4-celestial #nr4-reading > h2 {
  max-width: 27ch;
  margin: 0 auto 14px;
  color: var(--nr-heading);
  font: 700 clamp(22px,5.5vw,30px)/1.36 var(--celestial-serif);
  text-wrap: balance;
}
.nr4-celestial .nr4-form { gap: 12px; }
.nr4-celestial .nr4-field-control {
  padding-inline: 10px;
  border-color: #ab8b5b;
  border-radius: 4px;
  background: #fffaf1;
}
.nr4-celestial input[type=date],
.nr4-celestial input[type=date]::-webkit-date-and-time-value {
  min-width: 0;
  text-align: center;
}
.nr4-celestial input[type=date]::-webkit-datetime-edit {
  flex: 1;
  width: 100%;
  text-align: center;
}
.nr4-celestial .nr4-option,
.nr4-celestial .nr4-secondary {
  min-height: 48px;
  border: 1px solid #a78960;
  border-radius: 4px;
  background: #fff9ef;
  color: #4d3423;
  text-align: center;
}
.nr4-celestial .nr4-option[aria-pressed="true"] {
  border-color: #917044;
  background: #f1dfbb;
  box-shadow: inset 0 0 0 1px #b08b55;
}
.nr4-celestial .nr4-primary {
  border: 1px solid #b28b50;
  border-radius: 4px;
  background: #775135;
  color: #fffaf1;
}
@media (hover:hover) and (pointer:fine) {
  .nr4-celestial .nr4-option[aria-pressed="false"]:hover {
    outline: 1px solid #a78960;
    outline-offset: -2px;
  }
}
.nr4-celestial-lead { text-align: center; margin: 0 auto 25px; }
.nr4-celestial-lead::after,
.nr4-celestial .nr-reading-heading::after {
  content: "";
  display: block;
  width: min(100%,21rem);
  height: clamp(17px,5vw,28px);
  margin: 5px auto 0;
  background: var(--nr-celestial-divider) center / 100% 100% no-repeat;
}
.nr4-celestial-lead .nr4-result-title {
  max-width: 25ch;
  margin: 6px auto 0;
  color: var(--nr-heading);
  font: 700 clamp(22px,6vw,36px)/1.35 var(--celestial-serif);
  text-wrap: balance;
}
.nr4-body .nr4-celestial .nr4-chapter {
  padding: 0;
  border: 0;
}
.nr4-celestial .nr-reading-heading { gap: 4px; margin-bottom: 9px; }
.nr4-celestial .nr-reading-kicker { color: #795430; }
.nr4-celestial .nr-reading-symbol { color: #9c753e; }
.nr4-celestial .nr4-chapters { max-width: 39rem; margin: auto; }
.nr4-celestial .nr4-calculation { max-width: 39rem; margin: 20px auto 30px; }
.nr4-celestial .nr-formal-luna .nr-reading-paragraph {
  margin: 0 0 8px;
  font-size: var(--nr-reading-size);
  line-height: 1.82;
  letter-spacing: .02em;
  text-wrap: pretty;
}
.nr4-celestial .nr-formal-luna .nr-reading-paragraph:last-child { margin-bottom: 0; }
.nr4-celestial .nr4-graph { background: #fffaf1c7; border-color: #b48b57; }
.nr4-celestial .nr-formal-closing { padding-inline: 0; }

/* Move the existing daily form and result components into the same reading shell. */
.nr4-celestial #nr4-daily {
  width: 100%;
  min-width: 0;
  padding: 12px var(--nr-gutter) 0;
}
.nr4-celestial #nr4-daily :is(.nr-edition,.nr-luna-numbers) {
  max-width: none;
  margin: 0 auto;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: none;
}
.nr4-celestial #nr4-daily :is(.nr-edition-body,.nr-luna-essay,#nr-luna-form) { padding: 0; }
.nr4-celestial #nr4-daily :is(.nr-edition-cover,.nr-luna-cover) { display: none; }
.nr4-celestial #nr4-daily :is(.nr-edition-result-body,.nr-luna-number-note) {
  border: 0;
  border-radius: 0;
  background: none;
  padding: 0;
}
.nr4-celestial #nr4-daily :is(.nr-edition-result-head,.nr-luna-reading-cover) {
  padding: 16px 0 0;
  margin: 0 auto 22px;
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--nr-heading);
  text-align: center;
}
.nr4-celestial #nr4-daily :is(.nr-edition-result-head,.nr-luna-reading-cover)::before { content: none; }
.nr4-celestial #nr4-daily :is(.nr-edition-result-head,.nr-luna-reading-cover)::after {
  content: "";
  display: block;
  width: min(100%,21rem);
  height: clamp(17px,5vw,28px);
  margin: 6px auto 0;
  background: var(--nr-celestial-divider) center / 100% 100% no-repeat;
}
.nr4-celestial #nr4-daily :is(.nr-edition-result-head h3,.nr-luna-reading-title) {
  margin: 4px auto 8px;
  text-align: center;
  color: var(--nr-heading);
  font: 700 clamp(22px,6vw,36px)/1.35 var(--celestial-serif);
}
.nr4-celestial #nr4-daily :is(.nr-luna-label,.nr-edition-result-head p,.nr-luna-reading-meta) { color: #795430; }
.nr4-celestial #nr4-daily .nr-luna-number-note { margin: 0 0 24px; }
.nr4-celestial #nr4-daily .nr-editorial-section { padding-inline: 0; }
.nr4-celestial #nr4-daily :is(.nr-edition-chapter,.nr-luna-reading-section) + :is(.nr-edition-chapter,.nr-luna-reading-section) { border: 0; }
.nr4-celestial #nr4-daily .nr-edition-input :is(label,select) { color: var(--nr-heading); }
.nr4-celestial #nr4-daily :is(.nr-edition-action,.nr-luna-submit) {
  border: 1px solid #b28b50;
  border-radius: 4px;
  background: #775135;
  color: #fffaf1;
}
.nr4-celestial #nr4-daily .nr-luna-date-display { justify-content: center; }
.nr4-celestial #nr4-daily .nr-luna-date-display::after { position: absolute; inset-inline-end: 12px; }
.nr4-celestial #nr4-daily #nr-luna-birth::-webkit-date-and-time-value { text-align: center; }
.nr4-celestial #nr4-daily .nr-luna-choices span { background: #fff9ef; border-color: #a78960; }
.nr4-celestial #nr4-daily .nr-luna-choices input:checked + span { background: #f1dfbb; color: #4d3423; border-color: #917044; }
.nr4-celestial .nr-common-ending .nr-formal-luna {
  position: relative;
  isolation: isolate;
  border: 1px solid #bc965a;
  border-radius: .51rem;
  background: radial-gradient(ellipse at 50% 45%,#fffdf7,#f9edda);
  box-shadow: inset 0 0 0 2px #fff5df,inset 0 0 0 3px #d4aa6e8f;
}

.nr4-celestial .nr4-field-control {
  height: 48px;
  box-sizing: border-box;
  align-items: center;
}
.nr4-celestial .nr4-field-control select {
  -webkit-appearance: none;
  appearance: none;
  border: 0;
  border-radius: 0;
  padding-inline: 18px;
  background: linear-gradient(45deg, transparent 50%, #8d6938 50%) right 6px center / 5px 5px no-repeat,
    linear-gradient(135deg, #8d6938 50%, transparent 50%) right 1px center / 5px 5px no-repeat;
  text-align: center;
  text-align-last: center;
  line-height: normal;
}
.nr4-celestial .nr4-temporal { position: relative; }
.nr4-celestial .nr4-temporal input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
}
.nr4-celestial .nr4-temporal input::-webkit-calendar-picker-indicator {
  position: absolute;
  inset: 0;
  width: auto;
  height: auto;
  margin: 0;
}
.nr4-celestial .nr4-temporal-display {
  display: grid;
  height: 100%;
  place-items: center;
  text-align: center;
  line-height: 1.3;
  font-size: 16px;
  pointer-events: none;
}
.nr4-celestial #nr4-daily .nr-luna-date {
  height: 48px;
  border-color: #ab8b5b;
  border-radius: 4px;
}
.nr4-celestial #nr4-daily .nr-luna-date-display {
  display: grid;
  place-items: center;
  height: 100%;
  font-size: 16px;
  line-height: 1.3;
}
