/* ============================================================================
   СТИЛИ — «Ленивый менеджер»
   ----------------------------------------------------------------------------
   Палитра и приёмы взяты с референса (тёплые терракотовые тона, карточки
   со скруглениями, карусель 9:16, лайтбокс). Все цвета — в :root, меняются
   в одном месте.

   Разделы:
   1. Палитра и база
   2. Экран и сцены
   3. Кнопки и плашки
   4. Игровые блоки (уведомления, сообщения, конструктор, реклама)
   5. Карусель 9:16 с автопрокруткой
   6. Сетка кейсов (чат-боты)
   7. Прилетающие кейсы (реклама)
   8. Лайтбокс
   9. Адаптив
   ============================================================================ */

/* 1. ПАЛИТРА И БАЗА ----------------------------------------------------- */

:root {
  --bg:          #fdf6ef;
  --bg-warm:     #fff8f0;
  --accent:      #b5653f;
  --accent-soft: #e89b6c;
  --graphite:    #4a2d21;
  --text:        #6b4a38;
  --text-muted:  #9a7a68;
  --card:        #ffffff;
  --peach:       #fbe2c8;

  --ok:          #3f7a4f;
  --ok-bg:       #e7f1e6;
  --bad:         #a3493a;
  --bad-bg:      #fbe6e0;

  --shadow:      0 10px 30px rgba(181, 101, 63, .14);
  --shadow-soft: 0 6px 18px rgba(181, 101, 63, .08);
  --radius:      22px;
  --radius-sm:   14px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Segoe UI', Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 17px;
  overflow-x: hidden;
  min-height: 100vh;
}

.wrap { max-width: 680px; margin: 0 auto; padding: 0 22px; }

h1 { font-size: clamp(30px, 8vw, 44px); font-weight: 800; line-height: 1.1; color: var(--accent); }
h2 { font-size: clamp(24px, 6vw, 32px); font-weight: 800; line-height: 1.15; color: var(--accent); margin-bottom: 14px; }
p  { margin-bottom: 12px; }
strong { color: var(--graphite); font-weight: 700; }

.muted { color: var(--text-muted); font-size: 14px;  white-space: pre-line;}
.muted-center { color: var(--text-muted); font-size: 14px;  white-space: pre-line; text-align: center;}
.center { text-align: center; }

/* Появление при прокрутке — как в референсе */
.reveal { opacity: 0; transform: translateY(28px); transition: all .7s cubic-bezier(.16, 1, .3, 1); }
.reveal.show { opacity: 1; transform: none; }

/* Шапка экрана: прогресс и звук */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(253, 246, 239, .9);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  padding: 12px 0;
}
.topbar .wrap { display: flex; align-items: center; gap: 12px; }
.progress { flex: 1; display: flex; gap: 5px; }
.progress span { flex: 1; height: 4px; border-radius: 4px; background: rgba(181, 101, 63, .18); }
.progress span.done { background: var(--accent); }
.progress span.now  { background: var(--accent-soft); }
.sound-btn {
  background: var(--card); border: none; border-radius: 50%;
  width: 36px; height: 36px; font-size: 16px; cursor: pointer; box-shadow: var(--shadow-soft);
}

/* Экран — один видимый за раз */
.screen { display: none; padding: 28px 0 60px; min-height: calc(100vh - 60px); }
.screen.active { display: block; animation: fadeIn .45s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* 2. СЦЕНЫ ------------------------------------------------------------- */

.scene-img {
  min-height: 200px;
  width: 100%; border-radius: var(--radius); box-shadow: var(--shadow);
  display: block; aspect-ratio: 3 / 2; object-fit: cover;
  background: linear-gradient(135deg, var(--accent-soft), var(--accent));
}

.badge {
  display: inline-block; background: var(--card); color: var(--accent);
  font-weight: 700; font-size: 13px; padding: 7px 16px; border-radius: 50px;
  box-shadow: var(--shadow-soft); margin-bottom: 14px; letter-spacing: .03em;
}

.level-tag {
  display: inline-block; font-size: 13px; font-weight: 700; color: var(--accent);
  text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px;
}

.task {
  font-size: 19px; font-weight: 700; color: var(--graphite); margin-bottom: 18px;
}

.hint {
  font-size: 14px; color: var(--text-muted); text-align: center; margin: 14px 0;
}

.masha {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--peach); border-radius: var(--radius-sm); padding: 14px 16px;
  margin: 18px 0; color: var(--graphite); font-weight: 500;
}
.masha::before { content: "👩"; font-size: 22px; flex-shrink: 0; }

.note-box {
  background: var(--card); border-radius: var(--radius-sm); padding: 16px 18px;
  box-shadow: var(--shadow-soft); margin: 16px 0; font-size: 15px;
}

.honest {
  background: var(--card); border-left: 4px solid var(--accent-soft);
  border-radius: var(--radius-sm); padding: 14px 16px; margin: 14px 0;
  font-size: 15px; color: var(--text);
}

/* Экран 1 — парк: телефон поверх картинки */
.park { position: relative; }
.park-phone-stack {
  position: absolute; right: 6%; top: 10%; width: 40%; max-width: 230px;
  display: flex; flex-direction: column; gap: 8px; pointer-events: none;
}

/* 3. КНОПКИ И ПЛАШКИ --------------------------------------------------- */

.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; max-width: 380px; margin: 8px auto;
  background: linear-gradient(135deg, var(--accent), var(--accent-soft));
  color: #fff; font: inherit; font-weight: 700; font-size: 18px;
  padding: 16px 28px; border: none; border-radius: 50px; cursor: pointer;
  box-shadow: 0 10px 28px rgba(181, 101, 63, .38);
  transition: transform .25s, box-shadow .25s, opacity .25s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(181, 101, 63, .46); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; cursor: default; transform: none; box-shadow: none; }

.btn.ghost {
  background: transparent; color: var(--accent); box-shadow: none;
  border: 1.5px solid rgba(181, 101, 63, .35); font-size: 15px; font-weight: 600;
}
.btn.tg { background: linear-gradient(135deg, #2aabee, #229ed9); box-shadow: 0 10px 28px rgba(34, 158, 217, .4); }
.btn.vk { background: linear-gradient(135deg, #4a76a8, #5b8bc4); box-shadow: 0 10px 28px rgba(74, 118, 168, .4); }
.btn.max { background: linear-gradient(135deg, #5a4bd1, #7b6fe0); box-shadow: 0 10px 28px rgba(90, 75, 209, .4); }

.btn-row { display: flex; flex-direction: column; align-items: center; margin-top: 22px; }

.skip-link {
  display: block; text-align: center; margin: 14px auto 0;
  font-size: 14px; color: var(--text-muted); text-decoration: underline;
  background: none; border: none; cursor: pointer; font: inherit;
}

/* 4. ИГРОВЫЕ БЛОКИ ----------------------------------------------------- */

/* 4.1 Уведомления (экран 1 и 8) */
.notice {
  display: flex; gap: 12px; align-items: center;
  background: rgba(255, 255, 255, .96); border-radius: 18px; padding: 12px 14px;
  box-shadow: 0 8px 24px rgba(74, 45, 33, .18);
  opacity: 0; transform: translateY(-14px) scale(.98);
  transition: opacity .45s ease, transform .45s ease;
}
.notice.show { opacity: 1; transform: none; }
.notice .ic { font-size: 22px; flex-shrink: 0; }
.notice .nt { font-weight: 700; color: var(--graphite); font-size: 15px; line-height: 1.2; }
.notice .ns { font-size: 13px; color: var(--text-muted); }
.notice .bot-tag {
  margin-left: auto; font-size: 11px; font-weight: 700; color: var(--ok);
  background: var(--ok-bg); padding: 3px 8px; border-radius: 50px; white-space: nowrap;
}

/* 4.2 Уровень 1 — рабочее поле и чат нейросети */
.workspace {
  background: var(--card); border-radius: var(--radius); padding: 18px;
  box-shadow: var(--shadow); min-height: 220px; display: flex; flex-direction: column; gap: 12px;
}
.ws-block {
  background: var(--bg-warm); border: 1.5px dashed rgba(181, 101, 63, .35);
  border-radius: var(--radius-sm); padding: 14px 16px; cursor: pointer;
  font-weight: 600; color: var(--graphite); transition: transform .2s, border-color .2s;
}
.ws-block:hover { transform: translateY(-2px); border-color: var(--accent); }
.ws-block.used { opacity: .4; pointer-events: none; }

.chat {
  background: #f6efe8; border-radius: var(--radius-sm); padding: 14px;
  min-height: 150px; display: flex; flex-direction: column; gap: 10px;
}
.bubble {
  max-width: 88%; padding: 10px 14px; border-radius: 16px; font-size: 15px;
  animation: fadeIn .4s ease;
}
.bubble.me  { align-self: flex-end; background: var(--accent); color: #fff; border-bottom-right-radius: 4px; }
.bubble.bot { align-self: flex-start; background: var(--card); color: var(--graphite); border-bottom-left-radius: 4px; box-shadow: var(--shadow-soft); }
.bubble.typing { font-style: italic; color: var(--text-muted); }

/* Блок, который «улетает» в чат */
.fly {
  position: fixed; z-index: 200; pointer-events: none;
  background: var(--accent); color: #fff; border-radius: 16px;
  padding: 10px 14px; font-size: 14px; font-weight: 600;
  transition: transform .6s cubic-bezier(.5, 0, .2, 1), opacity .6s ease;
}

.result-card {
  background: var(--card); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); margin-top: 16px; animation: fadeIn .5s ease;
}
.result-card img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block; background: var(--peach); }
.result-card .rc-body { padding: 16px 18px; }
.result-card .rc-title { font-weight: 800; color: var(--graphite); font-size: 17px; margin-bottom: 6px; }
.result-card .rc-sub { font-size: 14px; color: var(--text); }

/* 4.3 Уровень 2 — сообщения-ловушки */
.msg-field {
  background: #f6efe8; border-radius: var(--radius); padding: 14px;
  display: flex; flex-direction: column; gap: 10px;
  box-shadow: inset 0 2px 10px rgba(74, 45, 33, .06);
}
#l2-field { min-height: 330px; }
.msg {
  background: var(--card); border-radius: 18px; padding: 12px 14px;
  display: flex; gap: 10px; align-items: center; cursor: pointer;
  box-shadow: 0 8px 20px rgba(74, 45, 33, .14);
  transition: opacity .35s ease, filter .35s ease, background .25s;
  animation: msgIn .4s ease;
}
.msg .av { font-size: 24px; flex-shrink: 0; }
.msg .mt { font-size: 14px; font-weight: 700; color: var(--graphite); }
.msg .mx { font-size: 15px; color: var(--text); }
.msg.answered { background: var(--ok-bg); cursor: default; }
.msg.answered .mt::after { content: " · ответила"; color: var(--ok); font-weight: 600; font-size: 12px; }
.msg.missed { opacity: .4; filter: grayscale(.6); cursor: default; }
.msg.missed .mt::after { content: " · пропущено"; color: var(--bad); font-weight: 600; font-size: 12px; }
@keyframes msgIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

.score-line {
  text-align: center; font-size: 15px; font-weight: 700; color: var(--graphite);
  margin: 16px 0 6px;
}

/* 4.4 Уровень 3 — конструктор бота */
.builder {
  position: relative; background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px; min-height: 240px;
}
.field {
  position: relative; border: 2px dashed rgba(181, 101, 63, .3); border-radius: var(--radius-sm);
  min-height: 170px; padding: 14px; display: flex; flex-direction: column; gap: 22px;
  background: var(--bg-warm);
}
.field-label { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; }
.placed {
  position: relative; z-index: 2; background: var(--card); border: 1.5px solid var(--accent-soft);
  border-radius: 14px; padding: 12px 14px; font-size: 15px; color: var(--graphite);
  box-shadow: var(--shadow-soft); animation: fadeIn .4s ease;
}
.link-svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; }
.link-svg path { stroke: var(--accent-soft); stroke-width: 3; fill: none; stroke-dasharray: 260; stroke-dashoffset: 260; transition: stroke-dashoffset .8s ease; }
.link-svg path.draw { stroke-dashoffset: 0; }
.source-block {
  background: var(--card); border-radius: 14px; padding: 12px 14px; font-size: 15px;
  color: var(--graphite); font-weight: 600; cursor: pointer; box-shadow: var(--shadow-soft);
  transition: transform .2s;
}
.source-block:hover { transform: translateY(-2px); }
.source-block.used { opacity: .35; pointer-events: none; }
.source-row { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }

/* 4.5 Уровень 4 — реклама */
.ads-stage {
  background: var(--card); border-radius: var(--radius); padding: 18px;
  box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 14px;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  background: var(--bg-warm); border: 1.5px solid rgba(181, 101, 63, .25);
  border-radius: 50px; padding: 9px 14px; font: inherit; font-size: 14px; font-weight: 600;
  color: var(--graphite); cursor: pointer; transition: all .2s;
}
.chip.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.ad-preview {
  aspect-ratio: 1 / 1; border-radius: var(--radius-sm); background: linear-gradient(135deg, var(--peach), var(--bg-warm));
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  font-weight: 700; color: var(--accent); border: 1.5px dashed rgba(181, 101, 63, .35);
}
.coin {
  width: 96px; height: 96px; margin: 8px auto; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #f7d98a, #c89a3f);
  box-shadow: 0 8px 22px rgba(200, 154, 63, .45), inset 0 -4px 0 rgba(0, 0, 0, .12);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; color: #7a5a17; cursor: pointer; transition: transform .2s;
  font-size: 15px;
}
.coin:hover { transform: scale(1.05); }
.coin.spin { animation: spin .7s ease; }
@keyframes spin { from { transform: rotateY(0); } to { transform: rotateY(720deg); } }
.coin-note { font-size: 12px; color: var(--text-muted); text-align: center; }
.launch-bar { height: 8px; border-radius: 8px; background: rgba(181, 101, 63, .15); overflow: hidden; }
.launch-bar span { display: block; height: 100%; width: 0; background: var(--accent); transition: width 1.2s ease; }

/* 4.6 Итог и кураторство — список */
.item-list { list-style: none; }
.item-list li {
  display: flex; gap: 14px; align-items: flex-start; background: var(--card);
  padding: 15px; border-radius: 16px; margin-bottom: 11px; box-shadow: var(--shadow-soft);
}
.item-list .em { font-size: 22px; flex-shrink: 0; }

.two-cards { display: grid; gap: 14px; }
.info-card {
  background: var(--card); border-radius: var(--radius); padding: 20px;
  box-shadow: var(--shadow-soft);
}
.info-card .em { font-size: 28px; margin-bottom: 6px; }
.info-card h3 { font-size: 19px; color: var(--graphite); margin-bottom: 6px; }
.info-card .honest-line { font-size: 14px; color: var(--ok); margin-top: 8px; font-weight: 600; }

/* 4.7 Экран «Три двери / мессенджер» */
.choice {
  display: flex; gap: 14px; align-items: center; width: 100%;
  background: var(--card); border: 2px solid transparent; border-radius: var(--radius-sm);
  padding: 16px; margin-bottom: 12px; font: inherit; text-align: left; cursor: pointer;
  box-shadow: var(--shadow-soft); transition: border-color .2s, transform .2s;
}
.choice:hover { transform: translateY(-2px); }
.choice.on { border-color: var(--accent); background: var(--bg-warm); }
.choice .em { font-size: 26px; flex-shrink: 0; }
.choice .ct { font-weight: 700; color: var(--graphite); font-size: 16px; }
.choice .cs { font-size: 14px; color: var(--text-muted); }

.consent {
  display: flex; gap: 12px; align-items: flex-start; background: var(--card);
  border-radius: var(--radius-sm); padding: 14px 16px; margin-bottom: 10px;
  box-shadow: var(--shadow-soft); cursor: pointer; font-size: 15px;
}
.consent input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--accent); flex-shrink: 0; }
.consent .cn { display: block; font-size: 13px; color: var(--text-muted); margin-top: 2px; }

/* 5. КАРУСЕЛЬ 9:16 С АВТОПРОКРУТКОЙ ------------------------------------ */

.gallery-block { text-align: center; padding: 30px 0 10px; }
.gallery-block h2 { margin-bottom: 8px; }
.gallery-block .gsub { color: var(--text); margin: 0 auto 20px; max-width: 540px; padding: 0 6px; }

.carousel-wrapper { position: relative; max-width: 1000px; margin: 0 auto; padding: 0 44px; }

.carousel {
  display: flex; gap: 14px; overflow-x: auto; scroll-behavior: auto;
  padding: 8px 4px 14px; scrollbar-width: none; -ms-overflow-style: none;
}
.carousel::-webkit-scrollbar { display: none; }

.carousel .card {
  flex: 0 0 auto; width: 170px; aspect-ratio: 9 / 16; position: relative;
  border-radius: 8px; overflow: hidden; cursor: pointer;
  box-shadow: 0 3px 8px rgba(0, 0, 0, .14);
  transition: transform .25s ease, box-shadow .25s ease;
}
.carousel .card:hover { transform: translateY(-4px); box-shadow: 0 10px 24px rgba(0, 0, 0, .2); }
.carousel .card img { width: 100%; height: 100%; object-fit: cover; display: block; background: var(--peach); }

.card-caption {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: rgba(74, 45, 33, .48); color: #fff3e9;
  font-size: 13px; line-height: 1.35; padding: 9px 11px; text-align: left;
  white-space: pre-line;
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
}

.carousel-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 38px; height: 38px; border: none; border-radius: 50%;
  background: var(--accent); color: #fff; font-size: 22px; cursor: pointer; opacity: .9;
  display: flex; align-items: center; justify-content: center;
}
.carousel-arrow:hover { opacity: 1; }
.carousel-arrow.prev { left: 0; }
.carousel-arrow.next { right: 0; }

.carousel-progress {
  width: 120px; height: 5px; background: rgba(181, 101, 63, .2);
  border-radius: 10px; margin: 16px auto 0; overflow: hidden;
}
.carousel-progress span { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 10px; transition: width .2s ease; }

/* 6. СЕТКА КЕЙСОВ (чат-боты) ------------------------------------------- */

.grid-cases {
  display: grid; gap: 8px; margin: 0 auto; max-width: 620px;
  grid-template-columns: repeat(var(--cols, 6), 1fr);
}
.grid-cases .gc {
  aspect-ratio: 9 / 16; border-radius: 12px; overflow: hidden; cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .12); transition: transform .2s;
  background: var(--peach);
}
.grid-cases .gc:hover { transform: translateY(-3px); }
.grid-cases .gc img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* 7. ПРИЛЕТАЮЩИЕ КЕЙСЫ (реклама) --------------------------------------- */

.fly-stage {
  position: relative; height: 380px; overflow: hidden;
  border-radius: var(--radius); background: var(--bg-warm);
}
.fly-invite {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 150px; aspect-ratio: 9 / 16; border-radius: 18px; overflow: hidden; cursor: pointer;
  box-shadow: 0 10px 28px rgba(181, 101, 63, .35); z-index: 3;
  transition: transform .15s ease;
}
.fly-invite:active { transform: translate(-50%, -50%) scale(.96); }
.fly-invite img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fly-invite .inv-text {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 10px;
  background: var(--accent); color: #fff; font-size: 13px; font-weight: 700; text-align: center;
}
.fly-card {
  position: absolute; top: 50%; width: 110px; aspect-ratio: 9 / 16; border-radius: 14px;
  overflow: hidden; cursor: pointer; z-index: 2;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .18);
  animation: flyIn .6s cubic-bezier(.2, .8, .3, 1) forwards;
}
.fly-card.left  { left: 4%; }
.fly-card.right { right: 4%; }
.fly-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
@keyframes flyIn {
  from { opacity: 0; transform: translateY(-50%) scale(.6); }
  to   { opacity: 1; transform: translateY(-50%) scale(1); }
}
.fly-count { text-align: center; font-size: 13px; color: var(--text-muted); margin-top: 8px; }

/* 8. ЛАЙТБОКС ---------------------------------------------------------- */

.lightbox {
  display: none; position: fixed; inset: 0; z-index: 999;
  background: rgba(40, 22, 15, .9); align-items: center; justify-content: center; padding: 18px;
}
.lightbox.open { display: flex; }
.lb-inner { position: relative; max-width: 520px; width: 100%; text-align: center; }
.lb-img { display: block; width: auto; height: auto; max-width: 100%; max-height: 74vh; margin: 0 auto; border-radius: 8px; background: transparent; }
.lb-caption { color: #fff3e9; margin-top: 14px; font-size: 15px; line-height: 1.5; text-align: left; padding: 0 4px; white-space: pre-line; }
.lb-caption .lb-name { font-weight: 700; color: #fff; display: block; margin-bottom: 4px; }
.lb-consent { font-size: 12px; color: rgba(255, 243, 233, .6); margin-top: 8px; text-align: left; }
.lb-close {
  position: absolute; top: -8px; right: 0; font-size: 36px; color: #fff; cursor: pointer;
  background: none; border: none; line-height: 1; padding: 6px 10px; z-index: 2;
}
.lb-arrow {
  position: absolute; top: 37%; transform: translateY(-50%);
  width: 46px; height: 46px; border: none; border-radius: 50%;
  background: rgba(181, 101, 63, .85); color: #fff; font-size: 26px; cursor: pointer; z-index: 2;
}
.lb-arrow:hover { background: var(--accent); }
.lb-arrow.prev { left: -58px; }
.lb-arrow.next { right: -58px; }

/* 9. АДАПТИВ ----------------------------------------------------------- */

@media (max-width: 600px) {
  .carousel-wrapper { padding: 0 32px; }
  .carousel .card { width: 150px; }
  .grid-cases { --cols: 3; }
  .lb-arrow.prev { left: 6px; }
  .lb-arrow.next { right: 6px; }
  .lb-arrow { top: auto; bottom: -62px; transform: none; }
  .lb-caption { margin-bottom: 40px; }
  .park-phone-stack { width: 46%; right: 4%; }
}

@media (min-width: 680px) {
  .two-cards { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  
  /* Пузыри в попапе появляются анимацией, а она выше отключена.
     Без этой строки они остаются с opacity: 0 — текст есть, но невидим. */
  .popup-body .bubble { opacity: 1 !important; transform: none !important; }
}

/* --- дополнения после проверки --- */
.lb-counter { color: rgba(255,243,233,.7); font-size: 13px; margin-top: 10px; }
.consent a { color: var(--accent); }
.fly-card { transform: translateY(0); }
@keyframes flyIn {
  from { opacity: 0; transform: translateX(var(--fx, 0)) scale(.5); }
  to   { opacity: 1; transform: none; }
}
.fly-card.left  { --fx: 140px; }
.fly-card.right { --fx: -140px; }
.fly-stage { height: 400px; }
.fly-card { width: 96px; }
#l3-done { color: var(--ok); }
.coin { font-size: 40px; }
.choice { color: inherit; }

/* Лайтбокс: стрелки и крестик всегда в пределах экрана */
.lightbox { overflow-y: auto; }
.lb-inner { max-height: 100%; display: flex; flex-direction: column; align-items: center; }
.lb-img { max-height: 92vh; }
.lb-caption { max-height: 22vh; overflow-y: auto; }
.lb-close { position: fixed; top: 10px; right: 12px; background: rgba(0,0,0,.35); border-radius: 50%; width: 44px; height: 44px; padding: 0; z-index: 1001; }
@media (max-width: 600px) {
  .lb-arrow { position: fixed; top: 50%; bottom: auto; transform: translateY(-50%); width: 42px; height: 42px; font-size: 24px; z-index: 1001; }
  .lb-arrow.prev { left: 6px; }
  .lb-arrow.next { right: 6px; }
  .lb-caption { margin-bottom: 0; }
}

/* ════════════════════════════════════════════════════════════════════════
   ПРАВКИ v2
   ════════════════════════════════════════════════════════════════════════ */

/* --- Экран 1: заголовок над картинкой --- */
.hero-head { text-align: center; margin: 4px 0 18px; }
.hero-head h1 { letter-spacing: .04em; font-size: clamp(30px, 9vw, 46px); }
.hero-sub {
  margin: 6px 0 0; font-size: 15px; font-weight: 600; color: var(--text-muted);
  text-transform: lowercase; letter-spacing: .12em;
}

/* --- Уведомления на картинке парка ---
   90% непрозрачности: картинка чуть просвечивает.
   Текст переносится, а не уходит за край. */
.park-phone-stack {
  right: 4%; top: 6%; width: 58%; max-width: 280px;
}
.park-phone-stack .notice {
  background: rgba(255, 255, 255, .65);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  padding: 9px 11px; gap: 9px; border-radius: 14px;
  min-width: 0;
}
.notice > div { min-width: 0; flex: 1; }
.notice .nt, .notice .ns {
  white-space: normal; overflow-wrap: anywhere; word-break: normal;
}
.park-phone-stack .notice .nt { font-size: 13px; }
.park-phone-stack .notice .ns { font-size: 12px; line-height: 1.3; }
.park-phone-stack .notice .ic { font-size: 18px; }
/* Уезжает вверх и гаснет */
.notice.hide {
  opacity: 0; transform: translateY(-12px) scale(.97);
  transition: opacity .5s ease, transform .5s ease;
}
@media (max-width: 600px) {
  .park-phone-stack { width: 64%; right: 3%; top: 5%; }
}

/* --- Раскрывающиеся блоки (как на «Ход Мамы») --- */
.acc { background: var(--card); border-radius: 16px; margin: 22px 0 6px; box-shadow: var(--shadow-soft); overflow: hidden; }
.acc-q {
  width: 100%; text-align: left; background: none; border: none; cursor: pointer;
  padding: 17px 20px; font: inherit; font-size: 17px; font-weight: 700; color: var(--graphite);
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.acc-q .arrow {
  flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%;
  background: var(--peach); color: var(--accent); font-size: 20px; line-height: 30px; text-align: center;
  transition: transform .3s;
}
.acc.open .arrow { transform: rotate(45deg); }
.acc-a { max-height: 0; overflow: hidden; transition: max-height .45s ease, padding .45s ease; padding: 0 20px; }
.acc.open .acc-a { max-height: 1600px; padding: 0 20px 18px; }
.acc-a p { margin: 0 0 10px; color: var(--text); font-size: 15px; }

/* --- Текстовая кнопка-ссылка (открывает попап) --- */
.link-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: none; cursor: pointer; padding: 6px 0;
  font: inherit; font-size: 14px; font-weight: 600; color: var(--accent);
  text-decoration: underline; text-underline-offset: 3px;
}
.link-btn::before { content: "💬"; text-decoration: none; }
.link-btn:empty { display: none; }

/* --- Подсказка «нажми сюда»: блок мягко светится и пульсирует --- */
.tap-me {
  position: relative;
  border: 2px solid var(--accent) !important;
  animation: tapPulse 1.6s ease-in-out infinite;
}
@keyframes tapPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(181, 101, 63, .45), 0 6px 18px rgba(181, 101, 63, .12); transform: scale(1); }
  50%      { box-shadow: 0 0 0 9px rgba(181, 101, 63, 0),  0 10px 24px rgba(181, 101, 63, .25); transform: scale(1.02); }
}
/* Строка-подсказка под блоком: ярче и со стрелкой вверх */
.hint.hint-tap {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  color: var(--accent); font-weight: 700; font-size: 15px; margin: 10px 0 4px;
}
.hint.hint-tap::before {
  content: "☝️"; font-size: 20px; display: inline-block;
  animation: pointUp 1.2s ease-in-out infinite;
}
@keyframes pointUp { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

/* --- Уровень 1: блок под игрой --- */
.note-box.accent {
  background: #fdf0e8;
  border-left: 4px solid var(--accent);
  color: var(--graphite); font-weight: 500;
}

/* Карусель сообщений учениц */
.chat-carousel {
  display: flex; gap: 12px; overflow-x: auto; padding: 6px 4px 14px;
  scrollbar-width: none; -ms-overflow-style: none;
}
.chat-carousel::-webkit-scrollbar { display: none; }
.chat-card {
  flex: 0 0 auto; width: 270px; background: var(--card); border-radius: 18px;
  padding: 14px; box-shadow: var(--shadow-soft);
  display: flex; flex-direction: column; gap: 10px;
}
.chat-card .cc-head { display: flex; align-items: center; gap: 10px; }
.chat-card .cc-av {
  width: 42px; height: 42px; border-radius: 50%; background: var(--peach);
  display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0;
  overflow: hidden;
}
.chat-card .cc-av img { width: 100%; height: 100%; object-fit: cover; }
.chat-card .cc-name { font-weight: 700; color: var(--graphite); font-size: 15px; line-height: 1.2; }
.chat-card .cc-role { font-size: 12px; color: var(--text-muted); }
.chat-card .cc-img {
  width: 100%; aspect-ratio: 22 / 9; object-fit: cover; display: block;
  border-radius: 12px; background: var(--peach); cursor: pointer;
}
.chat-card .cc-text {
  background: var(--bg-warm); border-radius: 4px 16px 16px 16px; padding: 10px 12px;
  font-size: 14px; line-height: 1.5; color: var(--text);
  white-space: pre-wrap;
}
.chat-nav { display: flex; justify-content: center; gap: 10px; margin-top: 4px; }
.chat-nav button {
  width: 38px; height: 38px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--accent); color: #fff; font-size: 20px; opacity: .9;
}

/* Сетка работ 6×2 */
.grid-cases.works .gc { aspect-ratio: 4 / 5; }
@media (max-width: 600px) {
  .grid-cases.works { --cols: 3 !important; }
}

/* --- Уровень 2 --- */
.task-explain {
  background: var(--card); border-left: 4px solid var(--accent);
  border-radius: var(--radius-sm); padding: 12px 14px; margin: -6px 0 16px;
  font-size: 15px; color: var(--graphite); box-shadow: var(--shadow-soft);
}
.countdown {
  text-align: center; color: var(--accent); font-weight: 800; font-size: 15px; padding: 14px 0;
}

/* --- Финал --- */

/* --- Попап-сообщение --- */
.popup {
  position: fixed; inset: 0; z-index: 900; display: none;
  background: rgba(40, 22, 15, .45); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
  align-items: flex-end; justify-content: center; padding: 14px;
}
.popup.open { display: flex; animation: fadeIn .25s ease; }
.popup-card {
  width: 100%; max-width: 480px; max-height: 86vh; overflow-y: auto;
  background: var(--bg); border-radius: 22px; padding: 16px 16px 12px;
  box-shadow: 0 20px 50px rgba(40, 22, 15, .35);
  animation: popUp .35s cubic-bezier(.2, .8, .3, 1);
}
@keyframes popUp { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.popup-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.popup-av {
  width: 40px; height: 40px; border-radius: 50%; background: var(--peach);
  display: flex; align-items: center; justify-content: center; font-size: 22px;
}
.popup-name { font-weight: 700; color: var(--graphite); line-height: 1.2; }
.popup-status { font-size: 12px; color: var(--ok); }
.popup-x {
  margin-left: auto; width: 36px; height: 36px; border: none; border-radius: 50%;
  background: var(--card); color: var(--text); font-size: 22px; cursor: pointer;
}
.popup-title { font-weight: 800; color: var(--accent); font-size: 18px; margin: 4px 2px 10px; }
.popup-body .bubble {
  max-width: 94%; margin-bottom: 8px; font-size: 15px; line-height: 1.5;
  align-self: flex-start; background: var(--card); color: var(--graphite);
  border-radius: 4px 16px 16px 16px; box-shadow: var(--shadow-soft);
  opacity: 0; animation: bubbleIn .35s ease forwards;
}
.popup-body { display: flex; flex-direction: column; }
.popup-body .bubble { white-space: pre-line; }   /* \n в тексте = новая строка */
@keyframes bubbleIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.popup .btn { margin-top: 8px; }
@media (min-width: 700px) { .popup { align-items: center; } }

/* Кнопка возврата на путь (финал воронки) */
.continue-box { margin-top: 22px; padding-top: 18px; border-top: 1px dashed rgba(181, 101, 63, .3); }
.continue-box .muted { margin-bottom: 4px; }
/* Вторая строка подзаголовка */
.hero-sub-note {
  margin: 4px 0 0; font-size: 14px; font-weight: 500; line-height: 1.45;
  color: var(--text); opacity: .85; max-width: 30em;
  margin-left: auto; margin-right: auto;
}


/* ═══════════ ГАЛЕРЕЯ «СВОИ ДЕНЬГИ ЭТО…» — карточка-вкладыш ═══════════ */
#money-cards {
  --mc-red:    #d8322f;   /* заголовок и сердечки — как на вкладышах */
  --mc-ink:    #2b2320;   /* подпись */
  --mc-paper:  #ffffff;   /* поле картинки */
  --mc-frame:  #fffdf8;   /* рамка карточки */
  --mc-line:   #513C33;   /* рамка карточки */
  margin: 28px 0 6px;
}
.mc-head { padding-top: 0; }
.mc-stage { display: flex; justify-content: center; perspective: 1200px; }

.mc-card {
  all: unset; box-sizing: border-box; cursor: pointer;
  width: min(100%, 340px); aspect-ratio: 4 / 5;
  display: flex; flex-direction: column;
  box-shadow: 0 1px 0 rgba(0,0,0,.04), 0 12px 28px rgba(74, 45, 33, .18);
  background: var(--mc-frame); border-radius: 7px; padding: 18px 20px 14px;
  position: relative;
  transform-style: preserve-3d; will-change: transform;
  -webkit-tap-highlight-color: transparent; user-select: none;
}

/* Рамка как на вкладыше: тонкая линия с отступом от края */
.mc-card::after {
  content: "";
  position: absolute;
  inset: 10px;                         /* отступ рамки от края карточки */
  border: 2.5px solid var(--mc-line); /* толщина и цвет линии */
  border-radius: 1px;                 /* скругление углов рамки */
  pointer-events: none;               /* рамка не мешает нажатию */
}

.mc-card:focus-visible { box-shadow: 0 0 0 3px var(--accent), 0 12px 28px rgba(74,45,33,.18); }

.mc-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.mc-title {
  font-family: "Times New Roman" /* "Comic Sans MS", "Marker Felt", "Segoe Print" */ ,cursive;
  font-weight: 700; font-style: italic; font-size: clamp(19px, 5.4vw, 24px);
  color: var(--mc-red); line-height: 1.1;
}
.mc-hearts { color: var(--mc-red); font-size: 22px; letter-spacing: -6px; line-height: 1; transform: rotate(-8deg); }

.mc-pic {
  flex: 1 1 auto; min-height: 0; margin: 8px 0; border-radius: 8px; overflow: hidden;
  background: var(--mc-paper); display: flex; align-items: center; justify-content: center;
}
.mc-pic img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.mc-pic.mc-emoji { font-size: clamp(72px, 24vw, 110px); background: #fff6ee; }

.mc-cap {
  font-family: Georgia, "Times New Roman", serif; font-weight: 700;
  font-size: clamp(15px, 4.2vw, 17px); line-height: 1.3; color: var(--mc-ink);
  text-align: right; min-height: 2.6em;
}
.mc-foot { display: flex; justify-content: flex-end; margin-top: 4px; }
.mc-num { font-size: 12px; color: var(--text-muted); font-variant-numeric: tabular-nums; }

/* перелистывание: уходит в одну сторону, приходит с другой */
.mc-out-l { animation: mcOutL .22s ease-in forwards !important; }
.mc-out-r { animation: mcOutR .22s ease-in forwards !important; }
.mc-in-r  { animation: mcInR  .26s ease-out !important; }
.mc-in-l  { animation: mcInL  .26s ease-out !important; }
@keyframes mcOutL { to { transform: rotateY(-75deg) translateX(-14px); opacity: 0; } }
@keyframes mcOutR { to { transform: rotateY(75deg)  translateX(14px);  opacity: 0; } }
@keyframes mcInR  { from { transform: rotateY(75deg)  translateX(14px);  opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes mcInL  { from { transform: rotateY(-75deg) translateX(-14px); opacity: 0; } to { transform: none; opacity: 1; } }

.mc-dots { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin: 14px 0 0; }
.mc-dot { all: unset; cursor: pointer; width: 8px; height: 8px; border-radius: 50%; background: rgba(181,101,63,.25); transition: transform .2s, background .2s; }
.mc-dot.on { background: var(--accent); transform: scale(1.35); }
.mc-hint { margin-top: 8px; }

.hl { color: var(--accent); font-weight: 700; }


/* Лайтбокс без текста (lightboxText: false в cases.js) — картинке достаётся весь экран */
.lightbox.lb-clean .lb-caption,
.lightbox.lb-clean .lb-counter,
.lightbox.lb-clean .lb-consent { display: none; }
.lightbox.lb-clean .lb-img { max-height: 95vh; }
/* В режиме без текста счётчик скрыт — но если листать есть что, он нужен */
.lightbox.lb-clean.lb-multi .lb-counter { display: block; }


/* Мерцание подсказки «нажми сюда», когда в системе выключены анимации.
   Мигает обводка (outline), блок не двигается и не увеличивается. */
@media (prefers-reduced-motion: reduce) {
  .tap-me { animation: tapGlow 1.8s ease-in-out infinite !important; }
}
@keyframes tapGlow {
  0%, 100% { outline: 2px solid rgba(181, 101, 63, .15); outline-offset: 2px; }
  50%      { outline: 2px solid rgba(181, 101, 63, .5); outline-offset: 4px; }
}

/* ── Объявление на «Уровне 1»: на широком экране картинка слева, текст справа ── */
@media (min-width: 700px) {
  .result-card {
    display: grid;
    grid-template-columns: 40% 60%;
    align-items: stretch;
  }
  .result-card img {
    height: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 0;
  }
  .result-card .rc-body {
    display: flex; flex-direction: column; justify-content: center;
    padding: 18px 22px;
  }
  /* Лёгкая рамка вокруг объявления на «Уровне 1» — выделяет его из общего текста */
  .result-card { border: 1px solid rgba(74, 45, 33, .24); background: #FEF4E7; }
@media (min-width: 700px) {
  .result-card img { border-right: 1px solid rgba(74, 45, 33, .10); }
  }
}

.note-box.accent { white-space: pre-line; }
