/* 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; }
.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; } }

/* s179 (Глеб 30.09): на телефоне страница стоит на месте — не едет вверх-вниз и не «пружинит», когда
   тащишь глаза и детали. Запрет прокрутки корня iOS понимает только на html (на body он не доходит), а
   body зафиксирован целиком. Экраны влезают без прокрутки (проверено на 375×667); листаются только ленты
   вбок и список игрушек. На компьютере всё как было. */
@media (pointer: coarse) {
  html { overscroll-behavior: none; }
  body { position: fixed; inset: 0; width: 100%; overflow: hidden; touch-action: manipulation; }
  .screen-body { overflow-y: hidden; }
}
