:root {
  color-scheme: normal;
  --bg: transparent;
  --panel: transparent;
  --panel-2: transparent;
  --line: rgba(242, 239, 232, 0.45);
  --line-bright: #d8d2c4;
  --text: #f2efe8;
  --muted: #a7a196;
  --soft: transparent;
  --user: rgba(255, 255, 255, 0.055);
  --danger: #d9c6b0;
  --title: "Micro 5", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --body: "Doto", "Lucida Console", "Courier New", monospace;
  --mono: var(--title);
  --sans: var(--body);
  --cyan: #4fd7d2;
  --green: #75ffac;
  --violet: #8e79bd;
  --amber: #ffcf6e;
  --rose: #b86b66;
  --blue: #7fb6c5;
  --mark: rgba(255, 255, 255, 0.16);
}

* {
  box-sizing: border-box;
}

html,
body,
#app {
  min-height: 100%;
  background: transparent !important;
}

body {
  margin: 0;
  background: transparent !important;
  color: var(--text);
  font-family: var(--sans);
  font-weight: 200;
  letter-spacing: 0;
}

button,
a.nav-link,
a.nav-home,
input,
textarea {
  font: inherit;
}

button,
a.nav-link,
a.nav-home {
  border: 0;
  background: transparent;
  color: var(--text);
  min-height: 40px;
  padding: 0.65rem 0.8rem;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
  text-decoration: none;
}

button:hover:not(:disabled),
a.nav-link:hover,
button.active {
  background: rgba(255, 255, 255, 0.06);
}

button:disabled {
  color: #5f5a52;
  cursor: not-allowed;
}

input,
textarea {
  width: 100%;
  border: 0;
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
  min-height: 44px;
  padding: 0.8rem;
  outline: none;
}

textarea {
  min-height: 5.6rem;
  line-height: 1.45;
  resize: vertical;
}

input:focus,
textarea:focus {
  outline: 0;
}

.shell {
  height: 100vh;
  min-height: 100vh;
  overflow: hidden;
  background: transparent !important;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1.05rem clamp(1rem, 3vw, 2rem) 0.75rem;
  border-bottom: 0;
  background: transparent;
  backdrop-filter: none;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  border: 0;
  padding: 0;
  background: transparent;
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0;
}

.mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line-bright);
}

nav {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}

nav button,
nav a {
  display: inline-grid;
  place-items: center;
  min-height: 34px;
  padding: 0.45rem 0.65rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.nav-stack {
  display: inline-grid;
  justify-items: center;
  gap: 0.14rem;
  padding: 0.08rem 0.25rem 0;
}

.nav-stack .nav-home {
  min-height: 0;
  padding: 0 0.08rem 0.14rem;
  color: var(--text);
  font-family: var(--title);
  font-size: 0.58rem;
  line-height: 1;
  letter-spacing: 0.28rem;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.24rem;
  text-transform: uppercase;
  opacity: 0.95;
}

.nav-stack .nav-link {
  color: var(--text);
  padding-top: 0.08rem;
  font-family: var(--title);
  font-size: 1.15rem;
  letter-spacing: 0.18rem;
}

.main {
  width: min(1680px, 100%);
  height: calc(100vh - 4.25rem);
  margin: 0 auto;
  padding: clamp(1rem, 2vw, 1.5rem) clamp(1rem, 3vw, 2.5rem);
  overflow: hidden;
  background: transparent !important;
}

.main-embed {
  padding: 0.75rem;
}

.reader-grid {
  display: grid;
  grid-template-columns: minmax(300px, 460px) minmax(560px, 1fr);
  gap: clamp(5rem, 11vw, 14rem);
  align-items: stretch;
  justify-content: center;
  height: 100%;
  overflow: hidden;
}

.chat-column {
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-right: 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.chat-column,
.chat-column * {
  font-family: var(--body) !important;
  font-weight: 200;
  letter-spacing: 0;
}

.chat-column:has(.question-form) {
  justify-content: center;
}

.chat-column:has(.question-form) .chat-window {
  flex: 0 1 auto;
  max-height: min(58vh, 38rem);
}

.status-line,
.reading-head,
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.status-line {
  margin-bottom: 0.75rem;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.toggle input {
  width: auto;
  min-height: 0;
}

.chat-window {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 0;
  overflow-y: auto;
  padding-right: 0.5rem;
  scroll-behavior: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.chat-column::-webkit-scrollbar,
.chat-window::-webkit-scrollbar,
.card-stage::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.message {
  width: min(92%, 620px);
  border: 0;
  background: transparent;
  padding: 0.55rem 0;
}

.message.user {
  align-self: flex-end;
  background: transparent;
  color: var(--text);
  text-align: right;
}

.message.bot {
  color: var(--green);
}

.message-label,
.eyebrow,
.position-number,
.position-name,
.card-num,
.card-keys,
.message .actions,
.keyword-line {
  font-family: var(--mono);
  letter-spacing: 0;
}

.message-label,
.eyebrow {
  margin-bottom: 0.55rem;
  color: var(--green);
  font-size: 0.9rem;
  text-transform: uppercase;
}

.message.user .message-label {
  color: var(--text);
}

.message-text {
  line-height: 1.65;
  font-weight: 200;
}

.message.typing-active .message-text {
  min-height: calc(var(--typing-lines, 4) * 1.65em);
}

.message.user .message-text {
  color: var(--text);
}

.message.bot .message-text {
  color: var(--green);
}

.message.typing-active .message-text::after {
  content: "_";
  display: inline-block;
  margin-left: 0.2em;
  color: var(--text);
  animation: caret-pulse 700ms steps(1) infinite;
}

.chat-column button,
.chat-column input,
.chat-column textarea {
  color: var(--text);
}

.chat-column input::placeholder,
.chat-column textarea::placeholder {
  color: var(--text);
  opacity: 0.62;
}

.chat-column .signal-block span {
  color: var(--green);
}

.actions,
.spread-selector {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.8rem;
}

.live-options > button {
  color: var(--text);
  opacity: 0;
  transform: translateY(0.35rem);
  animation: option-pop 360ms steps(3, end) forwards;
  animation-delay: calc(var(--option-order, 0) * 120ms);
}

.resolved-options > button,
.message.resolved .actions button,
.message.resolved .spread-selector button {
  color: rgba(242, 239, 232, 0.38);
  opacity: 0.45;
}

.resolved-options > button:hover,
.message.resolved .actions button:hover,
.message.resolved .spread-selector button:hover {
  background: transparent;
}

.spread-selector {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.spread-selector button {
  display: grid;
  gap: 0.35rem;
  text-align: left;
}

.spread-selector span,
.actions button,
.question-form button,
.reading-head button,
.finish-panel button {
  font-family: var(--mono);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.signal-block {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.8rem;
}

.inline-card-text {
  margin-top: 1.4rem;
  padding-top: 0.9rem;
  color: var(--muted);
  font-family: var(--body);
  font-size: clamp(0.92rem, 2vw, 1.05rem);
  font-weight: 200;
  line-height: 1.875;
  text-align: center;
}

.inline-card-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.5rem;
  font-family: var(--body);
  font-size: 0.95rem;
  font-weight: 200;
  text-transform: uppercase;
}

.inline-card-head a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}

.inline-card-text h2 {
  margin: 0 0 0.7rem;
  color: var(--text);
  font-family: var(--title);
  font-size: clamp(3.2rem, 9vw, 5.4rem);
  font-weight: 400;
  line-height: 0.82;
}

.inline-card-text h3 {
  margin: 2rem 0 0.55rem;
  color: var(--cyan);
  font-family: var(--body);
  font-size: 1.1rem;
  font-weight: 200;
  letter-spacing: 0;
  text-transform: none;
}

.inline-card-text mark {
  display: inline;
  padding: 0 0.25em;
  color: var(--text);
  background: var(--mark);
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.inline-card-text strong {
  font-weight: 400;
}

.keyword-trail {
  margin: 0.55rem auto 1.2rem;
  text-transform: lowercase;
}

.slash {
  color: rgba(242, 239, 232, 0.5);
}

.kw {
  white-space: nowrap;
}

.kw.cyan {
  color: var(--cyan);
}

.kw.green {
  color: var(--green);
}

.kw.violet {
  color: var(--violet);
}

.kw.amber {
  color: var(--amber);
}

.kw.rose {
  color: var(--rose);
}

.kw.blue {
  color: var(--blue);
}

.card-thesis {
  color: var(--amber);
  font-style: italic;
}

.marked-line {
  display: inline;
  padding: 0 0.25em;
  color: var(--text);
  background: var(--mark);
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.inline-card-text a,
.inline-card-text u {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}

.reading-head h1,
.section-head h1,
.side-panel h2,
.modal-copy h1,
.prose h1 {
  font-family: var(--title);
  font-size: clamp(3rem, 7vw, 5rem);
  font-weight: 400;
}

.prose h2,
.message-label,
.eyebrow,
.position-number,
.position-name,
.card-num,
.card-keys,
.message .actions,
.keyword-line,
.spread-selector span,
.actions button,
.question-form button,
.reading-head button,
.finish-panel button,
nav button,
nav a {
  font-family: var(--body);
  font-weight: 400;
}

nav button,
nav a,
.actions button,
.question-form button,
.reading-head button,
.finish-panel button {
  font-family: var(--title);
  font-size: 1.15rem;
  font-weight: 400;
  letter-spacing: 0.18rem;
}

nav .nav-home {
  color: var(--text);
  font-size: 0.58rem;
  line-height: 0.85;
  letter-spacing: 0.3rem;
  text-transform: uppercase;
}

nav .nav-home:hover {
  background: transparent;
  text-decoration: underline;
}

.topbar nav button,
.topbar nav a.nav-link {
  font-family: var(--title) !important;
  font-size: 1.15rem;
  font-weight: 400;
  letter-spacing: 0.18rem;
  line-height: 1;
  text-transform: uppercase;
}

.inline-card-text h3 {
  font-weight: 400;
}

.inline-card-text p {
  margin: 0.35rem 0;
}

.signal-block p {
  margin: 0;
  padding: 0.65rem;
  border-left: 1px solid var(--line-bright);
  background: transparent;
  line-height: 1.45;
}

.signal-block span {
  display: block;
  margin-bottom: 0.2rem;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
}

.reflection-form,
.input-row {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.8rem;
}

.reflection-form input,
.reflection-form textarea,
.input-row input,
.input-row textarea {
  flex: 1;
  width: 100%;
}

.reflection-form textarea,
.input-row textarea {
  min-height: 6.4rem;
}

.reflection-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-start;
}

.input-row button {
  justify-self: start;
}

.question-form {
  flex: 0 0 auto;
  margin-top: clamp(1.25rem, 5vh, 3rem);
  border: 0;
  background: transparent;
  padding: 0.75rem 0 0;
}

.chips {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 0.6rem;
}

.chips button {
  min-height: 32px;
  padding: 0.35rem 0.55rem;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: none;
}

.chat-column .chips button {
  color: var(--text);
}

.reading-card,
.side-panel,
.page-section {
  border: 0;
  background: transparent;
  padding: 1rem;
}

.reading-card {
  margin-top: 0.25rem;
}

.reading-head h1,
.section-head h1,
.side-panel h2,
.modal-copy h1,
.prose h1 {
  margin: 0;
  font-family: var(--title);
  font-weight: 400;
  line-height: 1.05;
}

.reading-head p,
.section-head p,
.side-panel p,
.prose p,
.prose li {
  color: var(--muted);
  line-height: 1.55;
}

.spread-layout {
  display: grid;
  gap: 0.65rem;
  margin-top: 1rem;
}

.card-stage {
  min-width: 0;
  height: 100%;
  padding: 0.25rem 0 4rem;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.empty-stage {
  color: var(--muted);
  text-align: center;
}

.empty-stage-head {
  min-height: 4.85rem;
  visibility: hidden;
  pointer-events: none;
}

.empty-stage-body {
  display: grid;
  justify-items: center;
  gap: 1rem;
  margin-top: 1rem;
}

.single-stage-card {
  width: min(260px, 70vw);
}

.stage-head {
  text-align: center;
}

.stage-head h1 {
  margin: 0.2rem auto 0.7rem;
  max-width: 760px;
  color: var(--text);
  font-family: var(--body);
  font-size: clamp(0.95rem, 2vw, 1.15rem);
  font-weight: 200;
  line-height: 1.55;
}

.stage-head button {
  margin-inline: auto;
}

.stage-spread {
  justify-items: center;
  perspective: 1000px;
}

.spread-layout.one {
  grid-template-columns: minmax(190px, 260px);
  justify-content: center;
}

.spread-layout.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.spread-layout.celtic {
  grid-template-columns: repeat(5, minmax(110px, 1fr));
  align-items: center;
}

.tarot-card {
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 0.4rem;
  width: 100%;
  max-width: 250px;
  min-height: auto;
  padding: 0.55rem;
  text-align: left;
  border: 0;
  background: transparent;
  overflow: visible;
  transform-origin: 50% 100%;
  outline: 0 !important;
  box-shadow: none !important;
}

.tarot-card:focus,
.tarot-card:focus-visible,
.tarot-card:active,
.tarot-card:hover {
  outline: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}

.spread-layout.celtic .tarot-card {
  max-width: 145px;
}

.tarot-card.just-revealed {
  animation: card-reveal-rise 700ms ease both;
}

.tarot-card.revealed:hover {
  transform: translateY(-0.55rem) rotateX(0deg) scale(1.02);
}

.position-number {
  color: var(--line-bright);
  font-size: 0.7rem;
}

.position-name {
  min-height: 2.4em;
  color: var(--muted);
  font-size: 0.7rem;
  text-transform: uppercase;
}

.card-art {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  width: 100%;
  min-height: 200px;
  aspect-ratio: 638 / 1010;
  border: 0;
  padding: 0.7rem;
  overflow: hidden;
  background:
    linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px),
    transparent;
  background-size: 18px 18px;
}

.image-card {
  display: block;
  min-height: auto;
  aspect-ratio: 638 / 1010;
  padding: 0;
  background: transparent;
  border-radius: 0;
  overflow: visible;
  outline: 0;
  box-shadow: none;
}

.card-art::before,
.card-art::after {
  content: "";
  position: absolute;
  inset: 15%;
  border: 1px solid rgba(242, 239, 232, 0.26);
  transform: rotate(45deg);
}

.card-art::after {
  inset: 28%;
  transform: rotate(0deg);
}

.image-card::before,
.image-card::after {
  display: none;
}

.image-card img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: inherit;
  object-fit: contain;
  border-radius: 0;
}

.card-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.08), rgba(0,0,0,0) 48%, rgba(0,0,0,0.42));
  border-radius: inherit;
  z-index: 1;
}

.reverse {
  transform: rotate(180deg);
}

.card-num,
.card-title,
.card-keys,
.back-mark,
.back-line {
  position: absolute;
  z-index: 2;
}

.card-num,
.card-keys {
  color: var(--muted);
  font-size: 0.68rem;
  text-transform: uppercase;
}

.card-num {
  top: 0.55rem;
  left: 0.55rem;
}

.card-title {
  left: 0.55rem;
  right: 0.55rem;
  bottom: 2rem;
  font-family: var(--mono);
  text-transform: uppercase;
  font-size: 0.82rem;
}

.card-keys {
  left: 0.55rem;
  right: 0.55rem;
  bottom: 0.55rem;
}

.back-art {
  min-height: auto;
}

.stage-description {
  max-width: 860px;
  margin: 1.5rem auto 0;
}

.muted-stage {
  color: var(--muted);
  text-align: center;
}

@keyframes card-reveal-rise {
  0% {
    opacity: 0.82;
    transform: rotateY(180deg) translateY(1.1rem) scale(0.96);
  }
  58% {
    opacity: 1;
    transform: rotateY(0deg) translateY(-1rem) scale(1.03);
  }
  100% {
    opacity: 1;
    transform: rotateY(0deg) translateY(-0.55rem) scale(1);
  }
}

.back-mark {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 1px solid var(--line-bright);
  font-family: var(--mono);
}

.back-line {
  width: 64%;
  height: 1px;
  background: var(--line-bright);
  opacity: 0.6;
}

.back-line.short {
  width: 42%;
}

.finish-panel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 0;
}

.side-panel {
  display: none;
}

.side-art .card-art {
  min-height: 320px;
  margin-bottom: 1rem;
}

.side-panel button {
  width: 100%;
  margin-top: 0.75rem;
}

.panel-link {
  display: grid;
  place-items: center;
  min-height: 40px;
  margin-top: 0.5rem;
  border: 0;
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.78rem;
  text-decoration: none;
  text-transform: uppercase;
}

.panel-link:hover {
  background: rgba(255, 255, 255, 0.06);
}

.page-section {
  width: min(960px, 100%);
  margin: 0 auto;
}

.section-head {
  margin-bottom: 1rem;
}

.archive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.75rem;
}

.archive-card {
  display: grid;
  gap: 0.6rem;
  padding: 0.55rem;
  text-align: left;
}

.archive-card .card-art {
  min-height: 210px;
}

.archive-card span:last-child {
  color: var(--muted);
  line-height: 1.4;
}

.prose {
  max-width: 760px;
}

.prose h2 {
  margin: 1.4rem 0 0.45rem;
  font-family: var(--mono);
  font-size: 0.88rem;
  font-weight: 400;
  text-transform: uppercase;
}

.prose strong {
  color: var(--text);
  font-weight: 500;
}

.prose code {
  border: 0;
  padding: 0.1rem 0.25rem;
  font-family: var(--mono);
}

.prose li {
  margin: 0.45rem 0;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: end center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.72);
}

.card-modal {
  position: relative;
  display: grid;
  grid-template-columns: minmax(220px, 340px) minmax(0, 520px);
  gap: 1rem;
  width: min(920px, 100%);
  max-height: min(820px, 92vh);
  border: 1px solid var(--line-bright);
  background: #060606;
  padding: 1rem;
  overflow: auto;
}

.close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 2;
  width: 38px;
  min-height: 38px;
  padding: 0;
  font-size: 1.3rem;
}

.modal-art .card-art {
  min-height: 460px;
}

.modal-copy {
  padding-right: 1.5rem;
}

.keyword-line {
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
}

.modal-section {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.modal-section h2 {
  margin: 0 0 0.35rem;
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 400;
  text-transform: uppercase;
}

.modal-section p,
.modal-section a {
  color: var(--muted);
  line-height: 1.55;
}

.modal-section a {
  display: inline-block;
  margin-right: 0.75rem;
}

.embed .main {
  height: 100vh;
}

@keyframes option-pop {
  0% {
    opacity: 0;
    transform: translateY(0.35rem);
  }

  60% {
    opacity: 1;
    transform: translateY(-0.08rem);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes caret-pulse {
  0%,
  50% {
    opacity: 1;
  }

  51%,
  100% {
    opacity: 0;
  }
}

@media (max-width: 860px) {
  .topbar,
  .status-line,
  .reading-head,
  .section-head,
  .finish-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .reader-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .shell,
  .main,
  .reader-grid,
  .chat-column,
  .card-stage {
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .side-panel {
    display: none;
  }

  .spread-selector,
  .spread-layout.three,
  .spread-layout.celtic {
    grid-template-columns: 1fr;
  }

  .tarot-card,
  .spread-layout.celtic .tarot-card {
    min-height: 0;
    max-width: 260px;
  }

  .message {
    width: 100%;
  }

  .reflection-form,
  .input-row {
    flex-direction: column;
  }

  .card-modal {
    grid-template-columns: 1fr;
    width: 100%;
    max-height: 92vh;
  }

  .modal-art .card-art {
    min-height: 340px;
  }

  .modal-copy {
    padding-right: 0;
  }
}
