/* Layout: одноэкранное приложение для телефона на чёрном; экраны лежат стопкой.
   Материалы как у рукодельной игрушки: пластилин (логотип, лаймовые кнопки, чудики),
   тёмный фетр со строчкой (карточки, док), бумажные наклейки (реплики, подсказки),
   полароид для готовых картинок. */
:root {
  color-scheme: dark;
  /* пыльно-чёрная тема (по умолчанию) */
  --ink: #151413;
  --felt: #1e1c1a;
  --felt-2: #262321;
  --felt-3: #312d2a;
  --line: rgba(255, 244, 228, .09);
  --line-2: #0b0a09;
  --stitch: transparent;
  --fg: #f6efe2;
  --fg-2: rgba(246, 239, 226, .68);
  --fg-3: rgba(246, 239, 226, .42);
  --bubble-bg: #fff8ea;
  --bubble-fg: #1d1a16;
  --lime: #c6f53a;
  --lime-2: #a9dc1a;
  --lime-hi: #f1ffbf;
  --lime-deep: #6f9a00;
  --lime-ink: #172300;
  --yellow: #ffc43d;
  --paper: #fff8ea;
  --paper-2: #f2e6cf;
  --paper-ink: #1d1a16;
  --pink: #ff8fd0;
  --violet: #8f7dff;
  --orange: #ff7a38;
  --sky: #74bdff;
  --danger: #ff6b5b;
  --r-xl: 32px;
  --r-lg: 26px;
  --r-md: 18px;
  --font-display: "Rubik", "Nunito", "Arial Rounded MT Bold", system-ui, sans-serif;
  --font-body: "Rubik", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-hand: "Rubik", system-ui, sans-serif;
  --font-mono: "Space Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --gutter: 18px;
  --ease-bounce: cubic-bezier(.3, 1.6, .5, 1);
  /* плоский стиль: фактуры выключены */
  --noise: linear-gradient(transparent, transparent);
  --noise-dark: linear-gradient(transparent, transparent);
  --clay-tex: linear-gradient(transparent, transparent);
}
/* светлая кремовая тема */
:root[data-theme="light"] {
  color-scheme: light;
  --ink: #f7eedf;
  --felt: #fffaf2;
  --felt-2: #ffffff;
  --felt-3: #efe2cc;
  --line: rgba(60, 40, 20, .1);
  --line-2: #e2d3bb;
  --fg: #1f1b16;
  --fg-2: rgba(31, 27, 22, .66);
  --fg-3: rgba(31, 27, 22, .4);
  --bubble-bg: #1d1a16;
  --bubble-fg: #fff8ea;
}

html { height: 100%; box-sizing: border-box; background: var(--ink); }
*, *::before, *::after { box-sizing: inherit; }
body {
  font-synthesis: none;
  height: 100%;
  margin: 0;
  background: var(--ink);
  color: var(--fg);
  font: 600 16px/1.4 var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
button, input, a { font: inherit; color: inherit; }
button { -webkit-tap-highlight-color: transparent; }
:focus { outline: none; }
:focus-visible { box-shadow: 0 0 0 3px var(--ink), 0 0 0 6px var(--lime) !important; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.spacer { flex: 1; }
[hidden] { display: none !important; }

/* ---------- материалы ---------- */
.glass { /* тёмный фетр */
  background: var(--noise), radial-gradient(130% 100% at 25% 0%, var(--felt-2) 0%, var(--felt) 65%);
  border: 1px solid rgba(255, 255, 255, .07);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07), 0 18px 30px -20px rgba(0, 0, 0, 1);
}
.stitch { outline: 1.5px dashed var(--stitch); outline-offset: -7px; }
.paper {
  background: var(--noise), linear-gradient(170deg, var(--paper) 0%, var(--paper-2) 100%);
  color: var(--paper-ink);
  box-shadow: 0 5px 0 -1px rgba(0, 0, 0, .35), 0 14px 22px -10px rgba(0, 0, 0, .9);
}

/* ---------- экраны ---------- */
#app { position: relative; z-index: 1; height: 100%; max-width: 480px; margin: 0 auto; }
.screen {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  padding-inline: var(--gutter);
  padding-block: 10px 16px;
  opacity: 0; visibility: hidden;
  transform: translateY(16px) scale(.985);
  transition: opacity .3s ease, transform .45s cubic-bezier(.2, .9, .25, 1.15), visibility 0s linear .45s;
}
.screen.is-active { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.screen-body { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 14px; padding-block: 10px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.screen-foot { display: flex; flex-direction: column; gap: 12px; padding-top: 6px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.bar { display: flex; align-items: center; gap: 12px; min-height: 48px; }
.bar-title { flex: 1; margin: 0; text-align: center; font: 800 17px/1.2 var(--font-display); letter-spacing: -.01em; text-wrap: balance; }
.bar-gap { width: 44px; flex: none; }

.icon-btn {
  width: 44px; height: 44px; flex: none;
  display: grid; place-items: center;
  border-radius: 50%; cursor: pointer; padding: 0; text-decoration: none; color: var(--fg);
  transition: scale .18s var(--ease-bounce);
}
.icon-btn:active { scale: .9; }
.ico { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ico .fill, .ico.fill { fill: currentColor; stroke: none; }

/* ---------- кнопки ---------- */
.btn-lime { /* пластилиновая плитка; цвет задаётся токенами, по умолчанию — лайм */
  --b-hi: #f1ffbf; --b-top: #d9fd5c; --b-mid: #c6f53a; --b-low: #9fdc12; --b-deep: #557f00; --b-ink: #172300; --b-glow: rgba(170, 240, 0, .45); --b-shade: rgba(60, 100, 0, .35);
  position: relative; isolation: isolate;
  display: flex; align-items: center; justify-content: center; gap: 12px;
  width: 100%; min-height: 62px; padding: 0 22px;
  border: 0; border-radius: 26px 22px 28px 20px; cursor: pointer; text-decoration: none;
  font: 800 clamp(15px, 4.6vw, 18px)/1.15 var(--font-display); letter-spacing: .01em; white-space: nowrap;
  color: var(--b-ink);
  rotate: var(--tilt, -1.2deg);
  background:
    var(--noise-dark),
    var(--clay-tex),
    radial-gradient(130% 120% at 28% 0%, var(--b-hi) 0%, transparent 44%),
    linear-gradient(180deg, var(--b-top) 0%, var(--b-mid) 46%, var(--b-low) 100%);
  background-blend-mode: normal, soft-light, normal, normal;
  box-shadow:
    inset 0 3px 3px rgba(255, 255, 255, .55),
    inset 0 -8px 14px var(--b-shade),
    inset 8px 0 14px rgba(255, 255, 255, .12),
    0 7px 0 var(--b-deep),
    0 22px 30px -14px var(--b-glow);
  margin-bottom: 7px;
  animation: btnSquish 3.2s ease-in-out infinite;
  transition: translate .12s ease, box-shadow .12s ease, filter .2s;
}
.btn-lime:active {
  translate: 0 5px;
  box-shadow: inset 0 3px 3px rgba(255, 255, 255, .5), inset 0 -6px 12px var(--b-shade), 0 2px 0 var(--b-deep), 0 10px 18px -12px var(--b-glow);
}
.btn-lime.is-pop { animation: btnPop .55s var(--ease-bounce), btnSquish 3.2s ease-in-out infinite; }
.btn-lime:disabled { filter: saturate(.2) brightness(.5); cursor: default; animation: none; }
.btn-lime .btn-ico { width: 30px; height: 30px; display: grid; place-items: center; animation: icoWiggle 2.8s ease-in-out infinite; }
.btn-lime .btn-ico .ico { width: 26px; height: 26px; stroke-width: 2.3; }
.btn-lime--alt { animation-delay: -1.6s; }
.btn-lime--alt .btn-ico { animation-delay: 1.3s; }
/* цвета пластилина — как на референсах */
.c-violet { --b-hi: #e6e0ff; --b-top: #aa9dff; --b-mid: #8a78ff; --b-low: #6c58f0; --b-deep: #3d2ca6; --b-ink: #fff; --b-glow: rgba(138, 120, 255, .45); --b-shade: rgba(40, 20, 140, .35); }
.c-pink { --b-hi: #ffe6fb; --b-top: #ffb0f2; --b-mid: #ef8fe6; --b-low: #d86ad0; --b-deep: #93318d; --b-ink: #3d0839; --b-glow: rgba(239, 143, 230, .45); --b-shade: rgba(120, 20, 110, .3); }
.c-orange { --b-hi: #ffe2cf; --b-top: #ffa06a; --b-mid: #ff7a38; --b-low: #e85b1a; --b-deep: #97360a; --b-ink: #fff; --b-glow: rgba(255, 122, 56, .45); --b-shade: rgba(120, 30, 0, .3); }
.c-sky { --b-hi: #e5f3ff; --b-top: #9ccfff; --b-mid: #6fb8ff; --b-low: #3d95ec; --b-deep: #1c5aa3; --b-ink: #06243f; --b-glow: rgba(111, 184, 255, .45); --b-shade: rgba(10, 60, 130, .3); }
.c-lime { }
.t-l { --tilt: -2deg; } .t-r { --tilt: 1.8deg; } .t-ll { --tilt: -3deg; } .t-rr { --tilt: 2.8deg; }
.btn-lime--small { min-height: 52px; font-size: 15px; }
@keyframes btnSquish { 0%, 100% { scale: 1 1; } 50% { scale: 1.012 .975; } }
@keyframes btnPop { 0% { scale: .9 .86; } 45% { scale: 1.05 1.08; } 100% { scale: 1 1; } }
@keyframes icoWiggle { 0%, 68%, 100% { rotate: 0deg; scale: 1; } 76% { rotate: -16deg; scale: 1.15; } 84% { rotate: 12deg; } 92% { rotate: -6deg; } }

.btn-glass {
  min-height: 54px; padding: 0 14px; border-radius: 20px; cursor: pointer;
  font: 800 15px/1.15 var(--font-body);
  color: var(--fg);
  background: var(--noise), linear-gradient(180deg, var(--felt-3), var(--felt-2));
  border: 1px solid rgba(255, 255, 255, .08);
  outline: 1.5px dashed rgba(255, 255, 255, .16); outline-offset: -6px;
  box-shadow: 0 5px 0 #0b0b0c, 0 14px 20px -14px rgba(0, 0, 0, 1);
  margin-bottom: 5px;
  transition: translate .12s ease, box-shadow .12s ease;
}
.btn-glass:active { translate: 0 4px; box-shadow: 0 1px 0 #0b0b0c; }
.btn-text {
  min-height: 44px; border: 0; background: none; cursor: pointer;
  font: 800 15px/1.2 var(--font-body); color: var(--fg-2);
  text-decoration: underline; text-decoration-color: rgba(198, 245, 58, .55); text-decoration-thickness: 2px; text-underline-offset: 5px;
}
.btn-text:disabled { opacity: .35; cursor: default; }
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 18px 0 14px; border-radius: 999px; cursor: pointer; font-weight: 800; font-size: 15px; color: var(--fg); }
.chip .ico { width: 20px; height: 20px; color: var(--lime); }
.chip:active { scale: .96; }
.pill {
  min-height: 32px; padding: 0 12px; border-radius: 10px; cursor: pointer; border: 0;
  font: 700 12px/1 var(--font-hand); letter-spacing: .02em;
  rotate: -3deg;
}

/* ---------- главный ---------- */
.screen--home { gap: 10px; }
.home-top { display: flex; align-items: center; min-height: 44px; }
.home-title { display: flex; flex-direction: column; gap: 4px; padding-inline: 2px; }
.logo { position: relative; margin: 0; display: flex; align-items: flex-start; gap: 0; min-height: clamp(52px, 15vw, 76px); font: 800 clamp(36px, 10.5vw, 50px)/1 var(--font-display); letter-spacing: -.04em; color: var(--lime); }
.logo-word { display: inline-flex; flex-direction: column; align-items: flex-start; }
.logo-line { display: inline-flex; align-items: flex-end; height: .9em; }
.logo-line + .logo-line { margin-left: .5em; }
.logo-letter { display: block; animation: letterBob 2.6s ease-in-out infinite; animation-delay: calc(var(--i) * -.18s); transform-origin: 50% 90%; }
@keyframes letterBob { 0%, 100% { translate: 0 0; rotate: var(--r, 0deg); } 50% { translate: 0 -4px; rotate: calc(var(--r, 0deg) * -1); } }
.logo-sticker {
  display: inline-block; align-self: flex-start; margin-left: 4px; margin-top: 6px; flex: none;
  padding: 6px 10px 7px; border-radius: 8px;
  font: 700 13px/1 var(--font-hand); letter-spacing: 0;
  rotate: 6deg;
  animation: stickerBob 4s ease-in-out infinite;
}
@keyframes stickerBob { 0%, 100% { rotate: 6deg; } 50% { rotate: 1deg; translate: 0 1px; } }
.tagline { margin: 0; color: var(--fg-2); font-size: 16px; font-weight: 700; }

.stage { position: relative; flex: 0 1 auto; aspect-ratio: 1 / 1.08; min-height: 230px; margin-block: auto; container-type: size; }
.decor { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.decor-item { position: absolute; height: auto; rotate: var(--r, 0deg); opacity: 0; scale: .4; transition: opacity .4s, scale .7s var(--ease-bounce); animation: decorFloat 5s ease-in-out infinite; animation-delay: var(--dl, 0s); filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .45)); }
.decor-item.is-in { opacity: 1; scale: 1; }
@keyframes decorFloat { 0%, 100% { translate: 0 0; rotate: var(--r, 0deg); } 50% { translate: 0 -7px; rotate: calc(var(--r, 0deg) + 6deg); } }
.mon-slot { z-index: 1; }
.stage::before {
  content: ""; position: absolute; left: -10%; right: -10%; bottom: -4%; height: 60%;
  background: radial-gradient(50% 40% at 50% 70%, rgba(255, 255, 255, .06), rgba(255, 255, 255, 0));
  pointer-events: none;
}
.mon-slot {
  position: absolute; padding: 0; border: 0; background: none; cursor: pointer;
  width: 46%; aspect-ratio: 1;
  width: min(50cqw, 50cqh);
  -webkit-tap-highlight-color: transparent;
}
.mon-slot--a { left: -2%; top: 2%; }
.mon-slot--b { right: -2%; top: 0; }
.mon-slot--c { left: 50%; bottom: 0; translate: -50% 0; width: min(58cqw, 56cqh); z-index: 2; }

.say, .bubble { /* бумажная наклейка-реплика */
  position: absolute; z-index: 6; left: 0; top: 0;
  padding: 8px 13px 9px; border-radius: 12px;
  font: 700 16px/1.1 var(--font-hand); white-space: nowrap;
  background: var(--noise), linear-gradient(170deg, var(--paper), var(--paper-2));
  color: var(--paper-ink);
  box-shadow: 0 4px 0 -1px rgba(0, 0, 0, .35), 0 12px 18px -8px rgba(0, 0, 0, .9);
  border: 0; outline: 0;
  opacity: 0; scale: .5; rotate: -4deg; pointer-events: none;
  transition: opacity .15s, scale .35s var(--ease-bounce);
}
.say::after, .bubble::after {
  content: ""; position: absolute; left: 18px; bottom: -7px; width: 14px; height: 14px;
  background: var(--paper-2); rotate: 45deg; border-radius: 2px; z-index: -1;
}
.say { transform-origin: 0 100%; }
.say.is-on, .bubble.is-on { opacity: 1; scale: 1; }
.bubble { font-size: 18px; }
.home-actions { display: flex; flex-direction: column; gap: 10px; padding-bottom: 2px; }

/* ---------- загрузка фото ---------- */
.steps { display: flex; gap: 8px; margin: 0; padding: 0; list-style: none; justify-content: center; }
.step {
  display: inline-flex; align-items: center; gap: 7px;
  min-height: 34px; padding: 0 12px 0 5px; border-radius: 999px;
  font-weight: 800; font-size: 13px; color: var(--fg-3);
  background: var(--noise), var(--felt-2); border: 1px solid rgba(255, 255, 255, .06);
  transition: color .3s, border-color .3s;
}
.step b { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: rgba(255, 255, 255, .08); font: 800 11px/1 var(--font-display); }
.step.is-done { color: var(--fg); border-color: rgba(198, 245, 58, .35); }
.step.is-done b { background: var(--lime); color: var(--lime-ink); }

.drop {
  position: relative; flex: 1; min-height: 160px;
  display: grid; place-items: center; text-align: center;
  padding: 20px; border-radius: var(--r-lg); overflow: hidden; cursor: pointer;
  outline: 2px dashed rgba(255, 255, 255, .2); outline-offset: -9px;
  transition: scale .2s var(--ease-bounce), outline-color .2s;
}
.drop:active { scale: .98; }
.drop.has-img { outline-color: rgba(198, 245, 58, .7); }
.drop--tall { min-height: 250px; }
.drop-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; max-width: 30ch; }
.drop-ico { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 18px; background: var(--lime); color: var(--lime-ink); margin-bottom: 4px; rotate: -4deg; box-shadow: inset 0 2px 2px rgba(255, 255, 255, .6), inset 0 -4px 8px rgba(60, 100, 0, .35), 0 4px 0 var(--lime-deep); }
.drop-ico .ico { width: 28px; height: 28px; stroke-width: 2.2; }
.drop-title { font: 800 17px/1.2 var(--font-display); }
.drop-hint { color: var(--fg-2); font-size: 14px; font-weight: 700; text-wrap: balance; }
.drop-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.drop-change {
  position: absolute; right: 14px; bottom: 14px;
  padding: 7px 12px; border-radius: 10px; rotate: -3deg;
  font: 700 13px/1 var(--font-hand);
  background: var(--paper); color: var(--paper-ink);
  box-shadow: 0 3px 0 -1px rgba(0, 0, 0, .4);
}


/* ---------- результат / видео ---------- */
.frame { position: relative; margin: 0; flex: 1; min-height: 0; display: grid; place-items: center; padding: 6px; }
.polaroid {
  position: relative; display: flex; flex-direction: column; max-width: 100%; max-height: 100%;
  padding: 10px 10px 0; border-radius: 6px; rotate: -1.5deg;
  background: var(--noise), linear-gradient(170deg, #fbf7ec, #ece4cf);
  box-shadow: 0 6px 0 -2px rgba(0, 0, 0, .4), 0 24px 40px -18px rgba(0, 0, 0, 1);
}
.polaroid img, .polaroid video { display: block; min-height: 0; max-width: 100%; max-height: calc(100% - 44px); object-fit: contain; border-radius: 3px; background: #111; }
.polaroid figcaption { height: 40px; display: grid; place-items: center; font: 700 17px/1 var(--font-hand); color: var(--paper-ink); }
.tape { position: absolute; top: -12px; left: 50%; width: 92px; height: 26px; translate: -50% 0; rotate: 3deg; background: rgba(214, 240, 150, .6); box-shadow: 0 1px 2px rgba(0, 0, 0, .2); }
.badge {
  position: absolute; left: 20px; top: 20px; z-index: 2;
  padding: 6px 10px; border-radius: 8px; rotate: -4deg;
  font: 700 12px/1 var(--font-hand); color: var(--paper-ink); background: #ffd37a;
  box-shadow: 0 3px 0 -1px rgba(0, 0, 0, .35);
}
.frame--video .polaroid img { filter: blur(3px) brightness(.55) saturate(1.2); transition: filter .6s; }
.frame--video.is-ready .polaroid img { filter: none; }
.video-wait { position: absolute; inset: 10px 10px 40px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 24px; text-align: center; color: #fff; }
.wait-title { margin: 14px 0 0; font: 800 18px/1.2 var(--font-display); text-wrap: balance; }
.wait-sub { margin: 0; color: rgba(255, 255, 255, .8); font-size: 14px; font-weight: 700; text-wrap: balance; }
.wait-time { margin: 6px 0 0; font: 800 14px/1 var(--font-display); color: var(--lime); font-variant-numeric: tabular-nums; }
.video-wait.is-error .orbit, .video-wait.is-error .wait-time { display: none; }
.orbit { position: relative; width: 84px; height: 84px; }
.orbit i { position: absolute; inset: 0; border-radius: 50%; border: 4px solid transparent; animation: spin 1.4s linear infinite; }
.orbit i:nth-child(1) { border-top-color: var(--lime); }
.orbit i:nth-child(2) { inset: 13px; border-right-color: var(--pink); animation-duration: 1.1s; animation-direction: reverse; }
.orbit i:nth-child(3) { inset: 26px; border-bottom-color: var(--violet); animation-duration: .8s; }
@keyframes spin { to { rotate: 360deg; } }

/* ---------- ожидание и листы ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 20;
  display: grid; place-items: center; padding: 20px;
  background: rgba(0, 0, 0, .7);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  animation: fadeIn .25s ease;
}
.overlay[hidden] { display: none !important; }
@keyframes fadeIn { from { opacity: 0; } }
.loading-card { width: min(100%, 360px); border-radius: var(--r-xl); padding: 26px 22px 14px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; }
.loading-mon { width: 170px; height: 170px; position: relative; }
.loading-mon .clay { animation: magic 1.6s ease-in-out infinite; }
.loading-mon::before, .loading-mon::after { content: "✦"; position: absolute; z-index: 3; color: var(--lime); font-size: 22px; animation: twinkle 1.4s ease-in-out infinite; }
.loading-mon::before { left: 0; top: 10px; }
.loading-mon::after { right: 4px; top: 36px; color: var(--pink); animation-delay: .6s; }
@keyframes magic { 0%, 100% { rotate: -5deg; translate: 0 0; } 50% { rotate: 5deg; translate: 0 -8px; } }
@keyframes twinkle { 0%, 100% { opacity: .2; scale: .6; } 50% { opacity: 1; scale: 1.2; } }
.loading-title { margin: 8px 0 0; font: 800 20px/1.2 var(--font-display); }
.loading-line { margin: 0; min-height: 1.4em; color: var(--fg-2); font: 700 16px/1.3 var(--font-hand); transition: opacity .25s; }
.progress { width: 100%; height: 10px; margin: 12px 0 4px; border-radius: 99px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.progress i { display: block; width: 40%; height: 100%; border-radius: inherit; background: repeating-linear-gradient(-45deg, var(--lime) 0 10px, #a8e21a 10px 20px); animation: prog 1.6s ease-in-out infinite; }
@keyframes prog { 0% { translate: -110% 0; } 100% { translate: 260% 0; } }
.loading-time { margin: 0; color: var(--fg-3); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }

.sheet { width: min(100%, 380px); border-radius: var(--r-xl); padding: 24px 20px 20px; display: flex; flex-direction: column; gap: 12px; }
.sheet h3 { margin: 0; font: 800 20px/1.2 var(--font-display); }
.sheet p { margin: 0; color: var(--fg-2); font-weight: 700; }
.field {
  min-height: 54px; padding: 0 16px; border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, .18); background: rgba(0, 0, 0, .45); color: var(--fg);
  font: 700 18px/1 var(--font-body); -webkit-user-select: text; user-select: text;
}

.toast {
  position: fixed; z-index: 30; left: 50%; bottom: calc(env(safe-area-inset-bottom, 0px) + 104px);
  max-width: min(92vw, 420px); padding: 12px 16px; border-radius: 12px;
  font: 700 15px/1.3 var(--font-hand); text-align: center;
  background: var(--noise), linear-gradient(170deg, var(--paper), var(--paper-2)); color: var(--paper-ink);
  box-shadow: 0 5px 0 -1px rgba(0, 0, 0, .35), 0 14px 22px -10px rgba(0, 0, 0, .9);
  translate: -50% 20px; rotate: -1.5deg; opacity: 0; pointer-events: none;
  transition: opacity .25s, translate .35s var(--ease-bounce);
}
.toast.is-on { opacity: 1; translate: -50% 0; }
.toast.is-error { background: var(--noise), linear-gradient(170deg, #ffd9cf, #f6bfb1); }

/* ---------- игра ---------- */
.screen--play { padding: 0; }
.play-stage { position: absolute; inset: 0; overflow: hidden; touch-action: none; background: #000; }
.play-layer { position: absolute; left: 0; top: 0; pointer-events: none; }
.play-layer--bg { z-index: 0; }
.play-layer--shadow { z-index: 1; }
.play-layer--gl { z-index: 2; }
.play-layer--fx { z-index: 3; }
.play-floor {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .015) 40%, rgba(255, 255, 255, 0));
  border-top: 1.5px dashed rgba(255, 255, 255, .14);
}
.play-stage.has-bg .play-floor { background: none; border-top-color: rgba(255, 255, 255, 0); }
.bar--float { position: absolute; z-index: 5; left: var(--gutter); right: var(--gutter); top: 10px; pointer-events: none; }
.bar--float > * { pointer-events: auto; }
.confetti-layer { position: fixed; inset: 0; z-index: 40; pointer-events: none; }

@media (max-height: 700px) {
  .btn-lime { min-height: 54px; }
  .drop { min-height: 120px; }
  .home-actions { gap: 8px; }
}

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

/* ---------- пластилиновые чудики ---------- */
.clay { position: absolute; inset: 0; opacity: 0; scale: .4; transition: opacity .35s ease, scale .7s var(--ease-bounce); container-type: inline-size; }
.clay.is-ready { opacity: 1; scale: 1; }
.clay-shadow { position: absolute; height: 5%; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 255, 255, .09), rgba(255, 255, 255, 0)); translate: 0 -50%; animation: cShadow var(--bob, 2.6s) ease-in-out infinite; }
.clay-squash { position: absolute; inset: 0; transform-origin: 50% 92%; }
.clay-squash.is-boing { animation: mBoing .7s var(--ease-bounce); }
@keyframes mBoing { 0% { scale: 1 1; } 20% { scale: 1.22 .78; } 45% { scale: .86 1.18; } 70% { scale: 1.07 .95; } 100% { scale: 1 1; } }
.clay-bob { position: absolute; inset: 0; transform-origin: 50% 94%; animation: cBob var(--bob, 2.6s) ease-in-out infinite; }
.clay-g { position: absolute; inset: 0; }
.clay-l { position: absolute; display: block; }
.clay-g, .clay-l { will-change: transform; }
@keyframes cBob { 0%, 100% { transform: translateY(0) scale(1.03, var(--squashY, .97)); } 50% { transform: translateY(-4cqw) scale(.985, 1.02); } }
@keyframes cShadow { 0%, 100% { scale: 1; opacity: 1; } 50% { scale: .8; opacity: .6; } }
.a-wig { animation: cWig var(--d, 2.4s) ease-in-out var(--dl, 0s) infinite; }
@keyframes cWig { 0%, 100% { rotate: calc(var(--a, 6deg) * -1); } 50% { rotate: var(--a, 6deg); } }
.a-wob { animation: cWig var(--d, 2.4s) ease-in-out var(--dl, 0s) infinite; }
.a-blink { animation: cBlink var(--d, 4.2s) var(--dl, 0s) infinite; }
@keyframes cBlink { 0%, 92%, 100% { scale: 1 1; } 95% { scale: 1 .08; } 98% { scale: 1 1; } }
.a-look { animation: cLook var(--d, 6s) ease-in-out var(--dl, 0s) infinite; }
@keyframes cLook { 0%, 18% { translate: 0 0; } 28%, 46% { translate: -1.6cqw .4cqw; } 58%, 78% { translate: 1.6cqw -.4cqw; } 90%, 100% { translate: 0 0; } }
.a-boing { animation: cBoing 1.3s var(--ease-bounce) infinite; }
@keyframes cBoing { 0%, 60%, 100% { scale: 1; } 70% { scale: 1.25 .8; } 80% { scale: .9 1.15; } 90% { scale: 1.05 .95; } }
.a-swing { animation: cSwing 2.2s ease-in-out infinite; }
@keyframes cSwing { 0%, 100% { rotate: -16deg; } 50% { rotate: 14deg; } }
.clay.is-talking .a-talk { animation: cTalk .18s ease-in-out infinite alternate; }
@keyframes cTalk { from { scale: 1 1; } to { scale: 1.06 1.35; } }
.a-yawn { animation: cYawn 7s ease-in-out infinite; }
@keyframes cYawn { 0%, 70%, 100% { scale: 1; } 78%, 88% { scale: 1.5 2.1; } }
.a-toot { animation: cToot 3.6s var(--ease-bounce) infinite; }
@keyframes cToot { 0%, 55% { scale: .22 1; } 62% { scale: 1.08 1; } 68% { scale: .96 1; } 74%, 86% { scale: 1 1; } 94%, 100% { scale: .22 1; } }
.clay.is-talking .a-toot { animation-duration: 1.2s; }
.clay-html { pointer-events: none; }
.zz { position: absolute; left: 70%; top: 18%; font: 800 7cqw/1 var(--font-display); color: #c9b6ff; opacity: 0; animation: zz 3.6s ease-in infinite; animation-delay: calc(var(--i) * 1.2s); }
@keyframes zz { 0% { opacity: 0; translate: 0 0; scale: .6; } 20% { opacity: .9; } 100% { opacity: 0; translate: 8cqw -14cqw; scale: 1.3; } }

/* ===================== v3: игра для ребёнка, коллекция, рисование ===================== */
.mono { font-family: var(--font-mono); letter-spacing: .02em; }
@keyframes nope { 0%, 100% { translate: 0 0; } 20% { translate: -6px 0; } 40% { translate: 5px 0; } 60% { translate: -4px 0; } 80% { translate: 3px 0; } }
.is-nope { animation: nope .4s ease; }
.lock { position: absolute; right: -3px; bottom: -3px; z-index: 2; display: none; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--paper); color: var(--paper-ink); box-shadow: 0 2px 0 rgba(0, 0, 0, .4); }
.lock svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; }
.is-locked .lock { display: grid; }

/* главный: плитки и кнопка коллекции */
.btn-lime--tile { flex-direction: column; gap: 6px; min-height: 92px; padding: 12px 8px; white-space: normal; text-align: center; font-size: clamp(13px, 3.9vw, 15px); line-height: 1.1; }
.btn-lime--tile .btn-ico { width: 34px; height: 34px; }
.btn-lime--tile .btn-ico .ico { width: 30px; height: 30px; }
.home-actions .row2 { gap: 10px; }
.coll-btn { position: relative; display: flex; align-items: center; gap: 6px; height: 44px; padding: 0 12px 0 8px; margin-right: 8px; border: 0; border-radius: 999px; cursor: pointer; background: var(--noise), var(--felt-2); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }
.coll-cards { position: relative; width: 30px; height: 30px; }
.coll-cards i { position: absolute; left: 7px; top: 3px; width: 17px; height: 24px; border-radius: 5px; box-shadow: 0 2px 0 rgba(0, 0, 0, .35); }
.coll-cards i:nth-child(1) { background: #c9f2d9; rotate: -16deg; translate: -5px 1px; }
.coll-cards i:nth-child(2) { background: #e3d7ff; rotate: 10deg; translate: 5px 1px; }
.coll-cards i:nth-child(3) { background: #ffd3e7; }
.coll-btn b { font: 700 15px/1 var(--font-mono); color: var(--fg); min-width: 1ch; }
.coll-btn.is-bump .coll-cards { animation: bump .6s var(--ease-bounce); }
@keyframes bump { 0% { scale: 1; } 30% { scale: 1.35; rotate: -8deg; } 60% { scale: .9; } 100% { scale: 1; } }

/* вход в игру */
.quick-row { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.voice-pick { display: flex; gap: 10px; overflow-x: auto; padding: 6px 4px 10px; scrollbar-width: none; justify-content: safe center; }
.voice-pick::-webkit-scrollbar { display: none; }
.vopt { position: relative; flex: none; display: flex; flex-direction: column; align-items: center; gap: 5px; width: 62px; padding: 0; border: 0; background: none; cursor: pointer; color: var(--fg-2); font: 700 11px/1.1 var(--font-hand); }
.vopt-ico { position: relative; display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; background: var(--noise), linear-gradient(180deg, var(--felt-3), var(--felt-2)); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08), 0 4px 0 #0b0b0c; transition: scale .2s var(--ease-bounce); }
.vopt-ico .ico { width: 24px; height: 24px; }
.vopt:active .vopt-ico { scale: .9; }
.vopt.is-on { color: var(--fg); }
.vopt.is-on .vopt-ico { background: var(--noise-dark), linear-gradient(180deg, #d9fd5c, var(--lime-2)); color: var(--lime-ink); box-shadow: 0 4px 0 var(--lime-deep), 0 0 22px rgba(198, 245, 58, .35); }
.vopt .lock { right: 2px; bottom: 16px; }
.vopt.is-locked .vopt-ico { opacity: .45; }

/* игра */
.bar--float { gap: 8px; }
.bg-switch { flex: 1; min-width: 0; max-width: 230px; margin-inline: auto; display: flex; align-items: center; justify-content: space-between; gap: 2px; height: 44px; padding: 0 4px; border-radius: 999px; }
.bg-arrow { display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 50%; background: none; color: var(--fg); cursor: pointer; }
.bg-arrow:active { scale: .88; }
.bg-arrow .ico { width: 20px; height: 20px; }
.bg-dots { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; min-width: 0; }
.bg-dot { flex: none; width: 9px; height: 9px; padding: 0; border: 0; border-radius: 99px; cursor: pointer; background: rgba(255, 255, 255, .35); transition: width .3s var(--ease-bounce), background .2s; }
.bg-dot.is-on { width: 22px; background: var(--lime); }
.bg-dot.is-locked { background: none; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .3); }
.bg-cam { display: grid; place-items: center; width: 24px; height: 24px; background: rgba(255, 255, 255, .1); color: var(--fg); }
.bg-cam.is-on { width: 24px; background: var(--lime); color: var(--lime-ink); }
.bg-cam .ico { width: 15px; height: 15px; }
.voice-btn { color: var(--lime); }
.voice-btn .ico { width: 24px; height: 24px; }
.voice-btn.is-pop { animation: btnPop .5s var(--ease-bounce); }

.powers { position: absolute; z-index: 5; left: 12px; top: 70px; display: flex; flex-direction: column; gap: 10px; }
.power {
  --pc: var(--lime);
  position: relative; display: grid; place-items: center; width: 52px; height: 52px; padding: 0; border: 0; border-radius: 50%; cursor: pointer;
  color: var(--pc);
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, .16), rgba(255, 255, 255, 0) 55%), rgba(18, 18, 22, .78);
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--pc) 45%, transparent), 0 6px 14px -6px rgba(0, 0, 0, .9);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  transition: scale .2s var(--ease-bounce), box-shadow .3s, background .3s;
}
.power:active { scale: .88; }
.power-ico .ico { width: 26px; height: 26px; filter: drop-shadow(0 0 6px color-mix(in srgb, var(--pc) 70%, transparent)); }
.power.is-on {
  color: #111;
  background: radial-gradient(circle at 35% 28%, #fff 0%, color-mix(in srgb, var(--pc) 70%, #fff) 30%, var(--pc) 70%);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, .5), 0 0 22px 4px color-mix(in srgb, var(--pc) 75%, transparent), 0 0 44px 10px color-mix(in srgb, var(--pc) 35%, transparent);
  animation: powerGlow 1.6s ease-in-out infinite;
}
.power.is-on .power-ico .ico { filter: none; }
@keyframes powerGlow { 0%, 100% { scale: 1; } 50% { scale: 1.07; } }
@property --left { syntax: "<number>"; inherits: false; initial-value: 1; }
.power::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; pointer-events: none; opacity: 0; --left: 1;
  background: conic-gradient(var(--pc) calc(var(--left) * 1turn), transparent 0);
  -webkit-mask: radial-gradient(closest-side, transparent calc(100% - 3.5px), #000 calc(100% - 3px)); mask: radial-gradient(closest-side, transparent calc(100% - 3.5px), #000 calc(100% - 3px)); }
.power.is-on::after { opacity: 1; animation: powerLeft 3.2s linear forwards; }
@keyframes powerLeft { from { --left: 1; } to { --left: 0; } }
.power.is-locked { color: rgba(255, 255, 255, .35); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .12); }
.power.is-locked .power-ico .ico { filter: none; }

.play-hint { position: absolute; z-index: 6; left: 50%; top: 42%; width: 74px; height: 74px; translate: -50% -50%; pointer-events: none; opacity: 0; transition: opacity .4s; }
.play-hint.is-on { opacity: 1; }
.hint-hand { width: 100%; height: 100%; fill: #fff; stroke: #111; stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .6)); }
.play-hint.is-on[data-kind="drag"] .hint-hand { animation: hintDrag 1.6s ease-in-out infinite; }
.play-hint.is-on[data-kind="tap"] .hint-hand { animation: hintTap .9s ease-in-out infinite; }
@keyframes hintDrag { 0% { translate: -30px 20px; rotate: -8deg; } 50% { translate: 30px -30px; rotate: 6deg; } 100% { translate: -30px 20px; rotate: -8deg; } }
@keyframes hintTap { 0%, 100% { scale: 1; } 50% { scale: .82; } }

.tray {
  position: absolute; z-index: 5; left: 10px; right: 10px; bottom: calc(env(safe-area-inset-bottom, 0px) + 10px);
  display: flex; gap: 8px; padding: 8px; border-radius: 26px;
  overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; touch-action: pan-x;
  background: rgba(14, 14, 16, .8); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08), 0 14px 30px -12px rgba(0, 0, 0, 1);
}
.tray::-webkit-scrollbar { display: none; }
.tray-item { position: relative; flex: none; display: grid; place-items: center; width: 62px; height: 62px; padding: 0; border: 0; border-radius: 20px; cursor: grab; background: rgba(255, 255, 255, .06); touch-action: pan-x; transition: scale .2s var(--ease-bounce), background .2s; }
.tray-item canvas { width: 50px; height: 50px; pointer-events: none; }
.tray-item.is-active { scale: .9; background: rgba(198, 245, 58, .18); }
.tray-item.is-locked canvas { opacity: .35; filter: grayscale(.6); }
.tray-item .lock { right: 4px; bottom: 4px; }

/* коллекция */
.count-pill { display: grid; place-items: center; min-width: 44px; height: 32px; padding: 0 10px; border-radius: 10px; font-size: 14px; color: var(--lime-ink); background: var(--lime); rotate: 3deg; }
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 12px; padding: 4px 2px 20px; }
.mcard {
  --c1: #c9f2d9; --c2: #9fe3bd; --cink: #15432a;
  position: relative; display: flex; flex-direction: column; gap: 7px; min-width: 0;
  padding: 9px 9px 11px; border: 0; border-radius: 22px; cursor: pointer; text-align: left;
  color: var(--cink);
  background: radial-gradient(120% 70% at 50% 0%, #ffffff 0%, var(--c1) 55%), var(--c1);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .55), 0 4px 0 -1px rgba(0, 0, 0, .35), 0 18px 28px -16px rgba(0, 0, 0, 1);
  rotate: var(--tilt, 0deg);
  animation: cardIn .5s var(--ease-bounce) both; animation-delay: calc(var(--i, 0) * 45ms);
  transition: scale .2s var(--ease-bounce);
}
.mcard:active { scale: .96; }
@keyframes cardIn { from { opacity: 0; translate: 0 18px; scale: .9; } }
.mcard-top, .mcard-meta { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.mcard-top .mono { font-size: 11px; opacity: .75; }
.rar { display: inline-flex; align-items: center; gap: 4px; padding: 3px 7px 3px 6px; border-radius: 99px; font: 700 9px/1 var(--font-body); letter-spacing: .06em; text-transform: uppercase; color: #fff; background: rgba(20, 20, 24, .82); white-space: nowrap; }
.rar em { font-style: normal; }
.mcard--common .rar { background: rgba(255, 255, 255, .85); color: var(--cink); }
.mcard--rare .rar { background: #2f7bff; }
.mcard--epic .rar { background: #7a4dff; }
.mcard--legend .rar { background: linear-gradient(100deg, #ffb800, #ff5fb0, #8b6cff, #ffb800); background-size: 300% 100%; animation: shimmer 3s linear infinite; }
@keyframes shimmer { to { background-position: 300% 0; } }
.mcard--legend { box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .7), 0 0 0 2px #ffd84a, 0 4px 0 -1px rgba(0, 0, 0, .35), 0 18px 30px -12px rgba(255, 200, 60, .5); }
.mcard-art {
  position: relative; display: grid; place-items: center; aspect-ratio: 1; border-radius: 16px; overflow: hidden;
  background: radial-gradient(circle, color-mix(in srgb, var(--c2) 70%, transparent) 1.6px, transparent 2px) 0 0 / 12px 12px, color-mix(in srgb, var(--c2) 40%, #fff);
}
.mcard-art img { width: 88%; height: 88%; object-fit: contain; filter: drop-shadow(0 6px 6px rgba(0, 0, 0, .18)); }
.mcard--photo .mcard-art img { width: 100%; height: 100%; object-fit: cover; filter: none; }
.mcard-name { font: 800 15px/1.15 var(--font-display); letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mcard-meta { font-size: 9.5px; text-transform: uppercase; opacity: .6; }
.mcard--big { width: min(78vw, 300px); rotate: -2deg; cursor: default; padding: 12px 12px 14px; }
.mcard--big .mcard-name { font-size: 22px; }
.mcard--big .mcard-top .mono { font-size: 13px; }
.mcard--big .rar { font-size: 11px; padding: 5px 9px; }
.mcard--big .mcard-meta { font-size: 11px; }
.coll-empty { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 20px 0; text-align: center; }
.coll-empty p { margin: 0; font: 700 18px/1.3 var(--font-hand); color: var(--fg-2); }
.coll-empty-mon { position: relative; width: 180px; height: 180px; }
.coll-empty .row2 { width: 100%; }

.card-sheet { padding: 16px; }
.card-view { position: relative; display: flex; flex-direction: column; align-items: center; gap: 14px; width: min(100%, 360px); animation: sheetPop .45s var(--ease-bounce); }
@keyframes sheetPop { from { scale: .8; opacity: 0; } }
.card-close { position: absolute; right: 0; top: -6px; z-index: 3; }
.card-big { padding-top: 26px; }
.name-row { display: flex; gap: 8px; width: min(100%, 320px); }
.name-row .field { flex: 1; min-width: 0; text-align: center; font-family: var(--font-display); font-size: 17px; }
.dice { width: 54px; height: 54px; border-radius: 16px; color: var(--lime); }
.dice.is-roll { animation: roll .6s var(--ease-bounce); }
@keyframes roll { 0% { rotate: 0deg; scale: 1; } 50% { scale: 1.2; } 100% { rotate: 360deg; scale: 1; } }
.card-actions { display: flex; gap: 10px; width: min(100%, 320px); align-items: flex-start; }
.card-actions .btn-lime { flex: 1; }
.icon-btn.sq { width: 52px; height: 52px; border-radius: 16px; }
#card-del.is-armed { background: #ff5a5a; color: #fff; animation: nope .4s ease; }

/* нарисуй монстра */
.screen--draw { gap: 8px; }
.screen--draw .bar { gap: 8px; }
.task-card { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; min-height: 52px; padding: 6px 10px 6px 6px; border: 0; border-radius: 14px; cursor: pointer; text-align: left; rotate: -1deg; }
.task-card.is-pop { animation: btnPop .5s var(--ease-bounce); }
.task-speak { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--paper-ink); color: var(--lime); animation: speakPulse 1.8s ease-in-out infinite; }
.task-speak .ico { width: 20px; height: 20px; }
@keyframes speakPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(34, 29, 20, .4); } 50% { box-shadow: 0 0 0 6px rgba(34, 29, 20, 0); } }
.task-body { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.task-icons { display: flex; align-items: center; gap: 4px; font-size: 22px; line-height: 1.1; }
.ti-plus { font: 800 13px/1 var(--font-display); font-style: normal; opacity: .4; }
.task-text { font: 700 11.5px/1.2 var(--font-hand); color: rgba(34, 29, 20, .75); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.done-btn { flex: none; display: grid; place-items: center; width: 52px; height: 52px; border: 0; border-radius: 50%; cursor: pointer; color: var(--lime-ink); background: var(--noise-dark), linear-gradient(180deg, #d9fd5c, var(--lime-2)); box-shadow: inset 0 2px 2px rgba(255, 255, 255, .6), 0 5px 0 var(--lime-deep); transition: translate .12s, box-shadow .12s; }
.done-btn .ico { width: 28px; height: 28px; stroke-width: 3; }
.done-btn:active { translate: 0 4px; box-shadow: 0 1px 0 var(--lime-deep); }
.done-btn.is-ready { animation: readyPulse 1.4s ease-in-out infinite; }
@keyframes readyPulse { 0%, 100% { box-shadow: inset 0 2px 2px rgba(255, 255, 255, .6), 0 5px 0 var(--lime-deep), 0 0 0 0 rgba(198, 245, 58, .6); } 50% { box-shadow: inset 0 2px 2px rgba(255, 255, 255, .6), 0 5px 0 var(--lime-deep), 0 0 0 10px rgba(198, 245, 58, 0); } }
.draw-wrap {
  position: relative; flex: 1; min-height: 0; border-radius: 24px; overflow: hidden;
  background: radial-gradient(circle, rgba(34, 29, 20, .12) 1.2px, transparent 1.6px) 0 0 / 22px 22px, var(--noise), linear-gradient(170deg, #fdf9ef, #f1e9d6);
  box-shadow: 0 5px 0 -1px rgba(0, 0, 0, .35), 0 20px 30px -18px rgba(0, 0, 0, 1);
}
.draw-wrap canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: crosshair; }
#slime-canvas { pointer-events: none; filter: drop-shadow(0 4px 3px rgba(60, 40, 20, .25)); }
.slime-ico { color: #3ccf4e; }
.dtool.is-on .slime-ico { color: #1f7a2c; }
.sym-line { position: absolute; left: 50%; top: 10px; bottom: 10px; width: 0; border-left: 2px dashed rgba(139, 108, 255, .5); pointer-events: none; }
.draw-row { flex: none; display: flex; align-items: center; gap: 8px; overflow-x: auto; padding: 2px 2px 4px; scrollbar-width: none; }
.draw-row::-webkit-scrollbar { display: none; }
.draw-colors { justify-content: safe center; gap: 6px; }
.swatch { flex: 1 1 0; min-width: 26px; max-width: 34px; aspect-ratio: 1; height: auto; padding: 0; border: 0; border-radius: 50%; cursor: pointer; background: var(--sw); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .2), 0 0 0 2px rgba(255, 255, 255, .08); transition: scale .2s var(--ease-bounce); }
.swatch.is-on { scale: 1.12; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .2), 0 0 0 3px #000, 0 0 0 5.5px #fff; }
.size-btn { flex: none; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 12px; cursor: pointer; background: var(--felt-3); margin-left: 4px; }
.size-btn i { width: var(--d, 14px); height: var(--d, 14px); border-radius: 50%; background: var(--sw, #fff); box-shadow: 0 0 0 2px rgba(255, 255, 255, .5); transition: width .2s var(--ease-bounce), height .2s var(--ease-bounce); }
.draw-tools { justify-content: safe center; gap: 6px; padding-bottom: 6px; }
.canvas-btn { position: absolute; z-index: 2; top: 10px; display: grid; place-items: center; width: 42px; height: 42px; padding: 0; border: 0; border-radius: 50%; cursor: pointer; color: var(--paper-ink); background: rgba(255, 255, 255, .75); box-shadow: 0 2px 0 rgba(0, 0, 0, .18), inset 0 0 0 1.5px rgba(34, 29, 20, .12); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.canvas-btn:active { scale: .9; }
.canvas-btn .ico { width: 22px; height: 22px; }
.canvas-btn--undo { right: 60px; }
.canvas-btn--clear { right: 10px; }
.canvas-btn.is-armed { background: #ff5a5a; color: #fff; animation: nope .4s ease; }
.dtool { flex: 1 1 0; min-width: 34px; max-width: 48px; aspect-ratio: 1; height: auto; display: grid; place-items: center; padding: 0; border: 0; border-radius: 15px; cursor: pointer; color: var(--fg); background: var(--noise), linear-gradient(180deg, var(--felt-3), var(--felt-2)); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08), 0 4px 0 #0b0b0c; transition: translate .12s, box-shadow .12s; }
.dtool:active { translate: 0 3px; box-shadow: 0 1px 0 #0b0b0c; }
.dtool .ico { width: 24px; height: 24px; }
.dtool.is-on { color: var(--lime-ink); background: var(--noise-dark), linear-gradient(180deg, #d9fd5c, var(--lime-2)); box-shadow: 0 4px 0 var(--lime-deep); }
.dtool--act { background: rgba(255, 255, 255, .04); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .12); }
.dtool.is-armed { background: #ff5a5a; color: #fff; animation: nope .4s ease; }
.rainbow-ico path { stroke-width: 2.6; }
.jelly-ico { color: #ff7ac0; } .jelly-ico .fill { fill: rgba(255, 122, 192, .55); } /* s199 желе */
.neon-ico { filter: drop-shadow(0 0 4px var(--pink)); color: var(--pink); }
.dtool.is-on .neon-ico { color: #b1006a; filter: none; }
.draw-stamps { justify-content: safe center; }
.stamp { flex: none; display: grid; place-items: center; width: 50px; height: 50px; padding: 0; border: 0; border-radius: 14px; cursor: pointer; background: var(--paper); box-shadow: 0 3px 0 rgba(0, 0, 0, .35); transition: scale .2s var(--ease-bounce); }
.stamp canvas { width: 40px; height: 40px; }
.stamp.is-on { scale: 1.1; box-shadow: 0 0 0 3px var(--lime), 0 3px 0 rgba(0, 0, 0, .35); }

/* праздник и подарки */
.celebrate { background: radial-gradient(90% 60% at 50% 30%, rgba(198, 245, 58, .16), rgba(0, 0, 0, .88) 60%), rgba(0, 0, 0, .85); overflow-y: auto; }
.cele { display: flex; flex-direction: column; align-items: center; gap: 10px; width: min(100%, 380px); padding-block: 8px; }
.cele-title { margin: 0; font: 800 clamp(40px, 13vw, 58px)/1 var(--font-display); color: var(--lime); letter-spacing: -.03em; text-shadow: 0 5px 0 var(--lime-deep); animation: celeIn .7s var(--ease-bounce) both; }
@keyframes celeIn { from { scale: .3; rotate: -12deg; opacity: 0; } }
.cele-card .mcard--big { width: min(56vw, 210px); animation: celeIn .7s .1s var(--ease-bounce) both; }
.cele-card .mcard--big .mcard-name { font-size: 18px; }
.cele-sub { margin: 4px 0 0; font: 700 18px/1.25 var(--font-hand); text-align: center; text-wrap: balance; }
.gifts { display: flex; gap: 12px; justify-content: center; }
.gift { position: relative; width: 96px; height: 104px; padding: 0; border: 0; background: none; cursor: pointer; animation: giftIn .6s var(--ease-bounce) both; animation-delay: calc(.35s + var(--i) * .12s); }
@keyframes giftIn { from { translate: 0 40px; opacity: 0; } }
.gift-box { position: absolute; left: 10px; right: 10px; bottom: 6px; height: 62px; border-radius: 10px; background: linear-gradient(180deg, color-mix(in srgb, var(--gc) 80%, #fff), var(--gc)); box-shadow: inset 0 -6px 0 rgba(0, 0, 0, .18), 0 6px 0 -1px rgba(0, 0, 0, .4); animation: giftWobble 2.2s ease-in-out infinite; animation-delay: calc(var(--i) * -.5s); transform-origin: 50% 100%; transition: scale .35s var(--ease-bounce), opacity .3s; }
@keyframes giftWobble { 0%, 70%, 100% { rotate: 0deg; } 76% { rotate: -6deg; } 84% { rotate: 5deg; } 92% { rotate: -2deg; } }
.gift-lid { position: absolute; left: -6px; right: -6px; top: -14px; height: 18px; border-radius: 7px; background: color-mix(in srgb, var(--gc) 70%, #fff); box-shadow: 0 3px 0 rgba(0, 0, 0, .2); }
.gift-ribbon { position: absolute; left: 50%; top: -14px; bottom: 0; width: 14px; translate: -50% 0; background: #ffd84a; }
.gift-ribbon::before, .gift-ribbon::after { content: ""; position: absolute; top: -16px; width: 22px; height: 16px; border-radius: 50% 50% 0 50%; border: 5px solid #ffd84a; }
.gift-ribbon::before { right: 6px; rotate: 20deg; }
.gift-ribbon::after { left: 6px; rotate: 70deg; }
.gift-in { position: absolute; inset: 0; display: grid; place-items: center; scale: 0; opacity: 0; transition: scale .5s var(--ease-bounce) .15s, opacity .2s .15s; }
.gift.is-open .gift-box { scale: 0; opacity: 0; }
.gift.is-open .gift-in { scale: 1; opacity: .45; }
.gift.is-open.is-chosen .gift-in { opacity: 1; scale: 1.12; }
.gv { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 92px; padding: 10px 6px 8px; border-radius: 20px; background: var(--noise), var(--felt-2); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); color: var(--lime); }
.gift.is-chosen .gv { box-shadow: 0 0 0 3px var(--lime), 0 0 30px rgba(198, 245, 58, .45); }
.gv .ico { width: 40px; height: 40px; }
.gv--power { color: var(--pc); }
.gv img { width: 64px; height: 42px; border-radius: 8px; object-fit: cover; }
.gv b { font: 700 12px/1.1 var(--font-hand); color: var(--fg); text-align: center; }
.cele-actions { display: flex; flex-direction: column; gap: 10px; width: 100%; margin-top: 6px; animation: fadeIn .4s ease; }

@media (max-height: 700px) {
  .btn-lime--tile { min-height: 78px; }
  .power { width: 46px; height: 46px; }
  .powers { gap: 8px; }
  .tray-item { width: 56px; height: 56px; }
  .tray-item canvas { width: 44px; height: 44px; }
  .cele-card .mcard--big { width: min(44vw, 170px); }
}

/* v4: фон картинками справа, заголовок игры */
.play-title { flex: 1; min-width: 0; text-align: center; font: 800 clamp(13px, 4vw, 17px)/1.1 var(--font-display); color: var(--fg); text-shadow: 0 2px 8px rgba(0, 0, 0, .6); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; rotate: -2deg; }
.bg-col { position: absolute; z-index: 5; right: 12px; top: 70px; display: flex; flex-direction: column; gap: 9px; }
.bg-pick { position: relative; display: grid; place-items: center; width: 50px; height: 38px; padding: 0; border: 0; border-radius: 12px 10px 13px 9px; cursor: pointer; background: #111 center / cover no-repeat; box-shadow: 0 0 0 2px rgba(255, 255, 255, .22), 0 6px 12px -6px rgba(0, 0, 0, .9); transition: scale .2s var(--ease-bounce), box-shadow .2s; }
.bg-pick:nth-child(odd) { rotate: -3deg; }
.bg-pick:nth-child(even) { rotate: 2.5deg; }
.bg-pick:active { scale: .9; }
.bg-pick.is-on { box-shadow: 0 0 0 3px var(--lime), 0 0 16px rgba(198, 245, 58, .5); scale: 1.08; }
.bg-pick.is-locked { filter: grayscale(.8) brightness(.55); }
.bg-pick .lock { right: -5px; bottom: -5px; }
.bg-cam { background-color: var(--felt-3); color: var(--fg); }
.bg-cam .ico { width: 20px; height: 20px; }
@media (max-height: 700px) { .bg-pick { width: 44px; height: 33px; } .bg-col { gap: 7px; } }

/* v5: «Поиграть» без текста — мордочки голосов, «?», кружочки коллекции */
.drop-ico--big { width: 86px; height: 86px; border-radius: 30px 26px 32px 24px; rotate: -5deg; }
.drop-ico--big .ico { width: 42px; height: 42px; }
.drop-change { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border-radius: 50%; }
.drop-change .ico { width: 22px; height: 22px; }
.pick-row { display: flex; align-items: center; gap: 10px; min-height: 64px; }
.q-btn {
  flex: none; display: grid; place-items: center; width: 60px; height: 60px; padding: 0 0 4px; border: 0; border-radius: 50%; cursor: pointer;
  font: 800 34px/1 var(--font-display); color: #fff; rotate: -6deg;
  background: var(--clay-tex), radial-gradient(circle at 35% 30%, #ffa06a, #ff7a38 60%, #e85b1a);
  background-blend-mode: soft-light, normal;
  box-shadow: inset 0 3px 3px rgba(255, 255, 255, .45), inset 0 -6px 10px rgba(120, 30, 0, .3), 0 5px 0 #97360a, 0 12px 20px -10px rgba(255, 122, 56, .5);
  transition: translate .12s, box-shadow .12s;
  animation: qWob 3s ease-in-out infinite;
}
.q-btn:active { translate: 0 4px; box-shadow: inset 0 3px 3px rgba(255, 255, 255, .45), 0 1px 0 #97360a; }
@keyframes qWob { 0%, 80%, 100% { rotate: -6deg; } 86% { rotate: 8deg; } 93% { rotate: -10deg; } }
.avatars { flex: 1; min-width: 0; display: flex; gap: 8px; overflow-x: auto; padding: 6px 4px 8px; scrollbar-width: none; }
.avatars::-webkit-scrollbar { display: none; }
.ava { --c1: #c9f2d9; flex: none; position: relative; width: 54px; height: 54px; padding: 0; border: 0; border-radius: 50%; overflow: hidden; cursor: pointer; background: var(--c1); box-shadow: 0 0 0 3px #fff, 0 6px 12px -6px rgba(0, 0, 0, .9); rotate: calc((var(--i) - 2) * 2deg); animation: cardIn .45s var(--ease-bounce) both; animation-delay: calc(var(--i) * 40ms); }
.ava img { width: 100%; height: 100%; object-fit: contain; padding: 5px; }
.ava--photo img { object-fit: cover; padding: 0; }
.ava:active { scale: .9; }
.vopt { width: 64px; }
.vopt .face { width: 58px; height: 58px; display: block; transition: scale .25s var(--ease-bounce), filter .2s; filter: drop-shadow(0 5px 6px rgba(0, 0, 0, .45)); }
.vopt:active .face { scale: .88; }
.vopt.is-on .face { scale: 1.12; filter: drop-shadow(0 0 10px rgba(198, 245, 58, .7)) drop-shadow(0 5px 6px rgba(0, 0, 0, .45)); }
.vopt.is-on::after { content: ""; position: absolute; left: 50%; bottom: -6px; width: 18px; height: 5px; translate: -50% 0; border-radius: 4px; background: var(--lime); }
.vopt.is-locked .face { opacity: .4; filter: grayscale(.7); }
.vopt .lock { right: 0; bottom: 0; }
.voice-btn .face { width: 36px; height: 36px; display: block; }
.voice-pick { gap: 6px; padding-bottom: 14px; }
.gv .face { width: 52px; height: 52px; }

/* v6: коллекция маленькими кружками в шапке справа, «?» в углу фото */
.bar-title--left { text-align: left; }
.avatars--top { flex: 0 1 auto; max-width: 58%; padding: 4px 2px; gap: 0; }
.avatars--top .ava { width: 36px; height: 36px; margin-left: -8px; box-shadow: 0 0 0 2.5px var(--ink), 0 0 0 4px #fff; rotate: 0deg; }
.avatars--top .ava:first-child { margin-left: 0; }
.avatars--top .ava img { padding: 3px; }
.avatars--top .ava--photo img { padding: 0; }
.drop-wrap { position: relative; flex: 1; display: flex; min-height: 0; }
.drop-wrap .drop { flex: 1; }
.drop-wrap .q-btn { position: absolute; left: 12px; bottom: 12px; z-index: 2; }
.ava--more { display: grid; place-items: center; font: 800 13px/1 var(--font-display); color: var(--lime-ink); background: var(--lime); }


/* ===================== v7: плоский стиль (как Gogo / macha), две темы ===================== */
body { background: var(--ink); color: var(--fg); font-family: var(--font-body); font-weight: 500; }
.glass { background: var(--felt-2); border: 1.5px solid var(--line); box-shadow: 0 3px 0 var(--line-2); }
.stitch { outline: 0; }
.paper { background: var(--paper); color: var(--paper-ink); box-shadow: 0 3px 0 rgba(0, 0, 0, .18); }
.icon-btn { color: var(--fg); }
.icon-btn.glass { box-shadow: 0 3px 0 var(--line-2); }

/* кнопки: сплошной цвет и «слой» снизу, без фактуры и свечения, чуть наперекосяк */
.btn-lime {
  --b-mid: #c6f53a; --b-deep: #86ad12; --b-deep2: rgba(134, 173, 18, .45); --b-ink: #172300;
  background: var(--b-mid);
  background-blend-mode: normal;
  color: var(--b-ink);
  border-radius: 24px;
  font: 800 clamp(16px, 4.6vw, 19px)/1.15 var(--font-display); letter-spacing: -.01em;
  box-shadow: 0 6px 0 var(--b-deep), 0 11px 0 var(--b-deep2);
  margin-bottom: 11px;
  animation: none;
}
.btn-lime:active { translate: 0 5px; box-shadow: 0 1px 0 var(--b-deep), 0 4px 0 var(--b-deep2); }
.btn-lime.is-pop { animation: btnPop .55s var(--ease-bounce); }
.btn-lime .btn-ico { animation: none; }
.btn-lime--tile { border-radius: 26px; }
.c-lime { --b-mid: #c6f53a; --b-deep: #86ad12; --b-deep2: rgba(134, 173, 18, .45); --b-ink: #172300; }
.c-yellow { --b-mid: #ffc43d; --b-deep: #d39418; --b-deep2: rgba(211, 148, 24, .45); --b-ink: #2a1c00; }
.c-violet { --b-mid: #8f7dff; --b-deep: #5d4bd6; --b-deep2: rgba(93, 75, 214, .45); --b-ink: #fff; }
.c-pink { --b-mid: #ff9fd8; --b-deep: #d8649f; --b-deep2: rgba(216, 100, 159, .45); --b-ink: #3d0a2c; }
.c-orange { --b-mid: #ff7a38; --b-deep: #c9501a; --b-deep2: rgba(201, 80, 26, .45); --b-ink: #fff; }
.c-sky { --b-mid: #74bdff; --b-deep: #3f88cf; --b-deep2: rgba(63, 136, 207, .45); --b-ink: #06243f; }
.btn-glass { background: var(--felt-2); border: 1.5px solid var(--line); outline: 0; box-shadow: 0 4px 0 var(--line-2); color: var(--fg); }
.btn-text { color: var(--fg-2); text-decoration-color: var(--yellow); }
.chip, .pill { font-family: var(--font-body); font-weight: 700; }
.pill { background: var(--paper); color: var(--paper-ink); }

/* реплики — пилюли как «Hello~» */
.say, .bubble { background: var(--bubble-bg); color: var(--bubble-fg); font: 800 16px/1.1 var(--font-display); border-radius: 999px; padding: 9px 15px 10px; box-shadow: 0 4px 0 rgba(0, 0, 0, .18); rotate: -3deg; }
.say::after, .bubble::after { background: var(--bubble-bg); }
.bubble { font-size: 18px; }

/* поверхности */
.drop { background: var(--felt-2); outline: 2px dashed var(--line); outline-offset: -10px; border: 0; box-shadow: none; }
.drop.has-img { outline-color: var(--yellow); }
.drop-ico, .drop-ico--big { background: var(--yellow); color: #2a1c00; box-shadow: 0 5px 0 #d39418; }
.drop-change { background: var(--paper); color: var(--paper-ink); box-shadow: 0 3px 0 rgba(0, 0, 0, .2); }
.step { background: var(--felt-2); border: 1.5px solid var(--line); color: var(--fg-3); }
.step b { background: var(--felt-3); color: var(--fg-2); font-family: var(--font-display); }
.step.is-done { color: var(--fg); border-color: var(--yellow); }
.step.is-done b { background: var(--yellow); color: #2a1c00; }
.sheet, .loading-card { background: var(--felt-2); border: 1.5px solid var(--line); box-shadow: 0 8px 0 var(--line-2); }
.overlay { background: rgba(10, 9, 8, .55); }
.field { background: var(--felt); color: var(--fg); border: 1.5px solid var(--line); }
.progress { background: var(--felt-3); }
.progress i { background: repeating-linear-gradient(-45deg, var(--yellow) 0 10px, #ffd46f 10px 20px); }
.toast { background: var(--bubble-bg); color: var(--bubble-fg); font-family: var(--font-body); font-weight: 700; border-radius: 999px; }
.polaroid { background: #fffaf0; box-shadow: 0 6px 0 rgba(0, 0, 0, .18); }
.polaroid figcaption { font-family: var(--font-display); font-weight: 800; }
.badge { font-family: var(--font-body); font-weight: 800; }
.logo-sticker { font-family: var(--font-display); font-weight: 800; background: var(--yellow); color: #2a1c00; box-shadow: 0 3px 0 #d39418; }
.tagline { font-weight: 600; }
.coll-btn { background: var(--felt-2); box-shadow: 0 3px 0 var(--line-2); border: 1.5px solid var(--line); }
.coll-btn b { color: var(--fg); }

/* игра */
.play-stage { background: var(--ink); }
.play-floor { background: linear-gradient(180deg, var(--felt-2), transparent 60%); border-top: 2px solid var(--line); }
.play-title { color: var(--fg); text-shadow: none; font-weight: 800; }
.tray { background: var(--felt-2); border: 1.5px solid var(--line); box-shadow: 0 6px 0 var(--line-2); -webkit-backdrop-filter: none; backdrop-filter: none; }
.tray-item { background: var(--felt); }
.tray-item.is-active { background: rgba(255, 196, 61, .25); }
.power { background: var(--felt-2); box-shadow: 0 3px 0 var(--line-2); -webkit-backdrop-filter: none; backdrop-filter: none; border: 1.5px solid var(--line); }
.power-ico .ico { filter: none; }
.power.is-on { background: var(--pc); color: #111; box-shadow: 0 4px 0 color-mix(in srgb, var(--pc) 60%, #000); border-color: transparent; animation: powerGlow 1.6s ease-in-out infinite; }
.bg-pick { box-shadow: 0 0 0 2px var(--line), 0 3px 0 var(--line-2); }
.bg-pick.is-on { box-shadow: 0 0 0 3px var(--yellow), 0 3px 0 var(--line-2); }
.voice-btn { color: var(--fg); }
.q-btn { background: var(--orange); background-blend-mode: normal; box-shadow: 0 5px 0 #c9501a, 0 9px 0 rgba(201, 80, 26, .4); font: 900 32px/1 var(--font-display); animation: none; }
.q-btn:active { translate: 0 4px; box-shadow: 0 1px 0 #c9501a; }
.ava { box-shadow: 0 0 0 2.5px var(--ink), 0 0 0 4.5px var(--paper); }
.avatars--top .ava { box-shadow: 0 0 0 2.5px var(--ink), 0 0 0 4px var(--paper); }
.ava--more { background: var(--yellow); color: #2a1c00; font-weight: 800; }
.vopt.is-on::after { background: var(--yellow); }
.vopt.is-on .face { filter: drop-shadow(0 5px 6px rgba(0, 0, 0, .35)); }

/* рисование */
.task-card { background: var(--paper); color: var(--paper-ink); box-shadow: 0 4px 0 rgba(0, 0, 0, .18); }
.task-speak { background: #1d1a16; color: var(--yellow); }
.done-btn { background: var(--yellow); color: #2a1c00; box-shadow: 0 5px 0 #d39418; }
.done-btn:active { box-shadow: 0 1px 0 #d39418; }
.draw-wrap { box-shadow: 0 6px 0 var(--line-2); }
.dtool { background: var(--felt-2); border: 1.5px solid var(--line); box-shadow: 0 3px 0 var(--line-2); color: var(--fg); }
.dtool.is-on { background: var(--yellow); color: #2a1c00; box-shadow: 0 3px 0 #d39418; border-color: transparent; }
.size-btn { background: var(--felt-2); border: 1.5px solid var(--line); }
.swatch.is-on { box-shadow: 0 0 0 3px var(--ink), 0 0 0 5.5px var(--fg); }
.stamp { background: var(--paper); }
.stamp.is-on { box-shadow: 0 0 0 3px var(--yellow), 0 3px 0 rgba(0, 0, 0, .25); }
.fur-ico { color: #c98a4a; }
.dtool.is-on .fur-ico { color: #7a4a1a; }

/* праздник */
.celebrate { background: rgba(10, 9, 8, .82); }
:root[data-theme="light"] .celebrate { background: rgba(247, 238, 223, .94); }
.cele-title { color: var(--yellow); text-shadow: 0 5px 0 #d39418; font-weight: 900; }
.cele-sub { font-family: var(--font-body); font-weight: 700; color: var(--fg); }
.gv { background: var(--felt-2); border: 1.5px solid var(--line); }
.gv b { font-family: var(--font-body); font-weight: 700; color: var(--fg); }
.gift.is-chosen .gv { box-shadow: 0 0 0 3px var(--yellow); }
.gv .toy { width: 58px; height: 58px; }

/* переключатели темы и языка на главном */
.home-top { gap: 8px; }
.toggle-btn { display: grid; place-items: center; min-width: 44px; height: 44px; padding: 0 10px; border-radius: 999px; cursor: pointer; font: 800 13px/1 var(--font-display); color: var(--fg); background: var(--felt-2); border: 1.5px solid var(--line); box-shadow: 0 3px 0 var(--line-2); }
.toggle-btn .ico { width: 20px; height: 20px; }
.toggle-btn:active { translate: 0 2px; box-shadow: 0 1px 0 var(--line-2); }

/* ---------- коллекция: один монстр крупно ---------- */
.screen--coll { --c1: #ffd3e7; --c2: #ffabd0; --cink: #3d0a2c; background: linear-gradient(180deg, var(--c2) 0%, var(--c1) 46%, var(--ink) 92%); transition: background .5s; }
.screen--coll.is-toys { background: var(--ink); }
.screen--coll .bar .icon-btn { background: rgba(255, 255, 255, .55); border-color: transparent; color: #1d1a16; box-shadow: 0 3px 0 rgba(0, 0, 0, .12); }
.screen--coll.is-toys .bar .icon-btn { background: var(--felt-2); color: var(--fg); border-color: var(--line); }
.seg { flex: 1; display: flex; justify-content: center; gap: 4px; padding: 4px; margin-inline: auto; max-width: 240px; border-radius: 999px; background: rgba(0, 0, 0, .14); }
.screen--coll.is-toys .seg { background: var(--felt-2); }
.seg-btn { flex: 1; min-height: 36px; padding: 0 12px; border: 0; border-radius: 999px; cursor: pointer; background: none; font: 800 14px/1 var(--font-display); color: rgba(29, 26, 22, .6); }
.screen--coll.is-toys .seg-btn { color: var(--fg-2); }
.screen--coll.is-toys .seg-btn.is-on { background: var(--fg); color: var(--ink); }
.seg-btn.is-on { background: #fffaf0; color: #1d1a16; box-shadow: 0 2px 0 rgba(0, 0, 0, .12); }
.coll-view { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.coll-top { display: flex; align-items: flex-start; justify-content: space-between; padding: 10px 4px 0; color: var(--cink); }
.coll-num { display: flex; flex-direction: column; line-height: 1; }
.coll-num small { font: 700 14px/1.2 var(--font-body); opacity: .75; }
.coll-num b { font: 900 clamp(56px, 18vw, 76px)/1 var(--font-display); letter-spacing: -.04em; }
.coll-num em { font: 800 16px/1 var(--font-display); font-style: normal; opacity: .55; margin-top: -4px; }
.rar-pill { margin-top: 6px; padding: 7px 12px; border-radius: 999px; font: 800 12px/1 var(--font-body); letter-spacing: .03em; text-transform: uppercase; color: #fff; background: rgba(29, 26, 22, .78); }
.rar-pill[data-rar="rare"] { background: #3d8bff; }
.rar-pill[data-rar="epic"] { background: #7a4dff; }
.rar-pill[data-rar="legend"] { background: linear-gradient(100deg, #ffb800, #ff5fb0, #8b6cff, #ffb800); background-size: 300% 100%; animation: shimmer 3s linear infinite; }
.coll-stage { position: relative; flex: 1; min-height: 180px; display: grid; place-items: center; touch-action: pan-y; }
.coll-hero { position: relative; width: min(74vw, 330px); height: 100%; max-height: 360px; display: grid; place-items: center; cursor: pointer; }
.coll-hero::after { content: ""; position: absolute; left: 20%; right: 20%; bottom: 4%; height: 7%; border-radius: 50%; background: rgba(40, 20, 30, .22); z-index: -1; animation: heroShadow 3s ease-in-out infinite; }
.coll-hero img { width: 100%; height: 88%; object-fit: contain; animation: heroBob 3s ease-in-out infinite; transform-origin: 50% 100%; filter: drop-shadow(0 10px 12px rgba(40, 20, 30, .25)); }
.coll-hero.is-photo img { width: 88%; height: 82%; object-fit: cover; border-radius: 26px; border: 6px solid #fffaf0; box-shadow: 0 6px 0 rgba(0, 0, 0, .15); animation: none; rotate: -2deg; filter: none; }
.coll-hero.is-photo::after { display: none; }
@keyframes heroBob { 0%, 100% { translate: 0 0; scale: 1 1; } 50% { translate: 0 -8px; scale: .99 1.01; } }
@keyframes heroShadow { 0%, 100% { scale: 1; opacity: 1; } 50% { scale: .85; opacity: .7; } }
.coll-hero.is-poke img { animation: mBoing .7s var(--ease-bounce); }
.coll-hero.is-in-r img { animation: heroInR .45s var(--ease-bounce); }
.coll-hero.is-in-l img { animation: heroInL .45s var(--ease-bounce); }
@keyframes heroInR { from { translate: 60px 0; opacity: 0; scale: .8; } }
@keyframes heroInL { from { translate: -60px 0; opacity: 0; scale: .8; } }
.coll-arrow { position: absolute; top: 50%; z-index: 2; display: grid; place-items: center; width: 44px; height: 44px; translate: 0 -50%; border: 0; border-radius: 50%; cursor: pointer; color: #fffaf0; background: rgba(29, 26, 22, .22); }
.coll-arrow .ico { width: 26px; height: 26px; stroke-width: 3; }
.coll-arrow--l { left: -6px; } .coll-arrow--r { right: -6px; }
.coll-arrow:active { scale: .9; }
.coll-name { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 48px; color: var(--fg); }
.coll-name span { font: 900 clamp(24px, 7vw, 30px)/1.1 var(--font-display); letter-spacing: -.02em; text-align: center; }
.coll-name-input { width: min(70vw, 280px); min-height: 46px; padding: 0 14px; border-radius: 16px; border: 2px solid var(--yellow); background: var(--felt-2); color: var(--fg); font: 800 22px/1 var(--font-display); text-align: center; -webkit-user-select: text; user-select: text; }
.name-btn { display: grid; place-items: center; width: 38px; height: 38px; border: 0; border-radius: 50%; cursor: pointer; background: none; color: var(--fg-2); }
.name-btn .ico { width: 22px; height: 22px; }
.name-btn.is-roll { animation: roll .6s var(--ease-bounce); }
.coll-meta { margin: 0 0 10px; text-align: center; color: var(--fg-3); font: 700 13px/1 var(--font-body); text-transform: uppercase; letter-spacing: .06em; }
.coll-card { display: flex; align-items: flex-start; gap: 10px; padding: 16px 16px 8px; border-radius: 28px; background: var(--felt-2); border: 1.5px solid var(--line); box-shadow: 0 6px 0 var(--line-2); }
.coll-card .btn-lime { flex: 1; min-height: 56px; margin-bottom: 11px; }
.coll-card .icon-btn.sq { width: 56px; height: 56px; border-radius: 18px; }
#coll-del.is-armed, #coll-clear.is-armed { background: var(--danger) !important; color: #fff !important; animation: nope .4s ease; }
.coll-empty { flex: 1; justify-content: center; }
/* игрушки */
.toys-count { margin: 8px 2px 10px; font: 800 15px/1.2 var(--font-display); color: var(--fg-2); }
.toys-grid { flex: 1; min-height: 0; overflow-y: auto; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 4px 2px 20px; align-content: start; }
.toy-tile { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px 12px; border: 1.5px solid var(--line); border-radius: 22px; cursor: pointer; background: var(--felt-2); box-shadow: 0 4px 0 var(--line-2); color: var(--fg); font: 700 12px/1.15 var(--font-body); text-align: center; animation: cardIn .45s var(--ease-bounce) both; animation-delay: calc(var(--i) * 30ms); }
.toy-tile:nth-child(3n+1) { rotate: -1.5deg; } .toy-tile:nth-child(3n+2) { rotate: 1deg; } .toy-tile:nth-child(3n) { rotate: -.5deg; }
.toy-tile.is-missing .toy { filter: brightness(0) opacity(.18); }
:root[data-theme="light"] .toy-tile.is-missing .toy { filter: brightness(0) opacity(.12); }
.toy-tile.is-missing span { color: var(--fg-3); font: 900 18px/1 var(--font-display); }
.toy-tile.is-poke .toy { animation: mBoing .7s var(--ease-bounce); }
.toy-n { position: absolute; right: 8px; top: 6px; font: 800 12px/1 var(--font-display); font-style: normal; color: #2a1c00; background: var(--yellow); padding: 4px 6px; border-radius: 999px; }

/* переключатель темы: показываем ту тему, в которую переключимся */
#btn-theme .ico-moon { display: none; }
:root[data-theme="light"] #btn-theme .ico-moon { display: block; }
:root[data-theme="light"] #btn-theme .ico-sun { display: none; }
#btn-lang { font: 800 14px/1 var(--font-display); letter-spacing: .04em; }

#demo-pill { white-space: nowrap; }

/* надпись и реплики в игре всегда читаются поверх любого фона */
.play-title { flex: 0 1 auto; margin-inline: auto; overflow: hidden; text-overflow: ellipsis; padding: 7px 12px; border-radius: 999px; background: rgba(20, 18, 16, .55); color: #fff8ea; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
#play-bubble { background: #fff8ea; color: #1d1a16; }
#play-bubble::after { background: #fff8ea; }

/* узкие телефоны: верхняя строка помещается целиком */
@media (max-width: 360px) {
  .home-top { gap: 5px; }
  .toggle-btn { min-width: 38px; height: 38px; padding: 0 7px; }
  .coll-btn { height: 38px; margin-right: 0; padding: 0 9px 0 6px; }
  .home-top .icon-btn { width: 38px; height: 38px; }
  #demo-pill { padding: 0 8px; font-size: 11px; }
}
/* низкие экраны: сцена с монстриками уступает место кнопкам */
@media (max-height: 620px) {
  .stage { min-height: 140px; }
  .btn-lime--tile { min-height: 70px; padding: 8px; gap: 3px; }
  .btn-lime--tile .btn-ico { width: 26px; height: 26px; }
  .tagline { font-size: 14px; }
}
/* выключенная кнопка: спокойная, под цвет темы */
.btn-lime:disabled { filter: none; opacity: 1; background: var(--felt-3); color: var(--fg-3); box-shadow: 0 6px 0 var(--line-2); rotate: 0deg; }
.btn-lime:disabled .ico { color: var(--fg-3); }

/* ---------- конструктор монстра по шагам ---------- */
.screen--draw { gap: 7px; }
.steps-row { flex: none; display: flex; justify-content: space-between; gap: 4px; padding: 0 2px; }
.step-chip { position: relative; flex: 1 1 0; max-width: 46px; aspect-ratio: 1; display: grid; place-items: center; padding: 0; border: 1.5px solid var(--line); border-radius: 14px; cursor: pointer; color: var(--fg-2); background: var(--felt-2); box-shadow: 0 3px 0 var(--line-2); transition: scale .25s var(--ease-bounce), background .2s; }
.step-chip canvas { width: 30px !important; height: 30px !important; pointer-events: none; }
.step-chip .ico { width: 22px; height: 22px; }
.step-chip.is-done::after { content: ''; position: absolute; right: -3px; top: -3px; width: 14px; height: 14px; border-radius: 50%; background: #3ccf4e url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4L18 8' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 11px no-repeat; box-shadow: 0 0 0 2px var(--ink); }
.step-chip.is-on { scale: 1.12; background: var(--yellow); color: #2a1c00; border-color: transparent; box-shadow: 0 3px 0 #d39418; }
.done-btn .ico-done { display: none; }
.done-btn.is-last .ico-next { display: none; }
.done-btn.is-last .ico-done { display: block; }
.done-btn.is-last { background: #3ccf4e; color: #fff; box-shadow: 0 5px 0 #23913a; }
#parts-canvas { pointer-events: none; }
.draw-wrap.is-parts #parts-canvas { pointer-events: auto; cursor: grab; }
.draw-wrap.is-parts #draw-canvas, .draw-wrap.is-parts #slime-canvas { visibility: hidden; }
.draw-panel { flex: none; display: flex; flex-direction: column; gap: 6px; min-height: 0; }
.draw-panel[hidden] { display: none; }
#panel-body .draw-colors { justify-content: flex-start; gap: 8px; padding: 7px 9px; scroll-padding-inline: 9px; }
#panel-body .swatch { flex: none; width: 32px; min-width: 0; max-width: none; }
.dtool.dtool--big { flex: 0 0 auto; width: 64px; max-width: none; height: 52px; aspect-ratio: auto; border-radius: 16px; }
.dtool.dtool--big .ico { width: 30px; height: 30px; }
.dtool.dtool--small { flex: 0 0 auto; width: 46px; max-width: none; height: 46px; opacity: .85; }
.clay-ico path:first-child { stroke: #ff8a4a; }
.dtool.is-on .clay-ico path:first-child { stroke: #c2410c; }
.fur-ico { color: #b07a4a; }
.part-row { gap: 8px; padding: 4px 4px 8px; scroll-snap-type: x proximity; }
.part-opt { flex: none; display: grid; place-items: center; width: 64px; height: 64px; padding: 0; border: 1.5px solid var(--line); border-radius: 18px; cursor: pointer; background: var(--felt-2); box-shadow: 0 4px 0 var(--line-2); scroll-snap-align: center; transition: scale .25s var(--ease-bounce); }
.part-opt canvas { width: 54px !important; height: 54px !important; pointer-events: none; }
.part-opt:active { scale: .92; }
.part-opt.is-on { scale: 1.08; background: var(--paper); border-color: transparent; box-shadow: 0 0 0 3px var(--yellow), 0 4px 0 #d39418; }
.part-opt--none { color: var(--fg-3); }
.part-opt--none .ico { width: 26px; height: 26px; }
.part-opt--none.is-on { color: #1d1a16; }
.part-size { display: flex; align-items: center; justify-content: center; gap: 14px; padding-bottom: 4px; }
.size-pm { display: grid; place-items: center; width: 48px; height: 44px; padding: 0; border: 1.5px solid var(--line); border-radius: 14px; cursor: pointer; color: var(--fg); background: var(--felt-2); box-shadow: 0 3px 0 var(--line-2); }
.size-pm .ico { width: 24px; height: 24px; stroke-width: 3; }
.size-pm:active { translate: 0 2px; box-shadow: 0 1px 0 var(--line-2); }
.size-pm:disabled { opacity: .35; }
.part-size-dot { display: flex; align-items: flex-end; gap: 5px; }
.part-size-dot i { display: block; border-radius: 50%; background: var(--fg-3); }
.part-size-dot i:nth-child(1) { width: 8px; height: 8px; }
.part-size-dot i:nth-child(2) { width: 12px; height: 12px; }
.part-size-dot i:nth-child(3) { width: 16px; height: 16px; }
#panel-name { flex-direction: row; align-items: center; gap: 8px; padding: 2px 2px 8px; }
.name-opts { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.name-opt { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 50px; padding: 0 16px; border: 0; border-radius: 18px; cursor: pointer; color: var(--b-ink, #1d1a16); background: var(--b-mid, #ffc43d); box-shadow: 0 5px 0 var(--b-deep, #d39418); font: 800 clamp(17px, 5vw, 21px)/1.1 var(--font-display); text-align: left; animation: nameIn .5s var(--ease-bounce) both; animation-delay: calc(var(--i) * 90ms); }
.name-opt .ico { flex: none; width: 22px; height: 22px; opacity: .55; }
.name-opt span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.name-opt.is-on { outline: 3px solid var(--fg); outline-offset: 3px; }
.name-opt.is-on .ico { opacity: 1; }
.name-opt.is-pop { animation: btnPop .5s var(--ease-bounce); }
@keyframes nameIn { from { opacity: 0; translate: 0 14px; scale: .9; } }
.name-dice { flex: none; display: grid; place-items: center; width: 56px; height: 56px; padding: 0; border: 1.5px solid var(--line); border-radius: 18px; cursor: pointer; color: var(--fg); background: var(--felt-2); box-shadow: 0 4px 0 var(--line-2); }
.name-dice .ico { width: 30px; height: 30px; }
.name-dice.is-roll { animation: diceRoll .6s var(--ease-bounce); }
@keyframes diceRoll { 0% { rotate: 0deg; } 60% { rotate: 380deg; scale: 1.15; } 100% { rotate: 360deg; } }
.is-nope { animation: nope .4s ease; }
@media (max-height: 620px) {
  .part-opt { width: 54px; height: 54px; }
  .part-opt canvas { width: 46px !important; height: 46px !important; }
  .name-opt { min-height: 42px; }
  .step-chip { max-width: 38px; }
}

/* ---------- Spore-режим: форма тела и живые детали ---------- */
.part-opt img { width: 54px; height: 54px; object-fit: contain; pointer-events: none; -webkit-user-drag: none; user-select: none; }
.part-opt { touch-action: pan-x; }
.step-chip img { width: 32px; height: 32px; object-fit: contain; pointer-events: none; }
.shape-row { display: flex; justify-content: center; gap: 12px; padding: 4px 4px 10px; }
.shape-opt { display: grid; place-items: center; width: 60px; height: 56px; padding: 0; border: 1.5px solid var(--line); border-radius: 18px; cursor: pointer; color: var(--fg); background: var(--felt-2); box-shadow: 0 4px 0 var(--line-2); }
.shape-opt .ico { width: 30px; height: 30px; }
.shape-opt .ico .fill { fill: var(--yellow); stroke: var(--fg); stroke-width: 1.4; }
.shape-opt:active { translate: 0 3px; box-shadow: 0 1px 0 var(--line-2); }
.draw-wrap.is-trash { box-shadow: 0 0 0 4px #ff5a5a, 0 6px 0 var(--line-2); }
.draw-wrap.is-trash::after { content: ''; position: absolute; inset: 0; background: rgba(255, 90, 90, .12); pointer-events: none; }
@media (max-height: 620px) { .part-opt img { width: 46px; height: 46px; } .shape-opt { height: 48px; } }

/* толщина кисти — пилюля с кружками в левом верхнем углу холста */
.canvas-btn.size-pick { left: 10px; right: auto; width: auto; height: 42px; display: flex; align-items: center; gap: 0; padding: 0 4px; border-radius: 21px; }
.canvas-btn.size-pick:active { scale: none; }
.size-dot { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%; background: transparent; cursor: pointer; }
.size-dot i { display: block; width: var(--d); height: var(--d); border-radius: 50%; background: var(--sw, #8b4dff); box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .18); transition: scale .15s var(--ease-bounce); }
.size-dot.is-on { background: rgba(34, 29, 20, .1); box-shadow: inset 0 0 0 2px var(--paper-ink); }
.size-dot:active i { scale: .8; }

/* ---------- коллекция v2: сцена-«витрина» ----------
   фон — цвет монстра целиком, как у коллекционной карточки (в обеих темах; без грязного перехода в чёрное),
   лучи за героем, стеклянная карточка снизу */
.screen--coll {
  --st-top: var(--c2);
  --st-bot: color-mix(in oklab, var(--c1) 70%, #fffaf2);
  --st-glow: rgba(255, 255, 255, .85);
  --st-ray: rgba(255, 255, 255, .34);
  --st-ink: var(--cink);
  --st-ink-2: color-mix(in oklab, var(--cink) 62%, transparent);
  --st-glass: rgba(255, 255, 255, .5);
  --st-glass-2: rgba(255, 255, 255, .72);
  --st-line: rgba(255, 255, 255, .8);
  --st-shadow: color-mix(in oklab, var(--cink) 22%, transparent);
}
.screen--coll:not(.is-toys) {
  background:
    radial-gradient(closest-side, var(--st-glow), transparent) 50% 42% / 130% 58% no-repeat,
    linear-gradient(180deg, var(--st-top), var(--st-bot));
  background-color: var(--st-bot);
}
.screen--coll:not(.is-toys) .bar .icon-btn { background: var(--st-glass-2); color: var(--st-ink); border: 1px solid var(--st-line); box-shadow: 0 3px 0 var(--st-shadow); }
.screen--coll:not(.is-toys) .seg { background: color-mix(in oklab, var(--st-shadow) 60%, transparent); }
.screen--coll:not(.is-toys) .seg-btn { color: var(--st-ink-2); }
.screen--coll:not(.is-toys) .seg-btn.is-on { background: #fffaf0; color: #1d1a16; }
.screen--coll .coll-top { color: var(--st-ink); }
.screen--coll .coll-stage { isolation: isolate; }
.screen--coll .coll-stage::before {
  content: ""; position: absolute; z-index: -1; left: 50%; top: 48%; width: min(150vw, 640px); aspect-ratio: 1; translate: -50% -50%; pointer-events: none;
  background: repeating-conic-gradient(from 0deg, var(--st-ray) 0deg 8deg, transparent 8deg 22.5deg);
  -webkit-mask: radial-gradient(closest-side, #000 18%, transparent 78%); mask: radial-gradient(closest-side, #000 18%, transparent 78%);
  animation: raysSpin 90s linear infinite;
}
@keyframes raysSpin { to { rotate: 360deg; } }
.screen--coll .coll-hero::after { background: var(--st-shadow); }
.screen--coll .coll-arrow { background: var(--st-glass); color: var(--st-ink); border: 1px solid var(--st-line); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.screen--coll .coll-name { color: var(--st-ink); }
.screen--coll .name-btn { color: var(--st-ink-2); }
.screen--coll .coll-meta { color: var(--st-ink-2); }
.screen--coll .coll-card { background: var(--st-glass); border: 1px solid var(--st-line); box-shadow: 0 14px 34px -12px var(--st-shadow); -webkit-backdrop-filter: blur(16px) saturate(1.3); backdrop-filter: blur(16px) saturate(1.3); }
.screen--coll .coll-card .icon-btn.sq { background: var(--st-glass-2); color: var(--st-ink); border: 1px solid var(--st-line); box-shadow: 0 3px 0 var(--st-shadow); }
.screen--coll .coll-empty p { color: var(--st-ink-2); }
@media (prefers-reduced-motion: reduce) { .screen--coll .coll-stage::before { animation: none; } }

/* гладим в коллекции: мурчит (сплющивается от удовольствия) или сердится (трясётся) */
.coll-hero.is-purr img { animation: heroPurr 1.2s ease-in-out; }
.coll-hero.is-grr img { animation: heroGrr .6s linear; }
@keyframes heroPurr { 0%, 100% { scale: 1 1; } 15% { scale: 1.06 .94; } 30% { scale: .97 1.03; } 45% { scale: 1.05 .95; } 60% { scale: .98 1.02; } 80% { scale: 1.02 .98; } }
@keyframes heroGrr { 0%, 100% { translate: 0 0; rotate: 0deg; } 10%, 50%, 90% { translate: -7px 0; rotate: -3deg; } 30%, 70% { translate: 7px 0; rotate: 3deg; } }
.pet-fx { position: absolute; z-index: 3; pointer-events: none; font-style: normal; font-size: 26px; line-height: 1; color: #ff4fa3; text-shadow: 0 2px 0 rgba(0, 0, 0, .12); translate: -50% -50%; animation: petUp 1.4s ease-out both; }
.pet-fx--grr { font-size: 28px; }
@keyframes petUp { 0% { opacity: 0; transform: translate(0, 0) scale(.4); } 15% { opacity: 1; transform: translate(0, -14px) scale(1.1); } 100% { opacity: 0; transform: translate(var(--dx), -120px) scale(.8); } }

.screen--coll .coll-card { gap: 8px; padding: 14px 12px 6px; }
.screen--coll .coll-card .btn-lime { min-width: 0; }
@media (max-width: 360px) { .screen--coll .coll-card .icon-btn.sq { width: 50px; height: 50px; border-radius: 16px; } }

/* ---------- загрузка: гоблин-праздник ----------
   0–30 с крутит головой, с 30 с — глаза-спирали, с 60 с — его мутит (щёки надуты, бледный, пот),
   в конце — счастливо прыгает */
.loading-mon.is-spin .clay, .loading-mon.is-sick .clay, .loading-mon.is-happy .clay { animation: none; }
.loading-mon .clay-squash { transform-origin: 50% 58%; }
.loading-mon.is-spin .clay-squash { animation: lmSpin 1.6s cubic-bezier(.55, .08, .45, .92) infinite; }
.loading-mon.is-spin.is-dizzy .clay-squash { animation-duration: 1.15s; }
.loading-mon.is-sick .clay-squash { animation: lmSway 2.4s ease-in-out infinite; }
.loading-mon.is-happy .clay-squash { animation: lmHop .62s cubic-bezier(.3, 1.6, .5, 1) 3; }
@keyframes lmSpin { to { rotate: 360deg; } }
@keyframes lmSway { 0%, 100% { rotate: -11deg; translate: -6px 0; } 50% { rotate: 11deg; translate: 6px 0; } }
@keyframes lmHop { 0%, 100% { translate: 0 0; scale: 1 1; } 30% { translate: 0 -26px; scale: .94 1.08; } 60% { translate: 0 0; scale: 1.1 .9; } }
.loading-mon .lz { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.lz > g { opacity: 0; transition: opacity .35s; }
.lz path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.lz-dizzy path { stroke: #2a1a28; stroke-width: 3.4; }
.lz-eye { transform-box: view-box; animation: lzSpin .8s linear infinite; }
.lz-eye--r { animation-direction: reverse; animation-duration: .95s; }
@keyframes lzSpin { to { rotate: 360deg; } }
.lz-lips { stroke: #6b1f45 !important; stroke-width: 5; }
.lz-drop { fill: #c9ecff !important; stroke: #7cc4ea !important; stroke-width: 1.6; transform-box: fill-box; animation: lzDrip 1.6s ease-in infinite; }
.lz-drop--r { animation-delay: .7s; }
@keyframes lzDrip { 0% { opacity: 0; translate: 0 -6px; } 25% { opacity: 1; } 100% { opacity: 0; translate: 0 26px; } }
.lz-cheek { transform-box: fill-box; transform-origin: center; animation: lzPuff .9s ease-in-out infinite; }
@keyframes lzPuff { 0%, 100% { scale: 1; } 50% { scale: 1.12 1.06; } }
.lz-happy path { stroke: #2a1a28; stroke-width: 6; }
.lz-happy .lz-star { fill: #ffd84a; stroke: #e8a300; stroke-width: 1.5; transform-box: fill-box; transform-origin: center; animation: twinkle 1s ease-in-out infinite; }
.lz-happy .lz-star--r { fill: #ff7eb8; stroke: #d93f8a; animation-delay: .4s; }
.loading-mon.is-dizzy .lz-dizzy, .loading-mon.is-sick .lz-dizzy, .loading-mon.is-sick .lz-sick, .loading-mon.is-happy .lz-happy { opacity: 1; }
.loading-mon.is-dizzy [data-part="pupils"], .loading-mon.is-sick [data-part="pupils"], .loading-mon.is-happy [data-part="pupils"], .loading-mon.is-happy [data-part="whites"] { opacity: 0; }
.loading-mon.is-sick [data-part="mouth"] { opacity: 0; }
.loading-mon.is-sick .clay-l { filter: saturate(.5) sepia(.3) hue-rotate(-12deg) brightness(1.04); transition: filter 1s; }
.loading-mon.is-happy::before, .loading-mon.is-happy::after { animation-duration: .5s; }
@media (prefers-reduced-motion: reduce) { .loading-mon.is-spin .clay-squash { animation-duration: 6s; } .lz-eye { animation-duration: 3s; } }

/* ---------- «Оживить»: две наклеенные карточки — рисунок + человек = монстр рядом ---------- */
#scr-revive .screen-body { gap: 0; padding-inline: 0; }
.rv-pair { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: center; gap: 12px; padding: 16px 12px 10px; }
#scr-revive .rv-card {
  --card: #ddd1ff; --card-2: #c7b6ff; --card-ink: #2a1f55; --tilt: -2.2deg;
  flex: 1 1 0; min-height: 150px; max-height: 300px; padding: 16px 18px; overflow: visible;
  border-radius: 30px; outline: 0; border: 0; rotate: var(--tilt);
  color: var(--card-ink);
  background:
    radial-gradient(120% 90% at 18% 0%, rgba(255, 255, 255, .55), transparent 55%),
    linear-gradient(160deg, var(--card), var(--card-2));
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .6), inset 0 -6px 14px rgba(0, 0, 0, .06), 0 6px 0 color-mix(in oklab, var(--card-2) 70%, #000 22%), 0 18px 30px -16px rgba(0, 0, 0, .45);
  transition: rotate .35s var(--ease-bounce), scale .2s var(--ease-bounce);
}
#scr-revive .rv-card--scene { --card: #c9f4dc; --card-2: #9fe6bf; --card-ink: #0f3a24; --tilt: 1.8deg; }
#scr-revive .rv-card:active { scale: .97; rotate: 0deg; }
#scr-revive .rv-card .drop-empty { gap: 4px; max-width: 32ch; }
#scr-revive .rv-card .drop-title { font: 900 clamp(19px, 5.4vw, 22px)/1.1 var(--font-display); letter-spacing: -.01em; color: var(--card-ink); }
#scr-revive .rv-card .drop-hint { color: color-mix(in oklab, var(--card-ink) 70%, transparent); font-size: 14px; line-height: 1.3; }
.rv-art { width: clamp(96px, 30vw, 132px); height: auto; margin-bottom: 2px; overflow: visible; filter: drop-shadow(0 5px 0 rgba(0, 0, 0, .12)); }
.rv-paper { transform-box: fill-box; transform-origin: 50% 100%; rotate: -6deg; animation: rvPaper 3.4s ease-in-out infinite; }
.rv-cam { transform-box: fill-box; transform-origin: center; animation: rvCam 3.4s ease-in-out infinite; }
.rv-kid { transform-box: fill-box; transform-origin: 50% 100%; animation: rvWave 2.6s ease-in-out infinite; }
@keyframes rvPaper { 0%, 100% { rotate: -6deg; } 50% { rotate: -2deg; } }
@keyframes rvCam { 0%, 100% { translate: 0 0; rotate: 8deg; } 50% { translate: -3px -4px; rotate: 2deg; } }
@keyframes rvWave { 0%, 100% { rotate: 0deg; } 40% { rotate: -4deg; } 60% { rotate: 3deg; } }
/* номер-наклейка в углу */
.rv-num {
  position: absolute; z-index: 3; left: -6px; top: -10px; display: grid; place-items: center; width: 44px; height: 44px;
  border-radius: 50%; rotate: -12deg; font: 900 22px/1 var(--font-display); color: #1d1a16;
  background: #ffd84a; box-shadow: inset 0 2px 0 rgba(255, 255, 255, .6), 0 3px 0 #d39418, 0 0 0 3px #fffaf0;
}
.rv-card--scene .rv-num { left: auto; right: -6px; rotate: 10deg; background: #ff9fcf; box-shadow: inset 0 2px 0 rgba(255, 255, 255, .6), 0 3px 0 #d8558f, 0 0 0 3px #fffaf0; }
.rv-card.has-img .rv-num { font-size: 0; background: #3ccf4e url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4L18 8' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 26px no-repeat; box-shadow: 0 3px 0 #23913a, 0 0 0 3px #fffaf0; }
/* с фото — как полароид: белая рамка, фото внутри */
#scr-revive .rv-card.has-img { padding: 9px; background: #fffaf0; box-shadow: 0 6px 0 rgba(0, 0, 0, .14), 0 18px 30px -16px rgba(0, 0, 0, .5); }
#scr-revive .rv-card .drop-img { inset: 9px; width: calc(100% - 18px); height: calc(100% - 18px); border-radius: 22px; }
#scr-revive .rv-card .drop-change { right: 16px; bottom: 16px; rotate: 0deg; padding: 0; }
/* «плюс» между карточками */
.rv-plus {
  position: relative; z-index: 4; align-self: center; display: grid; place-items: center; width: 46px; height: 46px; margin-block: -30px;
  border-radius: 50%; color: #1d1a16; background: #fffaf0; box-shadow: 0 4px 0 rgba(0, 0, 0, .18), 0 0 0 5px var(--ink);
  animation: rvPlus 2.4s ease-in-out infinite;
}
.rv-plus .ico { width: 24px; height: 24px; stroke-width: 3.4; }
@keyframes rvPlus { 0%, 100% { scale: 1; } 50% { scale: 1.12; } }
/* кнопка: когда оба фото есть — переливается */
#btn-do-revive:not(:disabled) { --b-hi: #fff4c2; --b-top: #ffe45c; --b-mid: #c6f53a; --b-low: #7fd34a; background: var(--noise-dark), var(--clay-tex), radial-gradient(130% 120% at 28% 0%, var(--b-hi) 0%, transparent 44%), linear-gradient(100deg, #ffd84a, #c6f53a 40%, #7ce0a0 60%, #ffd84a); background-size: auto, auto, auto, 260% 100%; animation: btnSquish 3.2s ease-in-out infinite, rvShine 3s linear infinite; }
@keyframes rvShine { to { background-position: 0 0, 0 0, 0 0, -260% 0; } }
#btn-do-revive:disabled { filter: none; opacity: .45; }
@media (max-height: 700px) { .rv-art { width: 84px; } #scr-revive .rv-card { min-height: 128px; padding-block: 10px; } #scr-revive .rv-card .drop-hint { font-size: 13px; } }
@media (prefers-reduced-motion: reduce) { .rv-paper, .rv-cam, .rv-kid, .rv-plus { animation: none; } }

/* ---------- живые фоны «Поиграть» (doll/ambient.js) ---------- */
.play-amb { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.amb-fx, .amb-crowd { position: absolute; inset: 0; }
.amb-fx > i { position: absolute; display: block; font-style: normal; }
/* дождь: две сетки косых штрихов, едут вниз */
.amb-rain { inset: -20% -10% 0; background:
  repeating-linear-gradient(104deg, transparent 0 22px, rgba(200, 220, 255, .22) 22px 23px, transparent 23px 61px),
  repeating-linear-gradient(98deg, transparent 0 37px, rgba(220, 235, 255, .16) 37px 38px, transparent 38px 90px);
  background-size: 120px 180px, 170px 260px; animation: ambRain .5s linear infinite; mix-blend-mode: screen; }
@keyframes ambRain { to { background-position: -30px 180px, -40px 260px; } }
/* туман: большие мягкие пятна плывут в стороны */
.amb-mist { left: -40%; top: calc(20% + var(--i) * 18%); width: 180%; height: 38%; background: radial-gradient(closest-side, rgba(210, 225, 235, .20), transparent); filter: blur(8px); animation: ambMist calc(26s * var(--d)) ease-in-out infinite alternate; animation-delay: var(--dl); }
@keyframes ambMist { from { translate: -12% 0; } to { translate: 12% -4%; } }
.amb-forest .amb-mist { background: radial-gradient(closest-side, rgba(200, 215, 225, .28), transparent); }
/* мигающие лампы: весь кадр иногда «проседает» */
.amb-flicker { inset: 0; background: #000; opacity: 0; animation: ambFlicker 7.3s steps(1) infinite; }
@keyframes ambFlicker { 0%, 61%, 63%, 66%, 100% { opacity: 0; } 62% { opacity: .42; } 64%, 65% { opacity: .22; } 88% { opacity: .08; } 89% { opacity: 0; } }
.amb-metro .amb-flicker { animation-duration: 11s; }
/* пылинки в луче света */
.amb-motes { left: var(--x); top: var(--y); width: 3px; height: 3px; border-radius: 50%; background: rgba(255, 255, 255, .55); box-shadow: 0 0 6px rgba(255, 255, 255, .6); animation: ambMote calc(9s * var(--d)) ease-in-out infinite alternate; animation-delay: var(--dl); }
@keyframes ambMote { from { translate: 0 0; opacity: .15; } 50% { opacity: .8; } to { translate: 26px -40px; opacity: .1; } }
/* светлячки */
.amb-flies { left: var(--x); top: calc(40% + var(--y) * .5); width: 5px; height: 5px; border-radius: 50%; background: #f4ff9a; box-shadow: 0 0 10px 3px rgba(230, 255, 120, .65); animation: ambFly calc(7s * var(--d)) ease-in-out infinite alternate, ambGlow 2.2s ease-in-out infinite; animation-delay: var(--dl); }
@keyframes ambFly { from { translate: 0 0; } 33% { translate: 18px -14px; } 66% { translate: -12px -26px; } to { translate: 10px 8px; } }
@keyframes ambGlow { 0%, 100% { opacity: .15; } 50% { opacity: 1; } }
/* лучи луны в лесу — медленно «дышат» */
.amb-rays { inset: -10% 10% 20% -10%; background: repeating-linear-gradient(112deg, transparent 0 60px, rgba(200, 220, 255, .07) 60px 95px, transparent 95px 170px); animation: ambRays 9s ease-in-out infinite alternate; mix-blend-mode: screen; }
@keyframes ambRays { from { opacity: .4; } to { opacity: 1; translate: 4% 0; } }
/* метро: из тоннеля приближается свет поезда, всё дрожит */
.amb-train { left: 56%; top: 34%; width: 60%; height: 34%; translate: -50% -50%; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 236, 170, .95), rgba(255, 210, 120, .35) 45%, transparent); opacity: 0; animation: ambTrain 16s ease-in infinite; mix-blend-mode: screen; }
@keyframes ambTrain { 0%, 62% { opacity: 0; scale: .2; } 82% { opacity: .9; scale: 1.1; } 88% { opacity: 1; scale: 1.6; } 94%, 100% { opacity: 0; scale: 2; } }
.amb-metro .amb-fx { animation: ambShake 16s linear infinite; }
@keyframes ambShake { 0%, 78%, 96%, 100% { translate: 0 0; } 80%, 84%, 88%, 92% { translate: 1px -1px; } 82%, 86%, 90%, 94% { translate: -1px 1px; } }
/* кухня: свет холодильника дрожит */
.amb-fridge { left: -20%; top: 10%; width: 90%; height: 80%; background: radial-gradient(closest-side, rgba(190, 225, 255, .30), transparent); animation: ambFridge 5s ease-in-out infinite; mix-blend-mode: screen; }
@keyframes ambFridge { 0%, 100% { opacity: .7; } 40% { opacity: 1; } 43% { opacity: .5; } 46% { opacity: 1; } }
/* скейт-парк: падают листья, солнце мерцает */
.amb-leaves { left: var(--x); top: -6%; width: 14px; height: 9px; border-radius: 80% 10% 80% 10%; background: linear-gradient(135deg, #f0b43a, #c8661f); animation: ambLeaf calc(9s * var(--d)) linear infinite; animation-delay: var(--dl); }
@keyframes ambLeaf { 0% { translate: 0 0; rotate: 0deg; opacity: 0; } 8% { opacity: .95; } 50% { translate: 40px 55vh; rotate: 220deg; } 100% { translate: -20px 110vh; rotate: 480deg; opacity: .9; } }
.amb-shimmer { inset: 0; background: radial-gradient(60% 40% at 80% 10%, rgba(255, 210, 140, .35), transparent 70%); animation: ambRays 6s ease-in-out infinite alternate; mix-blend-mode: screen; }
/* люди на заднем плане */
.amb-person { position: absolute; aspect-ratio: 1 / 2.6; translate: -50% 0; transform-origin: 50% 100%; filter: brightness(.82) saturate(.9) drop-shadow(0 6px 4px rgba(0, 0, 0, .35)); }
.amb-street .amb-person, .amb-metro .amb-person { filter: brightness(.62) saturate(.8) contrast(1.05) drop-shadow(0 6px 4px rgba(0, 0, 0, .45)); }
.amb-person img { position: absolute; bottom: 0; left: 50%; height: 100%; width: auto; translate: -50% 0; scale: var(--flip, 1) 1; animation: ambBreath 3.2s ease-in-out infinite; transform-origin: 50% 100%; }
@keyframes ambBreath { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(1.012); } }
.amb-person.is-scared img { animation: ambJump .75s cubic-bezier(.2, 1.6, .5, 1); }
@keyframes ambJump { 0% { transform: translateY(0) scale(1); } 30% { transform: translateY(-22%) scale(1.04, .96); } 100% { transform: translateY(0) scale(1); } }
.amb-person.is-walk img, .amb-person.is-run img { animation: ambWalk .42s ease-in-out infinite; }
.amb-person.is-run img { animation-duration: .24s; }
@keyframes ambWalk { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-3%) rotate(1.5deg); } }
@media (prefers-reduced-motion: reduce) { .amb-fx > i, .amb-fx { animation: none !important; } }
img.toy { display: block; object-fit: contain; filter: drop-shadow(0 4px 4px rgba(0, 0, 0, .3)); pointer-events: none; }
.toy-tile.is-missing img.toy { filter: brightness(0) opacity(.18); }
:root[data-theme="light"] .toy-tile.is-missing img.toy { filter: brightness(0) opacity(.12); }
/* пол — это лава */
.amb-lavafx { position: absolute; left: 0; width: 100%; opacity: 0; filter: blur(1.5px) saturate(1.2); transition: opacity .6s ease; mix-blend-mode: normal; }
.play-amb.is-lava-hot .amb-lavafx { box-shadow: 0 -30px 60px rgba(255, 110, 20, .35); }
.amb-embers { left: var(--x); bottom: 12%; width: 4px; height: 4px; border-radius: 50%; background: #ffb040; box-shadow: 0 0 8px 3px rgba(255, 120, 20, .7); animation: ambEmber calc(5s * var(--d)) linear infinite; animation-delay: var(--dl); }
@keyframes ambEmber { 0% { translate: 0 0; opacity: 0; } 10% { opacity: 1; } 100% { translate: calc((var(--d) - 1) * 120px) -70vh; opacity: 0; } }
.play-amb.is-lava-hot .amb-embers { animation-duration: calc(2.2s * var(--d)); width: 5px; height: 5px; }
.amb-haze { inset: 45% 0 0; background: linear-gradient(0deg, rgba(255, 90, 20, .22), transparent); animation: ambRays 3s ease-in-out infinite alternate; mix-blend-mode: screen; }
.play-amb.is-lava-warn .amb-haze { background: linear-gradient(0deg, rgba(255, 120, 20, .55), transparent); animation: ambWarn .35s ease-in-out infinite alternate; }
@keyframes ambWarn { from { opacity: .4; } to { opacity: 1; } }
.play-amb.is-lava-warn { animation: ambQuake .12s linear infinite; }
@keyframes ambQuake { 0%, 100% { translate: 0 0; } 25% { translate: 1px -1px; } 50% { translate: -1px 1px; } 75% { translate: 1px 1px; } }

/* ---------- мини-игра «Беги, монстр!» на экране видео ---------- */
.runner-wrap { position: relative; flex: 1; min-height: 280px; border-radius: 28px; overflow: hidden; display: none; background: #1b1a18; box-shadow: 0 6px 0 var(--line-2); }
#scr-video.is-game .runner-wrap { display: block; }
#scr-video.is-game .frame--video, #scr-video.is-game #btn-video-save, #scr-video.is-game .screen-foot .row2 { display: none !important; }
#scr-video:not(.is-game) #btn-jump { display: none; }
.runner-wrap canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: manipulation; }
.runner-status { position: absolute; left: 12px; right: 12px; bottom: 10px; margin: 0; text-align: center; color: #fff; font: 700 13px/1.3 var(--font-body); text-shadow: 0 1px 3px rgba(0, 0, 0, .7); pointer-events: none; }
.runner-watch { position: absolute; left: 50%; top: 20%; translate: -50% 0; z-index: 2; display: flex; align-items: center; gap: 8px; padding: 12px 18px; border: 0; border-radius: 999px; cursor: pointer; color: #1d1a16; background: #ffd84a; font: 800 16px/1 var(--font-display); white-space: nowrap; box-shadow: 0 4px 0 #d39418, 0 12px 30px rgba(0, 0, 0, .4); animation: rvPlus 1.1s ease-in-out infinite; }
.runner-watch .ico { width: 20px; height: 20px; }
.runner-jump { min-height: 74px; font-size: clamp(18px, 5.4vw, 22px); }

/* ---------- арена ---------- */
.screen--arena { background: #121012; }
.arena-cv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: manipulation; }
.screen--arena .bar { z-index: 3; }
.arena-fields { display: flex; gap: 6px; margin-left: auto; }
.arena-field { width: 44px; height: 44px; padding: 0; border: 2px solid rgba(255, 255, 255, .35); border-radius: 12px; cursor: pointer; background-size: cover; background-position: center 60%; box-shadow: 0 3px 0 rgba(0, 0, 0, .35); }
.arena-field.is-on { border-color: #ffd84a; box-shadow: 0 0 0 2px #ffd84a, 0 3px 0 rgba(0, 0, 0, .35); }
.arena-hint { position: absolute; z-index: 2; left: 16px; right: 16px; top: calc(env(safe-area-inset-top, 0px) + 78px); margin: 0; padding: 10px 14px; border-radius: 16px; text-align: center; color: #fff; font: 700 15px/1.3 var(--font-body); background: rgba(0, 0, 0, .45); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.arena-banner { position: absolute; z-index: 4; left: 50%; top: 30%; translate: -50% 0; width: min(90vw, 360px); padding: 16px 18px; border-radius: 22px; text-align: center; color: #1d1a16; background: #ffd84a; font: 900 clamp(18px, 5.4vw, 22px)/1.2 var(--font-display); box-shadow: 0 6px 0 #d39418, 0 20px 40px rgba(0, 0, 0, .45); }
.arena-banner.is-on { animation: btnPop .55s var(--ease-bounce); }
.arena-tray { position: absolute; z-index: 3; left: 0; right: 0; bottom: 0; display: flex; gap: 10px; overflow-x: auto; padding: 12px 16px calc(env(safe-area-inset-bottom, 0px) + 14px); background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .65) 35%); scrollbar-width: none; }
.arena-tray::-webkit-scrollbar { display: none; }
.arena-mon { flex: none; width: 74px; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 4px; border: 0; border-radius: 18px; cursor: pointer; background: rgba(255, 255, 255, .14); color: #fff; font: 700 11px/1.1 var(--font-body); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.arena-mon img { width: 56px; height: 56px; object-fit: contain; pointer-events: none; }
.arena-mon span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.arena-mon.is-out { opacity: .35; }
.arena-mon:active { scale: .94; }
.arena-empty { margin: 0 auto; padding: 10px; color: rgba(255, 255, 255, .85); font: 700 14px/1.3 var(--font-body); text-align: center; }
.arena-pick { position: absolute; z-index: 5; inset: 0; display: grid; place-items: end center; padding: 16px 16px calc(env(safe-area-inset-bottom, 0px) + 16px); background: rgba(0, 0, 0, .45); }
.arena-pick[hidden] { display: none; }
.arena-pick-card { width: min(100%, 380px); display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 18px 16px 10px; border-radius: 28px; background: var(--felt-2); border: 1.5px solid var(--line); box-shadow: 0 8px 0 var(--line-2); animation: btnPop .45s var(--ease-bounce); }
.arena-pick-img { width: 110px; height: 110px; object-fit: contain; }
.arena-pick-name { margin: 0; font: 900 22px/1.1 var(--font-display); color: var(--fg); }
.arena-pick-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; }
.arena-side { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 8px; border: 0; border-radius: 22px; cursor: pointer; font: 900 18px/1 var(--font-display); color: #fff; }
.arena-side--good { background: linear-gradient(180deg, #5fd38a, #2e9f55); box-shadow: 0 5px 0 #1f7a3e; }
.arena-side--evil { background: linear-gradient(180deg, #ff6b6b, #c62828); box-shadow: 0 5px 0 #8e1b1b; }
.arena-side:active { translate: 0 3px; box-shadow: none; }
.arena-emoji { font-size: 34px; line-height: 1; }
/* «Поиграть»: подпись не должна заезжать под кнопку «?» */
#drop-play .drop-empty { padding-inline: 58px; }
#drop-play .drop-title { font-size: clamp(15px, 4.4vw, 18px); text-wrap: balance; }

/* ---------- стрелки по бокам холста: переключать разделы ---------- */
.step-arrow {
  position: absolute; z-index: 3; top: calc(50% - 32px);
  display: grid; place-items: center; width: 40px; height: 64px; padding: 0; border: 0; cursor: pointer;
  color: var(--paper-ink); background: rgba(255, 255, 255, .72);
  box-shadow: 0 2px 0 rgba(0, 0, 0, .16), inset 0 0 0 1.5px rgba(34, 29, 20, .1);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  transition: scale .15s var(--ease-bounce), background .15s;
}
.step-arrow .ico { width: 24px; height: 24px; stroke-width: 3; }
.step-arrow--prev { left: 0; border-radius: 0 20px 20px 0; }
.step-arrow--next { right: 0; border-radius: 20px 0 0 20px; }
.step-arrow:active { scale: .9; background: rgba(255, 255, 255, .95); }
.step-arrow.is-nope { animation: nope .4s ease; }

/* ---------- суперсилы: реалистичные иконки ---------- */
.power-ico { display: grid; place-items: center; }
.power-img { width: 34px; height: 34px; object-fit: contain; pointer-events: none; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .35)); }
.power.is-locked .power-img { opacity: .4; filter: grayscale(.7); }
.power.is-on .power-img { filter: drop-shadow(0 0 6px rgba(255, 255, 255, .8)); }
@media (max-height: 700px) { .power-img { width: 30px; height: 30px; } }
.tray-item canvas { width: 54px; height: 54px; }

/* подарки на празднике — настоящая коробка из того же набора */
.gift-box--real { left: 4px; right: 4px; bottom: 2px; height: 92px; border-radius: 0; background: none; box-shadow: none; }
.gift-box--real img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 6px 5px rgba(0, 0, 0, .35)); pointer-events: none; }
.gift:nth-child(2) .gift-box--real img { rotate: -4deg; }
.gift:nth-child(3) .gift-box--real img { rotate: 5deg; }

/* арена на главном — отдельная кнопка */
.btn-arena { gap: 10px; }
.btn-arena .btn-ico { width: 28px; height: 28px; }
.btn-arena .btn-ico .ico { width: 24px; height: 24px; }

/* ---------- большой просмотр результата ---------- */
.viewer {
  position: fixed; inset: 0; z-index: 35; display: grid; place-items: center;
  padding: calc(env(safe-area-inset-top, 0px) + 56px) 10px calc(env(safe-area-inset-bottom, 0px) + 16px);
  background: rgba(8, 7, 6, .94); opacity: 0; transition: opacity .2s; cursor: zoom-out;
}
.viewer.is-open { opacity: 1; }
.viewer-media { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; border-radius: 14px; box-shadow: 0 20px 60px rgba(0, 0, 0, .6); scale: .94; transition: scale .3s var(--ease-bounce); }
.viewer.is-open .viewer-media { scale: 1; }
.viewer-close {
  position: absolute; top: calc(env(safe-area-inset-top, 0px) + 10px); right: 12px;
  display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%;
  color: #fff; background: rgba(255, 255, 255, .16); cursor: pointer;
}
.viewer-close .ico { width: 22px; height: 22px; stroke-width: 2.6; }
#result-img, #video { cursor: zoom-in; }
/* подпись полароида не обрезается */
.polaroid { overflow: visible; }
.viewer[hidden] { display: none !important; }
.home-actions .row2--mini .btn-lime { min-height: 48px; }
#scr-video.is-solo #btn-watch, #scr-video.is-solo #runner-status { display: none !important; }
/* на своих игрушках — значок «играть» */
.toy-tile:not(.is-missing)::after { content: ""; position: absolute; left: 8px; top: 8px; width: 20px; height: 20px; border-radius: 50%; background: var(--lime, #c6f53a) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 6l9 6-9 6z' fill='%23111'/%3E%3C/svg%3E") center/12px no-repeat; box-shadow: 0 2px 0 rgba(0, 0, 0, .25); }

/* ---------- «что дальше» в конце игры ---------- */
.end-card { position: fixed; left: 0; right: 0; bottom: calc(env(safe-area-inset-bottom, 0px) + 96px); z-index: 34; display: grid; place-items: center; padding: 0 16px; pointer-events: none; }
.end-box { pointer-events: auto; width: min(360px, 100%); display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: 26px; background: var(--felt-2, #222); border: 1.5px solid var(--line, rgba(255,255,255,.12)); box-shadow: 0 16px 40px rgba(0, 0, 0, .45); animation: cardIn .4s var(--ease-bounce) both; }
.end-title { margin: 0; text-align: center; font: 800 20px/1.2 var(--font-display, inherit); color: var(--fg); }
.end-box .row2 { display: flex; gap: 10px; }
.end-box .row2 > * { flex: 1; }
.arena-draw { margin: 6px auto 0; }

/* раннер: кто бежит */
.runner-pick { display: none; flex: none; gap: 8px; overflow-x: auto; padding: 8px 2px 2px; scrollbar-width: none; }
.runner-pick::-webkit-scrollbar { display: none; }
#scr-video.is-game .runner-pick:not([hidden]) { display: flex; }
.runner-mon { flex: none; width: 50px; height: 50px; padding: 4px; border: 2px solid var(--line); border-radius: 50%; background: var(--felt-2); cursor: pointer; transition: scale .2s var(--ease-bounce); }
.runner-mon img { width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.runner-mon.is-on { border-color: #ffd84a; box-shadow: 0 0 0 3px rgba(255, 216, 74, .35); scale: 1.08; }

/* s179 (Глеб 30.09): на телефоне страница стоит на месте — не едет вверх-вниз и не «пружинит», когда тащишь глаза
   и детали. Запрет прокрутки корня iOS понимает только на html (на body он не доходит), а body зафиксирован
   целиком. Игра — под iPhone 16 (393×852) и iPhone 17 Pro Max (440×956): экраны влезают без прокрутки; листаются
   только ленты вбок и список игрушек (гасит touchmove в конце js/app.js). На компьютере всё как было. */
@media (pointer: coarse) {
  html { overscroll-behavior: none; }
  body { position: fixed; inset: 0; width: 100%; overflow: hidden; touch-action: manipulation; }
  .screen-body { overflow-y: hidden; }
}
.viewer-media { transform-origin: 50% 50%; will-change: transform; }

/* s179 (Глеб 30.09): безопасные зоны айфона. В веб-приложении («На экран Домой», полоса состояния прозрачная) экран
   начинается под часами и «островком», внизу — полоска «домой»; в обычном Safari зоны нулевые. Через переменные —
   чтобы проверять в браузере подстановкой (--sat: 62px; --sab: 34px — iPhone 17 Pro Max) без айфона. */
:root { --sat: env(safe-area-inset-top, 0px); --sab: env(safe-area-inset-bottom, 0px); }
.screen { padding-top: calc(var(--sat) + 10px); padding-bottom: calc(var(--sab) + 16px); }
.screen--play { padding: 0; }
.bar--float { top: calc(var(--sat) + 10px); }
.powers, .bg-col { top: calc(var(--sat) + 70px); }
.tray { bottom: calc(var(--sab) + 10px); }
/* те же отступы у элементов, которые считали их сами (значения на айфоне прежние — --sat/--sab = env) */
.arena-hint { top: calc(var(--sat) + 78px); }
.arena-tray { padding-bottom: calc(var(--sab) + 14px); }
.arena-pick { padding-bottom: calc(var(--sab) + 16px); }
.viewer { padding-top: calc(var(--sat) + 56px); padding-bottom: calc(var(--sab) + 16px); }
.viewer-close { top: calc(var(--sat) + 10px); }
.end-card { bottom: calc(var(--sab) + 96px); }
/* номер версии на главном экране — слева над названием: сверять с номером, который называет сессия после правки */
.app-version { flex: none; align-self: flex-start; padding: 2px 2px 0; font: 600 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .02em; color: var(--fg-2); opacity: .75; white-space: nowrap; }
/* двойное касание не увеличивает экран (бег, кнопки, края); у холстов и лент свои правила — они сильнее */
@media (pointer: coarse) { * { touch-action: manipulation; } }

/* s179 (Глеб 30.09): «Бежать!» с главного экрана убран — «Арена» во всю ширину */
.row2--one { grid-template-columns: 1fr; }
/* выбор бегуна перед гонкой (пока ждём видео) */
.runner-start { position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 18px 14px 44px; background: rgba(18, 16, 14, .84); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.runner-start[hidden] { display: none !important; }
.runner-start-title { margin: 0; text-align: center; color: #fff; font: 800 clamp(20px, 6vw, 26px)/1.15 var(--font-display); }
.runner-start-list { display: flex; flex-wrap: wrap; justify-content: center; align-content: flex-start; gap: 12px; max-height: 72%; overflow-y: auto; padding: 6px; }
.runner-start-mon { flex: none; width: 84px; height: 84px; padding: 8px; border: 3px solid var(--line); border-radius: 50%; background: var(--felt-2); cursor: pointer; transition: scale .2s var(--ease-bounce); }
.runner-start-mon:first-child { border-color: #ffd84a; box-shadow: 0 0 0 4px rgba(255, 216, 74, .35); }
.runner-start-mon:active { scale: .92; }
.runner-start-mon img { width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
/* бегущая строка внизу гонки: сколько ещё ждать видео */
.runner-status.is-ticker { z-index: 4; left: 0; right: 0; bottom: 0; padding: 8px 0; overflow: hidden; white-space: nowrap; text-align: left; background: rgba(0, 0, 0, .5); }
.runner-status.is-ticker > span { display: inline-block; padding-left: 100%; animation: runnerTicker 14s linear infinite; }
@keyframes runnerTicker { to { transform: translateX(-100%); } }

/* s179 (Глеб 30.09): «ребёнку тяжело нажимать — кнопки нужны больше, выбор шапочек, глаз, носа — раза в два».
   Только на телефоне (iPhone 16 / 17 Pro Max); на компьютере размеры прежние. Экраны после этого влезают. */
@media (pointer: coarse) {
  .icon-btn { width: 56px; height: 56px; }
  .icon-btn .ico { width: 26px; height: 26px; }
  .icon-btn.sq { width: 60px; height: 60px; }
  .done-btn { width: 64px; height: 64px; }
  .done-btn .ico { width: 34px; height: 34px; }
  .btn-lime { min-height: 72px; font-size: 1.12em; }
  .btn-lime--small { min-height: 64px; font-size: 17px; }
  .btn-lime--tile { min-height: 108px; }
  .step-chip { max-width: 64px; border-radius: 16px; }
  .step-chip canvas { width: 40px !important; height: 40px !important; }
  .step-chip .ico { width: 28px; height: 28px; }
  .dtool { min-width: 44px; max-width: 64px; border-radius: 18px; }
  .dtool .ico { width: 30px; height: 30px; }
  .dtool.dtool--big { width: 80px; height: 64px; }
  .dtool.dtool--big .ico { width: 36px; height: 36px; }
  .dtool.dtool--small { width: 58px; height: 58px; }
  .swatch { min-width: 38px; max-width: 50px; }
  #panel-body .swatch { width: 44px; }
  .size-btn { width: 56px; height: 56px; border-radius: 16px; }
  .canvas-btn { width: 54px; height: 54px; }
  .stamp { width: 76px; height: 76px; border-radius: 18px; }
  .stamp canvas { width: 62px; height: 62px; }
  .part-opt { width: 112px; height: 112px; border-radius: 26px; }
  .part-opt canvas { width: 96px !important; height: 96px !important; }
  .tray-item { width: 84px; height: 84px; border-radius: 24px; }
  .tray-item canvas { width: 70px; height: 70px; }
  .power { width: 64px; height: 64px; }
  .power-ico .ico { width: 32px; height: 32px; }
  .ava { width: 72px; height: 72px; }
  .coll-arrow { width: 56px; height: 56px; }
  .runner-start-mon { width: 104px; height: 104px; }
}

/* s179 (Глеб 30.09): главный экран — «Нарисуй монстра» самая крупная, «Поиграть», «Арена», «Оживить» как первая */
.home-actions .btn-home-xl { min-height: 0; height: 104px; font-size: clamp(22px, 6.2vw, 27px); border-radius: 30px; }
.home-actions .btn-home-m { min-height: 0; height: 66px; }
.home-actions .btn-home-xl .btn-ico { width: 40px; height: 40px; }
.home-actions .btn-home-xl .btn-ico .ico { width: 34px; height: 34px; }
.home-actions .btn-home-l { min-height: 80px; font-size: clamp(19px, 5.4vw, 23px); }
.home-actions .btn-home-l .btn-ico .ico { width: 30px; height: 30px; }
.home-actions .btn-home-m { min-height: 66px; font-size: clamp(17px, 4.8vw, 20px); }
.screen--home .stage { min-height: 100px; }
@media (max-height: 760px) {
  .home-actions .btn-home-xl { height: 88px; }
  .home-actions .btn-home-l { min-height: 70px; }
  .home-actions .btn-home-m { height: 58px; }
  .screen--home .stage { min-height: 80px; }
}
/* пока грузится видео — внизу только «Не хочу ждать — домой» и «Прыгать» */
.video-wait-row { display: grid; grid-template-columns: 1fr; gap: 10px; }
/* «Не хочу больше ждать» назвала себя голосом — ждёт второго касания */
#btn-wait-home.is-armed { outline: 4px solid #ffd84a; outline-offset: 3px; }
/* после видео — только «Домой» и «Поиграть с монстром» */
#btn-video-save, #btn-video-again, #btn-run { display: none !important; }
/* s179: вкладка «Фото и видео» в коллекции */
.seg .seg-btn { white-space: nowrap; }
/* три вкладки (Монстры / Игрушки / Фото и видео) не влезают между кнопками — своя строка во всю ширину */
.screen--coll .bar { flex-wrap: wrap; row-gap: 8px; }
.screen--coll .bar .seg { order: 3; flex: 1 1 100%; max-width: none; }
.media-tile { position: relative; aspect-ratio: 3 / 4; padding: 0; border: 0; border-radius: 16px; overflow: hidden; cursor: pointer; background: var(--felt-2); box-shadow: 0 3px 0 rgba(0, 0, 0, .25); }
.media-tile img { display: block; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.media-play { position: absolute; left: 50%; top: 50%; translate: -50% -50%; display: grid; place-items: center; width: 46px; height: 46px; padding-left: 3px; border-radius: 50%; font: 700 18px/1 var(--font-body); font-style: normal; color: #fff; background: rgba(0, 0, 0, .55); pointer-events: none; }
#scr-video.has-video:not(.is-game) .video-wait-row { display: none; }
/* s200 (Глеб 03.10: «убери при генерации видео игру бежать — пусть монстрик шатается и просит подождать») */
.wait-mon { width: min(46vw, 190px); max-height: 38%; object-fit: contain; filter: none !important; transform-origin: 50% 92%; animation: waitWobble 1.6s ease-in-out infinite; }
.wait-mon[hidden] { display: none; }
.video-wait.has-mon .orbit { display: none; }
@keyframes waitWobble { 0%, 100% { rotate: -9deg; } 50% { rotate: 9deg; translate: 0 -4px; } }
.video-wait-row .btn-lime { min-height: 84px; }
#btn-wait-home { font-size: clamp(14px, 4vw, 17px); line-height: 1.15; white-space: normal; text-align: left; padding: 0 12px; gap: 8px; }
/* полоска «когда будет готово видео» над гонкой */
.runner-progress { position: absolute; z-index: 4; left: 12px; right: 12px; top: 12px; display: grid; gap: 6px; pointer-events: none; }
.runner-progress[hidden] { display: none !important; }
.rp-bar { height: 16px; border-radius: 999px; overflow: hidden; background: rgba(0, 0, 0, .45); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .35); }
.rp-bar i { display: block; height: 100%; width: 3%; border-radius: 999px; background: linear-gradient(90deg, #ffd84a, #c6f53a); transition: width .5s linear; }
.rp-label { justify-self: center; padding: 4px 12px; border-radius: 999px; color: #fff; background: rgba(0, 0, 0, .5); font: 800 clamp(15px, 4.4vw, 18px)/1.2 var(--font-display); text-align: center; }

/* s179 (Глеб 30.09): рисование — сверху только «назад» и категории; крупные стрелки по бокам холста (справа на
   последнем шаге — зелёная «Готово»); видно, что ленты (глаза, носы, цвета…) листаются: стрелки и затенение краёв */
.screen--draw .bar .steps-row { flex: 1 1 auto; min-width: 0; }
.step-arrow { top: calc(50% - 56px); width: 60px; height: 112px; }
.step-arrow .ico { width: 38px; height: 38px; stroke-width: 3.2; }
.step-arrow.is-last { color: #fff; background: #3ccf4e; box-shadow: 0 4px 0 #1f8f2e; }
.scroll-wrap { position: relative; min-width: 0; }
.scroll-hint { position: absolute; z-index: 2; top: 50%; translate: 0 -50%; display: grid; place-items: center; width: 46px; height: 46px; padding: 0; border: 0; border-radius: 50%; cursor: pointer; color: #1d1a16; background: rgba(255, 255, 255, .94); box-shadow: 0 3px 10px rgba(0, 0, 0, .4); }
.scroll-hint[hidden] { display: none !important; }
.scroll-hint .ico { width: 26px; height: 26px; stroke-width: 3; }
.scroll-hint--left { left: -4px; }
.scroll-hint--right { right: -4px; animation: hintNudge 1.6s ease-in-out infinite; }
@keyframes hintNudge { 50% { translate: 5px -50%; } }
.draw-row.can-right { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 60px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 60px), transparent); }
.draw-row.can-left { -webkit-mask-image: linear-gradient(90deg, transparent, #000 60px); mask-image: linear-gradient(90deg, transparent, #000 60px); }
.draw-row.can-left.can-right { -webkit-mask-image: linear-gradient(90deg, transparent, #000 60px, #000 calc(100% - 60px), transparent); mask-image: linear-gradient(90deg, transparent, #000 60px, #000 calc(100% - 60px), transparent); }
@media (pointer: coarse) {
}

/* s180 (Глеб 30.09): «назад», «выход» и «дальше» — детские: крупные, яркие, «пухлые» (объём и тень снизу, как у
   больших кнопок), с толстыми стрелками. «Назад» — оранжевая, «дальше» — салатовая (зовёт, покачиваясь), «Готово» —
   зелёная, «домой»/«закрыть» — с домиком или крестиком. Селекторы с .screen — сильнее старых правил коллекции. */
.screen .bar .icon-btn[data-back], #draw-back {
  width: 64px; height: 64px; border: 0; border-radius: 22px; rotate: -4deg;
  color: #fff; background: linear-gradient(180deg, #ffa36e, #ff6a2f);
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, .45), inset 0 -4px 0 rgba(0, 0, 0, .1), 0 6px 0 #b8400d, 0 10px 18px -6px rgba(0, 0, 0, .45);
  -webkit-backdrop-filter: none; backdrop-filter: none;
  transition: translate .12s, box-shadow .12s, scale .15s;
}
.screen .bar .icon-btn[data-back] .ico, #draw-back .ico { width: 38px; height: 38px; stroke-width: 4.4; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 2px 0 rgba(0, 0, 0, .2)); }
.screen .bar .icon-btn[data-back]:active, #draw-back:active { scale: 1; translate: 0 5px; box-shadow: inset 0 3px 0 rgba(255, 255, 255, .45), 0 1px 0 #b8400d; }
#draw-home { width: 64px; height: 64px; border: 0; border-radius: 22px; rotate: 3deg; color: #fff; background: linear-gradient(180deg, #7cc8ff, #3a9cf0); box-shadow: inset 0 3px 0 rgba(255, 255, 255, .45), 0 6px 0 #1f6fb8; }
#draw-home .ico { width: 36px; height: 36px; stroke-width: 3.6; }
/* стрелки у холста: «назад» — оранжевая, «дальше» — салатовая и покачивается, на последнем шаге — зелёная «Готово» */
.step-arrow { border: 0; -webkit-backdrop-filter: none; backdrop-filter: none; top: calc(50% - 62px); width: 70px; height: 124px; }
.step-arrow .ico { width: 46px; height: 46px; stroke-width: 4.4; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 2px 0 rgba(0, 0, 0, .18)); }
.step-arrow--prev { border-radius: 0 30px 30px 0; color: #fff; background: linear-gradient(180deg, #ffa36e, #ff6a2f); box-shadow: inset 0 3px 0 rgba(255, 255, 255, .45), 0 6px 0 #b8400d, 0 10px 18px -6px rgba(0, 0, 0, .4); }
.step-arrow--next { border-radius: 30px 0 0 30px; color: #1d2b00; background: linear-gradient(180deg, #dcfd62, #a6df1c); box-shadow: inset 0 3px 0 rgba(255, 255, 255, .55), 0 6px 0 #6f9a0e, 0 10px 18px -6px rgba(0, 0, 0, .4); animation: stepNudge 1.8s ease-in-out infinite; }
.step-arrow.is-last { color: #fff; background: linear-gradient(180deg, #62e06c, #2fb83e); box-shadow: inset 0 3px 0 rgba(255, 255, 255, .45), 0 6px 0 #1f8f2e, 0 10px 18px -6px rgba(0, 0, 0, .4); }
.step-arrow:active { scale: .92; }
.step-arrow--prev:active { background: linear-gradient(180deg, #ffa36e, #ff6a2f); }
.step-arrow--next:active { background: linear-gradient(180deg, #dcfd62, #a6df1c); }
.step-arrow.is-last:active { background: linear-gradient(180deg, #62e06c, #2fb83e); }
@keyframes stepNudge { 0%, 70%, 100% { translate: 0 0; } 80% { translate: -7px 0; } 90% { translate: 0 0; } }
/* «Домой» в конце игры и после видео — с домиком */
#end-home::before, #btn-video-home::before {
  content: ""; flex: none; width: 30px; height: 30px; margin-right: 8px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 11.5L12 4l8.5 7.5'/%3E%3Cpath d='M6 10v10h12V10'/%3E%3Cpath d='M10 20v-5h4v5'/%3E%3C/svg%3E") center / contain no-repeat;
}
/* крестик у большого фото/видео — крупный, красный */
.viewer-close { width: 60px; height: 60px; border-radius: 20px; color: #fff; background: linear-gradient(180deg, #ff8a7a, #ff4d3d); box-shadow: inset 0 3px 0 rgba(255, 255, 255, .45), 0 5px 0 #b3261e; }
.viewer-close .ico { width: 32px; height: 32px; stroke-width: 4; }
.viewer-close:active { translate: 0 4px; box-shadow: 0 1px 0 #b3261e; }

/* s180 (Глеб 30.09): главный экран — 4 клетки-картинки 2×2 (пластилиновые сценки лепит js/menutiles.js), маленькая подпись снизу */
.home-actions.home-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 4px 2px 8px; }
.home-tile { position: relative; aspect-ratio: 1; min-width: 0; padding: 0; border: 0; border-radius: 28px; overflow: hidden; cursor: pointer;
  background: radial-gradient(120% 95% at 30% 18%, var(--t1), var(--t2));
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, .5), inset 0 -5px 0 rgba(0, 0, 0, .08), 0 7px 0 var(--t3), 0 14px 22px -10px rgba(0, 0, 0, .45);
  rotate: var(--tilt, 0deg); transition: translate .12s, box-shadow .12s; }
.home-tile:active { translate: 0 6px; box-shadow: inset 0 3px 0 rgba(255, 255, 255, .5), 0 1px 0 var(--t3); }
.home-tile--draw { --t1: #ffd6ec; --t2: #ff8fc8; --t3: #c9549a; --tilt: -1.5deg; }
.home-tile--play { --t1: #ddd2ff; --t2: #9b82ff; --t3: #5f45c9; --tilt: 1.5deg; }
.home-tile--arena { --t1: #ffe9a3; --t2: #ffc43d; --t3: #d39418; --tilt: 1deg; }
.home-tile--revive { --t1: #f1ffb8; --t2: #c6f53a; --t3: #7fa81a; --tilt: -1deg; }
.home-tile--color { --t1: #d4f1ff; --t2: #5cc2ff; --t3: #2d86c4; --tilt: 1.5deg; }
.home-tile--music { --t1: #ffe0cc; --t2: #ff8a5c; --t3: #c4552d; --tilt: -1.5deg; }
.home-tile-art { position: absolute; inset: 0; pointer-events: none; }
.home-tile-art .tile-layer { position: absolute; aspect-ratio: 1; }
.home-tile-art .tile-layer.is-still .clay-bob, .home-tile-art .tile-layer.is-still .clay-shadow { animation: none; }
.home-tile-art .tile-layer.is-pop .clay-bob { animation: tilePop 2.4s ease-in-out infinite; }
@keyframes tilePop { 0%, 100% { translate: 0 7%; } 50% { translate: 0 -3%; } }
.tile-spark { position: absolute; animation: tileTwinkle 2.2s ease-in-out var(--dl, 0s) infinite; }
@keyframes tileTwinkle { 50% { scale: .7; opacity: .6; rotate: 20deg; } }
.home-tile-label { position: absolute; left: 50%; bottom: 9px; translate: -50% 0; padding: 3px 11px; border-radius: 999px; background: rgba(255, 255, 255, .85); color: #2a1c24; font: 800 13px/1.25 var(--font-display, system-ui); white-space: nowrap; box-shadow: 0 2px 0 rgba(0, 0, 0, .12); pointer-events: none; }
@media (max-height: 760px) { .home-tile { aspect-ratio: 1.18; } }
/* s180: гоблинов на заставке нет — клетки занимают всё свободное место (не выше 1,3 ширины), картинка — квадрат по центру */
#home-stage[hidden] { display: none !important; }
.screen--home .home-actions.home-tiles { flex: 1 1 auto; min-height: 0; grid-template-rows: 1fr 1fr 1fr; max-height: calc(1.95 * (100vw - 44px) + 30px); margin-block: auto; } /* 6 клеток — 3 ряда */
.screen--home .home-tiles .home-tile { aspect-ratio: auto; height: 100%; min-height: 0; container-type: size; }
.screen--home .home-tiles .home-tile-art { inset: auto; left: 50%; top: 44%; translate: -50% -50%; width: min(108cqw, 100cqh - 30px); aspect-ratio: 1; }
.screen--home .home-tiles .home-tile-label { bottom: 10px; padding: 4px 13px; font-size: clamp(14px, 4.1vw, 17px); }

/* s180: раскраска (#scr-color, js/coloring.js) — сверху «назад», «отменить», «стереть», «Готово»; картинка — самый
   большой квадрат, что влезает; снизу 15 крупных цветов (3×5). Выбор картинок — сетка 3×4 (на высоком экране 2×5) без прокрутки. */
#scr-color { padding-inline: 8px; gap: 8px; }
#scr-color .bar { gap: 10px; min-height: 64px; padding-inline: 4px; }
#scr-color .col-title { font-size: clamp(21px, 6vw, 26px); }
.col-gap { width: 64px; flex: none; }
#scr-color:not(.is-page) .col-tool, #scr-color:not(.is-page) .col-done, #scr-color:not(.is-page) .col-sp { display: none; }
#scr-color.is-page .col-title, #scr-color.is-page .col-gap { display: none; }
.col-tool { width: 60px; height: 60px; flex: none; display: grid; place-items: center; padding: 0; border: 0; border-radius: 20px; cursor: pointer; color: #fff; transition: translate .12s, box-shadow .12s, opacity .2s; }
.col-tool .ico { width: 32px; height: 32px; stroke-width: 3.2; filter: drop-shadow(0 2px 0 rgba(0, 0, 0, .18)); }
.col-tool--undo { rotate: 3deg; background: linear-gradient(180deg, #7cc8ff, #3a9cf0); box-shadow: inset 0 3px 0 rgba(255, 255, 255, .45), 0 6px 0 #1f6fb8, 0 10px 16px -6px rgba(0, 0, 0, .4); }
.col-tool--clear { rotate: -3deg; background: linear-gradient(180deg, #ffa0cf, #f0609f); box-shadow: inset 0 3px 0 rgba(255, 255, 255, .45), 0 6px 0 #b23a72, 0 10px 16px -6px rgba(0, 0, 0, .4); }
.col-tool:active, .col-done:active { translate: 0 5px; box-shadow: inset 0 3px 0 rgba(255, 255, 255, .45), 0 1px 0 rgba(0, 0, 0, .35); }
.col-tool.is-off { opacity: .45; }
.col-tool.is-armed { background: linear-gradient(180deg, #ff8174, #e53935); box-shadow: 0 0 0 4px #ffd84a, 0 6px 0 #9e1f1a; animation: nope .4s ease, colPulse 1s ease-in-out .4s infinite; }
@keyframes colPulse { 50% { scale: 1.1; } }
.col-done { height: 64px; flex: none; display: flex; align-items: center; gap: 6px; padding: 0 16px 0 12px; border: 0; border-radius: 22px; rotate: 2deg; cursor: pointer; color: #fff; font: 800 clamp(16px, 4.6vw, 19px)/1 var(--font-display); text-shadow: 0 2px 0 rgba(0, 0, 0, .18); background: linear-gradient(180deg, #62e06c, #2fb83e); box-shadow: inset 0 3px 0 rgba(255, 255, 255, .45), 0 6px 0 #1f8f2e, 0 10px 18px -6px rgba(0, 0, 0, .4); transition: translate .12s, box-shadow .12s; }
.col-done .ico { width: 34px; height: 34px; stroke-width: 4.2; filter: drop-shadow(0 2px 0 rgba(0, 0, 0, .18)); }
.col-tool.is-nope, .col-done.is-nope { animation: nope .4s ease; }
/* выбор картинки: квадраты сетки 3×4 — по ширине или по высоте, что меньше */
.col-pick-wrap { flex: 1 1 auto; min-height: 0; container-type: size; }
.col-picker { height: 100%; display: grid; --s: min(calc((100cqw - 28px) / 3), calc((100cqh - 36px) / 4)); grid-template-columns: repeat(3, var(--s)); grid-auto-rows: var(--s); gap: 12px; justify-content: center; align-content: center; }
.col-card { position: relative; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: pointer; animation: colIn .45s var(--ease-bounce) both; animation-delay: calc(var(--i) * 35ms); }
.col-card:nth-child(10) { grid-column: 2; }
/* высокий экран (айфон с экраном «Домой»): 2×5 — картинки крупнее */
@container (max-aspect-ratio: 3 / 5) {
  .col-picker { --s: min(calc((100cqw - 14px) / 2), calc((100cqh - 48px) / 5)); grid-template-columns: repeat(2, var(--s)); }
  .col-card:nth-child(10) { grid-column: auto; }
}
.col-card .col-svg { display: block; width: 100%; height: 100%; border-radius: 18px; background: #fff; rotate: var(--tilt, 0deg); box-shadow: 0 5px 0 rgba(0, 0, 0, .35), 0 12px 18px -8px rgba(0, 0, 0, .55); transition: translate .12s, box-shadow .12s; }
.col-card:nth-child(3n+1) { --tilt: -2deg; } .col-card:nth-child(3n+2) { --tilt: 1.5deg; } .col-card:nth-child(3n) { --tilt: -1deg; }
.col-card:active .col-svg { translate: 0 4px; box-shadow: 0 1px 0 rgba(0, 0, 0, .35); }
.col-card .col-star { position: absolute; right: -9px; top: -10px; width: 42%; height: 42%; max-width: 48px; max-height: 48px; rotate: 12deg; pointer-events: none; filter: drop-shadow(0 3px 0 rgba(0, 0, 0, .25)); }
@keyframes colIn { from { opacity: 0; scale: .7; } }
/* раскрашивание */
.col-work { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 10px; }
.col-stage { flex: 1 1 auto; min-height: 0; container-type: size; display: grid; place-items: center; }
.col-paper { position: relative; width: min(100cqw, 100cqh); height: min(100cqw, 100cqh); }
.col-paper .col-svg { display: block; width: 100%; height: 100%; border-radius: 24px; background: #fff; touch-action: none; box-shadow: 0 6px 0 rgba(0, 0, 0, .35), 0 16px 26px -12px rgba(0, 0, 0, .7); }
.col-paper .cr { cursor: pointer; }
.col-paper .col-deco { pointer-events: none; }
.col-paper .col-star { position: absolute; right: -8px; top: -12px; width: 64px; height: 64px; opacity: 0; scale: .3; rotate: -40deg; pointer-events: none; filter: drop-shadow(0 4px 0 rgba(0, 0, 0, .25)); transition: opacity .25s, scale .55s var(--ease-bounce), rotate .55s var(--ease-bounce); }
.col-paper.has-star .col-star { opacity: 1; scale: 1; rotate: 12deg; }
.col-paper.is-done .col-svg { animation: colBounce .7s var(--ease-bounce); }
.col-paper.is-wipe .col-svg { animation: colWipe .4s ease; }
@keyframes colBounce { 0% { scale: 1; } 30% { scale: 1.05 .95; } 60% { scale: .97 1.03; } 100% { scale: 1; } }
@keyframes colWipe { 45% { scale: .94; rotate: -2deg; filter: brightness(1.3); } }
.col-bottom { position: relative; flex: none; }
.col-pal { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; justify-items: center; padding: 2px 4px 6px; }
.col-sw { width: min(64px, 100%); aspect-ratio: 1; padding: 0; border: 0; border-radius: 50%; cursor: pointer; background: radial-gradient(circle at 33% 28%, rgba(255, 255, 255, .6) 0 12%, transparent 13%), var(--c); box-shadow: inset 0 -6px 0 rgba(0, 0, 0, .16), 0 4px 0 rgba(0, 0, 0, .35); transition: scale .22s var(--ease-bounce), box-shadow .15s; }
.col-sw[data-c="#ffffff"] { box-shadow: inset 0 0 0 2px #d8cfc0, inset 0 -6px 0 rgba(0, 0, 0, .1), 0 4px 0 rgba(0, 0, 0, .35); }
.col-sw.is-on { scale: 1.13; box-shadow: inset 0 -6px 0 rgba(0, 0, 0, .16), 0 0 0 4px #fff, 0 0 0 7px #2a211c, 0 6px 10px rgba(0, 0, 0, .45); }
.col-sw.is-on[data-c="#ffffff"] { box-shadow: inset 0 0 0 2px #d8cfc0, 0 0 0 4px #ffd84a, 0 0 0 7px #2a211c, 0 6px 10px rgba(0, 0, 0, .45); }
.col-sw:active { scale: .9; }
.col-donecard { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; justify-content: center; gap: 10px; padding: 0 6px; }
.col-donecard[hidden] { display: none !important; }
.col-donecard:not([hidden]) { animation: colIn .4s var(--ease-bounce); }
.col-pal.is-under { visibility: hidden; }
.col-donecard .btn-lime { margin-bottom: 7px; }

/* s180: музыка — экран #scr-music (js/music.js): радужные клавиши-ступеньки, монстр прыгает по светящимся */
.screen--music { padding-inline: 12px; }
.screen--music .bar { flex: none; position: relative; z-index: 9; }
.screen--music .bar-title { font-size: clamp(16px, 4.6vw, 20px); line-height: 1.15; }
.music-songs-btn { flex: none; display: grid; place-items: center; width: 56px; height: 56px; padding: 0; border: 0; border-radius: 20px; rotate: 4deg; cursor: pointer; color: #fff;
  background: linear-gradient(180deg, #b6a8ff, #7b64f5);
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, .45), inset 0 -4px 0 rgba(0, 0, 0, .1), 0 6px 0 #4c37b8, 0 10px 18px -6px rgba(0, 0, 0, .45);
  transition: translate .12s, box-shadow .12s; }
.music-songs-btn .ico { width: 34px; height: 34px; stroke-width: 2.8; filter: drop-shadow(0 2px 0 rgba(0, 0, 0, .2)); }
.music-songs-btn:active { translate: 0 5px; box-shadow: inset 0 3px 0 rgba(255, 255, 255, .45), 0 1px 0 #4c37b8; }
@media (pointer: coarse) { .music-songs-btn { width: 64px; height: 64px; border-radius: 22px; } }
.music-body { position: relative; flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; padding-top: 10px; }
.music-dots { flex: none; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 5px; min-height: 18px; padding: 0 4px; }
.music-dot { width: var(--dot, 11px); height: var(--dot, 11px); border-radius: 50%; background: var(--kc); opacity: .28; transition: opacity .2s, scale .25s var(--ease-bounce); }
.music-dot.is-done { opacity: 1; }
.music-dot.is-now { opacity: 1; scale: 1.55; box-shadow: 0 0 0 2px var(--fg); }
.music-stage { position: relative; flex: 1 1 auto; min-height: 0; margin-top: 6px; }
/* большая бледная картинка песенки на пустом месте над клавишами */
.music-art { position: absolute; z-index: 0; left: 50%; top: 4%; width: var(--art, 200px); aspect-ratio: 1; translate: -50% 0; opacity: .16; pointer-events: none; animation: maFloat 5s ease-in-out infinite; }
.music-art svg { display: block; width: 100%; height: 100%; }
@keyframes maFloat { 0%, 100% { rotate: -4deg; scale: 1; } 50% { rotate: 4deg; scale: 1.05; } }
/* клавиши: ступеньки (выше нота — выше клавиша), пухлые, с «гвоздиками» как у ксилофона */
.music-keys { position: absolute; left: 0; right: 0; bottom: 8px; height: 46%; display: flex; align-items: flex-end; gap: 6px; touch-action: none; }
.music-key { position: relative; flex: 1 1 0; min-width: 0; height: var(--kh, 80%); padding: 0; border: 0; border-radius: 20px 20px 16px 16px; cursor: pointer; transform-origin: 50% 100%;
  background: linear-gradient(180deg, var(--kl) 0%, var(--kc) 30%, var(--kc) 100%);
  box-shadow: inset 0 4px 0 rgba(255, 255, 255, .5), inset 0 -8px 0 rgba(0, 0, 0, .1), 0 7px 0 var(--kd), 0 14px 18px -8px rgba(0, 0, 0, .45);
  transition: translate .07s, box-shadow .07s, filter .25s; }
.music-key::before, .music-key::after { content: ""; position: absolute; left: 50%; width: 12px; height: 12px; translate: -50% 0; border-radius: 50%; background: rgba(255, 255, 255, .62); box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .15); pointer-events: none; }
.music-key::before { top: 14px; }
.music-key::after { bottom: 16px; }
.music-key.is-down { translate: 0 6px; box-shadow: inset 0 4px 0 rgba(255, 255, 255, .5), inset 0 -8px 0 rgba(0, 0, 0, .1), 0 1px 0 var(--kd); }
.music-key-glow { position: absolute; inset: 0; border-radius: inherit; background: #fff; opacity: 0; pointer-events: none; }
.music-key-glow.is-on { animation: mkFlash .45s ease-out; }
@keyframes mkFlash { 0% { opacity: .75; } 100% { opacity: 0; } }
/* по мелодии: остальные притихли, нужная светится, дышит и зовёт белым кружком */
.music-keys.is-song .music-key { filter: saturate(.7) brightness(.8); }
.music-keys.is-song .music-key.is-lit { filter: none; }
:root[data-theme="light"] .music-keys.is-song .music-key:not(.is-lit) { filter: saturate(.85); opacity: .55; }
.music-key.is-lit { z-index: 1; animation: mkLit 1s ease-in-out infinite;
  box-shadow: 0 0 0 4px #fff, 0 0 28px 10px var(--kc), inset 0 4px 0 rgba(255, 255, 255, .5), 0 7px 0 var(--kd); }
.music-key.is-lit.is-down { box-shadow: 0 0 0 4px #fff, 0 0 28px 10px var(--kc), 0 1px 0 var(--kd); }
@keyframes mkLit { 0%, 100% { scale: 1 1; } 50% { scale: 1.07 1.03; } }
.music-key.is-lit::before { top: 40%; width: 28px; height: 28px; background: #fff; box-shadow: none; animation: mkDot 1s ease-out infinite; }
@keyframes mkDot { 0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, .9); } 100% { box-shadow: 0 0 0 18px rgba(255, 255, 255, 0); } }
.music-key.is-lit.is-hint { animation: mkHint .6s ease-in-out infinite; }
@keyframes mkHint { 0%, 100% { scale: 1.03; rotate: 0deg; } 25% { scale: 1.13 1.06; rotate: -5deg; } 75% { scale: 1.13 1.06; rotate: 5deg; } }
/* монстр: положение и прыжок — из js (transform), дыхание — css */
.music-mon { position: absolute; left: 0; top: 0; z-index: 3; width: 120px; height: 120px; pointer-events: none; will-change: transform; }
.music-mon-sq { position: absolute; inset: 0; transform-origin: 50% 100%; will-change: transform; }
.music-mon-bob { position: absolute; inset: 0; transform-origin: 50% 100%; animation: mmBob 1.7s ease-in-out infinite; }
@keyframes mmBob { 0%, 100% { scale: 1.02 .98; } 50% { scale: .99 1.025; } }
.music-mon-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: 50% 100%; filter: drop-shadow(0 6px 6px rgba(0, 0, 0, .35)); pointer-events: none; }
.music-mon-clay { position: absolute; left: 0; right: 0; top: 9%; bottom: -9%; }
/* нотки из-под лап */
.music-fx { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.music-note { position: absolute; font: 900 32px/1 var(--font-display); text-shadow: 0 0 8px rgba(255, 255, 255, .55), 0 2px 0 rgba(0, 0, 0, .3); opacity: 0; translate: -50% -50%; animation: mnFly 1s ease-out forwards; }
@keyframes mnFly { 0% { opacity: 0; transform: translate(0, 0) scale(.5); } 15% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--dx), -110px) scale(1.25) rotate(var(--r)); } }
.music-say { position: absolute; z-index: 5; left: 50%; top: 6px; translate: -50% 0; width: max-content; max-width: 94%; margin: 0; padding: 10px 18px 11px; border-radius: 22px; background: var(--bubble-bg); color: var(--bubble-fg); font: 800 clamp(16px, 4.6vw, 20px)/1.2 var(--font-display); text-align: center; box-shadow: 0 4px 0 rgba(0, 0, 0, .18); rotate: -2deg; pointer-events: none; }
.music-say.is-in { animation: msIn .45s var(--ease-bounce); }
@keyframes msIn { from { scale: .6; opacity: 0; } }
/* конец мелодии: «Ура!» и две кнопки — сверху, монстр и клавиши видны */
.music-end { position: absolute; z-index: 6; left: 0; right: 0; top: 34px; display: grid; gap: 12px; padding: 16px 14px 4px; border-radius: 28px; background: var(--felt-2); border: 1.5px solid var(--line); box-shadow: 0 4px 0 var(--line-2), 0 18px 30px -16px rgba(0, 0, 0, .6); animation: msIn .5s var(--ease-bounce); }
.music-end-title { margin: 0; text-align: center; font: 900 clamp(22px, 6.4vw, 28px)/1.1 var(--font-display); }
.music-end .btn-lime { padding: 0 10px; gap: 8px; font-size: clamp(15px, 4.4vw, 18px); }
.music-end .btn-lime .btn-ico { width: 26px; height: 26px; }
/* выбор песенки — поверх сцены: 6 картинок, «Играть самому», кто прыгает */
.music-pick { position: absolute; z-index: 8; inset: 0 -12px calc(-16px - var(--sab)); padding-inline: 12px; display: flex; flex-direction: column; justify-content: center; gap: 12px; padding-top: 2px; padding-bottom: calc(3% + 16px + var(--sab)); background: var(--ink); animation: mpIn .28s ease; }
@keyframes mpIn { from { opacity: 0; translate: 0 12px; } }
.music-pick-title { margin: 0; text-align: center; font: 900 clamp(22px, 6.4vw, 28px)/1.1 var(--font-display); }
.music-songs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.music-song { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; aspect-ratio: 1 / 1.08; min-width: 0; padding: 6px 4px 10px; border: 0; border-radius: 26px; cursor: pointer; color: #2a1c24;
  background: radial-gradient(120% 95% at 30% 18%, var(--t1), var(--t2));
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, .5), inset 0 -5px 0 rgba(0, 0, 0, .08), 0 6px 0 var(--t3), 0 12px 18px -10px rgba(0, 0, 0, .45);
  rotate: var(--tilt, 0deg); transition: translate .12s, box-shadow .12s; }
.music-song:active { translate: 0 5px; box-shadow: inset 0 3px 0 rgba(255, 255, 255, .5), 0 1px 0 var(--t3); }
.music-song svg { flex: none; width: 66%; height: auto; filter: drop-shadow(0 3px 0 rgba(0, 0, 0, .12)); pointer-events: none; }
.music-song span { max-width: 100%; font: 800 clamp(12px, 3.5vw, 15px)/1.1 var(--font-display); text-align: center; pointer-events: none; }
.music-song.is-on { outline: 4px solid #fff; outline-offset: 2px; }
.music-pick .music-free { margin-top: 2px; }
.music-who { display: grid; gap: 6px; }
.music-who-title { margin: 0; text-align: center; font: 800 17px/1.2 var(--font-display); color: var(--fg-2); }
.music-mons { display: flex; gap: 10px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; padding: 6px 6px 10px; }
.music-mons::-webkit-scrollbar { display: none; }
.music-mon-opt { flex: none; width: 72px; height: 72px; padding: 6px; border: 3px solid var(--line); border-radius: 50%; background: var(--felt-2); cursor: pointer; transition: scale .2s var(--ease-bounce); }
.music-mon-opt:first-child { margin-left: auto; }
.music-mon-opt:last-child { margin-right: auto; }
.music-mon-opt img { width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.music-mon-opt.is-on { border-color: #ffd84a; box-shadow: 0 0 0 4px rgba(255, 216, 74, .35); scale: 1.06; }
.music-mon-opt:active { scale: .92; }
@media (max-height: 740px) {
  .music-songs { gap: 10px; }
  .music-song { aspect-ratio: 1 / 1; }
  .music-pick { gap: 10px; }
}

/* s180: арена по кнопке, фоны */
/* Арена (Глеб 30.09): бой начинается только по большой кнопке «В бой!» под полем; после боя та же кнопка — «Ещё бой!» */
.arena-go {
  --b-hi: #f1ffbf; --b-top: #dcfd62; --b-mid: #c6f53a; --b-low: #9fdc12; --b-deep: #557f00; --b-ink: #172300; --b-glow: rgba(170, 240, 0, .6); --b-shade: rgba(60, 100, 0, .35);
  position: absolute; z-index: 4; left: 0; right: 0; bottom: calc(var(--sab) + 124px); margin: 0 auto;
  width: fit-content; min-width: 240px; min-height: 84px; padding: 0 34px 0 26px; gap: 14px;
  font-size: clamp(26px, 7.6vw, 32px); border-radius: 34px 30px 36px 28px;
  animation: arenaGoNudge 1.6s ease-in-out infinite;
}
.arena-go[hidden] { display: none !important; }
.arena-go .btn-ico { width: 44px; height: 44px; }
.arena-go .btn-ico .ico { width: 40px; height: 40px; stroke-width: 2.6; }
.arena-go::after { content: ""; position: absolute; inset: -7px; border-radius: inherit; border: 4px solid rgba(255, 255, 255, .85); pointer-events: none; animation: arenaGoRing 1.6s ease-out infinite; }
.arena-go.is-pop { animation: btnPop .55s var(--ease-bounce), arenaGoNudge 1.6s ease-in-out .55s infinite; }
.arena-go.is-again { --b-hi: #fff4c8; --b-top: #ffd978; --b-mid: #ffc43d; --b-low: #f0a312; --b-deep: #a86b00; --b-ink: #3a2400; --b-glow: rgba(255, 196, 61, .6); }
.arena-go.is-few { filter: saturate(.5) brightness(.9); animation: none; }
.arena-go.is-few::after { display: none; }
.arena-go.is-shake { animation: arenaGoShake .5s ease; }
.arena-go-need { position: absolute; top: -12px; right: -10px; min-width: 40px; height: 40px; padding: 0 8px; display: grid; place-items: center; border-radius: 999px; background: #ff4d3d; color: #fff; font: 900 20px/1 var(--font-display); box-shadow: 0 3px 0 #b3261e; }
.arena-go-need[hidden] { display: none; }
@keyframes arenaGoNudge { 0%, 100% { scale: 1; } 50% { scale: 1.06; } }
@keyframes arenaGoRing { 0% { opacity: .9; scale: 1; } 100% { opacity: 0; scale: 1.14 1.3; } }
@keyframes arenaGoShake { 0%, 100% { translate: 0 0; } 20% { translate: -9px 0; } 40% { translate: 8px 0; } 60% { translate: -6px 0; } 80% { translate: 4px 0; } }

/* «Поиграть»: пять весёлых фонов — крупные квадратные значки со сценкой */
.bg-col.is-fun { gap: 11px; }
.bg-col .bg-pick.bg-fun { width: 60px; height: 60px; padding: 0; border-radius: 18px; background: #fff; box-shadow: 0 0 0 3px #fff, 0 6px 0 3px rgba(0, 0, 0, .28); }
.bg-col .bg-pick.bg-fun canvas { display: block; width: 100%; height: 100%; border-radius: 16px; pointer-events: none; }
.bg-col .bg-pick.bg-fun.is-on { scale: 1.12; box-shadow: 0 0 0 4px var(--lime, #c6f53a), 0 0 20px 2px rgba(198, 245, 58, .65), 0 6px 0 4px rgba(0, 0, 0, .25); }
.bg-fun-pen { position: absolute; right: -9px; bottom: -9px; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: #ff6fb5; color: #fff; box-shadow: 0 2px 0 #b8356f; pointer-events: none; }
.bg-fun-pen .ico { width: 17px; height: 17px; stroke-width: 2.6; }
@media (max-height: 740px) { .bg-col .bg-pick.bg-fun { width: 54px; height: 54px; } .bg-col.is-fun { gap: 9px; } }
/* счёт занятия (жуки, сладости, напуганные) — сверху по центру */
.fun-score { position: absolute; z-index: 5; left: 0; right: 0; top: calc(var(--sat) + 82px); margin: 0 auto; width: fit-content; display: flex; align-items: center; gap: 6px; padding: 4px 18px 4px 6px; border-radius: 999px; background: rgba(255, 255, 255, .93); color: #3a1d5c; font: 900 28px/1 var(--font-display); box-shadow: 0 4px 0 rgba(0, 0, 0, .18), 0 8px 20px -6px rgba(0, 0, 0, .35); pointer-events: none; }
.fun-score[hidden] { display: none; }
.fun-score-ico { width: 42px; height: 42px; }
.fun-score b { min-width: 1ch; font-variant-numeric: tabular-nums; }
.fun-score.is-bump { animation: btnPop .5s var(--ease-bounce); }
/* крик напуганного прохожего — над его головой, поверх кнопок */
.fun-yell { position: absolute; z-index: 6; translate: -50% -100%; padding: 7px 12px; border-radius: 16px; background: #fff; color: #e0261c; font: 900 19px/1 var(--font-display); white-space: nowrap; box-shadow: 0 3px 0 rgba(0, 0, 0, .2); pointer-events: none; animation: funYell 1.4s ease forwards; }
.fun-yell::after { content: ""; position: absolute; left: 50%; top: 100%; translate: -50% -2px; border: 7px solid transparent; border-top-color: #fff; }
@keyframes funYell { 0% { scale: .3; opacity: 0; } 15% { scale: 1.15; opacity: 1; } 25% { scale: 1; } 80% { opacity: 1; } 100% { opacity: 0; translate: -50% calc(-100% - 16px); } }
/* «Нарисуй фон»: рисовалка поверх игры — слева кисти и заливка, справа цвета, сверху «назад» и «Готово» */
.bgp { position: absolute; inset: 0; z-index: 30; overflow: hidden; background: #fff; touch-action: none; }
.bgp-cv { position: absolute; left: 0; top: 0; touch-action: none; }
.bgp-floor { position: absolute; left: 0; right: 0; height: 0; border-top: 3px dashed rgba(120, 90, 60, .45); pointer-events: none; }
.bgp-top { position: absolute; left: 12px; right: 12px; top: calc(var(--sat) + 10px); display: flex; justify-content: space-between; align-items: center; pointer-events: none; }
.bgp-top > * { pointer-events: auto; }
.bgp-back { width: 64px; height: 64px; padding: 0; border: 0; border-radius: 22px; rotate: -4deg; display: grid; place-items: center; color: #fff; background: linear-gradient(180deg, #ffa36e, #ff6a2f); box-shadow: inset 0 3px 0 rgba(255, 255, 255, .45), 0 6px 0 #b8400d, 0 10px 18px -6px rgba(0, 0, 0, .45); cursor: pointer; }
.bgp-back .ico { width: 38px; height: 38px; stroke-width: 4.4; }
.bgp-done { display: flex; align-items: center; gap: 8px; height: 64px; padding: 0 22px 0 16px; border: 0; border-radius: 24px; rotate: 2deg; color: #fff; font: 900 22px/1 var(--font-display); background: linear-gradient(180deg, #62e06c, #2fb83e); box-shadow: inset 0 3px 0 rgba(255, 255, 255, .45), 0 6px 0 #1f8f2e, 0 10px 18px -6px rgba(0, 0, 0, .4); cursor: pointer; }
.bgp-done .ico { width: 34px; height: 34px; stroke-width: 4; }
.bgp-back:active, .bgp-done:active { translate: 0 5px; }
.bgp-colors, .bgp-tools { position: absolute; top: calc(var(--sat) + 92px); display: flex; flex-direction: column; padding: 8px 6px; border-radius: 28px; background: rgba(255, 255, 255, .92); box-shadow: 0 4px 16px rgba(0, 0, 0, .2); }
.bgp-colors { right: 10px; gap: 6px; }
.bgp-tools { left: 10px; gap: 8px; }
.bgp-sw { width: 40px; height: 40px; padding: 0; border: 3px solid #fff; border-radius: 50%; background: var(--c); box-shadow: 0 2px 0 rgba(0, 0, 0, .25); cursor: pointer; transition: scale .15s; }
.bgp-sw.is-on { scale: 1.2; border-color: #1d1a16; }
.bgp-tool { width: 52px; height: 52px; padding: 0; border: 0; border-radius: 16px; display: grid; place-items: center; background: #f1eef8; color: #3a2d52; cursor: pointer; }
.bgp-tool .ico { width: 30px; height: 30px; stroke-width: 2.4; }
.bgp-tool.is-on { background: #ffe36e; box-shadow: 0 0 0 3px #1d1a16; }
.bgp-tool[data-tool="clear"] { color: #e0261c; }
.bgp-dot { display: block; width: var(--d); height: var(--d); border-radius: 50%; background: var(--pc, #34c759); box-shadow: 0 0 0 2px rgba(0, 0, 0, .12); }
@media (max-height: 740px) { .bgp-sw { width: 36px; height: 36px; } .bgp-colors { gap: 4px; } .bgp-tool { width: 48px; height: 48px; } .bgp-colors, .bgp-tools { top: calc(var(--sat) + 84px); } }

/* s180: конструктор (Глеб 30.09): «нос и рот — в 2 карусели, ноги, руки и хвост — в 3». Ленты друг под другом,
   у каждой в начале значок; «меньше/больше» — столбиком справа, чтобы холст остался большим (экран не листается). */
.part-lines { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.part-line { display: flex; align-items: center; gap: 4px; min-width: 0; }
.part-line[hidden] { display: none; }
.part-line > .scroll-wrap { flex: 1 1 auto; min-width: 0; }
.part-label { display: none; }
#panel-parts.is-multi { flex-direction: row; align-items: center; gap: 6px; }
#panel-parts.is-multi .part-lines { flex: 1 1 auto; }
#panel-parts.is-multi .part-label { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; background: var(--felt-3); box-shadow: inset 0 0 0 1.5px var(--line); }
#panel-parts.is-multi .part-label img { width: 26px; height: 26px; object-fit: contain; pointer-events: none; }
#panel-parts.is-multi .part-row { gap: 7px; padding: 3px 4px 6px; }
#panel-parts.is-multi .part-opt { width: var(--pi, 64px); height: var(--pi, 64px); border-radius: 18px; }
#panel-parts.is-multi .part-opt img { width: calc(var(--pi, 64px) * .8); height: calc(var(--pi, 64px) * .8); }
#panel-parts.is-multi .part-size { flex: none; flex-direction: column-reverse; gap: 12px; padding: 0 0 4px; }
#panel-parts.is-multi .part-size-dot { display: none; }
#panel-parts.is-multi .size-pm { width: 52px; height: 64px; }
@media (pointer: coarse) {
  #panel-parts.is-rows2 { --pi: clamp(70px, calc((100dvh - var(--sat) - var(--sab)) * .128), 104px); }
  #panel-parts.is-rows3 { --pi: clamp(58px, calc((100dvh - var(--sat) - var(--sab)) * .1), 84px); }
}
/* пока рисуют тело — стрелки и кнопки над холстом почти прозрачные: под ними ничего не прячется */
.draw-wrap.is-drawing .step-arrow, .draw-wrap.is-drawing .canvas-btn { opacity: .15; pointer-events: none; }

/* s180 (Глеб 30.09: «кнопка в бой под монстрами»): «В бой!» — в самом низу, под лентой монстров; лента — над ней */
.screen--arena .arena-go { bottom: calc(var(--sab) + 12px); min-height: 76px; }
.screen--arena:has(#arena-go:not([hidden])) .arena-tray { bottom: calc(var(--sab) + 100px); padding-bottom: 10px; background: none; }
.screen--arena:has(#arena-go:not([hidden]))::after { content: ""; position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; height: calc(var(--sab) + 210px); background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .6) 38%); pointer-events: none; }

/* s181: фоновая музыка */
/* кнопка с нотой в шапке главного (как «EN» и тема); музыка выбрана — кнопка лаймовая, нота покачивается */
.bgm-btn .ico { width: 21px; height: 21px; }
.bgm-btn.is-on { background: var(--lime); color: var(--lime-ink); border-color: transparent; }
.bgm-btn.is-on .ico { animation: bgmNod 1.2s ease-in-out infinite; }
@keyframes bgmNod { 0%, 100% { rotate: -9deg; } 50% { rotate: 9deg; translate: 0 -1px; } }
/* iPhone 16 (393): версия — в две строчки и шаг между кнопками чуть меньше, чтобы в шапку влезла ещё одна кнопка */
@media (max-width: 420px) {
  .home-top { gap: 6px; }
  .home-top .app-version { white-space: normal; width: 7.6ch; line-height: 1.25; }
  .home-top .coll-btn { margin-right: 0; }
}
/* лист «Музыка» — снизу экрана */
.bgm-overlay { place-items: end center; padding: 12px 12px calc(var(--sab) + 12px); z-index: 40; }
.bgm-sheet { width: min(100%, 440px); padding: 16px 14px 14px; gap: 12px; animation: bgmUp .32s var(--ease-bounce); }
@keyframes bgmUp { from { translate: 0 70px; opacity: 0; } }
.bgm-head { display: flex; align-items: center; gap: 10px; }
.bgm-head-ico { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--lime); color: var(--lime-ink); }
.bgm-head .bgm-title { flex: 1; min-width: 0; }
.bgm-close { width: 48px !important; height: 48px !important; background: var(--felt-3); border: 1.5px solid var(--line); box-shadow: 0 3px 0 var(--line-2); }
.bgm-opt .bgm-name { min-width: 0; overflow-wrap: anywhere; }
.bgm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.bgm-opt { position: relative; display: flex; align-items: center; gap: 10px; min-width: 0; min-height: 68px; padding: 8px 14px 8px 12px; border: 0; border-radius: 22px; cursor: pointer; text-align: left; font: 800 16px/1.15 var(--font-display); color: #1d1a16; background: var(--bc, var(--felt-3)); box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .14), 0 3px 0 var(--line-2); transition: scale .18s var(--ease-bounce); }
.bgm-opt:active { scale: .95; }
.bgm-opt .ico { flex: none; width: 28px; height: 28px; stroke-width: 2.2; }
.bgm-opt.bgm-off { background: var(--felt-3); color: var(--fg); }
.bgm-opt.is-on { box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .14), 0 0 0 3px var(--felt-2), 0 0 0 6px var(--lime); }
.bgm-eq { display: none; }
.bgm-opt.is-on .bgm-eq { position: absolute; right: 10px; top: 8px; display: flex; align-items: flex-end; gap: 2px; height: 14px; }
.bgm-eq b { width: 3px; height: 6px; border-radius: 2px; background: currentColor; animation: bgmEq .8s ease-in-out infinite; }
.bgm-eq b:nth-child(2) { animation-delay: -.3s; }
.bgm-eq b:nth-child(3) { animation-delay: -.55s; }
@keyframes bgmEq { 0%, 100% { height: 4px; } 50% { height: 14px; } }
@media (prefers-reduced-motion: reduce) { .bgm-btn.is-on .ico, .bgm-eq b { animation: none; } }
@media (max-width: 420px) { .bgm-opt { gap: 8px; padding-right: 10px; font-size: 15px; } .bgm-opt .ico { width: 26px; height: 26px; } }

/* s181: главный — монстры-клетки, заставка */
/* название — одна строка во всю ширину (размер букв считает buildLogo в js/app.js), подзаголовка нет */
.screen--home .tagline { display: none; }
#logo { min-height: calc((100vw - 40px) * .088); }
#logo .logo-word { flex-direction: row; align-items: flex-end; margin: .26em 0 -.34em -.15em; }
#logo .logo-line + .logo-line { margin-left: .3em; }
/* клетки: картинка дизайнерского монстра на весь размер (js/menutiles.js), подпись — стеклянная плашка */
.home-tile.is-pic { background: var(--t2); box-shadow: 0 6px 0 var(--t3), 0 14px 22px -10px rgba(0, 0, 0, .55); }
.home-tile.is-pic:active { box-shadow: 0 1px 0 var(--t3); }
.screen--home .home-tiles .home-tile.is-pic .home-tile-art { inset: 0; left: 0; top: 0; translate: none; width: auto; aspect-ratio: auto; border-radius: inherit; overflow: hidden; }
.home-tile-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; display: block; pointer-events: none; -webkit-user-drag: none; -webkit-user-select: none; user-select: none; opacity: 0; transition: opacity .35s ease; }
.home-tile.is-loaded .home-tile-img { opacity: 1; }
.home-tile.is-pic::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, 0) 18%);
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .2), inset 0 2px 0 rgba(255, 255, 255, .28), inset 0 -26px 28px -22px rgba(0, 0, 0, .5); }
.home-tile.is-pic .home-tile-label { z-index: 2; padding: 5px 14px 6px; background: rgba(14, 12, 22, .5); color: #fff; -webkit-backdrop-filter: blur(10px) saturate(1.4); backdrop-filter: blur(10px) saturate(1.4); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .28), 0 4px 12px rgba(0, 0, 0, .3); text-shadow: 0 1px 2px rgba(0, 0, 0, .35); letter-spacing: .01em; }
/* цвет фона под картинкой = фон студии на картинке; нижняя кромка — темнее; в тёмной теме — лёгкое свечение */
.home-tile--draw.is-pic { --t2: #1b3a89; --t3: #0c1c52; --glow: rgba(70, 110, 255, .5); }
.home-tile--play.is-pic { --t2: #7c2fc3; --t3: #44157a; --glow: rgba(170, 80, 255, .5); }
.home-tile--arena.is-pic { --t2: #231b20; --t3: #120a09; --glow: rgba(255, 110, 30, .45); }
.home-tile--revive.is-pic { --t2: #1f1b44; --t3: #0d0b29; --glow: rgba(255, 205, 90, .35); }
.home-tile--color.is-pic { --t2: #1db4c4; --t3: #0b6e79; --glow: rgba(50, 225, 240, .45); }
.home-tile--music.is-pic { --t2: #e7626a; --t3: #9c2f37; --glow: rgba(255, 110, 120, .45); }
:root:not([data-theme="light"]) .home-tile.is-pic { box-shadow: 0 6px 0 var(--t3), 0 12px 26px -8px var(--glow), 0 14px 22px -10px rgba(0, 0, 0, .55); }
:root:not([data-theme="light"]) .home-tile.is-pic:active { box-shadow: 0 1px 0 var(--t3), 0 4px 18px -6px var(--glow); }

/* заставка при запуске (js/splash.js): чёрный слой виден с первого кадра; страховка — сам исчезает через 5–6 с */
.splash { position: fixed; inset: 0; z-index: 1000; overflow: hidden; background: #000; touch-action: none; -webkit-user-select: none; user-select: none; animation: splashSafety .4s ease 6s forwards; }
.splash.is-run { animation: splashSafety2 .4s ease 4.8s forwards; }
@keyframes splashSafety { to { opacity: 0; visibility: hidden; pointer-events: none; } }
@keyframes splashSafety2 { to { opacity: 0; visibility: hidden; pointer-events: none; } }
.splash-eyes { position: absolute; inset: 0; }
.splash-mon { position: absolute; width: 0; height: 0; rotate: var(--r, 0deg); filter: drop-shadow(0 0 5px var(--glow)) drop-shadow(0 0 16px var(--glow)); transition: scale .5s cubic-bezier(.55, 0, .9, .45), opacity .4s ease .08s; }
.splash-eye { position: absolute; translate: -50% -50%; display: grid; place-items: center; overflow: hidden; border-radius: 50%; background: radial-gradient(closest-side, var(--sc) 35%, #07060a); clip-path: inset(50% 0% 50% 0%); transition: clip-path .24s cubic-bezier(.3, 1.35, .6, 1); }
.splash-mon.is-open .splash-eye { clip-path: inset(0% 0% 0% 0%); }
.splash-iris { display: block; height: 96%; width: auto; aspect-ratio: 1; will-change: transform; }
.splash.is-out .splash-mon { scale: 1.8; opacity: 0; }
@media (prefers-reduced-motion: reduce) { .splash-mon { transition: opacity .3s ease; } .splash-eye { transition: clip-path .2s ease; } .splash.is-out .splash-mon { scale: 1; } }

/* s181: раскраска v2 */
/* (Глеб 30.09: «рисовку сделай более реалистичной… не детсадовские, а стильные») — js/coloring.js.
   Тёмный экран с неоновым свечением, глянцевые «титановые» кнопки со светящимися значками, «Готово» — неоновый лайм.
   Картинка — лист 790×1080 (холст цветов .col-fill под линиями .col-lines), двумя пальцами увеличивается внутри
   .col-clip; палитра — 2 ряда по 8 «желейных» цветов, выбранный светится своим цветом. Выбор картинок — сетка 3×4. */
#scr-color {
  --cs-glow: rgba(150, 110, 255, .38);
  gap: 8px; padding-inline: 8px;
  background:
    radial-gradient(70% 36% at 10% 0%, rgba(124, 92, 255, .26), transparent 70%),
    radial-gradient(60% 32% at 100% 100%, rgba(0, 190, 255, .17), transparent 72%),
    radial-gradient(46% 28% at 0% 82%, rgba(255, 80, 170, .11), transparent 70%),
    #07070b;
}
#scr-color .bar { gap: 8px; min-height: 58px; padding-inline: 2px; }
#scr-color .col-title { color: #fff; font: 800 clamp(20px, 5.6vw, 24px)/1 var(--font-display); letter-spacing: -.015em; text-shadow: 0 0 18px rgba(160, 130, 255, .6); }
#scr-color .col-gap { width: 56px; }
#scr-color .bar .icon-btn[data-back], #scr-color .col-tool {
  width: 56px; height: 56px; flex: none; rotate: 0deg; border-radius: 18px; border: 1px solid rgba(255, 255, 255, .14);
  background: radial-gradient(120% 90% at 30% 0%, rgba(255, 255, 255, .2), transparent 55%), linear-gradient(180deg, #33333e, #17171d 58%, #0e0e13);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), inset 0 -3px 8px rgba(0, 0, 0, .55), 0 10px 20px -8px rgba(0, 0, 0, .95);
  transition: scale .16s var(--ease-bounce), box-shadow .2s, opacity .2s;
}
#scr-color .bar .icon-btn[data-back] { color: #ffae5c; }
#scr-color .bar .icon-btn[data-back] .ico { width: 32px; height: 32px; stroke-width: 3.4; filter: drop-shadow(0 0 6px rgba(255, 150, 60, .8)); }
#scr-color .col-tool .ico { width: 28px; height: 28px; stroke-width: 2.7; }
#scr-color .col-tool--undo { color: #72e2ff; }
#scr-color .col-tool--undo .ico { filter: drop-shadow(0 0 6px rgba(80, 210, 255, .85)); }
#scr-color .col-tool--clear { color: #ff74b8; }
#scr-color .col-tool--clear .ico { filter: drop-shadow(0 0 6px rgba(255, 90, 170, .85)); }
#scr-color .bar .icon-btn[data-back]:active, #scr-color .col-tool:active { translate: none; scale: .9; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), inset 0 -2px 6px rgba(0, 0, 0, .6), 0 4px 10px -6px rgba(0, 0, 0, .95); }
#scr-color .col-tool.is-off { opacity: .36; }
#scr-color .col-tool.is-armed {
  color: #fff; border-color: rgba(255, 150, 140, .9);
  background: radial-gradient(120% 90% at 30% 0%, rgba(255, 255, 255, .35), transparent 55%), linear-gradient(180deg, #ff5f55, #b8150d);
  box-shadow: 0 0 0 2px rgba(255, 90, 80, .45), 0 0 26px rgba(255, 60, 50, .8), 0 10px 20px -8px rgba(0, 0, 0, .95);
  animation: nope .4s ease, colPulse 1s ease-in-out .4s infinite;
}
#scr-color .col-tool.is-armed .ico { filter: none; }
#scr-color .col-done {
  height: 56px; rotate: 0deg; gap: 6px; padding: 0 18px 0 12px; border-radius: 18px; color: #142409; text-shadow: none;
  font: 800 clamp(16px, 4.6vw, 19px)/1 var(--font-display); letter-spacing: -.01em;
  background: radial-gradient(120% 90% at 30% 0%, rgba(255, 255, 255, .7), transparent 50%), linear-gradient(180deg, #ebff8f, #c0f53c 50%, #8ed311);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .85), inset 0 -3px 8px rgba(70, 120, 0, .45), 0 0 22px rgba(190, 255, 70, .45), 0 10px 20px -8px rgba(0, 0, 0, .95);
  transition: scale .16s var(--ease-bounce), box-shadow .2s;
}
#scr-color .col-done .ico { width: 28px; height: 28px; stroke-width: 3.6; filter: none; }
#scr-color .col-done:active { translate: none; scale: .93; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .85), inset 0 -2px 6px rgba(70, 120, 0, .45), 0 0 14px rgba(190, 255, 70, .35); }
/* выбор картинки: листы 790×1080, сетка 3×4 (десятая — посередине), по ширине или по высоте — что меньше */
#scr-color .col-picker {
  --s: min(calc((100cqw - 24px) / 3), calc((100cqh - 36px) / 4 * 790 / 1080));
  grid-template-columns: repeat(3, var(--s)); grid-auto-rows: calc(var(--s) * 1080 / 790); gap: 12px;
}
#scr-color .col-card { --g: #7c5cff; border-radius: 16px; }
#scr-color .col-card:nth-child(10) { grid-column: 2; }
#scr-color .col-card:nth-child(5n+2) { --g: #00c8ff; }
#scr-color .col-card:nth-child(5n+3) { --g: #ff4fa3; }
#scr-color .col-card:nth-child(5n+4) { --g: #b6f53a; }
#scr-color .col-card:nth-child(5n) { --g: #ffa53a; }
.col-thumb {
  display: block; width: 100%; height: 100%; overflow: hidden; border-radius: 16px; background: #fff;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .16), 0 14px 22px -12px rgba(0, 0, 0, .95), 0 0 28px -8px var(--g);
  transition: scale .16s var(--ease-bounce), box-shadow .2s;
}
.col-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; pointer-events: none; -webkit-user-drag: none; }
#scr-color .col-card:active .col-thumb { scale: .94; }
#scr-color .col-card.is-done .col-thumb { box-shadow: 0 0 0 2px #d9ff5a, 0 0 22px rgba(200, 255, 80, .5), 0 14px 22px -12px rgba(0, 0, 0, .95); }
#scr-color .col-card .col-star { right: -8px; top: -9px; filter: drop-shadow(0 0 8px rgba(220, 255, 90, .75)); }
/* раскрашивание */
#scr-color .col-work { gap: 8px; }
#scr-color .col-paper { width: min(100cqw, calc(100cqh * 790 / 1080)); height: min(100cqh, calc(100cqw * 1080 / 790)); touch-action: none; }
.col-clip {
  position: absolute; inset: 0; overflow: hidden; border-radius: 18px; background: #fff; touch-action: none; isolation: isolate; transform: translateZ(0);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .16), 0 18px 36px -14px rgba(0, 0, 0, .95), 0 0 52px -10px var(--cs-glow);
}
.col-sheet { position: absolute; inset: 0; transform-origin: 0 0; will-change: transform; }
.col-fill, .col-lines { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.col-lines { pointer-events: none; -webkit-user-drag: none; }
.col-paper.is-loading .col-fill { opacity: 0; }
.col-paper.is-loading .col-clip { animation: colLoad 1s ease-in-out infinite; }
@keyframes colLoad { 50% { filter: brightness(.9); } }
#scr-color .col-paper .col-star { z-index: 3; width: 54px; height: 54px; right: -6px; top: -6px; filter: drop-shadow(0 0 10px rgba(220, 255, 90, .8)); }
.col-fit {
  position: absolute; right: 10px; bottom: 10px; z-index: 3; width: 48px; height: 48px; padding: 0; display: grid; place-items: center; cursor: pointer;
  border: 1px solid rgba(255, 255, 255, .2); border-radius: 16px; color: #fff; background: rgba(14, 14, 20, .74);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 8px 18px -6px rgba(0, 0, 0, .8);
}
.col-fit .ico { width: 26px; height: 26px; stroke-width: 2.6; }
.col-fit:active { scale: .9; }
.col-paper.is-done .col-clip { animation: colBounce .7s var(--ease-bounce); }
.col-paper.is-wipe .col-clip { animation: colWipe .4s ease; }
/* палитра: 2 ряда по 8 «желейных» цветов на стеклянной подложке; выбранный светится своим цветом */
#scr-color .col-pal {
  display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 7px 6px; justify-items: center; padding: 8px 8px;
  border-radius: 22px; border: 1px solid rgba(255, 255, 255, .08);
  background: linear-gradient(180deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .02));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
}
#scr-color .col-sw {
  position: relative; width: min(50px, 100%); aspect-ratio: 1; border-radius: 36%;
  background: radial-gradient(circle at 33% 26%, rgba(255, 255, 255, .85) 0 8%, rgba(255, 255, 255, 0) 30%), radial-gradient(120% 90% at 50% 118%, rgba(0, 0, 0, .4), transparent 56%), var(--c);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, .5), inset 0 -2px 4px rgba(0, 0, 0, .25), 0 5px 10px -4px rgba(0, 0, 0, .9);
  transition: scale .22s var(--ease-bounce), box-shadow .18s;
}
#scr-color .col-sw[data-c="#ffffff"] { box-shadow: inset 0 0 0 1.5px rgba(0, 0, 0, .14), inset 0 -2px 4px rgba(0, 0, 0, .12), 0 5px 10px -4px rgba(0, 0, 0, .9); }
#scr-color .col-sw[data-c="#1c1b22"], #scr-color .col-sw[data-c="#3b3950"] { box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .22), inset 0 1px 1px rgba(255, 255, 255, .35), 0 5px 10px -4px rgba(0, 0, 0, .9); }
#scr-color .col-sw.is-on, #scr-color .col-sw.is-on[data-c] {
  z-index: 1; scale: 1.14;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, .5), 0 0 0 2.5px #07070b, 0 0 0 5px var(--c), 0 0 20px 3px color-mix(in srgb, var(--c) 70%, transparent);
}
#scr-color .col-sw.is-on[data-c="#1c1b22"], #scr-color .col-sw.is-on[data-c="#3b3950"] { box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .25), 0 0 0 2.5px #07070b, 0 0 0 5px #a49cd0, 0 0 20px 3px rgba(164, 156, 208, .55); }
#scr-color .col-sw:active { scale: .88; }
/* «Готово»: вместо палитры — две кнопки в ряд */
#scr-color .col-donecard { flex-direction: row; align-items: center; gap: 10px; padding: 0; }
#scr-color .col-donecard .btn-lime {
  flex: 1 1 0; min-width: 0; min-height: 60px; margin: 0; padding: 0 10px; gap: 6px; rotate: 0deg; border-radius: 18px; animation: none;
  font: 800 clamp(14px, 4vw, 17px)/1.1 var(--font-display); letter-spacing: -.01em; white-space: normal; text-align: left;
}
#scr-color .col-donecard .btn-lime .btn-ico { width: 26px; height: 26px; flex: none; }
#scr-color .col-donecard .btn-lime .btn-ico .ico { width: 24px; height: 24px; stroke-width: 2.6; }
#scr-color #col-more {
  color: #e6f7ff; border: 1px solid rgba(255, 255, 255, .14);
  background: radial-gradient(120% 90% at 30% 0%, rgba(255, 255, 255, .2), transparent 55%), linear-gradient(180deg, #33333e, #17171d 58%, #0e0e13);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), 0 0 18px -4px rgba(80, 210, 255, .5), 0 10px 20px -8px rgba(0, 0, 0, .95);
}
#scr-color #col-more .ico { color: #72e2ff; filter: drop-shadow(0 0 5px rgba(80, 210, 255, .85)); }
#scr-color #col-other {
  color: #142409;
  background: radial-gradient(120% 90% at 30% 0%, rgba(255, 255, 255, .7), transparent 50%), linear-gradient(180deg, #ebff8f, #c0f53c 50%, #8ed311);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .85), inset 0 -3px 8px rgba(70, 120, 0, .45), 0 0 22px rgba(190, 255, 70, .4), 0 10px 20px -8px rgba(0, 0, 0, .95);
}
#scr-color .col-donecard .btn-lime:active { translate: none; scale: .95; }

/* s181: главный — пока скрипты ещё грузятся (картинок в клетках нет), клетки уже цвета фонов с картинок, а не пастельные */
.screen--home .home-tile--draw { --t1: #2d56b8; --t2: #1b3a89; --t3: #0c1c52; }
.screen--home .home-tile--play { --t1: #9a4ee0; --t2: #7c2fc3; --t3: #44157a; }
.screen--home .home-tile--arena { --t1: #3a2c30; --t2: #231b20; --t3: #120a09; }
.screen--home .home-tile--revive { --t1: #2e2a63; --t2: #1f1b44; --t3: #0d0b29; }
.screen--home .home-tile--color { --t1: #45d0dd; --t2: #1db4c4; --t3: #0b6e79; }
.screen--home .home-tile--music { --t1: #f3868c; --t2: #e7626a; --t3: #9c2f37; }

/* s181: фоны и музыка v2 (Глеб 30.09: «современно, реалистично, с текстурами, не детсадовское»).
   Фоны «Поиграть» — фото (неоновый город, джунгли, конфетный мир, js/funbg.js), жуки и сладости — глянцевые игрушки;
   рисовалка фона, счёт и значки — тёмное стекло; музыка — тёмные стеклянные карточки с подсветкой и глянцевые клавиши. */
/* значки фонов */
.bg-col .bg-pick.bg-fun { background: #14111c; border-radius: 18px; box-shadow: 0 0 0 2px rgba(255, 255, 255, .8), 0 8px 18px -6px rgba(0, 0, 0, .7); }
.bg-col .bg-pick.bg-fun canvas { border-radius: 17px; }
.bg-col .bg-pick.bg-fun.is-on { box-shadow: 0 0 0 3px #d4ff4a, 0 0 22px 3px rgba(198, 245, 58, .7), 0 8px 18px -6px rgba(0, 0, 0, .7); }
.bg-fun-pen { background: radial-gradient(circle at 35% 28%, #ffc2e2, #ff5fae 55%, #d8308a); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), 0 3px 8px rgba(0, 0, 0, .45); }
/* счёт занятия — тёмная стеклянная плашка */
.fun-score { background: rgba(20, 16, 30, .62); -webkit-backdrop-filter: blur(12px) saturate(1.5); backdrop-filter: blur(12px) saturate(1.5); color: #fff; border: 1px solid rgba(255, 255, 255, .2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 10px 26px -8px rgba(0, 0, 0, .65); text-shadow: 0 2px 6px rgba(0, 0, 0, .35); }
.fun-score-ico { filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .45)); }
/* неоновый город: прохожие в свете вывесок; огоньки и мерцание неона */
.amb-skate .amb-person { filter: brightness(.74) saturate(.95) contrast(1.05) drop-shadow(-3px 0 5px rgba(255, 70, 200, .5)) drop-shadow(0 6px 4px rgba(0, 0, 0, .5)); }
.amb-skate .amb-shimmer { background: radial-gradient(45% 28% at 8% 34%, rgba(255, 60, 190, .3), transparent 70%), radial-gradient(45% 28% at 92% 30%, rgba(60, 200, 255, .26), transparent 70%); animation: ambNeon 5s ease-in-out infinite; mix-blend-mode: screen; }
.amb-skate .amb-motes { width: 4px; height: 4px; background: #ff7fe0; box-shadow: 0 0 9px 2px rgba(255, 90, 210, .85); }
.amb-skate .amb-motes:nth-child(even) { background: #7fe8ff; box-shadow: 0 0 9px 2px rgba(60, 210, 255, .85); }
@keyframes ambNeon { 0%, 100% { opacity: .8; } 44% { opacity: 1; } 46% { opacity: .45; } 48% { opacity: 1; } 70% { opacity: .9; } }
/* джунгли: тёплые лучи и золотая пыльца */
.amb-bugs .amb-rays { inset: -10% -20% 35% 10%; background: repeating-linear-gradient(104deg, transparent 0 70px, rgba(255, 226, 150, .1) 70px 112px, transparent 112px 190px); }
.amb-bugs .amb-flies { width: 4px; height: 4px; background: #fff0b0; box-shadow: 0 0 8px 2px rgba(255, 214, 110, .6); }
/* конфетный мир: искорки */
.amb-sweets .amb-motes { width: 6px; height: 6px; border-radius: 1px; rotate: 45deg; background: #fff; box-shadow: 0 0 10px 3px rgba(255, 160, 220, .85); }

/* «Нарисуй фон»: тёмные стеклянные панели, глянцевые кнопки */
.bgp-floor { border-top: 2px dashed rgba(110, 80, 200, .45); }
.bgp-back { width: 60px; height: 60px; border-radius: 50%; rotate: none; color: #fff; background: rgba(22, 18, 32, .72); -webkit-backdrop-filter: blur(12px) saturate(1.4); backdrop-filter: blur(12px) saturate(1.4);
  border: 1px solid rgba(255, 255, 255, .2); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 10px 24px -8px rgba(0, 0, 0, .6); }
.bgp-back .ico { width: 32px; height: 32px; stroke-width: 3.4; }
.bgp-done { height: 60px; border-radius: 999px; rotate: none; color: #1b2600; text-shadow: 0 1px 0 rgba(255, 255, 255, .5);
  background: radial-gradient(120% 90% at 30% 0%, rgba(255, 255, 255, .7), transparent 50%), linear-gradient(180deg, #ebff8f, #c0f53c 50%, #8ed311);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .85), inset 0 -3px 8px rgba(70, 120, 0, .45), 0 0 22px rgba(190, 255, 70, .45), 0 10px 20px -8px rgba(0, 0, 0, .7); }
.bgp-done .ico { width: 30px; height: 30px; stroke-width: 3.6; }
.bgp-back:active, .bgp-done:active { translate: none; scale: .94; }
.bgp-colors, .bgp-tools { background: rgba(22, 18, 32, .78); -webkit-backdrop-filter: blur(14px) saturate(1.4); backdrop-filter: blur(14px) saturate(1.4); border: 1px solid rgba(255, 255, 255, .14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), 0 14px 30px -10px rgba(0, 0, 0, .6); }
.bgp-sw { border: 2px solid rgba(255, 255, 255, .7); background: radial-gradient(circle at 34% 28%, rgba(255, 255, 255, .65), rgba(255, 255, 255, 0) 45%), var(--c);
  box-shadow: inset 0 -4px 6px rgba(0, 0, 0, .28), 0 3px 8px rgba(0, 0, 0, .45); }
.bgp-sw.is-on { scale: 1.18; border-color: #fff; box-shadow: inset 0 -4px 6px rgba(0, 0, 0, .28), 0 0 0 3px var(--c), 0 0 16px 2px var(--c); }
.bgp-tool { border-radius: 16px; background: rgba(255, 255, 255, .08); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14); }
.bgp-tool.is-on { color: #1b2600; background: radial-gradient(120% 90% at 30% 0%, rgba(255, 255, 255, .7), transparent 50%), linear-gradient(180deg, #ebff8f, #c0f53c 55%, #8ed311); box-shadow: 0 0 0 2px rgba(255, 255, 255, .85), 0 0 18px rgba(198, 245, 58, .55); }
.bgp-tool[data-tool="clear"] { color: #ff7b7b; }
.bgp-dot { box-shadow: 0 0 0 2px rgba(255, 255, 255, .4), 0 2px 6px rgba(0, 0, 0, .4); }

/* музыка: карточки песенок — тёмное стекло, картинка-игрушка с подсветкой своего цвета */
.music-song { color: #fff; rotate: none; overflow: hidden; isolation: isolate; border: 1px solid rgba(255, 255, 255, .14);
  background: linear-gradient(180deg, rgba(255, 255, 255, .1), rgba(255, 255, 255, .02) 60%), #17131f;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), inset 0 -10px 24px -12px var(--t2), 0 12px 24px -14px var(--t2), 0 10px 18px -10px rgba(0, 0, 0, .7); }
.music-song::before { content: ""; position: absolute; left: 50%; top: 42%; width: 92%; aspect-ratio: 1; translate: -50% -50%; border-radius: 50%; background: radial-gradient(closest-side, var(--t2), transparent); opacity: .55; pointer-events: none; }
.music-song > * { position: relative; }
.music-song:active { translate: 0 2px; scale: .96; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 4px 10px -6px rgba(0, 0, 0, .7); }
.music-song .music-ico { flex: none; width: auto; height: 64%; max-width: 80%; object-fit: contain; filter: drop-shadow(0 8px 10px rgba(0, 0, 0, .5)); pointer-events: none; animation: msIco 3.6s ease-in-out infinite; }
.music-song:nth-child(2n) .music-ico { animation-delay: -1.2s; }
.music-song:nth-child(3n) .music-ico { animation-delay: -2.4s; }
@keyframes msIco { 0%, 100% { translate: 0 0; rotate: -3deg; } 50% { translate: 0 -3px; rotate: 3deg; } }
.music-song span { color: rgba(255, 255, 255, .94); text-shadow: 0 2px 6px rgba(0, 0, 0, .5); }
.music-song.is-on { outline: 2px solid rgba(255, 255, 255, .9); outline-offset: 2px; }
.music-pick { background: radial-gradient(110% 50% at 50% 0%, rgba(120, 80, 255, .22), transparent 70%), #0f0c16; color: #fff; }
.music-who-title { color: rgba(255, 255, 255, .7); }
.music-mon-opt { background: rgba(255, 255, 255, .06); border: 2px solid rgba(255, 255, 255, .16); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12); }
.music-mon-opt.is-on { border-color: #d4ff4a; box-shadow: 0 0 0 3px rgba(212, 255, 74, .35), 0 0 18px rgba(198, 245, 58, .45); }
.music-songs-btn { rotate: none; border-radius: 50%; background: radial-gradient(120% 90% at 30% 0%, rgba(255, 255, 255, .55), transparent 50%), linear-gradient(180deg, #a592ff, #6a4ff2 55%, #4a2fc9);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), inset 0 -3px 8px rgba(30, 10, 110, .45), 0 0 20px rgba(130, 100, 255, .45), 0 10px 20px -8px rgba(0, 0, 0, .8); }
.music-songs-btn:active { translate: none; scale: .94; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), 0 0 14px rgba(130, 100, 255, .4); }
.music-end { background: rgba(22, 18, 32, .8); -webkit-backdrop-filter: blur(14px) saturate(1.4); backdrop-filter: blur(14px) saturate(1.4); border: 1px solid rgba(255, 255, 255, .14); color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), 0 18px 34px -14px rgba(0, 0, 0, .75); }
/* большая картинка песенки над клавишами — та же игрушка, приглушённая, со светом */
.music-art { opacity: .3; }
.music-art .music-ico { display: block; width: 100%; height: 100%; object-fit: contain; filter: blur(.5px) drop-shadow(0 0 24px rgba(255, 255, 255, .25)); }
/* клавиши — глянцевые игрушечные: блик сверху, объём по бокам, светлая полоска вдоль; «гвоздиков» больше нет */
.music-key { border-radius: 24px 24px 18px 18px;
  background: radial-gradient(130% 55% at 30% 0%, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0) 60%),
    linear-gradient(90deg, rgba(0, 0, 0, .2), rgba(0, 0, 0, 0) 24%, rgba(0, 0, 0, 0) 68%, rgba(0, 0, 0, .26)),
    linear-gradient(180deg, var(--kl) 0%, var(--kc) 34%, var(--kd) 100%);
  box-shadow: inset 0 2px 1px rgba(255, 255, 255, .75), inset 0 -12px 18px -6px rgba(0, 0, 0, .3), 0 6px 0 var(--kd), 0 16px 22px -10px rgba(0, 0, 0, .65); }
.music-key::before { opacity: 0; }
.music-key::after { left: 20%; top: 10px; bottom: 30px; width: 18%; height: auto; translate: none; border-radius: 999px; box-shadow: none; opacity: .8;
  background: linear-gradient(180deg, rgba(255, 255, 255, .85), rgba(255, 255, 255, 0) 90%); }
.music-key.is-down { box-shadow: inset 0 2px 1px rgba(255, 255, 255, .75), inset 0 -12px 18px -6px rgba(0, 0, 0, .3), 0 1px 0 var(--kd); }
.music-key.is-lit { box-shadow: 0 0 0 3px rgba(255, 255, 255, .95), 0 0 32px 10px var(--kc), inset 0 2px 1px rgba(255, 255, 255, .75), inset 0 -12px 18px -6px rgba(0, 0, 0, .3), 0 6px 0 var(--kd); }
.music-key.is-lit.is-down { box-shadow: 0 0 0 3px rgba(255, 255, 255, .95), 0 0 32px 10px var(--kc), 0 1px 0 var(--kd); }
.music-key.is-lit::before { opacity: 1; box-shadow: 0 0 14px 4px rgba(255, 255, 255, .8); }

/* s182: мелодии music/bgm-1…5.mp3 залиты — кнопка фоновой музыки снова видна */

/* s182 (Глеб 01.10: «цвета только как на первом интерфейсе, никаких тёмных цветов»): клетки — яркие цвета прежних
   кнопок (розовая, фиолетовая, жёлтая, салатовая, голубая, оранжевая) с объёмной тенью снизу */
.screen--home .home-tiles .home-tile--draw { --t1: #ffc2e6; --t2: #ff9fd8; --t3: #d8649f; }
.screen--home .home-tiles .home-tile--play { --t1: #aa9dff; --t2: #8f7dff; --t3: #5d4bd6; }
.screen--home .home-tiles .home-tile--arena { --t1: #ffd978; --t2: #ffc43d; --t3: #d39418; }
.screen--home .home-tiles .home-tile--revive { --t1: #dcfd62; --t2: #c6f53a; --t3: #86ad12; }
.screen--home .home-tiles .home-tile--color { --t1: #9ccfff; --t2: #74bdff; --t3: #3f88cf; }
.screen--home .home-tiles .home-tile--music { --t1: #ffa06a; --t2: #ff7a38; --t3: #c9501a; }
.screen--home .home-tiles .home-tile { background: radial-gradient(120% 95% at 30% 18%, var(--t1), var(--t2) 70%); box-shadow: inset 0 3px 0 rgba(255, 255, 255, .45), inset 0 -5px 0 rgba(0, 0, 0, .08), 0 7px 0 var(--t3), 0 14px 22px -10px rgba(0, 0, 0, .45); }
.screen--home .home-tiles .home-tile:active { box-shadow: inset 0 3px 0 rgba(255, 255, 255, .45), 0 1px 0 var(--t3); }
.screen--home .home-tiles .tile-spark { width: 19cqw !important; height: auto; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .25)); } /* молнии, звёзды, шарики — крупнее и заметнее */

/* s182 (Глеб 01.10: «на музыке и в раскрасках фон и стиль никуда не вписываются — как на первом экране»):
   фон — как у всего приложения (тема), кнопки и карточки — яркие цвета главного экрана с объёмной тенью, без тёмного неона */
#scr-color { background: none; color: var(--fg); }
.music-pick { background: var(--ink); color: var(--fg); }
/* s182 (Глеб 01.10, iPhone 17 Pro Max: «рамки по краям» — айфон уменьшал всю страницу, когда что-то вылезало за ширину
   экрана): всё, что шире экрана, обрезается внутри приложения, и страница никогда не шире телефона */
html, body { max-width: 100%; overflow-x: hidden; }
#app { overflow: hidden; }
#scr-color .col-title { color: var(--fg); text-shadow: none; }
#scr-color .bar .icon-btn[data-back] { color: #fff; border: 0; background: linear-gradient(180deg, #ffa36e, #ff6a2f); box-shadow: inset 0 3px 0 rgba(255, 255, 255, .45), 0 6px 0 #b8400d; }
#scr-color .bar .icon-btn[data-back] .ico { filter: none; }
#scr-color .col-tool { border: 0; color: #fff; }
#scr-color .col-tool .ico { filter: none !important; }
#scr-color .col-tool--undo { background: linear-gradient(180deg, #9ccfff, #74bdff); box-shadow: inset 0 3px 0 rgba(255, 255, 255, .45), 0 6px 0 #3f88cf; }
#scr-color .col-tool--clear { background: linear-gradient(180deg, #ffc2e6, #ff9fd8); box-shadow: inset 0 3px 0 rgba(255, 255, 255, .45), 0 6px 0 #d8649f; color: #5a1240; }
#scr-color .col-thumb { box-shadow: 0 0 0 4px var(--g), 0 7px 0 4px color-mix(in srgb, var(--g) 70%, #000); }
#scr-color .col-card.is-done .col-thumb { box-shadow: 0 0 0 4px #c6f53a, 0 7px 0 4px #86ad12; }
#scr-color .col-paper .col-clip, #scr-color .col-clip { box-shadow: 0 0 0 4px #fff, 0 8px 0 4px rgba(0, 0, 0, .12); }
#scr-color #col-more { color: #fff; border: 0; background: linear-gradient(180deg, #9ccfff, #74bdff); box-shadow: inset 0 3px 0 rgba(255, 255, 255, .45), 0 6px 0 #3f88cf; }
#scr-color #col-more .ico { color: #fff; filter: none; }
#scr-color .col-sw.is-on { box-shadow: inset 0 1px 1px rgba(255, 255, 255, .5), 0 0 0 3px var(--bg, #fff), 0 0 0 6px var(--c); }
.music-song { color: #2a1c24; border: 0; background: radial-gradient(120% 95% at 30% 18%, var(--t1), var(--t2) 72%);
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, .5), inset 0 -5px 0 rgba(0, 0, 0, .08), 0 6px 0 var(--t3), 0 12px 20px -10px rgba(0, 0, 0, .35); }
.music-song::before { display: none; }
.music-song span { color: #2a1c24; text-shadow: none; padding: 2px 10px; border-radius: 999px; background: rgba(255, 255, 255, .8); }
.music-song .music-ico { filter: drop-shadow(0 5px 6px rgba(0, 0, 0, .25)); }
.music-song:active { translate: 0 4px; box-shadow: inset 0 3px 0 rgba(255, 255, 255, .5), 0 2px 0 var(--t3); }
.music-who-title { color: var(--fg-2, var(--fg)); }
.music-mon-opt { background: var(--felt-2); border: 3px solid var(--line); box-shadow: none; }
.music-mon-opt.is-on { border-color: #c6f53a; box-shadow: 0 0 0 3px rgba(198, 245, 58, .45); }
.music-end { background: var(--felt-2); color: var(--fg); border: 1.5px solid var(--line); -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: 0 4px 0 var(--line-2), 0 18px 30px -16px rgba(0, 0, 0, .35); }
.music-songs-btn { background: linear-gradient(180deg, #aa9dff, #8f7dff); box-shadow: inset 0 3px 0 rgba(255, 255, 255, .45), 0 6px 0 #5d4bd6; }
/* s182: фоновая музыка по настроению — три смайлика (грустная, спокойная, весёлая) и «Выключить» */
.bgm-mood { flex-direction: column; justify-content: center; gap: 4px; min-height: 104px; padding: 10px 8px; text-align: center; color: #2a1c24; background: var(--bc); box-shadow: inset 0 3px 0 rgba(255, 255, 255, .5), 0 5px 0 rgba(0, 0, 0, .18); }
.bgm-mood .bgm-face { width: 54px; height: 54px; flex: none; filter: drop-shadow(0 3px 3px rgba(0, 0, 0, .2)); }
.bgm-mood.is-on .bgm-face { animation: bgmNod 1.2s ease-in-out infinite; }
.bgm-mood .bgm-name { font-size: 17px; }
/* s182: лента предметов в «Поиграть» — видно, что листается: стрелки по краям и затенение краёв */
.dock-hint { position: absolute; z-index: 6; translate: none; }
.dock-hint.scroll-hint--left { left: 6px; }
.dock-hint.scroll-hint--right { right: 6px; animation: dockNudge 1.6s ease-in-out infinite; }
@keyframes dockNudge { 50% { translate: 5px 0; } }
#dock.can-right { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 56px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 56px), transparent); }
#dock.can-left { -webkit-mask-image: linear-gradient(90deg, transparent, #000 56px); mask-image: linear-gradient(90deg, transparent, #000 56px); }
#dock.can-left.can-right { -webkit-mask-image: linear-gradient(90deg, transparent, #000 56px, #000 calc(100% - 56px), transparent); mask-image: linear-gradient(90deg, transparent, #000 56px, #000 calc(100% - 56px), transparent); }

/* ===== s183 (Глеб 01.10): дизайн по макету — белая страница, пастельные карточки, жирные чёрные заголовки, круглые белые стрелки ===== */
:root { --hv-btn: var(--felt-2); --hv-card: var(--felt-2); --hv-line: rgba(255, 255, 255, .08); --hv-blue: #0084fe; }
:root[data-theme="light"] {
  --ink: #ffffff; --felt: #f6f6f9; --felt-2: #f1f1f5; --felt-3: #e8e8ef;
  --line: rgba(20, 20, 40, .08); --line-2: #e4e4ec;
  --fg: #111114; --fg-2: rgba(17, 17, 20, .64); --fg-3: rgba(17, 17, 20, .4);
  --hv-btn: #f1f1f5; --hv-card: #ffffff; --hv-line: #ececf2;
}
/* главный */
.screen--home { gap: 8px; }
.screen--home .home-top { min-height: 40px; gap: 6px; }
.screen--home .toggle-btn, .screen--home .home-top .icon-btn { width: 40px; min-width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: var(--hv-btn); box-shadow: none; color: var(--fg); }
.screen--home #btn-lang { width: auto; padding: 0 12px; border-radius: 999px; }
.screen--home .bgm-btn.is-on { background: #defcac; color: #172300; }
.hv-title { margin: 0; font: 900 clamp(28px, 8.6vw, 40px)/1.05 var(--font-display); letter-spacing: -.025em; color: var(--fg); white-space: nowrap; }
.hv { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 10px; }
.hv button { -webkit-tap-highlight-color: transparent; font-family: var(--font-display); }
.hv-hero { position: relative; flex: 1.05 1 0; min-height: 140px; max-height: 250px; display: block; width: 100%; padding: 0; border: 0; border-radius: 28px; overflow: hidden; cursor: pointer; text-align: left; background: var(--hv-blue); color: #fff; isolation: isolate; transition: scale .18s var(--ease-bounce); }
.hv-hero-txt { position: relative; z-index: 2; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: clamp(10px, 3vw, 16px); width: 64%; height: 100%; padding: 14px 0 14px clamp(16px, 5vw, 24px); }
.hv-hero-t { font: 900 clamp(24px, 7.4vw, 34px)/1.02 var(--font-display); letter-spacing: -.02em; text-wrap: balance; }
.hv-start { display: inline-flex; align-items: center; gap: 8px; height: clamp(44px, 12.5vw, 54px); padding: 0 clamp(18px, 5.5vw, 26px) 0 clamp(14px, 4.5vw, 20px); border-radius: 999px; background: #fff; color: #111114; font: 900 clamp(17px, 5vw, 22px)/1 var(--font-display); box-shadow: 0 6px 16px -8px rgba(0, 40, 120, .5); }
.hv-start .ico { width: 1.05em; height: 1.05em; stroke-width: 3.6; }
.hv-hero-art { position: absolute; z-index: 1; right: 0; bottom: 0; width: auto; height: 100%; max-width: 58%; object-fit: contain; object-position: 100% 100%; pointer-events: none; }
.hv-grid { flex: 2 1 0; min-height: 0; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 10px; }
.hv-tile, .hv-gopt { position: relative; display: block; min-width: 0; min-height: 0; padding: 0; border: 0; border-radius: 24px; overflow: hidden; cursor: pointer; text-align: left; color: #111114; background: var(--tb); transition: scale .18s var(--ease-bounce); }
.hv-tile--revive { --tb: #fed8e5; } .hv-tile--color { --tb: #e5defd; } .hv-tile--music { --tb: #defcac; } .hv-tile--games { --tb: #c1e7fd; }
.hv-tile-t { position: absolute; z-index: 2; left: 14px; top: 13px; right: 50px; font: 900 clamp(17px, 5.1vw, 23px)/1.05 var(--font-display); letter-spacing: -.02em; white-space: nowrap; }
.hv-arrow { position: absolute; z-index: 2; right: 9px; top: 9px; display: grid; place-items: center; width: clamp(32px, 9vw, 40px); aspect-ratio: 1; border-radius: 50%; background: #fff; color: #111114; box-shadow: 0 2px 8px -3px rgba(0, 0, 0, .18); }
.hv-arrow .ico { width: 55%; height: 55%; stroke-width: 2.8; }
.hv-tile-art { position: absolute; z-index: 1; left: 50%; bottom: 0; translate: -50% 0; width: 100%; height: calc(100% - 38px); object-fit: contain; object-position: 50% 100%; pointer-events: none; }
.hv-mine { flex: none; display: flex; align-items: center; gap: 10px; width: 100%; height: 62px; padding: 0 9px 0 16px; border-radius: 24px; border: 1.5px solid var(--hv-line); background: var(--hv-card); color: var(--fg); cursor: pointer; box-shadow: 0 6px 18px -12px rgba(0, 0, 0, .18); transition: scale .18s var(--ease-bounce); }
.hv-mine-t { flex: 1; min-width: 0; text-align: left; font: 900 clamp(16px, 4.7vw, 20px)/1 var(--font-display); letter-spacing: -.02em; white-space: nowrap; }
.hv-avs { display: flex; gap: 4px; }
.hv-avs img { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; background: var(--c1, #e5defd); }
.hv-avs img:not([src*="menu/"]) { object-fit: contain; padding: 3px; }
.hv-avs img.is-photo { object-fit: cover; padding: 0; }
.hv-mine #coll-count { min-width: 22px; font: 900 18px/1 var(--font-display); color: var(--fg-3); text-align: center; }
.hv-mine .hv-arrow { position: static; flex: none; width: 40px; background: var(--hv-btn); box-shadow: none; color: var(--fg); }
.hv-hero:active, .hv-tile:active, .hv-mine:active, .hv-gopt:active { scale: .97; }
.hv-hero.is-pop, .hv-tile.is-pop, .hv-gopt.is-pop, #btn-go-collection.is-bump { animation: btnPop .5s var(--ease-bounce); }
@media (max-height: 720px) { .hv { gap: 8px; } .hv-grid { gap: 8px; } .hv-mine { height: 56px; } .hv-avs img { width: 38px; height: 38px; } }
/* окошко «Игры»: Поиграть / Арена */
.hv-games { position: absolute; inset: 0; z-index: 30; display: grid; place-items: end center; padding: 16px 16px calc(var(--sab) + 16px); background: rgba(10, 10, 20, .35); animation: fadeIn .2s ease; }
.hv-games-card { width: min(100%, 440px); display: flex; flex-direction: column; gap: 10px; padding: 18px 14px 14px; border-radius: 30px; background: var(--hv-card); box-shadow: 0 20px 50px -20px rgba(0, 0, 0, .45); animation: bgmUp .3s var(--ease-bounce); }
.hv-games-h { margin: 0 4px 2px; font: 900 22px/1.1 var(--font-display); letter-spacing: -.02em; color: var(--fg); }
.hv-gopt { width: 100%; height: 84px; }
.hv-gopt .hv-tile-t { top: 50%; left: 20px; translate: 0 -50%; font-size: 24px; }
.hv-gopt .hv-arrow { top: 50%; right: 14px; translate: 0 -50%; }
.hv-gopt--play { --tb: #c1e7fd; } .hv-gopt--arena { --tb: #ffd9bf; }
/* фоновая музыка: маленькое меню под кнопкой с нотой, а не лист на весь экран */
#bgm-sheet.bgm-overlay { display: block; padding: 0; background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; animation: none; }
#bgm-sheet .bgm-sheet { position: fixed; top: var(--bgm-top, 70px); right: var(--bgm-right, 12px); width: auto; max-width: calc(100vw - 16px); padding: 10px; gap: 8px; border-radius: 24px; background: var(--hv-card); border: 1.5px solid var(--hv-line); box-shadow: 0 18px 40px -14px rgba(0, 0, 0, .35); animation: bgmDrop .22s var(--ease-bounce); transform-origin: calc(100% - var(--bgm-tip, 26px)) 0; }
@keyframes bgmDrop { from { opacity: 0; scale: .85; translate: 0 -8px; } }
#bgm-sheet .bgm-sheet::before { content: ''; position: absolute; top: -8px; right: calc(var(--bgm-tip, 26px) - 7px); width: 14px; height: 14px; rotate: 45deg; background: var(--hv-card); border-left: 1.5px solid var(--hv-line); border-top: 1.5px solid var(--hv-line); border-radius: 3px 0 0 0; }
#bgm-sheet .bgm-head { gap: 6px; padding: 0 4px; }
#bgm-sheet .bgm-head-ico, #bgm-sheet .bgm-close { display: none; }
#bgm-sheet .bgm-title { font: 800 14px/1.1 var(--font-display); color: var(--fg-2); }
#bgm-sheet .bgm-grid { display: flex; gap: 6px; }
#bgm-sheet .bgm-opt { flex-direction: column; justify-content: center; gap: 4px; width: 70px; min-height: 0; height: 76px; padding: 6px 2px; border-radius: 18px; text-align: center; box-shadow: none; }
#bgm-sheet .bgm-opt .bgm-name { font: 800 11.5px/1 var(--font-display); white-space: nowrap; overflow-wrap: normal; }
#bgm-sheet .bgm-mood .bgm-face { width: 36px; height: 36px; filter: none; }
#bgm-sheet .bgm-off { background: var(--hv-btn); color: var(--fg); }
#bgm-sheet .bgm-off .ico { width: 26px; height: 26px; }
#bgm-sheet .bgm-opt.is-on { box-shadow: 0 0 0 2.5px var(--hv-card), 0 0 0 5px var(--hv-blue); }
#bgm-sheet .bgm-opt.is-on .bgm-eq { right: 6px; top: 6px; height: 10px; }
/* другие разделы — в том же стиле: плоские круглые кнопки, жирные заголовки, синяя главная кнопка, пастельные цветные */
.bar .icon-btn, .bar .icon-btn.glass { background: var(--hv-btn); border: 0; box-shadow: none; }
.bar-title { font-weight: 900; font-size: clamp(18px, 5.2vw, 22px); letter-spacing: -.02em; }
.toggle-btn { border: 0; box-shadow: none; background: var(--hv-btn); }
.btn-lime { --b-mid: #0084fe; --b-deep: #0067c7; --b-deep2: rgba(0, 103, 199, .3); --b-ink: #fff; rotate: 0deg; border-radius: 22px; font-weight: 900; box-shadow: 0 5px 0 var(--b-deep), 0 12px 18px -12px var(--b-deep2); margin-bottom: 8px; }
.btn-lime:active { translate: 0 4px; box-shadow: 0 1px 0 var(--b-deep); }
.c-lime { --b-mid: #defcac; --b-deep: #b3d77a; --b-deep2: rgba(110, 150, 30, .25); --b-ink: #111114; }
.c-yellow { --b-mid: #ffe39a; --b-deep: #e3bd55; --b-deep2: rgba(200, 150, 30, .25); --b-ink: #111114; }
.c-violet { --b-mid: #e5defd; --b-deep: #c2b5f0; --b-deep2: rgba(110, 90, 200, .25); --b-ink: #111114; }
.c-pink { --b-mid: #fed8e5; --b-deep: #eeb1c7; --b-deep2: rgba(200, 90, 130, .25); --b-ink: #111114; }
.c-orange { --b-mid: #ffd9bf; --b-deep: #eeb38b; --b-deep2: rgba(200, 110, 50, .25); --b-ink: #111114; }
.c-sky { --b-mid: #c1e7fd; --b-deep: #8ccbf0; --b-deep2: rgba(40, 130, 200, .25); --b-ink: #111114; }
.dtool { border: 0; box-shadow: none; background: var(--hv-btn); }
.dtool.is-on { background: #c1e7fd; color: #111114; box-shadow: inset 0 0 0 2.5px var(--hv-blue); }
.metal-ico { color: #8a96a3; }
.metal-ico circle { fill: #e9edf2; }
.sheet, .loading-card { background: var(--hv-card); border: 1.5px solid var(--hv-line); box-shadow: 0 20px 50px -20px rgba(0, 0, 0, .4); }
.overlay { background: rgba(10, 10, 20, .45); }
.hv-hero-t { text-shadow: 0 2px 12px rgba(0, 50, 140, .45); }
.hv-hero-art { max-width: 54%; }
.hv-mine { gap: 8px; }
.hv-mine-t { font-size: clamp(15px, 4.4vw, 20px); }
.hv-avs { gap: 3px; }
.hv-avs img { width: 36px; height: 36px; }
@media (min-width: 420px) { .hv-avs img { width: 42px; height: 42px; } }
.hv-mine #coll-count { min-width: 0; }
/* «Назад» остаётся крупной и яркой (s180), но в цвете макета — синяя, ровная */
.screen .bar .icon-btn[data-back], #draw-back, #scr-color .bar .icon-btn[data-back] { rotate: 0deg; color: #fff; background: var(--hv-blue); border: 0; box-shadow: 0 5px 0 #0067c7; }
.screen .bar .icon-btn[data-back] .ico, #draw-back .ico, #scr-color .bar .icon-btn[data-back] .ico { filter: none; }
.screen .bar .icon-btn[data-back]:active, #draw-back:active, #scr-color .bar .icon-btn[data-back]:active { translate: 0 4px; box-shadow: 0 1px 0 #0067c7; }
/* 4 кисти для тела + ластик влезают в строку без прокрутки */
@media (pointer: coarse) {
  .dtool.dtool--big { width: min(80px, calc((100vw - 36px - 52px - 30px) / 4)); height: 62px; }
  .dtool.dtool--small { width: 52px; height: 52px; }
}

/* ===== s184 (Глеб 01.10): второй макет — пластилин, фетр, пена, бумага; фактуры на всех экранах (фактуры — menu/tex-*.webp, сделаны скриптом) ===== */
:root {
  --tex-felt: url("/menu/tex-felt.webp"); --tex-foam: url("/menu/tex-foam.webp"); --tex-clay: url("/menu/tex-clay.webp"); --tex-paper: url("/menu/tex-paper.webp");
  --ink: #1c2148; --felt: #232a58; --felt-2: #2b3266; --felt-3: #353d74; /* тёмная тема — ночной синий фетр, как клетка «Музыка» */
  --hv-btn: #2b3266; --hv-card: #262d5e; --hv-line: rgba(255, 255, 255, .1);
  --clay-w: #f6f2ea; --clay-ink: #141414;
  --clay-sh: inset 0 2px 2px rgba(255, 255, 255, .9), inset 0 -4px 7px rgba(90, 70, 40, .16), 0 4px 10px -4px rgba(40, 30, 20, .35);
}
:root[data-theme="light"] {
  --ink: #fbf8f1; --felt: #f6f1e7; --felt-2: #f3eee4; --felt-3: #e9e2d4;
  --line: rgba(60, 45, 20, .09); --line-2: #e6dfd1;
  --hv-btn: #f3eee4; --hv-card: #fffdf8; --hv-line: #ece5d6;
}
body { background-color: var(--ink); background-image: var(--tex-paper); background-size: 192px; background-blend-mode: soft-light; }
:root:not([data-theme="light"]) body { background-image: var(--tex-felt); background-size: 220px; }
/* главный */
.hv-title { line-height: 0; }
.hv-title-img { display: block; width: 100%; max-width: 430px; height: auto; pointer-events: none; }
.hv-title-txt, .hv-hero-txt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:root:not([data-theme="light"]) .hv-title-img { filter: invert(1) drop-shadow(0 3px 6px rgba(0, 0, 0, .35)); }
.hv { justify-content: flex-start; gap: clamp(10px, 1.6vh, 14px); }
.hv-mine { margin-top: auto; } /* «Мои монстры» — внизу, лишнее место над ней */
/* окошко «Игры»: на кнопках нарисовано, о чём они (Глеб 01.10) */
.hv-gopt { height: auto; aspect-ratio: 1024 / 501; }
.hv-gopt-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.hv-gopt .hv-tile-t { top: 14px; left: 18px; translate: none; font-size: clamp(24px, 7vw, 30px); }
.hv-gopt--play .hv-tile-t { color: #141414; text-shadow: 0 2px 0 rgba(255, 255, 255, .35), 0 4px 8px rgba(120, 80, 0, .25); }
.hv-gopt--arena .hv-tile-t { color: #fff; text-shadow: 0 3px 0 rgba(60, 30, 120, .45), 0 6px 14px rgba(30, 10, 80, .4); }
.hv-gopt .hv-arrow { display: none; }
/* s185 (Глеб 01.10): фон — тёмно-синий фетр (готовая картинка, без смешивания: на айфоне смешивание фона страницы не работает) */
html { background: #1e2454 url("/menu/bg-navy.webp") 0 0 / 256px repeat; }
:root[data-theme="light"] { background: #faf6ee url("/menu/bg-cream.webp") 0 0 / 256px repeat; }
html body { background: none !important; }
/* картинки главного растягиваются на весь экран: у них дорисован сверху запас фона, лишнее срезается сверху */
.hv { container-type: inline-size; --tw: calc((100cqw - 12px) / 2); }
.hv .hv-hero { flex: 0.62 1 0; aspect-ratio: auto; height: auto; min-height: calc(100cqw / 2.197); max-height: calc(100cqw / 1.6); }
.hv .hv-grid { flex: 1 1 0; gap: 12px; grid-template-rows: repeat(2, minmax(0, 1fr)); min-height: calc(var(--tw) / 1.274 * 2 + 12px); max-height: calc(var(--tw) / 0.95 * 2 + 12px); }
.hv .hv-tile { aspect-ratio: auto; height: auto; min-height: 0; }
.hv .hv-hero-art, .hv .hv-tile-art { object-fit: cover; object-position: 50% 100%; }
.screen--home .hv-games { position: fixed; inset: 0; }
.hv-gopt .hv-tile-t { white-space: normal; max-width: 58%; line-height: 1.02; }
/* s185: цвет конечностей — полоска пластилиновых кружков над лентами */
.limb-colors { flex: none; display: flex; gap: 7px; min-width: 0; overflow-x: auto; padding: 4px 6px 4px; scrollbar-width: none; }
#scr-color .col-card:nth-child(10), .col-card:nth-child(10) { grid-column: auto; }
/* s187 (Глеб 01.10): «первый экран анимированный — герои делают небольшое движение». Герой — отдельный слой поверх
   фона (вырезан скриптом, место под ним на фоне заделано), фон срезается сверху, как раньше картинка */
.hv-art { position: absolute; left: 0; right: 0; bottom: 0; aspect-ratio: var(--ar); pointer-events: none; }
.hv-art img { position: absolute; display: block; max-width: none; pointer-events: none; -webkit-user-drag: none; }
.hv-art .hv-bg { left: 0; top: 0; width: 100%; height: 100%; }
.hv-ch { will-change: transform; }
.hv-ch--draw { animation: hvCroc 3.6s ease-in-out infinite; }
.hv-ch--revive { animation: hvHop 2.8s ease-in-out infinite .4s; }
.hv-ch--color { animation: hvWobble 3.2s ease-in-out infinite .9s; }
.hv-ch--music { animation: hvBob 1.6s ease-in-out infinite .2s; }
.hv-ch--games { animation: hvSway 3s ease-in-out infinite 1.3s; }
@keyframes hvCroc { 0%, 100% { transform: rotate(0deg); } 30% { transform: rotate(-2deg) translateY(-1.2%); } 60% { transform: rotate(.6deg); } 80% { transform: rotate(-.6deg); } }
@keyframes hvHop { 0%, 60%, 100% { transform: translateY(0) scale(1, 1); } 20% { transform: translateY(0) scale(1.04, .95); } 35% { transform: translateY(-7%) scale(.97, 1.04); } 50% { transform: translateY(0) scale(1.03, .97); } }
@keyframes hvWobble { 0%, 100% { transform: rotate(0deg); } 25% { transform: rotate(-2.4deg) translateY(-1%); } 70% { transform: rotate(1.8deg); } }
@keyframes hvBob { 0%, 100% { transform: rotate(0deg) translateY(0); } 25% { transform: rotate(-2.5deg) translateY(-2%); } 50% { transform: rotate(0deg) translateY(0); } 75% { transform: rotate(2.5deg) translateY(-2%); } }
@keyframes hvSway { 0%, 100% { transform: rotate(-1.4deg); } 50% { transform: rotate(1.8deg) translateY(-2.5%); } }
@media (prefers-reduced-motion: reduce) { .hv-ch { animation: none !important; } }
/* s187: сила и вид на карточке монстра */
.mcard-traits { display: flex; flex-wrap: wrap; justify-content: center; gap: 5px; }
.mcard-traits .tr { font: 800 11px/1 var(--font-display); padding: 4px 8px 5px; border-radius: 999px; color: #141414; background: #f6f2ea; box-shadow: inset 0 1px 1px rgba(255, 255, 255, .8), inset 0 -2px 3px rgba(0, 0, 0, .12); }
.mcard--big .mcard-traits .tr { font-size: 12px; padding: 4px 9px 5px; }
.tr--weak { background: #cde9ff !important; } .tr--strong { background: #ffe39a !important; } .tr--super { background: #ff9a7a !important; }
.tr--scary { background: #3b3950 !important; color: #fff !important; } .tr--cute { background: #ffc2dc !important; } .tr--normal { background: #e9e2d4 !important; } /* s187: 12 раскрасок — ровно 3×4 */
#panel-parts.is-rows3.has-colors { --pi: clamp(52px, calc((100dvh - var(--sat) - var(--sab)) * .086), 76px); }
.limb-colors::-webkit-scrollbar { display: none; }
.limb-col { flex: none; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; cursor: pointer; background-color: var(--sw, #ccc); background-image: var(--tex-clay); background-size: 90px; background-blend-mode: soft-light; box-shadow: inset 0 2px 2px rgba(255, 255, 255, .5), inset 0 -3px 5px rgba(0, 0, 0, .2); transition: scale .15s var(--ease-bounce); }
.limb-col:active { scale: .9; }
.limb-col--auto { outline: 2px dashed rgba(255, 255, 255, .95); outline-offset: -7px; }
.limb-col.is-on { scale: 1.12; box-shadow: inset 0 2px 2px rgba(255, 255, 255, .5), 0 0 0 2.5px var(--ink), 0 0 0 5px var(--fg); } /* затемнение на весь экран, а не только на рамку экрана */
.hv-hero { flex: none; aspect-ratio: 978 / 456; min-height: 0; max-height: none; border-radius: 16px; background: #6d6fd9; box-shadow: 0 10px 22px -12px rgba(50, 40, 110, .55); }
.hv-hero-art { inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: 50% 50%; }
.hv-grid { flex: none; grid-template-rows: auto auto; gap: clamp(10px, 1.6vh, 14px); }
.hv-tile { aspect-ratio: 477 / 378; border-radius: 16px; box-shadow: 0 10px 20px -12px rgba(40, 30, 20, .45); }
.hv-tile--revive { --tb: #46602f; } .hv-tile--color { --tb: #f2a7c3; } .hv-tile--music { --tb: #1f2556; } .hv-tile--games { --tb: #f5df73; }
.hv-tile-art { inset: 0; left: 0; translate: none; width: 100%; height: 100%; object-fit: cover; }
.hv-tile .hv-tile-t, .hv-tile .hv-arrow { display: none; }
/* надписи нарисованы в картинках по-русски; в английском поверх — своя подпись */
html[lang="en"] .hv-tile .hv-tile-t { display: block; top: auto; bottom: 8px; left: 8px; right: auto; padding: 5px 11px 6px; border-radius: 999px; font-size: 15px; background: var(--clay-w); color: var(--clay-ink); box-shadow: 0 3px 8px -3px rgba(0, 0, 0, .4); }
html[lang="en"] .hv-hero .hv-hero-txt { clip: auto; overflow: visible; width: 43%; height: 27%; left: 2.8%; top: 60.5%; padding: 0; display: flex; z-index: 3; }
html[lang="en"] .hv-hero .hv-hero-t { display: none; }
html[lang="en"] .hv-hero .hv-start { width: 100%; height: 100%; justify-content: center; background: var(--clay-w); box-shadow: none; }
.hv-mine { height: 58px; border-radius: 16px; background-color: var(--hv-card); background-image: var(--tex-paper); background-size: 192px; background-blend-mode: soft-light; box-shadow: 0 8px 18px -12px rgba(40, 30, 20, .3); }
.hv-mine .hv-arrow { width: 34px; background: none; box-shadow: none; }
.hv-mine .hv-arrow .ico { width: 72%; height: 72%; stroke-width: 3.2; }
.hv-avs img { width: 38px; height: 38px; }
@media (min-width: 420px) { .hv-avs img { width: 44px; height: 44px; } }
.hv-gopt { border-radius: 18px; background-color: var(--tb); background-image: var(--tex-foam); background-size: 180px; background-blend-mode: soft-light; box-shadow: inset 0 2px 2px rgba(255, 255, 255, .4), 0 6px 14px -8px rgba(0, 0, 0, .4); }
.hv-gopt--play { --tb: #f5df73; } .hv-gopt--arena { --tb: #6d6fd9; color: #fff; }
.hv-gopt--arena .hv-arrow { background: var(--clay-w); }
/* пластилиновые кнопки: белый пластилин — круглые кнопки шапки, «назад», инструменты */
.screen--home .toggle-btn, .screen--home .home-top .icon-btn, .toggle-btn, .bar .icon-btn:not([data-back]), .canvas-btn, .dtool,
.screen .bar .icon-btn[data-back], #draw-back, #draw-home, #scr-color .bar .icon-btn[data-back], .hv-arrow {
  background-color: var(--clay-w); background-image: var(--tex-clay); background-size: 140px; background-blend-mode: soft-light;
  color: var(--clay-ink); border: 0; box-shadow: var(--clay-sh);
  -webkit-backdrop-filter: none; backdrop-filter: none;
}
.screen .bar .icon-btn[data-back], #draw-back, #draw-home, #scr-color .bar .icon-btn[data-back] { border-radius: 50%; rotate: 0deg; box-shadow: inset 0 3px 3px rgba(255, 255, 255, .95), inset 0 -6px 10px rgba(90, 70, 40, .18), 0 6px 14px -6px rgba(40, 30, 20, .45); }
.screen .bar .icon-btn[data-back]:active, #draw-back:active, #scr-color .bar .icon-btn[data-back]:active { translate: 0 3px; box-shadow: inset 0 3px 3px rgba(255, 255, 255, .95), inset 0 -3px 6px rgba(90, 70, 40, .18), 0 2px 6px -3px rgba(40, 30, 20, .45); }
.screen--home .bgm-btn.is-on { background-color: #8ad43f; color: #10240a; }
.dtool.is-on { background-color: #f7d64c; color: #2a1c00; box-shadow: inset 0 2px 2px rgba(255, 255, 255, .6), inset 0 -4px 7px rgba(0, 0, 0, .16), 0 0 0 3px var(--clay-ink); }
/* большие кнопки — цветной пластилин «колбаской», как «Начать» */
.btn-lime { --b-mid: #8ad43f; --b-ink: #10240a; background-color: var(--b-mid); background-image: var(--tex-clay); background-size: 160px; background-blend-mode: soft-light; box-shadow: inset 0 3px 3px rgba(255, 255, 255, .55), inset 0 -7px 12px rgba(0, 0, 0, .16), 0 7px 14px -7px rgba(0, 0, 0, .45); margin-bottom: 6px; }
.btn-lime:not(.btn-lime--tile) { border-radius: 999px; }
.btn-lime--tile { border-radius: 22px; }
.btn-lime:active { translate: 0 3px; box-shadow: inset 0 3px 3px rgba(255, 255, 255, .5), inset 0 -4px 8px rgba(0, 0, 0, .16), 0 3px 8px -5px rgba(0, 0, 0, .45); }
.c-lime { --b-mid: #8ad43f; --b-ink: #10240a; }
.c-yellow { --b-mid: #f7d64c; --b-ink: #2a1c00; }
.c-violet { --b-mid: #7f78ea; --b-ink: #fff; }
.c-pink { --b-mid: #f4a3c4; --b-ink: #3d0a2c; }
.c-orange { --b-mid: #ff9a52; --b-ink: #2a1200; }
.c-sky { --b-mid: #6db8f2; --b-ink: #06243f; }
/* карточки — бумага, пена, фетр */
.sheet, .loading-card, .hv-games-card, #bgm-sheet .bgm-sheet, .coll-card { background-color: var(--hv-card); background-image: var(--tex-paper); background-size: 192px; background-blend-mode: soft-light; }
.task-card { background-image: var(--tex-paper); background-size: 192px; background-blend-mode: soft-light; }
.drop { background-image: var(--tex-foam); background-size: 180px; background-blend-mode: soft-light; }
/* s199 (Глеб 03.10: «почему они стали тёмными и некрасивыми»): серая текстура-пена на айфоне ложилась тёмным слоем — убрана */
#scr-revive .rv-card { border-radius: 22px; rotate: 0deg; background: radial-gradient(120% 90% at 18% 0%, rgba(255, 255, 255, .5), transparent 55%), linear-gradient(160deg, var(--card), var(--card-2)); background-blend-mode: normal; }
.music-song { background: var(--tex-foam) 0 0 / 160px, radial-gradient(120% 95% at 30% 18%, var(--t1), var(--t2) 72%); background-blend-mode: soft-light, normal; }
#bgm-sheet .bgm-opt { background-image: var(--tex-clay); background-size: 120px; background-blend-mode: soft-light; box-shadow: inset 0 2px 2px rgba(255, 255, 255, .7), inset 0 -4px 6px rgba(0, 0, 0, .12); }
#bgm-sheet .bgm-opt.is-on { box-shadow: inset 0 2px 2px rgba(255, 255, 255, .7), 0 0 0 2.5px var(--hv-card), 0 0 0 5px var(--clay-ink); }
:root:not([data-theme="light"]) #bgm-sheet .bgm-opt.is-on { box-shadow: 0 0 0 2.5px var(--hv-card), 0 0 0 5px #fff; }

/* s188 (01.10, iPhone 17 Pro Max, веб-приложение с экрана «Домой»: «поля» слева, справа и снизу на всех экранах).
   Причина: айфон показывал страницу в масштабе 85% (кнопки на снимке ровно на 15% меньше) — ширина страницы ~517
   вместо 440, а приложение было не шире 480: по бокам поля; высоту айфон отдавал без полосы с часами: снизу полоса.
   Теперь на телефоне приложение всегда во всю ширину, а в веб-приложении — до самого низа экрана: класс fill-screen
   ставит скрипт в index.html (айфон, веб-приложение). 02.10, замеры с телефонов: айфон рисует только высоту страницы,
   поэтому до низа (100lvh — весь экран) растянута и сама страница, а прокрутить её нельзя. Окна, просмотр фото,
   тосты, конфетти и «Во что играем?» отсчитывают края от body (contain), поэтому тоже до низа. На компьютере — как было. */
@media (pointer: coarse) { #app { max-width: none; } }
html.fill-screen { height: 100vh; height: 100lvh; overflow: hidden; }
html.fill-screen body { position: fixed; top: 0; left: 0; right: 0; bottom: auto; width: 100%; height: 100vh; height: 100lvh; contain: layout; }
/* s188: приложение нельзя сдвинуть. С overflow: hidden браузер сам прокручивал #app вбок и вниз (выбор детали в
   рисовании центрирует ленту, фокус поля ввода) — сбоку или снизу оставалась полоса фона на всех экранах до
   перезапуска. clip режет так же, но прокрутить #app (и body на телефоне) больше нельзя; ленты листаются как раньше. */
#app { overflow: clip; }
@media (pointer: coarse) { body { overflow: clip; } }

/* s189 (Глеб 02.10): заставка при запуске (js/hello.js) по картинке-примеру — в темноте два больших белых глаза с чёрными
   зрачками (как у «М» в названии) и «Миша, привет! Здесь живут твои монстры». Чёрный слой — прежний .splash. */
.splash.is-run { animation: splashSafety2 .4s ease 13s forwards; cursor: pointer; } /* ждёт касания до 9 с (js/hello.js) */
.hello { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0 24px calc(var(--sab) + 30px); text-align: center; color: #fff; pointer-events: none; }
.hello-eyes { display: flex; gap: 6px; transition: scale .5s cubic-bezier(.55, 0, .9, .45), opacity .4s ease; }
.hello.is-open .hello-eyes { animation: helloPop .55s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes helloPop { from { scale: .55; } }
.hello-eye { position: relative; display: block; width: min(28vw, 140px); aspect-ratio: 1; border-radius: 50%; background: #fff; clip-path: inset(50% 0% 50% 0%); transition: clip-path .3s cubic-bezier(.3, 1.3, .5, 1); }
.hello.is-open .hello-eye { clip-path: inset(0% 0% 0% 0%); }
.hello-pupil { position: absolute; inset: 0; margin: auto; display: block; width: 36%; height: 36%; border-radius: 50%; background: #000; will-change: transform; }
/* текста нет (Глеб 02.10) — под глазами качается ладошка «коснись»: после касания здоровается Таня */
.hello-tap { display: block; width: 64px; height: 64px; margin-top: clamp(34px, 10vw, 54px); opacity: 0; transition: opacity .45s ease; }
.hello-tap.is-on { opacity: .9; animation: helloTap 1.3s ease-in-out infinite; }
.hello-tap svg { display: block; width: 100%; height: 100%; fill: none; stroke: #fff; stroke-width: 3.4; stroke-linecap: round; stroke-linejoin: round; }
@keyframes helloTap { 0%, 100% { translate: 0 0; scale: 1; } 40% { translate: 0 7px; scale: .9; } }
.splash.is-out .hello-eyes { scale: 1.8; opacity: 0; }
.splash.is-out .hello-tap { opacity: 0; animation: none; }
@media (prefers-reduced-motion: reduce) { .hello.is-open .hello-eyes { animation: none; } .splash.is-out .hello-eyes { scale: 1; } }

/* s189 (Глеб 02.10: «не надо подписывать смайлики»): в меню фоновой музыки — только смайлики, крупнее (название —
   для голосовой подсказки, aria-label в js/bgm.js); «Выключить» целиком влезает в кнопку */
#bgm-sheet .bgm-mood .bgm-name { display: none; }
#bgm-sheet .bgm-mood .bgm-face { width: 48px; height: 48px; }
#bgm-sheet .bgm-off .bgm-name { font-size: 10.5px; letter-spacing: -.01em; }

/* s189 (Глеб 02.10: «максимум на арене только 7 монстров»): поле полное — остальные в ленте бледные */
.arena-tray.is-full .arena-mon:not(.is-out) { opacity: .45; }

/* s189 (Глеб 02.10: «категорию игры замени на арену, из фото в игрушку убери»): четвёртая клетка главного — сразу
   «Арена» (картинка из окошка «Во что играем?», надпись — текстом, как нарисованные на других клетках) */
.hv-tile--arena { --tb: #6d6fd9; }
.hv-tile--arena .hv-tile-art { object-position: 86% 50%; }
.hv-tile.hv-tile--arena .hv-tile-t, html[lang="en"] .hv-tile.hv-tile--arena .hv-tile-t { display: block; top: 20%; bottom: auto; left: 14px; right: auto; padding: 0; border-radius: 0; background: none; box-shadow: none; color: #fff; font: 900 clamp(26px, 7.8vw, 38px)/1 var(--font-display); letter-spacing: -.02em; text-shadow: 0 3px 0 rgba(40, 20, 110, .55), 0 8px 18px rgba(20, 10, 70, .45); }

/* s189 (Глеб 02.10: «когда рисуешь монстра нужен также выбор голоса, где выбираешь имя»): на шаге «имя» под именами —
   голоса (те же, что в «Поиграть»); выбранный голос сохраняется в карточке монстра */
#panel-name { flex-wrap: wrap; }
#panel-name .draw-voices { flex: 1 1 100%; order: 3; gap: 4px; padding: 2px 2px 8px; }
#panel-name .draw-voices .vopt { width: 52px; }
#panel-name .draw-voices .vopt .face { width: 48px; height: 48px; }

/* s190 (Глеб 02.10): «Забота о монстре» — под шапкой экрана «Поиграть» 4 кружка: еда, купание, сон, ласка (js/care.js).
   Кольцо — сколько осталось (зелёное, жёлтое, красное); красный кружок качается: монстру этого не хватает.
   Касание — сразу забота: еда падает ко рту, пузыри, подушка, обнимашки. */
.care-row { position: absolute; z-index: 5; left: 50%; top: calc(var(--sat) + 74px); translate: -50% 0; display: flex; gap: 8px; }
.care-need { position: relative; width: 50px; height: 50px; padding: 0; border: 0; border-radius: 50%; cursor: pointer; background: conic-gradient(var(--cc, #3ccf4e) calc(var(--v, 1) * 360deg), rgba(255, 255, 255, .28) 0); box-shadow: 0 4px 10px -4px rgba(0, 0, 0, .55); transition: scale .15s var(--ease-bounce), background .4s; }
.care-need::before { content: ""; position: absolute; inset: 4px; border-radius: 50%; background-color: var(--clay-w, #f6f2ea); background-image: var(--tex-clay); background-size: 120px; background-blend-mode: soft-light; }
.care-need img { position: absolute; inset: 9px; width: calc(100% - 18px); height: calc(100% - 18px); object-fit: contain; pointer-events: none; }
.care-need:active { scale: .9; }
.care-need.is-low { animation: careLow 1.1s ease-in-out infinite; }
.care-need.is-pop { animation: btnPop .5s var(--ease-bounce); }
@keyframes careLow { 0%, 100% { rotate: 0deg; } 25% { rotate: -9deg; } 75% { rotate: 9deg; } }
/* «Говорящий монстр»: большая кнопка с микрофоном слева над лентой предметов (js/talkback.js); пока слушает —
   красная, а кольцо вокруг растёт от громкости голоса */
.play-mic { position: absolute; z-index: 6; left: 14px; bottom: calc(var(--sab) + 124px); display: grid; place-items: center; width: 72px; height: 72px; padding: 0; border: 0; border-radius: 50%; cursor: pointer; color: #fff; background: linear-gradient(180deg, #ffa36e, #ff6a2f); box-shadow: inset 0 3px 0 rgba(255, 255, 255, .45), 0 6px 0 #b8400d, 0 10px 18px -6px rgba(0, 0, 0, .45); transition: translate .12s, box-shadow .12s, opacity .2s; }
.play-mic .ico { width: 36px; height: 36px; stroke-width: 2.6; }
.play-mic:active { translate: 0 4px; box-shadow: inset 0 3px 0 rgba(255, 255, 255, .45), 0 2px 0 #b8400d; }
.play-mic.is-rec { background: linear-gradient(180deg, #ff6b7a, #e3263b); box-shadow: 0 0 0 calc(5px + var(--lv, 0) * 22px) rgba(255, 70, 90, .35), inset 0 3px 0 rgba(255, 255, 255, .4), 0 6px 0 #9c1626; animation: micRec 1s ease-in-out infinite; }
.play-mic.is-play { opacity: .55; pointer-events: none; }
@keyframes micRec { 50% { scale: 1.06; } }
/* s190 (Глеб 02.10: «2 новых ячейки с новыми играми внизу главной»): над «Мои монстры» — «Говорилка» и «Забота»,
   обе сразу открывают площадку с последним монстром. Кому-то из монстров плохо — сердечко на «Заботе» качается */
.hv .hv-row2 { flex: none; display: grid; grid-template-columns: 1fr 1fr; gap: clamp(10px, 1.6vh, 14px); margin-top: auto; }
.hv .hv-row2 + .hv-mine { margin-top: 0; }
.hv-mini { position: relative; display: flex; align-items: center; gap: 10px; min-width: 0; height: 62px; padding: 0 10px 0 8px; border: 0; border-radius: 16px; cursor: pointer; text-align: left; color: #141414; background-color: var(--tb); background-image: var(--tex-foam); background-size: 180px; background-blend-mode: soft-light; box-shadow: inset 0 2px 2px rgba(255, 255, 255, .4), 0 6px 14px -8px rgba(0, 0, 0, .4); transition: scale .18s var(--ease-bounce); }
.hv-mini:active { scale: .96; }
.hv-mini--talk { --tb: #ffd9bf; }
.hv-mini--care { --tb: #fed8e5; }
.hv-mini-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 900 clamp(16px, 4.6vw, 20px)/1 var(--font-display); letter-spacing: -.02em; }
.hv-mini-ico { flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; }
.hv-mini--talk .hv-mini-ico { color: #fff; background: linear-gradient(180deg, #ffa36e, #ff6a2f); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .45), 0 3px 0 #b8400d; }
.hv-mini--talk .hv-mini-ico .ico { width: 26px; height: 26px; stroke-width: 2.6; }
.hv-mini--care .hv-mini-ico { background: #fff url("/items/heart.webp") center / 68% no-repeat; box-shadow: 0 3px 0 rgba(0, 0, 0, .12); }
.hv-mini.needs-care .hv-mini-ico { animation: careLow 1.1s ease-in-out infinite; }
.hv-mini.is-pop { animation: btnPop .5s var(--ease-bounce); }
.play-mic.is-pop { animation: btnPop .6s var(--ease-bounce) 2; }
/* с новой строкой главный обязан влезать без прокрутки и на iPhone 16 в Safari (~393×700): большая кнопка и клетки
   по высоте ужимаются, когда места мало (картинки в них срезаются сверху, как и раньше), а где места хватает — как было */
.hv .hv-hero { flex: 1 1 0; min-height: 152px; } /* забирает всё свободное место (до прежнего максимума), а когда тесно — ниже */
.hv .hv-grid { flex: 0 1 calc(var(--tw) / 1.262 * 2 + 14px); min-height: 0; grid-template-rows: repeat(2, minmax(0, 1fr)); }
.hv .hv-tile { aspect-ratio: auto; height: auto; min-height: 0; }
/* низкий экран (Safari с панелями): новые кнопки, «Мои монстры» и промежутки поменьше — клеткам остаётся их высота */
@media (max-height: 740px) {
  .hv, .hv .hv-grid, .hv .hv-row2 { gap: 8px; }
  .hv-mini { height: 50px; }
  .hv-mini-ico { width: 40px; height: 40px; }
  .hv .hv-mine { height: 50px; }
}

/* ===== s191 (Глеб 02.10): «Звонок» и «Больница» — новые игры (js/call.js, js/doctor.js) и их клетки на главном ===== */
/* главный: третий ряд клеток — «Звонок» и «Больница», такие же, как остальные */
.hv .hv-grid { flex-basis: calc(var(--tw) / 1.262 * 3 + 28px); max-height: none; grid-template-rows: repeat(3, minmax(0, 1fr)); }
.hv .hv-hero { min-height: 136px; }
/* большая кнопка стала ниже картинки — срезаем поровну сверху и снизу вокруг надписи и «Начать», а не только сверху */
.hv .hv-hero .hv-art { top: 58%; bottom: auto; translate: 0 -58%; }
.hv-tile--call { --tb: #f5c44a; }
.hv-tile--call .hv-tile-art { object-position: 84% 70%; }
.hv-tile--doctor { --tb: #dff5f0; }
.hv-doc-art { position: absolute; inset: 0; z-index: 1; overflow: hidden; background: linear-gradient(180deg, #e6f8f3 0 66%, #c3e4ee 66% 100%); pointer-events: none; }
.hv-doc-art .hv-doc-cross { position: absolute; left: 7%; top: 37%; width: 18%; aspect-ratio: 1; border-radius: 22%; background: #fff; box-shadow: 0 4px 10px -4px rgba(0, 0, 0, .25); }
.hv-doc-art .hv-doc-cross::before, .hv-doc-art .hv-doc-cross::after { content: ""; position: absolute; left: 50%; top: 50%; width: 70%; height: 24%; translate: -50% -50%; border-radius: 4px; background: #ff4d4d; }
.hv-doc-art .hv-doc-cross::after { rotate: 90deg; }
.hv-doc-art img { position: absolute; right: 6%; bottom: 4%; height: 62%; width: auto; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .25)); }
.hv-doc-art .hv-doc-emo { position: absolute; font-size: clamp(20px, 6vw, 30px); line-height: 1; filter: drop-shadow(0 3px 3px rgba(0, 0, 0, .2)); }
.hv-tile.hv-tile--call .hv-tile-t, .hv-tile.hv-tile--doctor .hv-tile-t, html[lang="en"] .hv-tile.hv-tile--call .hv-tile-t, html[lang="en"] .hv-tile.hv-tile--doctor .hv-tile-t {
  display: block; z-index: 2; top: 18%; bottom: auto; left: 14px; right: auto; padding: 0; border-radius: 0; background: none; box-shadow: none;
  font: 900 clamp(24px, 7.4vw, 36px)/1 var(--font-display); letter-spacing: -.02em; color: #fff; text-shadow: 0 3px 0 rgba(120, 70, 0, .45), 0 8px 18px rgba(80, 40, 0, .35);
}
.hv-tile.hv-tile--doctor .hv-tile-t, html[lang="en"] .hv-tile.hv-tile--doctor .hv-tile-t { color: #13304a; text-shadow: 0 2px 0 rgba(255, 255, 255, .8); }
/* общий выбор монстра: «Кому позвоним?», «Кого лечим?» */
.call-pick, .doc-pick { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.call-pick[hidden], .doc-pick[hidden] { display: none; }
.pick-grid { flex: 1; min-height: 0; overflow-y: auto; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 8px; align-content: start; padding: 16px 2px 12px; scrollbar-width: none; }
.pick-grid::-webkit-scrollbar { display: none; }
.pick-mon { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; padding: 0; border: 0; background: none; cursor: pointer; color: var(--fg); font: 800 14px/1.1 var(--font-display); transition: scale .18s var(--ease-bounce); }
.pick-mon:active { scale: .93; }
.pick-mon-ava { display: grid; place-items: center; width: clamp(86px, 26vw, 116px); aspect-ratio: 1; border-radius: 50%; overflow: hidden; background-color: var(--hv-card); background-image: var(--tex-paper); background-size: 192px; background-blend-mode: soft-light; box-shadow: inset 0 0 0 3px var(--hv-line), 0 8px 16px -10px rgba(0, 0, 0, .5); }
.pick-mon-ava img { width: 86%; height: 86%; object-fit: contain; pointer-events: none; }
.pick-mon-name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-empty { grid-column: 1 / -1; margin: 28px 12px 8px; text-align: center; color: var(--fg-2); font: 800 18px/1.3 var(--font-display); }
.pick-grid > .btn-lime { grid-column: 1 / -1; justify-self: center; width: auto; padding: 0 30px; }
/* «Звонок»: видеозвонок на весь экран */
.call-live { position: absolute; inset: 0; z-index: 4; overflow: hidden; background: #2a2433; color: #fff; }
.call-live[hidden] { display: none; }
.call-bg { position: absolute; inset: 0; width: 100%; height: 100%; filter: blur(1.5px) saturate(1.1); transform: scale(1.05); }
.call-cam { position: absolute; inset: 0; animation: camSway 7s ease-in-out infinite; }
@keyframes camSway { 0%, 100% { transform: translate(0, 0) rotate(0deg); } 25% { transform: translate(-6px, 4px) rotate(-.6deg); } 50% { transform: translate(4px, -3px) rotate(.4deg); } 75% { transform: translate(6px, 5px) rotate(.7deg); } }
.call-mon { position: absolute; left: calc(50% - min(61vw, 290px)); top: calc(var(--sat) + 64px); width: min(122vw, 580px); height: auto; margin: 0; transform-origin: 50% 30%; filter: drop-shadow(0 16px 26px rgba(0, 0, 0, .35)); pointer-events: none; transition: opacity .5s ease; }
.call-live.is-ringing .call-mon { opacity: 0; }
.call-live.is-talk .call-mon { animation: callTalk .32s ease-in-out infinite; }
@keyframes callTalk { 0%, 100% { scale: 1 1; translate: 0 0; } 50% { scale: 1.015 .975; translate: 0 1%; } }
.call-live.is-wait .call-mon { animation: callListen 1.8s ease-in-out infinite; }
@keyframes callListen { 0%, 100% { rotate: 0deg; } 50% { rotate: -2.5deg; } }
.call-ring { position: absolute; left: 0; right: 0; top: 26%; display: none; justify-content: center; }
.call-live.is-ringing .call-ring { display: flex; }
.call-ring-ava { position: relative; display: grid; place-items: center; width: 156px; height: 156px; border-radius: 50%; background: rgba(255, 255, 255, .94); box-shadow: 0 12px 30px rgba(0, 0, 0, .35); }
.call-ring-ava img { width: 82%; height: 82%; object-fit: contain; pointer-events: none; }
.call-ring-ava::before, .call-ring-ava::after { content: ""; position: absolute; inset: -10px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .75); animation: ringPulse 1.6s ease-out infinite; }
.call-ring-ava::after { animation-delay: .8s; }
@keyframes ringPulse { from { scale: 1; opacity: .9; } to { scale: 1.6; opacity: 0; } }
.call-top { position: absolute; left: 0; right: 0; top: calc(var(--sat) + 16px); display: flex; flex-direction: column; align-items: center; gap: 4px; text-shadow: 0 2px 8px rgba(0, 0, 0, .6); pointer-events: none; }
.call-live.is-ringing .call-top { top: calc(26% + 176px); }
.call-name { max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 900 26px/1.1 var(--font-display); }
.call-state { font: 700 16px/1 var(--font-body); opacity: .92; font-variant-numeric: tabular-nums; }
.call-self { position: absolute; right: 14px; top: calc(var(--sat) + 14px); display: grid; place-items: center; width: 90px; height: 122px; border-radius: 18px; overflow: hidden; background: linear-gradient(160deg, #6db8f2, #7f78ea); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .7), 0 8px 20px rgba(0, 0, 0, .4); }
.call-self video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); opacity: 0; }
.call-self.has-video video { opacity: 1; }
.call-self-ph { font-size: 44px; line-height: 1; }
.call-self.has-video .call-self-ph { display: none; }
.call-listen { position: absolute; left: 50%; bottom: calc(var(--sab) + 128px); translate: -50% 0; display: none; align-items: center; gap: 5px; height: 40px; padding: 0 16px; border-radius: 999px; background: rgba(0, 0, 0, .38); }
.call-live.is-wait .call-listen { display: flex; }
.call-listen i { width: 6px; height: 8px; border-radius: 3px; background: #fff; animation: listenBar .9s ease-in-out infinite; }
.call-listen i:nth-child(2) { animation-delay: -.3s; }
.call-listen i:nth-child(3) { animation-delay: -.6s; }
@keyframes listenBar { 50% { height: 22px; } }
.call-bar { position: absolute; left: 0; right: 0; bottom: calc(var(--sab) + 26px); display: flex; justify-content: center; align-items: center; gap: 28px; }
.call-btn { display: grid; place-items: center; width: 62px; height: 62px; padding: 0; border: 0; border-radius: 50%; cursor: pointer; color: #fff; background: rgba(255, 255, 255, .24); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 6px 16px rgba(0, 0, 0, .3); transition: scale .15s var(--ease-bounce); }
.call-btn .ico { width: 30px; height: 30px; stroke-width: 2.2; }
.call-btn .slash { display: none; }
.call-btn.is-off { color: #1d1a16; background: rgba(255, 255, 255, .9); }
.call-btn.is-off .slash { display: inline; }
.call-btn--end { width: 78px; height: 78px; background: #ff3b30; }
.call-btn--end .ico { width: 38px; height: 38px; }
.call-btn:active { scale: .9; }
.call-end { position: absolute; inset: 0; z-index: 6; display: grid; place-content: center; justify-items: center; gap: 8px; background: rgba(20, 18, 26, .84); color: #fff; animation: fadeIn .25s ease; }
.call-end[hidden] { display: none; }
.call-end b { font: 900 26px/1.1 var(--font-display); }
.call-end-time { font: 700 17px/1 var(--font-body); opacity: .85; font-variant-numeric: tabular-nums; }
/* «Больница»: палата, монстр на кровати, больное место мигает, внизу аптечка */
.doc-room { position: absolute; inset: 0; z-index: 4; overflow: hidden; background: linear-gradient(180deg, #e3f7f2 0%, #d2f0e8 64%, #bcdcea 64%, #a8cde0 100%); }
.doc-room[hidden] { display: none; }
.doc-window { position: absolute; left: 7%; top: calc(var(--sat) + 120px); width: 28%; aspect-ratio: 1.1; border-radius: 14px; background: linear-gradient(180deg, #9fd8ff, #dff3ff); box-shadow: inset 0 0 0 6px #fff, 0 6px 14px -6px rgba(0, 0, 0, .25); }
.doc-window::before { content: ""; position: absolute; left: 50%; top: 6px; bottom: 6px; width: 5px; translate: -50% 0; background: #fff; }
.doc-window::after { content: ""; position: absolute; top: 50%; left: 6px; right: 6px; height: 5px; translate: 0 -50%; background: #fff; }
.doc-cross { position: absolute; right: 8%; top: calc(var(--sat) + 124px); width: 62px; height: 62px; border-radius: 16px; background: #fff; box-shadow: 0 6px 14px -6px rgba(0, 0, 0, .25); }
.doc-cross::before, .doc-cross::after { content: ""; position: absolute; left: 50%; top: 50%; width: 42px; height: 13px; translate: -50% -50%; border-radius: 4px; background: #ff4d4d; }
.doc-cross::after { rotate: 90deg; }
.doc-bed { position: absolute; left: 50%; bottom: calc(var(--sab) + 140px); width: min(84vw, 380px); height: 74px; translate: -50% 0; border-radius: 24px 24px 14px 14px; background: linear-gradient(180deg, #fff, #e4edf5); box-shadow: 0 12px 20px -10px rgba(0, 0, 0, .35); }
.doc-bed::before { content: ""; position: absolute; left: 8%; top: -16px; width: 28%; height: 30px; border-radius: 16px; background: #fff; box-shadow: 0 3px 6px rgba(0, 0, 0, .12); }
.doc-mon-box { position: absolute; left: 50%; bottom: calc(var(--sab) + 186px); width: 240px; translate: -50% 0; }
.doc-mon { display: block; width: 100%; height: auto; filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .25)); pointer-events: none; }
.doc-mon-box.is-sick .doc-mon { animation: docShiver 2.2s ease-in-out infinite; filter: saturate(.8) drop-shadow(0 10px 14px rgba(0, 0, 0, .25)); }
@keyframes docShiver { 0%, 30%, 100% { rotate: 0deg; } 10% { rotate: -1.6deg; } 20% { rotate: 1.6deg; } }
.doc-mon-box.is-hop { animation: docHop .6s var(--ease-bounce); }
@keyframes docHop { 40% { translate: -50% -12%; } }
.doc-mon-box.is-nope { animation: docNope .45s ease; }
@keyframes docNope { 20% { translate: calc(-50% - 10px) 0; } 40% { translate: calc(-50% + 10px) 0; } 60% { translate: calc(-50% - 6px) 0; } 80% { translate: calc(-50% + 4px) 0; } }
.doc-mon-box.is-well .doc-mon { animation: docWell 1s ease-in-out infinite; }
@keyframes docWell { 50% { scale: 1.06; rotate: 3deg; } }
.doc-mark { position: absolute; width: 58px; height: 58px; translate: -50% -50%; display: none; place-items: center; border-radius: 50%; font-size: 30px; line-height: 1; background: radial-gradient(circle, rgba(255, 60, 60, .9) 0 30%, rgba(255, 60, 60, .35) 55%, transparent 72%); animation: markPulse 1s ease-in-out infinite; pointer-events: none; }
.doc-mark.is-on { display: grid; }
.doc-mark.is-emoji { background: radial-gradient(circle, rgba(255, 120, 60, .5) 0 45%, transparent 72%); }
.doc-mark.is-on:not(.is-emoji)::after { content: "!"; color: #fff; font: 900 26px/1 var(--font-display); }
@keyframes markPulse { 50% { scale: 1.25; } }
.doc-stickers { position: absolute; inset: 0; pointer-events: none; }
.doc-sticker { position: absolute; translate: -50% -50%; font-size: 34px; line-height: 1; rotate: -18deg; animation: btnPop .4s var(--ease-bounce); }
.doc-sticker.is-label { rotate: 0deg; translate: -50% -170%; padding: 6px 10px; border-radius: 999px; color: #fff; background: #ff5c4d; font: 900 18px/1 var(--font-display); }
.doc-bubble { position: absolute; left: 16px; right: 16px; top: calc(var(--sat) + 70px); width: fit-content; max-width: calc(100% - 32px); margin: 0 auto; padding: 10px 16px; border-radius: 18px; color: #1d1a16; background: #fff; font: 800 18px/1.25 var(--font-display); text-align: center; box-shadow: 0 8px 18px -10px rgba(0, 0, 0, .45); opacity: 0; translate: 0 8px; transition: opacity .25s, translate .3s; pointer-events: none; }
.doc-bubble.is-on { opacity: 1; translate: 0 0; }
.doc-prog { position: absolute; left: 0; right: 0; top: calc(var(--sat) + 22px); display: flex; justify-content: center; gap: 8px; pointer-events: none; }
.doc-prog i { width: 28px; height: 28px; border-radius: 50%; background: rgba(255, 255, 255, .75) url("/items/heart.webp") center / 68% no-repeat; filter: grayscale(1); opacity: .5; }
.doc-prog i.is-done { filter: none; opacity: 1; animation: btnPop .5s var(--ease-bounce); }
.doc-tray { position: absolute; left: 10px; right: 10px; bottom: calc(var(--sab) + 14px); display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; padding: 10px 8px; border-radius: 26px; background-color: var(--hv-card); background-image: var(--tex-paper); background-size: 192px; background-blend-mode: soft-light; box-shadow: 0 10px 24px -12px rgba(0, 0, 0, .45); }
.doc-tool { aspect-ratio: 1; display: grid; place-items: center; padding: 0; border: 0; border-radius: 18px; cursor: pointer; background-color: var(--clay-w, #f6f2ea); background-image: var(--tex-clay); background-size: 120px; background-blend-mode: soft-light; box-shadow: var(--clay-sh); font-size: clamp(26px, 8vw, 36px); line-height: 1; transition: scale .15s var(--ease-bounce); }
.doc-tool:active { scale: .9; }
.doc-tool.is-hint { animation: careLow 1s ease-in-out infinite; box-shadow: 0 0 0 3px #3ccf4e, var(--clay-sh); }
.doc-fly { position: fixed; z-index: 60; translate: -50% -50%; font-size: 46px; line-height: 1; pointer-events: none; transition: transform .45s cubic-bezier(.3, .7, .4, 1); filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .3)); }
.doc-fly.is-use { animation: flyUse .4s ease-in-out; }
@keyframes flyUse { 50% { rotate: -25deg; } }
.doc-done { position: absolute; left: 16px; right: 16px; bottom: calc(var(--sab) + 120px); z-index: 6; display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: 26px; background-color: var(--hv-card); background-image: var(--tex-paper); background-size: 192px; background-blend-mode: soft-light; box-shadow: 0 16px 34px -14px rgba(0, 0, 0, .5); animation: bgmUp .32s var(--ease-bounce); }
.doc-done[hidden] { display: none; }

/* s192 (Глеб 02.10): главный экран — «иконки вверху слишком маленькие», «Нарисовать монстра обрезалось», «Мои монстры
   крупнее и сами плашки больше, так чтобы можно было пролистнуть вниз», «текст на иконках меньше, шрифт везде
   одинаковый». Главный теперь листается вверх-вниз (только он: разрешено в touchmove, js/app.js). Надписи стёрты
   с картинок (menu/v6-*-bg.webp) — подписи всех клеток одним шрифтом, текстом. */
#scr-home { overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
#scr-home::-webkit-scrollbar { display: none; }
#scr-home > * { flex-shrink: 0; }
#scr-home .home-top { min-height: 54px; gap: 8px; }
#scr-home .home-top .toggle-btn, #scr-home .home-top .icon-btn { width: 54px; min-width: 54px; height: 54px; }
#scr-home .home-top .ico { width: 27px; height: 27px; }
#scr-home .home-top #btn-lang { width: auto; padding: 0 17px; font-size: 18px; }
#scr-home .hv { flex: none; gap: 14px; }
#scr-home .hv .hv-hero { flex: none; height: auto; min-height: 0; max-height: none; aspect-ratio: 958 / 610; container-type: inline-size; }
#scr-home .hv .hv-hero .hv-art { top: 0; bottom: auto; translate: none; }
#scr-home .hv .hv-hero::before { content: ""; position: absolute; inset: 0; z-index: 2; background: linear-gradient(90deg, rgba(48, 40, 150, .32), rgba(48, 40, 150, 0) 64%); pointer-events: none; }
#scr-home .hv .hv-hero .hv-hero-txt { position: absolute; left: 0; top: 0; z-index: 3; width: 64%; height: 100%; clip: auto; overflow: visible; white-space: normal; display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start; gap: 4cqw; padding: 0 0 5.5cqw 3.8cqw; }
#scr-home .hv .hv-hero .hv-hero-t { display: block; color: #fff; font: 900 8.6cqw/1.04 var(--font-display); letter-spacing: -.02em; text-wrap: balance; text-shadow: 0 .5cqw 0 rgba(20, 20, 90, .35), 0 .8cqw 3cqw rgba(20, 20, 90, .45); }
#scr-home .hv .hv-hero .hv-start { width: auto; height: 12.5cqw; padding: 0 5.6cqw 0 4.2cqw; gap: 2cqw; justify-content: center; border-radius: 999px; background: var(--clay-w, #f6f2ea); color: #141414; font: 900 6.2cqw/1 var(--font-display); box-shadow: 0 1cqw 2.6cqw -1cqw rgba(0, 20, 90, .6); }
#scr-home .hv .hv-hero .hv-start .ico { width: 1.05em; height: 1.05em; stroke-width: 3.6; }
#scr-home .hv .hv-grid { flex: none; min-height: 0; max-height: none; grid-template-rows: none; grid-auto-rows: auto; gap: 12px; }
#scr-home .hv .hv-tile { aspect-ratio: 1 / 1; height: auto; min-height: 0; }
#scr-home .hv .hv-tile .hv-tile-t { display: block; position: absolute; z-index: 3; left: 12px; top: 10px; right: 10px; bottom: auto; width: auto; translate: none; padding: 0; border-radius: 0; background: none; box-shadow: none; color: #fff; font: 900 clamp(17px, 4.8vw, 21px)/1.1 var(--font-display); letter-spacing: -.01em; white-space: nowrap; text-shadow: 0 2px 0 rgba(0, 0, 0, .3), 0 2px 10px rgba(0, 0, 0, .35); }
#scr-home .hv .hv-tile .hv-arrow { display: none; }
#scr-home .hv-tile--doctor .hv-doc-art { background: linear-gradient(180deg, #8fd6c6 0 66%, #84c2da 66% 100%); }
#scr-home .hv .hv-mine { height: 86px; gap: 10px; padding: 0 12px 0 20px; border-radius: 22px; }
#scr-home .hv .hv-mine-t { font-size: clamp(21px, 6vw, 26px); }
#scr-home .hv .hv-avs { gap: 5px; }
#scr-home .hv .hv-avs img { width: 58px; height: 58px; }
#scr-home .hv .hv-mine #coll-count { font-size: 22px; }
#scr-home .hv .hv-mine .hv-arrow { width: 44px; }
@media (max-width: 400px) { #scr-home .hv .hv-avs img { width: 50px; height: 50px; } #scr-home .hv .hv-avs img:nth-child(3) { display: none; } }
/* «Звонок» — свой рисунок: телефон с входящим звонком монстра (круглое фото, красная и зелёная кнопки) звенит */
.hv-tile--call { --tb: #ffc23f; }
.hv-call-art { position: absolute; inset: 0; z-index: 1; overflow: hidden; pointer-events: none; background-color: #ffc23f; background-image: radial-gradient(90% 70% at 30% 20%, rgba(255, 246, 200, .75), transparent 70%), var(--tex-foam); background-size: auto, 180px; background-blend-mode: normal, soft-light; }
.hv-call-phone { position: absolute; right: 13%; bottom: -10%; width: 44%; aspect-ratio: 9 / 17; padding: 5%; border-radius: 22% / 12%; background: #23202e; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .12), 0 10px 18px -8px rgba(80, 40, 0, .55); rotate: -9deg; transform-origin: 50% 90%; animation: hvRing 2.6s ease-in-out infinite; }
.hv-call-screen { position: relative; display: flex; flex-direction: column; align-items: center; width: 100%; height: 100%; padding-top: 16%; border-radius: 17% / 9%; background: linear-gradient(180deg, #7aa8ff, #9b7cf0 70%, #c189e6); overflow: hidden; }
.hv-call-screen::before { content: ""; position: absolute; top: 4%; left: 50%; width: 30%; height: 4.5%; translate: -50% 0; border-radius: 99px; background: #23202e; }
.hv-call-ava { width: 64%; aspect-ratio: 1; border-radius: 50%; overflow: hidden; box-shadow: 0 0 0 3px rgba(255, 255, 255, .85); }
.hv-call-ava img { display: block; width: 100%; height: 100%; object-fit: cover; }
.hv-call-line { width: 52%; height: 5%; margin-top: 12%; border-radius: 99px; background: rgba(255, 255, 255, .85); }
.hv-call-btns { position: absolute; left: 0; right: 0; bottom: 9%; display: flex; justify-content: space-around; padding: 0 8%; }
.hv-call-btns i { display: grid; place-items: center; width: 30%; aspect-ratio: 1; border-radius: 50%; background: #ff4b4b; box-shadow: 0 2px 0 rgba(0, 0, 0, .18); }
.hv-call-btns i + i { background: #33c759; animation: hvAccept 1.3s ease-in-out infinite; }
.hv-call-btns svg { width: 62%; height: 62%; fill: #fff; }
.hv-call-btns i:first-child svg { rotate: 135deg; }
.hv-call-waves { position: absolute; left: 22%; top: 34%; width: 20%; height: auto; overflow: visible; fill: none; stroke: #fff; stroke-width: 5; stroke-linecap: round; filter: drop-shadow(0 2px 2px rgba(140, 80, 0, .35)); animation: hvWaves 1.3s ease-in-out infinite; }
@keyframes hvRing { 0%, 55%, 100% { rotate: -9deg; } 60% { rotate: -4deg; } 65% { rotate: -14deg; } 70% { rotate: -4deg; } 75% { rotate: -14deg; } 80% { rotate: -9deg; } }
@keyframes hvAccept { 50% { scale: 1.14; } }
@keyframes hvWaves { 0%, 100% { opacity: .35; translate: 6% 0; } 50% { opacity: 1; translate: 0 0; } }
@media (prefers-reduced-motion: reduce) { .hv-call-phone, .hv-call-btns i, .hv-call-waves { animation: none; } }
/* s192: звонок-говорилка — пока монстр слушает, внизу зелёный микрофон, столбики громкости и «Говори!» */
.call-listen { bottom: calc(var(--sab) + 124px); height: 58px; gap: 10px; padding: 0 22px 0 10px; background: rgba(20, 16, 40, .55); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); box-shadow: 0 8px 20px rgba(0, 0, 0, .3); }
.call-live.is-listen .call-listen { display: flex; }
.call-live.is-listen .call-mon { animation: callListen 1.8s ease-in-out infinite; }
.call-listen .ico { flex: none; width: 26px; height: 26px; padding: 7px; box-sizing: content-box; border-radius: 50%; color: #fff; background: #33c759; stroke-width: 2.4; animation: listenMic 1.2s ease-in-out infinite; }
.call-listen-bars { display: flex; align-items: center; gap: 4px; height: 38px; }
.call-listen-bars i { width: 7px; height: calc(8px + var(--lv, 0) * 30px * var(--k, 1)); border-radius: 4px; background: #fff; animation: none; transition: height .08s linear; }
.call-listen-bars i:nth-child(1), .call-listen-bars i:nth-child(5) { --k: .45; }
.call-listen-bars i:nth-child(2), .call-listen-bars i:nth-child(4) { --k: .8; }
.call-listen b { font: 900 21px/1 var(--font-display); white-space: nowrap; }
@keyframes listenMic { 50% { box-shadow: 0 0 0 9px rgba(51, 199, 89, .35); } }
.call-hint { position: absolute; left: 50%; bottom: calc(var(--sab) + 124px); translate: -50% 0; z-index: 5; width: max-content; max-width: 86%; margin: 0; padding: 10px 16px; border-radius: 16px; background: rgba(20, 16, 40, .7); color: #fff; font: 700 15px/1.3 var(--font-body); text-align: center; }
.call-hint[hidden] { display: none; }
/* s192: больница — одна болячка, три лекарства; аптечка в два ряда по четыре; рентген; монстр приходит и уходит */
.doc-tray { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; padding: 10px; }
.doc-tool { position: relative; aspect-ratio: 1.3; font-size: clamp(28px, 8.4vw, 38px); }
.doc-tool.is-used { opacity: .5; }
.doc-tool.is-used::after { content: "✓"; position: absolute; right: 4px; top: 4px; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: #33c759; color: #fff; font: 900 13px/1 var(--font-display); }
.doc-bed { bottom: calc(var(--sab) + 190px); }
.doc-mon-box { bottom: calc(var(--sab) + 236px); }
.doc-prog { gap: 10px; }
.doc-prog i { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: rgba(255, 255, 255, .7); border: 2.5px dashed rgba(30, 60, 80, .25); filter: none; opacity: 1; font-style: normal; font-size: 22px; line-height: 1; }
.doc-prog i.is-done { background: #fff; border: 2.5px solid #33c759; }
.doc-xray { position: absolute; inset: -5% -8%; z-index: -1; border-radius: 22px; background: #16305e repeating-linear-gradient(0deg, rgba(140, 210, 255, .1) 0 2px, transparent 2px 7px); box-shadow: inset 0 0 0 3px rgba(150, 220, 255, .7), 0 10px 24px rgba(0, 0, 0, .3); overflow: hidden; }
.doc-xray::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 18%; background: linear-gradient(180deg, transparent, rgba(150, 230, 255, .5), transparent); animation: xrayScan 1.1s ease-in-out infinite; }
@keyframes xrayScan { from { translate: 0 -100%; } to { translate: 0 560%; } }
.doc-mon-box.is-xray .doc-mon { filter: grayscale(1) invert(1) brightness(1.25) contrast(1.3) opacity(.75); animation: none; }
.doc-xray-bone { position: absolute; z-index: 3; translate: -50% -50%; font-size: 46px; line-height: 1; filter: drop-shadow(0 0 10px rgba(170, 235, 255, .95)); animation: btnPop .45s var(--ease-bounce); }
.doc-float { position: absolute; translate: -50% -50%; font-size: 34px; line-height: 1; opacity: 0; pointer-events: none; animation: docFloat 1.3s ease-out forwards; }
@keyframes docFloat { 0% { opacity: 0; translate: -50% -50%; scale: .6; } 20% { opacity: 1; scale: 1.1; } 100% { opacity: 0; translate: -50% -260%; scale: 1; } }
.doc-mon-box.is-in { animation: docIn .9s ease-out; }
@keyframes docIn { 0% { translate: calc(-50% - 100vw) 0; } 30% { translate: calc(-50% - 66vw) -8%; } 55% { translate: calc(-50% - 33vw) 0; } 78% { translate: calc(-50% - 8vw) -6%; } 100% { translate: -50% 0; } }
.doc-mon-box.is-bye { animation: docBye 1.5s ease-in forwards; }
@keyframes docBye { 0% { translate: -50% 0; rotate: 0deg; } 10% { rotate: -8deg; } 20% { rotate: 8deg; } 30% { translate: -50% 0; rotate: -6deg; } 40% { translate: -50% 0; rotate: 0deg; } 52% { translate: calc(-50% + 18vw) -10%; } 64% { translate: calc(-50% + 36vw) 0; } 76% { translate: calc(-50% + 58vw) -10%; } 88% { translate: calc(-50% + 80vw) 0; } 100% { translate: calc(-50% + 115vw) -6%; } }
@media (max-height: 740px) { .doc-tool { aspect-ratio: 1.55; } .doc-bed { bottom: calc(var(--sab) + 170px); } .doc-mon-box { bottom: calc(var(--sab) + 216px); } }

/* s193 (Глеб 02.10: «меняем интерфейс» — макет «Playful 3D Monster App Makeover»): светлый главный, синяя «Нарисовать
   монстра», шесть пастельных клеток с пластилиновыми персонажами и белой стрелкой, белая полоска «Мои монстры»;
   «и не забудь их чуть анимировать, а вверху оставить музыку, язык и тему». Картинки menu/v7-*.webp вырезаны из
   макета (надписи и стрелки стёрты — текст свой, одним шрифтом). Включается классом .hv7 у .hv в index.html. */
:root[data-theme="light"] #scr-home:has(.hv7) { background: #fff; }
:root[data-theme="light"] #scr-home:has(.hv7) .home-top :is(.toggle-btn, .icon-btn) { background: #f2f2f4; background-image: none; box-shadow: none; color: #141414; }
#scr-home .hv7 { gap: 14px; }
#scr-home .hv7 .hv-hero { aspect-ratio: 812 / 358; border-radius: 24px; background: #008cfe; box-shadow: 0 14px 26px -16px rgba(0, 90, 210, .6); }
#scr-home .hv7 .hv-hero::before { display: none; }
#scr-home .hv7 .hv-pic-box { position: absolute; inset: 0; z-index: 1; overflow: hidden; border-radius: inherit; pointer-events: none; }
#scr-home .hv7 .hv-pic { position: absolute; left: -2.5%; top: -2.5%; width: 105%; height: 105%; max-width: none; object-fit: cover; will-change: transform; }
#scr-home .hv7 .hv-hero .hv-hero-txt { width: 60%; justify-content: flex-start; gap: 4.3cqw; padding: 5.4cqw 0 0 4.4cqw; }
#scr-home .hv7 .hv-hero .hv-hero-t { font: 900 8.9cqw/1.02 var(--font-display); letter-spacing: -.02em; color: #fff; text-shadow: 0 .4cqw 0 rgba(0, 40, 130, .22); }
#scr-home .hv7 .hv-hero .hv-start { min-width: 41cqw; height: 11.4cqw; padding: 0 5cqw 0 4cqw; gap: 2.2cqw; background: #fff; color: #141414; font: 900 5.8cqw/1 var(--font-display); box-shadow: 0 1cqw 2.4cqw -1cqw rgba(0, 30, 100, .45); }
#scr-home .hv7 .hv-grid { gap: 12px; }
#scr-home .hv7 .hv-tile { container-type: inline-size; aspect-ratio: var(--ar, 1); border-radius: 20px; background: var(--tb); background-image: none; box-shadow: none; }
#scr-home .hv7 .hv-tile--revive { --tb: #fdd6e3; } #scr-home .hv7 .hv-tile--color { --tb: #dedafc; } #scr-home .hv7 .hv-tile--music { --tb: #d9f9b1; }
#scr-home .hv7 .hv-tile--arena { --tb: #bcdffc; } #scr-home .hv7 .hv-tile--doctor { --tb: #fde5ce; } #scr-home .hv7 .hv-tile--call { --tb: #fdfabd; }
#scr-home .hv7 .hv-tile .hv-tile-t { left: 7cqw; top: 6cqw; right: 22cqw; color: #141414; font: 900 10.4cqw/1.05 var(--font-display); letter-spacing: -.02em; text-shadow: none; white-space: nowrap; }
#scr-home .hv7 .hv-tile .hv-arrow { display: grid; place-items: center; position: absolute; z-index: 3; right: 5cqw; top: 4.4cqw; width: 15cqw; height: 15cqw; border-radius: 50%; background: #fff; color: #141414; box-shadow: 0 2px 8px -3px rgba(0, 0, 0, .18); }
#scr-home .hv7 .hv-tile .hv-arrow .ico { width: 56%; height: 56%; stroke-width: 3; }
#scr-home .hv7 .hv-mine { height: 82px; gap: 8px; padding: 0 12px 0 18px; border-radius: 24px; border: 1.5px solid var(--hv-line); background: var(--hv-card); background-image: none; box-shadow: 0 8px 20px -16px rgba(0, 0, 0, .3); }
#scr-home .hv7 .hv-mine-t { font: 900 clamp(19px, 5.6vw, 24px)/1 var(--font-display); letter-spacing: -.02em; }
#scr-home .hv7 .hv-avs { gap: 4px; }
#scr-home .hv7 .hv-avs img { width: 56px; height: 56px; }
#scr-home .hv7 .hv-mine #coll-count { min-width: 0; color: #b5b5c0; font: 900 22px/1 var(--font-display); }
#scr-home .hv7 .hv-mine .hv-arrow { width: 46px; height: 46px; border-radius: 50%; background: var(--hv-btn); color: var(--fg); }
@media (max-width: 400px) { #scr-home .hv7 .hv-avs img { width: 48px; height: 48px; } }
:root[data-theme="light"] #scr-home .hv7 .hv-mine { background: #fff; border-color: #ebebef; }
/* персонажи чуть шевелятся: каждая клетка по-своему, не в такт друг другу */
@keyframes v7Bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -1.8%; } }
@keyframes v7Sway { 0%, 100% { rotate: -1.3deg; } 50% { rotate: 1.3deg; } }
@keyframes v7Breathe { 0%, 100% { scale: 1; } 50% { scale: 1.03; } }
@keyframes v7Ring { 0%, 64%, 100% { rotate: 0deg; } 68% { rotate: -1.8deg; } 72% { rotate: 1.8deg; } 76% { rotate: -1.4deg; } 80% { rotate: 1.2deg; } 84% { rotate: 0deg; } }
#scr-home .hv7 .hv-hero .hv-pic { transform-origin: 80% 100%; animation: v7Breathe 3.6s ease-in-out infinite; }
#scr-home .hv7 .hv-tile--revive .hv-pic { animation: v7Bob 2.6s ease-in-out infinite; }
#scr-home .hv7 .hv-tile--color .hv-pic { transform-origin: 50% 85%; animation: v7Sway 3.4s ease-in-out infinite .5s; }
#scr-home .hv7 .hv-tile--music .hv-pic { animation: v7Bob 1.25s ease-in-out infinite .2s; }
#scr-home .hv7 .hv-tile--arena .hv-pic { transform-origin: 50% 92%; animation: v7Sway 2.2s ease-in-out infinite .9s; }
#scr-home .hv7 .hv-tile--doctor .hv-pic { transform-origin: 50% 96%; animation: v7Breathe 2.9s ease-in-out infinite 1.2s; }
#scr-home .hv7 .hv-tile--call .hv-pic { transform-origin: 50% 70%; animation: v7Ring 3.2s ease-in-out infinite .3s; }
@media (prefers-reduced-motion: reduce) { #scr-home .hv7 .hv-pic { animation: none; } }

/* s194 (Глеб 02.10): звонок — картинки-вопросы монстру (js/call.js, QA) над «Говори!»; монстр прыгает на «Умею! Смотри!» */
.call-qs { position: absolute; left: 0; right: 0; bottom: calc(var(--sab) + 194px); z-index: 3; display: flex; gap: 8px; padding: 6px 14px; overflow-x: auto; scrollbar-width: none; justify-content: safe center; }
.call-qs::-webkit-scrollbar { display: none; }
.call-qs[hidden], .call-q[hidden] { display: none; }
.call-q { flex: none; display: grid; place-items: center; width: 54px; height: 54px; padding: 0; border: 0; border-radius: 50%; cursor: pointer; font-size: 28px; line-height: 1; background: rgba(255, 255, 255, .9); box-shadow: 0 6px 14px rgba(0, 0, 0, .3); transition: scale .15s var(--ease-bounce), opacity .3s ease; animation: callQIn .4s var(--ease-bounce) both; }
.call-q:nth-child(2n) { animation-delay: .06s; }
.call-q:nth-child(3n) { animation-delay: .12s; }
.call-q:active { scale: .88; }
.call-q.is-used { opacity: .45; }
@keyframes callQIn { from { scale: .4; opacity: 0; } }
#scr-call .call-mon.is-jump { animation: callJump 1.1s ease-in-out 2; }
@keyframes callJump { 0%, 100% { translate: 0 0; rotate: 0deg; } 25% { translate: 0 -14%; rotate: -6deg; } 50% { translate: 0 0; rotate: 0deg; } 75% { translate: 0 -14%; rotate: 6deg; } }
@media (prefers-reduced-motion: reduce) { .call-q, #scr-call .call-mon.is-jump { animation: none; } }

/* s196 (Глеб 02.10): на загрузке — рогатый монстр с главного экрана вместо гоблина (js/app.js showLoading) */
.loading-mon .lm-pic { position: absolute; left: 50%; bottom: 6px; width: 176px; translate: -50% 0; display: flex; flex-direction: column; transform-origin: 50% 85%; -webkit-mask-image: linear-gradient(#000 82%, transparent); mask-image: linear-gradient(#000 82%, transparent); animation: lmBob 1.8s ease-in-out infinite; }
.loading-mon .lm-pic img { display: block; width: 100%; height: auto; pointer-events: none; }
.loading-mon.is-spin .lm-pic { animation: lmWobble 1.4s ease-in-out infinite; }
.loading-mon.is-spin.is-dizzy .lm-pic { animation-duration: .9s; }
.loading-mon.is-sick .lm-pic { animation: lmWobble 2.6s ease-in-out infinite; filter: saturate(.6) hue-rotate(-18deg) brightness(1.05); transition: filter 1s; }
.loading-mon.is-happy .lm-pic { animation: lmHop .62s cubic-bezier(.3, 1.6, .5, 1) 3; }
@keyframes lmBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes lmWobble { 0%, 100% { transform: rotate(-9deg); } 50% { transform: rotate(9deg) translateY(-4px); } }
@media (prefers-reduced-motion: reduce) { .loading-mon .lm-pic { animation: none !important; } }

/* s197 (Глеб 02.10): главный спокойнее — «на экране 4 блока, пролистаешь — ещё 2, и по цвету чуть успокоить»:
   порядок клеток — Оживить, Раскраска, Купание, Звонок (видно сразу), ниже Музыка и Арена; картинки чуть бледнее,
   шевелится только рогатый монстр на синей карточке. */
#scr-home .hv7 .hv-tile--revive { order: 1; } #scr-home .hv7 .hv-tile--color { order: 2; }
#scr-home .hv7 .hv-tile--bath { order: 3; } #scr-home .hv7 .hv-tile--call { order: 4; }
#scr-home .hv7 .hv-tile--music { order: 5; } #scr-home .hv7 .hv-tile--arena { order: 6; }
#scr-home .hv7 .hv-tile { --ar: .9 !important; }
/* одна сетка на весь главный: синяя карточка, 4 игры, «Мои монстры», ниже (листать) — ещё 2 игры */
#scr-home .hv.hv7 { display: grid; grid-template-columns: 1fr 1fr; column-gap: 12px; row-gap: 12px; align-content: start; }
#scr-home .hv7 > .hv-grid { display: contents; }
#scr-home .hv7 > .hv-hero { grid-column: 1 / -1; order: 0; }
#scr-home .hv7 > .hv-mine { grid-column: 1 / -1; order: 9; margin: 2px 0 6px; } /* «Мои монстры» — в самом низу */
#scr-home .hv7 .hv-tile--music { order: 6 !important; } #scr-home .hv7 .hv-tile--arena { order: 7 !important; }
#scr-home .hv7 .hv-tile .hv-pic { filter: none; left: 0; top: auto; bottom: 0; width: 100%; height: 100%; object-fit: contain; object-position: 50% 100%; } /* картинка целиком (кисть не обрезается) */
/* s199 (Глеб 03.10: «монстрики на первом экране больше не двигаются»): движение вернули; картинка чуть крупнее
   плитки (запас по краям), чтобы при покачивании не открывались полоски фона */
#scr-home .hv7 .hv-tile .hv-pic { transform: scale(1.045); }
#scr-home .hv7 .hv-tile--revive .hv-pic { transform-origin: 50% 25%; animation: v7Bob 2.6s ease-in-out infinite; }
#scr-home .hv7 .hv-tile--color .hv-pic { transform: scale(1.03); transform-origin: 50% 0%; animation: v7Sway 3.4s ease-in-out infinite .5s; }
#scr-home .hv7 .hv-tile--bath .hv-pic { transform-origin: 50% 25%; animation: v7Bob 2.2s ease-in-out infinite .4s; }
#scr-home .hv7 .hv-tile--call .hv-pic { transform-origin: 50% 40%; animation: v7Ring 3.2s ease-in-out infinite .3s; }
#scr-home .hv7 .hv-tile--music .hv-pic { transform-origin: 50% 25%; animation: v7Bob 1.25s ease-in-out infinite .2s; }
#scr-home .hv7 .hv-tile--arena .hv-pic { transform-origin: 50% 30%; animation: v7Sway 2.2s ease-in-out infinite .9s; }
@media (prefers-reduced-motion: reduce) { #scr-home .hv7 .hv-tile .hv-pic { animation: none; } }
#scr-home .hv7 .hv-tile .hv-pic-box { background: var(--pb, var(--tb)); filter: saturate(.8) brightness(1.03); } /* сверху — тот же цвет, что фон картинки; всё чуть спокойнее */
#scr-home .hv7 .hv-tile--revive { --pb: #fcd8e4; } #scr-home .hv7 .hv-tile--color { --pb: #dedbfd; } #scr-home .hv7 .hv-tile--music { --pb: #dbfab2; }
#scr-home .hv7 .hv-tile--arena { --pb: #bde0fd; } #scr-home .hv7 .hv-tile--call { --pb: #fdfbbe; } #scr-home .hv7 .hv-tile--bath { --pb: #b4fbf5; }
#scr-home .hv7 .hv-tile--revive { --tb: #fbe6ee; } #scr-home .hv7 .hv-tile--color { --tb: #ebe9fb; } #scr-home .hv7 .hv-tile--music { --tb: #e9f7d8; }
#scr-home .hv7 .hv-tile--arena { --tb: #dcecfb; } #scr-home .hv7 .hv-tile--call { --tb: #fbf9de; } #scr-home .hv7 .hv-tile--bath { --tb: #e2f3fd; }
#scr-home .hv7 .hv-hero { box-shadow: 0 10px 22px -16px rgba(0, 90, 210, .45); }
/* клетка «Купание»: ванна с пузырями и уточкой (эмодзи, без картинки) */
#scr-home .hv7 .hv-bath-art { background: radial-gradient(70% 60% at 70% 75%, #ffffff 0%, rgba(255, 255, 255, 0) 70%); }
.hv-bath-art .hb-tub { position: absolute; right: 6%; bottom: 2%; font-size: 52cqw; line-height: 1; filter: saturate(.85) drop-shadow(0 2cqw 2cqw rgba(40, 90, 140, .25)); }
.hv-bath-art .hb-duck { position: absolute; left: 12%; bottom: 10%; font-size: 20cqw; line-height: 1; rotate: -8deg; }
.hv-bath-art i { position: absolute; font-style: normal; font-size: 14cqw; line-height: 1; opacity: .9; }
.hv-bath-art i:nth-of-type(1) { left: 26%; top: 40%; } .hv-bath-art i:nth-of-type(2) { left: 44%; top: 30%; font-size: 10cqw; } .hv-bath-art i:nth-of-type(3) { left: 36%; top: 56%; font-size: 8cqw; }

/* s197: рогатый монстр на синей карточке — двигается больше всех: покачивается, рисует карандашом и машет листом */
#scr-home .hv7 .hv-hero .hv-pic.hv8 { animation: none; display: block; }
.hv8 img { position: absolute; display: block; max-width: none; pointer-events: none; }
.hv8 .h8-bg { inset: 0; width: 100%; height: 100%; }
.hv8 .h8-mon { position: absolute; inset: 0; transform-origin: 80% 100%; animation: h8Bob 2.2s ease-in-out infinite; will-change: transform; }
.hv8 .h8-body { left: 51.601%; top: 7.542%; width: 48.399%; height: 92.458%; }
.hv8 .h8-pencil { left: 52.586%; top: 37.151%; width: 19.951%; height: 62.849%; transform-origin: 43.8% 60%; animation: h8Draw .42s ease-in-out infinite alternate; }
.hv8 .h8-paper { left: 75.369%; top: 45.531%; width: 23.892%; height: 54.469%; transform-origin: 89.2% 70.3%; animation: h8Wave 3.2s ease-in-out infinite .6s; }
@keyframes h8Bob { 0%, 100% { transform: translateY(0) scale(1, 1); } 50% { transform: translateY(3.2%) scale(1.01, .985); } }
@keyframes h8Draw { 0% { transform: rotate(-4deg) translate(0, 0); } 100% { transform: rotate(3.5deg) translate(-1.2%, 1.6%); } }
@keyframes h8Wave { 0%, 52%, 100% { transform: rotate(0deg); } 60% { transform: rotate(-8deg); } 68% { transform: rotate(7deg); } 76% { transform: rotate(-7deg); } 84% { transform: rotate(5deg); } 92% { transform: rotate(-2deg); } }
@media (prefers-reduced-motion: reduce) { .hv8 .h8-mon, .hv8 .h8-pencil, .hv8 .h8-paper { animation: none; } }
/* s199: живое видео чудика (js/herovid.js) — справа во всю высоту карточки, левый край растворяется в синем фоне */
.hv8 .h8-vid { position: absolute; right: 0; bottom: 0; height: 100%; width: auto; aspect-ratio: 336 / 300; object-fit: cover; pointer-events: none; opacity: 0; transition: opacity .35s; border-radius: 0 7.5% 7.5% 0 / 0 8.4% 8.4% 0; -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 16%); mask-image: linear-gradient(90deg, transparent 0, #000 16%); }
.hv8.h8-live .h8-vid { opacity: 1; }
.hv8.h8-live .h8-mon { visibility: hidden; animation: none; }
/* s199 (Глеб 03.10: «верни простую анимацию рогатого монстра, только сделай нормальную вырезку»): монстр одной чистой
   вырезкой (menu/v9-hero-mon.webp) — покачивается и пружинит целиком, без отдельных рук */
.hv8 .h8-body.h9 { left: 51.478%; top: 7.821%; width: 47.906%; height: 92.179%; }
.hv8 .h8-mon:has(.h9) { animation: h9Bob 2.4s ease-in-out infinite; transform-origin: 75% 100%; }
@keyframes h9Bob { 0%, 100% { transform: translateY(0) rotate(0deg) scale(1, 1); } 25% { transform: translateY(1.2%) rotate(-1.6deg) scale(1.01, .99); } 50% { transform: translateY(2.6%) rotate(0deg) scale(1.02, .975); } 75% { transform: translateY(1.2%) rotate(1.6deg) scale(1.01, .99); } }

/* s197: рейтинг в коллекции — «🏆 Топ-3» и пьедестал самых страшных */
.top3-btn { display: inline-flex; align-items: center; gap: 5px; height: 34px; padding: 0 14px; border: 0; border-radius: 999px; cursor: pointer; background: linear-gradient(180deg, #ffe27a, #ffbf2e); color: #3a2400; font: 900 15px/1 var(--font-display); box-shadow: 0 4px 10px -4px rgba(150, 90, 0, .55); }
.top3-btn:active { scale: .94; }
.top3 { position: absolute; inset: 0; z-index: 30; display: grid; place-items: center; padding: calc(var(--sat) + 16px) 16px calc(var(--sab) + 16px); background: rgba(16, 12, 30, .62); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: fadeIn .25s ease; }
.top3-card { position: relative; width: min(100%, 420px); padding: 22px 14px 18px; border-radius: 28px; background: linear-gradient(180deg, #2b2350, #1b1636); color: #fff; box-shadow: 0 20px 40px -16px rgba(0, 0, 0, .6); text-align: center; }
.top3-card h3 { margin: 0 34px 14px; font: 900 22px/1.15 var(--font-display); }
.top3-x { position: absolute; right: 12px; top: 12px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .14); color: #fff; font-size: 18px; cursor: pointer; }
.top3-pod { display: flex; align-items: flex-end; justify-content: center; gap: 8px; }
.top3-mon { position: relative; flex: 0 1 32%; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 0; border: 0; background: none; color: inherit; cursor: pointer; animation: topRise .6s cubic-bezier(.3, 1.5, .5, 1) both; }
.top3-mon--1 { animation-delay: .35s; } .top3-mon--2 { animation-delay: .15s; } .top3-mon--3 { animation-delay: 0s; }
.top3-mon img { width: 100%; max-width: 120px; aspect-ratio: 1; object-fit: contain; filter: drop-shadow(0 8px 10px rgba(0, 0, 0, .45)); }
.top3-mon--1 img { max-width: 140px; }
.top3-medal { position: absolute; top: -6px; left: 50%; translate: -50% 0; font-size: 30px; line-height: 1; font-weight: 400; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .4)); }
.top3-name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 800 14px/1.2 var(--font-display); }
.top3-step { display: grid; place-items: center; width: 100%; border-radius: 12px 12px 6px 6px; font: 900 26px/1 var(--font-display); color: rgba(255, 255, 255, .9); }
.top3-mon--1 .top3-step { height: 86px; background: linear-gradient(180deg, #ffd34d, #e8a000); }
.top3-mon--2 .top3-step { height: 62px; background: linear-gradient(180deg, #e2e6ef, #a9b1c2); }
.top3-mon--3 .top3-step { height: 46px; background: linear-gradient(180deg, #f2b07a, #c07438); }
@keyframes topRise { from { transform: translateY(40px) scale(.7); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .top3-mon { animation: none; } }

/* s197: смешной сюрприз в коробке — выпрыгивает, крутится и дрожит от смеха */
.gift.is-fun .gv .toy { animation: funPop .9s cubic-bezier(.3, 1.7, .5, 1) .25s both, funWiggle .45s ease-in-out 1.3s 4; }
@keyframes funPop { 0% { transform: translateY(30%) scale(.2) rotate(-30deg); } 60% { transform: translateY(-28%) scale(1.25) rotate(12deg); } 100% { transform: none; } }
@keyframes funWiggle { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-12deg) scale(1.05); } 75% { transform: rotate(12deg) scale(1.05); } }
@media (prefers-reduced-motion: reduce) { .gift.is-fun .gv .toy { animation: none; } }

/* s197: «Купание» (js/bath.js) — ванная комната, монстр в ванне, губка/душ/полотенце под пальцем */
.bath-pick { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.bath-pick[hidden] { display: none; }
.bath-room { position: absolute; inset: 0; z-index: 4; overflow: hidden; background:
  linear-gradient(180deg, rgba(255, 255, 255, 0) 74%, #cfe3ef 74%, #bcd6e6 100%),
  repeating-linear-gradient(0deg, transparent 0 46px, rgba(255, 255, 255, .7) 46px 49px),
  repeating-linear-gradient(90deg, transparent 0 46px, rgba(255, 255, 255, .7) 46px 49px), #cdeefa; }
.bath-room[hidden] { display: none; }
.bath-wall { position: absolute; inset: 0; pointer-events: none; }
.bath-mirror { position: absolute; left: 8%; top: calc(var(--sat) + 86px); width: 24%; aspect-ratio: .8; border-radius: 50% 50% 18px 18px; background: linear-gradient(135deg, #f4fbff 0%, #cfe7f5 45%, #eef8ff 55%, #bfdcef 100%); box-shadow: inset 0 0 0 5px #fff, 0 6px 14px -6px rgba(0, 60, 100, .3); }
.bath-shelf { position: absolute; right: 7%; top: calc(var(--sat) + 132px); display: flex; gap: 4px; padding: 0 6px 4px; border-bottom: 7px solid #fff; border-radius: 0 0 6px 6px; font-size: 26px; line-height: 1; filter: drop-shadow(0 4px 4px rgba(0, 60, 100, .2)); }
.bath-shelf b { font-weight: 400; }
.bath-steps { position: absolute; z-index: 6; left: 50%; top: calc(var(--sat) + 14px); translate: -50% 0; display: flex; gap: 10px; }
.bath-steps i { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; font-style: normal; font-size: 24px; line-height: 1; background: rgba(255, 255, 255, .75); box-shadow: 0 4px 10px -4px rgba(0, 60, 100, .3); opacity: .55; transition: scale .25s var(--ease-bounce), opacity .25s; }
.bath-steps i.is-on { opacity: 1; scale: 1.18; box-shadow: 0 0 0 3px #33c3ff, 0 6px 14px -4px rgba(0, 60, 100, .35); }
.bath-steps i.is-done { opacity: 1; background: #9be37a; }
.bath-steps i.is-towel::before, .bath-tool.is-towel::before { content: ""; display: block; width: 26px; height: 18px; border-radius: 5px; background: repeating-linear-gradient(90deg, #ff8fb8 0 5px, #fff 5px 9px); rotate: -8deg; box-shadow: 0 2px 3px rgba(0, 0, 0, .15); }
.bath-stage { position: absolute; left: 0; right: 0; top: calc(var(--sat) + 70px); bottom: calc(var(--sab) + 8px); touch-action: none; -webkit-user-select: none; user-select: none; }
.bath-mon-box { position: absolute; z-index: 1; left: 50%; bottom: 21%; translate: -50% 0; transform-origin: 50% 100%; }
.bath-mon { display: block; width: 100%; height: auto; pointer-events: none; filter: drop-shadow(0 10px 14px rgba(0, 40, 80, .25)); }
.bath-layer { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.bath-mon-box.is-in { animation: bathIn .7s cubic-bezier(.3, 1.5, .5, 1) both; }
.bath-mon-box.is-rub { animation: bathWiggle .32s ease-in-out infinite; }
.bath-mon-box.is-clean { animation: bathHop .6s cubic-bezier(.3, 1.6, .5, 1) 3; }
.bath-mon-box.is-clean .bath-mon { filter: drop-shadow(0 0 14px rgba(255, 255, 255, .95)) drop-shadow(0 10px 14px rgba(0, 40, 80, .2)); }
.bath-shine { position: absolute; inset: -12%; pointer-events: none; opacity: 0; }
.bath-mon-box.is-clean .bath-shine { opacity: 1; background: radial-gradient(circle at 18% 22%, #fff 0 3px, transparent 4px), radial-gradient(circle at 82% 30%, #fff 0 4px, transparent 5px), radial-gradient(circle at 70% 78%, #fff 0 3px, transparent 4px), radial-gradient(circle at 26% 70%, #fff 0 2px, transparent 3px); animation: twinkle 1s ease-in-out infinite; }
.bath-tub { position: absolute; z-index: 2; left: 50%; bottom: 3%; translate: -50% 0; width: min(94vw, 430px); height: 25%; border-radius: 22px 22px 46% 46% / 22px 22px 60% 60%; background: linear-gradient(180deg, #ffffff 0%, #eef5fb 55%, #d5e5f2 100%); box-shadow: inset 0 10px 0 -2px #fff, 0 16px 24px -14px rgba(0, 50, 90, .45); pointer-events: none; }
.bath-tub::before, .bath-tub::after { content: ""; position: absolute; bottom: -14px; width: 26px; height: 22px; border-radius: 0 0 50% 50%; background: #d9a441; }
.bath-tub::before { left: 16%; } .bath-tub::after { right: 16%; }
.bath-suds { position: absolute; left: 4%; right: 4%; top: -18px; height: 34px; background: radial-gradient(circle at 8% 60%, #fff 0 14px, transparent 15px), radial-gradient(circle at 22% 40%, #fff 0 18px, transparent 19px), radial-gradient(circle at 38% 62%, #f3f9ff 0 13px, transparent 14px), radial-gradient(circle at 55% 38%, #fff 0 17px, transparent 18px), radial-gradient(circle at 72% 60%, #f3f9ff 0 14px, transparent 15px), radial-gradient(circle at 90% 44%, #fff 0 16px, transparent 17px); filter: drop-shadow(0 2px 2px rgba(0, 60, 100, .12)); }
.bath-fx { position: absolute; inset: 0; z-index: 5; pointer-events: none; overflow: hidden; }
.bath-p { position: absolute; width: calc(22px * var(--s, 1)); height: calc(22px * var(--s, 1)); margin: calc(-11px * var(--s, 1)) 0 0 calc(-11px * var(--s, 1)); border-radius: 50%; pointer-events: none; }
.bath-p--mud { background: radial-gradient(circle at 32% 30%, #fff 0 18%, rgba(255, 255, 255, .25) 30%, rgba(180, 225, 255, .35) 70%, rgba(255, 255, 255, .9) 100%); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .9); animation: bathBubble 1.2s ease-out forwards; }
.bath-p--foam { width: calc(9px * var(--s, 1)); height: calc(13px * var(--s, 1)); border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; background: #6cc6ff; animation: bathDrop .7s ease-in forwards; }
.bath-p--wet { width: 14px; height: 14px; background: radial-gradient(circle, #fff 0 30%, rgba(255, 255, 255, 0) 70%); animation: bathBubble .9s ease-out forwards; }
.bath-tool { position: absolute; z-index: 6; left: 82%; top: 48%; translate: -50% -50%; font-size: 58px; line-height: 1; pointer-events: none; filter: drop-shadow(0 6px 8px rgba(0, 40, 80, .3)); animation: bathIdle 1.6s ease-in-out infinite; }
.bath-tool.is-on { animation: none; scale: 1.1; }
.bath-tool.is-towel::before { width: 84px; height: 58px; border-radius: 12px; background: repeating-linear-gradient(90deg, #ff8fb8 0 12px, #fff 12px 22px); }
.bath-hand { position: absolute; z-index: 6; left: 50%; bottom: 44%; font-size: 46px; line-height: 1; pointer-events: none; opacity: 0; translate: -50% 0; }
.bath-hand.is-on { animation: bathTap 1.3s ease-in-out .8s infinite; }
.bath-done { position: absolute; z-index: 7; left: var(--gutter, 16px); right: var(--gutter, 16px); bottom: calc(var(--sab) + 16px); animation: fadeIn .3s ease; }
.bath-done[hidden] { display: none; }
@keyframes bathIn { from { transform: translateY(-60%) scale(.6); opacity: 0; } }
@keyframes bathWiggle { 0%, 100% { transform: rotate(-3deg) scale(1.01, .99); } 50% { transform: rotate(3deg) scale(.99, 1.01); } }
@keyframes bathHop { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-16%) scale(1.04); } }
@keyframes bathBubble { from { transform: translate(0, 0) scale(.4); opacity: 1; } to { transform: translate(var(--dx, 0), -120px) scale(1.1); opacity: 0; } }
@keyframes bathDrop { from { transform: translate(0, 0); opacity: 1; } to { transform: translate(calc(var(--dx, 0) * .4), 140px); opacity: 0; } }
@keyframes bathIdle { 0%, 100% { transform: translateY(0) rotate(-6deg); } 50% { transform: translateY(-8px) rotate(6deg); } }
@keyframes bathTap { 0%, 100% { opacity: 0; transform: translateY(10px); } 30%, 70% { opacity: 1; transform: translateY(0); } 50% { transform: translateY(6px) scale(.92); } }
@media (prefers-reduced-motion: reduce) { .bath-mon-box, .bath-tool, .bath-hand, .bath-p { animation-duration: .01s !important; } }
/* s199: пять шагов купания (+ мыло и фен), облачко с фразой в конце */
.bath-steps { gap: 7px; }
.bath-steps i { width: 40px; height: 40px; font-size: 21px; }
.bath-steps i.is-dryer svg { width: 28px; height: 28px; }
.bath-tool.is-dryer { font-size: 0; }
.bath-tool.is-dryer svg { display: block; width: 92px; height: 92px; scale: -1 1; } /* сопло — к монстру */
.bath-p--soap { background: radial-gradient(circle at 32% 30%, #fff 0 18%, rgba(255, 255, 255, .3) 30%, rgba(200, 230, 255, .4) 70%, rgba(255, 255, 255, .95) 100%); box-shadow: inset 0 0 0 1.5px #fff; animation: bathBubble 1.2s ease-out forwards; }
.bath-p--dry { width: calc(30px * var(--s, 1)); height: 4px; margin: -2px 0 0 0; border-radius: 3px; background: linear-gradient(90deg, rgba(255, 200, 140, 0), rgba(255, 170, 110, .85)); animation: bathAir .6s ease-out forwards; }
@keyframes bathAir { from { opacity: 1; transform: translateX(0); } to { opacity: 0; transform: translateX(-70px) translateY(calc(var(--dx, 0) * .3)); } }
.bath-say { position: absolute; z-index: 8; left: 50%; top: 22%; translate: -50% 0; max-width: 82%; margin: 0; padding: 12px 18px; border-radius: 22px; background: #fff; color: #1d2b44; font: 900 20px/1.2 var(--font-display); text-align: center; box-shadow: 0 8px 20px -8px rgba(0, 40, 90, .45); pointer-events: none; }
.bath-say[hidden] { display: none; }
/* s199: ванная-картинка (js/bath.js loadRoomArt) — фон и передняя стенка ванны поверх монстра, растянуты одинаково */
.bath-room.has-art { background: var(--bath-bg) 50% 100% / cover no-repeat, #b4e6fd; }
.bath-front { display: none; position: absolute; inset: 0; z-index: 2; pointer-events: none; background: 50% 100% / cover no-repeat; }
.bath-room.has-art .bath-front { display: block; }
.bath-room.has-art .bath-wall, .bath-room.has-art .bath-tub { display: none; }
.bath-say.is-in { animation: bathSay .35s var(--ease-bounce); }
@keyframes bathSay { from { opacity: 0; scale: .6; } to { opacity: 1; scale: 1; } }

/* s199 (Глеб 03.10: «топ-3 мелко — крупнее и понятнее; в коллекции слишком мелкий текст; под именем текст не нужен;
   у вкладок игрушки/фото/монстры — иконки, а то ребёнок не понимает») */
.screen--coll .seg-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 52px; padding: 4px 6px; font-size: 13px; line-height: 1.05; }
.screen--coll .seg-btn::before { display: block; font-size: 24px; line-height: 1; }
#tab-monsters::before { content: "👾"; } #tab-toys::before { content: "🧸"; } #tab-media::before { content: "📸"; }
.screen--coll .coll-meta { display: none; }
.screen--coll .coll-num small { font-size: 17px; }
.screen--coll .coll-num em { font-size: 20px; }
.screen--coll #coll-name-text { font-size: clamp(24px, 7vw, 30px); }
.screen--coll .toys-count { font-size: 19px; }
.top3-btn { height: 44px; padding: 0 18px; font-size: 19px; }
.top3-btn span { font-size: 22px; }
.top3 { padding-inline: 10px; }
.top3-card { width: 100%; max-width: 520px; padding: 26px 10px 20px; }
.top3-card h3 { font-size: 28px; margin-bottom: 22px; }
.top3-pod { gap: 6px; }
.top3-mon { flex: 1 1 33%; max-width: 34%; gap: 6px; }
.top3-mon img { max-width: 150px; }
.top3-mon--1 img { max-width: 180px; }
.top3-medal { top: -14px; font-size: 46px; }
.top3-name { font-size: 18px; white-space: normal; overflow-wrap: anywhere; line-height: 1.1; }
.top3-step { font-size: 40px; text-shadow: 0 2px 0 rgba(0, 0, 0, .2); }
.top3-mon--1 .top3-step { height: 120px; } .top3-mon--2 .top3-step { height: 88px; } .top3-mon--3 .top3-step { height: 64px; }
.top3-mon--1 .top3-name { font-size: 21px; color: #ffe27a; }
/* s199 (Глеб 03.10: «тут фон как-то съехал»): выбор песенки — на том же фетре, что весь экран, а не сплошной заливкой */
.music-pick { background: #1e2454 url("/menu/bg-navy.webp") 0 0 / 256px repeat fixed; }
:root[data-theme="light"] .music-pick { background: #faf6ee url("/menu/bg-cream.webp") 0 0 / 256px repeat fixed; }
/* s199 (Глеб 03.10): «Музыка» как Piano Tiles — лента плиток над клавишами; большая картинка песенки не нужна */
.music-art { display: none !important; }
.music-fall { display: none !important; } /* s199b: ленту плиток убрали */
.music-fall { position: absolute; left: 0; right: 0; top: 0; bottom: 0; z-index: 4; overflow: hidden; touch-action: none; pointer-events: none; }
.music-keys.is-song ~ .music-fall { pointer-events: auto; }
.music-tile { position: absolute; top: 0; left: 0; display: block; border-radius: 18px; pointer-events: none;
  background: linear-gradient(180deg, var(--kl) 0%, var(--kc) 34%, var(--kc) 100%);
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, .55), inset 0 -6px 0 rgba(0, 0, 0, .12), 0 5px 0 var(--kd);
  opacity: .55; filter: saturate(.8);
  transition: transform .24s cubic-bezier(.3, 1.3, .5, 1), opacity .2s, filter .2s; }
.music-tile.is-next { opacity: 1; filter: none; animation: mtNext 1s ease-in-out infinite;
  box-shadow: 0 0 0 4px #fff, 0 0 26px 8px var(--kc), inset 0 3px 0 rgba(255, 255, 255, .55), 0 5px 0 var(--kd); }
.music-tile.is-next::after { content: ""; position: absolute; left: 50%; top: 50%; width: 26px; height: 26px; margin: -13px 0 0 -13px; border-radius: 50%; background: #fff; animation: mkDot 1s ease-out infinite; }
.music-tile.is-hit { animation: mtHit .3s ease-out forwards; }
.music-tile.is-nope { animation: mtNope .45s ease-in-out; }
@keyframes mtNext { 0%, 100% { scale: 1; } 50% { scale: 1.06 1.04; } }
@keyframes mtHit { 0% { scale: 1; opacity: 1; } 100% { scale: 1.35 .6; opacity: 0; } }
@keyframes mtNope { 0%, 100% { rotate: 0deg; } 25% { rotate: -6deg; scale: 1.08; } 75% { rotate: 6deg; scale: 1.08; } }
@media (prefers-reduced-motion: reduce) { .music-tile { transition: none; animation: none !important; } }

/* s199 (Глеб 03.10: «поменяй интерфейс коллекции, цвета фона меняются в зависимости от монстра», по макету):
   ровный пастельный фон цвета монстра (--c1/--c2/--cink — из картинки, js/app.js collTint), белые круглые кнопки,
   крупный счётчик, жёлтая «Играть» во всю ширину и три белые плитки с подписями */
.screen--coll:not(.is-toys) { background: linear-gradient(180deg, var(--c2), var(--c1)); background-color: var(--c1); transition: background-color .5s; }
.screen--coll .coll-stage::before { display: none; }
.screen--coll:not(.is-toys) .bar .icon-btn { width: 56px; height: 56px; background: #fff; border: 0; color: #15131a; box-shadow: 0 8px 18px -8px var(--st-shadow); }
.screen--coll:not(.is-toys) .bar .icon-btn .ico { width: 28px; height: 28px; stroke-width: 3; }
.screen--coll:not(.is-toys) .seg { background: rgba(255, 255, 255, .45); padding: 4px; border-radius: 999px; }
.screen--coll:not(.is-toys) .seg-btn { color: color-mix(in oklab, var(--cink) 70%, transparent); }
.screen--coll:not(.is-toys) .seg-btn.is-on { background: #fff; color: #15131a; box-shadow: 0 4px 10px -6px var(--st-shadow); }
.screen--coll .coll-top { align-items: flex-start; padding: 12px 2px 0; color: #15131a; }
.screen--coll .coll-num small { font: 900 18px/1.1 var(--font-display); opacity: 1; }
.screen--coll .coll-num { flex-direction: row; flex-wrap: wrap; align-items: flex-end; column-gap: 4px; max-width: 50%; }
.screen--coll .coll-num small { flex-basis: 100%; margin-bottom: 4px; }
.screen--coll .coll-num b { font-size: clamp(64px, 19vw, 84px); line-height: .85; }
.screen--coll .coll-num em { font: 900 clamp(30px, 9vw, 40px)/1 var(--font-display); color: color-mix(in oklab, var(--cink) 45%, transparent); opacity: 1; margin: 0 0 2px; }
.screen--coll #coll-rar { display: none; }
.screen--coll .top3-btn { height: 48px; padding: 0 20px; font-size: 20px; background: #ffe45c; box-shadow: 0 6px 14px -8px rgba(120, 90, 0, .5); }
.screen--coll .coll-arrow { width: 58px; height: 58px; background: #fff; border: 0; color: #15131a; -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: 0 8px 18px -8px var(--st-shadow); }
.screen--coll .coll-arrow--l { left: 0; } .screen--coll .coll-arrow--r { right: 0; }
.screen--coll .coll-hero::after { background: color-mix(in oklab, var(--cink) 25%, transparent); }
.screen--coll .coll-name { color: #15131a; gap: 10px; }
.screen--coll .coll-name span { font-size: clamp(32px, 9.5vw, 42px); }
.screen--coll #coll-edit { width: 44px; height: 44px; border-radius: 50%; background: rgba(255, 255, 255, .55); color: #15131a; }
.screen--coll #coll-dice { display: none; }
.screen--coll .coll-card { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; padding: 0 0 6px; background: none; border: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.screen--coll .coll-card .btn-lime { grid-column: 1 / -1; min-height: 64px; margin: 0 0 4px; border-radius: 999px; font-size: 26px; }
.screen--coll .coll-card .icon-btn.sq { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; width: auto; height: 76px; border-radius: 22px; background: #fff; border: 0; color: #15131a; box-shadow: 0 8px 18px -10px var(--st-shadow); }
.screen--coll .coll-card .icon-btn.sq .ico { width: 30px; height: 30px; }
.screen--coll .coll-card .icon-btn.sq[hidden] { display: none; }
.sq-l { font: 900 13px/1 var(--font-display); letter-spacing: -.02em; white-space: nowrap; }
.screen--coll .bar { flex-wrap: nowrap; gap: 10px; }
.screen--coll .bar .seg { flex: 1 1 auto; min-width: 0; margin: 0; order: 0; width: auto; }
.screen--coll:not(.is-toys) #coll-clear { display: none; }
.screen--coll .coll-card .btn-lime { background: #ffe45c; background-image: none; color: #15131a; box-shadow: 0 8px 18px -10px rgba(120, 90, 0, .55); }
.screen--coll .coll-card .btn-lime .btn-ico .ico { width: 34px; height: 34px; }
/* s199 (Глеб 03.10: «смайлики не совпадают»): на вкладке «Монстры» — фиолетовый пушистый монстрик, как в макете, а не 👾 */
#tab-monsters::before { content: ""; width: 30px; height: 26px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 52'%3E%3Cdefs%3E%3CradialGradient id='g' cx='.38' cy='.3' r='.8'%3E%3Cstop offset='0' stop-color='%23b79bff'/%3E%3Cstop offset='.55' stop-color='%237c4dff'/%3E%3Cstop offset='1' stop-color='%235526d6'/%3E%3C/radialGradient%3E%3C/defs%3E%3Cpath d='M14 46c-7 0-10-6-8-11-5-3-5-10 0-13-1-7 5-12 11-10 3-6 11-8 16-3 6-4 14-1 15 6 6 1 9 8 6 13 4 4 2 12-5 13-2 5-9 7-14 4-5 3-12 2-15-1-3 2-6 2-6 2z' fill='url(%23g)'/%3E%3Cellipse cx='23' cy='24' rx='5' ry='5.6' fill='%23fff'/%3E%3Cellipse cx='37' cy='24' rx='5' ry='5.6' fill='%23fff'/%3E%3Ccircle cx='23.6' cy='25' r='2.8' fill='%23151020'/%3E%3Ccircle cx='37.6' cy='25' r='2.8' fill='%23151020'/%3E%3Cpath d='M25 34q5 4 10 0' fill='none' stroke='%23151020' stroke-width='2.6' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat; }
/* s199 (Глеб 03.10, макет «Оживляем»): объёмные картинки — блокнот с фотоаппаратом и домик с монстром вместо рисунков */
#scr-revive .rv-card .rv-art { display: none; }
#scr-revive .rv-card .drop-empty::before { content: ""; display: block; width: clamp(150px, 44vw, 196px); aspect-ratio: 370 / 262; margin: 0 auto 2px; background: url("../menu/v9-rv-photo.webp") center / contain no-repeat; }
#scr-revive .rv-card--scene .drop-empty::before { width: clamp(170px, 50vw, 226px); aspect-ratio: 455 / 298; background-image: url("../menu/v9-rv-room.webp"); }
#scr-revive .rv-card.has-img .drop-empty::before { display: none; }
@media (max-height: 700px) { #scr-revive .rv-card .drop-empty::before { width: 120px; } #scr-revive .rv-card--scene .drop-empty::before { width: 140px; } }
/* s199 (Глеб 03.10: «текст на кнопках шрифтом как на главном экране — экраны после игры»): самый жирный Rubik, плотнее */
.btn-lime, .btn-lime span { font-family: var(--font-display); font-weight: 900; letter-spacing: -.02em; }
.coll-empty-mon { width: 220px; height: 190px; }
.coll-empty-img { display: block; width: 100%; height: 100%; object-fit: contain; transform-origin: 50% 100%; animation: h9Bob 2.4s ease-in-out infinite; filter: drop-shadow(0 10px 14px rgba(40, 20, 50, .25)); }
.icon-btn:not(.sq) .sq-l { display: none; }
@media (max-height: 760px) { .screen--coll .coll-card .icon-btn.sq { height: 64px; gap: 4px; } .screen--coll .coll-card .btn-lime { min-height: 56px; } .screen--coll .coll-num b { font-size: 56px; } }
