:root {
  --ink: #2A2420;
  --muted: #7A706A;
  --paper: #FFF8F0;
  --line: #EFE3D6;
  --plus: #3FA36B;
  --minus: #E0484B;
  --zero: #9A8F87;
  /* кнопки яркие и холодные, чтобы не сливались с теплым полом и стенами */
  --btn: #2F5BFF;
  --btn-ink: #FFFFFF;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #B9A3CF;
  color: var(--ink);
  font-family: "Nunito", "Arial Rounded MT Bold", system-ui, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

/* ===== Комната на весь экран ===== */
/* Картинка заполняет экран по высоте. На телефоне бока срезаются (до ~15%), сдвиг по ширине задает fx комнаты в app.js.
   На широком экране по бокам размытая копия фона. */
/* clip, а не hidden: иначе браузер подкручивает сцену к нажатой или выделенной наклейке */
.scene { position: fixed; inset: 0; overflow: hidden; overflow: clip; background: #B9A3CF; }
.scene-blur {
  position: absolute;
  inset: -60px;
  width: calc(100% + 120px);
  height: calc(100% + 120px);
  object-fit: cover;
  filter: blur(28px) saturate(.9);
  opacity: .75;
}
.world {
  position: absolute;
  top: 0; left: 0;
  height: 100%;
  aspect-ratio: 1024 / 1536;
  container-type: inline-size;
  user-select: none; -webkit-user-select: none;
}
.scene-bg { display: block; width: 100%; height: 100%; }

.hero, .sticker {
  position: absolute;
  transform: translateX(-50%);
}
.hero { pointer-events: none; height: auto; }

.sticker {
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  transform: translateX(-50%) rotate(var(--rot, 0deg));
  transform-origin: 50% 100%;
  transition: transform .25s cubic-bezier(.2, 1.4, .4, 1), opacity .3s, filter .3s;
  touch-action: manipulation;
}
.sticker--text { width: max-content; }
.sticker img { display: block; width: 100%; height: auto; pointer-events: none; }
.sticker:active { transform: translateX(-50%) rotate(var(--rot, 0deg)) translateY(-4%) scale(1.07); }
.sticker:focus-visible { outline: 3px solid var(--btn); outline-offset: 2px; border-radius: 12px; }

/* Бабл «Ма-а-ам!»: кричат из-за двери, хвостик смотрит за край кадра */
.bubble {
  position: relative;
  display: block;
  padding: .45em .6em .5em;
  border: max(2px, .42cqw) solid var(--ink);
  border-radius: 1.1em;
  background: #fff;
  color: var(--ink);
  font-size: 3.5cqw;
  font-weight: 900;
  line-height: 1.05;
  text-align: center;
  white-space: nowrap;
  box-shadow: 0 1.1cqw 1.4cqw rgba(60, 40, 30, .22);
}
.bubble::before, .bubble::after {
  content: "";
  position: absolute;
  border-style: solid;
  border-color: transparent;
}
/* хвостик вниз: кричат из-под двери */
.bubble--down::before { left: 50%; bottom: -0.78em; margin-left: -.36em; border-width: .74em .36em 0; border-top-color: var(--ink); }
.bubble--down::after { left: 50%; bottom: -0.5em; margin-left: -.24em; border-width: .52em .24em 0; border-top-color: #fff; }
/* хвостик вправо: кричат из-за края кадра */
.bubble--right::before { right: -0.74em; bottom: .55em; border-width: .34em 0 .34em .7em; border-left-color: var(--ink); }
.bubble--right::after { right: -0.5em; bottom: .65em; border-width: .24em 0 .24em .52em; border-left-color: #fff; }

/* Уведомление «Рабочий чат»: как пуш на телефоне, в рисованной обводке */
.notice {
  display: block;
  width: max-content;
  max-width: 34cqw;
  padding: .5em .7em .6em;
  border: max(2px, .42cqw) solid var(--ink);
  border-radius: .9em;
  background: #fff;
  color: var(--ink);
  font-size: 3.2cqw;
  text-align: left;
  box-shadow: 0 1.1cqw 1.4cqw rgba(60, 40, 30, .22);
}
.notice__from {
  display: flex;
  white-space: nowrap;
  align-items: center;
  gap: .4em;
  font-size: .8em;
  font-weight: 800;
  line-height: 1.1;
  color: var(--muted);
}
.notice__from::before {
  content: "";
  flex: none;
  width: 1em; height: 1em;
  border-radius: .3em;
  background: #3E8EF7;
}
.notice__text { display: block; margin-top: .25em; font-weight: 900; line-height: 1.12; }

/* Смена комнаты */
.world { transition: opacity .28s ease; }
.scene.is-switching .world { opacity: 0; }

/* Рекламные предметы чуть ярче фона, чтобы их замечали первыми */
.sticker--brand img { filter: saturate(1.45) contrast(1.06) brightness(1.03); }

/* Наклейка, вырезанная из самого фона (кровать): не качается и почти не прыгает, иначе видно нарисованную под ней */
.scene .sticker--still { animation: none !important; }
.sticker--still:active { transform: translateX(-50%) scale(1.01); }

/* легкое «дыхание», чтобы было видно, что наклейки живые; по очереди */
@media (prefers-reduced-motion: no-preference) {
  .scene:not(.is-chosen) .sticker { animation: wiggle 4.8s ease-in-out infinite; }
  .scene:not(.is-chosen) .sticker:nth-of-type(2n) { animation-delay: -1.6s; }
  .scene:not(.is-chosen) .sticker:nth-of-type(3n) { animation-delay: -3.1s; }
}
@keyframes wiggle {
  0%, 82%, 100% { transform: translateX(-50%) rotate(var(--rot, 0deg)); }
  88% { transform: translateX(-50%) rotate(calc(var(--rot, 0deg) - 4deg)) translateY(-2%); }
  94% { transform: translateX(-50%) rotate(calc(var(--rot, 0deg) + 3deg)); }
}

/* После выбора остальные предметы не бледнеют, просто больше не нажимаются (выбор один на комнату) */
.scene.is-chosen .sticker:not(.is-picked) { cursor: default; }
.check {
  position: absolute;
  top: -6%; right: -6%;
  display: none;
  place-items: center;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--plus);
  color: #fff;
  font-weight: 900;
  font-size: 17px;
  box-shadow: 0 0 0 3px #fff;
}
.sticker.is-picked .check { display: grid; }
/* у бабла и уведомления галочка за углом, чтобы не закрывать текст */
.sticker--text .check { top: -18px; right: -18px; }

/* ===== Плашки поверх картинки ===== */
.plate {
  position: fixed;
  z-index: 5;
  left: 50%;
  transform: translateX(-50%);
  width: min(100% - 20px, 500px);
  background: #fff;
  box-shadow: 0 4px 14px rgba(42, 36, 32, .14);
}
.plate--top {
  top: calc(10px + var(--safe-t));
  display: flex;
  align-items: flex-start;   /* лого и название выровнены по верху, а не по центру */
  gap: 10px;
  padding: 14px 14px;
  border-radius: 20px;
}
/* плашка крупнее (правка 09.11): лого и название читаются с телефона */
.logo { height: 26px; width: auto; flex: none; }
/* margin-top: верх букв названия на одной линии с верхом лого */
.title { flex: 1; min-width: 0; margin-top: -3px; font-weight: 900; font-size: 19px; line-height: 1.15; }
.plate--top .battery { align-self: center; }

/* Телефон: батарейка отдельной строкой под лого и названием, название целиком в одну строку */
@media (max-width: 520px) {
  .plate--top { flex-wrap: wrap; row-gap: 10px; padding: 13px 14px 12px; }
  .title { font-size: clamp(16px, 4.7vw, 19px); }
  .plate--top .battery { flex-basis: 100%; align-self: flex-start; justify-content: center; }
  .battery-num { min-width: 0; }   /* по центру без пустого хвоста справа от цифры */
}

.battery { display: flex; align-items: center; gap: 3px; flex: none; }
.battery-body {
  display: flex;
  gap: 1.5px;
  width: 56px; height: 26px;
  border: 2.5px solid var(--ink);
  border-radius: 6px;
  padding: 2px;
}
.battery-body i {
  flex: 1;
  border-radius: 1.5px;
  background: transparent;
}
.battery-body i.on { background: var(--plus); animation: barIn .35s cubic-bezier(.2, 1.4, .4, 1) both; }
@keyframes barIn { from { transform: scaleY(.2); opacity: 0; } to { transform: none; opacity: 1; } }
.battery-cap { width: 3.5px; height: 10px; background: var(--ink); border-radius: 0 2px 2px 0; }
.battery-num { margin-left: 5px; font-weight: 900; font-size: 18px; font-variant-numeric: tabular-nums; min-width: 40px; }
.battery.is-mid .battery-body i.on { background: #F2B33D; }
.battery.is-low .battery-body i.on { background: var(--minus); animation: blink 1s steps(2, start) infinite; }
.battery.is-low .battery-num { color: var(--minus); }
@keyframes blink { to { opacity: .25; } }

/* Вспышка при выборе: батарейка вздрагивает, под ней ярлык «+15%» или «−5%» */
.battery { position: relative; }
body.sheet-open .plate--top { z-index: 21; }   /* шапка видна над затемнением попапа */
.battery.is-gain .battery-body { animation: battGain 1.1s ease-out; }
.battery.is-loss .battery-body { animation: battLoss .6s ease-in-out; }
.battery.is-gain .battery-num { color: var(--plus); }
.battery.is-loss .battery-num { color: var(--minus); }
@keyframes battGain {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(63, 163, 107, .6); }
  25% { transform: scale(1.18); }
  60% { transform: scale(1); box-shadow: 0 0 0 10px rgba(63, 163, 107, 0); }
  100% { box-shadow: 0 0 0 0 rgba(63, 163, 107, 0); }
}
@keyframes battLoss {
  0%, 100% { transform: none; }
  20% { transform: translateX(-4px) rotate(-3deg); }
  40% { transform: translateX(4px) rotate(3deg); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(2px); }
}
.battery-delta {
  position: absolute;
  top: calc(100% + 18px);
  left: 50%;
  padding: 5px 12px;
  border-radius: 999px;
  color: #fff;
  font-size: 20px;
  font-weight: 900;
  line-height: 1.1;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 4px 14px rgba(42, 36, 32, .22);
  pointer-events: none;
  animation: deltaTag 2.5s cubic-bezier(.2, 1.3, .4, 1) both;
}
.battery-delta.plus { background: var(--plus); }
.battery-delta.minus { background: var(--minus); }
@keyframes deltaTag {
  0% { transform: translate(-50%, 10px) scale(.5); opacity: 0; }
  14% { transform: translate(-50%, 0) scale(1.12); opacity: 1; }
  24%, 72% { transform: translate(-50%, 0) scale(1); opacity: 1; }
  100% { transform: translate(-50%, -22px) scale(.8); opacity: 0; }
}

.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.title { user-select: none; }

/* ===== Попап: белый лист снизу, не выше 2/3 экрана ===== */
.sheet-wrap { position: fixed; inset: 0; z-index: 20; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(42, 36, 32, .35); opacity: 0; transition: opacity .2s; }
.sheet {
  position: absolute;
  left: 50%; bottom: 0;
  width: min(520px, 100%);
  max-height: 67dvh;
  overflow-y: auto;
  transform: translate(-50%, 100%);
  transition: transform .25s cubic-bezier(.2, 1, .4, 1);
  background: #fff;
  border-radius: 20px 20px 0 0;
  padding: 20px 20px calc(18px + var(--safe-b));
}
.sheet-wrap.is-open .sheet-backdrop { opacity: 1; }
.sheet-wrap.is-open .sheet { transform: translate(-50%, 0); }

.sheet-title { margin: 0 0 12px; font-size: 20px; font-weight: 900; line-height: 1.2; }
.sheet-title.has-close { padding-right: 40px; }
.sheet-close {
  position: absolute;
  top: 14px; right: 14px;
  display: grid; place-items: center;
  width: 36px; height: 36px;
  padding: 0;
  border: 0; border-radius: 50%;
  background: #F3EEE8;
  color: var(--ink);
  cursor: pointer;
  touch-action: manipulation;
}
.sheet-close[hidden] { display: none; }
.sheet-close svg { width: 18px; height: 18px; }
.sheet-close:active { transform: scale(.94); }
.sheet-close:focus-visible { outline: 3px solid var(--btn); outline-offset: 2px; }
.copy--last { margin-bottom: 4px; }
.delta { display: inline-block; margin-right: 6px; font-variant-numeric: tabular-nums; }
.delta.plus { color: var(--plus); }
.delta.minus { color: var(--minus); }
.delta.zero { color: var(--zero); }

/* Фото прямо на белом попапе, без подложек и рамок (правка 09.11: «плашка на плашке» — ИИшная штука) */
.packshot {
  display: grid;
  place-items: center;
  height: 190px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
.packshot img { display: block; max-width: 100%; max-height: 190px; width: auto; height: auto; }
.packshot--empty { border: 2px dashed var(--line); border-radius: 14px; }   /* пока нет фото */
/* Атмосферное фото (не упаковка на белом): во всю ширину */
.packshot--cover { height: auto; aspect-ratio: 16 / 10; border-radius: 14px; overflow: hidden; }
.packshot--cover img { width: 100%; height: 100%; max-height: none; object-fit: cover; }
/* логотип (СМ-Клиника): без упаковки, поэтому мельче фото */
.packshot--logo { height: 150px; }
.packshot--logo img { width: 62%; max-height: 120px; }
.brand-line { margin: 0 0 6px; font-size: 14px; color: var(--muted); }
.brand-line b { color: var(--ink); margin-right: 4px; }
.copy { margin: 0 0 12px; font-size: 16px; line-height: 1.45; font-weight: 600; }
.promo { margin: 0 0 14px; font-size: 15px; font-weight: 900; line-height: 1.35; }
.btn, .btn-ghost {
  display: block;
  width: 100%;
  padding: 12px 16px;
  border-radius: 12px;
  border: 0;
  font: inherit;
  font-size: 16px;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.btn { background: var(--btn); color: var(--btn-ink); }
.btn-ghost { margin-top: 6px; background: none; color: var(--muted); }
.ad { margin: 10px 0 0; font-size: 11px; color: var(--muted); }
.disclaimer { margin: -4px 0 12px; font-size: 12px; line-height: 1.3; color: var(--muted); }

/* ===== Финал ===== */
.final {
  position: fixed;
  inset: 0;
  z-index: 4;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: calc(var(--head-h, 66px) + 22px + var(--safe-t)) 10px calc(24px + var(--safe-b));
  background: rgba(42, 36, 32, .38);
  opacity: 0;
  transition: opacity .3s ease;
}
.final.is-open { opacity: 1; }
.final__card {
  max-width: 500px;
  margin: 0 auto;
  padding: 22px 18px 18px;
  border-radius: 22px;
  background: #fff;
  transform: translateY(16px);
  transition: transform .35s cubic-bezier(.2, 1, .4, 1);
}
.final.is-open .final__card { transform: none; }
/* мама в конце вечера: свежая, держится или спит в джинсах */
.final__mom { display: block; height: 200px; width: auto; max-width: 100%; margin: -6px auto 6px; object-fit: contain; }
.final__mom--low { width: 92%; height: auto; max-height: 190px; }
.final__score { display: flex; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.final__pct { font-size: 54px; font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums; }
.final__label { font-size: 14px; font-weight: 700; color: var(--muted); }
.final__score--high .final__pct { color: var(--plus); }
.final__score--mid .final__pct { color: #E39A1C; }
.final__score--low .final__pct { color: var(--minus); }
.final__title { margin: 4px 0 8px; font-size: 24px; font-weight: 900; line-height: 1.15; }
.final__text { margin: 0 0 16px; font-size: 16px; line-height: 1.45; font-weight: 600; }

/* «Пройти еще раз»: свой цвет, не как синие кнопки брендов, и закреплена внизу экрана, пока листают витрину */
.final__again {
  position: sticky;
  bottom: calc(10px + var(--safe-b));
  z-index: 2;
  margin-top: 18px;
  background: #FFD23F;
  color: var(--ink);
  box-shadow: 0 6px 20px rgba(42, 36, 32, .28);
}
.final__h { margin: 22px 0 10px; font-size: 19px; font-weight: 900; line-height: 1.2; }
/* Витрина без карточек-подложек: товары на белом, между ними тонкая линия */
.shop { display: grid; }
.shop__item {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 14px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}
/* картинка вписана целиком: высокие фото (гель, зайка) не вылезают */
.shop__img { position: relative; width: 92px; height: 92px; }
.shop__img img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: contain; }
.shop__img--cover { border-radius: 12px; overflow: hidden; }
.shop__img--cover img { object-fit: cover; }
.shop__img--logo img { padding: 8% 6%; }
.shop__brand { margin: 0 0 4px; font-size: 14px; line-height: 1.3; color: var(--muted); }
.shop__brand b { color: var(--ink); margin-right: 3px; }
.shop__promo { margin: 0 0 6px; font-size: 13px; font-weight: 800; line-height: 1.3; }
.shop__note { margin: 0 0 6px; font-size: 11.5px; line-height: 1.3; color: var(--muted); }
.btn--sm { display: inline-block; width: auto; padding: 8px 14px; font-size: 14px; border-radius: 10px; margin-top: 2px; }
.shop .ad { margin-top: 6px; font-size: 10.5px; }
.shop .btn--sm { white-space: nowrap; }
@media (max-width: 520px) {
  .shop__item { grid-template-columns: 1fr; gap: 10px; }
  .shop__img { width: 100%; height: 190px; }
  .shop .btn--sm { display: block; width: 100%; padding: 11px 14px; font-size: 15px; text-align: center; margin-top: 8px; }
}

/* ===== Подсказка в комнате: одна строка под кнопкой «Коридор», гаснет сама ===== */
.hint {
  position: fixed;
  z-index: 5;
  top: calc(var(--head-h, 66px) + 70px + var(--safe-t));
  left: 50%;
  max-width: calc(100% - 20px);
  padding: 9px 14px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: clamp(12.5px, 3.6vw, 14px);   /* одна строка и на 360 px */
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(42, 36, 32, .2);
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -6px);
  transition: opacity .3s ease, transform .3s ease;
}
.hint[hidden] { display: none; }
.hint.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ===== Кнопка «Коридор» ===== */
.backbtn {
  position: fixed;
  z-index: 5;
  top: calc(var(--head-h, 66px) + 22px + var(--safe-t));
  left: max(10px, calc(50% - 250px));
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 38px;
  padding: 0 14px 0 8px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  font-weight: 800;
  box-shadow: 0 4px 14px rgba(42, 36, 32, .14);
  cursor: pointer;
  touch-action: manipulation;
}
.backbtn[hidden] { display: none; }
.backbtn svg { width: 20px; height: 20px; }
.backbtn:active { transform: scale(.96); }

/* ===== Баблы комнат в коридоре: иконка и подпись, хвостик вниз ===== */
.door {
  position: absolute;
  transform: translate(-50%, calc(-100% - 1.6cqw));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5cqw;
  padding: 1.6cqw 2.4cqw 1.5cqw;
  border: max(2px, .42cqw) solid var(--ink);
  border-radius: 3.2cqw;
  background: #fff;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
  touch-action: manipulation;
  box-shadow: 0 1.1cqw 1.4cqw rgba(60, 40, 30, .22);
}
.door::before, .door::after {
  content: "";
  position: absolute;
  left: 50%;
  border-style: solid;
  border-color: transparent;
}
.door::before { bottom: -2.4cqw; margin-left: -1.4cqw; border-width: 2.3cqw 1.4cqw 0; border-top-color: var(--ink); }
.door::after { bottom: -1.55cqw; margin-left: -.95cqw; border-width: 1.6cqw .95cqw 0; border-top-color: #fff; }
.door__icon { display: block; width: 12.5cqw; height: 12.5cqw; object-fit: contain; pointer-events: none; }
.door__name { font-size: 3.4cqw; font-weight: 900; line-height: 1; white-space: nowrap; }
.door:active { scale: 1.06; }
.door.is-done { cursor: default; }
.door.is-done .door__icon, .door.is-done .door__name { opacity: .45; filter: grayscale(.6); }
.door__check {
  position: absolute;
  top: -2cqw; right: -2cqw;
  display: grid;
  place-items: center;
  width: 6cqw; height: 6cqw;
  border-radius: 50%;
  background: var(--plus);
  color: #fff;
  font-size: 3.4cqw;
  font-weight: 900;
  box-shadow: 0 0 0 .6cqw #fff;
}
@media (prefers-reduced-motion: no-preference) {
  body[data-view="hub"] .door:not(.is-done) { animation: doorBob 3.4s ease-in-out infinite; }
  body[data-view="hub"] .door:nth-of-type(2n):not(.is-done) { animation-delay: -1.2s; }
  body[data-view="hub"] .door:nth-of-type(3n):not(.is-done) { animation-delay: -2.3s; }
}
@keyframes doorBob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -1cqw; } }

/* ===== Обложка и правила ===== */
.intro {
  position: fixed;
  z-index: 4;
  left: 0; right: 0; bottom: 0;
  padding: 0 10px calc(14px + var(--safe-b));
  pointer-events: none;
}
.intro__card {
  max-width: 500px;
  max-height: calc(100dvh - var(--head-h, 66px) - 44px - var(--safe-t));
  overflow-y: auto;
  margin: 0 auto;
  padding: 20px 18px 16px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 6px 24px rgba(42, 36, 32, .18);
  pointer-events: auto;
  animation: introUp .45s cubic-bezier(.2, 1, .4, 1) both;
}
@keyframes introUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
.intro__title { margin: 0 0 8px; font-size: 30px; font-weight: 900; line-height: 1.05; }
.intro__title--sm { font-size: 24px; }
.intro__text { margin: 0 0 14px; font-size: 16px; line-height: 1.45; font-weight: 600; }
.rules { margin: 0 0 16px; padding-left: 0; list-style: none; counter-reset: r; }
.rules li {
  position: relative;
  margin: 0 0 9px;
  padding-left: 34px;
  font-size: 15px;
  line-height: 1.4;
  font-weight: 600;
  counter-increment: r;
}
.rules mark { padding: 0 3px; border-radius: 4px; background: #FFE066; color: inherit; font-weight: 900; }
.rules li::before {
  content: counter(r);
  position: absolute;
  left: 0; top: -1px;
  display: grid;
  place-items: center;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--btn);
  color: var(--btn-ink);
  font-size: 13px;
  font-weight: 900;
}
/* на правилах коридор приглушен, плашка его закрывает */
body[data-view="rules"] .scene::after { content: ""; position: absolute; inset: 0; background: rgba(255, 248, 240, .55); }

/* обложка: шапка крупнее, в карточке только текст и кнопка */
body[data-view="cover"] .plate--top { padding: 12px 14px; }
body[data-view="cover"] .title { font-size: 21px; line-height: 1.05; }
body[data-view="cover"] .logo { height: 22px; }

/* ===== Обложка: крупное название сверху, кнопка снизу ===== */
.cover-head {
  position: fixed;
  z-index: 5;
  top: calc(14px + var(--safe-t));
  left: 0; right: 0;
  margin: 0 auto;
  width: min(100% - 20px, 500px);
  padding: 16px 18px 18px;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 6px 24px rgba(42, 36, 32, .18);
  text-align: center;
  animation: introUp .5s cubic-bezier(.2, 1, .4, 1) both;
}
.cover-head[hidden] { display: none; }
.cover-head__logo { display: block; height: 26px; width: auto; margin: 0 auto 8px; }
.cover-head__title { margin: 0; font-size: clamp(32px, 10vw, 44px); font-weight: 900; line-height: 1; letter-spacing: -.01em; }
body[data-view="cover"] .plate--top { display: none; }
.intro--cover .intro__card { background: none; box-shadow: none; padding: 0 0 4px; }
.btn--cover { height: 56px; font-size: 19px; border-radius: 16px; box-shadow: 0 6px 18px rgba(42, 36, 32, .22); }

/* n-e-n.ru: фото Флаувау — коробка с капкейками целиком */
.packshot--cover:has(img[src$="flowwow.webp"]) { aspect-ratio: 4 / 3; position: relative; }
.packshot--cover img[src$="flowwow.webp"] { position: absolute; inset: 0; width: 100%; height: 100%; object-position: 50% 54%; }
