/* «Моя Аура» v2. Палитра cardgen: глубокий фиолетовый, золото.
   Текст — системный гротеск (читаемость), Cormorant — только заголовки и имена карт. */
@font-face {
  font-family: 'Cormorant';
  src: url('fonts/CormorantGaramond-Bold.ttf');
  font-weight: 700;
}

:root {
  --tg-top: 0px; --tg-bottom: 0px;   /* высоты системных зон Телеграма */
  --bg-top: #0D0221;
  --bg-bottom: #1A0A3E;
  --gold: #C9A84C;
  --gold-bright: #E8C96A;
  --gold-dim: #A08237;
  --white: #F5F0E8;
  --gray: #A99CC4;
  --panel: rgba(245,240,232,.07);
  --panel-border: rgba(201,168,76,.38);
  --card-w: min(60vw, 230px);
  --serif: 'Cormorant', Georgia, serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(180deg, var(--bg-top), var(--bg-bottom) 60%, #12062B);
  color: var(--white);
  /* TMA-каркас: высоту вьюпорта Telegram держит сам в CSS-переменной,
     обновляя её при сворачивании/раскрытии (core.telegram.org/bots/webapps) */
  min-height: var(--tg-viewport-stable-height, 100dvh);
  display: flex; flex-direction: column;
  font-size: 17px;
  line-height: 1.5;
  /* Cormorant по умолчанию рисует старостильные цифры: «+10 ☾» в заголовке
     празднования читалось как «+IO». Наследуемое свойство — чиним разом
     везде, гротеск его просто игнорирует (проход глазами Димы) */
  font-variant-numeric: lining-nums;
  font-feature-settings: "lnum" 1;
  overflow-x: hidden;
}

/* высоту диктует body (TMA-переменная); 100vh здесь ломал свёрнутый вебвью */
#root { flex: 1; display: flex; flex-direction: column; min-height: 0; }

/* Заход с компьютера (Влад, 2026-08-12): апп нарисован под телефон, и на
   широком экране он растекался во всю ширину — таббар на весь монитор,
   сцена в разъезде. Держим телефонную колонку по центру, мобильной вёрстки
   это не касается. */
@media (min-width: 760px) {
  body { align-items: center; }
  #root { width: 100%; max-width: 470px;
    border-left: 1px solid rgba(201, 168, 76, .14);
    border-right: 1px solid rgba(201, 168, 76, .14); }
  /* центруем через margin, а не transform: у .narrative свой transform в
     анимации появления, и они бы затёрли друг друга */
  .tabs, .narrative { max-width: 470px; margin-inline: auto; }
}

/* ── Сплэш ── */
.splash {
  position: fixed; inset: 0; z-index: 200;
  background: linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  transition: opacity .5s; gap: 8px;
}
.splash.hide { opacity: 0; pointer-events: none; }
.splash .logo-moon { font-size: 64px; filter: drop-shadow(0 0 24px rgba(201,168,76,.55)); animation: floaty 3s ease-in-out infinite; }
@keyframes floaty { 50% { transform: translateY(-8px); } }
.splash h1 { font-family: var(--serif); font-size: 40px; color: var(--gold); letter-spacing: 1px; }
.splash .tagline { color: var(--gray); font-size: 15px; margin-bottom: 26px; }
.splash .load-bar { width: 200px; height: 7px; border-radius: 4px; background: rgba(245,240,232,.13); overflow: hidden; }
.splash .load-bar i { display: block; height: 100%; width: 0; border-radius: 4px;
  background: linear-gradient(90deg, var(--gold-dim), var(--gold-bright)); transition: width .35s; }
.splash .load-note { color: var(--gray); font-size: 13px; margin-top: 10px; min-height: 18px; }

.loading { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 40vh; }
.moon-loader { width: 44px; height: 44px; border-radius: 50%;
  border: 2px solid var(--gold-dim); border-top-color: var(--gold-bright); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Оверлей действия: гасит двойные тапы */
.busy-overlay { position: fixed; inset: 0; z-index: 150; background: rgba(13,2,33,.55);
  display: flex; align-items: center; justify-content: center; }

/* ── HUD-шапка ── */
.hud {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 10px;
  /* в полном экране сверху лежат системная строка и круглые кнопки Телеграма:
     их высоту он сообщает сам, мы кладём её в --tg-top (см. applySafeArea).
     Вне фулскрина переменная нулевая, и отступ остаётся прежним */
  padding: calc(12px + var(--tg-top, 0px)) 16px 10px;
  /* шапка липкая: под ней проезжает текст сцены. При .86 он читался насквозь
     и выглядел браком — плотный фон + блюр, как у таббара (аудит UI 2026-08-10) */
  /* без backdrop-filter: блюр под анимированной сценой перерисовывался каждый
     кадр и давал рывки на Android-вебвью (Дима 2026-08-15 «подлагивает»);
     при фоне .97 его и не было видно */
  background: linear-gradient(180deg, rgba(13,2,33,.99), rgba(13,2,33,.97));
  border-bottom: 1px solid rgba(201,168,76,.22);
}
.ava {
  width: 40px; height: 40px; border-radius: 50%; flex: none;
  background: linear-gradient(160deg, #2A1157, #170735);
  border: 1.5px solid var(--gold-dim);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-size: 19px; color: var(--gold); font-weight: 700;
}
.hud .who { flex: 1; min-width: 0; }
.hud .who .nm { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* одна строка: «Хозяйка салона III · ур. 12» на 360 px переносил «12» на
   вторую строку и раздувал шапку (проход 2026-08-15) */
.hud .who .lv { color: var(--gray); font-size: 12.5px; white-space: nowrap;
  display: flex; align-items: baseline; gap: 4px; min-width: 0; }
.hud .who .lv .rank { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.hud .who .lv .lvl { flex: none; }
.hud .who .lv b { color: var(--gold); font-weight: 700; }
.moon-chip .crescent { color: var(--gold-bright); font-size: 17px; margin-right: 2px;
  text-shadow: 0 0 8px rgba(201,168,76,.6); }
.hud .chip {
  display: flex; align-items: center; gap: 5px; flex: none;
  background: var(--panel); border: 1px solid var(--panel-border);
  border-radius: 999px; padding: 6px 12px; font-size: 14.5px; font-weight: 700;
}

/* ── Экраны ── */
.screen { flex: 1; padding: 18px 16px calc(88px + env(safe-area-inset-bottom));
  max-width: 560px; margin: 0 auto; width: 100%; animation: fadein .3s ease; }
/* Верх у всех вкладок один. Свои margin-top у первых элементов разводили
   старт по высоте на 18-36 px, и при переключении вкладки заголовок прыгал
   (замер 14 августа: Дом 11, Салон 18, Практика 22, Задания 36). */
.screen:not(.center) > *:first-child,
.screen:not(.center) > *:first-child > *:first-child { margin-top: 0; }
@keyframes fadein { from { opacity: 0; transform: translateY(8px); } }
/* возврат с полноэкранных экранов вне таббара (карта дня) */
.scr-back { position: absolute; top: calc(8px + env(safe-area-inset-top)); left: 6px;
  z-index: 45; background: none; border: 0; color: rgba(245, 240, 232, .55);
  font-size: 30px; line-height: 1; padding: 6px 14px; cursor: pointer;
  font-family: inherit; }
.screen.center { position: relative; display: flex; flex-direction: column; align-items: center;
  justify-content: center; text-align: center; min-height: 82vh; padding-bottom: 24px; }

h1 { font-family: var(--serif); font-size: 32px; color: var(--gold); font-weight: 700; letter-spacing: .5px; }
h2 { font-family: var(--serif); font-size: 25px; color: var(--gold); font-weight: 700; margin-bottom: 12px; }
.muted { color: var(--gray); }
.small { font-size: 14.5px; }

/* ── Карта ── */
.card-scene { perspective: 1200px; margin: 20px auto; }
.tarot-card {
  width: var(--card-w); aspect-ratio: 3/5; position: relative;
  transform-style: preserve-3d; transition: transform .9s cubic-bezier(.4,.1,.2,1);
  cursor: pointer;
}
.tarot-card.flipped { transform: rotateY(180deg); }
.card-face {
  position: absolute; inset: 0; backface-visibility: hidden;
  border-radius: 16px; border: 1.5px solid var(--gold-dim);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 14px; box-shadow: 0 12px 44px rgba(0,0,0,.55);
}
.card-back {
  background:
    radial-gradient(circle at 50% 36%, rgba(201,168,76,.2), transparent 55%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56'%3E%3Cg fill='none' stroke='%23C9A84C' stroke-opacity='.13'%3E%3Cpath d='M28 8a9 9 0 0 0 0 12 7 7 0 1 1 0-12z'/%3E%3Ccircle cx='28' cy='42' r='1.6' fill='%23C9A84C' fill-opacity='.2' stroke='none'/%3E%3Ccircle cx='6' cy='28' r='1.1' fill='%23C9A84C' fill-opacity='.16' stroke='none'/%3E%3Ccircle cx='50' cy='28' r='1.1' fill='%23C9A84C' fill-opacity='.16' stroke='none'/%3E%3Cpath d='M0 0l4 4M52 52l4 4M56 0l-4 4M4 52l-4 4' stroke-opacity='.09'/%3E%3C/g%3E%3C/svg%3E"),
    linear-gradient(160deg, #1D0A42, #0D0221);
}
.card-back .sigil {
  width: 62%; aspect-ratio: 1; border-radius: 50%;
  border: 1.5px solid var(--gold-dim);
  display: flex; align-items: center; justify-content: center;
  font-size: 46px; color: var(--gold);
  box-shadow: inset 0 0 30px rgba(201,168,76,.15);
}
.card-front {
  transform: rotateY(180deg);
  background: linear-gradient(180deg, #21104A, #0D0221);
  gap: 10px;
}
.card-front .name { font-family: var(--serif); font-size: 26px; font-weight: 700;
  color: var(--gold-bright); text-align: center; line-height: 1.15; }
.card-front .axis { font-size: 14px; color: var(--gray);
  border: 1px solid var(--gold-dim); border-radius: 12px; padding: 3px 13px; }
.card-front .glyph { font-size: 54px; }

.pulse-hint { animation: pulse 2.2s ease-in-out infinite; color: var(--gray); margin-top: 14px; font-size: 15px; }
@keyframes pulse { 50% { opacity: .4; } }

/* ── Кнопки, поля ── */
.btn {
  display: block; width: 100%; padding: 16px; margin-top: 14px;
  background: linear-gradient(180deg, var(--gold-bright), var(--gold-dim));
  color: #14052E; font-family: inherit; font-size: 17.5px; font-weight: 800;
  border: 0; border-radius: 14px; cursor: pointer;
  box-shadow: 0 4px 16px rgba(201,168,76,.28), inset 0 1px 0 rgba(255,255,255,.35);
}
.btn:active { transform: translateY(1px); }
.btn.ghost { background: none; border: 1.5px solid var(--gold-dim); color: var(--gold);
  font-weight: 600; box-shadow: none; }
.btn:disabled { opacity: .5; }
input {
  width: 100%; padding: 15px; margin-top: 10px;
  background: rgba(245,240,232,.07); border: 1.5px solid var(--gold-dim);
  border-radius: 12px; color: var(--white); font-family: inherit; font-size: 18px;
  text-align: center;
}
input::placeholder { color: rgba(169,156,196,.7); }

.reading {
  background: var(--panel); border: 1px solid var(--panel-border);
  border-radius: 16px; padding: 18px; margin: 16px 0; line-height: 1.6;
  text-align: left; white-space: pre-wrap; font-size: 16.5px;
}
.reading .speaker { font-family: var(--serif); color: var(--gold); font-size: 19px; font-weight: 700; }

/* ── Прогресс альбома ── */
.album-strip { margin: 14px 0 4px; width: 100%; }
.album-strip .bar { height: 8px; background: rgba(245,240,232,.13); border-radius: 4px; overflow: hidden; }
.album-strip .fill { height: 100%; background: linear-gradient(90deg, var(--gold-dim), var(--gold-bright));
  border-radius: 4px; transition: width .6s; }
.album-strip .label { font-size: 13.5px; color: var(--gray); margin-top: 6px; text-align: center; }

/* ── Навигация ── */
.tabs {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
  display: flex; background: rgba(13,2,33,.975);
  border-top: 1px solid rgba(201,168,76,.28);
  padding-bottom: max(env(safe-area-inset-bottom), var(--tg-bottom, 0px));
}
.tabs button {
  flex: 1; padding: 11px 0 9px; background: none; border: 0; color: var(--gray);
  font-family: inherit; font-size: 12px; font-weight: 600; cursor: pointer; position: relative;
}
/* width:max-content — иначе scale(1.12) активной вкладки растягивает блок
   во всю ячейку и он вылезает за левый край экрана (аудит UI 2026-08-10) */
.tabs button .ico { display: block; width: max-content; margin: 0 auto 3px;
  font-size: 23px; filter: grayscale(.6) opacity(.7); }
.tabs button .ico svg { width: 23px; height: 23px; display: block; margin: 0 auto; }

/* Иконки Практики: единый линейный набор вместо смеси эмодзи и глифов.
   Цвет — золото строки, у закрытых инструментов гаснет вместе с ней. */
svg.ti { width: 21px; height: 21px; vertical-align: -4px; margin-right: 4px;
  color: var(--gold); flex: none; }
h2 svg.ti { width: 25px; height: 25px; vertical-align: -3px; margin-right: 2px; }
.star-row svg.ti { color: var(--gold-bright); }
.locked-row svg.ti { color: var(--gray); }

/* полка салона: один ряд на настоящей полке */
.salon-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 12px; }
.salon-cell { text-align: center; }
.salon-cell img { height: 52px; width: auto; max-width: 64px; object-fit: contain; }
.salon-cell.locked img { filter: grayscale(1) brightness(.45); opacity: .6; }
.salon-cell i { display: block; font-style: normal; font-size: 10.5px; color: var(--gray); margin-top: 4px; }
.salon-cell:not(.locked) i { color: var(--white); }

/* полка достижений */

/* спрайты декора */
.ico-face img.spr { width: 54px; height: 54px; object-fit: contain; display: block;
  filter: drop-shadow(0 0 9px rgba(240,195,100,.4)); }
.ico-face:has(img.spr) { background: none !important; border: none !important; box-shadow: none !important; }
.cat-face img { width: 110px; height: 110px; object-fit: contain; display: block; margin: 0 auto; }
.cat-face { transition: transform .3s; }
.card-scene { position: relative; }
.tabs button.active { color: var(--gold-bright); }
.tabs button.active .ico { filter: none; transform: scale(1.12); }
.tabs button .dot {
  position: absolute; top: 6px; right: calc(50% - 20px);
  width: 9px; height: 9px; border-radius: 50%; background: #E8626A;
  box-shadow: 0 0 6px rgba(232,98,106,.8);
}

/* ── Колода ── */
.deck-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.deck-grid .mini {
  hyphens: auto; -webkit-hyphens: auto;
  aspect-ratio: 3/5; border-radius: 10px; border: 1px solid rgba(201,168,76,.35);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  font-size: 11px; font-weight: 600; text-align: center; padding: 4px 3px; cursor: pointer;
  background: linear-gradient(160deg, #1D0A42, #0D0221); color: var(--gold-bright);
  line-height: 1.12; overflow: hidden; hyphens: auto; overflow-wrap: break-word;
}
.deck-grid .mini .g { font-size: 21px; }
.deck-grid .mini.locked { color: rgba(169,156,196,.4); border-color: rgba(169,156,196,.16);
  background: rgba(245,240,232,.03); }
.deck-grid .mini.locked .g { opacity: .35; }

/* ── Списки, строки ── */
.row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--panel); border: 1px solid rgba(201,168,76,.24);
  border-radius: 14px; padding: 15px 16px; margin-top: 10px; cursor: pointer;
}
.row .t { flex: 1; font-size: 16px; }
.row.selected { border-color: var(--gold-bright); background: rgba(201,168,76,.13);
  box-shadow: 0 0 0 1px var(--gold-bright); }
.badge { color: var(--gold-bright); font-size: 15px; white-space: nowrap; font-weight: 700; }
.done { color: var(--gray); text-decoration: line-through; }
.stat-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 10px; margin-top: 14px; }
.stat {
  background: var(--panel); border: 1px solid rgba(201,168,76,.24);
  border-radius: 14px; padding: 15px; text-align: center;
}
.stat { display: flex; flex-direction: column; justify-content: center; min-height: 86px; }
.stat .v { font-size: 26px; color: var(--gold-bright); font-weight: 800; line-height: 1.1; }
.stat .k { font-size: 12.5px; color: var(--gray); margin-top: 4px; line-height: 1.25; }

.free-tag { color: var(--gold-bright); font-size: 14px; font-weight: 700; }

.toast {
  position: fixed; top: 14px; left: 50%; transform: translateX(-50%);
  background: rgba(26,10,62,.97); border: 1px solid var(--gold); color: var(--white);
  border-radius: 12px; padding: 12px 18px; z-index: 300; font-size: 15px; font-weight: 600;
  box-shadow: 0 6px 24px rgba(0,0,0,.5); animation: fadein .25s;
  max-width: 92vw; width: max-content; text-align: center; line-height: 1.35;
}

.modal {
  position: fixed; inset: 0; z-index: 60; background: rgba(13,2,33,.88);
  display: flex; align-items: flex-end; justify-content: center;
}
.modal .sheet {
  background: linear-gradient(180deg, #21104A, #12062B); width: 100%; max-width: 560px;
  border-radius: 20px 20px 0 0; border: 1px solid var(--panel-border); border-bottom: 0;
  /* dvh, а не vh: в свёрнутом TMA-вебвью vh считается от развёрнутой высоты */
  padding: 22px 18px calc(22px + env(safe-area-inset-bottom)); max-height: 93dvh; overflow-y: auto;
  animation: sheetup .3s ease;
}
@keyframes sheetup { from { transform: translateY(40px); opacity: 0; } }

/* Переходный экран Салона */
.transition-screen {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; min-height: 60vh; gap: 14px; animation: fadein .5s;
}
.transition-screen .big { font-size: 52px; filter: drop-shadow(0 0 18px rgba(201,168,76,.4)); }

/* ── Дом ── */
/* Дыхание — только transform/opacity: анимация box-shadow/filter заставляла
   вебвью перерисовывать элемент каждый кадр, и при 6–8 таких на главной
   экран рвался (Дима 2026-08-15). Тень статичная, дышит масштаб. */
@keyframes heropulse { 50% { transform: scale(1.04); } }

/* ── Тайлы Дома ── */

.hud-id { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; cursor: pointer; }

.sec-h { font-family: var(--serif); font-size: 19px; color: var(--gray);
  font-weight: 700; margin: 18px 0 2px; }
.locked-row { opacity: .55; }

/* Колода секциями */
.deck-sec { margin-top: 20px; }
.deck-sec-h { display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 8px; }
.deck-sec-h b { font-family: var(--serif); font-size: 19px; color: var(--gold); }
.deck-sec-h i { font-style: normal; font-size: 13px; color: var(--gray); }
.deck-sec.complete .deck-sec-h b { color: var(--gold-bright);
  text-shadow: 0 0 12px rgba(232,201,106,.5); }
.deck-sec.complete .deck-grid { padding: 8px; border-radius: 14px;
  border: 1.5px solid var(--gold-bright);
  background: rgba(201,168,76,.07);
  box-shadow: 0 0 22px rgba(201,168,76,.22), inset 0 0 18px rgba(201,168,76,.08); }
.deck-sec.complete .deck-sec-h i { color: var(--gold-bright); }

/* Ярусные достижения */
.ach-list { display: flex; flex-direction: column; gap: 10px; }
.ach-card { display: flex; align-items: center; gap: 13px;
  background: var(--panel); border: 1px solid rgba(201,168,76,.24);
  border-radius: 14px; padding: 13px 15px; }
.ach-card .ai { font-size: 25px; flex: none; width: 34px; display: flex;
  align-items: center; justify-content: center; }
.ach-card .at { flex: 1; min-width: 0; }
.ach-card .at b { font-size: 15.5px; }
.ach-card .stars { color: var(--gold-bright); font-size: 13px; letter-spacing: 2px; }
.ach-card .stars .off { color: rgba(169,156,196,.35); }
/* Чем набирается трофей — строкой под названием: без неё «Дни подряд» и
   «Уровень» читались одинаковыми полосками (Дима 2026-08-13, B4) */
.ach-card .ach-how { margin-top: 2px; line-height: 1.3; }
.ach-card .ach-bar { height: 5px; border-radius: 3px; background: rgba(245,240,232,.12);
  margin-top: 6px; overflow: hidden; }
.ach-card .ach-bar i { display: block; height: 100%; border-radius: 3px;
  background: linear-gradient(90deg, var(--gold-dim), var(--gold-bright)); }
.ach-card .an { flex: none; text-align: right; font-size: 12px; color: var(--gray);
  min-width: 46px; }

/* Кот */
.cat-hero { display: flex; flex-direction: column; align-items: center;
  gap: 6px; margin: 18px 0 8px; }
.cat-face {
  width: 150px; height: 150px; border-radius: 50%;
  border: 2px solid var(--gold-dim);
  background:
    radial-gradient(circle at 36% 32%, rgba(255,255,255,.08), transparent 50%),
    linear-gradient(160deg, #241052, #0D0221);
  display: flex; align-items: center; justify-content: center;
  font-size: 76px; cursor: pointer; user-select: none;
  box-shadow: 0 0 34px rgba(201,168,76,.25);
  transition: transform .15s;
}
.cat-face:active { transform: scale(.94); }
.cat-name-h { font-family: var(--serif); font-size: 27px; color: var(--gold-bright);
  font-weight: 700; }

/* Сеты колоды */

/* Старший аркан — особое сияние */
.nc-card.major { border-width: 2.5px;
  box-shadow: 0 0 70px rgba(232,201,106,.65), inset 0 0 30px rgba(201,168,76,.25);
  animation: ncReveal .9s cubic-bezier(.2,.9,.3,1.2), majorPulse 2.2s ease-in-out 1s infinite; }
@keyframes majorPulse { 50% { box-shadow: 0 0 100px rgba(232,201,106,.85), inset 0 0 34px rgba(201,168,76,.3); } }

/* Медальоны клиентов */
.medal {
  width: 46px; height: 46px; border-radius: 50%; flex: none;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-size: 21px; font-weight: 700;
  color: var(--gold-bright);
  background:
    radial-gradient(circle at 35% 30%, rgba(255,255,255,.09), transparent 55%),
    linear-gradient(160deg, #241052, #12062B);
  border: 1.5px solid var(--medal-hue, var(--gold-dim));
  box-shadow: 0 0 10px color-mix(in srgb, var(--medal-hue, #A08237) 35%, transparent);
  position: relative; overflow: hidden;
}
/* фотка гостя, если она есть: ложится поверх буквы, буква — фолбэк */
.medal-photo { position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; border-radius: 50%; }
.row.with-medal { align-items: center; }

/* Веер карт: один на всю игру — и в салоне, и у быстрого гостя.
   Рубашки настоящие (арт колоды), карты раздаются по одной. */
/* Веер в истории крупнее (Дима 2026-08-14: «в историях увеличь веер и
   синхронизируй красиво анимацию открытия»): рубашки были 64-88 px и на
   телефоне читались горстью марок, а расклад — главное движение главы. */
.fan { display: flex; justify-content: center; margin: 14px 0 2px;
  padding: 20px 0 30px; max-width: 100%; perspective: 900px; }
.fan-card {
  width: clamp(86px, 25.5vw, 116px); height: auto; aspect-ratio: 88/148;
  border-radius: 13px; margin: 0 -15px; overflow: hidden;
  border: 1.5px solid var(--gold-dim); cursor: pointer;
  transform: rotate(var(--rot)); transform-origin: bottom center;
  /* рубашка одна на всю игру — та же, что в Коллекции и на карте дня
     (Дима 2026-08-12: «вернуть рубашки как в коллекции»). Арт-рубашки
     back1-3.webp сняты: три разных узора в одном веере рябили, и при
     раскрытии узор всё равно подменялся. */
  background:
    radial-gradient(circle at 50% 36%, rgba(201,168,76,.2), transparent 55%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56'%3E%3Cg fill='none' stroke='%23C9A84C' stroke-opacity='.13'%3E%3Cpath d='M28 8a9 9 0 0 0 0 12 7 7 0 1 1 0-12z'/%3E%3Ccircle cx='28' cy='42' r='1.6' fill='%23C9A84C' fill-opacity='.2' stroke='none'/%3E%3Ccircle cx='6' cy='28' r='1.1' fill='%23C9A84C' fill-opacity='.16' stroke='none'/%3E%3Ccircle cx='50' cy='28' r='1.1' fill='%23C9A84C' fill-opacity='.16' stroke='none'/%3E%3Cpath d='M0 0l4 4M52 52l4 4M56 0l-4 4M4 52l-4 4' stroke-opacity='.09'/%3E%3C/g%3E%3C/svg%3E"),
    linear-gradient(160deg, #1D0A42, #0D0221);
  background-size: auto, 34px 34px, auto;
  display: flex; align-items: center; justify-content: center;
  transition: transform .35s, opacity .4s, box-shadow .3s;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .45);
}
/* сигил веера — тот же круг с луной, что на крупной рубашке, только мельче:
   при раскрытии он просто вырастает вместе с картой */
.fan-card .fan-sigil {
  width: 54%; aspect-ratio: 1; border-radius: 50%;
  border: 1px solid rgba(201, 168, 76, .45);
  display: flex; align-items: center; justify-content: center;
  font-size: 23px; color: rgba(201, 168, 76, .8);
  box-shadow: inset 0 0 14px rgba(201, 168, 76, .12);
}
/* раздача: карта прилетает из колоды и ложится на своё место в веере */
.fan-card.deal { animation: dealIn .5s cubic-bezier(.2, .9, .25, 1) both;
  animation-delay: var(--deal, 0ms); }
@keyframes dealIn {
  from { transform: translateY(38px) rotate(0deg) scale(.86); opacity: 0; }
  to   { transform: rotate(var(--rot)) translateY(0) scale(1); opacity: 1; }
}
.fan-card:active { transform: rotate(var(--rot)) translateY(-10px) scale(1.02); }
.fan-card.fade { opacity: 0; pointer-events: none; transform: rotate(var(--rot)) translateY(14px) scale(.9); }
/* выбранная только выравнивается и подсвечивается: расти она будет уже
   в раскрытии, одним движением, а не рывком на 1.4 и потом ещё раз */
.fan-card.chosen {
  transform: rotate(0) translateY(-14px) scale(1.06); z-index: 5;
  transition: transform .26s cubic-bezier(.3,.8,.3,1), box-shadow .26s;
  border-color: var(--gold-bright);
  box-shadow: 0 0 34px rgba(232, 201, 106, .5);
}
@keyframes pickPulse {
  0%   { box-shadow: 0 0 0 rgba(232, 201, 106, 0); }
  40%  { box-shadow: 0 0 52px rgba(232, 201, 106, .75); }
  100% { box-shadow: 0 0 38px rgba(232, 201, 106, .55); }
}
.fan-face { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 6px; }
.fan-face .fn { font-family: var(--serif); font-size: 12.5px; font-weight: 700;
  color: var(--gold-bright); text-align: center; line-height: 1.1; }

/* Празднование новой карты */
/* фон празднования непрозрачный: сквозь него не должно читаться ничего —
   ни экран под ним, ни соседнее празднование (фидбек 2026-08-10) */
.modal.celebrate { align-items: center;
  background: radial-gradient(circle at 50% 34%, #1C0B41, #0D0221 72%), #0D0221; }
.new-card-wrap { display: flex; flex-direction: column; align-items: center;
  gap: 14px; padding: 24px; animation: fadein .3s; }
.nc-label { color: var(--gray); font-size: 15px; letter-spacing: 2px;
  text-transform: uppercase; }
.nc-card {
  width: min(56vw, 210px); aspect-ratio: 3/5; border-radius: 16px;
  border: 1.5px solid var(--gold); display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 10px; padding: 14px;
  background: linear-gradient(180deg, #21104A, #0D0221);
  animation: ncReveal .8s cubic-bezier(.2,.9,.3,1.2);
  box-shadow: 0 0 40px rgba(201,168,76,.4);
}
@keyframes ncReveal {
  0% { transform: rotateY(90deg) scale(.7); opacity: 0; }
  60% { transform: rotateY(-12deg) scale(1.05); opacity: 1; }
  100% { transform: rotateY(0) scale(1); }
}
.nc-card .glyph { font-size: 48px; }
.nc-card .name { font-family: var(--serif); font-size: 23px; font-weight: 700;
  color: var(--gold-bright); text-align: center; line-height: 1.15; }
.nc-card .axis { font-size: 13px; color: var(--gray);
  border: 1px solid var(--gold-dim); border-radius: 12px; padding: 2px 12px; }

/* Рубашки в колоде */
.deck-grid .mini.back {
  background:
    radial-gradient(circle at 50% 38%, rgba(201,168,76,.14), transparent 60%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56'%3E%3Cg fill='none' stroke='%23C9A84C' stroke-opacity='.13'%3E%3Cpath d='M28 8a9 9 0 0 0 0 12 7 7 0 1 1 0-12z'/%3E%3Ccircle cx='28' cy='42' r='1.6' fill='%23C9A84C' fill-opacity='.2' stroke='none'/%3E%3Ccircle cx='6' cy='28' r='1.1' fill='%23C9A84C' fill-opacity='.16' stroke='none'/%3E%3Ccircle cx='50' cy='28' r='1.1' fill='%23C9A84C' fill-opacity='.16' stroke='none'/%3E%3Cpath d='M0 0l4 4M52 52l4 4M56 0l-4 4M4 52l-4 4' stroke-opacity='.09'/%3E%3C/g%3E%3C/svg%3E"),
    linear-gradient(160deg, #1D0A42, #0D0221);
  border-color: rgba(201,168,76,.22); cursor: default;
}
.deck-grid .mini.back .back-sigil {
  width: 58%; aspect-ratio: 1; border-radius: 50%;
  border: 1px solid rgba(201,168,76,.4);
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; color: rgba(201,168,76,.55);
}

/* ── Профиль ── */
.profile-head { display: flex; align-items: center; gap: 16px; padding: 4px 2px; }
.profile-head > div:last-child { flex: 1; min-width: 0; }
.profile-head h2 { font-size: 23px; line-height: 1.2; }
.profile-head p { margin-top: 2px; }
.ava.big { width: 64px; height: 64px; font-size: 30px; border-width: 2px; flex: none; }
.row .t .muted.small { display: inline-block; }
.row > span { flex: none; white-space: nowrap; }
.ach {
  aspect-ratio: 1; border-radius: 13px; border: 1px solid var(--panel-border);
  background: var(--panel); display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 3px; padding: 4px; text-align: center;
}
.ach span { font-size: 21px; }
.ach i { font-style: normal; font-size: 9.5px; color: var(--gray); line-height: 1.15; }
.ach.locked { opacity: .35; filter: grayscale(1); }

.level-orb {
  width: 96px; height: 96px; border-radius: 50%;
  border: 2.5px solid var(--gold); display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-size: 44px; font-weight: 700; color: var(--gold-bright);
  box-shadow: 0 0 44px rgba(201,168,76,.5), inset 0 0 24px rgba(201,168,76,.2);
  animation: ncReveal .8s cubic-bezier(.2,.9,.3,1.2);
}

/* Кнопка-цена: покупаемое видно сразу */
/* тап-зона >= 40px: было 92x34 (аудит UI 2026-08-10) */
.price-btn {
  flex: none; padding: 9px 14px; border: 0; border-radius: 11px;
  min-width: 92px; min-height: 40px; text-align: center;
  background: linear-gradient(180deg, var(--gold-bright), var(--gold-dim));
  color: #14052E; font-family: inherit; font-size: 14px; font-weight: 800;
  cursor: pointer; white-space: nowrap;
  box-shadow: 0 3px 10px rgba(201,168,76,.3), inset 0 1px 0 rgba(255,255,255,.35);
}
.price-btn:active { transform: translateY(1px); }

/* Задания: «забрать» и «сделать» различимы цветом, не только словом
   (Дима 2026-08-10) — золотое горит и зовёт, серое ждёт действия. */
.claim-btn {
  background: linear-gradient(180deg, #FFE79A, var(--gold-bright));
  animation: claimPulse 2.2s ease-in-out infinite;
}
@keyframes claimPulse { 50% { transform: scale(1.03); } }
.claim-btn { box-shadow: 0 3px 14px rgba(255,231,154,.45), inset 0 1px 0 rgba(255,255,255,.4); }
.do-btn {
  background: rgba(169,156,196,.16); color: var(--white);
  border: 1px solid rgba(169,156,196,.5);
  box-shadow: none; font-weight: 700;
}

/* Поводы поделиться — плитками в ряд, а не стопкой одинаковых кнопок */
.share-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.share-tile {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 12px 6px; border-radius: 14px; cursor: pointer; text-align: center;
  background: rgba(245,240,232,.05); border: 1px solid rgba(201,168,76,.3);
  color: var(--gold-bright);
}
.share-tile:active { transform: translateY(1px); }
/* подписи в две строки не должны делать плитки разной высоты */
.share-tile i { font-style: normal; font-size: 11.5px; color: var(--gray); line-height: 1.25;
  min-height: 2.5em; display: flex; align-items: center; justify-content: center; }
.share-tile svg { width: 24px; height: 24px; }

/* Три кресла салона: занятость строкой значков, без служебных подписей */
.seat-line { display: flex; align-items: center; gap: 7px; margin: 0 0 12px; }
.seat {
  width: 16px; height: 16px; border-radius: 5px; flex: none;
  border: 1px solid rgba(201,168,76,.45); background: rgba(255,255,255,.05);
}
.seat-busy {
  background: linear-gradient(180deg, var(--gold-bright), var(--gold-dim));
  box-shadow: 0 0 10px rgba(232,201,106,.45);
}
.seat-cap { font-size: 13px; color: var(--gray); margin-left: 2px; }

/* Аура: пассивное накопление */
@keyframes auraBreath { 50% { transform: scale(1.07); box-shadow: 0 0 26px rgba(201,168,76,.4); } }

/* Типографские знаки карт */
.mark { font-family: var(--serif); font-weight: 700; letter-spacing: .5px; }
.deck-grid .mini .g.mark { font-size: 17px; color: var(--gold-bright); }
.card-front .glyph.mark { font-size: 44px; color: var(--gold-bright); }
.nc-card .glyph.mark { font-size: 40px; color: var(--gold-bright); }

/* Звёздный бёрст при празднованиях */
.nc-card { position: relative; }
.burst { position: absolute; inset: 0; pointer-events: none; }
.burst i { position: absolute; left: 50%; top: 50%; width: 5px; height: 5px;
  border-radius: 50%; background: var(--gold-bright);
  animation: burstFly 1s ease-out forwards; opacity: 0; }
.burst i:nth-child(1) { --bx: -90px; --by: -110px; animation-delay: .15s; }
.burst i:nth-child(2) { --bx: 90px; --by: -100px; animation-delay: .2s; }
.burst i:nth-child(3) { --bx: -120px; --by: 10px; animation-delay: .25s; }
.burst i:nth-child(4) { --bx: 120px; --by: 0; animation-delay: .18s; }
.burst i:nth-child(5) { --bx: -70px; --by: 120px; animation-delay: .3s; }
.burst i:nth-child(6) { --bx: 80px; --by: 115px; animation-delay: .22s; }
.burst i:nth-child(7) { --bx: 0; --by: -140px; animation-delay: .28s; }
.burst i:nth-child(8) { --bx: 0; --by: 140px; animation-delay: .35s; }
.burst i:nth-child(9) { --bx: -140px; --by: -50px; animation-delay: .32s; }
.burst i:nth-child(10) { --bx: 140px; --by: -55px; animation-delay: .26s; }
@keyframes burstFly {
  0% { transform: translate(0, 0) scale(1); opacity: 1; }
  100% { transform: translate(var(--bx), var(--by)) scale(.2); opacity: 0; }
}

/* Красота в деталях (фидбек 2026-08-09): дыхание CTA, контур активного таба,
   отклик нажатия на строках — мелочи, из которых складывается ощущение */
@keyframes ctaBreath { 50% { transform: scale(1.015); } }
.tabs button { transition: color .2s; }
.tabs button.active::before { content: ''; position: absolute; top: -1px; left: 22%;
  right: 22%; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--gold-bright), transparent);
  box-shadow: 0 0 8px rgba(232, 201, 106, .7); }
.row { transition: transform .1s, border-color .15s; }
.row:active { transform: scale(.985); }
.price-btn, .btn { transition: transform .1s, filter .15s; }
.price-btn:active { filter: brightness(1.1); }

/* Обучение на входе: дырка в затемнении + пузырь */
.tour-ov { position: fixed; inset: 0; z-index: 120; }
.tour-hole { position: absolute; border-radius: 14px; pointer-events: none;
  box-shadow: 0 0 0 9999px rgba(13, 2, 33, .84), 0 0 18px rgba(232, 201, 106, .5);
  border: 1.5px solid var(--gold-bright); transition: all .35s ease; }
.tour-bubble { position: absolute; left: 16px; right: 16px; max-width: 400px;
  margin: 0 auto; background: linear-gradient(180deg, #21104A, #12062B);
  border: 1px solid var(--panel-border); border-radius: 14px; padding: 14px 16px;
  box-shadow: 0 10px 34px rgba(0, 0, 0, .5); animation: fadein .3s; }

/* Точки «непросмотрено»: инлайновая в списках и свежая карта в колоде */
.dot-inline { display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: #E8626A; box-shadow: 0 0 6px rgba(232,98,106,.8); vertical-align: 1px; }
/* глубина ячейки: карта возвращалась — рамка и свечение растут */
.deck-grid .mini { position: relative; }
.deck-grid .mini.depth-2 { border-color: rgba(232,201,106,.6);
  box-shadow: 0 0 8px rgba(201,168,76,.25); }
.deck-grid .mini.depth-3 { border-width: 2px; border-color: var(--gold-bright);
  box-shadow: 0 0 14px rgba(232,201,106,.45), inset 0 0 10px rgba(201,168,76,.12); }
.depth-pip { position: absolute; bottom: 3px; right: 5px; font-size: 9px;
  color: var(--gold-bright); letter-spacing: 1px; }

.deck-grid .mini.fresh { position: relative; border-color: var(--gold-bright);
  box-shadow: 0 0 10px rgba(232,201,106,.35); }
.deck-grid .mini.fresh::after { content: ''; position: absolute; top: 5px; right: 5px;
  width: 8px; height: 8px; border-radius: 50%; background: #E8626A;
  box-shadow: 0 0 6px rgba(232,98,106,.8); }

/* Строгий запрет горизонтального скролла */
.screen, .modal .sheet { overflow-x: hidden; }
.row .t { min-width: 0; overflow-wrap: break-word; }

.deck-grid .mini.back.skin-golden {
  background:
    radial-gradient(circle at 50% 38%, rgba(232,201,106,.22), transparent 60%),
    linear-gradient(160deg, #2E2008, #14090A);
  border-color: rgba(232,201,106,.5);
}
.deck-grid .mini.back.skin-golden .back-sigil { color: rgba(232,201,106,.8);
  border-color: rgba(232,201,106,.55); }

/* Дом-сцена: центр + колонки иконок */
.scene { display: flex; gap: 8px; margin-top: 6px; align-items: stretch; }
.scene-center { flex: 1; text-align: center; min-width: 0; }
.scene-col { display: flex; flex-direction: column; gap: 14px; justify-content: center;
  width: 64px; flex: none; }
.ico-btn { display: flex; flex-direction: column; align-items: center; gap: 3px;
  cursor: pointer; position: relative; }
.ico-btn .ico-face {
  width: 54px; height: 54px; border-radius: 50%;
  border: 1.5px solid var(--gold-dim);
  background: var(--panel);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; color: var(--gold-bright);
  transition: transform .12s;
}
.ico-btn:active .ico-face { transform: scale(.92); }
.ico-btn i { font-style: normal; font-size: 11px; color: var(--gray);
  max-width: 64px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* подпись в две строки — там, где иконка обязана объяснить себя без тапа
   (аура: сколько накопила и через сколько полная) */
.ico-btn i.ico-cap2 { white-space: normal; max-width: 76px; line-height: 1.25;
  text-align: center; text-overflow: clip; }
.ico-btn.alert .ico-face { border-color: var(--gold-bright);
  box-shadow: 0 0 14px rgba(232,201,106,.4); animation: heropulse 2.4s infinite; }
/* базовое правило — точка одна на весь апп: иконки главной, конверты в
   ящике, ячейки салона. Раньше размер и цвет жили только у `.ico-btn`, и на
   конвертах бейдж стоял в DOM, но был невидим (Дима 2026-08-15: «письма не
   подсвечиваются») */
.ico-badge { position: absolute; width: 10px; height: 10px; border-radius: 50%;
  background: #E8626A; box-shadow: 0 0 6px rgba(232,98,106,.8); }
.ico-btn .ico-badge { top: -2px; right: 4px; }
/* Два смысла точки (Дима 2026-08-14): красная — надо сделать, жёлтая — есть
   что посмотреть. Раньше колода звала красным «срочно», хотя там просто
   лежала новая карта, а кот держал красную даже после того, как его погладили */
/* ⚠ Селектор с той же специфичностью, что и у правил выше: `.tabs button .dot`
   и `.ico-btn .ico-badge` перебивали одиночный класс, и «жёлтая» точка
   оставалась красной — сам класс стоял, а цвет не менялся (14 августа). */
.tabs button .dot.look, .ico-btn .ico-badge.look {
  background: #E8C96A; box-shadow: 0 0 6px rgba(232,201,106,.75); }
/* Аура наполняется на глазах: кольцо вокруг иконки растёт по мере накопления
   (Дима 2026-08-10 — «чтобы была заполнена, а не как сейчас») */
.aura-ring { position: relative; }
.aura-ring::before {
  content: ''; position: absolute; inset: -4px; border-radius: 50%;
  background: conic-gradient(from -90deg, var(--gold-bright) var(--fill, 0%),
              rgba(255,255,255,.09) 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3.5px), #000 0);
          mask: radial-gradient(farthest-side, transparent calc(100% - 3.5px), #000 0);
  pointer-events: none;
}
.ico-face.medal-face { background: none; border: 0; }
.ico-face.medal-face .medal { width: 54px; height: 54px; }
.scene-card { width: min(46vw, 175px); margin: 0 auto; }

/* Скин рубашки «Лунная» — награда за первую подругу */
.deck-grid .mini.back.skin-lunar {
  background:
    radial-gradient(circle at 50% 38%, rgba(160,190,255,.18), transparent 60%),
    linear-gradient(160deg, #17204E, #0A0E2B);
  border-color: rgba(170,190,255,.35);
}
.deck-grid .mini.back.skin-lunar .back-sigil { color: rgba(185,200,255,.65);
  border-color: rgba(170,190,255,.4); }

.starfield { position: fixed; inset: 0; pointer-events: none; z-index: -1; }
.starfield span { position: absolute; width: 2px; height: 2px; border-radius: 50%;
  background: rgba(245,240,232,.7); animation: pulse 3s ease-in-out infinite; }

/* спрайтовые иконки Дома: число ауры и alert-свечение */
.ico-btn .ico-face { position: relative; }
.spr-num { position: absolute; right: -4px; bottom: 0; min-width: 20px; height: 20px;
  padding: 0 5px; border-radius: 10px; background: var(--bg-deep, #1a1036);
  border: 1px solid var(--gold, #c9a84c); color: var(--gold-bright, #ecd695);
  font: 800 12px/18px var(--serif, serif); text-align: center; font-style: normal; }
.ico-btn.alert img.spr { filter: drop-shadow(0 0 7px rgba(236, 214, 149, .8)); }

/* трофеи с артом */

/* контекстная карточка Салона (blueprint §8.4) */

/* веер быстрого приёма */

/* D0: полумрак нового салона и экран двери */
.scene--dim { filter: brightness(.72) saturate(.85); transition: filter .8s ease; }
.d0-door { min-height: 60vh; display: flex; flex-direction: column; align-items: center;
  justify-content: center; text-align: center; gap: 10px; padding: 24px; }
.d0-door h2 { font-family: var(--serif); color: var(--gold-bright, #ecd695); }
.d0-door .btn { margin-top: 16px; min-width: 200px; }

/* full-screen narrative layer (§149): игрок внутри сцены */
.narrative { position: fixed; inset: 0; z-index: 60; overflow-y: auto;
  background: linear-gradient(180deg, #120826, #1d0f3d 60%, #170b31);
  padding: 26px 18px 32px; animation: narIn .35s ease; }
@keyframes narIn { from { opacity: 0; transform: translateY(12px); } }
.nar-body { max-width: 520px; margin: 0 auto; display: flex;
  flex-direction: column; gap: 12px; }
.nar-head { display: flex; flex-direction: column; align-items: center; gap: 8px;
  margin-bottom: 4px; }
.nar-head b { font-family: var(--serif); font-size: 20px;
  color: var(--gold-bright, #ecd695); }
.nar-head .medal { width: 72px; height: 72px; font-size: 28px; }
/* шаги с малым текстом (рассказ, ожидание) — сцена по центру экрана */
.narrative.nar-center .nar-body { min-height: calc(100dvh - 58px);
  justify-content: center; }

/* шаг рассказа: лицо гостя крупно, тема — чипом под именем */
.nar-head-big .medal { width: clamp(96px, 30vw, 122px); height: clamp(96px, 30vw, 122px);
  font-size: 44px; box-shadow: 0 0 26px rgba(201, 168, 76, .3); }
.nar-head-big b { font-size: 23px; }
.theme-chip { display: inline-flex; align-items: center; padding: 4px 12px;
  border-radius: 999px; border: 1px solid rgba(201, 168, 76, .5);
  background: rgba(201, 168, 76, .1); color: var(--gold-bright, #ecd695);
  font-size: 12.5px; font-weight: 700; letter-spacing: .2px; max-width: 100%; }

/* экран ожидания исхода: таймер крупно и живая сцена вместо пустоты */
.q-wait { display: flex; flex-direction: column; align-items: center; gap: 4px;
  margin-top: 10px; text-align: center; }
.q-wait-art { display: flex; align-items: flex-end; justify-content: center;
  gap: 14px; height: clamp(84px, 26vw, 108px); }
.q-wait-art img { object-fit: contain; }
.qw-candle { height: 100%; width: auto;
  filter: drop-shadow(0 0 16px rgba(236, 214, 149, .45));
  animation: qwFlicker 3.4s ease-in-out infinite; transform-origin: bottom center;
  filter: drop-shadow(0 0 16px rgba(236, 214, 149, .45)); }
.qw-cat { height: 66%; width: auto; opacity: .9;
  animation: qwBreathe 4.6s ease-in-out infinite; transform-origin: bottom center; }
@keyframes qwFlicker {
  0%, 100% { opacity: .9; transform: scale(1); }
  40% { opacity: 1; transform: scale(1.015); }
  70% { opacity: .86; transform: scale(.995); }
}
@keyframes qwBreathe { 50% { transform: scale(1.04) translateY(-1px); } }
.q-wait-clock { font-family: var(--serif); font-size: clamp(34px, 11vw, 44px);
  font-weight: 700; color: var(--gold-bright, #ecd695); line-height: 1.1;
  margin-top: 6px; font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: reduce) {
  .qw-candle, .qw-cat, .scene-flicker img.spr, #i-cat img.spr, .cat-face img,
  .beacon .ico-face, .beacon .medal, .beacon-btn, .shelf-gift.claim,
  .claim-btn, .ico-btn.alert .ico-face { animation: none; }
}

.nar-bubble { background: rgba(245, 240, 232, .07);
  border: 1px solid rgba(201, 168, 76, .3); border-radius: 16px 16px 16px 4px;
  padding: 14px 16px; line-height: 1.55; }
.nar-close { position: absolute; top: 14px; left: 12px; background: none;
  border: none; color: rgba(245, 240, 232, .5); font-size: 30px; line-height: 1;
  padding: 6px 12px; cursor: pointer; }
/* веер быстрого гостя внутри нарратива больше не ужимается до 56×84:
   размер и рубашка теперь общие с веером сюжетной сцены */

/* вторичные события — объекты сцены мягко мерцают (§147) */
.scene-flicker img.spr { animation: flicker 2.6s ease-in-out infinite; }
@keyframes flicker { 0%, 100% { opacity: .78; } 50% { opacity: 1; } }
.scene-flicker img.spr { filter: drop-shadow(0 0 8px rgba(236, 214, 149, .6)); }

/* реплика кота: пузырь ПОД котом, в сцену — не поверх текстов */
/* пузырь висит на .ico-btn шириной 56px: без width:max-content абсолютный блок
   ужимается до этих 56px и текст сыплется по слову в строку (аудит UI 2026-08-10) */
.cat-say { position: absolute; right: -4px; top: calc(100% + 6px);
  width: max-content; max-width: min(170px, 46vw); background: rgba(20, 10, 42, .96);
  border: 1px solid rgba(201, 168, 76, .5); border-radius: 12px 4px 12px 12px;
  padding: 8px 10px; font-size: 12px; line-height: 1.4; z-index: 5;
  animation: narIn .4s ease; transition: opacity .5s; }
.cat-say.gone { opacity: 0; }
.ico-btn { position: relative; }

/* Салон: TMA-native вёрстка. Каркас: body(flex, высота от --tg-viewport-stable-height)
   → .screen(flex:1) → на главной .screen--home раскладывает колонкой, сцена
   растёт и заполняет свободное место, CTA/задания прижимаются к низу.
   Обрезаний нет в принципе: без overflow:hidden; мало места (свёрнутый
   вебвью) — честный скролл. */
/* Fluid-калибровка: размеры сцены считаются от живой высоты вьюпорта
   (Telegram сам обновляет переменную), а не от брейкпоинтов — гармонично
   на любом соотношении от квадрата до вытянутого. Скролл появляется только
   когда clamp упёрся в минимумы и элементы иначе наложились бы. */
:root { --vph: var(--tg-viewport-stable-height, 100dvh); }
.screen--home { display: flex; flex-direction: column;
  padding-top: clamp(4px, calc(var(--vph) * 0.014), 14px);
  padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
.screen--home .scene { flex: 1 0 auto; align-items: center; margin-top: 0;
  min-height: 160px; justify-content: center; }
/* высота карты: доля вьюпорта, но не шире центра сцены (колонки 64px + зазоры) */
.screen--home { --scene-card-h: clamp(150px, min(calc(var(--vph) * 0.36), calc((100vw - 196px) * 1.66)), 360px); }
.screen--home #home-cta { margin-top: auto; }
#home-cta .btn { display: block; width: 100%; margin-top: 12px;
  animation: ctaBreath 3s ease-in-out infinite; }

/* XP-бар уровня в шапке (референс Boinkers: прогресс всегда на виду) */
.xp-bar { width: 110px; height: 4px; border-radius: 2px; margin-top: 4px;
  background: rgba(245, 240, 232, .15); }
.xp-bar i { display: block; height: 100%; border-radius: 2px;
  background: linear-gradient(90deg, var(--gold), var(--gold-bright)); }

/* полка статусов под картой: дела-бар с наградой, колода, возвраты с таймерами */
.shelf { display: flex; gap: 8px; align-items: center; margin-top: 10px; }
.shelf-pill { display: flex; align-items: center; gap: 8px; padding: 8px 12px;
  border-radius: 999px; background: var(--panel);
  border: 1px solid rgba(201, 168, 76, .3); cursor: pointer;
  font-size: 13px; font-weight: 700; }
.shelf-pill img.spr { width: 22px; height: 22px; flex: none; object-fit: contain; }
.shelf-track { flex: 1; height: 7px; border-radius: 4px; min-width: 40px;
  background: rgba(245, 240, 232, .13); }
.shelf-track i { display: block; height: 100%; border-radius: 4px;
  background: linear-gradient(90deg, var(--gold), var(--gold-bright)); }
.shelf-gift { flex: none; width: 22px; height: 22px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px; line-height: 1; color: var(--gold-bright); }
.shelf-gift.got { color: #9ed69a; }
.shelf-medal { display: flex; flex-direction: column; align-items: center; gap: 2px;
  cursor: pointer; flex: none; }
.shelf-medal .medal { width: 34px; height: 34px; font-size: 15px; }
.shelf-medal i { font-style: normal; font-size: 10.5px; color: var(--gray); }
.scene .card-scene { margin: 4px auto; height: var(--scene-card-h); }
.scene .scene-card { width: auto; height: var(--scene-card-h);
  aspect-ratio: 3/5; }
/* сцена-карта узкая: длинные имена («Справедливость») не должны вылезать */
.scene-card .card-front { padding: 8px 6px; }
.scene-card .card-front .name { font-size: clamp(14px, calc(var(--vph) * 0.027), 22px);
  hyphens: auto; overflow-wrap: break-word; max-width: 100%; }
.scene-card .card-front .glyph { font-size: clamp(28px, calc(var(--vph) * 0.062), 54px); }
.scene-card .card-front .glyph.mark { font-size: clamp(26px, calc(var(--vph) * 0.055), 48px); }
.scene-card .card-front .axis { font-size: 12px; padding: 2px 10px; }

/* стрик — огонёк на самой карте, не текстовой строкой (фидбек 2026-08-09) */
.streak-pip { position: absolute; top: 8px; right: 8px; z-index: 2;
  padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 700;
  background: rgba(20, 10, 42, .85); border: 1px solid var(--gold-dim);
  color: var(--gold-bright); display: inline-flex; align-items: center; gap: 2px; }
.streak-pip svg.ti { width: 13px; height: 13px; margin: 0; vertical-align: 0;
  color: var(--gold-bright); }
/* иконки в строках профиля и в заголовках шитов — один вес и один размер */
.row .t > svg.ti { color: var(--gold); }
.badge svg.ti { width: 17px; height: 17px; margin: 0; vertical-align: -3px; }

/* главное действие сцены: переливающаяся обводка вместо текстовой CTA-карточки */
@keyframes beaconHue {
  0%   { border-color: #ecd695; }
  33%  { border-color: #a8c7fa; }
  66%  { border-color: #d699ec; }
  100% { border-color: #ecd695; }
}
.beacon .ico-face, .beacon .medal, .tarot-card.beacon .card-face, .beacon-btn, .shelf-gift.claim {
  box-shadow: 0 0 13px 2px rgba(236, 214, 149, .5); }
.beacon .ico-face, .beacon .medal, .tarot-card.beacon .card-face {
  animation: beaconHue 2.8s linear infinite; }

/* звёздный ярус Практики */
.star-row { border-color: rgba(201, 168, 76, .65);
  background: linear-gradient(160deg, rgba(201, 168, 76, .10), rgba(245, 240, 232, .03)); }
/* купленное больше не продаётся: та же кнопка, но спокойная — статус, не ценник */
.price-btn.owned-btn { background: none; color: var(--gold-bright, #ecd695);
  border: 1.5px solid rgba(201, 168, 76, .55); box-shadow: none;
  font-weight: 700; font-size: 13px; }
/* тотем — единственный бесплатный в лунном ярусе: спокойная метка вместо
   ценника, чтобы читалось как вход, а не как скидка */
.price-btn.free-btn { background: none; color: var(--gray);
  border: 1.5px solid rgba(245, 240, 232, .28); box-shadow: none;
  font-weight: 600; font-size: 13px; }
/* бесплатный ярус внизу: ниже ростом, чтобы не спорить с платным */
.pr-compact .row { padding: 9px 12px; margin-top: 6px; }
.pr-compact .row .t { font-size: 14.5px; }
.pr-compact .row .price-btn, .pr-compact .row .badge { min-height: 34px; }

/* атмосферный фон салона: единый дизайн (выбор тем снят — зона ответственности наша).
   Картинка на fixed-слое (background-attachment:fixed сломан в iOS-вебвью),
   градиент поверх сводит нижний край арта в тон — без «шва» на высоких экранах. */
body { background: #100722; }
body::before { content: ''; position: fixed; inset: 0; pointer-events: none; z-index: -1;
  background:
    linear-gradient(180deg, rgba(16, 7, 34, .55), rgba(16, 7, 34, .35) 34%,
      rgba(16, 7, 34, .82) 58%, #100722 72%),
    url('img/bg-salon.webp') center top / cover no-repeat; }

/* свой совет: текстовый вход в нарративе */
.own-box textarea { width: 100%; margin-top: 10px; padding: 12px;
  background: rgba(245,240,232,.07); border: 1.5px solid var(--gold-dim);
  border-radius: 12px; color: var(--white); font-family: inherit; font-size: 15.5px;
  resize: none; }
.own-box textarea::placeholder { color: rgba(169,156,196,.7); }
.q-own-buy { border-style: dashed; line-height: 1.3; }

/* небо дня — компактный чип вместо текстовых строк (референсы 2026-08-09) */
.astro-chip { display: inline-flex; align-items: center; gap: 6px; margin: 0 auto 2px;
  padding: 5px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 600;
  background: var(--panel); border: 1px solid rgba(201,168,76,.3); cursor: pointer;
  color: var(--white); }
.astro-chip .crescent { color: var(--gold-bright); }

/* тизер платной главы: затравка + размытый абзац (Nebula-паттерн) */
.natal-tease { padding: 4px 14px 10px; margin: -6px 0 6px; }
.tease-blur { filter: blur(5px); user-select: none; font-size: 12.5px;
  color: var(--gray, #8b7da8); margin-top: 4px; }

/* узкие экраны (320): пять подписей таббара впритык — сжимаем кегль */
@media (max-width: 340px) {
  .tabs button { font-size: 11px; }
  .tabs button .ico { font-size: 21px; }
}

/* совсем низкие (iPhone SE, свёрнутый вебвью, ландшафт): максимум плотности,
   дальше честный вертикальный скролл — элементы друг на друга не лезут */
@media (max-height: 600px) {
  .screen--home { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  .screen--home .ico-btn .ico-face { width: 44px; height: 44px; }
  .screen--home .ico-face img.spr { width: 44px; height: 44px; }
  .hud { padding: 8px 16px 7px; }
}

/* при открытой модалке задний экран не скроллится; внутри шита — без прокрутки фона по цепочке */
html.modal-open, html.modal-open body { overflow: hidden; }
.modal { overscroll-behavior: contain; }
.modal .sheet { overscroll-behavior: contain; }

/* кот живой: дыхание на сцене, покачивание в шите */
#i-cat img.spr { animation: catBreathe 4s ease-in-out infinite; transform-origin: 50% 100%; }
@keyframes catBreathe { 50% { transform: scaleY(.955) scaleX(1.02); } }
.cat-face img { animation: floaty 3.5s ease-in-out infinite; }

/* журнал: приёмы с медальоном клиента */
.j-rec { display: flex; align-items: center; gap: 11px; }
.j-rec .medal { width: 38px; height: 38px; font-size: 16px; }

/* эмблема салона: куётся из ступеней достижений */
.emblem { width: 112px; height: 112px; margin: 8px auto 6px; border-radius: 50%;
  position: relative; display: flex; align-items: center; justify-content: center;
  border: 3px solid; font-family: var(--serif);
  box-shadow: inset 0 0 26px rgba(0,0,0,.5), 0 6px 22px rgba(0,0,0,.45); }
.emblem::before { content: ''; position: absolute; inset: 7px; border-radius: 50%;
  border: 1px solid rgba(245,240,232,.22); }
.e-sigil { font-size: 46px; line-height: 1; }
.e-tier { position: absolute; bottom: -7px; right: -3px; min-width: 30px; height: 30px;
  padding: 0 7px; border-radius: 15px; background: var(--bg-top);
  border: 1.5px solid currentColor; font: 800 14px/27px var(--serif);
  text-align: center; font-style: normal; }
.e-copper { color: #D99B6C; border-color: #B87343;
  background: radial-gradient(circle at 35% 30%, rgba(255,214,180,.25), transparent 55%),
    linear-gradient(160deg, #4A2A18, #1E0E08); }
.e-silver { color: #D8DCE8; border-color: #9AA3B8;
  background: radial-gradient(circle at 35% 30%, rgba(240,244,255,.28), transparent 55%),
    linear-gradient(160deg, #3A4152, #14171F); }
.e-gold { color: var(--gold-bright); border-color: var(--gold);
  background: radial-gradient(circle at 35% 30%, rgba(255,236,170,.3), transparent 55%),
    linear-gradient(160deg, #4A3608, #1E1404);
  box-shadow: inset 0 0 26px rgba(0,0,0,.5), 0 0 26px rgba(232,201,106,.35); }
.e-amethyst { color: #CFA6F0; border-color: #9A5FD0;
  background: radial-gradient(circle at 35% 30%, rgba(220,185,255,.3), transparent 55%),
    linear-gradient(160deg, #3A1560, #170830);
  box-shadow: inset 0 0 26px rgba(0,0,0,.5), 0 0 26px rgba(154,95,208,.4); }
.e-lunar { color: #CDD8FF; border-color: #8FA5E8;
  background: radial-gradient(circle at 35% 30%, rgba(205,220,255,.35), transparent 55%),
    linear-gradient(160deg, #1A2450, #090E28);
  box-shadow: inset 0 0 26px rgba(0,0,0,.5), 0 0 30px rgba(143,165,232,.5); }

/* слот пустого салона: силуэт с таймером до следующего гостя */
.medal.medal-empty { border: 1.5px dashed var(--gold-dim); background: none;
  color: var(--gray); font-size: 17px; letter-spacing: 1px; }
/* гость в пути: лицо видно, но приглушённо — он ещё не в кресле */
.medal-away { display: inline-flex; flex: none; }
.medal-away .medal { opacity: .5; filter: grayscale(.55); }

/* арт карт: колода, страница карты, карта дня на главной */
.deck-grid .mini.art { padding: 0; position: relative; }
.mini-art { position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; border-radius: inherit; }
.mini-nm { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1;
  padding: 14px 2px 4px; font-size: 10.5px;
  /* слово не рвать посередине («Повешенны/й» на 360 px, проход 2026-08-15):
     длинные имена ужимаем, многословные переносятся по пробелу */
  word-break: keep-all; overflow-wrap: normal; hyphens: manual;
  background: linear-gradient(transparent, rgba(13, 2, 33, .92) 70%); }
.mini-nm.long { font-size: 9px; letter-spacing: -.3px; }
.deck-grid .mini.art .depth-pip { z-index: 2; }
.page-art { display: block; height: 190px; margin: 0 auto 10px;
  border-radius: 12px; border: 1px solid var(--gold-dim);
  box-shadow: 0 8px 28px rgba(0, 0, 0, .5); }
.card-front.has-art { padding: 0 8px 10px; justify-content: flex-end; gap: 3px; }
.cf-art { position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; border-radius: inherit; }
.card-front.has-art::after { content: ''; position: absolute; left: 0; right: 0;
  bottom: 0; height: 46%; border-radius: inherit;
  background: linear-gradient(transparent, rgba(13, 2, 33, .95) 78%); }
.card-front.has-art .name, .card-front.has-art .axis { position: relative; z-index: 1; }
.card-front.has-art .axis { background: rgba(13, 2, 33, .55); }

/* коллекция гостей: сегмент-переключатель и сетка медальонов */
.seg { display: flex; gap: 6px; margin: 10px 0 4px; padding: 4px;
  border-radius: 999px; background: var(--panel); border: 1px solid rgba(201,168,76,.25); }
.seg button { flex: 1; padding: 9px; min-height: 40px; border: 0; border-radius: 999px; cursor: pointer;
  background: none; color: var(--gray); font-family: inherit; font-size: 14.5px; font-weight: 700; }
.seg button.on { background: linear-gradient(180deg, var(--gold-bright), var(--gold-dim));
  color: #14052E; }
/* Гости — коллекция портретов, а не список аватарок (Дима 2026-08-10) */
/* четыре в ряд: портреты гостей были крупнее карт колоды и перетягивали
   экран на себя (Дима 2026-08-11 — «сделай поменьше аватарки») */
/* minmax(0,1fr), а не 1fr: колонка грида не сжимается уже своего содержимого,
   и длинные подписи («Тамара Павловна», «история закрыта») раздвигали соседей.
   На широком экране запаса хватало, на телефоне сетка разъезжалась — а мини-апп
   смотрят с телефона (Дима 2026-08-11). */
.guest-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px 8px; margin-top: 14px; }
.guest-card { cursor: pointer; text-align: center; min-width: 0; }
.guest-card .gc-face {
  position: relative; aspect-ratio: 3 / 4; border-radius: 11px; overflow: hidden;
  background: linear-gradient(160deg, hsl(var(--medal-hue) 45% 32%), hsl(var(--medal-hue) 45% 16%));
  border: 1px solid rgba(201,168,76,.28);
  display: flex; align-items: center; justify-content: center;
}
.guest-card .gc-face img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.guest-card .gc-letter { font: 700 24px var(--serif); color: rgba(245,240,232,.75); }
.guest-card .gc-visits {
  position: absolute; right: 4px; top: 4px; min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 9px; background: rgba(13,2,33,.82); border: 1px solid var(--gold);
  color: var(--gold-bright); font: 800 10px/15px var(--serif);
}
.guest-card .gc-name { margin-top: 4px; font-size: 11.5px; color: var(--white);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* подписи не переносятся: перенос делал карточки разной высоты, и ряд ехал */
.guest-card .gc-state { font-size: 10px; color: var(--gray); line-height: 1.2;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.guest-card .gc-state.gold { color: var(--gold-bright); }
.guest-card.arc-done .gc-face { border-color: var(--gold-bright);
  box-shadow: 0 0 12px rgba(232,201,106,.4); }

/* Колода по мастям: сразу видно, какой масти не хватает */
.suit-bar { margin: 6px 0 12px; }
.suits { display: flex; gap: 6px; }
.suit { flex: 1; min-width: 0; text-align: center; }
.suit-line { height: 5px; border-radius: 3px; background: rgba(255,255,255,.09);
  overflow: hidden; }
.suit-line span { display: block; height: 100%; border-radius: 3px;
  background: linear-gradient(90deg, var(--gold-dim), var(--gold-bright)); }
.suit i { display: block; font-style: normal; font-size: 10.5px; color: var(--gray);
  margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.suit b { display: block; font-size: 12px; color: var(--white); font-weight: 700; }
.suit.full b { color: var(--gold-bright); }
.suit-cap { margin-top: 8px; font-size: 13px; color: var(--gray); text-align: center; }
.guest { display: flex; flex-direction: column; align-items: center; gap: 4px;
  cursor: pointer; position: relative; text-align: center; }
.guest .medal { width: 56px; height: 56px; font-size: 23px; }
.guest i { font-style: normal; font-size: 11.5px; color: var(--white); max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.guest.unknown i { color: rgba(169,156,196,.55); }
.guest.unknown .medal { font-size: 20px; color: rgba(169,156,196,.5); }
.guest .gv { position: absolute; top: -3px; right: 8px; min-width: 20px; height: 20px;
  padding: 0 5px; border-radius: 10px; background: var(--bg-top);
  border: 1px solid var(--gold); color: var(--gold-bright);
  font: 800 11.5px/18px var(--serif); }
/* лицо клиента в сюжетной сцене и на экране исхода */
.sc-head { display: flex; align-items: center; gap: 12px; margin: 2px 0 12px; }
.sc-head .medal { width: 52px; height: 52px; font-size: 22px; flex: none; }
.sc-who { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.sc-who b { font-family: var(--serif); font-size: 19px; line-height: 1.15;
  color: var(--gold-bright); overflow-wrap: anywhere; }
@media (max-width: 350px) {
  .sc-head { gap: 10px; }
  .sc-head .medal { width: 44px; height: 44px; font-size: 19px; }
  .sc-who b { font-size: 17px; }
}

.cl-head { display: flex; gap: 14px; align-items: center; margin-bottom: 12px; }
.cl-head .medal { width: 62px; height: 62px; font-size: 26px; flex: none; }
.cl-visit { border-left: 2px solid rgba(201,168,76,.35); padding: 2px 0 2px 12px;
  margin: 12px 0; }
.cl-adv { font-style: italic; color: var(--gold-bright); margin-top: 2px; }

/* коллекция: статусы гостей и прогресс арки */
.guest.arc-done .medal { border: 2px solid var(--gold-bright);
  box-shadow: 0 0 12px rgba(232, 201, 106, .45); }
.guest .gst { font-size: 10px; color: var(--gray); margin-top: -2px; }
.guest .gst.gold, .gold-t { color: var(--gold-bright); }
.arc-dots { display: inline-flex; gap: 4px; vertical-align: middle; }
.arc-dots b { width: 8px; height: 8px; border-radius: 50%;
  background: rgba(245, 240, 232, .15); display: inline-block; }
.arc-dots b.on { background: var(--gold-bright); box-shadow: 0 0 6px rgba(232,201,106,.6); }

/* иконка-пояснение: текст с экрана убран за тап */
.info-dot { display: inline-flex; align-items: center; justify-content: center;
  width: 17px; height: 17px; border-radius: 50%; margin-left: 5px;
  border: 1px solid var(--gold-dim); color: var(--gold); cursor: pointer;
  font: italic 700 11px/1 var(--serif); vertical-align: text-bottom; }

/* аура: полёт лун к балансу и кристалл в шите */
.fly-moon { position: fixed; z-index: 200; pointer-events: none;
  font-size: 22px; color: var(--gold-bright);
  text-shadow: 0 0 10px rgba(232, 201, 106, .9);
  transition: transform .75s cubic-bezier(.5, -0.1, .4, 1), opacity .75s; }
.chip-pop { animation: chipPop .45s ease; }
@keyframes chipPop { 40% { transform: scale(1.18); } }
.aura-hero { display: flex; align-items: center; justify-content: center;
  gap: 16px; margin: 4px 0 12px; }
.aura-big { width: 96px; height: 96px; object-fit: contain;
  animation: floaty 3s ease-in-out infinite;
  filter: drop-shadow(0 0 18px rgba(160, 100, 255, .55)); }
.aura-cnt b { font: 700 40px/1 var(--serif); color: var(--gold-bright); }
.aura-timers { display: flex; gap: 8px; justify-content: center; margin-top: 12px; }
.aura-timers .chip { display: inline-flex; align-items: center; gap: 5px;
  background: var(--panel); border: 1px solid var(--panel-border);
  border-radius: 999px; padding: 7px 13px; font-size: 13px; }
.aura-timers .crescent { color: var(--gold-bright); }

/* письма: бумага с сургучом и ящик конвертов */
.paper { position: relative; background:
    radial-gradient(circle at 20% 10%, rgba(120, 80, 30, .08), transparent 60%),
    linear-gradient(168deg, #F2E7CE, #E7D6B2);
  color: #2E1F10; border-radius: 8px; padding: 34px 22px 20px;
  margin-top: 14px; transform: rotate(-.6deg);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .5), inset 0 0 40px rgba(120, 80, 30, .12); }
.wax { position: absolute; top: -16px; left: 50%; transform: translateX(-50%) rotate(4deg);
  width: 44px; height: 44px; border-radius: 50%;
  background: radial-gradient(circle at 36% 30%, #C4424E, #7E1F28 70%);
  box-shadow: 0 3px 9px rgba(0, 0, 0, .45); display: flex; align-items: center;
  justify-content: center; color: rgba(255, 226, 190, .9); font-size: 19px; }
.paper-title { font-family: var(--serif); font-size: 21px; font-weight: 700;
  text-align: center; margin-bottom: 10px; color: #3A2408; }
.paper-text { font-family: var(--serif); font-size: 17.5px; line-height: 1.62;
  white-space: pre-wrap; }
.paper-sign { font-family: var(--serif); font-style: italic; font-size: 19px;
  text-align: right; margin-top: 14px; color: #5A3A14; }
/* Ящик писем: список строк, а не сетка иконок в три колонки. На двух письмах
   сетка оставляла две трети шита пустыми, а названия обрезались до половины
   фразы (проход глазами Димы). */
.env-list { margin-top: 6px; }
.env-row img { width: 38px; height: 38px; object-fit: contain; flex: none; opacity: .85; }
.env-row.unread img { opacity: 1; filter: drop-shadow(0 0 9px rgba(232, 201, 106, .55)); }
.env-row .t { font-size: 15.5px; color: var(--gray); }
.env-row.unread .t { color: var(--white); font-weight: 600; }

.env-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px 8px;
  margin-top: 12px; }
.env { display: flex; flex-direction: column; align-items: center; gap: 4px;
  cursor: pointer; position: relative; text-align: center; }
.env img { width: 58px; height: 58px; object-fit: contain; opacity: .82; }
.env.unread img { opacity: 1; filter: drop-shadow(0 0 10px rgba(232, 201, 106, .8)); }
.env i { font-style: normal; font-size: 11px; color: var(--gray); line-height: 1.25;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; }
.env.unread i { color: var(--white); }
.env .ico-badge { top: -2px; right: 16%; }

/* кот: сердечки, пузырь-реплика, светящаяся кнопка подарка */
.fly-heart { position: fixed; z-index: 200; pointer-events: none;
  color: var(--gold-bright); opacity: 0;
  animation: heartFly 1.3s cubic-bezier(.2, .6, .3, 1) forwards; }
@keyframes heartFly {
  0% { transform: translate(0, 0) scale(0) rotate(0deg); opacity: 0; }
  14% { transform: translate(calc(var(--dx, 0px) * .18), calc(var(--dy, -80px) * .12))
      scale(calc(var(--s, 1) * 1.25)) rotate(calc(var(--r, 0deg) * .4)); opacity: 1; }
  55% { opacity: .95; }
  100% { transform: translate(var(--dx, 0px), var(--dy, -110px))
      scale(var(--s, 1)) rotate(var(--r, 0deg)); opacity: 0; }
}
.fly-heart.pink { color: #F08CA8; text-shadow: 0 0 8px rgba(240, 140, 168, .8); }
.cat-hero { position: relative; }
.cat-bubble { position: absolute; left: 50%; transform: translateX(-50%);
  bottom: -6px; background: rgba(20, 10, 42, .95);
  border: 1px solid rgba(201, 168, 76, .5); border-radius: 12px;
  padding: 6px 12px; font-size: 13px; white-space: nowrap;
  animation: narIn .3s ease; transition: opacity .5s; z-index: 5; }
.cat-bubble.gone { opacity: 0; }
.beacon-btn { animation: beaconHue 2.8s linear infinite; border: 1px solid; }

/* reveal-карты с артом: празднование новой карты и веера */
.nc-card.art { position: relative; overflow: hidden; padding: 0 8px 12px;
  justify-content: flex-end; gap: 3px; }
.nc-card.art .cf-art { border-radius: inherit; }
.nc-card.art::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0;
  height: 42%; border-radius: inherit;
  background: linear-gradient(transparent, rgba(13, 2, 33, .95) 78%); }
.nc-card.art .name, .nc-card.art .axis { position: relative; z-index: 1; }
.nc-card.art .burst { z-index: 2; }
.fan-face.art { position: relative; width: 100%; height: 100%; border-radius: inherit;
  overflow: hidden; }
.fan-face.art img { width: 100%; height: 100%; object-fit: cover; }
.fan-face.art .fn { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1;
  padding: 12px 3px 4px; font-size: 10px; text-align: center;
  background: linear-gradient(transparent, rgba(13, 2, 33, .92) 70%); }

/* аватар из Telegram: фото в кружке, фолбэк — буква */
.ava img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }


.founder-star { color: var(--gold-bright); font-size: 19px;
  text-shadow: 0 0 8px rgba(232, 201, 106, .7); }

/* сцена: иконки к верху, чип сторис под картой */
.scene-col { justify-content: flex-start; padding-top: 8px; }
/* тап-зона не меньше 40px: было 84×33 (аудит UI 2026-08-10) */
.story-chip { display: inline-flex; align-items: center; justify-content: center;
  gap: 5px; margin-top: 8px; min-height: 40px;
  padding: 6px 16px; border-radius: 999px; font-size: 12.5px; font-weight: 600;
  background: var(--panel); border: 1px solid rgba(201, 168, 76, .3);
  cursor: pointer; color: var(--gray); }
.shelf-medal.alert .medal { border: 2px solid var(--gold-bright);
  box-shadow: 0 0 12px rgba(232, 201, 106, .5); }

/* подарок на полке дел, когда есть что забрать */
.shelf-gift.claim { color: var(--gold-bright); animation: beaconHue 2.8s linear infinite;
  border: 1px solid; }

/* точка события на главной кнопке — видно, что подсвечено именно действие */
.cta-dotted { position: relative; }
.btn-dot { position: absolute; top: 10px; right: 12px; width: 10px; height: 10px;
  border-radius: 50%; background: #E8626A; box-shadow: 0 0 7px rgba(232, 98, 106, .9); }

/* личная история карты — отделена от трактовки */
.card-history { margin-top: 14px; padding: 12px 14px; border-radius: 12px;
  background: rgba(245, 240, 232, .045); border: 1px solid rgba(201, 168, 76, .22); }

/* Крестик шитов. Был вторым способом закрыть — внизу каждого шита ещё стояла
   кнопка «Закрыть», то есть 70 px высоты на дубль крестика под самой CTA.
   Кнопку убрали, крестик сделали липким: на длинном шите (письмо, глава
   наталки) он больше не уезжает вверх вместе с текстом. */
   Липкость с отрицательным top ещё «подплывала» на первых пикселях скролла
   (Дима 2026-08-10, страница карты): теперь это настоящая закреплённая полоса
   высотой 44 px — крестик стоит намертво, текст уходит под градиент. */
.sheet { position: relative; }
.modal .sheet { padding-top: 18px; }
/* Крестик закрытия — один на все шиты, на одной сетке с содержимым.
   Было: полоса с padding-right 14px при отступах шита 18px, то есть крестик
   стоял на четыре пикселя ближе к краю, чем весь текст под ним, и глиф ×
   висел на line-height, а не по центру круга. Обе кривизны видны на каждом
   шите сразу (Дима 2026-08-13, D1). */
/* Полоса крестика съедала целую строку сверху каждого шита: 44 px пустоты,
   из-за которых содержимое начиналось ниже, а на коротких шитах вёрстка
   выглядела съехавшей (Дима 2026-08-14: «слетает из-за крестика, который
   занимает всю линию — так везде на подобных модалках»). Теперь полоса
   нулевой высоты: крестик висит поверх содержимого в углу и никого не
   двигает, а sticky держит его на месте при прокрутке. */
.sheet-top {
  position: sticky; top: 0; z-index: 5; height: 0;
  margin: 0; padding: 0;
  display: flex; align-items: flex-start; justify-content: flex-end;
  pointer-events: none;
}
/* заголовок не уезжает под крестик */
.modal .sheet > h2:first-of-type, .modal .sheet > .cl-head { padding-right: 42px; }
.sheet-x { pointer-events: auto; margin: 0; padding: 0;
  width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(201,168,76,.35);
  background: rgba(20,10,42,.9);
  color: var(--gray); cursor: pointer;
  display: flex; align-items: center; justify-content: center; }
.sheet-x svg { width: 20px; height: 20px; display: block; }

/* ── Ничего не сжимается (фидбек 2026-08-10) ─────────────────────────────
   Спрайты проекта не квадратные (183×256 и т.п.). Иконка в круге без
   object-fit плющится, а иконка во flex-ряду ужимается длинным соседом.
   Правило: всё, что живёт в фиксированном круге/квадрате или во flex-ряду,
   получает flex:none и честную вписанность. */
img.spr, .env img, .aura-big, .cat-face img, .salon-cell img, .page-art,
.ach-card .ai img, .medal-photo, .ava img, .mini-art, .cf-art,
.fan-face.art img, .fan-card .fan-back { flex: none; }
img.spr, .env img, .aura-big, .cat-face img, .salon-cell img, .page-art,
.ach-card .ai img { object-fit: contain; }
.ach-card .ai img { width: 34px; height: 34px; }

/* фиксированные круги и плитки: не дают себя сплющить ни по одной оси */
.ico-btn .ico-face, .ico-face.medal-face .medal, .medal, .ava, .cat-face,
.emblem, .level-orb, .moon-loader, .wax, .info-dot,
.card-back .sigil, .deck-grid .mini.back .back-sigil, .arc-dots b,
.fan-card, .aura-timers .chip, .astro-chip, .story-chip,
.hud .chip, .price-btn, .sheet-x, .streak-pip { flex: none; }

/* празднование: контент не плющится по высоте, крупная карта считает
   размер и от высоты экрана — на 320×640 раньше рвала вёрстку */
.new-card-wrap { max-height: 100%; overflow-y: auto; }
.new-card-wrap > * { flex: none; max-width: 100%; }
.nc-card { width: min(56vw, 210px, calc(42vh * 0.6)); }

/* ── Веер в Практике: карты тянет игрок ──────────────────────────────────
   Стили веера салона (.fan/.fan-card) переиспользуются как есть; здесь
   только рубашка-арт, ряд позиций расклада и переворот карты в позицию. */
.fan-card { overflow: hidden; padding: 0; position: relative; }
.fan-card .fan-back { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.fan.fan-pick { margin: 12px 0 2px; height: auto; padding: 16px 0 26px; }
.fan.fan-pick .fan-card { width: clamp(56px, 17vw, 68px); height: auto;
  aspect-ratio: 3/5; margin: 0 clamp(-21px, -4.6vw, -14px); }
.fan-card.taken { opacity: 0; transform: rotate(var(--rot)) translateY(-40px) scale(.85);
  pointer-events: none; }
.fan.fan-pick.spent { opacity: 0; transform: translateY(10px);
  transition: opacity .45s ease, transform .45s ease; pointer-events: none; }

.sp-row { display: flex; gap: 8px; justify-content: center; margin-top: 6px; }
.sp-slot { flex: 1 1 0; max-width: 104px; min-width: 0; display: flex;
  flex-direction: column; align-items: center; gap: 5px; }
.sp-slot .sp-frame { width: 100%; aspect-ratio: 3/5; border-radius: 11px;
  border: 1px dashed rgba(201,168,76,.3); background: rgba(245,240,232,.04);
  perspective: 700px; position: relative; overflow: hidden; }
.sp-slot.filled .sp-frame { border-style: solid; border-color: var(--gold-dim); }
.sp-slot i { font-style: normal; font-size: 11px; color: var(--gray);
  text-align: center; line-height: 1.2; }
.sp-slot.filled i { color: var(--gold-bright); }
.sp-card { position: absolute; inset: 0; border-radius: inherit; overflow: hidden;
  transform: rotateY(92deg) scale(.86); opacity: 0;
  transition: transform .62s cubic-bezier(.2,.9,.3,1.15), opacity .3s ease; }
.sp-card.open { transform: rotateY(0) scale(1); opacity: 1; }
.sp-card img { position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; flex: none; }
.sp-card b { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1;
  padding: 16px 2px 4px; font-family: var(--serif); font-size: 11.5px;
  color: var(--gold-bright); text-align: center; line-height: 1.1;
  background: linear-gradient(transparent, rgba(13,2,33,.94) 70%); }
.sp-row.one { justify-content: center; }
.sp-row.one .sp-slot { max-width: 168px; }
.spread-text .reading { animation: fadein .45s ease; }

/* Реплика с порога: гость входит и вспоминает прошлый визит. Тише рассказа —
   это память, а не сегодняшний запрос (аудит 2026-08-11). */
.nar-recall { font-style: italic; opacity: .72; }

/* Сколько гостей ещё придёт сегодня — числом у линии кресел */
.seat-left { margin-left: auto; color: var(--gray); font-size: 13px; }

/* Экран не отвечающего салона: объяснение и одна кнопка вместо крутилки */
.tab-error { display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 12px; padding: 48px 16px; text-align: center; }

/* Карта и её линза остаются перед глазами на шаге совета: решение принимается
   по карте, а она уходила с экрана вместе с предыдущим шагом (2026-08-11).
   Одним блоком — иначе шаг перестаёт влезать в экран. */
.adv-card { display: flex; align-items: flex-start; gap: 10px; margin: 2px 0 8px; }
.adv-card-art { width: 40px; height: 68px; object-fit: cover; border-radius: 6px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .45); flex: none; }
.adv-card-t { display: flex; flex-direction: column; line-height: 1.3; }
.adv-lens { margin-top: 3px; font-size: 13.5px; color: var(--white); opacity: .88; }
/* запрос клиента: две строки, тап разворачивает. Хвост гасим градиентом —
   иначе обрыв на середине фразы читается как поломка вёрстки */
.adv-setup { opacity: .6; font-size: 13.5px; max-height: 3.1em; overflow: hidden;
  position: relative; cursor: pointer; }
.adv-setup::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0;
  height: 1.5em; background: linear-gradient(180deg, transparent, rgba(20, 5, 46, .96)); }
.adv-setup.open { max-height: none; }
.adv-setup.open::after { display: none; }

/* Вердикт исхода: сработал совет или нет. Без вердикта игрок не понимал, за
   что гость уходит на три дня (Дима 2026-08-11) */
.verdict { margin: 10px 0 2px; padding: 10px 12px; border-radius: 12px;
  font-weight: 700; text-align: center; font-size: 15px; }
.verdict.ok { color: var(--gold-bright); background: rgba(201, 168, 76, .12);
  border: 1px solid rgba(201, 168, 76, .35); }
.verdict.fail { color: #C9A6C0; background: rgba(180, 120, 170, .1);
  border: 1px solid rgba(180, 120, 170, .3); }

/* Переворот карты в слоте Практики — тот же жест, что в салоне: сперва
   рубашка, потом лицо (Дима 2026-08-11: «анимация по-разному») */
.sp-card .sp-flip { position: relative; width: 100%; aspect-ratio: 88/148;
  transform-style: preserve-3d; transition: transform .55s cubic-bezier(.3,.8,.3,1); }
.sp-card .sp-flip.flipped { transform: rotateY(180deg); }
.sp-card .sp-face { position: absolute; inset: 0; backface-visibility: hidden;
  border-radius: 10px; overflow: hidden; display: flex;
  align-items: center; justify-content: center;
  border: 1.5px solid var(--gold-dim);
  background: linear-gradient(160deg, #1D0A42, #0D0221); }
.sp-card .sp-face img { width: 100%; height: 100%; object-fit: cover; }
.sp-card .sp-front { transform: rotateY(180deg); }
.sp-card .sp-back .sigil { font-size: 20px; color: rgba(201, 168, 76, .6); }
/* Раскрытие: карта не появляется заново, а вырастает из веера — движение одно,
   его ведёт FLIP-трансформ из JS (Дима 2026-08-12: «слишком большая и рвано»).
   Размер держим и по высоте экрана: на коротких телефонах карта ужимается,
   чтобы под ней сразу читался текст гостя. */
.reveal-scene { will-change: transform; }
.reveal-scene .tarot-card {
  /* карта раскрытия крупнее вслед за веером */
  width: min(50vw, 178px, calc(var(--vph) * 0.25));
  height: auto; margin: 0 auto;
  /* переворот .42s: он стартует на середине роста и гаснет вместе с ним */
  transition: transform .42s cubic-bezier(.35,.05,.2,1);
}
/* имя на карте раскрытия мельче: карта стала уже, и «Пятёрка Жезлов»
   двадцать вторым кеглем лезла на арт в две строки */
.reveal-scene .card-front .name { font-size: clamp(13px, calc(var(--vph) * 0.021), 17.5px); }
.reveal-scene .card-front .axis { font-size: 11.5px; padding: 2px 9px; }

/* Карта в Коллекции крупная ПО ВЫСОТЕ (Дима 2026-08-11): ширину диктует
   пропорция арта 282×480, растягивать по ширине нельзя — карта перестаёт
   быть картой. */
.page-art.big { height: min(64vh, 460px); width: auto; max-width: 92%;
  object-fit: contain; margin: 0 auto; display: block; }
/* Полученные предметы салона крупнее и с меткой нового */
.salon-grid.mine .salon-cell { position: relative; }
.salon-grid.mine .salon-cell img { height: 76px; }
/* свечение по контуру PNG, а не квадратом вокруг ячейки (Дима 2026-08-12) */
.salon-cell.fresh img { filter: drop-shadow(0 0 9px rgba(232, 201, 106, .6)); }
.salon-cell .ico-badge { top: 4px; right: 4px; }
/* Масти: одна ровная сетка, без строки с общим счётом */
.suit-bar .suit-cap:empty { display: none; }

/* Портреты гостей: лица нарезаны с разным масштабом, и cover по центру резал
   подбородок. Кадрируем от верхней трети — лицо остаётся целиком (Дима 2026-08-11).
   Ровные портреты «в одном положении» — это перегенерация листов, ждёт арт-захода. */
/* Портреты нарезаны так, что макушка и подбородок стоят у самого края кадра:
   cover срезал их совсем. Вписываем целиком на фон медальона — до перегенерации
   по шаблону это единственный способ показать лицо, а не его середину. */
/* Портреты нарисованы с полями по шаблону, но круглый медальон срезает углы —
   лицо от этого читается крупнее, чем задумано. Отодвигаем масштабом
   (Дима 2026-08-11: «лица норм, но теперь слишком крупные»). */
.gc-face img { object-fit: cover; object-position: 50% 50%; transform: scale(.88); }
.medal .medal-photo { object-fit: cover; object-position: 50% 46%; transform: scale(.84); }

.btn.free-run { box-shadow: 0 0 22px rgba(232, 201, 106, .4); }

/* Совет, который в прошлый раз не сработал: виден, но не запрещён — игрок
   вправе настоять на своём (2026-08-11) */
.btn.ghost.tried { opacity: .6; border-style: dashed; }

/* Админка: тревоги сверху, чтобы не искать глазами */
/* Живые люди по периодам: час / сегодня / неделя одной таблицей.
   Первый экран админки — ради него её и открывают (Дима 2026-08-13, F). */
.adm-periods { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr;
  align-items: center; gap: 8px 6px;
  margin-top: 10px; background: var(--panel); border: 1px solid var(--panel-border);
  border-radius: 14px; padding: 12px 10px; }
.adm-periods > i { font-style: normal; font-size: 11px; color: var(--gold);
  text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-periods > span { font-size: 12px; color: var(--gray); line-height: 1.2; }
.adm-periods > b { font-size: 15px; color: var(--gold-bright); text-align: center;
  font-variant-numeric: tabular-nums; }

.adm-alerts { display: flex; flex-direction: column; gap: 6px; margin: 10px 0 4px; }
.adm-alert { padding: 9px 12px; border-radius: 12px; font-size: 14px; }
.adm-alert.warn { color: var(--gold-bright); background: rgba(201,168,76,.12);
  border: 1px solid rgba(201,168,76,.35); }
.adm-alert.bad { color: #E0A0A0; background: rgba(200,90,90,.12);
  border: 1px solid rgba(200,90,90,.35); }

/* Счётчики мастей одним блоком: пять отдельных колонок читались вразнобой
   (Дима 2026-08-11 — «в единый блок для инфо») */
.suit-bar { background: rgba(245,240,232,.05); border: 1px solid rgba(201,168,76,.22);
  border-radius: 14px; padding: 10px 12px; margin-top: 8px; }
.suits { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin: 0; }
.suits .suit { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.suits .suit i { font-size: 10.5px; color: var(--gray); font-style: normal; }
.suits .suit b { font-size: 12.5px; color: var(--white); font-weight: 700; }
.suits .suit-line { width: 100%; height: 3px; border-radius: 2px;
  background: rgba(245,240,232,.12); overflow: hidden; }
.suits .suit-line span { display: block; height: 100%; background: var(--gold); }
.suits .suit.full b { color: var(--gold-bright); }

/* Значок справки вписан в угол блока мастей, а не болтается строкой под ним
   (Дима 2026-08-11) */
/* (i) — шестая ячейка того же ряда: абсолютом она налезала на «Пентакли» */
.suits { grid-template-columns: repeat(5, 1fr) auto; align-items: center; }
.suit-bar .suit-info { display: flex; align-items: center; padding-left: 2px; }
.suit-bar .suit-info .info-dot { width: 18px; height: 18px; font-size: 11px;
  opacity: .5; margin: 0; }
.suit-bar .suit-cap { margin-top: 8px; text-align: center; font-size: 12px;
  color: var(--gray); }

/* Страница практики: единые отступы у шапки, кнопки и истории — раньше
   подпись сидела на инлайновом margin, и модалки разъезжались (Дима 2026-08-11) */
.pp-sub { text-align: center; margin: -2px 0 12px; line-height: 1.35; }
.sheet .btn + #pp-hist, .sheet #pp-out + .btn { margin-top: 12px; }
#pp-hist .sec-h { margin-top: 16px; }
#pp-hist .row { margin-top: 8px; }

/* Шапка страницы практики: заголовок и подпись по одной оси. Заголовок сидел
   слева, подпись по центру — модалка выглядела собранной наспех (Дима). */
.sheet h2.pp-h { text-align: center; justify-content: center; }
.pp-about { text-align: center; font-size: 13.5px; line-height: 1.45;
  color: var(--gray); margin: 0 0 14px; }

/* На телефоне описание звёздной практики занимало по четыре строки, и блок
   вытеснял с экрана всё остальное. Два ряда — достаточно, чтобы понять оффер;
   подробности ждут в модалке (Дима 2026-08-11, мини-апп смотрят с телефона). */
@media (max-width: 430px) {
  .star-row .t .muted { display: -webkit-box; -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden; }
  .star-row .price-btn { white-space: nowrap; }
}

/* Непрожитые пути визита */
.cl-alt-h { margin: 10px 0 6px; font: 700 12px var(--serif); color: var(--gold-dim);
  text-transform: uppercase; letter-spacing: .06em; }
.cl-alt { display: flex; align-items: center; gap: 8px; justify-content: space-between;
  padding: 8px 10px; margin-top: 6px; border-radius: 12px;
  border: 1px dashed rgba(201,168,76,.35); }
.cl-alt.open { display: block; border-style: solid;
  border-color: rgba(201,168,76,.5); background: rgba(201,168,76,.07); }
.cl-alt .cl-adv { margin: 0; }
.cl-alt .price-btn { flex: none; }

/* ── Ритуал-жест перед текстовым сеансом (Дима 2026-08-12) ─────────────── */
.rit-ov { position: fixed; inset: 0; z-index: 96; background: rgba(14, 8, 34, .93);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 18px; animation: fadeIn .25s ease; }
.rit-circle { position: relative; width: 128px; height: 128px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  background: radial-gradient(circle, rgba(232, 201, 106, .12), transparent 70%);
  touch-action: none; user-select: none; -webkit-user-select: none; }
.rit-ico { font-size: 44px; pointer-events: none; }
.rit-ico svg { width: 52px; height: 52px; }
.rit-ring { position: absolute; inset: 0; transform: rotate(-90deg); pointer-events: none; }
.rit-ring circle { fill: none; stroke: var(--gold-bright); stroke-width: 3;
  stroke-linecap: round; stroke-dasharray: 289;
  stroke-dashoffset: calc(289 - 289 * var(--rit-p, 0)); }
.rit-done { animation: ritPulse .35s ease; }
.rit-done .rit-ico { filter: drop-shadow(0 0 14px rgba(232, 201, 106, .9)); }
@keyframes ritPulse { 50% { transform: scale(1.12); } }
.rit-hint { color: var(--white); font-size: 15px; text-align: center; max-width: 260px; }

/* ── Чтение главы (формат 2.0) ────────────────────────────────────────────
   Экран один, текст крупный, служебного на нём нет: точки прогресса сверху,
   подсказка «тап — дальше» гаснет вместе с первым тапом. Всё влезает в
   вьюпорт на 360 px без скролла — читают с телефона. */
/* Полоса главы сегментами, как сторис: сколько экранов — столько делений,
   пройденные залиты, текущий светится (Дима 2026-08-14). Прибита к самому
   верху экрана и не участвует в вертикальном центрировании текста. */
.ch-story { display: flex; gap: 3px; margin: 0 0 16px; }
.ch-story i { flex: 1 1 0; height: 2.5px; border-radius: 2px;
  background: rgba(255, 255, 255, .16); transition: background .25s; }
.ch-story i.past { background: var(--gold-dim, var(--gold)); }
.ch-story i.now { background: var(--gold-bright, var(--gold));
  box-shadow: 0 0 8px rgba(232, 201, 106, .55); }

/* Реплики по ролям: лицо говорящего рядом с его словами. Речь игрока —
   зеркально, от его аватарки. Описание идёт без лица, приглушённее речи:
   глаз сразу видит, где говорят, а где рассказывают. */
/* Диалог идёт плотно, как в переписке: 7 px между каждой парой реплик плюс
   воздух под ремаркой давали ощущение разорванного разговора (Дима 2026-08-14
   — «между репликами героя большие отступы»). Соседние реплики одного лица
   почти слипаются, смена говорящего — заметный шаг. */
.ch-say { display: flex; align-items: flex-start; gap: 8px; margin: 3px 0; }
.ch-say + .ch-say { margin-top: 2px; }
.ch-say-nar + .ch-say, .ch-say + .ch-say-nar { margin-top: 8px; }
.ch-say.mine { flex-direction: row-reverse; }
.ch-say .ch-face { flex: none; width: 30px; height: 30px; border-radius: 50%;
  overflow: hidden; border: 1px solid rgba(201,168,76,.45);
  background: rgba(20,10,42,.85); display: flex; align-items: center;
  justify-content: center; font: 700 14px/1 var(--serif, serif);
  color: var(--gold-bright); margin-top: 3px; }
.ch-say .ch-face img { width: 100%; height: 100%; object-fit: cover; }
.ch-bubble { min-width: 0; }
/* Реплики читаются слева, как в любой переписке. Сцена вокруг центрируется, и
   центр протекал внутрь пузырей: строки висели по середине, глазу не за что
   было зацепиться — та самая «неудобность чтения по ролям» (Дима 14 августа) */
.ch-say p { margin: 0; padding: 8px 12px; border-radius: 14px;
  background: rgba(245,240,232,.06); border: 1px solid rgba(201,168,76,.16);
  font-size: inherit; line-height: 1.42; text-align: left; }
.ch-say .ch-note { text-align: left; }
.ch-say-nar { text-align: left; }
/* Два пузыря подряд от одного человека — лицо рисуем один раз, как в
   мессенджерах. Место под ним остаётся, иначе вторая реплика съезжает влево */
.ch-say.from-guest + .ch-say.from-guest > .ch-face,
.ch-say.mine + .ch-say.mine > .ch-face { visibility: hidden; }
.ch-say.from-guest + .ch-say.from-guest, .ch-say.mine + .ch-say.mine { margin-top: 2px; }
.ch-say.from-guest p { border-top-left-radius: 5px; }
.ch-say.mine p { border-top-right-radius: 5px; border-top-left-radius: 14px;
  background: rgba(201,168,76,.12); border-color: rgba(201,168,76,.3); }
/* ремарка «— говорит она» ушла из пузыря под него: в пузыре только слова */
.ch-note { display: block; margin: 2px 4px 0; font-size: 12.5px;
  color: var(--gray); line-height: 1.25; }
.ch-say.mine .ch-note { text-align: right; }
/* выбор игрока на станции: поступок, а не сказанные вслух слова */
.ch-say.said-act p { font-style: italic; background: rgba(201,168,76,.07);
  border-style: dashed; }
.ch-say-nar { margin: 4px 2px; color: rgba(245,240,232,.84); line-height: 1.5; }

.ch-head { display: flex; flex-direction: column; align-items: center; gap: 4px;
  margin-bottom: 14px; text-align: center; }
/* короткая шапка: одна строка вместо портрета с подписями — место отдано тексту */
.ch-head-line { display: block; margin-bottom: 10px; text-align: center;
  font-size: 12.5px; letter-spacing: .3px; color: var(--gray); }
.ch-head b { font-family: var(--serif); font-size: 19px; }

.ch-text { font-size: 17px; line-height: 1.5; letter-spacing: .1px;
  opacity: 0; transform: translateY(6px); transition: opacity .32s, transform .32s; }
.ch-text.in { opacity: 1; transform: none; }

/* Имя практики над раскладом: игрок должен узнать её потом на вкладке
   «Практика» — там ему предложат ровно эту, уже своими руками опробованную */
.ch-tool { text-align: center; color: var(--gold); font-size: 11px;
  letter-spacing: 2.4px; text-transform: uppercase; margin-top: 0; opacity: .75; }
.ch-tool + .ch-hint { margin-top: 6px; }
/* вопрос стоит над практикой в той же центрированной сцене */
.ch-spread .ch-question { margin: 0 0 2px; max-width: 30ch; }

.ch-hint { text-align: center; color: var(--gray); font-size: 12.5px;
  letter-spacing: 1.2px; margin-top: 20px; animation: hintPulse 2.4s ease-in-out infinite; }
@keyframes hintPulse { 0%, 100% { opacity: .35 } 50% { opacity: .85 } }

.ch-card { display: flex; flex-direction: column; align-items: center; gap: 6px;
  margin: 14px 0 6px; }
.ch-card img { width: min(58vw, 210px); aspect-ratio: 3/5; object-fit: cover;
  border-radius: 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, .45); }
.ch-card.small img { width: min(34vw, 120px); }
.ch-card b { font-family: var(--serif); font-size: 17px; }
.ch-lens { color: var(--gray); font-size: 13.5px; text-align: center;
  max-width: 30ch; line-height: 1.45; }

.ch-opt, .ch-adv { text-align: left; white-space: normal; line-height: 1.4; }
.ch-adv { margin-top: 8px; }

.ch-hook { margin-top: 12px; padding: 10px 12px; border-left: 2px solid var(--gold);
  color: var(--fg); font-style: italic; }
.ch-wait { margin-top: 14px; text-align: center; color: var(--gray); font-size: 13px; }

/* Текст главы стоит по центру экрана: читают с телефона, и абзац, прижатый
   к шапке, оставлял под собой полэкрана пустоты. */
.narrative.nar-center .ch-text { max-width: 34ch; margin-inline: auto; }

/* Экран главы не прокручивается вовсе (Дима 2026-08-13). Полоса прокрутки на
   истории означала, что текст экрана длиннее самого экрана, — вместо неё
   короткие экраны в корпусе и подгонка кегля в chapterFit. */
.narrative.nar-fixed { overflow: hidden; }
/* Текст стоит чуть выше середины экрана: при точном центрировании он
   оказывался ниже уровня глаз, и читать приходилось «сверху вниз в упор»
   (Дима 2026-08-14). Полоса главы при этом остаётся прибитой к верху. */
.narrative.nar-fixed .nar-body { height: calc(100dvh - 58px); overflow: hidden;
  justify-content: center; padding-bottom: 4vh; }
/* Длинный экран не сжимается до нечитаемого — прокручивается весь слой, во
   всю ширину. Колонка внутри давала узкую полосу прокрутки посреди экрана. */
.narrative.nar-fixed.scrolls { overflow-y: auto; -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain; }
.narrative.nar-fixed.scrolls .nar-body { height: auto; min-height: calc(100dvh - 58px);
  overflow: visible; justify-content: flex-start; padding-bottom: 28px; }
.narrative.nar-fixed .ch-story { position: absolute; top: 14px; left: 18px; right: 18px;
  margin: 0; }

/* Экран советов тоже обязан влезать: карта-напоминание мельче, кегль кнопок
   тянется от ширины телефона */
.nar-fixed .ch-adv { font-size: clamp(14px, 3.9vw, 15.5px); }
.nar-fixed .ch-card.small img { width: min(28vw, 100px, calc(var(--vph) * .17)); }
.nar-fixed .ch-card { margin: 8px 0 2px; }

/* Шаг расклада: карта одна на весь экран, ничего лишнего рядом */
.ch-spread { display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 10px; flex: 1; min-height: 0; }
.ch-spread .fan.fan-pick { margin: 0; }
/* Веер в главе крупнее, чем в Практике: там он один из списка инструментов,
   а здесь это сама сцена — карту тянут пальцем, и мелкие рубашки читались как
   иконки (Дима 14 августа: «в историях увеличь веер») */
.ch-spread .fan.fan-pick .fan-card { width: clamp(76px, 24vw, 96px);
  margin: 0 clamp(-28px, -6vw, -18px); }
.ch-spread .reveal-scene { margin: 0 auto; }
/* рамки позиций пары/трёх карт: в flex-колонке с align-items:center ряд
   ужимался до контента и слоты схлопывались в двадцать пикселей */
.ch-spread .sp-row { width: 100%; max-width: 340px; align-self: center; }
.ch-spread .sp-slot { max-width: 96px; }
/* opacity здесь не задаём: у keyframes fadein есть только from, и с нулём в
   правиле карта проявлялась из нуля в ноль — линза просто не показывалась */
.ch-spread .ch-lens { max-width: 32ch; animation: fadein .5s ease both; }
.ch-after-card { max-width: 32ch; margin: 2px auto 0; font-size: 16px;
  animation: fadein .5s ease both; }
.ch-next { margin-top: 4px; max-width: 260px; align-self: center; }
/* у карты главы оси нет: пустую плашку не рисуем */
.card-front .axis:empty { display: none; }

/* Приёмная: гости ждут кресла, игрок выбирает сам, кого позвать */
.hall { display: flex; flex-direction: column; gap: 10px; padding: 14px 0 6px; }
.hall-seat { display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 10px 14px 10px 10px; border-radius: 18px; text-align: left;
  border: 1px solid rgba(201, 168, 76, .22); background: rgba(245, 240, 232, .05);
  color: var(--white); font: inherit; cursor: pointer;
  transition: transform .18s ease, background .18s ease, border-color .18s ease; }
.hall-seat:active { transform: scale(.985); background: rgba(245, 240, 232, .09); }
.hall-seat .medal { width: 54px; height: 54px; font-size: 22px; flex: none; }
.hs-who { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.hs-who b { font-family: var(--serif); font-size: 17.5px; }
.hs-title { color: var(--gray); font-size: 13.5px; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; }
.hs-mark { flex: none; color: var(--gold); font-size: 19px; line-height: 1.1;
  max-width: 42%; text-align: right; }

/* «Поторопить» — приписка к креслу, а не главное действие экрана: во всю
   ширину золотом она перекрикивала самих гостей (14 августа) */
.hall-wait { display: flex; flex-direction: column; align-items: flex-end; gap: 0; }
.hall-wait .hall-seat { width: 100%; }
.hall-hurry { width: auto; align-self: flex-end; margin: -4px 6px 0 0;
  padding: 6px 14px; font-size: 13px; border-radius: 999px; }

/* Салон: одно кресло на виду */
.salon-seat { display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 26px 16px 22px; min-height: calc(100dvh - 210px); justify-content: center; }
.salon-seat b { font-family: var(--serif); font-size: 21px; }
.salon-seat .btn { margin-top: 10px; max-width: 260px; }
.seat-face { transform: scale(1.6); margin-bottom: 14px; }

.salon-quiet { display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 40px 20px; text-align: center; color: var(--gray); }
.salon-quiet .quiet-icon { font-size: 44px; color: var(--gold); }
.salon-quiet p { line-height: 1.55; }

/* Особый совет — четвёртый, платный. Золото отделяет его от трёх бесплатных,
   но не делает «правильным»: он идёт вбок, а не вверх (правило продукта). */
.ch-adv-gold {
  border-color: var(--gold);
  background: linear-gradient(180deg, rgba(201,168,76,.14), rgba(201,168,76,.05));
  position: relative;
  padding-right: 62px;
}
.ch-adv-gold .ch-adv-star { color: var(--gold-bright); margin-right: 6px; }
.ch-adv-gold .ch-adv-price {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  font-size: 13px; font-weight: 700; color: var(--gold-bright); white-space: nowrap;
}

/* Шапка главы: полностью — только на первом экране. Двадцать одно повторение
   «Соня · Голова мыши · глава 1 из 20» съедало треть экрана на каждом тапе. */
.ch-head-first { margin-bottom: 14px; }
.ch-head-slim { margin-bottom: 10px; opacity: .75; }
.ch-head-slim .medal { width: 34px; height: 34px; font-size: 15px; }
.ch-head-slim b { font-size: 15px; }

/* Мост «история → Практика»: тот же инструмент, но теперь про себя. Стоит под
   главной кнопкой и не спорит с ней — это второй шаг, а не альтернатива. */
.ch-offer { margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(201,168,76,.18); }
.ch-offer-h { text-align: center; font-size: 13px; color: var(--gray); margin-bottom: 8px; }
.ch-offer .btn { font-size: 15px; }
.ch-offer .btn .muted { display: block; font-size: 12px; margin-top: 2px; }

/* Кресло рассказывает о себе: во что игрок вкладывается — вечер или сериал.
   Без этого «Рада · глава 1 из 20» и «Влада · глава 1 из 1» выглядели
   одинаково, и выбирать было не из чего (Дима 2026-08-13). */
.hs-chair {
  display: block; font-size: 12px; color: var(--gold);
  opacity: .75; margin-top: 2px;
}

/* «Забрать всё» прибита к низу экрана, а не лежит под списком (Дима
   2026-08-14): до неё не надо доскролливать — она под рукой всё время,
   пока игрок читает, за что ему платят. */
.claim-dock {
  /* fixed над меню, а не sticky в потоке: sticky ныряла ПОД таб-бар
     (bottom:10px меньше его высоты) и терялась (Дима 2026-08-14:
     «её хуй найдёшь, она должна прибита быть к краю, типа над меню») */
  /* ширина — ровно колонка карточек (#root max-width 470 минус паддинги
     страницы, 16px с борта): произвольные свои 440 не совпадали с краями списка (Дима
     2026-08-14: «кнопку выровнять»). Центр — margin-inline, не transform:
     его перебивал бы .btn:active */
  position: fixed; left: 0; right: 0; margin-inline: auto;
  width: calc(min(100vw, 470px) - 32px);
  bottom: calc(66px + max(env(safe-area-inset-bottom), var(--tg-bottom, 0px)) + 10px);
  z-index: 45;
  box-shadow: 0 10px 26px rgba(13,2,33,.8);
}

/* Пополнение лун рядом с балансом: отдельная кнопка в одной строке с монетой,
   не внутри неё. Внутри она и съезжала (абсолютное позиционирование поверх
   чужого паддинга), и пропадала на каждом начислении. */
.hud-money { display: flex; align-items: center; gap: 7px; flex: none; }
.moon-plus {
  width: 30px; height: 30px; padding: 0; flex: none; border-radius: 50%;
  border: 1px solid rgba(201,168,76,.5);
  background: linear-gradient(180deg, rgba(201,168,76,.26), rgba(201,168,76,.12));
  color: var(--gold-bright); font: 400 21px/1 var(--sans, system-ui, sans-serif);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  transition: transform .12s, background .18s;
}
.moon-plus:active { transform: scale(.9); background: rgba(201,168,76,.34); }

/* ── Пополнение лун: строки, а не сетка ──────────────────────────────────
   Сеткой карточки выходили разной высоты (заголовки переносятся по-разному),
   плашка «лучший курс» налезала на соседнюю — Дима 2026-08-14: «вёрстка
   пополнения слетела». Строка одинаковой высоты не может разъехаться: слева
   сумма и выгода, справа цена в звёздах. */
.packs-head { text-align: center; margin-bottom: 6px; }
.packs-head h2 { margin: 2px 0 4px; }
.packs-moon {
  width: 54px; height: 54px; margin: 0 auto 6px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 27px; color: var(--gold-bright);
  background: radial-gradient(circle at 50% 35%, rgba(232,201,106,.28), rgba(201,168,76,.06));
  border: 1px solid rgba(201,168,76,.4);
  box-shadow: 0 0 26px rgba(232,201,106,.22);
}
.packs-have { margin-top: 8px; font-size: 13.5px; color: var(--gray); }
.packs-have b { color: var(--gold-bright); }

.packs { display: flex; flex-direction: column; gap: 9px; margin-top: 16px; }
.pack {
  position: relative; display: flex; align-items: center; justify-content: space-between;
  gap: 12px; width: 100%; min-height: 62px; padding: 12px 14px;
  border-radius: 16px; cursor: pointer; text-align: left;
  background: linear-gradient(180deg, rgba(245,240,232,.07), rgba(245,240,232,.03));
  border: 1px solid rgba(201,168,76,.26); color: var(--white);
  transition: transform .12s, border-color .18s, box-shadow .18s;
}
.pack:active { transform: scale(.985); }
.pack-left { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.pack-sum { font: 800 15px/1.1 var(--serif, serif); color: var(--gold-bright); }
.pack-sum b { font-size: 25px; }
.pack-name { font-size: 12.5px; color: var(--gray);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pack-name i { font-style: normal; color: var(--gold); font-weight: 700; }
.pack-price {
  /* одинаковая ширина пилюль: 99 и 999 звёзд стояли ступеньками, и колонка
     цен выглядела рваной (Дима 2026-08-14: «покупки неровный») */
  flex: none; min-width: 92px; text-align: center;
  padding: 9px 12px; border-radius: 999px; font-size: 15px;
  font-weight: 700; background: rgba(201,168,76,.18);
  border: 1px solid rgba(201,168,76,.36); color: var(--gold-bright);
}
.pack-best { border-color: rgba(232,201,106,.6);
  box-shadow: 0 0 20px rgba(232,201,106,.16); }
.pack-flag {
  /* бейдж сидит РОВНО на рамке, с тенью-подложкой, и не наезжает на пилюлю */
  position: absolute; top: -9px; left: 14px; right: auto;
  padding: 2px 9px; border-radius: 999px; white-space: nowrap;
  font-size: 10px; font-weight: 700; letter-spacing: .3px;
  background: linear-gradient(180deg, #E8C96A, #C9A84C); color: #1B0F33;
  box-shadow: 0 0 0 3px #1B0F33;
}

/* Вопрос к картам — над раскладом, отдельной строкой: игрок должен понимать,
   о чём спрашивает, до того как тянет (контракт 3.0). */
.ch-question { text-align: center; color: var(--gold); font-size: 14px;
  margin: 2px 0 6px; line-height: 1.35; }
/* Спутники «трёх карт» и «пары»: подписанные карты рядом с основной */
.ch-extra { display: flex; justify-content: center; gap: 10px; margin-top: 10px; }
.ch-extra-card { display: flex; flex-direction: column; align-items: center; gap: 2px;
  width: clamp(58px, 17vw, 76px); }
.ch-extra-card img { width: 100%; aspect-ratio: 88/148; object-fit: cover;
  border-radius: 9px; border: 1px solid rgba(201,168,76,.4); }
.ch-extra-card i { font-style: normal; font-size: 10.5px; color: var(--gray); }
.ch-extra-card b { font-size: 11px; color: var(--gold-bright); text-align: center;
  line-height: 1.2; }

.ch-slot-main { text-align: center; font-size: 11.5px; color: var(--gray);
  margin-top: 4px; letter-spacing: .3px; }

/* ── Вход в историю: разгон перед первой репликой ────────────────────────
   Глава открывалась прямо посреди разговора, и читатель не понимал, к кому
   сел (Дима 2026-08-14). Экран короткий: лицо, чем человек живёт и сквозной
   вопрос линии — дальше сразу текст, задерживать тут нечего. */
.ch-intro { display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 12px; min-height: calc(100dvh - 120px);
  text-align: center; }
.ch-premise { max-width: 32ch; color: rgba(245,240,232,.86); line-height: 1.5;
  font-size: 16px; margin: 0; }
.ch-lineq { max-width: 30ch; margin: 0; font-family: var(--serif);
  font-size: 19px; line-height: 1.35; color: var(--gold-bright); }
.ch-intro-step { letter-spacing: .08em; text-transform: lowercase; margin: 0; }
.ch-intro-go { max-width: 260px; width: 100%; margin-top: 6px; }
.ch-intro-face { width: clamp(96px, 30vw, 122px); aspect-ratio: 1; border-radius: 50%;
  overflow: hidden; border: 1px solid rgba(201,168,76,.5); display: flex;
  align-items: center; justify-content: center; background: rgba(20,10,42,.85);
  box-shadow: 0 0 26px rgba(201,168,76,.28); font: 700 40px/1 var(--serif);
  color: var(--gold-bright); }
.ch-intro-face img { width: 100%; height: 100%; object-fit: cover; }




/* ── Лестница чтения дня в приёмной ──────────────────────────────────────
   Три засечки: 3, 6 и 10 глав. Десять — дневной потолок, на нём кончаются и
   главы, и заработок за них (Дима 2026-08-14). Блок кликабельный: ведёт в
   Задания, где эти же вехи забираются лунами. */
.read-goal { border: 1px solid rgba(201,168,76,.28); border-radius: 14px;
  padding: 10px 12px 12px; margin-bottom: 12px; cursor: pointer;
  background: rgba(232,201,106,.05); }
.rg-head { display: flex; align-items: baseline; justify-content: space-between;
  gap: 10px; margin-bottom: 8px; }
.rg-head b { font-family: var(--serif); font-size: 17px; color: var(--gold-bright); }
.rg-track { display: flex; gap: 4px; }
.rg-step { position: relative; display: flex; flex-direction: column;
  align-items: flex-end; gap: 3px; padding-top: 12px; min-width: 0; }
.rg-step::before { content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 5px; border-radius: 3px; background: rgba(245,240,232,.12); }
/* заполнение внутри отрезка: доля прочитанного, а не «всё или ничего» */
.rg-fill { position: absolute; top: 0; left: 0; height: 5px; border-radius: 3px;
  width: var(--fill, 0%); background: linear-gradient(90deg, var(--gold-dim), var(--gold-bright));
  transition: width .5s ease; }
.rg-step.on .rg-fill { width: 100%; }
.rg-step u { text-decoration: none; font-size: 11px; color: var(--gray); }
.rg-step b { font-size: 11px; font-weight: 700; color: var(--gold-dim); }
.rg-step.on b { color: var(--gold-bright); }

/* ── Ударный режим: серия множит награды заданий ─────────────────────────
   Раньше серия была просто счётчиком. Теперь она платит процентом, и строка
   над списком объясняет, почему сегодня дают больше (Дима 2026-08-14). */
/* ── Дизайн-система, ядро (Дима 2026-08-14: «по системе какой-то красивой») ──
   perk-карточка — блок «механики»: иконка в самоцветном круге, заголовок и
   подпись, акцент-чип справа. Один взгляд — одна иерархия: заголовок белым
   жирным, служебное серым, цифры золотым чипом. Новые механики верстаются
   этой карточкой, а не самодельными полосами. */
.perk {
  display: flex; align-items: center; gap: 12px; width: 100%;
  margin: 0 0 10px; padding: 12px 14px; border-radius: 16px;
  border: 1px solid rgba(201,168,76,.22);
  background: linear-gradient(135deg, rgba(245,240,232,.055), rgba(245,240,232,.02));
  color: inherit; font-family: inherit; text-align: left;
}
button.perk { cursor: pointer; transition: transform .1s, filter .15s; }
button.perk:active { transform: translateY(1px); filter: brightness(1.1); }
.perk-ico {
  flex: none; width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 18px;
}
.perk-ico svg { width: 19px; height: 19px; }
.perk.streak .perk-ico { border: 1px solid rgba(232,201,106,.4);
  background: radial-gradient(circle at 35% 30%, rgba(232,201,106,.38), rgba(232,201,106,.06)); }
.perk.boost .perk-ico { border: 1px solid rgba(168,120,255,.45);
  background: radial-gradient(circle at 35% 30%, rgba(168,120,255,.42), rgba(168,120,255,.07)); }
.perk-body { flex: 1; min-width: 0; }
.perk-body b { display: block; font-size: 14.5px; line-height: 1.25; }
.perk-body span { display: block; color: var(--gray); font-size: 12.5px; margin-top: 2px; }
.perk.boost.on { border-color: rgba(232,201,106,.45); background: rgba(232,201,106,.07); }

/* золотой чип: цена, процент, множитель — любые цифры-акценты справа */
.chip-gold {
  flex: none; color: var(--gold-bright); font-weight: 700; font-size: 12.5px;
  padding: 4px 11px; border-radius: 999px; white-space: nowrap;
  border: 1px solid rgba(232,201,106,.4); background: rgba(232,201,106,.12);
}

/* Полупрозрачность у «Поторопить» убрана (Дима 2026-08-14: «почему
   полупрозрачное?»): выцветшая кнопка читается как поломка, а не как
   подсказка. Кнопка выглядит обычной, а нехватка лун объясняется словами —
   тап ведёт в пополнение. */

/* Итог приёма на экране исхода: ряд золотых чипов, что игрок унёс —
   опыт, счёт приёмов дня, вытянутая карта (Дима 2026-08-14: «нет погружения,
   всё прокликивается» — награде нужна видимая точка). */
.ch-reward {
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: center;
  margin: 14px 0 4px;
}

/* Ремарки-действия: курсив отделяет игру сцены от слов. Книжную атрибуцию
   («говорит она», «говорит Влада») фронт срезает совсем — кто говорит, в
   переписке видно по аватарке (Дима 2026-08-14). */
.ch-note { font-style: italic; }
.ch-note-act { font-style: italic; opacity: .85; font-size: 13.5px; }
