/* Чат с тарологом Aura7 (16.11.2026). Мир — семейство гаданий («Подкова», главная гаданий): кремовая бумага, Cormorant
   для голоса, Golos для текста, слива, роза и золото, колода Ольги. Макет — таро-чат: на телефоне переписка на всю
   ширину с полем ввода внизу экрана, на десктопе слева вступление, справа окно чата. */

@font-face { font-family: 'Golos Text'; src: url('fonts/GolosText-VariableFont_wght.ttf') format('truetype-variations'), url('fonts/GolosText-VariableFont_wght.ttf') format('truetype'); font-weight: 400 900; font-style: normal; font-display: swap; }
@font-face { font-family: 'Cormorant'; src: url('fonts/Cormorant.woff2') format('woff2'); font-weight: 300 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Cormorant'; src: url('fonts/Cormorant-Italic.woff2') format('woff2'); font-weight: 300 700; font-style: italic; font-display: swap; }

:root {
  --a7-neutral-50: #FAF7F4; --a7-neutral-100: #F2EDE8; --a7-neutral-200: #E4DCD4; --a7-neutral-300: #C9BFB5;
  --a7-neutral-400: #9C9289; --a7-neutral-500: #6E655D; --a7-neutral-700: #3E3832; --a7-neutral-900: #1A1715;
  --a7-rose-50: #FCEAF3; --a7-rose-100: #F8D5E7; --a7-rose-500: #E472AD; --a7-rose-700: #B84A85; --a7-rose-900: #6F2953;
  --a7-yellow-500: #FFD585;
  --a7-violet-700: #6B3A72; --a7-violet-800: #4E2A56; --a7-violet-900: #3A1E3D; --a7-surface-violet: #2E1632;

  --page: var(--a7-neutral-50);
  --nested: var(--a7-neutral-100);
  --card: #FFFFFF;
  --stroke: var(--a7-neutral-200);
  --stroke-strong: var(--a7-neutral-300);
  --text: var(--a7-neutral-900);
  --text-2: var(--a7-neutral-700);
  --text-3: var(--a7-neutral-500);
  --plum: var(--a7-violet-900);
  --plum-2: var(--a7-violet-800);
  --night: var(--a7-surface-violet);
  --accent: var(--a7-rose-900);
  --sun: var(--a7-yellow-500);
  --cream: var(--a7-neutral-50);
  --cream-soft: rgba(250, 247, 244, .8);
  --cream-mute: rgba(250, 247, 244, .58);

  --font-sans: 'Golos Text', 'Helvetica Neue', system-ui, -apple-system, sans-serif;
  --font-serif: 'Cormorant', 'Times New Roman', Georgia, serif;
  --radius-pill: 999px;
  --shadow-lg: 0 18px 44px rgba(26, 23, 21, .10), 0 6px 14px rgba(26, 23, 21, .06);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-width: 300px; overflow-x: hidden;
  font-family: var(--font-sans); font-size: 16px; line-height: 1.55; color: var(--text);
  background: radial-gradient(70% 38% at 50% 0%, rgba(228, 114, 173, .10), rgba(228, 114, 173, 0) 70%), var(--page);
  -webkit-font-smoothing: antialiased;
  caret-color: var(--a7-rose-700);
}
::selection { background: rgba(228, 114, 173, .24); color: var(--plum); }
button, input, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; }
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
:focus-visible { outline: 2px solid var(--a7-rose-700); outline-offset: 3px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.page { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px calc(16px + env(safe-area-inset-bottom)); }

/* ── шапка: логотип → «Все гадания» → справа имя вошедшей (как в «Подкове») ── */
.site-head { display: flex; align-items: center; height: 64px; }
.logo { display: inline-flex; flex: none; }
.logo img { display: block; width: 105px; height: auto; }
.a7-hub-back { display: inline-flex; align-items: center; gap: 6px; flex: none; min-height: 40px; margin: 0 auto 0 10px; padding: 8px 14px 8px 10px; border: 1px solid rgba(58, 30, 61, .18); border-radius: 999px; background: rgba(255, 255, 255, .72); color: #3a1e3d; font-size: 14px; font-weight: 600; line-height: 1.2; text-decoration: none; white-space: nowrap; -webkit-tap-highlight-color: transparent; transition: border-color .2s, background-color .2s; }
.a7-hub-back:hover { border-color: rgba(58, 30, 61, .42); background: #fff; }
.a7-hub-back svg { flex: none; }
.who {
  display: inline-flex; align-items: center; gap: 8px; flex: 0 1 auto; min-width: 0; margin-left: 8px; padding: 4px 12px 4px 4px;
  border: 1px solid var(--stroke); border-radius: var(--radius-pill); background: var(--card);
  font-size: 14px; font-weight: 500; color: var(--text-2); text-decoration: none;
}
.who-dot { display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--plum); color: var(--sun); font-family: var(--font-serif); font-size: 17px; font-weight: 600; line-height: 1; }
.who-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 374px) { .who { padding-right: 4px; } .who-name { display: none; } }
@media (max-width: 339px) { .logo img { width: 92px; } }

/* ── вступление ── */
.layout { display: flex; flex-direction: column; gap: 14px; padding-top: 4px; }
.intro { text-align: center; }
.title {
  margin: 0; font-family: var(--font-serif); font-weight: 500; color: var(--plum);
  font-size: clamp(38px, 10.4vw, 76px); line-height: .96; letter-spacing: -.03em; text-wrap: balance;
}
.title em { font-style: italic; color: var(--accent); }
.lead { max-width: 38ch; margin: 10px auto 0; font-size: 15.5px; line-height: 1.55; color: var(--text-2); text-wrap: pretty; }
.points, .fan { display: none; }

/* ── окно чата ── */
.chat { position: relative; display: flex; flex-direction: column; margin: 0 -6px; border-radius: 24px; background: var(--card); box-shadow: var(--shadow-lg); }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--stroke); }
.chat-orb { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--plum); box-shadow: 0 0 0 2px var(--a7-rose-100); }
.chat-who { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.chat-who b { font-size: 16px; font-weight: 600; color: var(--plum); }
.chat-who span { font-size: 13px; color: var(--text-3); }
.chat-dot { display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: #3DB46D; vertical-align: 1px; }
.chat-log { display: flex; flex-direction: column; gap: 12px; min-height: 52vh; padding: 16px 14px 18px; }
/* на десктопе лента — колонка фиксированной высоты с прокруткой: без этого браузер сжимает карточки с overflow: hidden
   (стоп-карточка «Продолжим?» сплющивалась до одной строки, 16.11) */
.chat-log > * { flex-shrink: 0; }
.chat-fine { margin: 0; padding: 0 16px 14px; font-size: 11.5px; line-height: 1.4; color: var(--text-3); text-align: center; }

/* реплики */
.b { max-width: 88%; padding: 12px 15px; border-radius: 20px; font-size: 15.5px; line-height: 1.58; white-space: pre-line; overflow-wrap: anywhere; animation: rise .45s var(--ease) both; }
.b-a { align-self: flex-start; border-bottom-left-radius: 6px; background: var(--nested); color: var(--text); }
.b-u { align-self: flex-end; border-bottom-right-radius: 6px; background: var(--plum); color: var(--cream); }
.b-a p { margin: 0; }
.b-a p + p { margin-top: 10px; }
/* подряд идущие сообщения таролога — одной группой, как в мессенджере */
.b-a + .b-a { margin-top: -6px; border-top-left-radius: 8px; }
.b-u + .b-u { margin-top: -6px; border-top-right-radius: 8px; }
.b-cardsonly { padding: 10px 12px 8px; }
.b-cardsonly .b-cards { margin: 0; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.b-cards { display: flex; gap: 8px; margin: 2px 0 12px; }
.b-cards button { flex: 0 0 auto; width: 84px; padding: 0; border: 0; background: none; cursor: zoom-in; text-align: center; perspective: 700px; }
.b-cards.is-one button { width: 118px; }
/* переворот карты (19.11): рубашка → лицо; .is-open ставит app.js, когда картинка загрузилась */
.fc { position: relative; display: block; width: 100%; aspect-ratio: 2 / 3; transform-style: preserve-3d; transition: transform .9s var(--ease); }
.fc.is-open { transform: rotateY(180deg); }
.fc img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; border-radius: 6px; object-fit: cover; backface-visibility: hidden; -webkit-backface-visibility: hidden; box-shadow: 0 0 0 1px rgba(255, 213, 133, .55), 0 8px 14px -8px rgba(26, 23, 21, .6); }
.fc .fc-front { transform: rotateY(180deg); }
.b-cards .fc-label { display: block; margin-top: 5px; font-size: 11px; line-height: 1.2; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.b-cards.is-one .fc-label { font-size: 12px; }

/* подсказки-начала до первого сообщения */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: -2px; }
.chip { min-height: 40px; padding: 8px 14px; border: 1px solid var(--a7-rose-100); border-radius: var(--radius-pill); background: var(--a7-rose-50); color: var(--accent); font-size: 14px; font-weight: 500; line-height: 1.25; text-align: left; transition: border-color .2s; }
.chip:hover { border-color: var(--a7-rose-500); }

/* таролог пишет */
.typing { align-self: flex-start; display: flex; align-items: center; gap: 10px; padding: 12px 15px; border-radius: 20px; border-bottom-left-radius: 6px; background: var(--nested); color: var(--text-3); font-size: 14px; animation: rise .35s var(--ease) both; }
.typing i { display: inline-block; width: 6px; height: 6px; margin-right: 3px; border-radius: 50%; background: var(--a7-rose-700); animation: dot 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; }
.typing i:nth-child(3) { animation-delay: .4s; }
@keyframes dot { 0%, 100% { opacity: .25; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-3px); } }

.note { margin: 0; padding: 14px 16px; border-radius: 18px; background: var(--a7-rose-50); font-size: 14.5px; line-height: 1.5; color: var(--accent); }
.note .btn { margin-top: 10px; }
.note-ok { background: var(--nested); color: var(--text-2); }

/* поле ввода: на телефоне прилипает к низу экрана */
.composer {
  position: sticky; bottom: 0; z-index: 5; display: flex; align-items: flex-end; gap: 8px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--stroke); border-radius: 0 0 24px 24px; background: rgba(255, 255, 255, .97);
}
.composer textarea {
  flex: 1; min-width: 0; max-height: 140px; min-height: 46px; padding: 11px 16px; border: 1px solid var(--stroke); border-radius: 23px;
  background: var(--nested); font-size: 16px; line-height: 1.4; resize: none; outline: none; overflow-y: hidden; transition: border-color .2s, background .2s;
}
.composer textarea::placeholder { color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.composer textarea:focus { border-color: var(--a7-rose-500); background: #fff; }
.composer textarea:read-only { opacity: .7; }
/* разговор на паузе: поле и стрелка ведут к стоп-карточке */
.composer.is-locked textarea, .composer.is-locked .send { cursor: pointer; }
.composer.is-locked .send { opacity: .45; }
.stop.is-nudge { animation: nudge .9s var(--ease); }
@keyframes nudge { 0%, 100% { transform: none; box-shadow: none; } 30% { transform: scale(1.02); box-shadow: 0 0 0 3px var(--sun); } }
.send { display: grid; place-items: center; flex: none; width: 46px; height: 46px; border: 0; border-radius: 50%; background: var(--plum); color: var(--cream); transition: background .2s, opacity .2s; }
.send svg { width: 22px; height: 22px; }
.send:hover:not([disabled]) { background: var(--plum-2); }
.send[disabled] { opacity: .35; cursor: default; }

/* кнопки */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; width: 100%;
  min-height: 54px; padding: 0 24px; border: 0; border-radius: var(--radius-pill);
  font-size: 16px; font-weight: 600; line-height: 1.2; text-decoration: none; text-align: center;
  transition: background .25s var(--ease), transform .15s ease, box-shadow .25s var(--ease), opacity .2s ease;
}
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .55; cursor: default; }
.btn-primary { background: var(--plum); color: var(--cream); }
.btn-gold { background: linear-gradient(180deg, #FFE3A6, var(--sun)); color: var(--plum); box-shadow: 0 12px 26px -12px rgba(255, 213, 133, .7); }
.btn-ghost { background: transparent; color: var(--cream); box-shadow: inset 0 0 0 1px rgba(250, 247, 244, .38); }
.btn-ghost:hover:not([disabled]) { box-shadow: inset 0 0 0 1px var(--sun); }

/* стоп-карточки в переписке: войти, продолжить за 89 ₽ / 15 ★, на сегодня всё */
.stop {
  position: relative; overflow: hidden; padding: 22px 18px 20px; border-radius: 22px; text-align: center; color: var(--cream);
  background: radial-gradient(90% 70% at 50% 0%, rgba(228, 114, 173, .32), rgba(228, 114, 173, 0) 65%), var(--night);
  animation: rise .5s var(--ease) both;
}
.stop-title { margin: 0; font-family: var(--font-serif); font-weight: 500; font-size: 27px; line-height: 1.1; }
.stop-text { max-width: 34ch; margin: 8px auto 16px; font-size: 14.5px; line-height: 1.5; color: var(--cream-soft); }
.stop-note { margin: 12px 0 0; font-size: 12.5px; color: var(--cream-mute); }
.stop-note a { color: var(--sun); }
.stop-wait { max-width: 32ch; margin: 0 auto 14px; font-size: 14.5px; line-height: 1.5; color: var(--cream-soft); }
.stop-or { margin: 10px 0; font-size: 12.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--cream-mute); }
.stop-link { display: block; margin: 12px auto 0; padding: 6px 10px; border: 0; background: none; font-size: 14px; color: var(--sun); text-decoration: underline; text-underline-offset: 3px; }
.stop-link[disabled] { opacity: .55; cursor: default; }
.stop-err { color: #FFB4A8; }
.stop-expert { margin: 16px -18px -20px; padding: 14px 18px 16px; border-top: 1px solid rgba(250, 247, 244, .14); font-size: 13.5px; line-height: 1.45; color: var(--cream-soft); }
.stop-expert a { color: var(--sun); font-weight: 600; }

/* карта крупно */
.lightbox {
  position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 24px;
  background: rgba(26, 12, 30, .82); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.lb-figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.lb-figure img { display: block; height: min(70vh, 600px); width: auto; max-width: 86vw; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 10px; box-shadow: 0 0 0 1px rgba(255, 213, 133, .6), 0 30px 60px -20px rgba(0, 0, 0, .8), 0 0 60px rgba(255, 213, 133, .25); }
.lb-figure figcaption { text-align: center; color: var(--cream); }
.lb-pos { display: block; font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--sun); }
.lb-name { display: block; margin-top: 2px; font-family: var(--font-serif); font-size: 26px; }
.lb-close { position: absolute; top: 14px; right: 14px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(250, 247, 244, .12); }
.lb-close svg { width: 22px; height: 22px; stroke: var(--cream); stroke-width: 2; fill: none; }

.foot { margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--stroke); text-align: center; font-size: 12.5px; line-height: 1.5; color: var(--text-3); }
.foot p { margin: 0 0 4px; }

/* ── десктоп: слева вступление и карты, справа окно чата на высоту экрана ── */
@media (min-width: 960px) {
  .page { padding: 0 40px 28px; }
  .site-head { height: 76px; }
  .layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 520px); column-gap: 56px; align-items: start; padding-top: 12px; }
  .intro { position: sticky; top: 24px; padding-top: 28px; text-align: left; }
  .title { font-size: clamp(56px, 6vw, 84px); }
  .lead { margin: 18px 0 0; font-size: 17px; max-width: 34ch; }
  .points { display: grid; gap: 12px; max-width: 40ch; margin: 26px 0 0; padding: 0; list-style: none; font-size: 15.5px; line-height: 1.5; color: var(--text-2); }
  .points b { color: var(--plum); }
  .fan { position: relative; display: block; height: 250px; margin-top: 34px; }
  .fan img { position: absolute; top: 0; width: 140px; height: auto; border-radius: 8px; box-shadow: 0 0 0 1px rgba(255, 213, 133, .6), 0 22px 40px -18px rgba(46, 22, 50, .6); }
  .fan img:nth-child(1) { left: 0; transform: rotate(-9deg) translateY(16px); }
  .fan img:nth-child(2) { left: 104px; z-index: 1; }
  .fan img:nth-child(3) { left: 208px; transform: rotate(9deg) translateY(16px); }
  .chat { margin: 0; height: calc(100vh - 110px); min-height: 560px; max-height: 860px; }
  .chat-log { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 18px 18px 20px; }
  .composer { position: static; padding: 12px 14px; border-radius: 0; }
  .chat-fine { padding-top: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
