/*
 * Расклад на отношения — стили (на основе стилей «Таро онлайн»). Все правила ограничены контейнером .lovespread-app,
 * чтобы не конфликтовать со стилями сайта и других сервисов.
 */

.lovespread-app {
  --ls-bg: #0a090d;
  --ls-bg-2: #120d1c;
  --ls-violet: #1d1430;
  --ls-graphite: #17151c;
  --ls-surface: rgba(24, 20, 32, .72);
  --ls-surface-2: rgba(32, 26, 44, .8);
  --ls-gold: #c9a961;
  --ls-gold-hi: #e6cf94;
  --ls-gold-lo: #8e7136;
  --ls-line: rgba(201, 169, 97, .28);
  --ls-line-soft: rgba(201, 169, 97, .14);
  --ls-text: #ece6d9;
  --ls-muted: #a39cae;
  --ls-focus: #f0d999;
  --ls-radius: 14px;
  --ls-serif: 'Cormorant Garamond', 'Cormorant', Georgia, 'Times New Roman', serif;
  --ls-sans: 'Manrope', 'Segoe UI', system-ui, -apple-system, Roboto, Arial, sans-serif;
  --ls-ratio: 300 / 527;
  --ls-ease: cubic-bezier(.22, .7, .2, 1);

  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: var(--ls-text);
  font-family: var(--ls-sans);
  font-size: 16px;
  line-height: 1.65;
  background:
    radial-gradient(900px 520px at 50% -6%, rgba(201, 169, 97, .10), transparent 60%),
    radial-gradient(1200px 700px at 50% 0%, rgba(70, 48, 110, .30), transparent 65%),
    radial-gradient(900px 700px at 100% 60%, rgba(40, 28, 70, .30), transparent 60%),
    linear-gradient(180deg, var(--ls-bg) 0%, #0f0c16 45%, var(--ls-bg) 100%);
  padding: clamp(28px, 6vw, 72px) clamp(16px, 4vw, 40px) clamp(40px, 6vw, 80px);
  -webkit-font-smoothing: antialiased;
}
.lovespread-app *, .lovespread-app *::before, .lovespread-app *::after { box-sizing: border-box; }
.lovespread-app [hidden] { display: none !important; }
.lovespread-app img { max-width: 100%; display: block; }
.lovespread-app button, .lovespread-app input { font: inherit; color: inherit; }
.lovespread-page { margin: 0; background: #0a090d; }

/* Звёздное небо: лёгкий фон без тяжёлых изображений */
.ls-sky {
  position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .55;
  background-image:
    radial-gradient(1px 1px at 12% 18%, #fff8 50%, transparent 51%),
    radial-gradient(1px 1px at 78% 12%, #fff6 50%, transparent 51%),
    radial-gradient(1.4px 1.4px at 34% 42%, #e6cf9480 50%, transparent 51%),
    radial-gradient(1px 1px at 88% 48%, #fff5 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 22% 72%, #e6cf9466 50%, transparent 51%),
    radial-gradient(1px 1px at 64% 82%, #fff5 50%, transparent 51%),
    radial-gradient(1px 1px at 52% 26%, #fff4 50%, transparent 51%),
    radial-gradient(1.3px 1.3px at 6% 92%, #fff4 50%, transparent 51%);
  background-size: 420px 420px;
}

/* ---------- Типографика ---------- */
.ls-hero { text-align: center; max-width: 820px; margin: 0 auto clamp(28px, 5vw, 48px); }
.ls-hero__emblem { width: 240px; height: 120px; max-width: 80%; color: var(--ls-gold); margin: 0 auto 10px; display: block; filter: drop-shadow(0 0 14px rgba(230, 200, 130, .35)); }
.ls-hero__title {
  font-family: var(--ls-serif); font-weight: 600; letter-spacing: .01em;
  font-size: clamp(34px, 6vw, 62px); line-height: 1.08; margin: 0 0 16px;
  background: linear-gradient(180deg, #f3e3b6 0%, var(--ls-gold) 70%, #a88848 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.ls-hero__lead { color: var(--ls-muted); font-size: clamp(16px, 2.2vw, 19px); margin: 0 auto !important; max-width: 640px; text-align: center; text-wrap: balance; }

.ls-h2 {
  font-family: var(--ls-serif); font-weight: 600; color: var(--ls-gold-hi);
  font-size: clamp(26px, 3.6vw, 36px); line-height: 1.15; margin: 0 0 18px; letter-spacing: .01em;
}
.ls-h3 { font-family: var(--ls-serif); font-weight: 600; color: var(--ls-gold-hi); font-size: clamp(21px, 2.6vw, 25px); line-height: 1.2; margin: 22px 0 8px; }
.ls-muted { color: var(--ls-muted); font-weight: 400; }
.ls-hint { color: var(--ls-muted); font-size: 13.5px; margin: 8px 0 0; }
:where(.lovespread-app) p { margin: 0 0 12px; }

/* ---------- Панели ---------- */
.ls-panel {
  position: relative; max-width: 1080px; margin: 0 auto clamp(24px, 4vw, 40px);
  padding: clamp(22px, 4vw, 44px);
  background: linear-gradient(180deg, rgba(28, 22, 40, .66), rgba(16, 13, 22, .7));
  border: 1px solid var(--ls-line-soft); border-radius: var(--ls-radius);
  box-shadow: 0 30px 80px -40px rgba(0, 0, 0, .8), inset 0 1px 0 rgba(255, 255, 255, .03);
}
.ls-panel::before {
  content: ''; position: absolute; inset: 7px; border: 1px solid var(--ls-line-soft);
  border-radius: calc(var(--ls-radius) - 5px); pointer-events: none;
}
.ls-panel > * { position: relative; }
.ls-setup .ls-h2, .ls-table__head { text-align: center; }

/* ---------- Форма ---------- */
.ls-fieldset { border: 0; padding: 0; margin: 0 0 28px; min-width: 0; }
.ls-legend { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; letter-spacing: .04em; margin-bottom: 14px; padding: 0; }
.ls-step {
  font-family: var(--ls-serif); color: var(--ls-gold); font-size: 18px; width: 30px; height: 30px; flex: none;
  display: inline-grid; place-items: center; border: 1px solid var(--ls-line); border-radius: 50%;
}

.ls-spreads { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.ls-option { position: relative; display: block; cursor: pointer; }
.ls-option input, .ls-chip input, .ls-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ls-option__box {
  display: grid; gap: 6px; height: 100%; padding: 22px 22px 20px; border-radius: 12px;
  border: 1px solid var(--ls-line-soft); background: rgba(10, 9, 14, .45);
  transition: border-color .25s, background .25s, box-shadow .25s, transform .25s var(--ls-ease);
}
.ls-option:hover .ls-option__box { border-color: var(--ls-line); transform: translateY(-2px); }
.ls-option input:checked + .ls-option__box {
  border-color: var(--ls-gold); background: linear-gradient(180deg, rgba(201, 169, 97, .1), rgba(10, 9, 14, .4));
  box-shadow: 0 0 0 1px rgba(201, 169, 97, .25), 0 12px 40px -18px rgba(201, 169, 97, .45);
}
.ls-option input:focus-visible + .ls-option__box { outline: 2px solid var(--ls-focus); outline-offset: 3px; }
.ls-option__title { font-family: var(--ls-serif); font-size: 25px; font-weight: 600; color: var(--ls-gold-hi); line-height: 1.1; }
.ls-option__text { color: var(--ls-muted); font-size: 14.5px; }
.ls-option__icon { display: flex; gap: 6px; height: 46px; margin-bottom: 6px; }
.ls-option__icon i {
  display: block; width: 26px; height: 46px; border-radius: 4px; border: 1px solid var(--ls-gold);
  background: url("../../common/images/card-back.svg") center / cover;
}
.ls-option__icon--three i:nth-child(1) { transform: rotate(-8deg) translateY(3px); }
.ls-option__icon--three i:nth-child(3) { transform: rotate(8deg) translateY(3px); }

.ls-topics { display: flex; flex-wrap: wrap; gap: 10px; }
.ls-chip { position: relative; cursor: pointer; }
.ls-chip span {
  display: inline-flex; align-items: center; gap: 9px; min-height: 46px; padding: 10px 18px; border-radius: 999px;
  border: 1px solid var(--ls-line-soft); background: rgba(10, 9, 14, .45); font-size: 15px;
  transition: border-color .2s, background .2s, color .2s;
}
.ls-chip b { color: var(--ls-gold); font-weight: 400; }
.ls-chip:hover span { border-color: var(--ls-line); }
.ls-chip input:checked + span { border-color: var(--ls-gold); background: rgba(201, 169, 97, .12); color: var(--ls-gold-hi); }
.ls-chip input:focus-visible + span { outline: 2px solid var(--ls-focus); outline-offset: 3px; }

.ls-input {
  width: 100%; min-height: 50px; padding: 12px 16px; border-radius: 10px;
  border: 1px solid var(--ls-line-soft); background: rgba(8, 7, 12, .65); color: var(--ls-text);
  transition: border-color .2s, box-shadow .2s;
}
.ls-input::placeholder { color: #756f80; }
.ls-input:focus { outline: none; border-color: var(--ls-gold); box-shadow: 0 0 0 3px rgba(201, 169, 97, .2); }

.ls-setup__footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding-top: 6px; border-top: 1px solid var(--ls-line-soft); padding-top: 24px; }
.ls-switch { position: relative; display: inline-flex; align-items: center; gap: 12px; cursor: pointer; font-size: 15px; color: var(--ls-muted); }
.ls-switch__track { position: relative; width: 44px; height: 24px; border-radius: 999px; border: 1px solid var(--ls-line); background: rgba(10, 9, 14, .6); transition: background .2s; flex: none; }
.ls-switch__track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--ls-muted); transition: transform .25s var(--ls-ease), background .2s; }
.ls-switch input:checked + .ls-switch__track { background: rgba(201, 169, 97, .25); }
.ls-switch input:checked + .ls-switch__track::after { transform: translateX(20px); background: var(--ls-gold-hi); }
.ls-switch input:focus-visible + .ls-switch__track { outline: 2px solid var(--ls-focus); outline-offset: 3px; }

/* ---------- Кнопки ---------- */
.ls-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 11px 22px; border-radius: 999px; cursor: pointer; text-decoration: none;
  border: 1px solid var(--ls-line); background: rgba(10, 9, 14, .5); color: var(--ls-text) !important;
  font-weight: 600; font-size: 15px; letter-spacing: .02em; line-height: 1.2;
  transition: border-color .2s, background .2s, box-shadow .25s, transform .2s var(--ls-ease), opacity .2s;
}
.ls-btn:hover { border-color: var(--ls-gold); background: rgba(201, 169, 97, .08); }
.ls-btn:active { transform: translateY(1px); }
.ls-btn:disabled { opacity: .45; cursor: not-allowed; }
.ls-btn--primary {
  color: #1a1408 !important; border-color: transparent;
  background: linear-gradient(180deg, #ecd79f 0%, #c9a961 55%, #a98a48 100%);
  box-shadow: 0 10px 30px -12px rgba(201, 169, 97, .6), inset 0 1px 0 rgba(255, 255, 255, .45);
}
.ls-btn--primary:hover { background: linear-gradient(180deg, #f3e2b2 0%, #d4b56d 55%, #b39350 100%); box-shadow: 0 14px 36px -12px rgba(201, 169, 97, .75), inset 0 1px 0 rgba(255, 255, 255, .5); }
.ls-btn--ghost { border-color: transparent; background: transparent; color: var(--ls-muted) !important; font-weight: 500; }
.ls-btn--ghost:hover { color: var(--ls-text) !important; background: transparent; border-color: var(--ls-line-soft); }
.ls-btn--lg { min-height: 54px; padding: 14px 34px; font-size: 16px; }

.lovespread-app :focus-visible { outline: 2px solid var(--ls-focus); outline-offset: 3px; }
.lovespread-app .ls-btn:focus-visible { outline-offset: 4px; }

/* ---------- Стол ---------- */
.ls-table__meta { color: var(--ls-muted); margin-top: -8px; font-size: 14.5px; }
.ls-status { text-align: center; color: var(--ls-gold-hi); font-family: var(--ls-serif); font-size: clamp(19px, 2.4vw, 23px); min-height: 1.5em; margin: 10px 0 18px !important; }

.ls-slots { display: flex; justify-content: center; gap: clamp(12px, 3vw, 40px); margin: 0 auto 22px; }
.ls-slot { display: flex; flex-direction: column; align-items: center; gap: 10px; width: var(--slot-w); }
.ls-slots[data-spread="1"] { --slot-w: clamp(140px, 38vw, 230px); }
.ls-slots[data-spread="3"] { --slot-w: clamp(94px, 27vw, 190px); }
.ls-slot__label { font-family: var(--ls-serif); color: var(--ls-gold); font-size: clamp(15px, 2vw, 19px); letter-spacing: .03em; text-align: center; line-height: 1.2; }
.ls-slot__place {
  position: relative; width: 100%; aspect-ratio: var(--ls-ratio); border-radius: 10px;
  border: 1px dashed var(--ls-line); background: rgba(201, 169, 97, .03);
  display: grid; place-items: center;
}
.ls-slot__place::after { content: '✦'; color: var(--ls-line); font-size: 20px; }
.ls-slot__place.is-filled { border-color: transparent; background: none; }
.ls-slot__place.is-filled::after { display: none; }
.ls-slot__name { text-align: center; font-size: 14px; line-height: 1.35; min-height: 2.7em; color: var(--ls-text); }
.ls-slot__name small { display: block; color: var(--ls-muted); font-size: 12.5px; }

/* Карта с 3D-переворотом */
.ls-card { position: absolute; inset: 0; perspective: 1400px; border: 0; padding: 0; background: none; cursor: default; border-radius: 10px; }
button.ls-card { cursor: pointer; }
.ls-card__inner { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform 1s var(--ls-ease); border-radius: inherit; }
.ls-card.is-flipped .ls-card__inner { transform: rotateY(180deg); }
.ls-card__face {
  position: absolute; inset: 0; border-radius: inherit; overflow: hidden;
  -webkit-backface-visibility: hidden; backface-visibility: hidden;
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .9), 0 0 0 1px rgba(201, 169, 97, .35);
}
.ls-card__back { background: #0a0e22 url("../../common/images/card-back.svg") center / cover; }
.ls-card__front { transform: rotateY(180deg); background: #f3ead2; }
.ls-card__front img { width: 100%; height: 100%; object-fit: cover; }
.ls-card.is-reversed .ls-card__front img { transform: rotate(180deg); }
.ls-card.is-flipped .ls-card__front { box-shadow: 0 20px 50px -18px rgba(0, 0, 0, .9), 0 0 0 1px rgba(201, 169, 97, .6), 0 0 38px -6px rgba(201, 169, 97, .45); }
button.ls-card:hover .ls-card__front { box-shadow: 0 20px 50px -18px rgba(0, 0, 0, .9), 0 0 0 2px var(--ls-gold), 0 0 44px -4px rgba(201, 169, 97, .6); }

/* Колода (перемешивание) */
.ls-stage { position: relative; min-height: 220px; display: grid; place-items: center; }
.ls-deck { position: relative; width: 120px; aspect-ratio: var(--ls-ratio); margin: 10px auto 20px; }
.ls-deck__card {
  position: absolute; inset: 0; border-radius: 9px;
  background: #0a0e22 url("../../common/images/card-back.svg") center / cover;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .6), 0 0 0 1px rgba(201, 169, 97, .3);
}
.ls-deck::after { content: ''; position: absolute; inset: -30%; z-index: -1; background: radial-gradient(closest-side, rgba(201, 169, 97, .2), transparent); }

/* Лента / веер карт */
.ls-fan-wrap {
  width: 100%; overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch;
  scrollbar-width: thin; scrollbar-color: var(--ls-gold-lo) transparent; padding: 34px 0 8px;
  mask-image: linear-gradient(90deg, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
}
.ls-fan { position: relative; height: var(--fan-h, 200px); margin: 0 auto; }
.ls-fan__card {
  filter: brightness(var(--dim, 1));
  position: absolute; top: 0; left: 0; width: var(--fan-w, 78px); aspect-ratio: var(--ls-ratio);
  padding: 0; border: 0; border-radius: 7px; cursor: pointer;
  background: #0a0e22 url("../../common/images/card-back.svg") center / cover;
  box-shadow: -3px 0 10px -4px rgba(0, 0, 0, .8), 0 0 0 1px rgba(201, 169, 97, .32);
  transform-origin: 50% 100%;
  transform: translate(var(--x), var(--y)) rotate(var(--rot));
  transition: transform .45s var(--ls-ease), box-shadow .25s, opacity .4s;
}
.ls-fan__card:hover, .ls-fan__card:focus-visible {
  transform: translate(var(--x), calc(var(--y) - 22px)) rotate(var(--rot));
  box-shadow: 0 10px 26px -8px rgba(0, 0, 0, .9), 0 0 0 1.5px var(--ls-gold), 0 0 26px -2px rgba(201, 169, 97, .55);
  z-index: 200 !important; outline: none;
}
.ls-fan__card.is-taken { opacity: 0; pointer-events: none; }
.ls-fan.is-dealing .ls-fan__card { transform: translate(var(--cx), 20px) rotate(0deg); opacity: 0; }
.ls-fan.is-done .ls-fan__card { pointer-events: none; }
.ls-fan-hint { text-align: center; color: var(--ls-muted); font-size: 13.5px; margin: 8px 0 0 !important; }
.ls-fly { position: fixed; z-index: 1000; pointer-events: none; border-radius: 8px; background: #0a0e22 url("../../common/images/card-back.svg") center / cover; box-shadow: 0 20px 50px -10px rgba(0, 0, 0, .9), 0 0 0 1px var(--ls-gold); transition: transform .65s var(--ls-ease); transform-origin: 0 0; }

.ls-table__actions { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin-top: 18px; }

/* ---------- Результат ---------- */
.ls-result { animation: ls-rise .8s var(--ls-ease) both; }
.ls-result > .ls-h2 { text-align: center; }
.ls-result > .ls-h2:focus { outline: none; }
.ls-result__question { text-align: center; color: var(--ls-muted); font-style: italic; font-family: var(--ls-serif); font-size: 20px; margin-top: -6px !important; }
.ls-notice { text-align: center; font-size: 14px; color: var(--ls-gold-hi); border: 1px solid var(--ls-line); border-radius: 999px; padding: 8px 18px; margin: 0 auto 18px; width: fit-content; max-width: 100%; background: rgba(201, 169, 97, .06); }

.ls-readings { display: grid; gap: 22px; margin: 26px 0; }
.ls-reading {
  display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: clamp(18px, 3vw, 32px); align-items: start;
  padding: clamp(18px, 3vw, 28px); border-radius: 12px; border: 1px solid var(--ls-line-soft); background: rgba(8, 7, 12, .42);
  animation: ls-rise .7s var(--ls-ease) both;
}
.ls-reading:nth-child(2) { animation-delay: .12s; }
.ls-reading:nth-child(3) { animation-delay: .24s; }
.ls-readings[data-spread="1"] .ls-reading { grid-template-columns: minmax(200px, 280px) minmax(0, 1fr); }
.ls-reading__img { position: relative; border: 0; padding: 0; background: none; cursor: zoom-in; border-radius: 10px; }
.ls-reading__img img { width: 100%; aspect-ratio: var(--ls-ratio); object-fit: cover; border-radius: 10px; box-shadow: 0 18px 40px -18px #000, 0 0 0 1px rgba(201, 169, 97, .55); }
.ls-reading__img.is-reversed img { transform: rotate(180deg); }
.ls-pos { font-size: 12.5px; text-transform: uppercase; letter-spacing: .16em; color: var(--ls-gold); margin: 0 0 4px !important; }
.ls-reading__title { font-family: var(--ls-serif); font-size: clamp(26px, 3.4vw, 34px); font-weight: 600; color: var(--ls-gold-hi); margin: 0 0 4px; line-height: 1.1; }
.ls-reading__meta { color: var(--ls-muted); font-size: 14px; }
.ls-badge { display: inline-block; font-size: 12.5px; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--ls-line); color: var(--ls-gold-hi); margin-left: 6px; vertical-align: 1px; white-space: nowrap; }
.ls-badge--rev { border-color: rgba(170, 140, 220, .45); color: #cdb8f0; }
.ls-kw { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 14px; padding: 0; list-style: none; }
.ls-kw li { font-size: 13px; padding: 4px 11px; border-radius: 999px; background: rgba(201, 169, 97, .09); color: var(--ls-gold-hi); }
.ls-block-title { font-weight: 600; color: var(--ls-text); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; margin: 16px 0 4px !important; opacity: .8; }
.ls-frame { color: var(--ls-gold-hi); font-family: var(--ls-serif); font-size: 19px; line-height: 1.4; }
.ls-advice { margin-top: 16px !important; padding: 12px 16px; border-left: 2px solid var(--ls-gold); background: rgba(201, 169, 97, .06); border-radius: 0 8px 8px 0; font-family: var(--ls-serif); font-size: 19px; font-style: italic; }
.ls-link { background: none; border: 0; padding: 0; margin-top: 12px; color: var(--ls-gold); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-size: 14.5px; }
.ls-link:hover { color: var(--ls-gold-hi); }

.ls-summary { padding: clamp(20px, 3.4vw, 34px); border-radius: 12px; border: 1px solid var(--ls-line); background: linear-gradient(180deg, rgba(201, 169, 97, .07), rgba(8, 7, 12, .3)); }
.ls-summary .ls-h3 { margin-top: 0; text-align: center; font-size: clamp(25px, 3vw, 30px); }
.ls-summary .ls-h3::after { content: ''; display: block; width: 80px; height: 1px; margin: 12px auto 4px; background: linear-gradient(90deg, transparent, var(--ls-gold), transparent); }
#ls-summary-body p { font-size: 16.5px; }
.ls-disclaimer { font-size: 13px; color: var(--ls-muted); margin: 18px 0 0 !important; padding-top: 14px; border-top: 1px solid var(--ls-line-soft); }

.ls-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 26px 0 8px; }
.ls-share { max-width: 620px; margin: 10px auto 0; }
.ls-share__row { display: flex; gap: 8px; margin-top: 6px; }

.ls-consult {
  text-align: center; margin: 34px auto 0; max-width: 760px; padding: clamp(24px, 4vw, 40px);
  border-radius: 14px; border: 1px solid var(--ls-line);
  background: radial-gradient(600px 220px at 50% 0, rgba(201, 169, 97, .12), transparent 70%), rgba(10, 9, 14, .5);
}
.ls-consult__ornament { color: var(--ls-gold); font-size: 20px; letter-spacing: .6em; }
.ls-consult .ls-h3 { margin-top: 6px; font-size: clamp(24px, 3.2vw, 32px); }
.ls-consult p { color: var(--ls-muted); max-width: 560px; margin: 0 auto 22px; }

/* ---------- Информационный блок ---------- */
.ls-info__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(24px, 4vw, 48px); margin-bottom: 18px; }
.ls-info p { color: #cfc8d8; }
.ls-info .ls-h3 { margin-top: 4px; }
.ls-steps { margin: 0; padding: 0; list-style: none; counter-reset: s; }
.ls-steps li { counter-increment: s; position: relative; padding: 0 0 14px 44px; color: #cfc8d8; }
.ls-steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid var(--ls-line); border-radius: 50%; font-family: var(--ls-serif); color: var(--ls-gold); font-size: 17px; }
.ls-steps b { color: var(--ls-text); }

/* ---------- Модальное окно ---------- */
.ls-modal {
  width: min(900px, calc(100vw - 24px)); max-height: calc(100vh - 24px); padding: 0; border-radius: 16px;
  border: 1px solid var(--ls-line); background: #110e17; color: var(--ls-text); font-family: var(--ls-sans);
  box-shadow: 0 40px 120px -20px #000;
}
.ls-modal::backdrop { background: rgba(5, 4, 8, .78); backdrop-filter: blur(3px); }
.ls-modal[open] { animation: ls-rise .4s var(--ls-ease); }
.ls-modal__inner { position: relative; padding: clamp(20px, 4vw, 36px); }
.ls-modal__close { position: sticky; top: 0; float: right; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--ls-line); background: #110e17; color: var(--ls-gold-hi); font-size: 26px; line-height: 1; cursor: pointer; z-index: 2; }
.ls-modal__close:hover { border-color: var(--ls-gold); }
.ls-detail { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 28px; }
.ls-detail__img img { border-radius: 10px; box-shadow: 0 0 0 1px rgba(201, 169, 97, .5); width: 100%; }
.ls-detail__img.is-reversed img { transform: rotate(180deg); }
.ls-detail h3 { font-family: var(--ls-serif); font-size: 34px; color: var(--ls-gold-hi); margin: 0 0 4px; line-height: 1.1; padding-right: 50px; }
.ls-detail h4 { font-family: var(--ls-serif); font-size: 21px; color: var(--ls-gold); margin: 18px 0 6px; }
.ls-detail p { margin: 0 0 8px; }
.ls-detail__topics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 10px; }
.ls-detail__topic { padding: 14px; border-radius: 10px; border: 1px solid var(--ls-line-soft); background: rgba(255, 255, 255, .02); font-size: 14.5px; }
.ls-detail__topic h5 { margin: 0 0 6px; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--ls-gold-hi); }
.ls-detail__topic p { margin: 0 0 6px; }
.ls-detail__topic em { color: var(--ls-muted); font-style: normal; font-size: 12.5px; display: block; }
.ls-detail .is-current { color: var(--ls-gold-hi); }

.ls-toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 1100; padding: 12px 20px; border-radius: 999px; background: #1d1729; border: 1px solid var(--ls-gold); color: var(--ls-gold-hi); font-size: 14.5px; box-shadow: 0 20px 50px -10px #000; max-width: calc(100vw - 32px); text-align: center; }

@keyframes ls-rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* ---------- Адаптив ---------- */
@media (max-width: 760px) {
  .ls-spreads { grid-template-columns: 1fr; gap: 10px; }
  .ls-option__box { grid-template-columns: 56px 1fr; grid-template-rows: auto auto; column-gap: 14px; padding: 16px; }
  .ls-option__icon { grid-row: span 2; margin: 0; align-self: center; }
  .ls-option--spread .ls-option__icon i { width: 20px; height: 36px; }
  .ls-option__icon { height: 40px; gap: 3px; }
  .ls-option__title { font-size: 22px; }
  .ls-chip { flex: 1 1 calc(50% - 10px); }
  .ls-chip span { width: 100%; font-size: 14px; padding: 10px 12px; }
  .ls-setup__footer { flex-direction: column; align-items: stretch; }
  .ls-setup__footer .ls-btn { width: 100%; }
  .ls-reading, .ls-readings[data-spread="1"] .ls-reading { grid-template-columns: 1fr; }
  .ls-reading__img { width: min(200px, 60%); margin: 0 auto; }
  .ls-readings[data-spread="1"] .ls-reading__img { width: min(250px, 72%); }
  .ls-reading__body { text-align: left; }
  .ls-info__grid { grid-template-columns: 1fr; }
  .ls-detail { grid-template-columns: 1fr; }
  .ls-detail__img { width: min(200px, 60%); margin: 0 auto; }
  .ls-detail__topics { grid-template-columns: 1fr; }
  .ls-actions .ls-btn { flex: 1 1 calc(50% - 10px); padding-left: 12px; padding-right: 12px; }
  .ls-actions .ls-btn--primary { flex-basis: 100%; }
  .ls-slot__name { font-size: 12.5px; }
}
@media (max-width: 420px) {
  .ls-chip { flex-basis: 100%; }
  .ls-share__row { flex-direction: column; }
}

/* ---------- Уменьшение движения ---------- */
@media (prefers-reduced-motion: reduce) {
  .lovespread-app *, .lovespread-app *::before, .lovespread-app *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; scroll-behavior: auto !important;
  }
}

/* ---------- Печать ---------- */
@media print {
  @page { margin: 14mm; }
  body.lovespread-page, .lovespread-page { background: #fff !important; }
  .lovespread-app { background: #fff !important; color: #111 !important; padding: 0 !important; overflow: visible; }
  .lovespread-app .ls-sky, .lovespread-app .ls-setup, .lovespread-app .ls-info, .lovespread-app .ls-actions, .lovespread-app .ls-share,
  .lovespread-app .ls-consult, .lovespread-app .ls-table__actions, .lovespread-app .ls-stage, .lovespread-app .ls-status,
  .lovespread-app .ls-notice, .lovespread-app .ls-link, .lovespread-app .ls-hero__emblem, .lovespread-app .ls-modal, .lovespread-app .ls-toast { display: none !important; }
  .lovespread-app .ls-panel { border: 0; box-shadow: none; background: none; padding: 0; margin: 0 0 12px; }
  .lovespread-app .ls-panel::before { display: none; }
  .lovespread-app .ls-hero { margin-bottom: 10px; }
  .lovespread-app .ls-hero__title { color: #222 !important; background: none; -webkit-text-fill-color: #222; font-size: 26pt; }
  .lovespread-app .ls-hero__lead { display: none; }
  .lovespread-app .ls-h2, .lovespread-app .ls-h3, .lovespread-app .ls-reading__title, .lovespread-app .ls-slot__label, .lovespread-app .ls-frame, .lovespread-app .ls-pos { color: #5a4413 !important; }
  .lovespread-app p, .lovespread-app li, .lovespread-app .ls-slot__name, .lovespread-app .ls-reading__meta, .lovespread-app .ls-muted { color: #222 !important; }
  .lovespread-app .ls-table { display: block !important; }
  .lovespread-app .ls-slots { display: none; }
  .lovespread-app .ls-reading, .lovespread-app .ls-summary { background: none; border: 1px solid #ccc; break-inside: avoid; animation: none; }
  .lovespread-app .ls-reading { grid-template-columns: 34mm 1fr !important; }
  .lovespread-app .ls-reading__img { width: 34mm !important; }
  .lovespread-app .ls-kw li, .lovespread-app .ls-badge { background: none; border: 1px solid #bbb; color: #333 !important; }
  .lovespread-app .ls-advice { background: none; }
  .lovespread-app .ls-result { animation: none; }
}

/* Выравнивание подписей слотов, если «Возможное развитие» переносится на две строки */
.ls-slots[data-spread="3"] .ls-slot__label { min-height: 2.4em; display: flex; align-items: flex-end; justify-content: center; }

/* ---------- Улучшения оформления (по референсам) ---------- */
.ls-geo { position: absolute; z-index: -1; color: var(--ls-gold); opacity: .09; pointer-events: none; width: min(560px, 80vw); height: auto; }
.ls-geo--tr { top: -140px; right: -160px; }
.ls-geo--bl { bottom: -160px; left: -180px; width: min(520px, 75vw); }

.ls-panel { background: linear-gradient(180deg, rgba(30, 28, 34, .78), rgba(18, 16, 22, .82)); border-color: rgba(201, 169, 97, .2); border-radius: 22px; }
.ls-panel::before { border-radius: 16px; }

.ls-h2--caps { text-transform: uppercase; letter-spacing: .16em; font-weight: 500;
  background: linear-gradient(180deg, #f6e6bb, #c9a961 70%, #9c7c3e); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* лучи за картами */
.ls-slots { position: relative; padding: 18px 0 6px; }
.ls-slots::before {
  content: ''; position: absolute; left: 50%; top: 50%; width: min(900px, 140%); aspect-ratio: 1; transform: translate(-50%, -50%);
  background: repeating-conic-gradient(from 0deg, rgba(225, 195, 125, .22) 0 .35deg, transparent .35deg 5deg);
  -webkit-mask-image: radial-gradient(closest-side, #000 18%, rgba(0, 0, 0, .55) 42%, transparent 72%);
  mask-image: radial-gradient(closest-side, #000 18%, rgba(0, 0, 0, .55) 42%, transparent 72%);
  pointer-events: none; z-index: 0;
}
.ls-slot { position: relative; z-index: 1; }
.ls-slot__place { border-color: rgba(201, 169, 97, .32); background: rgba(14, 12, 20, .55); }
.ls-card.is-flipped .ls-card__front { animation: ls-glow 1.6s var(--ls-ease) both; }
@keyframes ls-glow { 0% { box-shadow: 0 0 0 1px rgba(201,169,97,.6), 0 0 0 0 rgba(240,210,140,0); } 40% { box-shadow: 0 0 0 1px rgba(201,169,97,.9), 0 0 70px 6px rgba(240,210,140,.55); } 100% { box-shadow: 0 20px 50px -18px rgba(0,0,0,.9), 0 0 0 1px rgba(201,169,97,.6), 0 0 38px -6px rgba(201,169,97,.45); } }

.ls-deck { width: 150px; }
.ls-deck::after { inset: -60%; background: radial-gradient(closest-side, rgba(225, 195, 125, .25), transparent); }
.ls-fan__card { box-shadow: -4px 0 12px -5px rgba(0, 0, 0, .9), 0 0 0 1px rgba(201, 169, 97, .45); border-radius: 8px; }
.ls-fan__card:hover, .ls-fan__card:focus-visible { filter: brightness(1.12); }

.ls-actions--top { position: relative; z-index: 1; margin: 26px 0 0; }
.ls-status:empty { display: none; }
.ls-reading { background: rgba(10, 9, 14, .5); border-color: rgba(201, 169, 97, .16); border-radius: 16px; }
.ls-summary { border-radius: 16px; }
.ls-consult { border-radius: 18px; position: relative; overflow: hidden; }
.ls-consult::before { content: ''; position: absolute; left: 50%; top: 0; width: 700px; aspect-ratio: 1; transform: translate(-50%, -55%);
  background: repeating-conic-gradient(rgba(225, 195, 125, .16) 0 .3deg, transparent .3deg 6deg);
  -webkit-mask-image: radial-gradient(closest-side, #000, transparent 75%); mask-image: radial-gradient(closest-side, #000, transparent 75%); pointer-events: none; }
.ls-consult > * { position: relative; }
.ls-option__icon i { width: 28px; height: 49px; box-shadow: 0 6px 14px -6px #000; }

@media (max-width: 760px) {
  .ls-actions--top .ls-btn { flex: 1 1 calc(50% - 10px); }
  .ls-geo { opacity: .07; }
  .ls-hero__emblem { width: 200px; height: 100px; }
}
@media print { .lovespread-app .ls-geo, .lovespread-app .ls-actions--top { display: none !important; } }


/* ========== Расклад на отношения: отличия от «Таро онлайн» ========== */

/* Сценарий расклада */
.ls-option__glyph {
  display: inline-grid; place-items: center; width: 52px; height: 52px; margin-bottom: 6px; border-radius: 50%;
  border: 1px solid var(--ls-line); color: var(--ls-gold); font-size: 24px; line-height: 1;
  background: radial-gradient(circle, rgba(201, 169, 97, .14), transparent 70%);
}
.ls-positions { margin: 6px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 4px 6px; }
.ls-positions li { font-size: 12.5px; color: var(--ls-gold-hi); padding: 2px 9px; border-radius: 999px; background: rgba(201, 169, 97, .08); }
@media (max-width: 760px) {
  .ls-option__glyph { grid-row: span 2; margin: 0; align-self: center; width: 46px; height: 46px; font-size: 20px; }
  .ls-positions { grid-column: 1 / -1; }
}

/* Пять ячеек: в ряд на компьютере, 3 + 2 на телефоне */
.ls-slots { flex-wrap: wrap; gap: 18px clamp(10px, 2.2vw, 28px); --slot-w: clamp(86px, 15.5vw, 168px); }
.ls-slot__label { min-height: 2.4em; display: flex; align-items: flex-end; justify-content: center; font-size: clamp(14px, 1.7vw, 18px); }
@media (max-width: 760px) {
  .ls-slots { column-gap: 10px; --slot-w: min(150px, calc((100% - 20px) / 3)); }
  .ls-slot__label { font-size: 13.5px; min-height: 3.6em; }
}

/* Итог: общий тон расклада */
.ls-verdict { text-align: center; margin: 0 auto 18px; max-width: 640px; }
.ls-verdict__label { margin: 0 0 2px !important; font-size: 12.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--ls-gold); }
.ls-verdict__title { font-family: var(--ls-serif); font-size: clamp(30px, 4.4vw, 42px); font-weight: 600; color: var(--ls-gold-hi); line-height: 1.1; margin: 0 0 6px; }
.ls-verdict p { color: #cfc8d8; }
#ls-summary-body p { font-size: 16.5px; }

/* В описании карты тема «Любовь» выделена */
.ls-detail__topic.is-love { border-color: var(--ls-line); background: rgba(201, 169, 97, .06); }

/* Схема позиций в информационном блоке */
.ls-scheme { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.ls-scheme li { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 12px; color: #cfc8d8; }
.ls-scheme b { display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid var(--ls-line); border-radius: 50%; font-family: var(--ls-serif); color: var(--ls-gold); font-weight: 600; font-variant-numeric: lining-nums; }
.ls-scheme strong { color: var(--ls-text); font-weight: 600; }
.ls-steps li::before { font-variant-numeric: lining-nums; }

@media print {
  .lovespread-app .ls-verdict__title { color: #5a4413 !important; }
}
