/* Приложение «Татьяна Таро» (app.html): блоки, как в банковском приложении, в нашей гамме — ночное небо и золото.
   Главное на экране — одна крупная карточка; остальное — плитки и строки, подробности открываются в нижней шторке. */
:root {
  --bg: #23262d; --bg-2: #1c1e24; --card: rgba(255, 255, 255, .055); --card-2: rgba(255, 255, 255, .09);
  --line: rgba(214, 187, 135, .22); --line-2: rgba(214, 187, 135, .45);
  --ink: #f3ece1; --ink-2: #cfc6b8; --muted: #958c80;
  --gold: #d6bb87; --gold-2: #efe0bd; --gold-ink: #2a2620;
  --good: #8fc79a; --good-bg: rgba(143, 199, 154, .13); --wait: #e5b26b; --wait-bg: rgba(229, 178, 107, .13);
  --serif: "Montserrat", system-ui, sans-serif; --sans: "Manrope", system-ui, sans-serif;
  --safe-t: env(safe-area-inset-top); --safe-b: env(safe-area-inset-bottom);
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; min-height: 100vh; background: radial-gradient(120% 55% at 50% 0%, #343843 0%, var(--bg) 60%, var(--bg-2) 100%) fixed; color: var(--ink); font: 400 15px/1.5 var(--sans); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }

.ap { max-width: 560px; margin: 0 auto; padding: calc(var(--safe-t) + 18px) 16px calc(var(--safe-b) + 96px); }

/* шапка главной: логотип крупно по центру (мелким не читается подпись в знаке), под ним приветствие */
.ap-head { position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px; margin: 4px 0 18px; text-align: center; }
.ap-head > :not(.ap-sky) { position: relative; z-index: 1; }
.ap-head img { width: auto; height: 132px; max-width: 70%; object-fit: contain; flex: none; }
.ap-hi { margin: 0; font: 300 1.45rem/1.15 var(--serif); }
.ap-date { margin: 2px 0 0; font-size: .78rem; color: var(--muted); }

/* заголовок экрана раздела */
.ap-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.ap-back { width: 38px; height: 38px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); display: grid; place-items: center; text-decoration: none; flex: none; }
.ap-back svg { width: 18px; height: 18px; stroke: var(--ink); fill: none; stroke-width: 2; }
.ap-bar h1 { margin: 0; font: 400 1.2rem var(--serif); }
.ap-bar .ap-sub { display: block; font: 400 .78rem var(--sans); color: var(--muted); }
/* под названием дела — переход на соседний месяц с подписью */
.ap-mswitch { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; margin: -4px 0 14px; }
.ap-mswitch > .ap-marrow:last-child { justify-self: end; }
/* какой месяц открыт — по центру между стрелками */
.ap-mnow { margin: 0; text-align: center; line-height: 1.15; }
.ap-mnow b { display: block; font: 400 1.15rem var(--serif, Montserrat), sans-serif; color: var(--gold-2); }
.ap-marrow { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--card); color: var(--gold-2); font: 300 1.6rem/1 var(--sans); display: grid; place-items: center; padding: 0 0 3px; cursor: pointer; justify-self: start; }
.ap-marrow:active { background: var(--card-2); }

/* главная карточка — ответ на сегодня */
.ap-hero { border-radius: 22px; padding: 18px; background: var(--card-2); border: 1px solid var(--line); }
.ap-hero.is-good { background: var(--good-bg); border-color: rgba(143, 199, 154, .4); }
.ap-hero.is-wait { background: var(--wait-bg); border-color: rgba(229, 178, 107, .4); }
.ap-hero-k { margin: 0; font: 500 .68rem var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--gold); }
.ap-hero.is-good .ap-hero-k { color: var(--good); } .ap-hero.is-wait .ap-hero-k { color: var(--wait); }
.ap-hero-t { margin: 6px 0 0; font: 400 1.35rem/1.25 var(--serif); }
.ap-hero-p { margin: 8px 0 0; color: var(--ink-2); font-size: .92rem; }
.ap-hero-foot { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* плитки дел */
.ap-h2 { margin: 22px 2px 10px; font: 500 .7rem var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); display: flex; justify-content: space-between; }
.ap-h2 a { text-transform: none; letter-spacing: 0; font-size: .8rem; color: var(--gold); text-decoration: none; }
.ap-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 8px; }
.ap-tile { position: relative; display: grid; justify-items: center; gap: 6px; padding: 4px 0; text-decoration: none; text-align: center; font-size: .72rem; line-height: 1.2; color: var(--ink-2); }
.ap-ico { width: 54px; height: 54px; border-radius: 17px; background: var(--card-2); border: 1px solid var(--line); display: grid; place-items: center; }
.ap-ico svg { width: 25px; height: 25px; stroke: var(--gold-2); fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.ap-dot { position: absolute; top: 2px; right: calc(50% - 31px); width: 11px; height: 11px; border-radius: 50%; border: 2px solid var(--bg); }
.ap-dot.is-good { background: var(--good); } .ap-dot.is-wait { background: var(--wait); }
.ap-legend { margin: 10px 2px 0; font-size: .74rem; color: var(--muted); display: flex; gap: 14px; }
.ap-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; }

/* строки-переходы */
.ap-rows { display: grid; gap: 8px; }
.ap-row { display: flex; align-items: center; gap: 12px; padding: 13px 14px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); text-decoration: none; text-align: left; width: 100%; cursor: pointer; }
.ap-row b { display: block; font-weight: 500; font-size: .95rem; color: var(--ink); }
.ap-row span { display: block; font-size: .8rem; color: var(--muted); }
.ap-row > div { flex: 1; min-width: 0; }
/* стрелка — только у строк, которые что-то открывают (ссылка или кнопка) */
.ap-row:is(a, button)::after { content: "›"; font-size: 1.4rem; color: var(--muted); }
.ap-row.is-info { cursor: default; }
.ap-row.is-info::after { content: none; }
.ap-row .ap-rk { display: block; margin-bottom: 2px; font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); }
/* совместимость: процент пары и «почему именно вам» */
.ap-pct { margin: 4px 0 0; font: 400 3rem/1 var(--serif); color: var(--gold-2); }
.ap-card .ap-k { font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); }
.ap-ul { margin: 0; padding-left: 18px; color: var(--ink-2); font-size: .9rem; line-height: 1.5; }
.ap-ul li + li { margin-top: 4px; }
/* пример утренней подсказки — как уведомление на телефоне */
.ap-notif { display: flex; gap: 12px; align-items: flex-start; margin-top: 12px; padding: 12px 14px; border-radius: 16px; background: #f4efe6; color: #2a2620; box-shadow: 0 6px 20px rgba(0, 0, 0, .35); cursor: pointer; }
.ap-notif[hidden] { display: none; }
.ap-notif img { width: 36px; height: 36px; border-radius: 9px; flex: none; }
.ap-notif small { display: block; font-size: .7rem; color: #7a7266; }
.ap-notif b { display: block; margin: 2px 0; font-weight: 600; font-size: .9rem; }
.ap-notif span { display: block; font-size: .85rem; line-height: 1.4; }
.ap-row.is-promo { border-color: var(--line-2); background: rgba(214, 187, 135, .1); }

/* оценка месяца и плитки раздела */
.ap-badge { display: inline-block; padding: 5px 10px; border-radius: 999px; font-size: .74rem; background: rgba(214, 187, 135, .15); color: var(--gold-2); }
.ap-badge.is-top { background: var(--good-bg); color: var(--good); } .ap-badge.is-low { background: var(--wait-bg); color: var(--wait); }
.ap-days { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; margin: 0 -16px; padding-left: 16px; padding-right: 16px; scroll-snap-type: x mandatory; scroll-padding: 0 16px; }
.ap-days::-webkit-scrollbar { display: none; }
.ap-day { flex: none; width: 128px; scroll-snap-align: start; padding: 12px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); text-align: left; cursor: pointer; }
.ap-day.is-release { border-color: rgba(186, 170, 214, .4); }
.ap-day b { display: block; font: 300 1.6rem/1 var(--serif); color: var(--gold-2); }
.ap-day small { display: block; margin-top: 3px; font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.ap-day p { margin: 8px 0 0; font-size: .8rem; line-height: 1.35; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ap-four { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ap-four button { padding: 12px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); text-align: left; cursor: pointer; min-height: 84px; }
.ap-four small { display: block; font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ap-four span { display: block; margin-top: 5px; font-size: .86rem; line-height: 1.35; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* календарь */
.ap-cal { padding: 14px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); }
.ap-cal-g { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.ap-cal-g .wd { font-size: .66rem; color: var(--muted); padding-bottom: 4px; }
.ap-cal-g button { aspect-ratio: 1; border-radius: 10px; border: 1px solid transparent; background: none; font-size: .86rem; color: var(--ink-2); cursor: pointer; padding: 0; }
.ap-cal-g button.is-good { background: var(--good-bg); color: var(--good); border-color: rgba(143, 199, 154, .35); }
.ap-cal-g button.is-wait { background: var(--wait-bg); color: var(--wait); }
.ap-cal-g button.is-today { border-color: var(--gold); }
.ap-cal-g button:disabled { opacity: .35; cursor: default; }
.ap-chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px 12px; padding: 0 16px; }
.ap-chips::-webkit-scrollbar { display: none; }
.ap-chips button { flex: none; padding: 8px 13px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); font-size: .8rem; color: var(--ink-2); cursor: pointer; }
.ap-chips button.is-on { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); }

/* замок для тех, у кого нет полного доступа */
.ap-lock { margin-top: 12px; padding: 18px; border-radius: 18px; text-align: center; background: rgba(214, 187, 135, .08); border: 1px dashed var(--line-2); }
.ap-lock p { margin: 0 0 12px; color: var(--ink-2); font-size: .9rem; }

/* кнопки и поля */
.ap-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 12px 18px; border-radius: 14px; border: 1px solid var(--gold); background: var(--gold); color: var(--gold-ink); font: 500 .85rem var(--sans); text-decoration: none; cursor: pointer; }
.ap-btn.is-line { background: transparent; color: var(--gold-2); border-color: var(--line-2); }
.ap-btn.is-wide { width: 100%; }
.ap-field { display: grid; gap: 6px; margin-bottom: 12px; font-size: .8rem; color: var(--muted); }
.ap-field select, .ap-field input { width: 100%; height: 46px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line); background: rgba(0, 0, 0, .2); color: var(--ink); font: 400 .95rem var(--sans); -webkit-appearance: none; appearance: none; }
.ap-row3 { display: grid; grid-template-columns: .8fr 1.4fr 1fr; gap: 8px; }
/* подсказки города рождения: свой список и найденные по миру (с областью и страной) */
.ap-cities { display: grid; gap: 4px; margin: -4px 0 14px; padding: 6px; border-radius: 12px; border: 1px solid var(--line); background: rgba(0, 0, 0, .25); }
.ap-cities button { display: grid; gap: 2px; padding: 10px 12px; border: 0; border-radius: 10px; background: none; color: var(--ink); font: 400 .95rem var(--sans); text-align: left; cursor: pointer; }
.ap-cities button:active, .ap-cities button:hover { background: rgba(214, 187, 135, .1); }
.ap-cities button span { font-size: .78rem; color: var(--muted); }
.ap-cities p { margin: 4px 8px 6px; font-size: .8rem; color: var(--muted); }
.ap-card { padding: 16px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); }
.ap-card + .ap-card { margin-top: 10px; }
.ap-card h3 { margin: 0 0 6px; font: 400 1.05rem var(--serif); }
.ap-card p { margin: 0 0 10px; color: var(--ink-2); font-size: .88rem; }
.ap-note { margin: 8px 0 0; min-height: 1.2em; font-size: .82rem; color: var(--gold); }
.ap-list { margin: 0; padding-left: 1.1rem; display: grid; gap: 8px; color: var(--ink-2); font-size: .9rem; }

/* нижняя шторка */
.ap-sheet { position: fixed; inset: 0; z-index: 20; }
.ap-sheet-back { position: absolute; inset: 0; background: rgba(0, 0, 0, .55); touch-action: none; }
.ap-sheet-card { position: absolute; left: 0; right: 0; bottom: 0; max-height: 86vh; overflow-y: auto; margin: 0 auto; max-width: 560px; padding: 22px 18px calc(var(--safe-b) + 24px); border-radius: 24px 24px 0 0; background: #2b2e36; border-top: 1px solid var(--line-2); animation: up .25s ease-out; }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
.ap-sheet-x { position: absolute; top: 10px; right: 12px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--card-2); font-size: 1.3rem; cursor: pointer; }
.ap-sheet h2 { margin: 0 34px 4px 0; font: 400 1.25rem/1.25 var(--serif); }
.ap-sheet .ap-k { margin: 0 0 10px; font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); }
.ap-sheet p { color: var(--ink-2); }
.ap-sheet ol { padding-left: 1.2rem; color: var(--ink-2); display: grid; gap: 6px; }
/* шторка расклада: цель расклада, цена, запись */
.ap-rd-bonus { margin: 16px 0 0; padding-top: 14px; border-top: 1px solid var(--line); }
.ap-sheet .ap-rd-bonus { color: var(--ink); }
.ap-rd-price { margin: 18px 0 12px; font: 300 1.5rem var(--serif); color: var(--ink); }
.ap-sheet .ap-rd-price { color: var(--ink); }
.ap-rd-tg { margin-top: 8px; }

/* нижнее меню */
.ap-tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; display: grid; grid-template-columns: repeat(4, 1fr); padding: 8px 8px calc(var(--safe-b) + 8px); background: rgba(28, 30, 36, .94); border-top: 1px solid var(--line); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.ap-tabs a { display: grid; justify-items: center; gap: 3px; font-size: .68rem; color: var(--muted); text-decoration: none; }
.ap-tabs svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.ap-tabs a.is-on { color: var(--gold-2); }

/* статус дня точкой: хороший / подождать / обычный — в «Сегодня по всем делам», в разделе и в календаре */
.ap-st { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 8px; vertical-align: 1px; background: var(--muted); }
.ap-st.is-good { background: var(--good); } .ap-st.is-wait { background: var(--wait); }
.ap-today { margin: 0 0 10px; padding: 10px 14px; border-radius: 14px; font-size: .88rem; color: var(--ink); background: var(--card); border: 1px solid var(--line); }
.ap-today.is-good { background: var(--good-bg); border-color: rgba(143, 199, 154, .35); }
.ap-today.is-wait { background: var(--wait-bg); border-color: rgba(229, 178, 107, .35); }
.ap-hero[data-today] { cursor: pointer; }
.ap-hero-more { margin-left: auto; font-size: .8rem; color: var(--gold-2); }
.ap-link { border: 0; background: none; padding: 0; color: var(--gold-2); text-decoration: underline; cursor: pointer; font: inherit; }

/* ===== Карты: веер, лента «Три карты», аркан судьбы, переворот карты, заставка ===== */
.ap-c-hint { min-height: 1.4em; margin: 0 2px 10px; font-size: .85rem; color: var(--ink-2); text-align: center; }
.ap-tc { position: relative; width: 104px; aspect-ratio: 512 / 820; padding: 0; border: 0; background: none; cursor: pointer; perspective: 900px; -webkit-tap-highlight-color: transparent; }
.ap-tc-in { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .9s cubic-bezier(.3, .7, .2, 1); }
.ap-tc.is-flipped .ap-tc-in { transform: rotateY(180deg); }
.ap-tc-s { position: absolute; inset: 0; border-radius: 9px; backface-visibility: hidden; -webkit-backface-visibility: hidden; background: #e9e2d6 center / cover no-repeat; box-shadow: 0 8px 24px rgba(0, 0, 0, .45); }
.ap-tc-s.is-back { background-image: var(--card-back, none); }
.ap-tc-s.is-face { transform: rotateY(180deg); }
.ap-fan { position: relative; height: 210px; display: grid; place-items: center; margin: 4px 0 6px; }
.ap-fan .ap-tc { position: absolute; transform: translateX(var(--dx)) rotate(var(--a)); transition: transform .6s ease, opacity .5s ease; }
.ap-fan .ap-tc:active { transform: translateX(var(--dx)) rotate(var(--a)) translateY(-6px); }
.ap-fan .ap-tc.is-gone { opacity: 0; pointer-events: none; }
.ap-fan .ap-tc.is-picked { transform: translateX(0) rotate(0) scale(1.35); z-index: 2; }
.ap-c-res { margin-top: 14px; }
.ap-c-res h3 { font-size: 1.3rem; }
.ap-c-yn { margin: 2px 0 8px; font: 400 1.1rem var(--serif); color: var(--gold-2); }
.ap-c-act { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; }
.ap-c-act.is-col { flex-direction: column; align-items: stretch; }
.ap-c-act .ap-link { align-self: center; margin-top: 2px; }
.ap-c-pos { margin: 0 0 12px; font-size: .92rem; color: var(--ink-2); }
.ap-c-pos b { display: block; margin-bottom: 2px; color: var(--gold-2); font-weight: 500; }
.ap-slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 10px; }
.ap-slot { display: grid; justify-items: center; gap: 6px; font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ap-slot-c { width: 100%; max-width: 96px; aspect-ratio: 512 / 820; border-radius: 9px; border: 1px dashed var(--line-2); }
.ap-slot.is-next .ap-slot-c { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(214, 187, 135, .12); }
.ap-slot-c .ap-tc { width: 100%; cursor: default; }
.ap-strip { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 6px 16px 14px; scroll-snap-type: x proximity; }
.ap-strip::-webkit-scrollbar { display: none; }
.ap-strip .ap-tc { flex: none; width: 72px; scroll-snap-align: center; transition: transform .3s ease, opacity .3s ease; }
.ap-strip .ap-tc:nth-child(3n + 1) { transform: rotate(-2deg); } .ap-strip .ap-tc:nth-child(3n) { transform: rotate(2deg); }
.ap-strip .ap-tc.is-taken { opacity: .15; pointer-events: none; transform: translateY(8px); }
.ap-fate { display: grid; place-items: center; margin: 6px 0 14px; }
.ap-fate .ap-tc { width: 138px; cursor: default; }
.ap-fate .ap-tc.is-spin .ap-tc-in { transition: transform 1.2s cubic-bezier(.3, .7, .2, 1); }
.ap-fate .ap-tc.is-spin.is-flipped .ap-tc-in { transform: rotateY(900deg); }
/* заставка вкладки «Карты»: колода тасуется, надпись — и плавно уходит */
.ap-splash { position: fixed; inset: 0; z-index: 50; display: grid; place-content: center; justify-items: center; gap: 18px; background: radial-gradient(circle at 50% 40%, #33363d, var(--bg, #23262d) 70%); transition: opacity .6s ease; }
.ap-splash.is-out { opacity: 0; pointer-events: none; }
.ap-splash-deck { position: relative; width: 110px; aspect-ratio: 512 / 820; }
.ap-splash-deck i { position: absolute; inset: 0; border-radius: 10px; background: #e9e2d6 var(--card-back, none) center / cover; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); animation: ap-shuffle 1.2s ease-in-out infinite; }
.ap-splash-deck i:nth-child(2) { animation-delay: .2s; } .ap-splash-deck i:nth-child(3) { animation-delay: .4s; }
@keyframes ap-shuffle { 0%, 100% { transform: translateX(0) rotate(0); } 30% { transform: translateX(-46px) rotate(-8deg); } 60% { transform: translateX(46px) rotate(8deg); } }
.ap-splash-t { margin: 0; font: 300 1.5rem/1.3 var(--serif); text-align: center; color: var(--gold-2); }
.ap-splash-s { margin: 0; font-size: .72rem; letter-spacing: .3em; text-transform: uppercase; color: var(--gold); }
/* заставка при входе: дата, тонкая золотая линия раскрывается, приветствие проявляется — и всё плавно уходит */
.ap-hello { position: fixed; inset: 0; z-index: 60; display: grid; place-content: center; justify-items: center; gap: 14px; padding: 0 24px; text-align: center; background: radial-gradient(circle at 50% 42%, #33363d, var(--bg, #23262d) 70%); transition: opacity .7s ease; }
.ap-hello.is-out { opacity: 0; pointer-events: none; }
.ap-hello-d { margin: 0; font-size: .78rem; color: var(--muted); opacity: 0; animation: ap-hello-in .8s ease .15s forwards; }
.ap-hello-line { display: block; width: 120px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold), transparent); transform: scaleX(0); animation: ap-hello-line .9s ease .3s forwards; }
.ap-hello-t { margin: 0; font: 300 1.9rem/1.2 var(--serif); color: var(--gold-2); opacity: 0; animation: ap-hello-in .9s ease .55s forwards; }
.ap-hello-s { margin: 6px 0 0; font-size: .68rem; letter-spacing: .3em; text-transform: uppercase; color: var(--gold); opacity: 0; animation: ap-hello-in .8s ease .9s forwards; }
@keyframes ap-hello-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes ap-hello-line { to { transform: scaleX(1); } }
/* небо заставки: тусклые звёзды тихо мерцают */
.ap-hello { overflow: hidden; }
.ap-hello-sky { position: absolute; inset: 0; pointer-events: none; }
.ap-hello p, .ap-hello-line { position: relative; z-index: 1; } /* надписи — поверх неба и метеора */
.ap-hello-sky b { position: absolute; width: var(--s); height: var(--s); border-radius: 50%; background: #f4f1ea; opacity: 0; animation: ap-twinkle 2.4s ease-in-out infinite alternate; }
@keyframes ap-twinkle { 0% { opacity: .1; } 100% { opacity: .55; } }
/* метеор: вспыхивает, разгоняется, хвост вытягивается на лету и тает; холодный белый свет, как у настоящего */
.ap-hello-star { position: absolute; top: 9%; left: 92%; height: 2px; width: 12px; border-radius: 2px; transform-origin: 0 50%;
  background: linear-gradient(90deg, rgba(255, 255, 255, .95), rgba(205, 222, 255, .45) 30%, rgba(205, 222, 255, 0));
  filter: drop-shadow(0 0 3px rgba(220, 232, 255, .7)); opacity: 0; transform: rotate(-24deg) translateX(0);
  animation: ap-meteor .85s cubic-bezier(.55, 0, .85, .45) .45s forwards; }
.ap-hello-star::before { content: ""; position: absolute; left: -2px; top: 50%; width: 4px; height: 4px; margin-top: -2px; border-radius: 50%; background: #fff; box-shadow: 0 0 6px 2px rgba(235, 242, 255, .95), 0 0 14px 4px rgba(190, 210, 255, .35); }
@keyframes ap-meteor {
  0% { opacity: 0; width: 12px; transform: rotate(-24deg) translateX(0); }
  12% { opacity: 1; }
  60% { opacity: 1; width: 190px; }
  100% { opacity: 0; width: 70px; transform: rotate(-24deg) translateX(-460px); }
}
.ap-c-q { margin: 0 0 12px; font-style: italic; color: var(--gold-2); }

/* цвет = смысл, как в календаре месяца: ваши лучшие дни — зелёные, «лучше подождать» — янтарный */
.ap-day { background: var(--good-bg); border-color: rgba(143, 199, 154, .45); }
.ap-day b { color: var(--good); }
.ap-day small { color: rgba(143, 199, 154, .85); }
.ap-day.is-release { border-style: dashed; border-color: rgba(143, 199, 154, .45); }
.ap-four [data-box="wait"] { background: var(--wait-bg); border-color: rgba(229, 178, 107, .45); }
.ap-four [data-box="wait"] small { color: var(--wait); }
.ap-author { background: linear-gradient(160deg, rgba(214, 187, 135, .12), var(--card) 60%); border-color: var(--line-2); }
.ap-author h3 { font-size: 1.15rem; }
.ap-ul b { color: var(--ink); font-weight: 500; }
/* событие: чего лучше не делать (янтарный) и что делать (зелёный) */
.ap-evbox { margin-top: 12px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); }
.ap-evbox.is-no { background: var(--wait-bg); border-color: rgba(229, 178, 107, .4); }
.ap-evbox.is-yes { background: var(--good-bg); border-color: rgba(143, 199, 154, .4); }
.ap-evt { margin: 0 0 6px; font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; }
.ap-evbox.is-no .ap-evt { color: var(--wait); } .ap-evbox.is-yes .ap-evt { color: var(--good); }
.ap-day.is-strong { border-color: var(--good); border-width: 1.5px; }
/* прокрутка внутри шторки не передаётся фону, когда дошла до края */
.ap-sheet-card { overscroll-behavior: contain; }

/* звёздное небо над шапкой главной: на всю ширину экрана, от верхнего края до приветствия, плавно гаснет вниз */
.ap-sky { position: absolute; z-index: 0; left: 50%; width: 100vw; transform: translateX(-50%); top: calc((var(--safe-t) + 22px) * -1); height: calc(100% + var(--safe-t) + 40px); overflow: hidden; pointer-events: none;
  -webkit-mask-image: linear-gradient(#000 55%, transparent); mask-image: linear-gradient(#000 55%, transparent); }
.ap-sky i { position: absolute; width: var(--s); height: var(--s); border-radius: 50%; background: #f4e9cf; box-shadow: 0 0 6px rgba(244, 233, 207, .7);
  opacity: .25; animation: ap-twinkle var(--t) ease-in-out var(--d) infinite; }
@keyframes ap-twinkle { 0%, 100% { opacity: .2; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.15); } }
/* падающая звезда: светлая головка и золотистый хвост; видна малую часть цикла, остальное время её нет */
.ap-sky b { position: absolute; width: 110px; height: 1.6px; border-radius: 2px; opacity: 0;
  background: linear-gradient(to right, rgba(214, 187, 135, 0), rgba(239, 224, 189, .55) 70%, #fff8e6);
  transform-origin: right center; animation: ap-shoot var(--t) linear var(--d) infinite; }
@keyframes ap-shoot {
  0% { opacity: 0; transform: translate(0, 0) rotate(152deg); }
  1% { opacity: 1; }
  7% { opacity: 0; transform: translate(-230px, 122px) rotate(152deg); }
  100% { opacity: 0; transform: translate(-230px, 122px) rotate(152deg); }
}
@media (prefers-reduced-motion: reduce) { .ap-sky i { animation: none; opacity: .55; } .ap-sky b { display: none; } }
/* небо шире колонки приложения — без горизонтальной прокрутки страницы. hidden — только у html (он отдаёт обрезку окну);
   у body hidden сделал бы его отдельной прокручиваемой областью со своей полосой справа, поэтому body — только clip.
   Полос прокрутки в приложении нет, как в обычном приложении на телефоне; двойное касание не увеличивает страницу */
html { overflow-x: hidden; }
@supports (overflow: clip) { html, body { overflow-x: clip; } }
html { touch-action: manipulation; scrollbar-width: none; }
html::-webkit-scrollbar, body::-webkit-scrollbar { display: none; }
/* «Почему этот день» в шторке дня */
.ap-why { margin-top: 14px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); }
.ap-why.is-good { background: var(--good-bg); border-color: rgba(143, 199, 154, .4); }
.ap-why.is-wait { background: var(--wait-bg); border-color: rgba(229, 178, 107, .4); }
.ap-why-t { margin: 0 0 8px !important; font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--gold) !important; }
.ap-why.is-good .ap-why-t { color: var(--good) !important; } .ap-why.is-wait .ap-why-t { color: var(--wait) !important; }
.ap-why p { margin: 0 0 6px; font-size: .9rem; line-height: 1.45; }
.ap-why b { color: var(--ink); font-weight: 500; }
.ap-why .ap-why-sum { margin: 8px 0 0; font-size: .82rem; font-style: italic; }
.ap-why .ap-why-lead { font: 400 1rem var(--serif); color: var(--ink); margin-bottom: 8px; }
/* компьютер и широкий экран: приложение — колонкой телефона посередине, нижнее меню — той же ширины, а не через весь экран */
@media (min-width: 640px) {
  .ap-tabs { left: 50%; right: auto; width: 560px; transform: translateX(-50%); border: 1px solid var(--line); border-bottom: 0; border-radius: 22px 22px 0 0; }
}
/* «Арканы судьбы» (js/matrix.js): схема точек — тонкое золото, центр крупнее */
.ap-mx h3 { margin: 2px 0 6px; }
.ap-mx-map { display: block; width: 100%; max-width: 300px; margin: 14px auto 16px; overflow: visible; }
.ap-mx-line { fill: none; stroke: var(--gold); stroke-width: 1; opacity: .55; }
.ap-mx-line.is-thin { stroke-width: .5; opacity: .25; }
.ap-mx-dot { fill: var(--bg, #23262d); stroke: var(--gold); stroke-width: 1.2; }
.ap-mx-dot.is-core { fill: var(--gold); }
.ap-mx-n { fill: var(--gold-2); font: 500 14px Manrope, sans-serif; text-anchor: middle; }
.ap-mx-n.is-core { fill: var(--gold-ink); font-size: 19px; }
.ap-row.is-lock span { color: var(--gold); }
.ap-mx-corner { fill: var(--gold); opacity: .7; }
.ap-mx-lb { fill: var(--muted); font: 500 11px Manrope, sans-serif; text-anchor: middle; letter-spacing: .02em; }
.ap-mx-pt { cursor: pointer; }
.ap-mx-pt:active .ap-mx-dot { stroke-width: 2.4; }
