/* magic.css */
/* ===============================
   7. ЭКРАН "МАГИЯ"
   =============================== */

/* Заголовок экрана "Магия" */
#screen-magic .page-title-magic {
  /* типографика уже есть в h1.page-title */
  color: var(--sand);
  margin-bottom: 16px;
}


/* Обёртка страницы магии внутри экрана */
#screen-magic .page-magic {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  padding: 12px 16px 72px; /* было 16px 16px 72px */
  display: flex;
  flex-direction: column;
  gap: 0px;
  overflow-x: hidden;
}

.sectionTop{ margin-top: 32px; }

/* Заголовки и подписи внутри Магии */
#screen-magic .sectionTitle {
  font-family: var(--font-accent);
  font-size: 20px;
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: -0.04em;
  color: var(--sand);
  margin: 0 0 8px;
}

#screen-magic .subtext {
  font-size: 13px;
  line-height: 1.4;
  color: rgba(255,255,255,.7);
  margin: 0 0 12px;
}

#screen-magic .featureRow {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 16px;                /* слегка увеличили */
  flex-wrap: nowrap;        /* важное изменение */
  max-width: 100%;
  overflow: visible;        /* чтобы ничего не обрезало */
}

#screen-magic .featureLeft {
  flex: 0 0 60%;
  max-width: 60%;
  min-width: 0;
  position: relative;
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 12px; /* было 12 — стало 16: под pill-кнопку */
}

#screen-magic .featureRight {
  flex: 0 0 30%;
  max-width: 30%;
  min-width: 0;

  position: relative;
  display: flex;
  flex-direction: column;   /* ← ключевой момент */
  align-items: flex-start;  /* карточка начинается слева */
  justify-content: flex-start;

  overflow: visible;
  gap: 8px;
}

#screen-magic .sectionTop-daycard {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;                /* чтобы не отталкивало всё вокруг */
}


/* Малая Таро-карта справа */
#screen-magic .tarotCardWrapper {
  perspective: 1000px;
  cursor: pointer;
  position: relative;
  min-height: 156px;
}

#screen-magic .tarotFlipInner {
  width: 100%;
  height: 100%;
  min-height: 156px;
  border-radius: var(--radius-m);
  position: relative;
  transform-style: preserve-3d;
  transition: transform .5s;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(0,0,0,.18);
  background: #1b1b1b;
}

#screen-magic .tarotFlipInner.is-flipped {
  transform: rotateY(180deg);
}

#screen-magic .tarotFace,
#screen-magic .tarotBack {
  position: absolute;
  inset: 0;
  border-radius: var(--radius-m);
  backface-visibility: hidden;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border: 1px solid rgba(0,0,0,.18);
}

#screen-magic .tarotFace {
  background: var(--sand);
  color: #000;
}

#screen-magic .tarotFaceTitle {
  font-family: var(--font-accent);
  font-size: 16px;
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: -0.03em;
  margin-bottom: 6px;
}

#screen-magic .tarotTapHint {
  font-size: 12px;
  line-height: 1.4;
  font-weight: 500;
  opacity: .8;
}

#screen-magic .tarotBack {
  background: var(--pink);
  color: #000;
  transform: rotateY(180deg);
}

#screen-magic .tarotBackInner {
  font-size: 13px;
  line-height: 1.4;
  opacity: .9;
}




/* Сетка продуктов (Таронумерологические разборы) */
#screen-magic .productsGrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: 12px;
  row-gap: 16px;
}

#screen-magic .productCard {
  position: relative;
  width: 100%;
}

#screen-magic .productInner {
  position: relative;
  width: 100%;
  padding-top: 150%;
  border-radius: var(--radius-m);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(255,255,255,.12);
  background: #1b1b1b;
  cursor: pointer;
}

#screen-magic .cardContentWrapper {
  position: absolute;
  inset: 0;
  border-radius: var(--radius-m);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 16px;
  background: var(--violet);
  color: #000;
  border: 1px solid rgba(0,0,0,.18);
}

#screen-magic .prodName {
  font-family: var(--font-accent);
  font-size: 13px;
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: -0.03em;
  margin-bottom: 6px;
}

#screen-magic .prodShort {
  font-size: 12px;
  line-height: 1.4;
  opacity: .8;
}

/* Таро-расклады (8 карточек)
#screen-magic .tarotSpreadsSection {
  display: flex;
  flex-direction: column;
  gap: 16px;
}  */

#screen-magic .tarotGrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

#screen-magic .spreadCard {
  background: var(--sand);
  color: #000;
  border-radius: var(--radius-m);
  border: 1px solid rgba(0,0,0,.18);
  min-height: 88px;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: var(--font-accent);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.03em;
  cursor: pointer;
  user-select: none;
  word-break: break-word;
}

#screen-magic .spreadCard.startButton {
  background: var(--pink);
  color: #000;
}

#screen-magic .spreadCard.active {
  background: var(--violet);
  color: #000;
}

#screen-magic .spreadDescBox {
  padding: 12px 0 0;
  font-size: 13px;
  line-height: 1.4;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 120px;
}

#screen-magic .spreadDescText {
  white-space: pre-line;
}

#screen-magic .spreadDescFooterRow {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

#screen-magic .spreadPriceTag {
  background: var(--violet);
  color: #000;
  font-size: 12px;
  font-weight: 600;
  border-radius: 999px;
  padding: 8px 10px;
  border: 1px solid rgba(0,0,0,.18);
  white-space: nowrap;
}

#screen-magic .buyBtn {
  background: var(--pink);
  color: #000;
  font-size: 13px;
  font-weight: 600;
  border-radius: 999px;
  padding: 10px 12px;
  border: 0;
  cursor: pointer;
  white-space: nowrap;
}

#screen-magic .modalClose {
  line-height: 1;
  opacity: .7;
}
#screen-magic .modalClose:hover { opacity: 1; }

#screen-magic .modalBody p { margin: 0 0 12px; }

/* === SIMPLE TAROT BUTTON === */
:root{
  --taro-card-w: 90px;    /* базовая ширина карты */
  --taro-card-maxw: 22vw; /* ограничение на узких экранах */
}

.buttonsRow {
  width: 100%;
  display: flex;
  flex-direction: row;
  justify-content: flex-start;   /* ставим ряд по центру */
  align-items: center;
  gap: 12px;                 /* вот этот отступ между двумя кнопками */
}

/* ВАЖНО: заменить старое flex: 0 0 auto; */
.buttonsRow button {
  flex: 1 1 0;
  min-width: 0;          /* чтобы текст не раздувал кнопку */
}

/* БАЗА ДЛЯ ОБЕИХ КНОПОК В РЯДУ */
#screen-magic .buttonsRow button {
  flex: 1 1 0;                    /* обе тянутся на одинаковую ширину */
  display: flex;
  align-items: center;
  justify-content: center;

  font-family: var(--font-main);  /* одинаковый шрифт */
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;

  padding: 10px 16px;             /* одинаковые внутренние отступы */
  min-height: 40px;               /* одинаковая высота */
  border-radius: 9999px;
  border: 0;
  cursor: pointer;
  white-space: nowrap;
}

/* ОТДЕЛЬНО ЦВЕТА ДЛЯ КАЖДОЙ КНОПКИ */
#screen-magic .primaryBtn {
  background: var(--violet);
  color: #000;
}

#screen-magic .tarotSimpleBtn {
  background: var(--pink);
  color: #000;
  box-shadow: var(--shadow-soft);
}


.tarotSimpleBtn:active { transform: translateY(1px); }

.tarotSimpleTitle{
  font: 800 16px/1.05 var(--font-accent);
  letter-spacing: .02em;
  word-break: break-word;       /* ← чтобы длинные надписи не распирали карту */
  text-wrap: balance;
}

.tarotSimpleHint{
  margin-top: 6px;
  font: 600 12px/1.1 var(--font-main);
  opacity: .75;
}

/* Блокировка прокрутки при активной модалке */
body.no-scroll {
  overflow: hidden;
}

@media (max-width: 360px){
  #screen-magic .featureRight { max-width: 100%; justify-content: flex-start; }
  .tarotSimpleBtn { width: min(50vw, var(--taro-card-w)); }
}