:root {
  --cosmic-bg: #07090d;
  --cosmic-panel: #10151a;
  --cosmic-ink: #fff8eb;
  --cosmic-muted: rgba(255, 248, 235, .68);
  --cosmic-faint: rgba(255, 248, 235, .12);
  --cosmic-line: rgba(255, 248, 235, .18);
  --cosmic-gold: #d7ad63;
  --cosmic-blue: #65c8ff;
  --cosmic-display: Georgia, "Times New Roman", "Noto Serif SC", "Songti SC", serif;
  --cosmic-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --cosmic-mono: "SFMono-Regular", Consolas, "Liberation Mono", "Noto Sans Mono", monospace;
}

* {
  box-sizing: border-box;
}

body.cosmic-body {
  margin: 0;
  background:
    radial-gradient(circle at 80% 10%, rgba(215, 173, 99, .18), transparent 34rem),
    radial-gradient(circle at 18% 32%, rgba(101, 200, 255, .11), transparent 30rem),
    linear-gradient(180deg, #080b10 0%, #050609 100%);
  color: var(--cosmic-ink);
  font-family: var(--cosmic-sans);
  overflow-x: clip;
}

.cosmic-main {
  min-height: 100vh;
  padding: clamp(28px, 5vw, 74px) clamp(16px, 4vw, 64px) 84px;
  color: var(--cosmic-ink);
}

.cosmic-main button,
.cosmic-main input,
.cosmic-main select,
.cosmic-main textarea {
  font: inherit;
}

.cosmic-main input,
.cosmic-main select,
.cosmic-main textarea {
  width: 100%;
  min-height: 52px;
  border: 1px solid rgba(255, 248, 235, .28);
  background: rgba(255, 248, 235, .08);
  color: var(--cosmic-ink);
  padding: 14px 16px;
  outline: none;
}

.cosmic-main input:focus,
.cosmic-main select:focus,
.cosmic-main textarea:focus,
.cosmic-main button:focus-visible {
  outline: 2px solid var(--cosmic-blue);
  outline-offset: 3px;
}

.cosmic-main input[type="radio"],
.cosmic-main input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-height: 18px;
  padding: 0;
  accent-color: var(--cosmic-gold);
}

.cosmic-create-view,
.cosmic-result-view,
.cosmic-info {
  width: min(1480px, 100%);
  margin-inline: auto;
}

.cosmic-create-hero {
  display: grid;
  gap: 18px;
  max-width: 1080px;
  margin: 0 auto 38px;
  text-align: center;
}

.eyebrow,
.cosmic-step-kicker,
.cosmic-panel-title {
  margin: 0;
  color: var(--cosmic-blue);
  font-family: var(--cosmic-mono);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.cosmic-create-hero h1 {
  margin: 0;
  font-family: var(--cosmic-display);
  font-size: clamp(3.5rem, 9vw, 9.6rem);
  font-weight: 400;
  line-height: .84;
  letter-spacing: 0;
}

.cosmic-create-hero p:not(.eyebrow) {
  max-width: 760px;
  margin: 0 auto;
  color: var(--cosmic-muted);
  font-size: clamp(1rem, 1.3vw, 1.25rem);
  line-height: 1.7;
}

.cosmic-flow {
  display: grid;
  gap: 26px;
  width: min(980px, 100%);
  margin: 0 auto;
  padding: clamp(22px, 4vw, 42px);
  border: 1px solid var(--cosmic-line);
  background:
    linear-gradient(90deg, rgba(255, 248, 235, .05) 1px, transparent 1px) 0 0 / 70px 70px,
    linear-gradient(180deg, rgba(255, 248, 235, .05) 1px, transparent 1px) 0 0 / 70px 70px,
    rgba(10, 14, 18, .86);
  box-shadow: 0 28px 90px rgba(0, 0, 0, .26);
}

.cosmic-step-indicator {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cosmic-step-indicator li {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(255, 248, 235, .16);
  color: rgba(255, 248, 235, .45);
  font-weight: 800;
}

.cosmic-step-indicator span {
  color: rgba(255, 248, 235, .38);
  font-family: var(--cosmic-mono);
  font-size: .78rem;
}

.cosmic-step-indicator li.is-active {
  border-color: var(--cosmic-gold);
  color: var(--cosmic-ink);
}

.cosmic-step-indicator li.is-done {
  border-color: rgba(101, 200, 255, .42);
  color: rgba(255, 248, 235, .78);
}

.cosmic-flow-step {
  display: grid;
  gap: 22px;
}

.cosmic-flow-step h2 {
  max-width: 780px;
  margin: 0;
  font-family: var(--cosmic-display);
  font-size: clamp(2.2rem, 5vw, 5.4rem);
  font-weight: 400;
  line-height: .94;
}

.cosmic-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.cosmic-form-grid label,
.cosmic-customize-grid label {
  display: grid;
  gap: 10px;
  color: rgba(255, 248, 235, .82);
  font-weight: 800;
}

.cosmic-check-inline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  color: var(--cosmic-muted);
  font-weight: 800;
}

.cosmic-field-note {
  max-width: 460px;
  margin: -8px 0 0;
  color: rgba(255, 248, 235, .58);
  font-size: .95rem;
}

.cosmic-profile-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px;
  border: 1px solid rgba(101, 200, 255, .32);
  background: rgba(101, 200, 255, .08);
}

.cosmic-profile-summary strong,
.cosmic-profile-summary span {
  display: block;
}

.cosmic-profile-summary span {
  color: var(--cosmic-muted);
}

.cosmic-profile-summary button,
.cosmic-small-action,
.cosmic-text-actions button,
.cosmic-drawer header button {
  border: 0;
  background: none;
  color: var(--cosmic-gold);
  font-weight: 900;
  cursor: pointer;
}

.cosmic-choice-field {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  border: 0;
}

.cosmic-choice-field legend {
  color: var(--cosmic-muted);
  font-weight: 900;
}

.cosmic-pill-grid,
.cosmic-option-grid,
.cosmic-tarot-options {
  display: grid;
  gap: 12px;
}

.cosmic-pill-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.cosmic-option-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.cosmic-tarot-options {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.cosmic-pill-grid label,
.cosmic-option-grid label,
.cosmic-tarot-options label {
  position: relative;
  display: block;
  min-width: 0;
}

.cosmic-pill-grid input,
.cosmic-option-grid input,
.cosmic-tarot-options input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.cosmic-pill-grid span,
.cosmic-option-grid span,
.cosmic-tarot-options span {
  display: grid;
  min-height: 54px;
  align-content: center;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 248, 235, .18);
  background: rgba(255, 248, 235, .055);
  color: rgba(255, 248, 235, .78);
  cursor: pointer;
}

.cosmic-tarot-options small {
  color: rgba(255, 248, 235, .55);
  font-size: .88rem;
  line-height: 1.4;
}

.cosmic-pill-grid input:checked + span,
.cosmic-option-grid input:checked + span,
.cosmic-tarot-options input:checked + span {
  border-color: var(--cosmic-gold);
  background: rgba(215, 173, 99, .16);
  color: var(--cosmic-ink);
}

.cosmic-tarot-draw {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border: 1px solid var(--cosmic-line);
  color: var(--cosmic-muted);
}

.cosmic-flow-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.cosmic-flow-actions .button,
.cosmic-result-actions .button,
.cosmic-drawer-actions .button {
  min-height: 50px;
  border-radius: 0;
}

.cosmic-status {
  min-height: 1.5em;
  margin: 0;
  color: #ffd18b;
  font-weight: 800;
}

.cosmic-ritual {
  width: min(760px, 100%);
  margin: 32px auto 0;
  padding: clamp(28px, 5vw, 56px);
  border: 1px solid rgba(255, 248, 235, .16);
  background: rgba(7, 9, 13, .78);
  text-align: center;
}

.cosmic-ritual-mark {
  position: relative;
  width: 220px;
  height: 220px;
  margin: 0 auto 28px;
}

.cosmic-ritual-mark span,
.cosmic-ritual-mark i,
.cosmic-ritual-mark b {
  position: absolute;
  inset: 50%;
  display: block;
  border: 1px solid rgba(255, 248, 235, .28);
  transform: translate(-50%, -50%) rotate(var(--r, 0deg));
}

.cosmic-ritual-mark span {
  width: 172px;
  height: 72px;
  --r: -18deg;
}

.cosmic-ritual-mark i {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  --r: 0deg;
}

.cosmic-ritual-mark b {
  width: 18px;
  height: 18px;
  border: 0;
  border-radius: 50%;
  background: var(--cosmic-gold);
  box-shadow: 0 0 42px rgba(215, 173, 99, .65);
}

.cosmic-ritual ol {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cosmic-ritual li {
  color: rgba(255, 248, 235, .34);
  font-family: var(--cosmic-mono);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.cosmic-ritual li.is-active {
  color: var(--cosmic-ink);
}

.cosmic-ritual li.is-done {
  color: rgba(101, 200, 255, .74);
}

.cosmic-result-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(300px, .7fr);
  align-items: center;
  gap: clamp(28px, 5vw, 72px);
}

.cosmic-result-card-stage {
  display: grid;
  place-items: center;
  min-width: 0;
}

.cosmic-card-preview-wrap {
  width: min(720px, 100%);
  min-width: 0;
}

.cosmic-card {
  position: relative;
  width: 100%;
  aspect-ratio: 1080 / 1350;
  overflow: hidden;
  color: var(--cosmic-ink);
  isolation: isolate;
  font-family: var(--cosmic-sans);
}

.cosmic-card-content {
  position: relative;
  z-index: 2;
  display: grid;
  height: 100%;
  min-width: 0;
}

.cosmic-card-lunar-poster {
  background:
    radial-gradient(circle at 74% 22%, rgba(215, 173, 99, .28), transparent 24%),
    linear-gradient(135deg, #0d151d 0%, #06080c 54%, #26170f 100%);
}

.poster-ambient,
.artifact-border,
.archive-paper-grid,
.poster-symbol-scene {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.poster-ambient span,
.poster-ambient i,
.poster-ambient b {
  position: absolute;
  display: block;
  opacity: .55;
}

.poster-ambient span {
  width: 58%;
  height: 18%;
  border: 1px solid rgba(255, 248, 235, .13);
  border-radius: 50%;
  right: -8%;
  top: 16%;
  transform: rotate(-24deg);
}

.poster-ambient i {
  width: 46%;
  height: 46%;
  left: -14%;
  bottom: 7%;
  border-radius: 50%;
  background: rgba(215, 173, 99, .11);
}

.poster-ambient b {
  width: 1px;
  height: 72%;
  top: 12%;
  left: 70%;
  background: rgba(255, 248, 235, .12);
  transform: rotate(26deg);
}

.cosmic-card-lunar-poster .cosmic-card-content {
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  padding: 7% 7% 6%;
}

.poster-topline,
.poster-site,
.cosmic-card-celestial-archive header,
.cosmic-card-celestial-archive footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: rgba(255, 248, 235, .66);
  font-family: var(--cosmic-mono);
  font-size: clamp(.55rem, 1.25vw, .92rem);
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.poster-title {
  align-self: start;
  width: min(92%, 860px);
  margin-top: 11%;
}

.poster-title h2,
.artifact-copy h2 {
  display: grid;
  gap: .02em;
  margin: 0;
  font-family: var(--cosmic-display);
  font-weight: 400;
  line-height: .82;
  letter-spacing: 0;
}

.poster-title h2 {
  font-size: clamp(3.6rem, 10vw, 8.9rem);
}

.poster-title p {
  width: min(690px, 82%);
  margin: clamp(16px, 2vw, 28px) 0 0;
  color: rgba(255, 248, 235, .76);
  font-size: clamp(1rem, 2.2vw, 1.52rem);
  line-height: 1.35;
}

.poster-symbol-scene {
  inset: 23% -10% auto auto;
  width: 46%;
  height: 42%;
}

.poster-symbol-svg {
  position: absolute;
  right: 14%;
  top: 22%;
  width: 44%;
  color: var(--cosmic-gold);
}

.poster-symbol-scene em {
  display: none;
}

.poster-symbol-beam,
.poster-symbol-orbit,
.poster-symbol-node {
  position: absolute;
  display: block;
}

.poster-symbol-beam {
  inset: 18% -14% 20% 18%;
  background: rgba(215, 173, 99, .15);
  clip-path: polygon(0 0, 100% 22%, 82% 100%, 14% 72%);
}

.poster-symbol-orbit {
  right: 0;
  top: 8%;
  width: 92%;
  height: 68%;
  border: 1px solid rgba(255, 248, 235, .14);
  border-radius: 50%;
  transform: rotate(-22deg);
}

.poster-symbol-node {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--cosmic-gold);
}

.poster-symbol-node.one {
  left: 12%;
  top: 28%;
}

.poster-symbol-node.two {
  right: 5%;
  bottom: 28%;
}

.poster-symbol-moon-gate .poster-symbol-beam {
  inset: 4% 0 0 18%;
  border-radius: 50%;
  background: rgba(255, 248, 235, .18);
  clip-path: none;
}

.poster-symbol-moon-gate .poster-symbol-beam::after {
  content: "";
  position: absolute;
  inset: 0 0 0 18%;
  border-radius: 50%;
  background: #07090c;
}

.poster-symbol-star-map .poster-symbol-beam {
  background: none;
  border-top: 1px solid rgba(255, 248, 235, .18);
  border-right: 1px solid rgba(255, 248, 235, .18);
  clip-path: none;
  transform: skewY(-18deg);
}

.poster-symbol-key .poster-symbol-beam {
  border: 12px solid rgba(215, 173, 99, .12);
  border-radius: 50%;
  background: none;
  clip-path: none;
}

.poster-symbol-mirror .poster-symbol-beam {
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(255, 248, 235, .14), rgba(101, 200, 255, .06));
  clip-path: ellipse(32% 48% at 50% 50%);
}

.poster-symbol-compass .poster-symbol-orbit {
  border-radius: 0;
  border-width: 0 1px 1px 0;
  transform: rotate(44deg);
}

.poster-chapter {
  align-self: end;
  display: grid;
  gap: 8px;
  max-width: 740px;
  margin-bottom: clamp(18px, 4vw, 48px);
}

.poster-chapter span,
.poster-card-note span {
  color: var(--cosmic-gold);
  font-family: var(--cosmic-mono);
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.poster-chapter strong {
  font-family: var(--cosmic-display);
  font-size: clamp(1.8rem, 4.8vw, 4.6rem);
  font-weight: 400;
  line-height: .92;
}

.poster-chapter p {
  margin: 0;
  color: rgba(255, 248, 235, .7);
  font-size: clamp(.9rem, 1.6vw, 1.16rem);
  line-height: 1.45;
}

.poster-footer {
  display: grid;
  gap: 14px;
}

.poster-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  color: rgba(255, 248, 235, .72);
  font-family: var(--cosmic-mono);
  font-size: clamp(.62rem, 1.2vw, .86rem);
  font-weight: 900;
  letter-spacing: .08em;
}

.poster-card-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: rgba(255, 248, 235, .78);
  font-size: clamp(.74rem, 1.1vw, .94rem);
}

.poster-site {
  padding-top: 12px;
  border-top: 1px solid rgba(255, 248, 235, .16);
}

.cosmic-card-tarot-artifact {
  background:
    radial-gradient(circle at 50% 26%, rgba(215, 173, 99, .22), transparent 34%),
    linear-gradient(180deg, #0e1715 0%, #050707 100%);
}

.artifact-border {
  inset: 5.5%;
  border: 1px solid rgba(215, 173, 99, .65);
}

.artifact-border span,
.artifact-border i,
.artifact-border b {
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(255, 248, 235, .15);
}

.artifact-border i {
  inset: 42px 20px;
  border-width: 0 1px;
}

.artifact-border b {
  inset: auto 12%;
  top: 23%;
  height: 54%;
  border-radius: 50%;
}

.cosmic-card-tarot-artifact .cosmic-card-content {
  grid-template-rows: auto 28% auto auto 1fr auto;
  gap: 3%;
  padding: 9% 10% 8%;
  text-align: center;
}

.cosmic-card-tarot-artifact header,
.cosmic-card-tarot-artifact footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: rgba(255, 248, 235, .64);
  font-family: var(--cosmic-mono);
  font-size: clamp(.56rem, 1vw, .84rem);
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.artifact-symbol {
  display: grid;
  place-items: center;
  color: var(--cosmic-gold);
}

.artifact-symbol-svg {
  width: min(52%, 260px);
}

.artifact-copy {
  display: grid;
  gap: 12px;
}

.artifact-copy > span {
  color: var(--cosmic-gold);
  font-family: var(--cosmic-mono);
  font-size: .76rem;
  font-weight: 900;
  letter-spacing: .13em;
}

.artifact-copy h2 {
  font-size: clamp(2.2rem, 6vw, 5rem);
}

.artifact-copy p {
  width: min(480px, 100%);
  margin: 0 auto;
  color: rgba(255, 248, 235, .72);
  line-height: 1.45;
}

.artifact-minor {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.artifact-minor div {
  display: grid;
  gap: 6px;
  padding: 14px;
  border-top: 1px solid rgba(255, 248, 235, .18);
  border-bottom: 1px solid rgba(255, 248, 235, .12);
}

.artifact-minor span {
  color: rgba(215, 173, 99, .78);
  font-family: var(--cosmic-mono);
  font-size: .66rem;
  font-weight: 900;
}

.artifact-minor strong {
  color: var(--cosmic-ink);
}

.cosmic-card-celestial-archive {
  background: #eee7da;
  color: #171412;
}

.archive-paper-grid {
  background:
    linear-gradient(90deg, rgba(23, 20, 18, .07) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(180deg, rgba(23, 20, 18, .07) 1px, transparent 1px) 0 0 / 48px 48px;
}

.cosmic-card-celestial-archive .cosmic-card-content {
  grid-template-rows: auto auto 1fr auto auto;
  gap: 3%;
  padding: 7%;
}

.cosmic-card-celestial-archive header,
.cosmic-card-celestial-archive footer {
  color: rgba(23, 20, 18, .68);
}

.cosmic-card-celestial-archive header > div {
  display: grid;
  gap: 4px;
}

.cosmic-card-celestial-archive header strong,
.cosmic-card-celestial-archive footer strong {
  display: block;
  color: #171412;
}

.archive-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(110px, .35fr);
  gap: 6%;
  align-items: end;
  padding-bottom: 3%;
  border-bottom: 2px solid rgba(23, 20, 18, .18);
}

.archive-main span,
.archive-chapter span {
  color: #8b6a2d;
  font-family: var(--cosmic-mono);
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .12em;
}

.archive-main h2 {
  margin: 8px 0 10px;
  font-family: var(--cosmic-display);
  font-size: clamp(2rem, 5vw, 4.8rem);
  font-weight: 400;
  line-height: .94;
}

.archive-main p,
.archive-chapter p {
  margin: 0;
  color: rgba(23, 20, 18, .7);
  line-height: 1.5;
}

.archive-main figure {
  display: grid;
  gap: 8px;
  justify-items: center;
  margin: 0;
  color: #8b6a2d;
  text-align: center;
  text-transform: uppercase;
}

.archive-symbol-svg {
  width: min(100%, 130px);
}

.archive-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.archive-grid div {
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(23, 20, 18, .22);
}

.archive-grid dt {
  color: #8b6a2d;
  font-family: var(--cosmic-mono);
  font-size: .64rem;
  font-weight: 900;
  text-transform: uppercase;
}

.archive-grid dd {
  margin: 7px 0 0;
  color: #171412;
  font-weight: 900;
}

.archive-chapter {
  display: grid;
  gap: 8px;
  padding-top: 4%;
  border-top: 2px solid rgba(23, 20, 18, .18);
}

.archive-chapter strong {
  font-family: var(--cosmic-display);
  font-size: clamp(1.4rem, 3.4vw, 3rem);
  font-weight: 400;
  line-height: 1;
}

.cosmic-result-summary {
  display: grid;
  align-content: center;
  gap: 18px;
  min-width: 0;
}

.cosmic-result-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--cosmic-ink);
  font-weight: 900;
  text-decoration: none;
}

.cosmic-result-summary h2 {
  margin: 0;
  font-family: var(--cosmic-display);
  font-size: clamp(2.4rem, 5vw, 5.8rem);
  font-weight: 400;
  line-height: .92;
}

.cosmic-result-summary p {
  margin: 0;
  color: var(--cosmic-muted);
  font-size: 1.08rem;
  line-height: 1.6;
}

.cosmic-symbol-line {
  color: var(--cosmic-gold) !important;
  font-weight: 900;
}

.cosmic-result-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.cosmic-text-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
}

.cosmic-text-actions button {
  padding: 0;
  color: rgba(255, 248, 235, .78);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.cosmic-drawer {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  justify-items: end;
  background: rgba(0, 0, 0, .58);
}

.cosmic-drawer[hidden] {
  display: none;
}

.cosmic-drawer-panel {
  width: min(760px, 100%);
  height: 100%;
  overflow-y: auto;
  padding: clamp(20px, 4vw, 42px);
  border-left: 1px solid rgba(255, 248, 235, .18);
  background: #0a0d11;
}

.cosmic-drawer header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.cosmic-drawer h2 {
  margin: 8px 0 0;
  font-family: var(--cosmic-display);
  font-size: clamp(2rem, 4vw, 4rem);
  font-weight: 400;
}

.cosmic-style-library,
.cosmic-symbol-library {
  display: grid;
  gap: 16px;
}

.cosmic-style-card,
.cosmic-symbol-card {
  min-width: 0;
  border: 1px solid rgba(255, 248, 235, .18);
  background: rgba(255, 248, 235, .06);
  color: var(--cosmic-ink);
  cursor: pointer;
}

.cosmic-style-card {
  display: grid;
  grid-template-columns: minmax(178px, 240px) minmax(0, 1fr);
  align-items: center;
  gap: 22px;
  min-height: 260px;
  padding: 18px;
  text-align: left;
}

.style-choice-preview {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border: 1px solid rgba(255, 248, 235, .14);
  background: #07090d;
}

.style-choice-preview .cosmic-card {
  width: 100%;
  height: 100%;
  font-size: 38%;
  transform: none;
}

.style-choice-preview[data-style-preview="tarot-artifact"] {
  border-color: rgba(215, 173, 99, .42);
  box-shadow: inset 0 0 0 14px rgba(215, 173, 99, .08);
}

.style-choice-preview[data-style-preview="celestial-archive"] {
  background: #eee7da;
  border-color: rgba(238, 231, 218, .62);
}

.style-choice-preview[data-style-preview="lunar-poster"] {
  box-shadow: inset 0 -70px 120px rgba(101, 200, 255, .08);
}

.style-choice-copy {
  display: grid;
  gap: 10px;
}

.style-choice-copy em {
  color: var(--cosmic-blue);
  font-family: var(--cosmic-mono);
  font-size: .72rem;
  font-style: normal;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.style-choice-copy strong,
.cosmic-symbol-card strong {
  font-family: var(--cosmic-display);
  font-size: clamp(1.8rem, 3vw, 3rem);
  font-weight: 400;
  line-height: .95;
  white-space: nowrap;
}

.style-choice-copy small,
.cosmic-symbol-card small {
  color: var(--cosmic-muted);
  line-height: 1.4;
}

.cosmic-style-card.is-selected,
.cosmic-symbol-card.is-selected {
  border-color: var(--cosmic-gold);
  background: rgba(215, 173, 99, .13);
}

.cosmic-symbol-library {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.cosmic-symbol-card {
  display: grid;
  justify-items: center;
  gap: 12px;
  min-height: 210px;
  padding: 18px;
  text-align: center;
}

.symbol-card-art {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  color: var(--cosmic-gold);
  background: linear-gradient(135deg, rgba(255, 248, 235, .08), rgba(101, 200, 255, .04));
}

.symbol-card-art::before {
  content: "";
  position: absolute;
  inset: 16%;
  border: 1px solid rgba(255, 248, 235, .14);
  transform: rotate(-18deg);
}

.symbol-card-svg {
  position: relative;
  width: 58%;
}

.cosmic-customize-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 24px;
}

.cosmic-customize-grid fieldset {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 16px;
  border: 1px solid rgba(255, 248, 235, .18);
}

.cosmic-customize-grid fieldset label,
.cosmic-visible-grid label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--cosmic-muted);
  font-weight: 800;
}

.cosmic-visible-panel {
  display: grid;
  gap: 14px;
}

.cosmic-visible-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.cosmic-drawer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.cosmic-info {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 72px;
}

.cosmic-info article {
  padding: 24px;
  border: 1px solid rgba(255, 248, 235, .14);
  background: rgba(255, 248, 235, .045);
}

.cosmic-info h2 {
  margin: 12px 0 8px;
  font-family: var(--cosmic-display);
  font-size: clamp(1.8rem, 3vw, 3.6rem);
  font-weight: 400;
}

.cosmic-info p:last-child {
  margin: 0;
  color: var(--cosmic-muted);
  line-height: 1.6;
}

@media (max-width: 1180px) {
  .cosmic-result-shell {
    grid-template-columns: 1fr;
  }

  .cosmic-result-summary {
    width: min(720px, 100%);
    margin-inline: auto;
  }

  .cosmic-pill-grid,
  .cosmic-option-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .cosmic-tarot-options {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .cosmic-main {
    padding-inline: 14px;
  }

  .cosmic-create-hero {
    text-align: left;
  }

  .cosmic-flow {
    padding: 18px;
  }

  .cosmic-step-indicator {
    grid-template-columns: 1fr;
  }

  .cosmic-form-grid,
  .cosmic-customize-grid,
  .cosmic-info {
    grid-template-columns: 1fr;
  }

  .cosmic-pill-grid,
  .cosmic-option-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cosmic-flow-actions,
  .cosmic-tarot-draw,
  .cosmic-result-actions {
    align-items: stretch;
    flex-direction: column;
    grid-template-columns: 1fr;
  }

  .cosmic-flow-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .cosmic-result-card-stage {
    justify-items: stretch;
  }

  .cosmic-card-preview-wrap {
    width: 100%;
  }

  .cosmic-card-lunar-poster .cosmic-card-content {
    padding: 8% 7%;
  }

  .poster-title {
    width: 100%;
    margin-top: 8%;
  }

  .poster-title h2 {
    font-size: clamp(2.2rem, 11vw, 3.1rem);
  }

  .poster-title p {
    width: 76%;
    margin-top: 10px;
    font-size: clamp(.78rem, 3.4vw, .98rem);
    line-height: 1.28;
  }

  .poster-symbol-scene {
    inset: 23% -18% auto auto;
    width: 50%;
    height: 36%;
  }

  .poster-chapter {
    gap: 5px;
    margin-bottom: 14px;
  }

  .poster-chapter strong {
    font-size: clamp(1.25rem, 6.4vw, 2.15rem);
  }

  .poster-chapter p {
    font-size: clamp(.72rem, 3vw, .92rem);
    line-height: 1.3;
  }

  .poster-facts {
    font-size: .52rem;
    gap: 5px 10px;
  }

  .poster-card-note {
    font-size: .56rem;
  }

  .poster-topline,
  .poster-site {
    font-size: .48rem;
  }

  .cosmic-drawer {
    align-items: end;
    justify-items: stretch;
  }

  .cosmic-drawer-panel {
    height: min(88vh, 820px);
    border-left: 0;
    border-top: 1px solid rgba(255, 248, 235, .18);
  }

  .cosmic-style-card {
    grid-template-columns: 150px minmax(0, 1fr);
    min-height: 210px;
  }

  .cosmic-symbol-library {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 430px) {
  .cosmic-pill-grid,
  .cosmic-option-grid,
  .cosmic-visible-grid,
  .cosmic-symbol-library {
    grid-template-columns: 1fr;
  }

  .cosmic-style-card {
    grid-template-columns: 1fr;
  }

  .style-choice-preview {
    width: min(220px, 68vw);
  }

  .cosmic-result-summary h2 {
    font-size: 2.7rem;
  }

  .artifact-minor {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}
