:root {
  --bg: #fbfaf7;
  --bg-elevated: #f3f0e8;
  --panel: rgba(255, 255, 255, 0.72);
  --panel-strong: rgba(255, 255, 255, 0.86);
  --border: rgba(32, 28, 22, 0.10);
  --text: #171614;
  --muted: #6f6a61;
  --accent: #d9c7ff;
  --accent-strong: #bca7f2;
  --accent-soft: rgba(217, 199, 255, 0.24);
  --accent-glow: rgba(188, 167, 242, 0.18);
  --accent-border: rgba(146, 126, 196, 0.22);
  --button-text: #4f3f7f;
  --shadow: 0 24px 70px rgba(42, 36, 25, 0.08);
  --settings-shell: rgba(255, 255, 255, 0.34);
  --settings-step-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.93) 0%, rgba(255, 255, 255, 0.88) 100%);
  --settings-card-bg: rgba(255, 255, 255, 0.96);
  --settings-card-border: rgba(45, 35, 66, 0.09);
  --settings-icon-bg: linear-gradient(180deg, rgba(255, 245, 249, 0.98) 0%, rgba(255, 240, 247, 0.88) 100%);
  --settings-icon-border: rgba(255, 127, 171, 0.24);
  --settings-icon-color: #ff5f98;
  --settings-title: #66558f;
  --settings-text: #4f4b53;
  --hero-copy: #61597c;
  --settings-kicker: #ff5f98;
  --settings-option-icon: #9a4dff;
  --settings-selected: rgba(255, 245, 250, 0.98);
  --settings-selected-border: rgba(255, 95, 152, 0.34);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Onest", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 14% 8%, rgba(217, 199, 255, 0.34), transparent 34%),
    radial-gradient(circle at 82% 12%, rgba(167, 199, 255, 0.28), transparent 32%),
    linear-gradient(180deg, #fbfaf7 0%, #faf8f3 100%);
  transition: background 320ms ease, color 240ms ease;
}

.ambient-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 14% 18%, rgba(217, 199, 255, 0.38), transparent 26%),
    radial-gradient(circle at 82% 14%, rgba(167, 199, 255, 0.32), transparent 24%),
    radial-gradient(circle at 68% 76%, rgba(217, 199, 255, 0.3), transparent 26%),
    radial-gradient(circle at 38% 88%, rgba(245, 198, 165, 0.28), transparent 24%);
  filter: blur(32px);
  opacity: 0.92;
  animation: ambientDrift 18s ease-in-out infinite alternate;
}

.grain-overlay {
  position: fixed;
  inset: -50%;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.045;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='3' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='1'/%3E%3C/svg%3E");
  animation: grainShift 2.2s steps(3) infinite;
}

@keyframes grainShift {
  0% {
    transform: translate(0, 0);
  }

  25% {
    transform: translate(-2.6%, 2%);
  }

  50% {
    transform: translate(2%, -2.8%);
  }

  75% {
    transform: translate(-1.4%, -2%);
  }

  100% {
    transform: translate(0, 0);
  }
}


button,
input {
  font: inherit;
}

img {
  display: block;
  max-width: 100%;
}

.app-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 56px 0 72px;
  position: relative;
  z-index: 1;
}

.app-view {
  min-height: calc(100vh - 128px);
}

.app-view[hidden] {
  display: none !important;
}

#viewResult .result-panel,
#viewLoading .loading-view {
  margin-top: 0;
}

.hero {
  position: relative;
  margin-bottom: 16px;
  overflow: visible;
  isolation: isolate;
  padding: 6px 0 14px;
}

.hero::before {
  content: none;
}

.hero::after {
  content: "";
  position: absolute;
  right: 5%;
  top: 12%;
  width: 470px;
  height: 290px;
  z-index: -1;
  border: 1.5px solid rgba(255, 255, 255, 0.56);
  border-left: 0;
  border-bottom: 0;
  border-radius: 50%;
  opacity: 0.72;
  transform: rotate(10deg);
}

.hero-orbit {
  position: absolute;
  right: 15%;
  top: 36%;
  width: 360px;
  height: 190px;
  z-index: -1;
  border-top: 1px solid rgba(255, 255, 255, 0.48);
  border-right: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  opacity: 0.58;
  transform: rotate(-7deg);
}

.hero-spark {
  position: absolute;
  pointer-events: none;
  z-index: 0;
}

.hero-spark::before,
.hero-spark::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
}

.hero-spark--main {
  top: 16%;
  right: 4.2%;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.96) 0 9%, rgba(255, 233, 250, 0.94) 10%, rgba(255, 185, 242, 0.72) 18%, rgba(255, 185, 242, 0) 34%),
    url("data:image/svg+xml,%3Csvg viewBox='0 0 120 120' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3ClinearGradient id='starBeam' x1='0%25' y1='0%25' x2='100%25' y2='100%25'%3E%3Cstop offset='0%25' stop-color='%23ffffff'/%3E%3Cstop offset='34%25' stop-color='%23ffd8fb'/%3E%3Cstop offset='72%25' stop-color='%23ff8de8'/%3E%3Cstop offset='100%25' stop-color='%23f46cff'/%3E%3C/linearGradient%3E%3CradialGradient id='starCore' cx='50%25' cy='50%25' r='50%25'%3E%3Cstop offset='0%25' stop-color='%23ffffff' stop-opacity='1'/%3E%3Cstop offset='42%25' stop-color='%23ffe7fc' stop-opacity='.95'/%3E%3Cstop offset='100%25' stop-color='%23ffb9f2' stop-opacity='0'/%3E%3C/radialGradient%3E%3C/defs%3E%3Cpath d='M60 8C64 38 82 56 112 60C82 64 64 82 60 112C56 82 38 64 8 60C38 56 56 38 60 8Z' fill='url(%23starBeam)'/%3E%3Cpath d='M60 18C63 41 79 57 102 60C79 63 63 79 60 102C57 79 41 63 18 60C41 57 57 41 60 18Z' fill='url(%23starCore)'/%3E%3Cpath d='M60 24C62 45 75 58 96 60C75 62 62 75 60 96C58 75 45 62 24 60C45 58 58 45 60 24Z' fill='%23ffffff' fill-opacity='.42'/%3E%3C/svg%3E");
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  filter:
    drop-shadow(0 0 12px rgba(255, 182, 238, 0.4)) drop-shadow(0 0 26px rgba(247, 171, 246, 0.26));
  animation: heroSparkFloat 5.8s ease-in-out infinite;
  transform: rotate(10deg);
}

.hero-spark--main::before,
.hero-spark--main::after {
  inset: 0;
  border-radius: 50%;
}

.hero-spark--main::before {
  background:
    radial-gradient(circle at 52% 48%, rgba(255, 255, 255, 0.88) 0 10%, rgba(255, 255, 255, 0.32) 18%, rgba(255, 255, 255, 0) 46%);
  filter: blur(3px);
}

.hero-spark--main::after {
  inset: 14%;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(255, 207, 248, 0.36) 48%, rgba(255, 255, 255, 0) 72%);
  clip-path: polygon(50% 0%, 66% 34%, 100% 50%, 66% 66%, 50% 100%, 34% 66%, 0% 50%, 34% 34%);
  opacity: 0.84;
}

.hero-spark--small {
  top: 48%;
  right: 29%;
  width: 18px;
  height: 18px;
  opacity: 0.95;
}

.hero-spark--tiny {
  top: 52%;
  right: 25%;
  width: 10px;
  height: 10px;
  opacity: 0.88;
}

.hero-spark--small::before,
.hero-spark--small::after,
.hero-spark--tiny::before,
.hero-spark--tiny::after {
  inset: 50% auto auto 50%;
  background: linear-gradient(90deg, rgba(255, 91, 153, 0) 0%, rgba(255, 91, 153, 0.92) 50%, rgba(255, 91, 153, 0) 100%);
  transform-origin: center;
}

.hero-spark--small::before,
.hero-spark--tiny::before {
  width: 100%;
  height: 2px;
  transform: translate(-50%, -50%) rotate(0deg);
}

.hero-spark--small::after,
.hero-spark--tiny::after {
  width: 2px;
  height: 100%;
  transform: translate(-50%, -50%) rotate(0deg);
}

.eyebrow,
.section-kicker,
.result-label {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero h1,
.section-heading h2,
#resultTitle {
  margin: 0;
  line-height: 1.05;
}

.hero .eyebrow,
.result-home-link {
  color: #8b6fe0;
}

.hero>.eyebrow,
.hero>h1 {
  position: relative;
  z-index: 1;
}

.section-kicker {
  margin-bottom: 6px;
  color: var(--settings-kicker);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
}

.hero h1 {
  max-width: 980px;
  color: transparent;
  font-size: 0;
  line-height: 0;
}

.hero h1::before {
  content: "";
  display: block;
  width: min(100%, 980px);
  margin-left: -78px;
  aspect-ratio: 2048 / 706;
  background: url("assets/hero-title.png") left center / contain no-repeat;
}

.section-heading h2 {
  color: var(--settings-title);
  font-weight: 500;
  font-size: clamp(1.02rem, 1.8vw, 1.22rem);
  line-height: 1.2;
}

.section-heading-note {
  color: var(--hero-copy);
  font-size: 0.78em;
  font-weight: 400;
}

.hero-copy {
  max-width: 620px;
  margin: 16px 0 0;
  color: var(--hero-copy);
  font-size: 1rem;
  line-height: 1.65;
  position: relative;
  z-index: 1;
}

.panel,
.result-panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  transition: border-color 260ms ease, box-shadow 260ms ease, background 260ms ease;
}

.panel {
  padding: 28px;
}

.settings-panel {
  padding: 8px;
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 212, 228, 0.28), transparent 28%),
    radial-gradient(circle at 0% 100%, rgba(222, 225, 255, 0.22), transparent 26%),
    var(--settings-shell);
  border-color: rgba(45, 35, 66, 0.08);
  box-shadow: 0 28px 72px rgba(42, 36, 25, 0.07);
}

.control-group+.control-group {
  margin-top: 12px;
}

.settings-step {
  padding: 14px;
  border: 1px solid rgba(45, 35, 66, 0.08);
  border-radius: 18px;
  background: var(--settings-step-bg);
  box-shadow: 0 10px 28px rgba(42, 36, 25, 0.04);
}

.section-heading {
  display: flex;
  align-items: stretch;
  gap: 12px;
  margin-bottom: 14px;
}

.section-heading-copy {
  flex: 1;
  min-width: 0;
}

.section-step-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  width: 44px;
  height: auto;
  min-height: 0;
  border-radius: 12px;
  border: 1px solid var(--settings-icon-border);
  background: var(--settings-icon-bg);
  color: var(--settings-icon-color);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
  flex-shrink: 0;
}

.section-step-icon svg {
  width: 20px;
  height: 20px;
}

.choice-grid,
.genre-grid,
.energy-row {
  display: grid;
  gap: 10px;
}

.choice-grid,
.energy-row {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

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

.choice-button,
.energy-button,
.genre-pill,
.vibe-card {
  border: 1px solid var(--settings-card-border);
  background: var(--settings-card-bg);
  color: var(--text);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.choice-button,
.energy-button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 42px;
  padding: 11px 14px;
  border-radius: 20px;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(37, 26, 67, 0.03);
}

@media (hover: hover) and (pointer: fine) {
  .choice-button:hover,
  .energy-button:hover,
  .genre-pill:hover,
  .vibe-card:hover {
    transform: translateY(-1px);
    border-color: rgba(154, 77, 255, 0.2);
    background: rgba(255, 255, 255, 0.99);
    box-shadow: 0 10px 22px rgba(42, 36, 25, 0.05);
  }
}

.option-copy {
  display: block;
  min-width: 0;
}

.option-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  color: var(--settings-option-icon);
  flex-shrink: 0;
}

.option-icon svg {
  width: 18px;
  height: 18px;
}

.choice-button strong,
.energy-button strong {
  display: block;
  margin-bottom: 0;
  color: var(--settings-text);
  font-size: 0.9rem;
  line-height: 1.35;
  font-weight: 500;
}

.choice-button .option-copy,
.energy-button .option-copy,
.genre-pill-label {
  color: var(--settings-text);
  font-size: 0.9rem;
  line-height: 1.35;
}

.choice-button .option-icon,
.energy-button .option-icon {
  color: var(--settings-option-icon);
}

.genre-pill {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 42px;
  padding: 11px 14px;
  border-radius: 12px;
  cursor: pointer;
}

.genre-pill.is-disabled {
  opacity: 0.58;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

@media (hover: hover) and (pointer: fine) {
  .genre-pill.is-disabled:hover {
    transform: none;
    border-color: var(--settings-card-border);
    background: var(--settings-card-bg);
    box-shadow: none;
  }
}

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

.genre-pill:not(.is-disabled):has(input:focus-visible) {
  outline: 2px solid var(--accent-strong);
  outline-offset: 2px;
}

.genre-pill-check {
  position: relative;
  display: inline-flex;
  width: 14px;
  height: 14px;
  border: 1px solid rgba(45, 35, 66, 0.28);
  border-radius: 3px;
  background: #fff;
  flex-shrink: 0;
}

.genre-pill-check::after {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: 1px;
  background: linear-gradient(180deg, #ff78a5 0%, #c867ff 100%);
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 180ms ease, transform 180ms ease;
}

.genre-pill-label {
  display: block;
  min-width: 0;
  color: var(--settings-text);
}

.vibe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.vibe-card {
  position: relative;
  padding: 0;
  border-radius: 22px;
  overflow: hidden;
  isolation: isolate;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
  transition: transform 900ms ease, box-shadow 420ms ease, border-color 260ms ease;
}

.vibe-card img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  transition: transform 1100ms ease;
}

.vibe-card.is-image-missing {
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 200, 224, 0.6) 0%, rgba(255, 200, 224, 0) 28%),
    linear-gradient(180deg, rgba(255, 246, 251, 0.98) 0%, rgba(248, 241, 255, 0.98) 100%);
}

.vibe-card.is-image-missing img {
  opacity: 0;
}

.vibe-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(17, 15, 24, 0.01) 0%, rgba(17, 15, 24, 0.03) 100%);
}

.vibe-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  box-shadow: inset 0 0 0 0 rgba(139, 111, 224, 0);
  transition: box-shadow 260ms ease, background 260ms ease;
}

@media (hover: hover) and (pointer: fine) {
  .vibe-card:hover {
    transform: translate3d(0, -2px, 0);
  }

  .vibe-card:hover img {
    transform: translate3d(0, -1px, 0) scale(1.008);
  }
}

.vibe-card-label {
  display: none;
}

.vibe-card.is-image-missing .vibe-card-label {
  position: absolute;
  inset: auto 0 0;
  z-index: 2;
  display: grid;
  gap: 6px;
  padding: 18px 16px 16px;
  background: linear-gradient(180deg, rgba(37, 23, 56, 0.04) 0%, rgba(37, 23, 56, 0.72) 100%);
}

.vibe-card.is-image-missing .vibe-card-label strong {
  margin-bottom: 0;
  color: #fff;
}

.vibe-card-label strong {
  display: block;
  margin-bottom: 4px;
  font-size: 1rem;
  font-weight: 700;
}

.vibe-card-label span {
  display: -webkit-box;
  color: rgba(255, 253, 248, 0.84);
  font-size: 0.9rem;
  line-height: 1.4;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.vibe-card-badge {
  display: none;
}

.choice-button.is-selected,
.energy-button.is-selected,
.genre-pill.is-selected {
  border-color: var(--settings-selected-border);
  background: var(--settings-selected);
  box-shadow: 0 0 0 1px rgba(255, 95, 152, 0.08), 0 12px 26px rgba(42, 36, 25, 0.06);
}

.choice-button.is-selected,
.energy-button.is-selected,
.genre-pill.is-selected {
  transform: translateY(0);
}

@media (hover: hover) and (pointer: fine) {
  .choice-button.is-selected:hover,
  .energy-button.is-selected:hover,
  .genre-pill.is-selected:hover {
    border-color: var(--settings-selected-border);
    background: var(--settings-selected);
    box-shadow: 0 0 0 1px rgba(255, 95, 152, 0.08), 0 12px 26px rgba(42, 36, 25, 0.06);
    transform: translateY(0);
  }
}

.genre-pill.is-selected .genre-pill-check {
  border-color: rgba(255, 95, 152, 0.52);
}

.genre-pill.is-selected .genre-pill-check::after {
  opacity: 1;
  transform: scale(1);
}

.vibe-card.is-selected {
  transform: translate3d(0, -2px, 0);
  border-color: var(--settings-selected-border);
  background: var(--settings-selected);
  box-shadow:
    0 0 0 1px rgba(255, 95, 152, 0.08),
    0 12px 26px rgba(42, 36, 25, 0.06);
}

.vibe-card.is-selected::before {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02) 0%, rgba(255, 95, 152, 0.04) 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.56);
}

.vibe-card.is-selected .vibe-card-badge {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.vibe-card.is-selected:hover {
  transform: translate3d(0, -2px, 0);
}

.vibe-card.is-selected .vibe-card-badge {
  display: inline-flex;
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--settings-selected-border);
  background: var(--settings-selected);
  color: var(--settings-title);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  box-shadow: 0 10px 24px rgba(42, 36, 25, 0.08);
  pointer-events: none;
}

.choice-button:focus-visible,
.energy-button:focus-visible,
.vibe-card:focus-visible,
.result-home-link:focus-visible,
.generate-button:focus-visible,
.secondary-button:focus-visible {
  outline: 2px solid var(--accent-strong);
  outline-offset: 2px;
}

.actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
}

.generate-button {
  width: 100%;
  padding: 18px 24px;
  border: 0;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  color: var(--button-text);
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 18px 40px rgba(42, 36, 25, 0.08), 0 8px 22px rgba(217, 199, 255, 0.22);
  transition: transform 180ms ease, opacity 180ms ease, box-shadow 220ms ease;
}

.generate-button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 22px 46px rgba(42, 36, 25, 0.1), 0 10px 24px rgba(167, 199, 255, 0.22);
}

.generate-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.form-hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.result-panel {
  margin-top: 26px;
  padding: 22px;
  opacity: 0;
  transform: translateY(18px);
  --result-accent: var(--accent);
  --result-accent-strong: var(--accent-strong);
  --result-accent-soft: var(--accent-soft);
  --result-accent-glow: var(--accent-glow);
  --result-accent-border: var(--accent-border);
  --result-button-text: #fffdfd;
  --result-text-primary: #3c3553;
  --result-text-secondary: rgba(255, 255, 255, 0.82);
  --result-editorial-kicker: color-mix(in srgb, var(--result-accent) 72%, #b57ae6 28%);
  --result-editorial-title: color-mix(in srgb, var(--result-accent) 66%, #d875a5 34%);
  --result-glass-top: rgba(255, 255, 255, 0.58);
  --result-glass-bottom: rgba(248, 243, 255, 0.48);
  --result-glass-border: rgba(232, 190, 255, 0.28);
  background:
    radial-gradient(circle at 10% 10%, rgba(255, 214, 235, 0.18), transparent 28%),
    radial-gradient(circle at 92% 8%, rgba(205, 222, 255, 0.16), transparent 24%),
    rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.24);
  box-shadow:
    0 18px 42px rgba(52, 40, 74, 0.06),
    0 0 44px color-mix(in srgb, var(--result-accent-glow) 78%, rgba(167, 199, 255, 0.18) 22%),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
  transition: opacity 260ms ease, transform 260ms ease;
}

.result-panel.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.result-panel .result-label,
.result-panel .detail-label {
  color: var(--result-editorial-kicker);
}

.result-panel .detail-label {
  color: color-mix(in srgb, var(--result-accent) 82%, #7545b6 18%);
}

.result-panel #resultTitle {
  color: var(--result-editorial-title);
}

.result-panel #resultTitle {
  text-shadow:
    0 10px 28px color-mix(in srgb, var(--result-accent-soft) 72%, transparent),
    0 0 28px color-mix(in srgb, var(--result-accent-glow) 62%, transparent);
}

.result-panel {
  border-color: color-mix(in srgb, var(--border) 72%, var(--result-accent-border) 28%);
  box-shadow:
    0 18px 46px rgba(52, 40, 74, 0.06),
    0 0 48px color-mix(in srgb, var(--result-accent-glow) 74%, rgba(167, 199, 255, 0.16) 26%),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.result-panel[data-result-theme="soft"] {
  --result-accent: #ff5fa4;
  --result-accent-strong: #ffc0dd;
  --result-accent-soft: rgba(255, 95, 164, 0.32);
  --result-accent-glow: rgba(255, 192, 221, 0.28);
  --result-accent-border: rgba(255, 95, 164, 0.28);
}

.result-panel[data-result-theme="dramatic"] {
  --result-accent: #8f73ff;
  --result-accent-strong: #d9cbff;
  --result-accent-soft: rgba(143, 115, 255, 0.34);
  --result-accent-glow: rgba(217, 203, 255, 0.28);
  --result-accent-border: rgba(143, 115, 255, 0.28);
}

.result-panel[data-result-theme="club"] {
  --result-accent: #42d3df;
  --result-accent-strong: #ffb6dd;
  --result-accent-soft: rgba(66, 211, 223, 0.32);
  --result-accent-glow: rgba(255, 182, 221, 0.26);
  --result-accent-border: rgba(66, 211, 223, 0.28);
}

.result-panel[data-result-theme="grounded"] {
  --result-accent: #67b6ea;
  --result-accent-strong: #d7ecff;
  --result-accent-soft: rgba(103, 182, 234, 0.3);
  --result-accent-glow: rgba(215, 236, 255, 0.26);
  --result-accent-border: rgba(103, 182, 234, 0.26);
}

.result-panel[data-result-theme="dreamy"] {
  --result-accent: #ea7fb9;
  --result-accent-strong: #f8c7e4;
  --result-accent-soft: rgba(234, 127, 185, 0.32);
  --result-accent-glow: rgba(248, 199, 228, 0.26);
  --result-accent-border: rgba(234, 127, 185, 0.28);
}

.result-panel[data-result-theme="bold"] {
  --result-accent: #ff5f98;
  --result-accent-strong: #ffb8db;
  --result-accent-soft: rgba(255, 95, 152, 0.32);
  --result-accent-glow: rgba(255, 184, 219, 0.28);
  --result-accent-border: rgba(255, 95, 152, 0.28);
}

.result-panel[data-result-theme="clean"] {
  --result-accent: #72aaff;
  --result-accent-strong: #d4e5ff;
  --result-accent-soft: rgba(114, 170, 255, 0.32);
  --result-accent-glow: rgba(212, 229, 255, 0.28);
  --result-accent-border: rgba(114, 170, 255, 0.26);
}

.result-panel[data-result-theme="playful"] {
  --result-accent: #c96cff;
  --result-accent-strong: #f0bfff;
  --result-accent-soft: rgba(201, 108, 255, 0.3);
  --result-accent-glow: rgba(240, 191, 255, 0.28);
  --result-accent-border: rgba(201, 108, 255, 0.26);
}

.result-card {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  min-height: 560px;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  background: transparent;
  box-shadow:
    0 28px 64px rgba(69, 54, 100, 0.12),
    0 0 34px color-mix(in srgb, var(--result-accent-glow) 68%, rgba(167, 199, 255, 0.16) 32%),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transform: translateZ(0);
  backface-visibility: hidden;
  animation: resultCardFloat 10s ease-in-out infinite alternate;
}

.result-card::before {
  content: "";
  position: absolute;
  left: -28%;
  top: -34%;
  width: 720px;
  height: 620px;
  z-index: 2;
  pointer-events: none;
  border-radius: 50%;
  background:
    url("data:image/svg+xml,%3Csvg viewBox='0 0 120 120' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3ClinearGradient id='starGlow' x1='0%25' y1='0%25' x2='100%25' y2='100%25'%3E%3Cstop offset='0%25' stop-color='%23ffffff'/%3E%3Cstop offset='40%25' stop-color='%23ffc6e7'/%3E%3Cstop offset='100%25' stop-color='%23a998ff'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M60 14C63 39 81 57 106 60C81 63 63 81 60 106C57 81 39 63 14 60C39 57 57 39 60 14Z' fill='url(%23starGlow)'/%3E%3C/svg%3E") no-repeat 28% 30% / 26px 26px,
    radial-gradient(ellipse 72% 64% at 28% 24%, rgba(255, 174, 220, 0.22) 0%, rgba(255, 174, 220, 0.1) 20%, rgba(255, 174, 220, 0) 64%),
    radial-gradient(ellipse 96% 86% at 18% 18%, rgba(185, 171, 255, 0.16) 0%, rgba(185, 171, 255, 0.06) 24%, rgba(185, 171, 255, 0) 74%);
  opacity: 0.72;
}

.result-card::after {
  content: "";
  position: absolute;
  right: -2%;
  top: 22%;
  width: 420px;
  height: 250px;
  z-index: 2;
  pointer-events: none;
  border-top: 1px solid rgba(255, 255, 255, 0.3);
  border-right: 1px solid color-mix(in srgb, var(--result-accent-border) 52%, rgba(255, 255, 255, 0.24) 48%);
  border-radius: 50%;
  opacity: 0.68;
  transform: rotate(-12deg);
}

.result-media {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  transform: scale(1.014);
  animation: resultImagePan 14s ease-in-out infinite alternate;
  will-change: transform;
  backface-visibility: hidden;
}

.result-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 68% center;
  filter: saturate(1.14) brightness(0.88) contrast(1.1);
  transform: translateZ(0);
  backface-visibility: hidden;
  pointer-events: none;
}

.result-gradient {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 112% 98% at -8% -10%,
      rgba(6, 2, 12, 0.98) 0%,
      rgba(10, 3, 18, 0.88) 18%,
      rgba(16, 6, 26, 0.68) 38%,
      rgba(20, 8, 30, 0.4) 58%,
      rgba(22, 8, 32, 0.18) 74%,
      rgba(22, 8, 32, 0.06) 86%,
      rgba(22, 8, 32, 0) 100%),
    linear-gradient(90deg,
      rgba(48, 16, 40, 0.84) 0%,
      rgba(47, 14, 42, 0.8) 16%,
      rgba(53, 16, 49, 0.48) 32%,
      rgba(43, 15, 55, 0.2) 48%,
      rgba(30, 13, 48, 0.06) 64%,
      rgba(24, 12, 47, 0) 80%),
    radial-gradient(circle at 24% 52%,
      rgba(233, 223, 255, 0.18) 0%,
      rgba(233, 223, 255, 0.08) 18%,
      rgba(233, 223, 255, 0) 38%),
    linear-gradient(180deg,
      rgba(255, 255, 255, 0.02) 0%,
      rgba(255, 255, 255, 0) 30%,
      rgba(196, 184, 244, 0.06) 100%);
  transform: translateZ(0);
  backface-visibility: hidden;
}

.result-vignette {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    radial-gradient(circle at 82% 50%,
      transparent 0%,
      rgba(255, 255, 255, 0.02) 42%,
      rgba(214, 226, 255, 0.08) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.01) 0%, rgba(228, 221, 248, 0.08) 100%);
  transform: translateZ(0);
  backface-visibility: hidden;
}

.result-spark {
  position: absolute;
  z-index: 3;
  pointer-events: none;
  display: none;
}

.result-spark::before,
.result-spark::after {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  background: linear-gradient(90deg, rgba(255, 238, 248, 0) 0%, rgba(255, 245, 251, 0.98) 50%, rgba(255, 226, 244, 0) 100%);
  transform-origin: center;
}

.result-spark::before {
  width: 100%;
  height: 2px;
  transform: translate(-50%, -50%);
}

.result-spark::after {
  width: 2px;
  height: 100%;
  transform: translate(-50%, -50%);
}

.result-spark--small {
  top: 21%;
  right: 10%;
  width: 28px;
  height: 28px;
  opacity: 0.98;
  filter: drop-shadow(0 0 14px rgba(255, 232, 245, 0.28));
  animation: heroSparkFloat 6.2s ease-in-out infinite;
}

.result-spark--tiny {
  top: 25%;
  right: 7%;
  width: 17px;
  height: 17px;
  opacity: 0.92;
  filter: drop-shadow(0 0 10px rgba(255, 232, 245, 0.24));
  animation: heroSparkFloat 7s ease-in-out infinite reverse;
}

.result-content {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 0;
  max-width: 520px;
  min-height: 540px;
  padding: 48px;
  animation: resultContentReveal 800ms ease both;
}

.result-content::before {
  content: none;
}

.result-content::after {
  content: "";
  position: absolute;
  top: 34px;
  right: 28px;
  width: 54px;
  height: 54px;
  z-index: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 120 120' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3ClinearGradient id='s' x1='0%25' y1='0%25' x2='100%25' y2='100%25'%3E%3Cstop offset='0%25' stop-color='%23ffffff'/%3E%3Cstop offset='38%25' stop-color='%23ffd9f3'/%3E%3Cstop offset='72%25' stop-color='%23cbb7ff'/%3E%3Cstop offset='100%25' stop-color='%239673f3'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M60 12C63 38 82 57 108 60C82 63 63 82 60 108C57 82 38 63 12 60C38 57 57 38 60 12Z' fill='url(%23s)'/%3E%3Ccircle cx='60' cy='60' r='10' fill='%23ffffff' fill-opacity='.72'/%3E%3C/svg%3E");
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  opacity: 0.88;
  filter: drop-shadow(0 0 18px rgba(255, 214, 239, 0.34));
  animation: heroSparkFloat 6.6s ease-in-out infinite;
}

.result-content>* {
  position: relative;
  z-index: 1;
}

.result-topbar {
  margin-bottom: 56px;
}

.result-home-link {
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  font-family: inherit;
  cursor: pointer;
  transition: color 180ms ease, opacity 180ms ease;
}

.result-home-link:hover {
  color: #8b6fe0;
}

.result-description {
  margin: 14px 0 10px;
  max-width: 52ch;
  color: var(--result-text-secondary);
  font-size: 1.02rem;
  line-height: 1.72;
  text-wrap: pretty;
}

.result-description:empty {
  display: none;
}

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

.result-grid {
  margin-top: 28px;
}

.meta-pill {
  padding: 10px 14px;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.56) 0%, rgba(247, 241, 255, 0.46) 100%);
  backdrop-filter: blur(18px) saturate(1.08);
  border: 1px solid rgba(232, 190, 255, 0.28);
  color: color-mix(in srgb, var(--result-text-primary) 88%, #4f3f7f 12%);
  font-size: 0.9rem;
  box-shadow:
    0 12px 28px rgba(160, 130, 210, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.result-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.result-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.detail-card {
  padding: 16px 16px 17px;
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.54) 0%, rgba(247, 241, 255, 0.46) 100%);
  backdrop-filter: blur(20px) saturate(1.08);
  border: 1px solid rgba(232, 190, 255, 0.28);
  box-shadow:
    0 12px 28px rgba(160, 130, 210, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.detail-card-wide {
  grid-column: 1 / -1;
}

.result-advice-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.movement-card {
  margin-top: 14px;
}

.result-card .meta-pill {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, rgba(251, 245, 255, 0.84) 100%);
  backdrop-filter: blur(24px) saturate(1.22);
  border-color: rgba(236, 196, 255, 0.58);
  color: rgba(58, 46, 96, 0.98);
  box-shadow:
    0 20px 38px rgba(140, 108, 205, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.result-card .detail-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88) 0%, rgba(250, 244, 255, 0.82) 100%);
  backdrop-filter: blur(26px) saturate(1.24);
  border-color: rgba(236, 196, 255, 0.58);
  box-shadow:
    0 20px 38px rgba(140, 108, 205, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.result-card .detail-label {
  color: color-mix(in srgb, var(--result-accent) 82%, #7a4fc0 18%);
  text-shadow: none;
}

.result-card .detail-value {
  color: rgba(60, 51, 90, 0.98);
}

.detail-label {
  margin: 0 0 8px;
  color: color-mix(in srgb, var(--result-accent) 82%, #7a4fc0 18%);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.detail-value {
  margin: 0;
  color: color-mix(in srgb, var(--result-text-primary) 92%, #433267 8%);
  line-height: 1.65;
  text-wrap: pretty;
}

.result-plan {
  margin: 0;
  padding-left: 20px;
  color: color-mix(in srgb, var(--result-text-primary) 92%, #433267 8%);
}

.result-plan li::marker {
  color: color-mix(in srgb, var(--result-accent) 82%, #7a4fc0 18%);
}

.result-plan li+li {
  margin-top: 8px;
}

.result-details-panel {
  margin-top: 16px;
}

.loading-view {
  min-height: calc(100vh - 140px);
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.loading-view::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 54%;
  width: min(92vw, 760px);
  height: min(92vw, 760px);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.52) 0 12%, rgba(255, 255, 255, 0.14) 28%, rgba(255, 255, 255, 0) 64%);
  transform: translate(-50%, -50%);
  opacity: 0.68;
  filter: blur(8px);
  z-index: -3;
}

.loading-ambient {
  position: absolute;
  inset: 6% 4% 10%;
  z-index: -4;
  pointer-events: none;
  background:
    radial-gradient(circle at 24% 26%, rgba(217, 199, 255, 0.28), transparent 22%),
    radial-gradient(circle at 76% 24%, rgba(167, 199, 255, 0.24), transparent 20%),
    radial-gradient(circle at 64% 74%, rgba(255, 193, 223, 0.22), transparent 24%),
    radial-gradient(circle at 34% 82%, rgba(245, 198, 165, 0.18), transparent 18%);
  filter: blur(18px);
  opacity: 0.95;
  animation: ambientDrift 16s ease-in-out infinite alternate;
}

.loading-orbit {
  position: absolute;
  right: 12%;
  top: 24%;
  width: 360px;
  height: 190px;
  z-index: -2;
  border-top: 1px solid rgba(255, 255, 255, 0.48);
  border-right: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  opacity: 0.54;
  transform: rotate(-9deg);
}

.loading-orbit::after {
  content: "";
  position: absolute;
  right: -18%;
  top: -30%;
  width: 450px;
  height: 280px;
  border: 1.5px solid rgba(255, 255, 255, 0.56);
  border-left: 0;
  border-bottom: 0;
  border-radius: 50%;
  opacity: 0.7;
  transform: rotate(14deg);
}

.loading-spark {
  position: absolute;
  pointer-events: none;
  z-index: -1;
}

.loading-spark::before,
.loading-spark::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
}

.loading-spark--main {
  top: 17%;
  right: 8%;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.96) 0 9%, rgba(255, 233, 250, 0.94) 10%, rgba(255, 185, 242, 0.68) 18%, rgba(255, 185, 242, 0) 34%),
    url("data:image/svg+xml,%3Csvg viewBox='0 0 120 120' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3ClinearGradient id='loadingBeam' x1='0%25' y1='0%25' x2='100%25' y2='100%25'%3E%3Cstop offset='0%25' stop-color='%23ffffff'/%3E%3Cstop offset='34%25' stop-color='%23ffd8fb'/%3E%3Cstop offset='72%25' stop-color='%23ff8de8'/%3E%3Cstop offset='100%25' stop-color='%23f46cff'/%3E%3C/linearGradient%3E%3CradialGradient id='loadingCore' cx='50%25' cy='50%25' r='50%25'%3E%3Cstop offset='0%25' stop-color='%23ffffff' stop-opacity='1'/%3E%3Cstop offset='42%25' stop-color='%23ffe7fc' stop-opacity='.95'/%3E%3Cstop offset='100%25' stop-color='%23ffb9f2' stop-opacity='0'/%3E%3C/radialGradient%3E%3C/defs%3E%3Cpath d='M60 8C64 38 82 56 112 60C82 64 64 82 60 112C56 82 38 64 8 60C38 56 56 38 60 8Z' fill='url(%23loadingBeam)'/%3E%3Cpath d='M60 18C63 41 79 57 102 60C79 63 63 79 60 102C57 79 41 63 18 60C41 57 57 41 60 18Z' fill='url(%23loadingCore)'/%3E%3Cpath d='M60 24C62 45 75 58 96 60C75 62 62 75 60 96C58 75 45 62 24 60C45 58 58 45 60 24Z' fill='%23ffffff' fill-opacity='.42'/%3E%3C/svg%3E");
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  filter:
    drop-shadow(0 0 12px rgba(255, 182, 238, 0.34)) drop-shadow(0 0 24px rgba(247, 171, 246, 0.2));
  animation: heroSparkFloat 6.2s ease-in-out infinite;
  transform: rotate(10deg);
}

.loading-spark--main::before {
  background:
    radial-gradient(circle at 52% 48%, rgba(255, 255, 255, 0.88) 0 10%, rgba(255, 255, 255, 0.32) 18%, rgba(255, 255, 255, 0) 46%);
  filter: blur(3px);
}

.loading-spark--main::after {
  inset: 14%;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(255, 207, 248, 0.36) 48%, rgba(255, 255, 255, 0) 72%);
  clip-path: polygon(50% 0%, 66% 34%, 100% 50%, 66% 66%, 50% 100%, 34% 66%, 0% 50%, 34% 34%);
  opacity: 0.82;
}

.loading-spark--small {
  top: 34%;
  left: 16%;
  width: 18px;
  height: 18px;
  opacity: 0.9;
  animation: heroSparkFloat 7.2s ease-in-out infinite reverse;
}

.loading-spark--tiny {
  right: 19%;
  bottom: 27%;
  width: 10px;
  height: 10px;
  opacity: 0.82;
  animation: heroSparkFloat 6.6s ease-in-out infinite;
}

.loading-spark--small::before,
.loading-spark--small::after,
.loading-spark--tiny::before,
.loading-spark--tiny::after {
  inset: 50% auto auto 50%;
  background: linear-gradient(90deg, rgba(255, 91, 153, 0) 0%, rgba(255, 91, 153, 0.9) 50%, rgba(255, 91, 153, 0) 100%);
  transform-origin: center;
}

.loading-spark--small::before,
.loading-spark--tiny::before {
  width: 100%;
  height: 2px;
  transform: translate(-50%, -50%);
}

.loading-spark--small::after,
.loading-spark--tiny::after {
  width: 2px;
  height: 100%;
  transform: translate(-50%, -50%);
}

.loading-card {
  width: min(720px, 100%);
  padding: 24px 20px;
  text-align: center;
  position: relative;
  z-index: 1;
}

.loading-kicker {
  margin: 0 0 20px;
  color: rgba(23, 22, 20, 0.46);
  font-size: 0.74rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.loading-message {
  margin: 0;
  min-height: 2.8rem;
  display: grid;
  place-items: center;
  color: color-mix(in srgb, var(--settings-title) 74%, var(--hero-copy) 26%);
  font-size: clamp(1.5rem, 3.1vw, 2.3rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.02em;
  white-space: nowrap;
  transition: opacity 280ms ease, transform 280ms ease;
}

.loading-message.is-switching {
  opacity: 0.28;
  transform: translateY(4px);
}

.loading-dots {
  display: inline-flex;
  gap: 8px;
  margin-top: 22px;
}

.loading-dots span {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(23, 22, 20, 0.32);
  box-shadow: 0 0 14px rgba(167, 199, 255, 0.14);
  animation: loadingDotPulse 1.2s ease-in-out infinite;
}

.loading-dots span:nth-child(2) {
  animation-delay: 0.16s;
}

.loading-dots span:nth-child(3) {
  animation-delay: 0.32s;
}

.secondary-button {
  width: 100%;
  align-self: flex-start;
  margin-top: 18px;
  padding: 18px 24px;
  border: 0;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  color: var(--button-text);
  font-weight: 700;
  cursor: pointer;
  box-shadow:
    0 18px 40px rgba(42, 36, 25, 0.08),
    0 8px 22px rgba(217, 199, 255, 0.22);
  transition: transform 180ms ease, opacity 180ms ease, box-shadow 220ms ease;
}

.secondary-button:hover {
  transform: translateY(-2px);
  box-shadow:
    0 22px 46px rgba(42, 36, 25, 0.1),
    0 10px 24px rgba(167, 199, 255, 0.22);
}

@keyframes ambientDrift {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }

  50% {
    transform: translate3d(-2%, 1.5%, 0) scale(1.04);
  }

  100% {
    transform: translate3d(2%, -1%, 0) scale(1.02);
  }
}

@keyframes heroSparkFloat {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }

  50% {
    transform: translate3d(0, -4px, 0) scale(1.04);
  }

  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@keyframes resultCardFloat {
  0% {
    transform: translate3d(0, 0, 0);
  }

  50% {
    transform: translate3d(0, -8px, 0);
  }

  100% {
    transform: translate3d(0, 0, 0);
  }
}

@keyframes resultImagePan {
  0% {
    transform: scale(1.018) translate3d(-0.6%, 0, 0);
  }

  100% {
    transform: scale(1.026) translate3d(0.7%, -0.3%, 0);
  }
}

@keyframes loadingDotPulse {

  0%,
  100% {
    opacity: 0.35;
    transform: scale(0.82);
  }

  50% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes resultGlowPulse {
  0% {
    box-shadow:
      0 18px 42px rgba(42, 36, 25, 0.08),
      0 0 0 1px rgba(255, 255, 255, 0.3),
      0 0 16px color-mix(in srgb, var(--result-accent-soft) 42%, transparent);
  }

  100% {
    box-shadow:
      0 18px 42px rgba(42, 36, 25, 0.08),
      0 0 0 1px rgba(255, 255, 255, 0.3),
      0 0 26px color-mix(in srgb, var(--result-accent-soft) 56%, transparent);
  }
}

@keyframes resultContentReveal {
  0% {
    opacity: 0;
    transform: translate3d(0, 18px, 0);
  }

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

.hidden {
  display: none;
}

@media (max-width: 980px) {

  .choice-grid,
  .energy-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 720px) {
  .app-shell {
    width: min(100% - 20px, 1120px);
    padding: 28px 0 44px;
  }

  .app-view {
    min-height: calc(100vh - 72px);
  }

  .result-topbar {
    margin-bottom: 28px;
  }

  .panel,
  .result-panel {
    border-radius: 22px;
  }

  .panel {
    padding: 20px;
  }

  .settings-panel {
    padding: 6px;
  }

  .settings-step {
    padding: 12px;
  }

  .result-card {
    min-height: 500px;
  }

  .result-card::after {
    border-top-color: rgba(255, 255, 255, 0.14);
    border-right-color: color-mix(in srgb, var(--result-accent-border) 22%, rgba(255, 255, 255, 0.12) 78%);
    opacity: 0.28;
  }

  .result-bg {
    object-position: 72% center;
  }

  .result-gradient {
    background:
      radial-gradient(ellipse 118% 86% at 50% -8%,
        rgba(6, 2, 12, 0.98) 0%,
        rgba(10, 3, 18, 0.88) 18%,
        rgba(16, 6, 26, 0.68) 38%,
        rgba(20, 8, 30, 0.4) 58%,
        rgba(22, 8, 32, 0.18) 74%,
        rgba(22, 8, 32, 0.06) 86%,
        rgba(22, 8, 32, 0) 100%),
      linear-gradient(180deg,
        rgba(48, 16, 40, 0.84) 0%,
        rgba(47, 14, 42, 0.8) 16%,
        rgba(53, 16, 49, 0.48) 32%,
        rgba(43, 15, 55, 0.2) 48%,
        rgba(30, 13, 48, 0.06) 64%,
        rgba(24, 12, 47, 0) 80%),
      radial-gradient(circle at 50% 28%,
        rgba(233, 223, 255, 0.18) 0%,
        rgba(233, 223, 255, 0.08) 18%,
        rgba(233, 223, 255, 0) 38%),
      linear-gradient(180deg,
        rgba(255, 255, 255, 0.02) 0%,
        rgba(255, 255, 255, 0) 30%,
        rgba(196, 184, 244, 0.06) 100%);
  }

  .result-info-grid,
  .result-details {
    grid-template-columns: 1fr;
  }

  .result-advice-row {
    grid-template-columns: 1fr;
  }

  .choice-grid,
  .energy-row,
  .genre-grid {
    grid-template-columns: 1fr;
  }

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

  .choice-button,
  .energy-button {
    min-height: 48px;
  }

  .hero > .eyebrow,
  .loading-kicker,
  .result-topbar {
    text-align: center;
  }

  .result-home-link {
    margin-inline: auto;
  }

  .hero h1 {
    max-width: 100%;
  }

  .hero h1::before {
    width: 100%;
    margin-left: 0;
    background-image: url("assets/hero-title-mobile.png");
    background-position: center;
  }

  .hero-copy {
    padding-inline: 10px;
  }

  .hero {
    margin-bottom: 16px;
    padding-bottom: 8px;
    overflow-x: clip;
  }

  .hero::after {
    right: 2%;
    top: 18%;
    width: min(72vw, 280px);
    height: min(48vw, 190px);
    opacity: 0.54;
  }

  .hero-orbit {
    right: 8%;
    top: 41%;
    width: min(48vw, 190px);
    height: min(28vw, 112px);
    opacity: 0.44;
  }

  .hero-spark--main {
    top: 20%;
    right: 2%;
    width: 56px;
    height: 56px;
  }

  .hero-spark--small {
    display: none;
  }

  .hero-spark--tiny {
    display: none;
  }

  .section-heading {
    gap: 10px;
  }

  .section-step-icon {
    width: 40px;
    height: auto;
    min-height: 0;
    border-radius: 11px;
  }

  .genre-pill {
    min-height: 48px;
  }

  .result-content {
    max-width: none;
    min-height: 500px;
    padding: 24px 20px 20px;
  }

  .result-content::before {
    content: none;
  }

  .result-content::after {
    top: 18px;
    right: 18px;
    width: 42px;
    height: 42px;
    opacity: 0.76;
  }

  .loading-view {
    min-height: calc(100vh - 84px);
  }

  .loading-view::before {
    width: min(120vw, 520px);
    height: min(120vw, 520px);
    top: 52%;
  }

  .loading-ambient {
    inset: 10% 0 14%;
  }

  .loading-orbit {
    right: -2%;
    top: 22%;
    width: 210px;
    height: 118px;
    opacity: 0.42;
  }

  .loading-orbit::after {
    right: -24%;
    top: -34%;
    width: 250px;
    height: 160px;
    opacity: 0.58;
  }

  .loading-spark--main {
    top: 20%;
    right: 4%;
    width: 52px;
    height: 52px;
  }

  .loading-spark--small {
    top: 36%;
    left: 8%;
  }

  .loading-spark--tiny {
    right: 12%;
    bottom: 24%;
  }

  .loading-card {
    width: min(100%, 420px);
    padding: 18px 10px;
  }

  .loading-kicker {
    margin-bottom: 16px;
  }

  .loading-message {
    min-height: 4.2rem;
    font-size: clamp(1.2rem, 6vw, 1.7rem);
    white-space: normal;
    line-height: 1.15;
  }

  .result-description {
    font-size: 0.98rem;
  }

  .result-meta {
    margin: 16px 0 22px;
    gap: 10px;
  }

  .meta-pill,
  .detail-card,
  .secondary-button {
    backdrop-filter: blur(14px);
  }

  .vibe-card img {
    height: auto;
    aspect-ratio: 4 / 5;
    display: block;
  }
}

@media (min-width: 721px) {
  .result-spark {
    display: block;
  }

  .result-content::before {
    content: none;
  }

  .result-media::after {
    content: none;
  }

  .result-vignette::after {
    content: "";
    position: absolute;
    top: 146px;
    right: 138px;
    width: 96px;
    height: 56px;
    pointer-events: none;
    background:
      url("data:image/svg+xml,%3Csvg viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3ClinearGradient id='h' x1='0%25' y1='0%25' x2='100%25' y2='0%25'%3E%3Cstop offset='0%25' stop-color='%23ff5b99' stop-opacity='0'/%3E%3Cstop offset='50%25' stop-color='%23ff5b99' stop-opacity='1'/%3E%3Cstop offset='100%25' stop-color='%23ff5b99' stop-opacity='0'/%3E%3C/linearGradient%3E%3ClinearGradient id='v' x1='0%25' y1='0%25' x2='0%25' y2='100%25'%3E%3Cstop offset='0%25' stop-color='%23ff5b99' stop-opacity='0'/%3E%3Cstop offset='50%25' stop-color='%23ff5b99' stop-opacity='1'/%3E%3Cstop offset='100%25' stop-color='%23ff5b99' stop-opacity='0'/%3E%3C/linearGradient%3E%3Crect x='2' y='19' width='36' height='2' rx='1' fill='url(%23h)'/%3E%3Crect x='19' y='2' width='2' height='36' rx='1' fill='url(%23v)'/%3E%3C/svg%3E") no-repeat 0 0 / 22px 22px,
      url("data:image/svg+xml,%3Csvg viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3ClinearGradient id='h' x1='0%25' y1='0%25' x2='100%25' y2='0%25'%3E%3Cstop offset='0%25' stop-color='%23ff5b99' stop-opacity='0'/%3E%3Cstop offset='50%25' stop-color='%23ff5b99' stop-opacity='.96'/%3E%3Cstop offset='100%25' stop-color='%23ff5b99' stop-opacity='0'/%3E%3C/linearGradient%3E%3ClinearGradient id='v' x1='0%25' y1='0%25' x2='0%25' y2='100%25'%3E%3Cstop offset='0%25' stop-color='%23ff5b99' stop-opacity='0'/%3E%3Cstop offset='50%25' stop-color='%23ff5b99' stop-opacity='.96'/%3E%3Cstop offset='100%25' stop-color='%23ff5b99' stop-opacity='0'/%3E%3C/linearGradient%3E%3Crect x='4' y='19' width='32' height='2' rx='1' fill='url(%23h)'/%3E%3Crect x='19' y='4' width='2' height='32' rx='1' fill='url(%23v)'/%3E%3C/svg%3E") no-repeat 48px 16px / 12px 12px;
    opacity: 0.98;
    filter: drop-shadow(0 0 12px rgba(255, 91, 153, 0.24));
  }

  .result-card::after {
    right: -22%;
    top: 18%;
    width: 680px;
    height: 380px;
    border: 0;
    background:
      url("data:image/svg+xml,%3Csvg viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3ClinearGradient id='h' x1='0%25' y1='0%25' x2='100%25' y2='0%25'%3E%3Cstop offset='0%25' stop-color='%23ff5b99' stop-opacity='0'/%3E%3Cstop offset='50%25' stop-color='%23ff5b99' stop-opacity='1'/%3E%3Cstop offset='100%25' stop-color='%23ff5b99' stop-opacity='0'/%3E%3C/linearGradient%3E%3ClinearGradient id='v' x1='0%25' y1='0%25' x2='0%25' y2='100%25'%3E%3Cstop offset='0%25' stop-color='%23ff5b99' stop-opacity='0'/%3E%3Cstop offset='50%25' stop-color='%23ff5b99' stop-opacity='1'/%3E%3Cstop offset='100%25' stop-color='%23ff5b99' stop-opacity='0'/%3E%3C/linearGradient%3E%3Crect x='2' y='19' width='36' height='2' rx='1' fill='url(%23h)'/%3E%3Crect x='19' y='2' width='2' height='36' rx='1' fill='url(%23v)'/%3E%3C/svg%3E") no-repeat 83% 14% / 22px 22px,
      url("data:image/svg+xml,%3Csvg viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3ClinearGradient id='h' x1='0%25' y1='0%25' x2='100%25' y2='0%25'%3E%3Cstop offset='0%25' stop-color='%23ff5b99' stop-opacity='0'/%3E%3Cstop offset='50%25' stop-color='%23ff5b99' stop-opacity='.96'/%3E%3Cstop offset='100%25' stop-color='%23ff5b99' stop-opacity='0'/%3E%3C/linearGradient%3E%3ClinearGradient id='v' x1='0%25' y1='0%25' x2='0%25' y2='100%25'%3E%3Cstop offset='0%25' stop-color='%23ff5b99' stop-opacity='0'/%3E%3Cstop offset='50%25' stop-color='%23ff5b99' stop-opacity='.96'/%3E%3Cstop offset='100%25' stop-color='%23ff5b99' stop-opacity='0'/%3E%3C/linearGradient%3E%3Crect x='4' y='19' width='32' height='2' rx='1' fill='url(%23h)'/%3E%3Crect x='19' y='4' width='2' height='32' rx='1' fill='url(%23v)'/%3E%3C/svg%3E") no-repeat 88% 19% / 12px 12px,
      radial-gradient(ellipse at center,
        rgba(255, 255, 255, 0) 56.18%,
        rgba(255, 255, 255, 0.2) 56.3%,
        rgba(255, 255, 255, 0.2) 56.38%,
        rgba(255, 255, 255, 0) 56.9%,
        rgba(255, 255, 255, 0) 68.12%,
        color-mix(in srgb, var(--result-accent-border) 24%, rgba(255, 255, 255, 0.24) 76%) 68.24%,
        color-mix(in srgb, var(--result-accent-border) 24%, rgba(255, 255, 255, 0.24) 76%) 68.32%,
        rgba(255, 255, 255, 0) 68.88%);
    opacity: 0.92;
    filter: drop-shadow(0 0 14px rgba(255, 255, 255, 0.06));
    transform: rotate(-14deg);
  }
}
