:root {
  color-scheme: dark;
  --bg: #101116;
  --bg-soft: #171820;
  --paper: #211f21;
  --paper-2: #272326;
  --ink: #f3eadb;
  --muted: #b8ad9d;
  --quiet: #8f877c;
  --line: rgba(226, 205, 166, 0.22);
  --gold: #b89a5e;
  --burgundy: #5a1f27;
  --shadow: rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 28% 0%, rgba(184, 154, 94, 0.14), transparent 28rem),
    radial-gradient(circle at 80% 18%, rgba(90, 31, 39, 0.22), transparent 24rem),
    linear-gradient(135deg, #0c0d12 0%, #15161d 54%, #111014 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.18;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 26px 26px, 26px 26px;
  mask-image: linear-gradient(to bottom, black, transparent 80%);
}

button,
textarea,
input {
  font: inherit;
}

.app-shell {
  width: min(1080px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 54px 0 30px;
}

.hero {
  max-width: 760px;
  padding: 18px 0 34px;
}

.kicker,
.result-mode {
  margin: 0 0 14px;
  color: var(--gold);
  font-family: Arial, sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  line-height: 1.5;
  text-transform: uppercase;
}

h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(2.35rem, 7vw, 5.4rem);
  font-weight: 400;
  line-height: 0.96;
  letter-spacing: 0;
}

.subtitle {
  max-width: 620px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.7;
}

.hero-phrase {
  max-width: 680px;
  margin: 28px 0 0;
  color: #fff7e8;
  font-size: clamp(1.6rem, 4vw, 3rem);
  line-height: 1.12;
}

.microcopy {
  max-width: 540px;
  margin: 16px 0 0;
  color: var(--quiet);
  font-size: 1rem;
  line-height: 1.7;
}

.experience-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: 26px;
  align-items: start;
  margin-top: 16px;
}

.question-form,
.result-panel,
.empty-result {
  border: 1px solid var(--line);
  background:
    linear-gradient(140deg, rgba(255, 255, 255, 0.035), transparent 36%),
    linear-gradient(180deg, rgba(39, 35, 38, 0.94), rgba(24, 24, 31, 0.94));
  box-shadow: 0 18px 60px var(--shadow);
}

.question-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 22px;
  border-radius: 8px;
}

.field-label,
legend {
  color: var(--ink);
  font-family: Arial, sans-serif;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

textarea {
  width: 100%;
  min-height: 150px;
  resize: vertical;
  border: 1px solid rgba(226, 205, 166, 0.28);
  border-radius: 8px;
  padding: 15px 16px;
  color: var(--ink);
  background: rgba(12, 13, 18, 0.74);
  line-height: 1.6;
  outline: none;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"] {
  width: 100%;
  border: 1px solid rgba(226, 205, 166, 0.28);
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--ink);
  background: rgba(12, 13, 18, 0.74);
  line-height: 1.4;
  outline: none;
}

textarea:focus-visible,
input:focus-visible,
.primary-button:focus-visible,
.secondary-button:focus-visible,
.area-pill:has(input:focus-visible) span {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.area-group {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.area-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.area-pill input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.area-pill span {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  max-width: 100%;
  border: 1px solid rgba(226, 205, 166, 0.22);
  border-radius: 999px;
  padding: 8px 13px;
  color: var(--muted);
  background: rgba(16, 17, 22, 0.55);
  cursor: pointer;
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease;
  line-height: 1.35;
  white-space: normal;
}

.area-pill input:checked + span {
  border-color: rgba(184, 154, 94, 0.72);
  color: var(--ink);
  background: rgba(90, 31, 39, 0.5);
}

.method-slot {
  border-left: 1px solid rgba(184, 154, 94, 0.46);
  padding-left: 12px;
  color: var(--quiet);
  font-size: 0.9rem;
  line-height: 1.55;
}

.form-intro,
.field-help,
.privacy-note {
  margin: -6px 0 0;
  color: var(--quiet);
  font-size: 0.9rem;
  line-height: 1.55;
}

.form-intro {
  margin: 0;
  color: #fff2d9;
  font-style: italic;
}

.advanced-options {
  border: 1px solid rgba(226, 205, 166, 0.18);
  border-radius: 8px;
  padding: 12px 14px;
  background: rgba(12, 13, 18, 0.36);
}

.advanced-options summary {
  color: var(--gold);
  cursor: pointer;
  font-family: Arial, sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.advanced-content {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

.form-error {
  margin: 0;
  color: #ffd8d8;
  font-size: 0.92rem;
}

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  border: 1px solid rgba(184, 154, 94, 0.8);
  border-radius: 999px;
  padding: 12px 20px;
  color: #fff4dd;
  background: linear-gradient(180deg, rgba(90, 31, 39, 0.96), rgba(52, 24, 31, 0.96));
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, opacity 160ms ease;
}

.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(184, 154, 94, 0.58);
  border-radius: 999px;
  padding: 9px 15px;
  color: #fff4dd;
  background: rgba(16, 17, 22, 0.68);
  cursor: pointer;
}

.primary-button:hover {
  transform: translateY(-1px);
  border-color: rgba(243, 234, 219, 0.76);
}

.primary-button:disabled {
  cursor: wait;
  opacity: 0.68;
  transform: none;
}

.empty-result {
  display: grid;
  min-height: 230px;
  place-items: center;
  border-radius: 8px;
  padding: 28px;
  color: var(--muted);
  text-align: center;
}

.result-panel {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 22px;
  border-radius: 8px;
  padding: 22px;
}

.symbol-card {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  place-items: center;
  overflow: hidden;
  margin: 0;
  min-height: 236px;
  border: 1px solid rgba(184, 154, 94, 0.38);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(243, 234, 219, 0.08), rgba(90, 31, 39, 0.12)),
    var(--paper);
  color: var(--gold);
  text-align: center;
}

.symbol-card img {
  width: 100%;
  height: 100%;
  max-height: 310px;
  object-fit: contain;
  padding: 10px;
  background: rgba(8, 8, 11, 0.32);
}

.card-caption {
  display: grid;
  gap: 2px;
  width: 100%;
  border-top: 1px solid rgba(184, 154, 94, 0.24);
  padding: 10px 8px 11px;
  background: rgba(16, 17, 22, 0.74);
}

.card-number {
  color: var(--gold);
  font-family: Arial, sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.card-name {
  color: #fff7e8;
  font-size: 0.95rem;
  line-height: 1.25;
}

.skeleton-card {
  position: relative;
}

.skeleton-card::after {
  content: "";
  width: 46px;
  height: 46px;
  border: 1px solid rgba(184, 154, 94, 0.38);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 900ms linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.result-copy h2 {
  margin: 0;
  color: #fff7e8;
  font-size: 1.6rem;
  font-weight: 400;
}

.symbol-name {
  margin: 6px 0 18px;
  color: var(--gold);
}

.card-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin: -6px 0 18px;
  padding: 0;
  list-style: none;
}

.card-keywords li {
  border-bottom: 1px solid rgba(184, 154, 94, 0.34);
  padding: 0 0 3px;
  color: #cfc4b3;
  background: transparent;
  font-family: Arial, sans-serif;
  font-size: 0.73rem;
  letter-spacing: 0.04em;
  text-transform: lowercase;
}

.reframed-question,
.tarot-phrase {
  color: #fff2d9 !important;
  font-style: italic;
}

.result-copy p {
  color: var(--muted);
  line-height: 1.7;
}

.soft-guidance {
  color: var(--ink) !important;
}

.reading-section,
.symbolic-act {
  border-left: 1px solid rgba(184, 154, 94, 0.38);
  padding-left: 12px;
}

.symbolic-act {
  color: #fff2d9 !important;
}

.support-note {
  border-left: 2px solid rgba(184, 154, 94, 0.68);
  margin: 16px 0;
  padding: 10px 0 10px 14px;
  color: #fff2d9 !important;
  background: linear-gradient(90deg, rgba(184, 154, 94, 0.08), transparent);
}

.integration-question {
  border-top: 1px solid var(--line);
  margin-top: 18px;
  padding-top: 16px;
  color: #fff2d9 !important;
  font-style: italic;
}

.result-note {
  color: var(--quiet) !important;
  font-size: 0.86rem;
}

.contact-panel {
  border-top: 1px solid var(--line);
  margin-top: 20px;
  padding-top: 18px;
}

.contact-panel h3 {
  margin: 0 0 8px;
  color: #fff7e8;
  font-size: 1rem;
  font-weight: 400;
}

.contact-panel p {
  margin: 0 0 12px;
}

.contact-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}

.consent-row {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  margin: 8px 0 12px;
  color: var(--quiet);
  font-size: 0.86rem;
  line-height: 1.45;
}

.consent-row input {
  width: auto;
  margin-top: 3px;
}

.copy-message {
  margin-top: 10px !important;
  color: var(--gold) !important;
  font-size: 0.86rem;
}

.ethical-note {
  max-width: 760px;
  margin-top: 34px;
  color: var(--quiet);
  font-size: 0.83rem;
  line-height: 1.6;
}

@media (max-width: 820px) {
  .app-shell {
    width: min(100% - 24px, 680px);
    padding-top: 34px;
  }

  .experience-grid,
  .result-panel {
    grid-template-columns: 1fr;
  }

  .symbol-card {
    width: min(170px, 100%);
    min-height: 245px;
    justify-self: center;
  }

  .symbol-card img {
    max-height: 260px;
  }

  .contact-fields {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  h1 {
    font-size: 2.55rem;
  }

  .question-form,
  .result-panel,
  .empty-result {
    padding: 18px;
  }

  .primary-button {
    width: 100%;
  }

  .area-pill span {
    min-height: 40px;
    padding: 9px 14px;
  }
}
