@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700&family=Lora:ital,wght@0,400;0,700;1,400&family=Manrope:wght@400;500;600&display=swap');

:root {
  --ink-900: #33282b;
  --ink-700: #4e4143;
  --ink-500: #927c76;
  --ink-400: #b7a29c;
  --surface-0: #fffaf7;
  --surface-1: #ffffff;
  --surface-soft: #f7eee8;
  --surface-soft-2: #f1e3db;
  --stroke: #ead8ce;
  --stroke-strong: #dfc6bb;
  --accent-strong: #e64d79;
  --accent-soft: #fce9ef;
  --accent-warm: #fd8f76;
  --accent-gold: #febc82;
  --success: #2f9b68;
  --success-soft: #dff7ea;
  --shadow-card: 0 24px 50px -22px rgba(88, 49, 39, 0.22);
  --shadow-soft: 0 12px 32px -20px rgba(88, 49, 39, 0.18);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  min-height: 100vh;
  background: linear-gradient(180deg, #fad5e5 0%, #fde3d4 30%, #fef0e8 60%, #fffdf8 100%);
  background-attachment: fixed;
  color: var(--ink-700);
}

svg[data-lucide] {
  stroke-width: 1.75;
}

header {
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--stroke);
  flex-shrink: 0;
  position: relative;
  z-index: 10;
  backdrop-filter: blur(14px);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 24px;
}

.logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo {
  height: 34px;
  width: auto;
  max-width: 260px;
  object-fit: contain;
}

.logo-fallback {
  display: none;
  font-size: 20px;
  font-weight: 700;
  color: var(--accent-strong);
}

.header-divider {
  display: none;
  width: 1px;
  height: 28px;
  background: var(--stroke);
  flex-shrink: 0;
}

.header-tagline {
  display: none;
  font-size: 12px;
  color: var(--ink-400);
  line-height: 1.4;
}

#root {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

#main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  position: relative;
}

.flex-spacer {
  display: none;
}

#quiz-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.94);
  overflow: hidden;
  position: relative;
  z-index: 5;
}

.card-stripe {
  height: 4px;
  background: linear-gradient(to right, var(--accent-strong), var(--accent-warm), var(--accent-gold));
  flex-shrink: 0;
}

#quiz-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 20px 16px 26px;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

#quiz-content::-webkit-scrollbar {
  display: none;
}

@media (min-width: 768px) {
  .header-divider {
    display: flex;
  }

  .header-tagline {
    display: block;
  }

  .header-inner {
    padding: 10px 48px;
  }

  #main {
    align-items: center;
    padding: 0 16px;
  }

  .flex-spacer {
    display: block;
    flex: 1;
    max-height: 72px;
  }

  #spacer-bottom {
    max-height: 48px;
  }

  #quiz-card {
    width: 100%;
    max-width: 580px;
    max-height: 684px;
    flex: none;
    border-radius: 26px;
    box-shadow: var(--shadow-card);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.55);
  }

  #quiz-content {
    padding: 22px 28px 30px;
  }

  #bg-stars {
    display: block;
  }

  #theme-icon-above {
    display: flex;
    justify-content: center;
    flex-shrink: 0;
  }

  #quiz-card.is-expert-card-screen {
    max-width: 760px;
  }
}

@media (max-width: 767px) {
  #bg-stars,
  #theme-icon-above {
    display: none;
  }
}

#bg-stars {
  display: none;
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.bg-star {
  position: absolute;
  border-radius: 50%;
  opacity: 0;
  animation: twinkle 3s ease-in-out infinite;
}

@keyframes twinkle {
  0%, 100% {
    opacity: 0;
    transform: scale(0.8);
  }

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

#theme-icon-above {
  animation: float 3s ease-in-out infinite;
}

#theme-icon-above svg {
  display: block;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-6px);
  }
}

.screen {
  animation: slideIn 0.28s ease;
}

.screen-back {
  animation: slideInBack 0.28s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(28px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInBack {
  from {
    opacity: 0;
    transform: translateX(-28px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.back-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ink-400);
  font-size: 14px;
  padding: 0 0 14px;
  transition: color 0.2s;
  font-family: inherit;
}

.back-btn:hover {
  color: var(--ink-700);
}

.back-btn svg {
  width: 16px;
  height: 16px;
}

.close-button {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  font-size: 20px;
  color: #BCA7A1;
  cursor: pointer;
  z-index: 10;
}

.progress-bar {
  height: 3px;
  background: #ede0d8;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 14px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(to right, var(--accent-strong), var(--accent-warm));
  border-radius: 999px;
  transition: width 0.4s ease;
}

.screen-title-lg {
  font-size: 20px;
  font-weight: 700;
  font-family: 'Playfair Display', serif;
  color: var(--ink-900);
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}

.screen-sub {
  font-size: 13px;
  color: var(--ink-400);
  margin-bottom: 14px;
  line-height: 1.55;
}

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

.topic-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  background: rgba(255, 255, 255, 0.92);
  border: 1.5px solid var(--stroke);
  border-radius: 18px;
  padding: 20px;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  text-align: left;
  width: 100%;
  font-family: inherit;
}

.topic-card:hover {
  border-color: rgba(230, 77, 121, 0.45);
  background: #fffafc;
  transform: scale(1.02);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.topic-card:active {
  transform: scale(1.02);
}

.topic-icon-wrap {
  width: 44px;
  height: 44px;
  background: var(--surface-soft);
  color: var(--ink-700);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  flex-shrink: 0;
}

.topic-icon-wrap svg {
  width: 20px;
  height: 20px;
}

.topic-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-900);
}

.topic-desc {
  font-size: 11px;
  color: #BCA7A1;
  margin-top: 2px;
  line-height: 1.4;
}

.welcome-theme-hero {
  display: flex;
  justify-content: center;
  margin: -8px 0 6px;
}

.welcome-theme-hero-art {
  width: min(210px, 72%);
  padding: 6px 8px 0;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0));
}

.welcome-theme-hero-art svg {
  width: 100%;
  height: auto;
  display: block;
  color: #D4A0A0;
}

.welcome-title {
  font-size: 18px;
  font-weight: 700;
  font-family: 'Playfair Display', serif;
  color: var(--ink-900);
  line-height: 1.4;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.welcome-bullets {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 14px;
}

.welcome-bullet {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-700);
  line-height: 1.5;
}

.bullet-dot {
  width: 20px;
  height: 20px;
  color: #D4A0A0;
  flex-shrink: 0;
  margin-top: 0px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
}

.bullet-dot::before {
  content: '✓';
}

.welcome-bottom {
  font-size: 12px;
  color: #9A8A84;
  margin-bottom: 14px;
  line-height: 1.55;
}

.screen-title {
  font-size: 18px;
  font-weight: 700;
  font-family: 'Playfair Display', serif;
  color: var(--ink-900);
  margin-bottom: 12px;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.options-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.option-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.92);
  border: 1.5px solid var(--stroke);
  border-radius: 16px;
  cursor: pointer;
  text-align: left;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  width: 100%;
  font-family: inherit;
}

.option-btn:hover {
  border-color: rgba(230, 77, 121, 0.4);
  background: #fffafc;
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
}

.option-btn.is-selected {
  border-color: #E975A2;
  background: #FFF5F3;
  transform: scale(1.01);
}

.option-icon-wrap {
  width: 36px;
  height: 36px;
  background: var(--surface-soft);
  color: var(--ink-700);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  opacity: 0.7;
}

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

.option-text {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-900);
}

.option-subtext {
  font-size: 12px;
  color: var(--ink-400);
  margin-top: 2px;
  line-height: 1.35;
}

.info-label {
  font-size: 11px;
  color: var(--ink-400);
  margin-bottom: 3px;
}

.info-title {
  font-size: 18px;
  font-weight: 700;
  font-family: 'Playfair Display', serif;
  color: var(--ink-900);
  margin-bottom: 6px;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.info-sub {
  font-size: 12px;
  color: var(--ink-400);
  margin-bottom: 10px;
  line-height: 1.5;
}

.quotes-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.quote-item {
  background: var(--surface-soft);
  border-left: 3px solid var(--accent-warm);
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 13px;
  font-style: italic;
  color: rgba(51, 40, 43, 0.82);
  line-height: 1.45;
}

@keyframes storyAppear {
  to { opacity: 1; transform: translateY(0); }
}

.story-card {
  opacity: 0;
  transform: translateY(10px);
  animation: storyAppear 0.4s ease-out forwards;
}
.story-card:nth-child(1) { animation-delay: 0ms; }
.story-card:nth-child(2) { animation-delay: 100ms; }
.story-card:nth-child(3) { animation-delay: 200ms; }
.story-card:nth-child(4) { animation-delay: 300ms; }
.story-card:nth-child(5) { animation-delay: 400ms; }

.info-bottom {
  font-size: 13px;
  color: var(--ink-400);
  margin-bottom: 12px;
  line-height: 1.55;
}

.text-input-screen {
  display: flex;
  flex-direction: column;
}

.quiz-textarea {
  width: 100%;
  min-height: 120px;
  max-height: 160px;
  resize: none;
  border: 1.5px solid var(--stroke);
  border-radius: 16px;
  padding: 12px 13px;
  font-size: 14px;
  font-family: inherit;
  color: var(--ink-900);
  resize: none;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  margin-bottom: 14px;
  height: 88px;
  background: rgba(255, 255, 255, 0.92);
}

.quiz-textarea:focus {
  border-color: rgba(230, 77, 121, 0.52);
  box-shadow: 0 0 0 3px rgba(230, 77, 121, 0.08);
}

.textarea-hint {
  font-size: 12px;
  color: #9A8A84;
  margin-top: 8px;
  line-height: 1.45;
}

.quiz-textarea::placeholder {
  color: var(--ink-400);
}

.loading-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 320px;
}

.loading-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--ink-900);
  text-align: center;
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}

.loading-steps {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 340px;
  margin-bottom: 24px;
}

.loading-step {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  position: relative;
}

.step-connector {
  position: relative;
  height: 16px;
  width: 40px;
  flex-shrink: 0;
}

.step-connector::after {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 0;
  bottom: 0;
  width: 2px;
  background: #F2E6DC;
  transition: background 0.4s;
}

.step-connector.done::after {
  background: #8ad4ab;
}

.step-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.4s, color 0.4s;
}

.step-circle.pending {
  background: #ede0d8;
  color: var(--ink-400);
}

.step-circle.active,
.step-circle.done {
  background: transparent;
}

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

.step-ring-svg,
.step-ring-done {
  width: 40px;
  height: 40px;
  display: block;
}

.step-ring-bg {
  fill: none;
  stroke: #F2E6DC;
  stroke-width: 3;
}

.step-ring-fill {
  fill: none;
  stroke: #FD8F76;
  stroke-width: 3;
  stroke-linecap: round;
}

.step-texts {
  padding-top: 8px;
}

.step-text {
  font-size: 14px;
  font-weight: 500;
  transition: color 0.4s;
}

.step-text.pending {
  color: #bfaea6;
}

.step-text.active {
  color: var(--ink-900);
}

.step-text.done {
  color: var(--success);
}

.step-subtext {
  font-size: 12px;
  margin-top: 1px;
  transition: color 0.4s;
}

.step-subtext.pending {
  color: #d9cac2;
}

.step-subtext.active {
  color: var(--ink-400);
}

.reroll-link {
  text-align: center;
  font-family: 'Manrope', sans-serif;
  font-size: 13px;
  color: #BCA7A1;
  text-decoration: underline;
  margin-top: 12px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 8px;
  width: 100%;
  display: block;
}

.reroll-options {
  display: flex !important;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
  animation: fadeIn 0.3s ease;
}

.reroll-question {
  font-family: 'Manrope', sans-serif;
  font-size: 12px;
  color: #9A8A84;
  text-align: center;
  margin-bottom: 4px;
}

.reroll-option {
  font-family: 'Manrope', sans-serif;
  font-size: 13px;
  padding: 10px 16px;
  border: 1px solid #F2E6DC;
  border-radius: 10px;
  background: white;
  color: #1A1412;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.2s, background 0.2s;
  width: 100%;
}

.reroll-option:active {
  background: #FAF6F1;
  border-color: #E975A2;
}

.reroll-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.reroll-modal {
  background: white;
  border-radius: 16px;
  padding: 24px;
  max-width: 320px;
  width: 90%;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.reroll-modal-title {
  font-family: 'Manrope', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: #1A1412;
  margin-bottom: 16px;
  text-align: center;
}

.viewers-counter {
  display: inline-flex;
  overflow: hidden;
  height: 1.2em;
  vertical-align: bottom;
  position: relative;
}

.viewers-number {
  display: inline-block;
  transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
}

.slide-out-up {
  transform: translateY(-100%);
  opacity: 0;
}

.slide-out-down {
  transform: translateY(100%);
  opacity: 0;
}

.slide-in-up {
  transform: translateY(100%);
  opacity: 0;
  transition: none;
}

.slide-in-down {
  transform: translateY(-100%);
  opacity: 0;
  transition: none;
}

.flickering-name {
  display: inline-block;
  min-width: 80px;
  animation: fadeInOut 0.3s ease-in-out;
}

@keyframes fadeInOut {
  0%   { opacity: 0.3; }
  50%  { opacity: 1;   }
  100% { opacity: 0.3; }
}

.step-subtext.done {
  color: #5ba17c;
}

.loading-bar {
  height: 6px;
  background: #ede0d8;
  border-radius: 999px;
  overflow: hidden;
  width: 100%;
  max-width: 340px;
  margin-bottom: 12px;
}

.loading-bar-fill {
  height: 100%;
  background: linear-gradient(to right, var(--accent-strong), var(--accent-warm));
  border-radius: 999px;
  width: 0%;
  transition: width 0.1s linear;
}

.loading-fact {
  text-align: center;
  font-size: 12px;
  color: var(--ink-400);
  font-style: italic;
  min-height: 20px;
  transition: opacity 0.3s;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.ec-header-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--ink-900);
  margin-bottom: 2px;
  letter-spacing: -0.02em;
  padding-right: 36px;
}

.ec-header-sub {
  font-size: 12px;
  color: var(--ink-400);
  margin-bottom: 12px;
}

.ec-header-match {
  font-family: 'Manrope', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #E975A2;
  margin-bottom: 12px;
}

.ec-shell {
  border: 1.5px solid var(--stroke);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 251, 248, 0.96));
  box-shadow: var(--shadow-soft);
  padding: 12px;
  margin-bottom: 12px;
}

.ec-hero-media {
  position: relative;
  min-height: 308px;
  border-radius: 20px;
  overflow: hidden;
  background: linear-gradient(180deg, #281b1f 0%, #140f12 100%);
}

.ec-hero-media.is-fallback {
  background: radial-gradient(circle at 30% 20%, rgba(253, 143, 118, 0.32), transparent 28%), linear-gradient(135deg, #3f2730 0%, #1d1417 100%);
}

.ec-hero-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(18, 10, 13, 0.16) 0%, rgba(18, 10, 13, 0.42) 52%, rgba(18, 10, 13, 0.9) 100%);
  z-index: 1;
}

.ec-hero-photo {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.ec-hero-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.86);
}

.ec-hero-placeholder svg {
  width: 46px;
  height: 46px;
}

.ec-hero-media:not(.is-fallback) .ec-hero-placeholder {
  opacity: 0;
  pointer-events: none;
}

.ec-hero-badges {
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: space-between;
}

.ec-status-pill,
.ec-gift-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  backdrop-filter: blur(12px);
}

.ec-status-pill {
  background: rgba(54, 162, 110, 0.25);
  color: #ecfff5;
  border: 1px solid rgba(147, 236, 193, 0.18);
}

.ec-gift-pill {
  background: rgba(254, 188, 130, 0.96);
  color: #40281b;
}

.ec-status-pill svg,
.ec-gift-pill svg {
  width: 15px;
  height: 15px;
}

.ec-hero-content {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 3;
}

.ec-name {
  font-size: 34px;
  line-height: 1;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: -0.03em;
  margin-bottom: 10px;
  text-wrap: balance;
}

.ec-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ec-chip {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.95);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
  backdrop-filter: blur(12px);
}

.ec-chip-accent {
  background: rgba(252, 233, 239, 0.14);
}

.ec-panel {
  padding: 14px 2px 2px;
}

.ec-quote {
  background: linear-gradient(180deg, #f7ebe5 0%, #fdf4ef 100%);
  border: 1px solid rgba(223, 198, 187, 0.72);
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 12px;
  text-align: center;
  font-size: 14px;
  font-style: italic;
  line-height: 1.5;
  color: var(--ink-900);
}

.ec-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.ec-metric {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--stroke);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
}

.ec-metric-icon {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: var(--surface-soft);
  color: var(--ink-700);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

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

.ec-metric-copy {
  min-width: 0;
}

.ec-metric-val {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink-900);
  line-height: 1.05;
}

.ec-metric-label {
  font-size: 11px;
  color: var(--ink-400);
  margin-top: 3px;
}

.why-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.why-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: var(--ink-700);
  line-height: 1.45;
}

.why-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--surface-soft);
  color: var(--accent-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.why-dot svg {
  width: 14px;
  height: 14px;
}

.ec-review {
  font-size: 13px;
  font-style: italic;
  color: var(--ink-500);
  text-align: center;
  line-height: 1.5;
}

/* ── Expert Card V3 ─────────────────────────────────────────────── */

/* Animations */
@keyframes ec3-ripple {
  0%   { transform: scale(1);   opacity: 0.4; }
  70%  { transform: scale(2.2); opacity: 0; }
  100% { transform: scale(2.2); opacity: 0; }
}

@keyframes ec3-gift-wiggle {
  0%, 100% { transform: rotate(0deg); }
  20%       { transform: rotate(-18deg); }
  40%       { transform: rotate(16deg); }
  60%       { transform: rotate(-10deg); }
  80%       { transform: rotate(8deg); }
}

/* Card */
.ec3-card {
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.10), 0 1px 3px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  max-width: 400px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  padding: 0;
  width: 100%;
  animation: ec3-card-appear 0.5s ease-out;
}

@keyframes ec3-card-appear {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Body — контентная часть */
.ec3-body {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
}

/* Status badge */
.ec3-statusbar {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #F0F7F1;
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 12px;
  color: #4A7C59;
  font-weight: 500;
  margin-bottom: 16px;
  align-self: flex-start;
  white-space: nowrap;
}

.ec3-online-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #6BAF7A;
  flex-shrink: 0;
  position: relative;
}

.ec3-online-dot::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: #6BAF7A;
  opacity: 0.3;
  animation: ec3-ripple 1.8s ease-out infinite;
}

/* Match badge */
.ec3-match-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #FFF8F0, #FEF0E0);
  border: 1px solid #FEBC82;
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  font-family: 'Manrope', sans-serif;
  color: #B45309;
  margin-bottom: 14px;
}

/* Main row: фото + инфо */
.ec3-main {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 16px;
}

/* Photo */
.ec3-photo-wrap {
  width: 110px;
  height: 140px;
  flex-shrink: 0;
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  background: linear-gradient(135deg, #f0d5e0 0%, #ddb8c8 100%);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.ec3-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  display: block;
}

.ec3-photo-fallback {
  display: none;
  position: absolute;
  inset: 0;
  align-items: center;
  justify-content: center;
  color: #ba657b;
}

.ec3-photo-fallback svg {
  width: 36px;
  height: 36px;
}

.ec3-photo-wrap.is-fallback .ec3-photo-fallback {
  display: flex;
}

/* Info (right of photo) */
.ec3-info {
  flex: 1;
  min-width: 0;
}

/* Name */
.ec3-name {
  font-size: 20px;
  font-weight: 700;
  color: #1A1412;
  font-family: 'Manrope', sans-serif;
  line-height: 1.2;
  margin: 0 0 10px;
  text-align: left;
}

/* Spec chips */
.ec3-spec-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 12px;
}

.ec3-spec-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 6px;
  line-height: 1.3;
  padding: 3px 7px;
  font-size: 10px;
  font-weight: 500;
  font-family: 'Manrope', sans-serif;
  background: #F2E6DC;
  color: #6F4A57;
  white-space: nowrap;
}

/* Rating */
.ec3-rating-line {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.ec3-rating-star {
  color: #FEBC82;
  font-size: 18px;
  line-height: 1;
}

.ec3-rating-number {
  font-size: 18px;
  font-weight: 700;
  color: #1A1412;
  font-family: 'Manrope', sans-serif;
  line-height: 1;
}

.ec3-rating-label {
  font-size: 11px;
  color: #9A8A84;
  font-family: 'Manrope', sans-serif;
}

.ec3-stats-secondary {
  font-size: 12px;
  color: #9A8A84;
  font-family: 'Manrope', sans-serif;
  margin: 0;
  line-height: 1.4;
}

/* Viewers line */
.ec3-viewers-line {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: #FD8F76;
  font-family: 'Manrope', sans-serif;
  margin-top: 6px;
  margin-bottom: 0;
  animation: ec3-pulse-opacity 2s ease-in-out infinite;
}

@keyframes ec3-pulse-opacity {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.6; }
}

/* Style sliders */
.ec3-style-section {
  margin-top: 16px;
  margin-bottom: 16px;
}

.ec3-style-title {
  font-size: 12px;
  font-weight: 600;
  color: #9A8A84;
  font-family: 'Manrope', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.ec3-style-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.ec3-style-row:last-child {
  margin-bottom: 0;
}

.ec3-style-label-left,
.ec3-style-label-right {
  font-size: 11px;
  color: #9A8A84;
  font-family: 'Manrope', sans-serif;
  min-width: 65px;
  flex-shrink: 0;
}

.ec3-style-label-left {
  text-align: right;
}

.ec3-style-label-right {
  text-align: left;
}

.ec3-style-track {
  flex: 1;
  height: 6px;
  background: #EDE8E3;
  border-radius: 100px;
  position: relative;
  overflow: hidden;
}

.ec3-style-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  border-radius: 100px;
  background: #D4A0A0;
}

.ec3-style-dot {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 14px;
  height: 14px;
  background: white;
  border: 3px solid #D4A0A0;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.10);
}

/* Review */
.ec3-review-block {
  position: relative;
  background: linear-gradient(135deg, #FAF5EF, #F8F0EA);
  border-left: 3px solid #FD8F76;
  border-radius: 14px;
  padding: 16px 18px;
  margin-top: 16px;
  margin-bottom: 0;
}

.ec3-review-block::before {
  content: "\201C";
  font-family: Georgia, serif;
  font-size: 42px;
  color: #E975A2;
  opacity: 0.2;
  position: absolute;
  top: 4px;
  left: 12px;
  line-height: 1;
  pointer-events: none;
}

.ec3-review-text {
  font-size: 14px;
  font-family: 'Lora', serif;
  font-weight: 400;
  font-style: italic;
  color: #1A1412;
  line-height: 1.5;
  margin: 0;
  position: relative;
  z-index: 1;
  padding-left: 8px;
}

.ec3-review-author {
  font-size: 13px;
  color: #BCA7A1;
  font-family: 'Manrope', sans-serif;
  font-style: normal;
}

/* Trust line */
.ec3-trust-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  color: #9A8A84;
  font-family: 'Manrope', sans-serif;
  margin-top: 16px;
  margin-bottom: 0;
}

.ec3-trust-checkmark {
  color: #6BAF7A;
  font-weight: 700;
}

/* CTA */
.ec3-cta-block {
  display: flex;
  flex-direction: column;
  padding: 0 24px 24px;
}

.btn-primary.ec3-cta {
  margin-bottom: 0;
  padding: 16px;
  border-radius: 14px;
  background: linear-gradient(135deg, #FD8F76, #E975A2);
  border: none;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  font-family: 'Manrope', sans-serif;
  width: 100%;
  box-shadow: 0 6px 20px rgba(253, 143, 118, 0.30);
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn-primary.ec3-cta:hover {
  box-shadow: 0 8px 24px rgba(253, 143, 118, 0.45);
  transform: translateY(-1px);
}

.btn-primary.ec3-cta:active {
  transform: scale(0.98);
  box-shadow: 0 3px 12px rgba(253, 143, 118, 0.25);
}

.ec3-cta-note {
  font-size: 12px;
  color: #9A8A84;
  font-family: 'Manrope', sans-serif;
  text-align: center;
  margin-top: 10px;
}

.hiw-title {
  font-family: 'Manrope', sans-serif;
  font-weight: 700;
  font-size: 20px;
  color: #1A1412;
  margin-bottom: 4px;
}

.hiw-subtitle {
  font-family: 'Manrope', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #E975A2;
  margin-bottom: 24px;
}

.hiw-timeline {
  display: flex;
  flex-direction: column;
  margin-bottom: 24px;
}

.hiw-timeline-step {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.hiw-step-left {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hiw-step-icon-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #FFF5F0;
  border: 1.5px solid #F2E6DC;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #D4A0A0;
}

.hiw-step-icon-circle svg {
  width: 20px;
  height: 20px;
  stroke-width: 2;
}

.hiw-step-connector {
  width: 2px;
  height: 20px;
  background: #F2E6DC;
}

.hiw-step-right {
  padding-top: 10px;
}

.hiw-step-title {
  font-family: 'Manrope', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: #1A1412;
  margin-bottom: 4px;
}

.hiw-step-desc {
  font-family: 'Manrope', sans-serif;
  font-size: 14px;
  color: #9A8A84;
  line-height: 1.5;
}

.hiw-check {
  color: #6BAF7A;
  font-weight: 600;
}

.hiw-guarantees-line {
  text-align: center;
  font-family: 'Manrope', sans-serif;
  font-size: 11px;
  color: #BCA7A1;
  margin-top: 16px;
  line-height: 1.8;
  text-align: center;
}

.hiw-catalog-link {
  text-align: center;
  font-family: 'Manrope', sans-serif;
  font-size: 14px;
  color: #9A8A84;
  text-decoration: underline;
  margin-top: 12px;
  cursor: pointer;
  background: none;
  border: none;
  width: 100%;
  display: block;
  padding: 8px;
}

.btn-primary {
  width: 100%;
  background: linear-gradient(135deg, var(--accent-strong), #e44c85);
  color: white;
  border: none;
  border-radius: 18px;
  padding: 15px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
  font-family: inherit;
  margin-bottom: 6px;
  box-shadow: 0 14px 28px -20px rgba(228, 76, 133, 0.85);
}

.btn-primary:hover {
  transform: translateY(-1px);
  filter: saturate(1.03);
}

.btn-primary:disabled {
  background: #ede0d8;
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
  filter: none;
}

.btn-arrow {
  margin-left: 8px;
  display: inline-block;
  transition: transform 0.2s ease;
}

.btn-primary:hover .btn-arrow {
  transform: translateX(2px);
}

.btn-secondary {
  width: 100%;
  background: none;
  border: none;
  color: var(--ink-400);
  font-size: 13px;
  cursor: pointer;
  padding: 8px 6px 4px;
  transition: color 0.2s;
  font-family: inherit;
  text-decoration: none;
  display: block;
  text-align: center;
}

.btn-secondary:hover {
  color: var(--ink-700);
}

.skip-merged {
  font-size: 14px;
  color: #9A8A84;
  font-weight: 500;
  text-align: center;
}

.spacer-flex {
  flex: 1;
}

@media (max-width: 520px) {

  .ec3-body {
    padding: 16px 16px 14px;
  }

  .ec3-cta-block {
    padding: 0 16px 16px;
  }

  .ec3-photo-wrap {
    width: 96px;
    height: 122px;
  }

  .ec3-name {
    font-size: 17px;
    margin-bottom: 8px;
  }

  .ec-hero-media {
    min-height: 272px;
  }

  .ec-name {
    font-size: 30px;
  }

  .ec-metrics {
    grid-template-columns: 1fr;
  }

  /* Карточка компактнее на десктопе */
  .specialist-card {
    max-width: 480px;
    margin: 0 auto;
  }

  /* Шкалы стиля — в одну строку */
  .styles-section {
    display: flex;
    gap: 24px;
  }

  .style-row {
    flex: 1;
  }

  /* Отзыв — меньше padding */
  .review-block {
    padding: 14px 16px;
  }

  /* Уменьшить отступы между блоками */
  .specialist-content {
    padding: 16px 20px;
    gap: 12px;
  }

  /* Фото чуть меньше */
  .specialist-photo {
    width: 100px;
    height: 130px;
  }

  /* Кнопка и подписи — компактнее */
  .cta-button {
    padding: 14px;
  }

  /* Блок "Что учесть при новом подборе" — скрыть inline на десктопе */
  #reroll-area > .reroll-options {
    display: none !important;
  }

  .reroll-modal .reroll-option {
    width: 100%;
    margin-bottom: 8px;
  }
}
