/* Страница промо «колесо»: поверх portal-site.css; на мобильных — своя сетка шапки без наложений */

.u-hidden {
  display: none !important;
}

/* В дампе нет Victor Serif — связка сериф + интер */
body.fortune-body,
body.fortune-body h1,
body.fortune-body h2,
body.fortune-body #wheelTitleMeta {
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif !important;
}

body.fortune-body p:not(.wheel-input-title),
body.fortune-body .link,
body.fortune-body button.link-bg,
body.fortune-body .wheel-platform {
  font-family: "Inter Tight", system-ui, sans-serif !important;
}

/* --- Шапка: без наложений на узком экране --- */
@media (max-width: 840px) {
  body.fortune-body header {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  body.fortune-body .header_wrap.fortune-header-stack {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    gap: 10px !important;
    flex-wrap: nowrap !important;
    padding-left: clamp(14px, 4vw, 24px);
    padding-right: clamp(14px, 4vw, 24px);
    padding-top: 12px !important;
    padding-bottom: 12px !important;
    box-sizing: border-box;
    max-width: 100vw;
  }

  body.fortune-body .header_wrap .left_block,
  body.fortune-body .header_wrap .logo,
  body.fortune-body .header_wrap .right_wrap {
    position: relative !important;
    left: auto !important;
    right: auto !important;
    transform: none !important;
    width: 100% !important;
    max-width: none !important;
    flex: none !important;
    order: unset;
    padding: 0 !important;
    text-align: center;
  }

  body.fortune-body .header_wrap .left_block,
  body.fortune-body .header_wrap.fortune-header-stack .fortune-header-link {
    order: 2;
  }

  body.fortune-body .header_wrap .logo.fortune-header-logo {
    order: 1;
    margin: 0 auto;
    text-align: center;
  }

  body.fortune-body .header_wrap .right_wrap.fortune-header-meta {
    order: 3;
    flex-direction: column;
    gap: 4px !important;
    align-items: center !important;
  }

  body.fortune-body .header_wrap #wheelTitleMeta {
    max-width: 100%;
    white-space: normal;
    word-break: break-word;
    line-height: 1.25;
  }

  body.fortune-body .header_wrap .wheel-platform {
    max-width: 100%;
    line-height: 1.35;
    white-space: normal;
    word-break: break-word;
  }

  body.fortune-body .header_wrap .link {
    display: inline-block;
    font-size: 13px !important;
  }

  body.fortune-body .header_wrap .logo a {
    display: inline-block;
    padding: 2px 0;
  }
}

.fortune-main {
  flex: 1;
  padding-top: 76px;
}

@media (max-width: 840px) {
  .fortune-main {
    padding-top: clamp(100px, 28vw, 140px);
  }
}

.fortune-content {
  width: min(94%, 1180px) !important;
  max-width: 1180px;
  margin-left: auto;
  margin-right: auto;
}

.fortune-page-title {
  text-align: center;
  margin-top: clamp(20px, 4vw, 48px);
  margin-bottom: 10px;
}

.fortune-page-title + p.wheel-intro {
  text-align: center;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 4px;
  font-size: clamp(14px, 3.8vw, 16px);
  line-height: 1.5;
}

.fortune-promo-chip {
  display: flex;
  justify-content: center;
  margin-bottom: 14px;
  padding: 0 8px;
}

.fortune-used {
  margin: 48px auto 0;
}

.fortune-used .text_wrap .text .wheel-used-title {
  margin: 20px 0 16px;
}

/* Один столбец: блок с роликом + форма поверх */
.fortune-flow--single {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(18px, 4vw, 32px);
  margin-top: clamp(24px, 5vw, 52px);
  width: 100%;
}

/* --- Колесо-экран: видео + стекло с формой --- */
.fortune-hero-ring {
  width: 100%;
  max-width: min(520px, 100%);
}

.fortune-video--hero {
  position: relative;
  margin: 0 auto;
  padding: 0;
  width: 100%;
  border-radius: 50%;
  border: none;
  background: radial-gradient(circle at 50% 40%, rgb(227 227 150 / 0.18), #111010 72%);
  box-shadow:
    0 0 0 1px rgb(243 238 231 / 0.12),
    0 0 48px rgb(94 94 62 / 0.22),
    inset 0 0 120px rgb(0 0 0 / 0.35);
  aspect-ratio: 1;
  overflow: hidden;
}

.fortune-video--hero.fortune-video--fallback {
  display: grid;
  place-items: center;
  min-height: min(280px, 88vw);
  aspect-ratio: 1;
}

.fortune-video--hero.fortune-video--fallback video {
  display: none !important;
}

.fortune-video--hero.fortune-video--fallback::after {
  content: "Ролик скоро появится";
  font-family: "Inter Tight", system-ui, sans-serif;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgb(227 227 150 / 0.6);
}

.fortune-video--hero video {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 112%;
  height: 112%;
  max-width: none;
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
  clip-path: circle(closest-side at 50% 50%);
}

.fortune-hero-overlay {
  position: absolute;
  inset: clamp(14px, 5%, 44px);
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(14px, 4vw, 22px);
  border-radius: 50%;
  background: radial-gradient(
    ellipse 90% 80% at 50% 45%,
    rgb(17 16 16 / 0.38) 0%,
    rgb(17 16 16 / 0.78) 100%
  );
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgb(243 238 231 / 0.12);
  box-shadow: inset 0 1px 0 rgb(243 238 231 / 0.08);
  transition:
    opacity 0.65s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.65s cubic-bezier(0.4, 0, 0.2, 1),
    visibility 0s linear 0.65s;
}

.fortune-overlay-inner {
  width: min(92%, 300px);
  text-align: center;
}

.fortune-overlay-form {
  margin: 0;
  padding: 0;
  border: none;
}

.fortune-overlay-chip {
  display: inline-block;
  padding: 4px 12px;
  margin-bottom: 10px;
  font-family: "Inter Tight", system-ui, sans-serif;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgb(243 238 231 / 0.7);
  border: 1px solid rgb(243 238 231 / 0.2);
  border-radius: 999px;
}

.fortune-overlay-title {
  font-family: "Cormorant Garamond", serif !important;
  font-size: clamp(22px, 6.5vw, 28px);
  font-weight: 500;
  color: #f2f2f2;
  margin: 0 0 4px;
  letter-spacing: 0.02em;
}

.fortune-overlay-sub {
  font-family: "Inter Tight", system-ui, sans-serif !important;
  font-size: 12px;
  color: rgb(243 238 231 / 0.55);
  margin: 0 0 14px;
  line-height: 1.4;
}

.fortune-overlay-field {
  display: block;
  text-align: left;
}

.fortune-overlay-field input {
  width: 100%;
  padding: 14px 16px;
  box-sizing: border-box;
  border: 1px solid rgb(243 238 231 / 0.2);
  border-radius: 10px;
  background: rgb(242 242 242 / 0.08);
  color: #f2f2f2;
  font-family: "Inter Tight", system-ui, sans-serif !important;
  font-size: 16px;
  outline: none;
  transition:
    border-color 0.2s ease,
    background 0.2s ease;
}

.fortune-overlay-field input::placeholder {
  color: rgb(243 238 231 / 0.35);
}

.fortune-overlay-field input:focus {
  border-color: rgb(227 227 150 / 0.55);
  background: rgb(242 242 242 / 0.12);
}

.fortune-hero-overlay .form-error-msg {
  text-align: center;
}

.fortune-spin-btn.link-bg {
  width: 100%;
  margin-top: 14px !important;
  padding: 14px 20px !important;
  letter-spacing: 0.06em !important;
  font-size: 13px !important;
}

.fortune-hero-ring--playing .fortune-hero-overlay {
  opacity: 0;
  transform: scale(1.06);
  pointer-events: none;
  visibility: hidden;
}

.fortune-hero-ring--playing .fortune-hero-overlay,
.fortune-hero-ring--done .fortune-hero-overlay {
  transition-delay: 0s;
}

.fortune-hero-ring--done .fortune-hero-overlay {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

@media (prefers-reduced-motion: reduce) {
  .fortune-hero-overlay {
    transition: opacity 0.25s ease;
  }
}

.fortune-phone-block {
  width: min(100%, 420px);
}

.form-error-msg {
  min-height: 1.35em;
  font-size: 14px;
  color: #c44;
  margin: 8px 0 14px;
  font-family: "Inter Tight", sans-serif;
}

.header_wrap {
  padding-left: clamp(16px, 3vw, 40px);
  padding-right: clamp(16px, 3vw, 40px);
}

.header_wrap .wheel-platform {
  color: rgb(243 238 231 / 0.55);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

@media (min-width: 841px) {
  .header_wrap .right_wrap {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 10px 16px;
    flex: 1;
    max-width: 46%;
  }

  .header_wrap #wheelTitleMeta {
    color: rgb(243 238 231 / 0.85);
    font-size: 12px !important;
    max-width: min(38vw, 220px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    letter-spacing: 0.08em;
  }
}

.fortune-footer-compact {
  background: #111010;
  margin-top: clamp(72px, 12vw, 120px);
  padding: 32px clamp(24px, 5vw, 48px) 48px;
}

.fortune-footer-compact .bottom_block {
  max-width: 1400px;
  margin: 0 auto;
  border-top: 1px solid rgba(221, 221, 213, 0.2);
  padding-top: 24px;
}

.fortune-footer-compact .footer-note {
  color: rgb(243 238 231 / 0.5);
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
}

.fortune-result-inner {
  position: relative;
  opacity: 0;
  transform: translateY(20px) scale(0.98);
  transition:
    opacity 0.42s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

.fortune-result-inner.fortune-result-inner--pop {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.fortune-result-close {
  position: absolute;
  top: 10px;
  right: 12px;
  padding: 6px 10px;
  border: none;
  background: transparent;
  color: #ddddd5;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.85;
}

.fortune-result-close:hover {
  opacity: 1;
}

.modal.fortune-result-modal {
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10050;
}

.modal.fortune-result-modal.is-visible {
  display: flex !important;
}

/**
 * Конфetti рисуется поверх всего через canvas без z-index —
 * модалку поднимаем выше любого конфетти-холста.
 */
.modal.fortune-result-modal.is-visible,
.modal.fortune-result-modal.is-visible .modal_wrap,
.modal.fortune-result-modal.is-visible .modal_content {
  position: relative;
  z-index: 2147483000 !important;
}

.modal.fortune-result-modal.is-visible .modal_wrap {
  width: 100%;
}

body.fortune-body > canvas {
  pointer-events: none !important;
  z-index: 2147482000 !important;
}

.fortune-result-modal .modal_promo_wrap h2 {
  color: #ddddd5;
  margin-bottom: 12px;
  text-transform: none;
}

.fortune-result-modal .fortune-result-label {
  font-size: clamp(13px, 3.8vw, 15px);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.88;
  margin-bottom: 6px !important;
}

.fortune-result-modal .fortune-result-hint {
  font-size: 13px;
  line-height: 1.45;
  color: rgb(221 221 213 / 0.58) !important;
  margin: 0 0 18px !important;
}

.fortune-result-modal .wheel-prize-accent,
.fortune-result-modal .fortune-prize-highlight {
  font-family: "Inter Tight", sans-serif !important;
  font-weight: 700;
}

.fortune-result-modal .fortune-prize-highlight {
  box-sizing: border-box;
  min-height: 3.25em;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #e3e396;
  font-size: clamp(1.48rem, 5.8vw, 2.05rem);
  line-height: 1.28;
  margin: 6px 0 14px !important;
  padding: 18px 16px;
  border-radius: 12px;
  background: rgb(227 227 150 / 0.1);
  border: 1px solid rgb(227 227 150 / 0.32);
  box-shadow:
    inset 0 1px 0 rgb(243 238 231 / 0.12),
    0 8px 32px rgb(0 0 0 / 0.35);
}

.fortune-bot-cta.link-bg {
  margin-top: 4px !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase !important;
  font-weight: 600 !important;
  font-size: 13px !important;
}

button.link-bg:disabled {
  opacity: 0.45 !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
}

@media (max-width: 840px) {
  .modal.fortune-result-modal .modal_content {
    margin: 12px !important;
    padding: 28px 22px 32px !important;
  }
}
