/* Экран «Мой день» (раздел «Сегодня»): карта дня, личный день, небо, «Спросить Астру о…», вход в «Расклады Таро». Карта today-tcard — и для views/tarot.js. Только классы с префиксом today-
 * (плюс общий «Набор для экранов» из app.css). */
.today-page { padding-bottom: 6px; }
.today-page [hidden] { display: none !important; }
.today-sub { display: flex; align-items: center; gap: 7px; min-height: 1.4em; }
.today-sub__icon { font-size: 16px; line-height: 1; filter: drop-shadow(0 0 6px rgba(var(--text-rgb), .35)); }
.today-block { margin-top: 4px; }
.today-label { font: 500 11.5px var(--f-head); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.today-pills { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 12px 0; }

/* ── карта таро: рубашка и лицо, переворот rotateY ─────────────── */
.today-tcard {
  position: relative; display: block; width: 100%; aspect-ratio: 2 / 3; padding: 0;
  perspective: 1100px; border-radius: 12px; font-size: 18px;
}
.today-tcard--sm { font-size: 11.5px; border-radius: 9px; }
.today-tcard__inner {
  position: absolute; inset: 0; display: block;
  transform-style: preserve-3d; -webkit-transform-style: preserve-3d;
  transition: transform .95s cubic-bezier(.3, .75, .25, 1);
}
.today-tcard.is-flipped .today-tcard__inner { transform: rotateY(180deg); }
.today-tcard--still .today-tcard__inner { transition: none; }
.today-tcard__face {
  position: absolute; inset: 0; display: block; overflow: hidden; border-radius: inherit;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  border: 1px solid rgba(var(--accent-rgb), .45);
  box-shadow: 0 12px 30px rgba(5,8,24,.55);
  transition: border-color .3s ease, box-shadow .3s ease;
}
.today-tcard--sm .today-tcard__face { box-shadow: 0 8px 20px rgba(5,8,24,.5); }
/* рубашка: если back.webp ещё не загрузился — видна звезда на ночном градиенте */
.today-tcard__back {
  background: radial-gradient(circle at 50% 42%, rgba(var(--glow-rgb), .24), transparent 58%),
              linear-gradient(160deg, #222c64, #131b42 55%, #0b1026);
}
.today-tcard__back::before {
  content: "✦"; position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 2.4em; color: var(--gold); text-shadow: 0 0 18px rgba(var(--accent-rgb), .8);
}
.today-tcard__back::after {
  content: ""; position: absolute; inset: 0;
  background: url("../assets/tarot/back.webp?v=1") center / cover no-repeat;
}
.today-tcard__front {
  transform: rotateY(180deg);
  background: radial-gradient(circle at 50% 38%, rgba(var(--accent-rgb), .16), transparent 60%),
              linear-gradient(165deg, #232d64, #111939 60%, #0b1026);
}
.today-tcard__img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
.today-tcard__front.is-rev .today-tcard__img { transform: rotate(180deg); }
.today-tcard__name {
  position: absolute; left: 0; right: 0; bottom: 0; height: 34%; display: none;
  align-items: center; justify-content: center; padding: 0 8%; text-align: center;
  font: 600 1em/1.12 var(--serif); letter-spacing: .02em; color: var(--cream);
  background: linear-gradient(180deg, rgba(11,16,38,0), rgba(11,16,38,.78) 40%, rgba(11,16,38,.92));
  text-shadow: 0 1px 8px rgba(0,0,0,.6);
}
.today-tcard__name.is-on, .is-noimg .today-tcard__name { display: flex; }
.is-noimg .today-tcard__img { display: none; }
.is-noimg .today-tcard__name { top: 0; height: auto; background: none; font-size: 1.15em; }

/* ── карта дня: карта слева, что это — справа (прототип 08.10) ── */
.today-hero { padding: 16px; }
.today-dayrow { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 16px; align-items: center; }
.today-hero__stage { position: relative; width: 112px; }
.today-hero__stage::before {
  content: ""; position: absolute; inset: -18% -30%; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(var(--glow-rgb), .42), rgba(var(--accent-rgb), .12) 58%, transparent);
  animation: today-pulse 3.8s ease-in-out infinite;
}
.today-hero__stage.is-open::before { animation: none; opacity: .35; transform: scale(.96); transition: opacity 1s ease; }
.today-tcard--hero { font-size: 13px; transition: transform .25s ease; }
.today-tcard--hero:not(.is-flipped) .today-tcard__back { animation: today-edge 3.8s ease-in-out infinite; }
.today-tcard--hero:not(.is-flipped):active { transform: scale(.97); }
.today-tcard--hero.is-flipping { animation: today-lift .95s ease; }
.today-tcard--hero.is-flipped { cursor: default; }
.today-dayrow__side { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.today-hero__label { margin: 0; font: 500 12px var(--f-head); letter-spacing: .18em; color: var(--accent); }
.today-hero__hint { margin: 0; font: 300 19px/1.3 var(--f-head); color: var(--text); }
.today-info__head { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.today-info__head .today-pills { justify-content: flex-start; margin: 6px 0 0; }

.today-info { width: 100%; margin: 14px 0 0; padding-top: 14px; border-top: 1px solid var(--line); }
.today-info__name { margin: 0; font: 300 23px/1.15 var(--f-head); letter-spacing: .02em; color: var(--text); }
.today-info__orient { font: 500 11px var(--f-head); letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
.today-info__head .pill { font-size: 12px; padding: 3px 9px; }
.today-info__text { margin: 0 2px; }
.today-info__ask { margin-top: 12px; }
@media (min-width: 560px) {
  .today-dayrow { grid-template-columns: 150px minmax(0, 1fr); gap: 22px; }
  .today-hero__stage { width: 150px; }
  .today-tcard--hero { font-size: 16px; }
}
@keyframes today-pulse { 0%, 100% { opacity: .45; transform: scale(.94); } 50% { opacity: 1; transform: scale(1.04); } }
@keyframes today-edge {
  50% { border-color: rgba(var(--accent-rgb), .85); box-shadow: 0 12px 30px rgba(5,8,24,.55), 0 0 26px rgba(var(--accent-rgb), .45); }
}
@keyframes today-lift { 45% { transform: translateY(-8px) scale(1.05); } }

/* ── небо для всех: не больше трёх строк (правило 9 проверки 07.10) ── */
.today-sky { display: grid; gap: 12px; }
.today-row { display: flex; align-items: center; gap: 12px; }
.today-row .card__text { margin: 0; min-width: 0; }
.today-row__badge {
  flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-size: 22px; line-height: 1;
  background: radial-gradient(circle, rgba(var(--text-rgb), .16), rgba(var(--text-rgb), 0) 70%);
}
.today-row__badge--num {
  font: 300 20.5px/1 var(--f-head); font-variant-numeric: lining-nums; color: var(--gold);
  border: 1px solid rgba(var(--accent-rgb), .35); background: rgba(var(--accent-rgb), .06); text-shadow: 0 0 14px rgba(var(--accent-rgb), .5);
}
.today-row__badge--retro { font: 400 17px/1 var(--f-head); color: var(--muted); border: 1px solid rgba(255,255,255,.12); background: none; }
.today-note { color: var(--cream); }
.today-basis { margin: 0; }

/* ── личный день: тон, название, причина, совет; остальное — «Подробнее» ── */
.today-mood {
  display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 10px; border-radius: 999px;
  font-size: 13px; color: var(--cream); background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.09);
}
.today-title { margin: 12px 0 0; font: 300 22.5px/1.2 var(--f-head); color: var(--cream); }
.today-reason { margin: 6px 0 0; }
.today-advice { margin: 10px 0 0; }
.today-more { margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(var(--accent-rgb), .14); }
.today-more__toggle { cursor: pointer; list-style: none; min-height: 32px; display: flex; align-items: center; font-size: 13px; color: var(--accent); }
.today-more__toggle::-webkit-details-marker { display: none; }
.today-more__toggle::after { content: " ▾"; }
.today-more[open] .today-more__toggle::after { content: " ▴"; }
.today-more__toggle:focus-visible { outline: 2px solid var(--gold-soft); outline-offset: 3px; border-radius: 4px; }
.today-lock { margin-top: 12px; }
.today-facts { display: grid; gap: 12px; margin-top: 12px; }
.today-fact__key { margin-top: 2px; font: 400 16px/1.3 var(--f-head); color: var(--gold); font-variant-numeric: lining-nums; }
.today-fact__text { margin: 2px 0 0; font: 400 14.5px/1.45 var(--f-body); color: var(--text-2); }
.today-aspects { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.today-aspects li { position: relative; padding-left: 1.3em; font: 400 14.5px/1.45 var(--f-body); color: var(--text-2); }
.today-aspects li::before { content: "✦"; position: absolute; left: 0; top: .12em; font-size: .75em; color: var(--gold); }

.today-invite { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 22px 18px; text-align: center; }
.today-invite__icon { font-size: 24px; color: var(--gold); text-shadow: 0 0 14px rgba(var(--accent-rgb), .8); }

/* ── приглашение «Твой месяц готов» (первые дни оплаченного периода) ── */
.today-month {
  display: flex; align-items: center; gap: 14px; width: 100%; margin: 0 0 14px; text-align: left;
  border-color: var(--line-strong);
}
.today-month__icon {
  flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-size: 22px;
  color: var(--gold); background: rgba(var(--accent-rgb), .1); box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), .3), 0 0 18px rgba(var(--accent-rgb), .25);
}
.today-month__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.today-month__title { font: 400 19px/1.2 var(--f-head); color: var(--cream); }
.today-month__text { font-size: 13px; line-height: 1.4; color: var(--muted); }
.today-month__go { flex: none; font: 700 13px var(--f-btn); color: var(--accent); }
.today-month:focus-visible { outline: 2px solid var(--gold-soft); outline-offset: 3px; }

/* вход в «Расклады Таро» — карточка в стиле «Твой месяц готов» (today-month) с веером карт колоды */
.today-tarot__go { margin-bottom: 0; }
.today-fan { position: relative; flex: none; width: 64px; height: 58px; }
.today-fan__card {
  position: absolute; left: 50%; bottom: 0; width: 30px; height: 48px; margin-left: -15px; border-radius: 5px; object-fit: cover;
  box-shadow: 0 0 0 1px var(--line), 0 6px 14px rgba(0, 0, 0, .45); transform-origin: 50% 120%;
}
.today-fan__card:nth-child(1) { transform: rotate(-14deg); }
.today-fan__card:nth-child(3) { transform: rotate(14deg); }

/* ── «Спросить Астру о…»: медальоны тем ──────────────────────── */
.today-medals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 10px; padding: 16px 10px 14px; }
.today-medal { display: flex; flex-direction: column; align-items: center; gap: 7px; min-width: 0; font-size: 13px; color: var(--text); }
.today-medal__img {
  width: 68px; height: 68px; border-radius: 50%; object-fit: cover;
  box-shadow: 0 0 0 1px var(--line), 0 6px 20px rgba(0, 0, 0, .35); transition: transform .4s ease;
}
.today-medal:hover .today-medal__img { transform: scale(1.06) rotate(-4deg); }
.today-medal:active .today-medal__img { transform: scale(.94); }
@media (min-width: 560px) { .today-medals { grid-template-columns: repeat(6, minmax(0, 1fr)); } }

/* ── загрузка и ошибка ─────────────────────────────────────────── */
.today-sk { display: block; }
.today-sk--title { width: 62%; height: 32px; border-radius: 10px; }
.today-sk--sub { width: 46%; height: 14px; border-radius: 8px; }
.today-sk--hero { height: 210px; margin-bottom: 12px; border-radius: var(--r-card); }
.today-sk--block { height: 150px; margin-bottom: 12px; border-radius: 22px; }
.today-sk--tall { height: 200px; }
.today-error { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.today-error__text { margin: 0; max-width: 280px; }

/* Появление подсказки и описания карты — только когда движение разрешено: без анимации всё видно сразу.
 */
@media (prefers-reduced-motion: no-preference) {
  .today-hero__hint { animation: rise .8s ease .3s both; }
}
@media (prefers-reduced-motion: reduce) {
  .today-tcard__inner { transition: none; }
  .today-hero__stage::before, .today-tcard--hero .today-tcard__back { animation: none; }
  .today-medal__img { transition: none; }
}
