:root {
  --ink: #fff8ed;
  --ink-strong: #ffffff;
  --muted: #c9bed5;
  --paper: rgba(255, 255, 255, 0.1);
  --paper-strong: rgba(255, 255, 255, 0.16);
  --line: rgba(255, 255, 255, 0.17);
  --line-strong: rgba(255, 255, 255, 0.26);
  --night: #0b0b17;
  --violet: #8f7cff;
  --gold: #f8bd73;
  --aqua: #69e6da;
  --rose: #ff8db7;
  --green: #9bf0b5;
  --shadow: 0 24px 90px rgba(0, 0, 0, 0.33);
  --radius-xl: 34px;
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 12px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 16% 6%, rgba(143, 124, 255, 0.34), transparent 34rem),
    radial-gradient(circle at 90% 18%, rgba(105, 230, 218, 0.2), transparent 30rem),
    radial-gradient(circle at 50% 100%, rgba(248, 189, 115, 0.16), transparent 34rem),
    linear-gradient(145deg, #0b0b17 0%, #151125 52%, #080913 100%);
  overflow-x: hidden;
}

button,
input,
select,
textarea { font: inherit; }
button { cursor: pointer; }

.cosmos {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.cosmos span {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  box-shadow: 0 0 22px rgba(255, 255, 255, 0.7);
  animation: float 10s ease-in-out infinite;
}

.cosmos span:nth-child(1) { left: 8%; top: 22%; animation-delay: 0s; }
.cosmos span:nth-child(2) { left: 78%; top: 14%; animation-delay: -3s; }
.cosmos span:nth-child(3) { left: 88%; top: 64%; animation-delay: -6s; }
.cosmos span:nth-child(4) { left: 24%; top: 78%; animation-delay: -8s; }

@keyframes float {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); opacity: 0.3; }
  50% { transform: translate3d(18px, -26px, 0) scale(1.5); opacity: 0.9; }
}

.app-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 64px;
  position: relative;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
  align-items: stretch;
  margin-bottom: 18px;
}

.hero-copy,
.hero-card,
.card,
.stepper {
  border: 1px solid var(--line);
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.06));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-copy {
  border-radius: var(--radius-xl);
  padding: 40px;
}

.hero-card {
  border-radius: var(--radius-xl);
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 20px;
  min-height: 250px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--aqua);
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1, h2, h3, p { margin-top: 0; }

h1 {
  max-width: 790px;
  margin-bottom: 18px;
  font-size: clamp(2.5rem, 6.5vw, 5.65rem);
  line-height: 0.94;
  letter-spacing: -0.075em;
}

h2 {
  margin-bottom: 12px;
  font-size: clamp(1.75rem, 3.2vw, 2.65rem);
  line-height: 1;
  letter-spacing: -0.05em;
}

h3 { margin-bottom: 12px; font-size: 1.12rem; }
p { line-height: 1.75; }

.hero-lead,
.panel-heading p,
.hero-card p,
.card p,
li { color: var(--muted); }
.hero-lead { max-width: 720px; font-size: 1.06rem; }
.hero-card p { margin: 0; }

.orbit-mark {
  width: 104px;
  height: 104px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  display: grid;
  place-items: center;
  position: relative;
}

.orbit-mark::before,
.orbit-mark::after {
  content: "";
  position: absolute;
  inset: 16px;
  border: 1px solid rgba(248, 189, 115, 0.42);
  border-radius: 999px;
  transform: rotate(35deg) scaleX(1.55);
}

.orbit-mark::after {
  transform: rotate(-35deg) scaleX(1.55);
  border-color: rgba(105, 230, 218, 0.38);
}

.orbit-mark span {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--gold);
  box-shadow: 0 0 24px rgba(248, 189, 115, 0.8);
}

.stepper {
  position: sticky;
  top: 12px;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  border-radius: 999px;
  padding: 8px;
  margin-bottom: 24px;
}

.step {
  border: 0;
  border-radius: 999px;
  padding: 12px 14px;
  color: var(--muted);
  background: transparent;
  font-weight: 900;
}

.step span {
  display: inline-flex;
  margin-right: 8px;
  color: rgba(255, 255, 255, 0.56);
}

.step.is-active {
  color: #17111e;
  background: linear-gradient(135deg, var(--gold), #ffe0ad);
}

.step.is-active span { color: rgba(23, 17, 30, 0.6); }

.panel { display: none; }
.panel.is-active { display: block; }

.panel-heading {
  margin: 32px 0 18px;
}

.with-actions {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
}

.layout-two {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 350px;
  gap: 18px;
}

.card {
  border-radius: var(--radius-xl);
  padding: 24px;
}

.form-card { display: grid; gap: 16px; }

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 850;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 13px 14px;
  color: var(--ink-strong);
  background: rgba(8, 9, 19, 0.72);
  outline: none;
}

textarea { resize: vertical; }

input:focus,
select:focus,
textarea:focus {
  border-color: var(--aqua);
  box-shadow: 0 0 0 4px rgba(105, 230, 218, 0.12);
}

.field-grid { display: grid; gap: 14px; }
.field-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.field-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.advanced {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 14px;
  background: rgba(255, 255, 255, 0.055);
}

.advanced summary {
  color: var(--ink);
  font-weight: 900;
  cursor: pointer;
}

.advanced .field-grid { margin-top: 14px; }

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.action-row.compact { justify-content: flex-end; }

.primary,
.secondary,
.ghost {
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 12px 18px;
  font-weight: 950;
}

.primary {
  color: #17111e;
  background: linear-gradient(135deg, var(--gold), #ffe0ad);
}

.secondary {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--line);
}

.ghost {
  color: var(--muted);
  background: transparent;
  border-color: var(--line);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.promise-card ul,
.card ul,
.card ol {
  margin: 0;
  padding-left: 1.15rem;
  line-height: 1.85;
}

.promise-card li::marker,
.card li::marker { color: var(--aqua); }

.hidden { display: none !important; }
.empty { text-align: center; }

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.summary-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px;
  background: rgba(255, 255, 255, 0.08);
}

.summary-card small {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.78rem;
  font-weight: 900;
}

.summary-card strong {
  display: block;
  margin: 12px 0 6px;
  font-size: 1.35rem;
}

.summary-card p { margin: 0; font-size: 0.92rem; }

.chart-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}

.card-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.card-title-row h3 { margin: 0; }
.card-title-row span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.8rem;
  font-weight: 850;
}

.south-chart {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(4, minmax(80px, auto));
  gap: 6px;
}

.sign-cell {
  min-height: 80px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px;
  background: rgba(8, 9, 19, 0.42);
}

.sign-cell.is-empty {
  border-color: transparent;
  background: transparent;
}

.sign-label {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 950;
}

.planet-stack { display: flex; flex-wrap: wrap; gap: 6px; }
.planet-pill {
  border-radius: 999px;
  padding: 5px 8px;
  color: #10111f;
  background: var(--aqua);
  font-size: 0.74rem;
  font-weight: 950;
}
.planet-pill.asc { background: var(--gold); }

.table-wrap { overflow-x: auto; }
table { width: 100%; min-width: 660px; border-collapse: collapse; }
th, td { border-bottom: 1px solid var(--line); padding: 12px 10px; text-align: left; }
th { color: var(--muted); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; }
td { color: var(--ink); }

.dasha-list { display: grid; gap: 10px; }
.dasha-item {
  display: grid;
  grid-template-columns: 96px 1fr auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 13px;
  background: rgba(255, 255, 255, 0.06);
}
.dasha-lord { color: var(--gold); font-weight: 950; }
.dasha-bar { height: 8px; border-radius: 999px; overflow: hidden; background: rgba(255, 255, 255, 0.12); }
.dasha-fill { height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--violet), var(--aqua)); }
.dasha-dates { color: var(--muted); font-size: 0.84rem; white-space: nowrap; }

.next-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}
.next-card h3 { margin-bottom: 4px; }
.next-card p { margin: 0; }

.loading-card {
  display: flex;
  gap: 18px;
  align-items: center;
}

.spinner {
  width: 72px;
  height: 72px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  display: grid;
  place-items: center;
  position: relative;
  flex: 0 0 auto;
}
.spinner::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: inherit;
  border: 2px solid transparent;
  border-top-color: var(--gold);
  border-right-color: var(--aqua);
  animation: spin 1.15s linear infinite;
}
.spinner span {
  width: 16px;
  height: 16px;
  border-radius: inherit;
  background: var(--gold);
  box-shadow: 0 0 22px rgba(248, 189, 115, 0.8);
}
@keyframes spin { to { transform: rotate(360deg); } }

.report {
  min-height: 260px;
  color: #231729;
  background: linear-gradient(180deg, rgba(255, 249, 238, 0.98), rgba(250, 235, 215, 0.96));
}
.report h2,
.report h3,
.report p,
.report li { color: #231729; }
.report .report-kicker {
  margin-bottom: 10px;
  color: #9b6728;
  font-size: 0.75rem;
  font-weight: 950;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.report-body {
  white-space: normal;
  line-height: 1.88;
  font-size: 1.02rem;
}
.report-placeholder {
  color: rgba(35, 23, 41, 0.62);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 60;
  transform: translateX(-50%) translateY(20px);
  opacity: 0;
  pointer-events: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 12px 18px;
  color: var(--ink);
  background: rgba(10, 11, 23, 0.92);
  box-shadow: var(--shadow);
  transition: 0.22s ease;
}
.toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 920px) {
  .hero,
  .layout-two,
  .chart-layout,
  .summary-grid { grid-template-columns: 1fr; }
  .stepper { grid-template-columns: repeat(2, 1fr); border-radius: var(--radius-lg); }
  .step { border-radius: var(--radius-md); }
  .with-actions,
  .next-card { display: grid; }
  .action-row.compact { justify-content: flex-start; }
}

@media (max-width: 620px) {
  .app-shell { width: min(100% - 20px, 1180px); padding-top: 14px; }
  .hero-copy,
  .hero-card,
  .card { padding: 18px; }
  .field-grid.two,
  .field-grid.three { grid-template-columns: 1fr; }
  .south-chart { grid-template-rows: repeat(4, minmax(72px, auto)); }
  .dasha-item { grid-template-columns: 1fr; }
}

@media print {
  body { background: white; }
  .hero,
  .stepper,
  .panel-heading,
  #report-empty,
  #report-loading,
  .toast { display: none !important; }
  .app-shell { width: 100%; padding: 0; }
  .panel { display: none !important; }
  #tab-report,
  #report-content { display: block !important; }
  .report { box-shadow: none; border: 0; background: white; }
}

.feedback-card {
  margin-top: 18px;
  display: grid;
  gap: 16px;
}

.rating-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.rating-button {
  width: 46px;
  height: 46px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.08);
  font-weight: 950;
}

.rating-button.is-active {
  color: #17111e;
  border-color: transparent;
  background: linear-gradient(135deg, var(--gold), #ffe0ad);
  box-shadow: 0 0 24px rgba(248, 189, 115, 0.24);
}

.report-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 18px;
}

.report-meta span {
  border: 1px solid rgba(35, 23, 41, 0.14);
  border-radius: 999px;
  padding: 6px 10px;
  color: rgba(35, 23, 41, 0.68);
  background: rgba(255, 255, 255, 0.44);
  font-size: 0.8rem;
  font-weight: 850;
}

.report-section-title {
  margin: 1.35rem 0 0.55rem;
  line-height: 1.35;
  font-size: 1.18rem;
  font-weight: 950;
}

.report-body p {
  margin: 0 0 0.9rem;
}

.report-body ul,
.report-body ol {
  margin: 0 0 0.9rem;
  padding-left: 1.25rem;
}

.report-body li {
  margin: 0.28rem 0;
}

.report-body strong {
  font-weight: 950;
}

.report-body em {
  color: rgba(35, 23, 41, 0.78);
}

.report-body code {
  border-radius: 8px;
  padding: 0.08rem 0.32rem;
  color: #6f4215;
  background: rgba(166, 107, 39, 0.1);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
}

.report-body blockquote {
  margin: 1rem 0;
  padding: 0.82rem 1rem;
  border-left: 4px solid rgba(166, 107, 39, 0.36);
  border-radius: 14px;
  color: rgba(35, 23, 41, 0.78);
  background: rgba(255, 255, 255, 0.42);
}

.language-switch {
  margin-top: 18px;
  max-width: 240px;
}
.language-switch select {
  margin-top: 6px;
}
.step b {
  font: inherit;
}
.field-hint {
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}
.prompt-settings textarea {
  min-height: 110px;
}
.engine-note {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.92rem;
}
.conversion-card {
  margin-top: 18px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
}
.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
.site-footer {
  margin: 28px 0 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.9rem;
}
.site-footer a {
  color: inherit;
}
@media (max-width: 720px) {
  .conversion-card {
    align-items: stretch;
    flex-direction: column;
  }
}
