:root {
  color-scheme: dark;
  --bg: #16111c;
  --surface: #241a2c;
  --surface-strong: #302139;
  --line: #52425b;
  --text: #faf3eb;
  --muted: #d0bfce;
  --accent: #f1c5a4;
  --button: #efc4a4;
  --button-ink: #201324;
  --focus: #eac3fc;
  font: 1rem/1.6 system-ui, sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); }
button, input, select { font: inherit; }
a { color: var(--accent); text-underline-offset: .24em; }
a:hover { color: #fff1e4; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
h1, h2 { font-family: Georgia, serif; font-weight: 400; line-height: 1.1; }
h1 { font-size: clamp(2.3rem, 6vw, 4.25rem); }
h2 { font-size: clamp(1.7rem, 4vw, 2.5rem); }
h3 { font-size: 1.15rem; line-height: 1.25; }
p + p { margin-top: .65rem; }
main > p { margin-top: 1.25rem; }
.frame { max-width: 72rem; width: calc(100% - 3rem); margin-inline: auto; }
.narrow { max-width: 44rem; }
.site-header { border-bottom: 1px solid var(--line); }
.topbar { min-height: 4.75rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.topbar nav, .site-footer { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem 1.45rem; }
.brand { font: 1.35rem Georgia, serif; color: var(--text); text-decoration: none; white-space: nowrap; }
.brand span { color: var(--accent); margin-right: .45rem; }
.topbar nav a, .site-footer { font-size: .9rem; }
.site-footer { margin-top: 4.5rem; padding: 1.5rem 0 2.3rem; border-top: 1px solid var(--line); color: var(--muted); }
.notices { margin-top: 1rem; }
.notice { padding: .85rem 1rem; border: 1px solid var(--line); border-radius: .55rem; background: var(--surface); }
.notice.error, .errorlist { color: #ffd2cb; }
.errorlist { margin: .25rem 0; padding-left: 1.2rem; }
.muted { color: var(--muted); }

.storefront { background: radial-gradient(ellipse 60% 34rem at 70% -6rem, #35213e, transparent 75%), var(--bg); }
.hero { position: relative; isolation: isolate; min-height: 23rem; display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 2rem; border-bottom: 1px solid var(--line); }
.hero-copy { padding-block: 3.25rem; }
.hero h1 { font-size: clamp(3.25rem, 7.8vw, 6.5rem); letter-spacing: -.045em; }
.hero p { max-width: 27rem; margin-top: 1.25rem; color: var(--muted); }
.tarot-emblem { display: grid; place-items: center; height: 100%; overflow: hidden; }
.emblem-orbit { width: min(20rem, 34vw); aspect-ratio: 1; display: grid; place-items: center; border: 1px solid #8a688a; border-radius: 50%; background: radial-gradient(circle, #684465 0%, #38233f 49%, transparent 70%); box-shadow: 0 0 0 1.7rem #37264144, 0 0 0 1.8rem #61466566; }
.emblem-orbit span { font: clamp(4rem, 9vw, 8rem)/1 Georgia, serif; color: var(--accent); }
.catalog-section { padding-top: 2.2rem; }
.offers { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: 1rem; margin-top: 1.2rem; }
.offer, .panel { padding: clamp(1.1rem, 3vw, 1.65rem); border: 1px solid var(--line); border-radius: .7rem; background: var(--surface); }
.offer { display: flex; flex-direction: column; gap: .6rem; }
.offer p { margin: 0; }
.offer h3 { min-height: 2.5em; }
.offer .button { align-self: flex-start; margin-top: auto; }
.turnaround { font-size: .9rem; }
.price { color: var(--accent); font: 2rem/1.3 Georgia, serif; }
.price small { font: .88rem system-ui, sans-serif; }
.quantity-row { display: flex; align-items: center; gap: .75rem; }
.quantity-row input { width: 6rem; }
.quantity-row output { font-weight: 650; }
.package-note { font-size: .85rem; }
.catalog-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .7rem 1rem; margin-top: 1.4rem; }

.button { display: inline-flex; align-items: center; justify-content: center; min-height: 2.85rem; padding: .55rem 1rem; border: 1px solid transparent; border-radius: .4rem; background: var(--button); color: var(--button-ink); cursor: pointer; font-weight: 650; line-height: 1.3; text-align: center; text-decoration: none; }
.button:hover { background: #ffdbbd; color: var(--button-ink); }
.button.secondary { border-color: var(--line); background: var(--surface-strong); color: var(--text); }
.button.secondary:hover { border-color: var(--accent); }
.page-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin: 3rem 0 1.65rem; }
.status { display: inline-block; border: 1px solid #806784; border-radius: 2rem; padding: .3rem .85rem; background: var(--surface-strong); font-size: .9rem; }
.line-items { list-style: none; margin: 0; padding: 0; }
.line-items li { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding-block: .85rem; border-bottom: 1px solid var(--line); }
.line-items li:first-child { padding-top: 0; }
.line-items li:last-child { border-bottom: 0; padding-bottom: 0; }
.line-items small { display: block; color: var(--muted); }
.line-items b, dd { white-space: nowrap; }
.totals { padding-top: 1rem; margin: 1rem 0 0; border-top: 1px solid var(--line); }
.totals div { display: flex; justify-content: space-between; gap: 1rem; }
.totals dd { margin: 0; }
.totals .total { align-items: baseline; margin-top: .5rem; font-size: 1.1rem; }
.total dd { font: clamp(1.8rem, 5vw, 2.9rem)/1.15 Georgia, serif; color: var(--accent); }
.checkout-actions, .section-gap { margin-top: 1.15rem; }
.checkout-actions .actions { margin-top: .75rem; }
.checkline { display: flex; align-items: baseline; gap: .55rem; margin-bottom: .75rem; }
.checkline input { accent-color: var(--button); }
.actions, .share-row { display: flex; flex-wrap: wrap; align-items: center; gap: .7rem 1rem; }
.stacked { display: grid; justify-items: start; gap: 1rem; }
.stacked > div, .item-fields > div { width: 100%; }
.stacked label { display: block; margin-bottom: .25rem; }
input:not([type=checkbox]), select { max-width: 100%; min-height: 2.8rem; padding: .45rem .6rem; border: 1px solid var(--line); border-radius: .35rem; background: var(--bg); color: var(--text); }
.item-fields { display: grid; grid-template-columns: 1fr minmax(8rem, 22%); gap: .8rem; margin-bottom: .7rem; }
.item-fields input, .item-fields select { width: 100%; }
.share-row { margin-top: .8rem; }
.share-row input { flex: 1 1 16rem; }
.copy-note { margin-block: .45rem .15rem; }
details summary { cursor: pointer; font-weight: 650; }
.panel h2 + ul { margin-top: 1rem; }
.simulation .actions { margin-top: 1.2rem; }
.staff-periods { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; margin: .85rem 0 0; }
.staff-periods > div { min-width: 0; padding: .55rem .7rem; background: var(--bg); border: 1px solid var(--line); border-radius: .3rem; }
.staff-periods dt { color: var(--muted); font-size: .88rem; }
.staff-periods dd { margin: 0; white-space: normal; overflow-wrap: anywhere; font-weight: 650; font-variant-numeric: tabular-nums; }
.staff-simulation { margin-top: .8rem; }
.staff-order-meta { display: flex; flex-wrap: wrap; gap: .12rem .8rem; margin-block: .3rem; color: var(--muted); font-size: .87rem; }
.staff-order-meta span { overflow-wrap: anywhere; }
.staff-history > li > div { min-width: 0; }
.staff-history b { white-space: normal; text-align: end; overflow-wrap: anywhere; }
@media (min-width: 47rem) { .staff-periods { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

@media (max-width: 38rem) {
  .frame { width: calc(100% - 2rem); }
  .topbar { min-height: 4rem; }
  .brand { font-size: 1.16rem; }
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .hero-copy { padding-block: 2.5rem; padding-right: 1rem; }
  .hero p { max-width: 18rem; }
  .tarot-emblem { position: absolute; right: 0; width: 33%; opacity: .48; z-index: -1; }
  .emblem-orbit { width: 76%; }
  .offer h3 { min-height: auto; }
  .item-fields { grid-template-columns: minmax(0, 1fr) minmax(6.6rem, 24%); }
  .page-top { margin: 2rem 0 1.25rem; }
}
