:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  background: #f7f1ed;
  color: #201923;
  --theme-a: #8f3d6b;
  --theme-b: #247c78;
  --theme-c: #d9a441;
  --theme-ink: #201923;
  --surface: rgba(255, 252, 248, 0.92);
  --surface-strong: #fffaf5;
  --line: rgba(75, 50, 57, 0.14);
  --muted: #6e5964;
  --shadow-soft: 0 20px 50px rgba(70, 41, 51, 0.11);
  --shadow-card: 0 12px 28px rgba(70, 41, 51, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  color: #201923;
  background:
    radial-gradient(circle at 12% 10%, rgba(217, 164, 65, 0.22), transparent 27%),
    radial-gradient(circle at 82% 8%, rgba(36, 124, 120, 0.15), transparent 24%),
    linear-gradient(135deg, rgba(143, 61, 107, 0.11), transparent 38%),
    linear-gradient(315deg, rgba(36, 124, 120, 0.11), transparent 34%),
    #f7f1ed;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(32, 25, 35, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(32, 25, 35, 0.028) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.6), transparent 78%);
}

button {
  font: inherit;
}

.app-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0;
}

.topbar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  min-height: 250px;
  margin-bottom: 16px;
  padding: clamp(22px, 4vw, 42px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 250, 245, 0.94), rgba(255, 246, 238, 0.74)),
    linear-gradient(120deg, rgba(143, 61, 107, 0.16), rgba(36, 124, 120, 0.13));
  box-shadow: var(--shadow-soft);
}

.topbar::after {
  content: "";
  position: absolute;
  inset: auto -70px -110px auto;
  width: 290px;
  height: 290px;
  border: 1px solid rgba(143, 61, 107, 0.16);
  border-radius: 50%;
}

.hero-copy {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.hero-chips span {
  padding: 7px 10px;
  border: 1px solid rgba(143, 61, 107, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  color: #59404d;
  font-size: 0.82rem;
  font-weight: 800;
}

.hero-visual {
  position: relative;
  z-index: 1;
  flex: 0 0 210px;
  display: grid;
  place-items: center;
  width: 210px;
  height: 210px;
}

.crown-orbit {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(143, 61, 107, 0.18);
  border-radius: 50%;
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.46), transparent 48%),
    conic-gradient(from 25deg, rgba(143, 61, 107, 0.3), rgba(217, 164, 65, 0.24), rgba(36, 124, 120, 0.25), rgba(143, 61, 107, 0.3));
  box-shadow: inset 0 0 0 24px rgba(255, 250, 245, 0.72);
}

.crown-medallion {
  position: relative;
  display: grid;
  place-items: center;
  width: 118px;
  height: 118px;
  border: 1px solid rgba(217, 164, 65, 0.55);
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 22%, rgba(255, 255, 255, 0.92), transparent 24%),
    linear-gradient(145deg, #fff7df, #e7b95c 46%, #8f3d6b);
  box-shadow:
    0 22px 44px rgba(143, 61, 107, 0.2),
    inset 0 0 0 7px rgba(255, 255, 255, 0.38);
}

.crown-medallion span {
  font-size: 4.2rem;
  line-height: 1;
  filter: drop-shadow(0 10px 14px rgba(58, 33, 40, 0.22));
}

.orbit-dot {
  position: absolute;
  width: 14px;
  height: 14px;
  border: 2px solid #fffaf5;
  border-radius: 50%;
  box-shadow: 0 6px 16px rgba(58, 33, 40, 0.18);
}

.dot-rose {
  top: 24px;
  right: 48px;
  background: #d6336c;
}

.dot-gold {
  right: 18px;
  bottom: 66px;
  background: #d9a441;
}

.dot-moon {
  left: 31px;
  bottom: 42px;
  background: #247c78;
}

.eyebrow,
.question-kicker {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(2rem, 5vw, 4.6rem);
  max-width: 720px;
  line-height: 0.98;
}

h2 {
  font-size: clamp(1.35rem, 3vw, 2.1rem);
  line-height: 1.12;
}

.nav-actions,
.admin-actions,
.admin-header,
.progress-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.panel {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
  padding: clamp(18px, 4vw, 34px);
  backdrop-filter: blur(14px);
}

.progress-row {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 10px;
}

.progress-track {
  width: 100%;
  height: 10px;
  overflow: hidden;
  background: rgba(110, 89, 100, 0.16);
  border-radius: 999px;
  margin-bottom: 30px;
}

.progress-fill {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--theme-a), var(--theme-c));
  border-radius: inherit;
  transition: width 180ms ease;
}

.question-area {
  display: grid;
  gap: 24px;
}

.section-heading {
  margin-bottom: 20px;
}

.mandala-panel {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  align-items: center;
  gap: 22px;
  margin-bottom: 22px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.78), rgba(255, 250, 245, 0.86)),
    var(--surface-strong);
  box-shadow: var(--shadow-card);
}

.mandala-wrap {
  position: relative;
  width: 220px;
  aspect-ratio: 1;
}

#progressMandala {
  display: block;
  width: 100%;
  height: 100%;
}

#progressMandala path {
  transition:
    fill 180ms ease,
    stroke 180ms ease,
    transform 120ms ease;
  transform-origin: center;
}

#progressMandala path:hover,
#progressMandala path:focus-visible {
  transform: scale(1.018);
  outline: none;
}

.mandala-center {
  position: absolute;
  inset: 50%;
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  translate: -50% -50%;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fffaf5;
  text-align: center;
}

.mandala-center strong {
  display: block;
  font-size: 1.2rem;
}

.mandala-center span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
}

.mandala-copy {
  max-width: 48ch;
  margin: 10px 0 14px;
  color: var(--muted);
  line-height: 1.4;
}

.mandala-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.mandala-dot {
  width: 16px;
  height: 16px;
  border: 1px solid #cfd5df;
  border-radius: 50%;
  background: #ffffff;
}

.mandala-dot-complete {
  border-color: var(--dot-color);
  background: var(--dot-color);
}

.queen-profile-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  align-items: center;
  gap: 18px;
  margin-bottom: 22px;
  padding: 16px 18px;
  border: 1px solid color-mix(in srgb, var(--queen-profile-color, #17191f) 24%, #dfe3ea);
  border-radius: 8px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--queen-profile-color, #201923) 12%, #fffaf5), rgba(255, 255, 255, 0.86) 62%),
    #fffaf5;
  box-shadow: var(--shadow-card);
}

.queen-profile-panel h3 {
  margin: 0;
  font-size: 1.25rem;
}

.queen-profile-panel p {
  max-width: 62ch;
  margin: 8px 0 0;
  color: #604b56;
  line-height: 1.4;
}

.queen-progress-card {
  display: grid;
  gap: 7px;
  justify-items: end;
  color: #604b56;
  text-align: right;
}

.queen-progress-card strong {
  color: var(--queen-profile-color, #17191f);
  font-size: 2rem;
  line-height: 1;
}

.queen-progress-card span {
  font-size: 0.86rem;
  font-weight: 700;
}

.queen-meter {
  width: 100%;
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(110, 89, 100, 0.16);
}

.queen-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--queen-profile-color, #17191f);
  transition: width 180ms ease;
}

.profile-cards-panel {
  display: grid;
  gap: 14px;
  margin-bottom: 22px;
}

.profile-cards-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.profile-cards-header h3 {
  margin: 0;
  font-size: 1.24rem;
}

.profile-cards-header > span {
  flex: 0 0 auto;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 250, 245, 0.76);
  color: #59404d;
  font-size: 0.82rem;
  font-weight: 900;
}

.profile-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.profile-unlock-card {
  position: relative;
  min-height: 184px;
  display: grid;
  align-content: space-between;
  gap: 12px;
  overflow: hidden;
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 8px;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--theme-a) 14%, #fffaf5), rgba(255, 255, 255, 0.88)),
    #fffaf5;
  box-shadow: var(--shadow-card);
}

.profile-unlock-card::after {
  content: "";
  position: absolute;
  inset: auto -26px -38px auto;
  width: 92px;
  height: 92px;
  border: 16px solid currentColor;
  border-radius: 50%;
  opacity: 0.08;
}

.profile-card-symbol {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 24%, color-mix(in srgb, var(--theme-c) 72%, #ffffff), transparent 34%),
    linear-gradient(145deg, var(--theme-a), var(--theme-b));
  color: #ffffff;
  font-size: 1.25rem;
  font-weight: 900;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45);
}

.profile-card-copy {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 5px;
}

.profile-card-copy small {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.profile-card-copy strong {
  font-size: 1rem;
  line-height: 1.08;
}

.profile-card-copy em {
  color: color-mix(in srgb, var(--theme-a) 74%, #201923);
  font-size: 0.86rem;
  font-style: normal;
  font-weight: 900;
}

.profile-card-copy span {
  color: #604b56;
  font-size: 0.82rem;
  line-height: 1.24;
}

.profile-unlock-card-locked {
  background:
    linear-gradient(145deg, rgba(255, 250, 245, 0.62), rgba(255, 255, 255, 0.76)),
    #fffaf5;
  color: #8a7480;
}

.profile-unlock-card-locked .profile-card-symbol {
  background: rgba(110, 89, 100, 0.16);
  color: #8a7480;
}

.profile-unlock-card-locked .profile-card-copy em,
.profile-unlock-card-locked .profile-card-copy span {
  color: #8a7480;
}

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

.mobile-quiz-picker {
  display: none;
}

.mobile-quiz-picker label {
  display: block;
  margin-bottom: 8px;
  color: #5c6472;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.mobile-picker-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.mobile-picker-row select {
  width: 100%;
  min-height: 46px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf5;
  color: #201923;
  font: inherit;
}

.quiz-card {
  min-height: 188px;
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--theme-a) 13%, #fffaf5), rgba(255, 255, 255, 0.88) 56%),
    #fffaf5;
  color: #201923;
  text-align: left;
  cursor: pointer;
  box-shadow: var(--shadow-card);
  transition:
    border-color 120ms ease,
    transform 120ms ease,
    box-shadow 120ms ease;
}

.quiz-art {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 100%;
  overflow: hidden;
  border-radius: 8px;
  background:
    radial-gradient(circle at 24% 20%, color-mix(in srgb, var(--theme-c) 76%, #ffffff), transparent 28%),
    radial-gradient(circle at 80% 76%, color-mix(in srgb, var(--theme-b) 52%, #ffffff), transparent 28%),
    linear-gradient(145deg, var(--theme-a), var(--theme-b));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.42);
}

.quiz-art::before,
.quiz-art::after {
  content: "";
  position: absolute;
  border: 2px solid rgba(255, 255, 255, 0.48);
  opacity: 0.8;
}

.quiz-art::before {
  inset: 12px;
  border-radius: 999px;
}

.quiz-art::after {
  width: 44px;
  height: 44px;
  right: -12px;
  bottom: -10px;
  border-width: 10px;
  border-radius: 50%;
}

.quiz-art-symbol {
  position: relative;
  z-index: 1;
  font-size: 2.35rem;
  line-height: 1;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.18));
}

.quiz-card-body {
  display: grid;
  gap: 7px;
  align-content: start;
  min-width: 0;
}

.quiz-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.quiz-card strong {
  font-size: 1.15rem;
  line-height: 1.15;
}

.quiz-card span {
  color: #59404d;
  line-height: 1.4;
}

.quiz-card em {
  color: #745e69;
  font-size: 0.88rem;
  font-style: normal;
  line-height: 1.25;
}

.quiz-card small {
  color: var(--muted);
  font-weight: 700;
}

.quiz-theme-label {
  width: max-content;
  max-width: 100%;
  padding: 3px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--theme-a) 14%, #ffffff);
  color: color-mix(in srgb, var(--theme-a) 70%, #17191f) !important;
  text-transform: uppercase;
}

.complete-badge {
  width: max-content;
  max-width: 100%;
  padding: 3px 8px;
  border-radius: 999px;
  background: #201923;
  color: #fffaf5 !important;
  text-transform: uppercase;
}

.quiz-card:hover,
.quiz-card:focus-visible {
  border-color: var(--theme-a);
  box-shadow: 0 18px 32px color-mix(in srgb, var(--theme-a) 18%, transparent);
  transform: translateY(-2px);
  outline: none;
}

.quiz-card-complete {
  border-color: color-mix(in srgb, var(--theme-b) 72%, #ffffff);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--theme-b) 20%, #ffffff), #ffffff 54%),
    #f4fff8;
  box-shadow:
    0 0 0 2px color-mix(in srgb, var(--theme-b) 18%, transparent),
    var(--shadow-card);
}

.quiz-card-complete .quiz-art::before {
  content: "✓";
  inset: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  translate: -50% -50%;
  border: 2px solid rgba(255, 255, 255, 0.82);
  border-radius: 50%;
  background: rgba(32, 25, 35, 0.72);
  color: #ffffff;
  font-size: 1.45rem;
  font-weight: 900;
}

.quiz-card-complete .quiz-art-symbol {
  opacity: 0.44;
}

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

.answer-button {
  min-height: 92px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--theme-a) 11%, #fffaf5), rgba(255, 255, 255, 0.88) 62%),
    #fffaf5;
  color: #201923;
  text-align: left;
  cursor: pointer;
  transition:
    border-color 120ms ease,
    transform 120ms ease,
    box-shadow 120ms ease;
}

.answer-badge {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(54, 39, 45, 0.15);
  background: transparent;
  color: var(--muted);
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  font-weight: 700;
  font-size: 1.25rem;
  transition: all 0.24s cubic-bezier(0.4, 0, 0.2, 1);
}

.answer-button:hover .answer-badge,
.answer-button:focus-visible .answer-badge,
.answer-button-selected .answer-badge {
  background: var(--theme-a);
  border-color: var(--theme-a);
  color: #ffffff;
}

.answer-copy {
  min-width: 0;
  line-height: 1.24;
  color: #332631;
}

.answer-button:hover,
.answer-button:focus-visible {
  border-color: var(--theme-a);
  box-shadow: 0 10px 18px color-mix(in srgb, var(--theme-a) 16%, transparent);
  transform: translateY(-1px);
  outline: none;
}

.answer-button:disabled {
  cursor: default;
}

.answer-button-selected,
.answer-button-selected:disabled {
  border-color: var(--theme-a);
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--theme-a) 18%, #ffffff), #ffffff 64%),
    #ffffff;
  box-shadow: 0 10px 18px color-mix(in srgb, var(--theme-a) 18%, transparent);
  transform: translateY(-1px) scale(1.01);
}

.icon-button,
.text-button,
.primary-button,
.danger-button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 250, 245, 0.86);
  color: #201923;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(70, 41, 51, 0.06);
}

.icon-button {
  width: 42px;
  font-size: 1.35rem;
}

.text-button,
.primary-button,
.danger-button {
  padding: 0 16px;
  font-weight: 700;
}

.profile-reset-button {
  border-color: rgba(32, 25, 35, 0.32);
}

.primary-button {
  margin-top: 22px;
  background: linear-gradient(135deg, #201923, #6d2f56);
  color: #ffffff;
  border-color: #201923;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.danger-button {
  color: #b42318;
}

.back-button {
  min-height: 34px;
  padding: 0 12px;
  font-size: 0.86rem;
}

.button-disabled,
.button-disabled:hover {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.result-panel {
  display: grid;
  grid-template-columns: minmax(220px, 0.85fr) minmax(0, 1.15fr);
  align-items: center;
  gap: 28px;
}

.result-visual {
  display: grid;
  place-items: center;
  min-height: 260px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  background:
    radial-gradient(circle at 20% 20%, color-mix(in srgb, var(--theme-c) 50%, #ffffff), transparent 28%),
    linear-gradient(145deg, color-mix(in srgb, var(--theme-a) 78%, #ffffff), color-mix(in srgb, var(--theme-b) 72%, #ffffff));
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.result-visual::before {
  content: attr(data-symbol);
  position: relative;
  inset: auto;
  z-index: 2;
  border: 0;
  font-size: clamp(4rem, 12vw, 8rem);
  opacity: 1;
  filter: drop-shadow(0 16px 28px rgba(0, 0, 0, 0.2));
}

.result-visual::after {
  content: "";
  position: absolute;
  inset: 28px;
  border: 12px solid currentColor;
  border-radius: 50%;
  opacity: 0.28;
}

.result-visual::after {
  content: "";
  inset: auto 32px 32px auto;
  width: 88px;
  height: 88px;
  border-width: 18px;
}

.theme-bird { --theme-a: #6c8ebf; --theme-b: #85c7de; --theme-c: #f7d6a4; }
.theme-city { --theme-a: #2f3a8f; --theme-b: #f05a7e; --theme-c: #ffd166; }
.theme-color { --theme-a: #e84393; --theme-b: #00b894; --theme-c: #fdcb6e; }
.theme-crystal { --theme-a: #5f3dc4; --theme-b: #15aabf; --theme-c: #b2f2bb; }
.theme-dessert { --theme-a: #d9480f; --theme-b: #f783ac; --theme-c: #ffe066; }
.theme-flower { --theme-a: #c2255c; --theme-b: #69db7c; --theme-c: #ffc9c9; }
.theme-fruit { --theme-a: #e03131; --theme-b: #82c91e; --theme-c: #ffd43b; }
.theme-moon { --theme-a: #364fc7; --theme-b: #748ffc; --theme-c: #e5dbff; }
.theme-perfume { --theme-a: #9c36b5; --theme-b: #f783ac; --theme-c: #d0ebff; }
.theme-queen { --theme-a: #862e9c; --theme-b: #c92a2a; --theme-c: #ffd43b; }
.theme-season { --theme-a: #e67700; --theme-b: #2f9e44; --theme-c: #74c0fc; }
.theme-song { --theme-a: #1971c2; --theme-b: #ae3ec9; --theme-c: #ffa94d; }
.theme-wine { --theme-a: #862e3c; --theme-b: #c2255c; --theme-c: #ffd8a8; }
.theme-secret { --theme-a: #5f2a5f; --theme-b: #a83f6f; --theme-c: #f3b8c8; }
.theme-secret-red { --theme-a: #7f1d2d; --theme-b: #c92a4a; --theme-c: #ffd1a8; }

.result-description {
  max-width: 56ch;
  color: #59404d;
  font-size: 1.05rem;
  line-height: 1.55;
}

.photo-choice-panel {
  display: grid;
  gap: 12px;
  max-width: 620px;
  margin: 18px 0 0;
  padding: 16px;
  border: 1px solid color-mix(in srgb, var(--theme-a, #862e9c) 24%, #dfe3ea);
  border-radius: 8px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--theme-c, #ffd43b) 16%, #fffaf5), rgba(255, 255, 255, 0.92)),
    #fffaf5;
}

.photo-choice-panel-skipped {
  opacity: 0.72;
}

.photo-choice-title {
  margin: 0;
  color: #201923;
  font-weight: 800;
}

.photo-choice-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.photo-choice-panel .primary-button {
  margin-top: 0;
}

.photo-upload-area {
  display: grid;
  gap: 10px;
}

.photo-upload-label {
  font-weight: 800;
  color: #201923;
}

.photo-upload-area input[type="file"] {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 9px;
}

.oracle-card {
  --oracle-ink: #201923;
  --oracle-paper: #fffaf5;
  position: relative;
  overflow: hidden;
  margin: 4px 0 0;
  max-width: 420px;
  border: 1px solid rgba(32, 25, 35, 0.22);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.34), transparent 32%),
    linear-gradient(145deg, color-mix(in srgb, var(--theme-a, #862e9c) 72%, #201923), color-mix(in srgb, var(--theme-b, #c92a2a) 58%, #201923));
  color: var(--oracle-paper);
  padding: 16px;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.24),
    0 20px 54px rgba(32, 25, 35, 0.24);
  animation: oracleReveal 620ms ease both;
}

.oracle-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: var(--photo-texture);
  mix-blend-mode: screen;
  opacity: 0.86;
}

.oracle-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: var(--photo-overlay);
  mix-blend-mode: soft-light;
}

.oracle-card-header,
.oracle-portrait,
.oracle-card figcaption {
  position: relative;
  z-index: 3;
}

.oracle-card-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
  color: rgba(255, 250, 245, 0.92);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.oracle-portrait {
  display: grid;
  place-items: center;
  min-height: 330px;
  border: 1px solid rgba(255, 250, 245, 0.46);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 45%, rgba(255, 250, 245, 0.18), transparent 46%),
    rgba(32, 25, 35, 0.34);
  overflow: hidden;
}

.oracle-portrait img {
  display: block;
  width: min(100%, 340px);
  height: min(72vw, 340px);
  object-fit: contain;
  transform: scale(1.02);
  box-shadow: 0 18px 44px rgba(32, 25, 35, 0.34);
}

.oracle-symbol {
  position: absolute;
  z-index: 4;
  right: 18px;
  bottom: 18px;
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  border: 1px solid rgba(255, 250, 245, 0.72);
  border-radius: 50%;
  background: rgba(32, 25, 35, 0.46);
  font-size: 2.2rem;
  box-shadow: 0 12px 30px rgba(32, 25, 35, 0.28);
}

.oracle-mask-medallion {
  border-radius: 50% 50% 44% 44%;
}

.oracle-mask-rose {
  border-radius: 42% 58% 46% 54% / 56% 42% 58% 44%;
}

.oracle-mask-moon {
  border-radius: 58% 42% 54% 46% / 46% 62% 38% 54%;
  clip-path: ellipse(42% 49% at 58% 50%);
}

.oracle-mask-flame {
  clip-path: polygon(50% 0, 66% 16%, 82% 8%, 76% 32%, 100% 44%, 78% 56%, 88% 88%, 58% 78%, 50% 100%, 39% 78%, 12% 88%, 22% 56%, 0 44%, 24% 32%, 18% 8%, 34% 16%);
}

.oracle-mask-mirror {
  clip-path: polygon(50% 0, 94% 20%, 86% 78%, 50% 100%, 14% 78%, 6% 20%);
}

.oracle-mask-wing {
  border-radius: 68% 32% 66% 34% / 44% 60% 40% 56%;
}

.oracle-mask-window {
  border-radius: 48% 48% 8px 8px;
}

.oracle-mask-aura {
  border-radius: 38% 62% 58% 42% / 44% 40% 60% 56%;
}

.oracle-mask-facet {
  clip-path: polygon(50% 0, 88% 18%, 100% 58%, 72% 100%, 28% 100%, 0 58%, 12% 18%);
}

.oracle-mask-vial {
  border-radius: 45% 45% 28% 28% / 18% 18% 58% 58%;
}

.oracle-mask-wave {
  border-radius: 44% 56% 48% 52% / 54% 36% 64% 46%;
}

.oracle-card-crown {
  box-shadow:
    inset 0 0 0 2px rgba(255, 212, 59, 0.42),
    0 20px 56px rgba(134, 46, 156, 0.28);
}

.oracle-card-heart {
  box-shadow:
    inset 0 0 48px rgba(255, 201, 201, 0.32),
    0 20px 52px rgba(214, 51, 108, 0.2);
}

.oracle-card-moon {
  box-shadow:
    inset 0 0 64px rgba(229, 219, 255, 0.22),
    0 20px 56px rgba(54, 79, 199, 0.28);
}

.oracle-card-flame {
  box-shadow:
    inset 0 -52px 80px rgba(255, 169, 77, 0.24),
    0 20px 56px rgba(201, 42, 42, 0.3);
}

.oracle-card-mirror {
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.42),
    0 20px 56px rgba(156, 54, 181, 0.24);
}

.oracle-card-bird,
.oracle-card-city,
.oracle-card-color,
.oracle-card-crystal,
.oracle-card-dessert,
.oracle-card-flower,
.oracle-card-fruit,
.oracle-card-perfume,
.oracle-card-season,
.oracle-card-song,
.oracle-card-wine {
  box-shadow:
    inset 0 0 44px rgba(255, 255, 255, 0.16),
    0 20px 52px rgba(32, 25, 35, 0.22);
}

.oracle-card-city {
  box-shadow:
    inset 0 0 0 1px rgba(255, 209, 102, 0.32),
    0 20px 56px rgba(47, 58, 143, 0.3);
}

.oracle-card-crystal {
  box-shadow:
    inset 0 0 0 2px rgba(178, 242, 187, 0.24),
    0 20px 56px rgba(95, 61, 196, 0.26);
}

.oracle-card-wine {
  box-shadow:
    inset 0 -48px 80px rgba(255, 216, 168, 0.14),
    0 20px 56px rgba(134, 46, 60, 0.3);
}

.oracle-card figcaption {
  position: relative;
  z-index: 3;
  display: grid;
  gap: 5px;
  padding: 12px 2px 0;
  color: var(--oracle-paper);
  font-weight: 800;
  text-align: center;
}

.oracle-card figcaption strong {
  font-size: 1.18rem;
}

.oracle-card figcaption span {
  color: rgba(255, 250, 245, 0.76);
  font-size: 0.82rem;
  line-height: 1.35;
}

@keyframes oracleReveal {
  0% {
    opacity: 0;
    transform: translateY(12px) scale(0.96);
    filter: saturate(0.4) brightness(1.24);
  }

  62% {
    opacity: 1;
    transform: translateY(0) scale(1.018);
    filter: saturate(1.3) brightness(1.08);
  }

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

.admin-note {
  max-width: 56ch;
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.4;
}

.profile-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.35;
}

.admin-panel {
  margin-top: 18px;
}

.stats-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 22px 0;
}

.stat-tile {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf5;
  padding: 16px;
}

.stat-tile strong {
  display: block;
  font-size: 1.6rem;
}

.stats-list {
  display: grid;
  gap: 14px;
}

.profiles-list {
  margin-bottom: 20px;
}

.profile-markdowns {
  display: grid;
  gap: 12px;
  margin: 0 0 22px;
}

.photo-admin-section {
  display: grid;
  gap: 12px;
  margin: 0 0 22px;
}

.photo-admin-list {
  display: grid;
  gap: 10px;
}

.photo-admin-card {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf5;
  padding: 14px;
}

.photo-admin-card div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.photo-admin-card strong,
.photo-admin-card span,
.photo-admin-card small {
  overflow-wrap: anywhere;
}

.photo-admin-card span,
.photo-admin-card small {
  color: var(--muted);
}

.photo-download-link {
  flex: 0 0 auto;
}

.profile-markdowns-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.profile-markdowns-header h3 {
  margin: 0;
  font-size: 1.25rem;
}

.profile-markdowns-list {
  display: grid;
  gap: 10px;
}

.profile-markdown-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf5;
  overflow: hidden;
}

.profile-markdown-card summary {
  cursor: pointer;
  padding: 12px 14px;
  color: #20242c;
  font-weight: 800;
}

.profile-markdown-card pre {
  max-height: 360px;
  margin: 0;
  padding: 14px;
  overflow: auto;
  border-top: 1px solid #dfe3ea;
  background: #f7f8fb;
  color: #2f3642;
  font-size: 0.82rem;
  line-height: 1.45;
  white-space: pre-wrap;
}

.profiles-section {
  display: grid;
  gap: 10px;
}

.admin-section-heading {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.profiles-section h3 {
  margin: 0;
  font-size: 1.25rem;
}

.qc-profile-card,
.profile-card {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf5;
  padding: 14px 16px;
}

.qc-profile-card {
  grid-template-columns: minmax(0, 1.2fr) minmax(180px, 0.8fr);
  align-items: center;
  gap: 16px;
}

.qc-profile-card div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.qc-profile-card div:last-child {
  text-align: right;
}

.qc-profile-card strong,
.qc-profile-card b,
.qc-profile-card span,
.qc-profile-card small {
  overflow-wrap: anywhere;
}

.profile-card span,
.profile-card small,
.qc-profile-card span,
.qc-profile-card small {
  color: var(--muted);
}

.qc-section {
  display: grid;
  gap: 12px;
}

.qc-result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.qc-result-card {
  display: grid;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf5;
  padding: 14px;
}

.qc-result-card span,
.qc-result-card small {
  color: var(--muted);
}

.hidden {
  display: none;
}

@media (max-width: 720px) {
  body {
    overflow-x: hidden;
  }

  .app-shell {
    width: min(100% - 20px, 430px);
    min-height: 100dvh;
    padding: 10px 0;
  }

  .topbar,
  .admin-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar {
    gap: 8px;
    margin-bottom: 8px;
    min-height: auto;
    padding: 14px;
  }

  .hero-visual {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 72px;
    height: 72px;
    opacity: 0.9;
  }

  .crown-orbit {
    box-shadow: inset 0 0 0 8px rgba(255, 250, 245, 0.68);
  }

  .crown-medallion {
    width: 44px;
    height: 44px;
  }

  .crown-medallion span {
    font-size: 1.65rem;
  }

  .orbit-dot {
    width: 7px;
    height: 7px;
    border-width: 1px;
  }

  .dot-rose {
    top: 8px;
    right: 16px;
  }

  .dot-gold {
    right: 5px;
    bottom: 22px;
  }

  .dot-moon {
    left: 10px;
    bottom: 14px;
  }

  h1 {
    max-width: 100%;
    font-size: 1.28rem;
    line-height: 1.08;
    padding-right: 78px;
  }

  h2 {
    font-size: 1.24rem;
    line-height: 1.1;
  }

  .eyebrow,
  .question-kicker {
    margin-bottom: 4px;
    font-size: 0.68rem;
  }

  .profile-note {
    display: none;
  }

  .hero-chips {
    gap: 5px;
    margin-top: 10px;
    padding-right: 78px;
  }

  .hero-chips span {
    padding: 5px 7px;
    font-size: 0.68rem;
  }

  .nav-actions,
  .admin-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .profile-markdowns-header {
    flex-direction: column;
    gap: 10px;
  }

  .profile-markdown-card pre {
    max-height: 260px;
    font-size: 0.76rem;
  }

  .nav-actions {
    position: static;
    width: 100%;
    flex-wrap: wrap;
  }

  .icon-button,
  .text-button,
  .primary-button,
  .danger-button {
    min-height: 40px;
  }

  .profile-reset-button {
    min-height: 34px;
    padding: 0 10px;
    font-size: 0.78rem;
  }

  .panel {
    padding: 12px;
  }

  .section-heading {
    margin-bottom: 10px;
    padding-right: 0;
  }

  .answers-grid,
  .quiz-grid,
  .mandala-panel,
  .queen-profile-panel,
  .result-panel,
  .stats-summary {
    grid-template-columns: 1fr;
  }

  .quiz-grid {
    display: grid;
    gap: 9px;
  }

  .mobile-quiz-picker {
    display: none;
  }

  .quiz-card {
    min-height: 132px;
    grid-template-columns: 74px minmax(0, 1fr);
    gap: 10px;
    padding: 9px;
  }

  .quiz-art-symbol {
    font-size: 1.85rem;
  }

  .quiz-card-body {
    gap: 4px;
  }

  .quiz-card strong {
    font-size: 0.98rem;
    line-height: 1.08;
  }

  .quiz-card span,
  .quiz-card em {
    font-size: 0.78rem;
    line-height: 1.18;
  }

  .quiz-card small {
    font-size: 0.68rem;
  }

  .mobile-picker-row .primary-button {
    margin-top: 0;
    padding: 0 14px;
  }

  .mandala-panel {
    grid-template-columns: 118px minmax(0, 1fr);
    gap: 12px;
    margin-bottom: 12px;
    padding: 10px;
  }

  .mandala-wrap {
    width: 118px;
    justify-self: center;
  }

  .mandala-center {
    width: 52px;
    height: 52px;
  }

  .mandala-center strong {
    font-size: 0.92rem;
  }

  .mandala-center span {
    font-size: 0.56rem;
  }

  .mandala-panel h3 {
    margin: 0;
    font-size: 1rem;
    line-height: 1.08;
  }

  .queen-profile-panel {
    gap: 10px;
    margin-bottom: 10px;
    padding: 10px;
  }

  .profile-cards-panel {
    gap: 8px;
    margin-bottom: 10px;
  }

  .profile-cards-header {
    align-items: start;
    gap: 8px;
  }

  .profile-cards-header h3 {
    font-size: 1rem;
    line-height: 1.1;
  }

  .profile-cards-header > span {
    padding: 5px 7px;
    font-size: 0.68rem;
  }

  .profile-cards-grid {
    grid-template-columns: repeat(5, minmax(132px, 1fr));
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 3px;
    scroll-snap-type: x proximity;
  }

  .profile-unlock-card {
    min-height: 134px;
    padding: 10px;
    scroll-snap-align: start;
  }

  .profile-card-symbol {
    width: 34px;
    height: 34px;
    font-size: 1rem;
  }

  .profile-card-copy strong {
    font-size: 0.88rem;
  }

  .profile-card-copy span {
    font-size: 0.74rem;
  }

  .queen-profile-panel h3 {
    font-size: 1rem;
    line-height: 1.1;
  }

  .queen-profile-panel p {
    margin-top: 5px;
    font-size: 0.84rem;
    line-height: 1.28;
  }

  .queen-progress-card {
    justify-items: stretch;
    text-align: left;
  }

  .queen-progress-card strong {
    font-size: 1.35rem;
  }

  .mandala-copy {
    margin: 6px 0 8px;
    font-size: 0.86rem;
    line-height: 1.25;
  }

  .mandala-legend {
    gap: 4px;
  }

  .mandala-dot {
    width: 10px;
    height: 10px;
  }

  .progress-row {
    gap: 8px;
    font-size: 0.76rem;
    margin-bottom: 6px;
  }

  .progress-track {
    height: 7px;
    margin-bottom: 12px;
  }

  .question-area {
    gap: 10px;
  }

  #questionTitle {
    font-size: clamp(1.05rem, 5.3vw, 1.42rem);
    line-height: 1.12;
  }

  .answers-grid {
    gap: 8px;
  }

  .answer-button {
    min-height: 58px;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 9px;
    padding: 9px 10px;
    font-size: clamp(0.88rem, 3.8vw, 1rem);
    line-height: 1.2;
  }

  .answer-badge {
    width: 38px;
    height: 38px;
    font-size: 1.15rem;
  }

  .result-panel {
    gap: 12px;
  }

  .result-visual {
    min-height: 86px;
  }

  .result-visual::before {
    inset: 18px;
    border-width: 8px;
  }

  .result-visual::after {
    width: 42px;
    height: 42px;
    right: 18px;
    bottom: 18px;
    border-width: 10px;
  }

  .result-description {
    font-size: 0.92rem;
    line-height: 1.36;
  }

  .photo-choice-panel {
    padding: 12px;
  }

  .oracle-card {
    max-width: 100%;
    padding: 12px;
  }

  .oracle-portrait {
    min-height: 250px;
  }

  .oracle-portrait img {
    width: min(100%, 260px);
    height: min(62vw, 260px);
  }

  .oracle-symbol {
    width: 58px;
    height: 58px;
    font-size: 1.7rem;
  }

  .photo-admin-card {
    align-items: stretch;
    flex-direction: column;
  }

  .qc-profile-card {
    grid-template-columns: 1fr;
  }

  .qc-profile-card div:last-child {
    text-align: left;
  }

  .primary-button {
    margin-top: 10px;
  }

}

@media (max-width: 390px) {
  .app-shell {
    width: calc(100% - 14px);
    padding: 7px 0;
  }

  .panel {
    padding: 10px;
  }

  .mandala-panel {
    grid-template-columns: 102px minmax(0, 1fr);
  }

  .mandala-wrap {
    width: 102px;
  }

  .answer-button {
    min-height: 54px;
    padding: 8px 10px;
  }
}

@media (max-width: 720px) {
  .app-shell {
    width: min(100% - 16px, 430px);
    padding: 6px 0;
  }

  .topbar {
    gap: 5px;
    margin-bottom: 6px;
  }

  h1 {
    font-size: 1.02rem;
  }

  .hero-chips {
    display: none;
  }

  h2 {
    font-size: 1.08rem;
  }

  .panel {
    padding: 9px;
  }

  .section-heading {
    margin-bottom: 7px;
  }

  .mobile-picker-row select {
    min-height: 42px;
    font-size: 0.92rem;
  }

  body[data-view="quizView"] .topbar,
  body[data-view="resultView"] .topbar {
    display: none;
  }

  body[data-view="quizView"] .app-shell,
  body[data-view="resultView"] .app-shell {
    padding-top: 6px;
  }

  body[data-view="quizView"] .panel,
  body[data-view="resultView"] .panel {
    min-height: calc(100dvh - 12px);
  }

  .mandala-panel {
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 10px;
    margin-bottom: 9px;
    padding: 8px;
  }

  .mandala-wrap {
    width: 88px;
  }

  .mandala-center {
    width: 42px;
    height: 42px;
  }

  .mandala-center strong {
    font-size: 0.78rem;
  }

  .mandala-center span {
    font-size: 0.48rem;
  }

  .mandala-panel h3 {
    font-size: 0.92rem;
  }

  .mandala-copy,
  .mandala-legend {
    display: none;
  }

  .queen-profile-panel {
    grid-template-columns: minmax(0, 1fr) 86px;
    align-items: start;
    gap: 8px;
  }

  .profile-cards-header .question-kicker {
    display: none;
  }

  .queen-profile-panel p {
    display: none;
  }

  .queen-progress-card {
    text-align: right;
  }

  .queen-progress-card span {
    font-size: 0.68rem;
  }

  .progress-track {
    margin-bottom: 9px;
  }

  .answer-button {
    min-height: 56px;
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 8px;
    padding: 8px 9px;
    line-height: 1.16;
  }

  .answer-badge {
    width: 36px;
    height: 36px;
    font-size: 1.08rem;
  }

  .result-visual {
    min-height: 62px;
  }

  .result-description {
    font-size: 0.88rem;
    line-height: 1.28;
  }

  .photo-choice-panel {
    gap: 9px;
    margin-top: 12px;
  }

  .photo-choice-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .photo-choice-actions button {
    width: 100%;
  }

  .oracle-card-header {
    font-size: 0.66rem;
  }

  .oracle-portrait {
    min-height: 210px;
  }

  .oracle-card figcaption strong {
    font-size: 1rem;
  }
}

@media (max-width: 720px) and (max-height: 700px) {
  .eyebrow,
  .question-kicker {
    font-size: 0.62rem;
  }

  h1 {
    font-size: 0.94rem;
  }

  h2 {
    font-size: 1rem;
  }

  .mandala-panel {
    grid-template-columns: 74px minmax(0, 1fr);
    gap: 8px;
    padding: 7px;
  }

  .mandala-wrap {
    width: 74px;
  }

  .mandala-center {
    width: 36px;
    height: 36px;
  }

  .mandala-center strong {
    font-size: 0.7rem;
  }

  .mandala-center span {
    display: none;
  }

  .answer-button {
    min-height: 52px;
    padding: 7px 9px;
    font-size: 0.86rem;
  }
}

/* Luxe Beauty Magazine refresh - Phase 1+2 */
:root {
  font-family: Manrope, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  background: #fbf7f5;
  color: #24191f;
  --theme-a: #9b315f;
  --theme-b: #c88a9f;
  --theme-c: #c8a15a;
  --theme-ink: #24191f;
  --surface: rgba(255, 255, 255, 0.9);
  --surface-strong: #ffffff;
  --line: rgba(54, 39, 45, 0.11);
  --muted: #7a6870;
  --berry: #8f244f;
  --berry-dark: #5f193a;
  --blush: #f6e4e8;
  --blush-soft: #fbf0f2;
  --gold: #c8a15a;
  --ink: #24191f;
  --paper: #fffdfb;
  --shadow-soft: 0 26px 70px rgba(82, 42, 55, 0.12);
  --shadow-card: 0 16px 38px rgba(82, 42, 55, 0.09);
}

body {
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255, 253, 251, 0.96), rgba(251, 240, 242, 0.76) 46%, rgba(255, 255, 255, 0.94)),
    radial-gradient(circle at 12% 12%, rgba(200, 161, 90, 0.18), transparent 28%),
    radial-gradient(circle at 84% 18%, rgba(143, 36, 79, 0.12), transparent 30%),
    #fbf7f5;
}

body::before {
  background-image:
    linear-gradient(rgba(36, 25, 31, 0.026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(36, 25, 31, 0.02) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.42), transparent 72%);
}

.app-shell {
  width: min(1180px, calc(100% - 40px));
  padding: 32px 0 42px;
}

.topbar {
  min-height: 228px;
  margin-bottom: 18px;
  border-color: rgba(255, 255, 255, 0.82);
  background:
    linear-gradient(105deg, rgba(255, 255, 255, 0.96) 0 58%, rgba(251, 240, 242, 0.9) 58% 100%),
    radial-gradient(circle at 76% 20%, rgba(200, 161, 90, 0.16), transparent 30%);
  box-shadow: var(--shadow-soft);
}

.topbar::before {
  content: "";
  position: absolute;
  inset: 16px;
  pointer-events: none;
  border: 1px solid rgba(200, 161, 90, 0.22);
  border-radius: 8px;
}

.topbar::after {
  inset: 28px 28px auto auto;
  width: 132px;
  height: 132px;
  border-color: rgba(143, 36, 79, 0.12);
  background: radial-gradient(circle, rgba(255, 255, 255, 0.64), transparent 62%);
}

.hero-copy {
  max-width: 720px;
}

.eyebrow,
.question-kicker {
  color: var(--berry);
  font-size: 0.74rem;
  font-weight: 900;
}

h1,
h2,
.queen-profile-panel h3,
.profile-cards-header h3,
.mandala-panel h3,
.profiles-section h3,
.profile-markdowns-header h3 {
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  font-weight: 700;
}

h1 {
  max-width: 760px;
  font-size: clamp(2.6rem, 6vw, 5.4rem);
  line-height: 0.94;
  color: #2b171f;
}

h2 {
  font-size: clamp(1.65rem, 3.4vw, 2.8rem);
  color: #2b171f;
}

.hero-chips span {
  border-color: rgba(143, 36, 79, 0.14);
  background: rgba(255, 255, 255, 0.72);
  color: #6f4053;
}

.hero-visual {
  flex-basis: 190px;
  width: 190px;
  height: 190px;
}

.crown-orbit {
  border: 1px solid rgba(143, 36, 79, 0.14);
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.86), transparent 52%),
    conic-gradient(from 35deg, rgba(143, 36, 79, 0.26), rgba(200, 161, 90, 0.2), rgba(246, 228, 232, 0.82), rgba(143, 36, 79, 0.26));
  box-shadow:
    inset 0 0 0 22px rgba(255, 255, 255, 0.72),
    0 24px 58px rgba(82, 42, 55, 0.12);
}

.crown-medallion {
  width: 108px;
  height: 108px;
  border-color: rgba(200, 161, 90, 0.52);
  background:
    radial-gradient(circle at 32% 22%, rgba(255, 255, 255, 0.92), transparent 22%),
    linear-gradient(145deg, #fff7e7, #d7b76d 48%, #9b315f);
}

.crown-medallion span {
  font-size: 3.7rem;
}

.panel {
  border-color: rgba(54, 39, 45, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(255, 253, 251, 0.9)),
    var(--paper);
  box-shadow: var(--shadow-soft);
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 24px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.section-heading .trials-badge {
  justify-self: end;
  padding: 7px 11px;
  border: 1px solid rgba(143, 36, 79, 0.12);
  border-radius: 999px;
  background: var(--blush-soft);
  color: var(--berry);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.mandala-panel,
.queen-profile-panel {
  border-color: rgba(143, 36, 79, 0.11);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(251, 240, 242, 0.7)),
    var(--paper);
  box-shadow: var(--shadow-card);
}

.mandala-panel {
  grid-template-columns: 190px minmax(0, 1fr);
  padding: 20px;
}

.mandala-wrap {
  width: 190px;
}

.mandala-center {
  border-color: rgba(200, 161, 90, 0.32);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 30px rgba(82, 42, 55, 0.08);
}

.mandala-center strong {
  color: var(--berry);
}

.mandala-copy,
.queen-profile-panel p,
.profile-card-copy span,
.quiz-card span,
.quiz-card em,
.result-description {
  color: #705e66;
}

.queen-profile-panel {
  grid-template-columns: minmax(0, 1fr) 170px;
  border-color: color-mix(in srgb, var(--queen-profile-color, #8f244f) 18%, #eadde1);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--queen-profile-color, #8f244f) 7%, #ffffff), rgba(255, 255, 255, 0.94)),
    #ffffff;
}

.queen-progress-card strong {
  color: color-mix(in srgb, var(--queen-profile-color, #8f244f) 86%, #24191f);
}

.queen-meter {
  background: rgba(143, 36, 79, 0.09);
}

.queen-meter span {
  background: linear-gradient(90deg, var(--berry), var(--gold));
}

.profile-cards-header > span,
.quiz-theme-label {
  border-color: rgba(143, 36, 79, 0.12);
  background: rgba(251, 240, 242, 0.88);
  color: var(--berry) !important;
}

.profile-unlock-card {
  min-height: 176px;
  border-color: rgba(54, 39, 45, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), color-mix(in srgb, var(--theme-a) 7%, #fff8f9)),
    #ffffff;
  color: var(--ink);
}

.profile-unlock-card::before {
  content: "";
  position: absolute;
  inset: 9px;
  pointer-events: none;
  border: 1px solid rgba(200, 161, 90, 0.16);
  border-radius: 6px;
}

.profile-card-symbol {
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.7), transparent),
    linear-gradient(145deg, color-mix(in srgb, var(--theme-a) 82%, var(--berry)), color-mix(in srgb, var(--theme-c) 72%, #ffffff));
}

.profile-unlock-card-locked {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(248, 242, 244, 0.86)),
    #ffffff;
}

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

.quiz-card {
  min-height: 278px;
  display: grid;
  grid-template-columns: 1fr;
  align-content: stretch;
  gap: 12px;
  padding: 12px;
  border-color: rgba(54, 39, 45, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), color-mix(in srgb, var(--theme-a) 6%, #fff7f8)),
    #ffffff;
}

.quiz-card::after {
  content: "Start";
  align-self: end;
  width: max-content;
  padding: 7px 11px;
  border-radius: 999px;
  background: #2d2025;
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 900;
}

.quiz-art {
  min-height: 106px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  background:
    radial-gradient(circle at 24% 18%, rgba(255, 255, 255, 0.76), transparent 28%),
    linear-gradient(145deg, color-mix(in srgb, var(--theme-a) 72%, #ffffff), color-mix(in srgb, var(--theme-c) 62%, #ffffff));
}

.quiz-art::before {
  inset: 13px;
  border-color: rgba(255, 255, 255, 0.44);
  border-radius: 8px;
}

.quiz-art-symbol {
  font-size: 2.6rem;
}

.quiz-card-body {
  gap: 9px;
}

.quiz-card strong {
  color: #2b171f;
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  font-size: 1.32rem;
  line-height: 1.04;
}

.quiz-card span {
  font-size: 0.9rem;
}

.quiz-card em {
  font-size: 0.82rem;
}

.quiz-card:hover,
.quiz-card:focus-visible {
  border-color: color-mix(in srgb, var(--theme-a) 50%, #ffffff);
  box-shadow: 0 24px 42px color-mix(in srgb, var(--theme-a) 14%, transparent);
}

.quiz-card-complete {
  border-color: rgba(200, 161, 90, 0.36);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(245, 234, 217, 0.72)),
    #ffffff;
}

.complete-badge {
  background: var(--berry);
}

.icon-button,
.text-button,
.primary-button,
.danger-button {
  border-color: rgba(54, 39, 45, 0.12);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 10px 22px rgba(82, 42, 55, 0.07);
}

.text-button:hover,
.icon-button:hover {
  border-color: rgba(143, 36, 79, 0.26);
}

.primary-button {
  background: linear-gradient(135deg, var(--berry), var(--berry-dark));
  border-color: var(--berry);
}

.danger-button {
  background: #fff8f8;
  border-color: rgba(180, 35, 24, 0.22);
}

.answer-button {
  border-color: rgba(54, 39, 45, 0.09);
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--theme-a) 7%, #ffffff), rgba(255, 255, 255, 0.96)),
    #ffffff;
}

.answer-badge {
  border-radius: 50%;
}

.admin-panel,
.admin-panel .stat-tile,
.admin-panel .photo-admin-card,
.admin-panel .qc-profile-card,
.admin-panel .qc-result-card {
  background: #ffffff;
}

@media (max-width: 980px) {
  .quiz-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quiz-card {
    min-height: 212px;
    grid-template-columns: 92px minmax(0, 1fr);
  }

  .quiz-art {
    min-height: 100%;
  }
}

@media (max-width: 720px) {
  .app-shell {
    width: min(100% - 18px, 460px);
    padding: 10px 0 18px;
  }

  .topbar {
    padding: 16px;
    background:
      linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(251, 240, 242, 0.92)),
      #ffffff;
  }

  .topbar::before {
    inset: 8px;
  }

  h1 {
    font-size: 1.24rem;
    line-height: 1.06;
    padding-right: 106px;
  }

  .hero-visual {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 86px;
    height: 86px;
    opacity: 0.94;
  }

  .crown-orbit {
    box-shadow: inset 0 0 0 9px rgba(255, 255, 255, 0.72);
  }

  .crown-medallion {
    width: 48px;
    height: 48px;
  }

  .crown-medallion span {
    font-size: 1.75rem;
  }

  .orbit-dot {
    width: 7px;
    height: 7px;
  }

  .dot-rose {
    top: 8px;
    right: 18px;
  }

  .dot-gold {
    right: 6px;
    bottom: 24px;
  }

  .dot-moon {
    left: 11px;
    bottom: 16px;
  }

  .section-heading {
    grid-template-columns: 1fr;
    gap: 8px;
    margin-bottom: 10px;
    padding-bottom: 10px;
  }

  .section-heading .trials-badge {
    justify-self: start;
    padding: 5px 8px;
    font-size: 0.66rem;
  }

  .mandala-panel {
    grid-template-columns: 92px minmax(0, 1fr);
    padding: 9px;
  }

  .mandala-wrap {
    width: 92px;
  }

  .queen-profile-panel {
    grid-template-columns: minmax(0, 1fr) 88px;
  }

  .quiz-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .quiz-card {
    min-height: 128px;
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 10px;
    padding: 9px;
  }

  .quiz-card::after {
    display: none;
  }

  .quiz-art {
    min-height: 100%;
  }

  .quiz-card strong {
    font-size: 1rem;
  }
}

/* Luxe Beauty Magazine refresh - Phase 3 quiz and result flow */
#quizView {
  position: relative;
  overflow: hidden;
}

#quizView::before,
.result-panel::before {
  content: "";
  position: absolute;
  pointer-events: none;
  border: 1px solid rgba(200, 161, 90, 0.18);
  border-radius: 8px;
}

#quizView::before {
  inset: 14px;
}

.progress-row {
  position: relative;
  z-index: 1;
  margin-bottom: 14px;
  padding: 8px 10px;
  border: 1px solid rgba(143, 36, 79, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: #7a6870;
}

.progress-track {
  position: relative;
  z-index: 1;
  height: 8px;
  margin-bottom: 34px;
  background: rgba(143, 36, 79, 0.09);
}

.progress-fill {
  background: linear-gradient(90deg, var(--berry), #d78aa3, var(--gold));
}

.question-area {
  position: relative;
  z-index: 1;
  gap: 26px;
}

#questionTitle {
  max-width: 820px;
  color: #2b171f;
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 4.2vw, 3.35rem);
  font-weight: 700;
  line-height: 1.02;
}

.answers-grid {
  gap: 14px;
}

.answer-button {
  min-height: 116px;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 16px;
  border-color: rgba(54, 39, 45, 0.1);
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--theme-a) 6%, #ffffff), rgba(255, 255, 255, 0.98)),
    #ffffff;
  box-shadow: 0 12px 28px rgba(82, 42, 55, 0.07);
}

.answer-badge {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(54, 39, 45, 0.15);
  background: transparent;
  color: var(--ink);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 700;
  font-size: 1.35rem;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.answer-button:hover .answer-badge,
.answer-button:focus-visible .answer-badge,
.answer-button-selected .answer-badge {
  background: var(--theme-a);
  border-color: var(--theme-a);
  color: #ffffff;
  box-shadow: 0 4px 10px color-mix(in srgb, var(--theme-a) 25%, transparent);
}

.answer-copy {
  color: #44333b;
  font-weight: 760;
}

.answer-button:hover,
.answer-button:focus-visible {
  border-color: color-mix(in srgb, var(--theme-a) 46%, #ffffff);
  box-shadow: 0 18px 34px color-mix(in srgb, var(--theme-a) 16%, transparent);
}

.answer-button-selected,
.answer-button-selected:disabled {
  border-color: color-mix(in srgb, var(--theme-a) 58%, #ffffff);
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--theme-a) 13%, #ffffff), #ffffff 68%),
    #ffffff;
  box-shadow:
    0 0 0 3px color-mix(in srgb, var(--theme-a) 12%, transparent),
    0 18px 34px color-mix(in srgb, var(--theme-a) 18%, transparent);
}

.result-panel {
  position: relative;
  overflow: hidden;
  grid-template-columns: minmax(260px, 0.82fr) minmax(0, 1.18fr);
  background:
    linear-gradient(125deg, rgba(255, 255, 255, 0.98), rgba(251, 240, 242, 0.72)),
    #ffffff;
}

.result-panel::before {
  inset: 14px;
}

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

.result-visual {
  min-height: 380px;
  border-color: rgba(255, 255, 255, 0.82);
  background:
    radial-gradient(circle at 26% 18%, rgba(255, 255, 255, 0.76), transparent 28%),
    radial-gradient(circle at 78% 86%, rgba(255, 255, 255, 0.42), transparent 28%),
    linear-gradient(145deg, color-mix(in srgb, var(--theme-a) 70%, #ffffff), color-mix(in srgb, var(--theme-c) 62%, #ffffff));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.38),
    0 24px 56px color-mix(in srgb, var(--theme-a) 16%, transparent);
}

.result-visual::before {
  font-size: clamp(4.8rem, 12vw, 8.4rem);
}

.result-visual::after {
  inset: 26px;
  width: auto;
  height: auto;
  border: 1px solid rgba(255, 255, 255, 0.46);
  border-radius: 8px;
  opacity: 1;
}

.result-panel h2 {
  color: #2b171f;
  font-size: clamp(2.2rem, 4.6vw, 4rem);
  line-height: 0.98;
}

.result-description {
  max-width: 62ch;
  font-size: 1.08rem;
}

.photo-choice-panel {
  border-color: rgba(143, 36, 79, 0.13);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), color-mix(in srgb, var(--theme-a, #8f244f) 6%, #fbf0f2)),
    #ffffff;
  box-shadow: var(--shadow-card);
}

.photo-choice-title {
  color: #2b171f;
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  font-size: 1.28rem;
}

.oracle-card {
  border-color: rgba(255, 255, 255, 0.46);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.24),
    0 24px 58px rgba(82, 42, 55, 0.22);
}

.result-actions {
  margin-top: 18px;
}

.result-actions .primary-button {
  min-width: 150px;
}

@media (max-width: 720px) {
  #quizView::before,
  .result-panel::before {
    inset: 8px;
  }

  .progress-row {
    padding: 7px 8px;
    font-size: 0.78rem;
  }

  .progress-track {
    margin-bottom: 14px;
  }

  #questionTitle {
    font-size: clamp(1.35rem, 7vw, 1.82rem);
    line-height: 1.06;
  }

  .answers-grid {
    gap: 9px;
  }

  .answer-button {
    min-height: 66px;
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .answer-badge {
    width: 40px;
    height: 40px;
  }

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

  .result-visual {
    min-height: 132px;
  }

  .result-visual::before {
    font-size: 4.2rem;
  }

  .result-panel h2 {
    font-size: clamp(1.7rem, 8vw, 2.35rem);
  }

  .photo-choice-title {
    font-size: 1.08rem;
  }
}

/* --- Premium Aesthetic Animations & Transitions --- */

/* Tactical feedback on active click */
.answer-button {
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}
.answer-button:active {
  transform: scale(0.975);
}

/* Card Swipe Transitions */
.swipe-out-left {
  animation: swipeOut 0.24s forwards cubic-bezier(0.4, 0, 1, 1);
}
.swipe-in-right {
  animation: swipeIn 0.24s forwards cubic-bezier(0, 0, 0.2, 1);
}

@keyframes swipeOut {
  from {
    transform: translateX(0);
    opacity: 1;
    filter: blur(0);
  }
  to {
    transform: translateX(-30px);
    opacity: 0;
    filter: blur(3px);
  }
}

@keyframes swipeIn {
  from {
    transform: translateX(30px);
    opacity: 0;
    filter: blur(3px);
  }
  to {
    transform: translateX(0);
    opacity: 1;
    filter: blur(0);
  }
}

/* Poetic Feedback Float Text */
.feedback-float-text {
  position: absolute;
  pointer-events: none;
  z-index: 1000;
  color: var(--theme-a, #8f244f);
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  font-size: 1.25rem;
  font-style: italic;
  font-weight: 600;
  text-shadow: 0 2px 8px rgba(255, 255, 255, 0.82);
  opacity: 0;
  animation: floatUpPoetic 0.85s forwards ease-out;
}

@keyframes floatUpPoetic {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }
  20% {
    opacity: 0.85;
    transform: translateY(0);
  }
  80% {
    opacity: 0.85;
    transform: translateY(-6px);
  }
  100% {
    opacity: 0;
    transform: translateY(-14px);
  }
}

/* --- Admin Photo Hover Preview Tooltip --- */
.photo-preview-tooltip {
  position: absolute;
  pointer-events: none;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--oracle-paper, #fffaf5);
  box-shadow: 0 10px 32px rgba(82, 42, 55, 0.22);
  padding: 8px;
  max-width: 220px;
  animation: fadeInQuick 0.15s ease-out;
}

.photo-preview-tooltip img {
  width: 200px;
  height: auto;
  border-radius: 8px;
  border: 1px solid rgba(54, 39, 45, 0.12);
  background: #fbf0f2;
}

@keyframes fadeInQuick {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* --- Royal Rank Badge & Dynamic Theme Glows --- */

.royal-rank-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(200, 161, 90, 0.09);
  border: 1px solid rgba(200, 161, 90, 0.26);
  color: var(--gold);
  font-family: Manrope, Inter, system-ui, sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.royal-rank-badge strong {
  color: var(--gold);
  font-weight: 800;
}

.royal-rank-badge .spark-count {
  color: var(--muted);
  font-weight: 500;
  text-transform: none;
}

/* Dynamic theme background glows for active quiz view */
body[class*="theme-"] {
  background:
    linear-gradient(180deg, rgba(255, 253, 251, 0.97), color-mix(in srgb, var(--theme-a) 4%, #fbf0f2) 46%, rgba(255, 255, 255, 0.96)),
    radial-gradient(circle at 15% 15%, color-mix(in srgb, var(--theme-a) 16%, transparent), transparent 32%),
    radial-gradient(circle at 85% 20%, color-mix(in srgb, var(--theme-b) 12%, transparent), transparent 32%),
    #fbf7f5;
  transition: background 0.4s ease;
}

/* Theme color overrides for active quiz elements */
body[class*="theme-"] .question-kicker {
  color: var(--theme-a);
  transition: color 0.3s ease;
}

body[class*="theme-"] .progress-fill {
  background: linear-gradient(90deg, var(--theme-a), var(--theme-b), var(--theme-c));
  transition: background 0.3s ease;
}


