/* ==== app.css ====
   Компоненты мини-приложения: герой дня, карта Таро с переворотом, оценки, Луна, планеты,
   расклады, колода, натальный круг, календарь (месяц → один день на телефоне), онбординг.
   Используется в: app.html (вместе с common.css). Брейкпоинты: 1024px и 768px. */

/* ---- HERO ---- */
.hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 16px; align-items: stretch; margin-bottom: 14px; }
.hero > .card { margin-top: 0; }
.hero-text h1 { margin-bottom: 6px; }
.hero-date { color: var(--gold); font-weight: 600; letter-spacing: .5px; text-transform: uppercase; font-size: 12px; margin-bottom: 8px; }
.theme-box { margin-top: 14px; padding: 14px 16px; border-radius: 16px; background: linear-gradient(135deg, rgba(232,199,122,.14), rgba(157,123,255,.10)); border: 1px solid rgba(232,199,122,.25); }
.theme-box .theme-title { font-family: var(--font-display); font-size: 22px; color: var(--gold-2); margin-bottom: 4px; }

/* ---- TAROT CARD: переворот 3D ---- */
.tcard { width: 180px; aspect-ratio: 360 / 620; perspective: 1200px; cursor: pointer; flex: none; }
.tcard-inner { position: relative; width: 100%; height: 100%; transition: transform .8s cubic-bezier(.2,.8,.2,1); transform-style: preserve-3d; }
.tcard.flipped .tcard-inner { transform: rotateY(180deg); }
.tcard-face { position: absolute; inset: 0; border-radius: 14px; backface-visibility: hidden; -webkit-backface-visibility: hidden; overflow: hidden; box-shadow: 0 12px 34px rgba(0,0,0,.55); }
.tcard-back {
  background: radial-gradient(circle at 50% 50%, rgba(232,199,122,.35) 0 14%, transparent 15%),
              repeating-linear-gradient(45deg, rgba(232,199,122,.12) 0 2px, transparent 2px 12px),
              repeating-linear-gradient(-45deg, rgba(232,199,122,.12) 0 2px, transparent 2px 12px),
              linear-gradient(160deg, #2a1d6b, #120d38);
  border: 2px solid rgba(232,199,122,.6); display: grid; place-items: center;
}
.tcard-back::after { content: "✦"; font-size: 40px; color: var(--gold-2); text-shadow: 0 0 18px rgba(232,199,122,.9); animation: back-pulse 2.4s ease-in-out infinite; }
@keyframes back-pulse { 50% { transform: scale(1.15); opacity: .75; } }
.tcard-front { transform: rotateY(180deg); background: #1a1446; border: 2px solid rgba(232,199,122,.5); }
.tcard-front img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tcard.reversed .tcard-front img { transform: rotate(180deg); }
.tcard-glow { animation: card-glow 2.8s ease-in-out infinite; border-radius: 14px; }
@keyframes card-glow { 50% { box-shadow: 0 0 34px rgba(232,199,122,.45); } }
.daily-wrap { display: flex; gap: 18px; align-items: center; }
.daily-info { min-width: 0; }
.daily-info h3 { font-size: 24px; }
.card-pos { font-size: 12px; color: var(--gold); text-transform: uppercase; letter-spacing: .6px; margin-bottom: 4px; }

/* ---- SCORES ---- */
.scores { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; }
.score-row { display: flex; flex-direction: column; gap: 6px; }
.score-row .score-label { display: flex; justify-content: space-between; font-size: 14px; }
.score-bar { height: 8px; border-radius: 8px; background: rgba(255,255,255,.08); overflow: hidden; }
.score-bar > i { display: block; height: 100%; border-radius: 8px; background: linear-gradient(90deg, #9d7bff, #e8c77a); transform-origin: left; animation: bar-grow .9s ease both; }
@keyframes bar-grow { from { transform: scaleX(0); } }

/* ---- MOON ---- */
.moon-widget { display: flex; gap: 16px; align-items: center; }
.moon-orb { width: 86px; height: 86px; border-radius: 50%; flex: none; position: relative; overflow: hidden;
  background: radial-gradient(circle at 35% 35%, #fffbe8, #d9d2b8 60%, #a49d86); box-shadow: 0 0 40px rgba(255,248,220,.35); }
.moon-shadow { position: absolute; inset: 0; border-radius: 50%; background: #0b0920; }
.moon-meta b { font-variant-numeric: lining-nums; font-family: var(--font-display); font-size: 21px; color: var(--gold-2); }

/* ---- PLANETS ---- */
.planet-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.planet-chip { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 14px; background: rgba(255,255,255,.04); border: 1px solid var(--line); min-height: 48px; }
.planet-chip .pg { font-size: 20px; width: 26px; text-align: center; color: var(--gold-2); }
.planet-chip .pn { font-size: 13px; color: var(--muted); }
.planet-chip .pv { font-size: 14px; font-weight: 600; }
.retro-mark { color: #ff9fb0; font-weight: 700; margin-left: 4px; }

.transit { padding: 12px 14px; border-radius: 14px; border-left: 3px solid var(--gold); background: rgba(255,255,255,.035); }
.transit.soft { border-left-color: var(--green); }
.transit.hard { border-left-color: var(--red); }
.transit + .transit { margin-top: 8px; }
.ai-box { white-space: pre-line; line-height: 1.65; padding: 16px; border-radius: 16px; background: linear-gradient(135deg, rgba(157,123,255,.14), rgba(232,199,122,.08)); border: 1px solid rgba(157,123,255,.35); animation: card-rise .4s ease both; }
.lucky { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---- SPREADS ---- */
.spread-types { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.spread-types > .card { margin-top: 0; }
.spread-type { cursor: pointer; text-align: left; min-height: 110px; transition: transform .2s, border-color .2s; }
.spread-type:hover { transform: translateY(-3px); border-color: rgba(232,199,122,.5); }
.spread-type.active { border-color: var(--gold); background: rgba(232,199,122,.1); }
.spread-type .st-ico { font-size: 26px; margin-bottom: 6px; }
.spread-board { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; padding: 10px 0; }
.spread-slot { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 160px; animation: deal .6s ease both; }
.spread-slot .tcard { width: 150px; }
@keyframes deal { from { opacity: 0; transform: translateY(-40px) rotate(-8deg); } }
.meaning-list > div { padding: 14px 0; border-bottom: 1px solid var(--line); }
.meaning-list > div:last-child { border-bottom: none; }
.history-item { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); cursor: pointer; min-height: 52px; }
.history-item:last-child { border-bottom: none; }

/* ---- DECK ---- */
.deck-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 12px; }
.deck-item { cursor: pointer; text-align: center; font-size: 12px; color: var(--muted); }
.deck-item img { width: 100%; border-radius: 10px; border: 1px solid rgba(232,199,122,.35); box-shadow: 0 6px 18px rgba(0,0,0,.4); transition: transform .2s; }
.deck-item:hover img { transform: translateY(-4px); }
.card-modal-img { width: 200px; max-width: 60%; border-radius: 14px; display: block; margin: 0 auto 12px; border: 2px solid rgba(232,199,122,.5); }

/* ---- NATAL ---- */
.natal-layout { display: grid; grid-template-columns: minmax(320px, 460px) minmax(0, 1fr); gap: 16px; align-items: start; }
.natal-svg { width: 100%; height: auto; display: block; filter: drop-shadow(0 10px 30px rgba(0,0,0,.5)); }
.natal-svg .nw-planet { cursor: pointer; }
.aspect-row { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.aspect-row:last-child { border-bottom: none; }
.elements-bar { display: flex; height: 12px; border-radius: 10px; overflow: hidden; margin: 8px 0; }
.compat-score { width: 140px; height: 140px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 10px;
  background: conic-gradient(var(--gold) calc(var(--p) * 1%), rgba(255,255,255,.08) 0); position: relative; }
.compat-score::before { content: ""; position: absolute; inset: 10px; border-radius: 50%; background: #120e36; }
.compat-score span { position: relative; font-family: var(--font); font-weight: 700; font-size: 34px; color: var(--gold-2); }

/* ---- CALENDAR: месяц (компьютер/планшет) ---- */
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-wd { text-align: center; font-size: 12px; color: var(--muted); padding: 4px 0; }
.cal-cell { min-height: 84px; border-radius: 14px; padding: 8px; background: rgba(255,255,255,.035); border: 1px solid var(--line); cursor: pointer; display: flex; flex-direction: column; gap: 4px; transition: border-color .2s, background .2s; }
.cal-cell:hover { border-color: rgba(232,199,122,.4); }
.cal-cell.today { border-color: var(--gold); box-shadow: 0 0 0 1px rgba(232,199,122,.4) inset; }
.cal-cell.selected { background: rgba(232,199,122,.12); }
.cal-cell.empty { visibility: hidden; }
.cal-num { font-weight: 700; font-size: 14px; display: flex; justify-content: space-between; }
.cal-marks { display: flex; gap: 3px; flex-wrap: wrap; font-size: 13px; margin-top: auto; }
.cal-day-view { display: none; }

/* ---- ONBOARDING ---- */
.onboarding { position: fixed; inset: 0; z-index: 90; overflow-y: auto; background: radial-gradient(900px 600px at 50% -10%, #34237f, transparent 60%), linear-gradient(180deg, #120d38, #07061a); }
.ob-inner { max-width: 560px; margin: 0 auto; padding: 34px 20px 40px; position: relative; z-index: 1; }
.ob-hero { text-align: center; margin-bottom: 20px; }
.ob-moon { font-size: 70px; filter: drop-shadow(0 0 30px rgba(232,199,122,.7)); animation: float 4s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-10px); } }
.ob-features { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 18px 0; }
.ob-feature { padding: 14px; border-radius: 16px; background: var(--glass); border: 1px solid var(--line); font-size: 14px; }
.ob-feature b { display: block; margin-bottom: 4px; }
.ob-steps { display: flex; gap: 6px; justify-content: center; margin-bottom: 16px; }
.ob-steps i { width: 26px; height: 4px; border-radius: 4px; background: rgba(255,255,255,.2); }
.ob-steps i.on { background: var(--gold); }

/* ===== ПЛАНШЕТ ===== */
@media (max-width: 1024px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .spread-types { grid-template-columns: repeat(2, 1fr); }
  .natal-layout { grid-template-columns: minmax(0, 1fr); }
  .natal-wheel-box { max-width: 520px; margin: 0 auto; }
  .cal-cell { min-height: 70px; }
}

/* ===== ТЕЛЕФОН: календарь — один день со стрелками ===== */
@media (max-width: 768px) {
  .tcard { width: 132px; }
  .daily-wrap { flex-direction: column; text-align: center; }
  .scores { grid-template-columns: 1fr; }
  .spread-types { grid-template-columns: 1fr 1fr; gap: 10px; }
  .spread-type { min-height: 96px; padding: 13px; }
  .spread-slot { width: 46%; }
  .spread-slot .tcard { width: 100%; max-width: 140px; }
  .deck-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .planet-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cal-grid { display: none; }
  .cal-day-view { display: block; }
  .cal-day-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
  .cal-day-title { text-align: center; flex: 1; }
  .cal-day-title b { display: block; font-family: var(--font-display); font-size: 24px; }
  .ob-features { grid-template-columns: 1fr; }
  .moon-orb { width: 72px; height: 72px; }
  .compat-score { width: 120px; height: 120px; }
}

/* Солнце/Луна/Асцендент всегда в 3 колонки */
.natal-big3 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 8px !important; }

/* ---- Дата рождения: Год → Месяц → Число ---- */
.date-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.45fr) minmax(0, .9fr); gap: 8px; }
.date-row select.input { padding: 12px 10px; min-width: 0; }
.date-row select.input:disabled { opacity: .45; cursor: not-allowed; }
