:root {
  --bg-deep: #120728;
  --bg-mid: #2a0f45;
  --bg-outer: #051d36;

  --card-bg: rgba(28, 10, 56, 0.94);
  --card-border: rgba(255, 255, 255, 0.08);

  --text-main: #f5efe9;
  --text-soft: #ddd3eb;
  --text-muted: #b8accf;
  --accent: #efc56b;

  --panel-bg: rgba(82, 43, 120, 0.16);
  --field-bg: rgba(108, 67, 148, 0.2);
  --field-border: rgba(255, 255, 255, 0.1);

  --chip-bg: linear-gradient(180deg, rgba(90, 51, 125, 0.92) 0%, rgba(71, 38, 99, 0.92) 100%);
  --chip-hover: linear-gradient(180deg, rgba(106, 64, 141, 0.96) 0%, rgba(84, 48, 111, 0.96) 100%);
  --chip-active: linear-gradient(180deg, rgba(129, 82, 172, 0.98) 0%, rgba(100, 56, 140, 0.98) 100%);

  --gold-bg: linear-gradient(180deg, #efc56b 0%, #d8a93f 100%);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);

  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: "Inter", sans-serif;
  background: #0d1630;
  color: var(--text-main);
}

body {
  position: relative;
  overflow-x: hidden;
}

.hidden {
  display: none !important;
}

.page-bg {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at top center, rgba(150, 67, 180, 0.26), transparent 24%),
    linear-gradient(180deg, #3f114f 0%, #26093f 32%, #18052e 65%, #071f38 100%);
  z-index: -2;
}

.page-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 15%, rgba(255, 255, 255, 0.05), transparent 12%),
    radial-gradient(circle at 80% 10%, rgba(255, 255, 255, 0.04), transparent 10%),
    radial-gradient(circle at 70% 80%, rgba(153, 87, 205, 0.12), transparent 20%);
  z-index: -1;
}

.app-shell {
  min-height: 100vh;
  padding: 42px 20px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.card {
  width: min(980px, 100%);
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  padding: 36px 32px 34px;
  backdrop-filter: blur(8px);
}

.icon-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 10px;
}

.tool-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  font-size: 24px;
  line-height: 1;
}

.eyebrow {
  text-align: center;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 0 0 10px;
}

h1 {
  margin: 0;
  text-align: center;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2.8rem, 5vw, 4.05rem);
  line-height: 1;
  font-weight: 600;
  color: var(--text-main);
}

.subtitle {
  text-align: center;
  color: var(--text-soft);
  font-size: 1.14rem;
  line-height: 1.6;
  max-width: 800px;
  margin: 18px auto 26px;
}

.progress-wrap {
  margin: 0 auto 28px;
  max-width: 760px;
}

.progress-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--text-muted);
  font-size: 0.94rem;
  margin-bottom: 8px;
}

.progress-bar {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.progress-fill {
  width: 10%;
  height: 100%;
  border-radius: 999px;
  background: var(--gold-bg);
  transition: width 0.3s ease;
}

.journey-intro,
.step-panel,
.summary-card {
  background: var(--panel-bg);
  border: 1px solid var(--field-border);
  border-radius: var(--radius-lg);
  padding: 22px 20px 20px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.journey-intro {
  text-align: center;
  max-width: 820px;
  margin: 0 auto;
}

.journey-intro h2,
.summary-section h2,
.step-head h2,
.summary-card h3 {
  font-family: "Cormorant Garamond", serif;
  color: var(--accent);
  margin: 0 0 10px;
  font-weight: 600;
}

.journey-intro h2,
.summary-section h2 {
  font-size: clamp(2rem, 3vw, 2.5rem);
}

.journey-intro p {
  color: var(--text-soft);
  line-height: 1.7;
  margin: 0 0 18px;
}

.journey-steps {
  max-width: 860px;
  margin: 0 auto;
}

.step-panel {
  display: none;
}

.step-panel.active {
  display: block;
}

.step-head {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.step-number {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  font-weight: 600;
  font-size: 0.95rem;
}

.step-head h2 {
  font-size: 2rem;
}

.step-head p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.6;
}

label,
.field-label {
  display: block;
  color: var(--text-main);
  margin-bottom: 10px;
  font-weight: 600;
}

.helper-note {
  color: var(--text-soft);
  margin: 0 0 14px;
  line-height: 1.7;
}

textarea {
  width: 100%;
  min-height: 150px;
  resize: vertical;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  background: var(--field-bg);
  color: var(--text-main);
  font-family: "Inter", sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  padding: 16px;
  outline: none;
}

textarea::placeholder {
  color: #c8bdd9;
  opacity: 1;
}

textarea:focus,
input[type="range"]:focus {
  border-color: rgba(239, 197, 107, 0.55);
  box-shadow: 0 0 0 3px rgba(239, 197, 107, 0.12);
}

.field-group + .field-group {
  margin-top: 20px;
}

.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.chip {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--chip-bg);
  color: var(--text-main);
  border-radius: 999px;
  padding: 10px 14px;
  cursor: pointer;
  font: inherit;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.chip:hover {
  transform: translateY(-1px);
  background: var(--chip-hover);
}

.chip.active {
  background: var(--chip-active);
  box-shadow: 0 10px 20px rgba(42, 10, 73, 0.35);
}

.range-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

input[type="range"] {
  width: 100%;
  accent-color: #efc56b;
}

#intensityValue {
  min-width: 26px;
  text-align: center;
  font-weight: 600;
  color: var(--accent);
}

.example-toggle {
  margin-bottom: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--field-border);
  border-radius: 16px;
  padding: 12px 14px;
}

.example-toggle summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--text-main);
}

.example-list {
  margin: 12px 0 0 18px;
  color: var(--text-soft);
  line-height: 1.7;
  padding: 0;
}

.nav-row,
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 22px;
}

.nav-row {
  justify-content: space-between;
}

.action-btn {
  border: none;
  border-radius: 999px;
  padding: 14px 22px;
  font-family: "Inter", sans-serif;
  font-size: 0.98rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease, background 0.2s ease;
}

.action-btn:hover {
  transform: translateY(-1px);
}

.action-btn.primary {
  background: var(--gold-bg);
  color: #2a1637;
}

.action-btn.secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.action-btn.ghost {
  background: transparent;
  color: var(--text-soft);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.summary-section {
  max-width: 860px;
  margin: 0 auto;
}

.summary-section h2 {
  text-align: center;
  margin-bottom: 18px;
}

.summary-card + .summary-card {
  margin-top: 16px;
}

.summary-copy,
.summary-details,
.loop-line,
.micro-output,
.closing-card p {
  color: var(--text-soft);
  line-height: 1.8;
  font-size: 1rem;
}

.summary-details p {
  margin: 0 0 10px;
}

.summary-details strong,
.summary-copy strong {
  color: var(--text-main);
}

.loop-line {
  color: #f3d78a;
  font-weight: 600;
}

.micro-output {
  color: var(--text-main);
  font-weight: 600;
}

@media (max-width: 640px) {
  .card {
    padding: 28px 20px;
  }

  .step-panel,
  .journey-intro,
  .summary-card {
    padding: 20px 16px 18px;
  }

  .step-head h2 {
    font-size: 1.65rem;
  }

  textarea {
    min-height: 130px;
  }

  .nav-row {
    justify-content: flex-start;
  }
}