/* «Ёлочка Be Happy» — вид игры. Стиль «объёмный, как бобёр»: игрушечный пластик, толстые кнопки с кромкой,
   фиолетовая ночь и снег. Шрифты: Shantell Sans (интерфейс), Caveat (почерк записок) — выбраны Германом 16.11.2026.
   Жёлтого и золотого нет: тёплые акценты — персиковый, красный, розовый. Анимации по «меньше движения» не урезаются. */
:root {
  --night: #1d1238; --night-2: #2a1a52; --plum: #3a2470;
  --ink: #24153f; --ink-2: #5d4f7e; --paper: #fff; --soft: #efeafc; --line: #e3dcf7;
  --accent: #6d3fe0; --accent-d: #4a21b8; --accent-l: #a78bfa;
  --red: #e5484d; --red-d: #b92f36; --peach: #ff8f6b; --pink: #f472b6; --ok: #1f7a52;
  --font: "Shantell Sans", "Segoe UI", system-ui, -apple-system, sans-serif; --hand: Caveat, "Segoe Script", cursive;
  --yg-ink: #24153f; --yg-paper: #fff; --yg-accent: #6d3fe0; --yg-soft: #efeafc; --yg-night: #1d1238;
  /* сцена — картинка двора, ёлка стоит на её поляне. --zoom — камера отъехала (фидбек Германа 17.11: «чуть отдалил бы
     ёлку и всё остальное… поле и всё такое… на 10–20 %, не больше»): сцена на 15 % меньше «закрыть окно целиком», за её
     краями — зеркальные поля той же картинки (.yd-bgx, decor.js → WING), поэтому окно по-прежнему закрыто двором */
  --aspect: calc(928 / 1664); --base: .67; --zoom: .85;
  --scene-h: calc(max(100dvh, calc(100vw / var(--aspect))) * var(--zoom));
  --tree-h: 340px; --toy: 34px; --k: 1;
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
}
@media (min-aspect-ratio: 1/1) { :root { --aspect: calc(1664 / 928); --base: .75; } }
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
html { font-size: clamp(15px, 2.25vmin, 22px); -webkit-text-size-adjust: 100%; }
body { font-family: var(--font); color: var(--ink); background: var(--night); overflow: hidden; overscroll-behavior: none; -webkit-tap-highlight-color: transparent; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; touch-action: manipulation; }
[hidden] { display: none !important; }
/* clip, не только hidden: поля за краями сцены (камера отъехала) выходят за окно, а hidden-корень всё же прокручивается из кода
   (scrollIntoView, фокус) — весь двор и кнопки съезжали бы на несколько пикселей; clip не прокручивается никак */
.yol { position: fixed; inset: 0; overflow: hidden; overflow: clip; background: linear-gradient(180deg, var(--night) 0%, var(--night-2) 60%, var(--plum) 100%); }
.yol-boot { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 1.6rem; }
:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.y-sheet :focus-visible { outline-color: var(--accent); }
.y-sheet:focus { outline: none; }

/* ---------- сцена ---------- */
.yol-scene { position: absolute; left: 50%; top: 50%; height: var(--scene-h); width: calc(var(--scene-h) * var(--aspect)); transform: translate(-50%, -50%);
  --bg: url(/assets/yolochka/img/yard-tall.webp); }
.yol-scene::before { content: ""; position: absolute; inset: 0; background: var(--bg) center / cover no-repeat; }
.yol-scene[data-flip="1"]::before { transform: scaleX(-1); }
@media (min-aspect-ratio: 1/1) { .yol-scene { --bg: url(/assets/yolochka/img/yard-wide.webp); } }
/* поля за краями сцены: та же картинка (--bg), отражённая у каждого края — стороны и углы по 12 % (decor.js → WING).
   Картинка в поле — размером со сцену; поле заходит на сцену на 3 px (край с наклоном сглаживается на 2 px), чтобы на стыке не просвечивала ночь */
.yd-bgx { position: absolute; inset: 0; pointer-events: none; --sw: calc(var(--scene-h) * var(--aspect)); }
.yol-scene[data-flip="1"] .yd-bgx { transform: scaleX(-1); }
.yd-bgx i { position: absolute; width: calc(12% + 3px); height: calc(12% + 3px); background-image: var(--bg); background-repeat: no-repeat; background-size: var(--sw) var(--scene-h); transform: scale(-1, -1); }
.yd-bgx .yd-bgx--l, .yd-bgx .yd-bgx--r { top: 0; height: 100%; transform: scaleX(-1); }
.yd-bgx .yd-bgx--t, .yd-bgx .yd-bgx--b { left: 0; width: 100%; transform: scaleY(-1); }
.yd-bgx .yd-bgx--l { left: -12%; background-position: 0 0; } .yd-bgx .yd-bgx--r { left: calc(100% - 3px); background-position: 100% 0; }
.yd-bgx .yd-bgx--t { top: -12%; background-position: 0 0; } .yd-bgx .yd-bgx--b { top: calc(100% - 3px); background-position: 0 100%; }
.yd-bgx .yd-bgx--tl { left: -12%; top: -12%; background-position: 0 0; } .yd-bgx .yd-bgx--tr { left: calc(100% - 3px); top: -12%; background-position: 100% 0; }
.yd-bgx .yd-bgx--bl { left: -12%; top: calc(100% - 3px); background-position: 0 100%; } .yd-bgx .yd-bgx--br { left: calc(100% - 3px); top: calc(100% - 3px); background-position: 100% 100%; }
.yol-anchor { position: absolute; left: 50%; top: calc(var(--base) * 100%); width: 0; height: 0; }

.yt { position: absolute; left: 0; bottom: calc(var(--tree-h) * -.015); height: calc(var(--tree-h) * var(--k)); transform: translateX(-50%); transform-origin: 50% 100%; transition: height .7s cubic-bezier(.3, 1.4, .5, 1); }
.yt__img { display: block; width: 100%; height: 100%; filter: drop-shadow(0 calc(var(--tree-h) * .03) calc(var(--tree-h) * .035) rgba(29, 18, 56, .3)); user-select: none; -webkit-user-drag: none; }
.yt__star { position: absolute; left: 50%; top: 0; width: 27%; transform: translate(-50%, -66%); filter: drop-shadow(0 0 calc(var(--tree-h) * .04) rgba(255, 255, 255, .85)); }
.yt.is-pulse { animation: yt-pulse .7s ease-out; }
.yt.is-grown { animation: yt-grown .9s cubic-bezier(.3, 1.5, .5, 1); }
@keyframes yt-pulse { 0% { transform: translateX(-50%) scale(1); } 35% { transform: translateX(-50%) scale(1.03, .975); } 100% { transform: translateX(-50%) scale(1); } }
@keyframes yt-grown { 0% { transform: translateX(-50%) scale(.82); } 100% { transform: translateX(-50%) scale(1); } }
.yt__toys, .yt__lights { position: absolute; inset: 0; }
.yt__lights { pointer-events: none; }
.yt__lights i { position: absolute; width: calc(var(--toy) * .2); height: calc(var(--toy) * .2); margin: calc(var(--toy) * -.1); border-radius: 50%; background: #fff; box-shadow: 0 0 calc(var(--toy) * .28) calc(var(--toy) * .1) #ffd9a8; animation: yt-twinkle 2.4s ease-in-out infinite; }
.yt__lights i[data-c="1"] { box-shadow: 0 0 calc(var(--toy) * .28) calc(var(--toy) * .1) #ff9bd0; }
.yt__lights i[data-c="2"] { box-shadow: 0 0 calc(var(--toy) * .28) calc(var(--toy) * .1) #ff8f6b; }
@keyframes yt-twinkle { 0%, 100% { opacity: .35; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.15); } }

.yt-toy, .yt-slot { position: absolute; width: var(--toy); height: var(--toy); margin: 0; padding: 0; border: 0; background: none; transform: translate(-50%, -16%); }
.yt-toy::after, .yt-slot::after { content: ""; position: absolute; inset: -5px; }   /* зона нажатия шире картинки */
.yt-toy img { display: block; width: 100%; height: 100%; filter: drop-shadow(0 2px 2px rgba(20, 10, 40, .38)); transform-origin: 50% 8%; animation: yt-sway 5s ease-in-out infinite alternate; pointer-events: none; }
.yt-toy:nth-child(odd) img { animation-duration: 6.2s; animation-delay: -2s; }
@keyframes yt-sway { from { transform: rotate(-3.5deg); } to { transform: rotate(3.5deg); } }
.yt-toy.is-new img { animation: yt-hang .9s cubic-bezier(.3, 1.5, .5, 1), yt-sway 5s ease-in-out .9s infinite alternate; }
@keyframes yt-hang { 0% { transform: translateY(-140%) rotate(-16deg) scale(.6); opacity: 0; } 55% { transform: translateY(0) rotate(12deg) scale(1.08); opacity: 1; } 78% { transform: rotate(-7deg); } 100% { transform: rotate(0); } }
.yt.is-pick .yt-toy { opacity: .55; pointer-events: none; }
.yt-slot { border-radius: 50%; border: 3px dashed #fff; background: rgba(255, 255, 255, .22); box-shadow: 0 0 0 4px rgba(109, 63, 224, .35); animation: yt-slot 1.3s ease-in-out infinite; }
@keyframes yt-slot { 0%, 100% { transform: translate(-50%, -16%) scale(.86); } 50% { transform: translate(-50%, -16%) scale(1.04); } }

.y-gift, .y-under { position: absolute; bottom: calc(var(--tree-h) * -.07); border: 0; padding: 0; background: none; }
.y-gift { left: calc(var(--tree-h) * .16); width: calc(var(--tree-h) * .24); animation: y-bob 1.8s ease-in-out infinite; }
.y-gift__img { display: block; width: 100%; filter: drop-shadow(0 6px 8px rgba(29, 18, 56, .35)); }
.y-gift__tag { position: absolute; left: 50%; bottom: -6%; transform: translateX(-50%); padding: .35em .85em; border-radius: 99px; background: var(--red); color: #fff; font-size: .82rem; font-weight: 800; white-space: nowrap; box-shadow: 0 3px 0 var(--red-d); }
.y-gift:disabled { animation: none; cursor: default; }
.y-gift:disabled .y-gift__tag { background: #fff; color: var(--ink); box-shadow: 0 3px 0 var(--line); }
@keyframes y-bob { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-7%) rotate(2deg); } }
.y-beaver { position: absolute; z-index: 2; left: max(calc(var(--tree-h) * -.47), calc(-50vw + 6px)); bottom: calc(var(--tree-h) * -.2); width: calc(var(--tree-h) * .27); padding: 0; border: 0; background: none; animation: y-bob2 3.2s ease-in-out infinite; }
.y-beaver img { display: block; width: 100%; filter: drop-shadow(0 calc(var(--tree-h) * .02) calc(var(--tree-h) * .03) rgba(29, 18, 56, .35)); }
.y-beaver__say { position: absolute; left: 22%; bottom: 98%; width: max-content; max-width: min(58vw, 230px); padding: .5em .8em .58em; border-radius: 16px 16px 16px 4px; background: #fff; color: var(--ink); font-size: .78rem; font-weight: 700; line-height: 1.2; text-align: left; box-shadow: 0 3px 0 rgba(29, 18, 56, .2); animation: y-say 7s ease-in-out 1.2s 1 both; transform-origin: 0 100%; }
@keyframes y-bob2 { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-2.5%); } }
@keyframes y-say { 0% { transform: scale(0); opacity: 0; } 6%, 90% { transform: scale(1); opacity: 1; } 100% { transform: scale(0); opacity: 0; } }
.y-under { right: calc(var(--tree-h) * .16); width: calc(var(--tree-h) * .15); }
.y-under img { display: block; width: 100%; filter: drop-shadow(0 4px 6px rgba(29, 18, 56, .3)) saturate(.7); }
.y-under b { position: absolute; right: -18%; top: -18%; min-width: 1.7em; padding: .15em .35em; border-radius: 99px; background: #fff; font-size: .78rem; font-weight: 800; text-align: center; }
/* полив (фидбек Германа 17.11: «ёлка при поливе не той стороной полита»): лейка справа над макушкой носиком к ёлке
   (картинка can.webp — носик слева, не отражаем), наклон влево опускает носик; капли — в коробке без наклона, из точки,
   где носик в наклоне (≈ 6 % / 66 % коробки), падают отвесно на правый верх кроны. Коробка встаёт по росту ёлки (--k) */
.y-canfx { position: absolute; left: calc(var(--tree-h) * .065); bottom: calc(var(--tree-h) * (var(--k) * .95 - .081)); width: calc(var(--tree-h) * .26); aspect-ratio: 1; pointer-events: none; }
.y-canfx__can { position: absolute; inset: 0; transform-origin: 55% 60%; opacity: 0; animation: y-can 1.3s ease-in-out forwards; }
.y-canfx__can img { display: block; width: 100%; height: 100%; filter: drop-shadow(0 6px 8px rgba(29, 18, 56, .3)); }
.y-canfx i { position: absolute; left: 5%; top: 63%; width: 7%; aspect-ratio: 1 / 1.4; border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%; background: #bfe6ff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .6); opacity: 0; animation: y-pour .5s ease-in .42s forwards; }
.y-canfx i:nth-child(3) { left: 8%; animation-delay: .54s; } .y-canfx i:nth-child(4) { left: 3%; animation-delay: .66s; } .y-canfx i:nth-child(5) { left: 7%; animation-delay: .78s; }
@keyframes y-can { 0% { transform: translate(35%, -30%) rotate(8deg); opacity: 0; } 18% { opacity: 1; } 24% { transform: translate(0, 0) rotate(0); } 34%, 70% { transform: translate(0, 0) rotate(-38deg); opacity: 1; } 86% { transform: translate(8%, -8%) rotate(-4deg); opacity: 1; } 100% { transform: translate(30%, -25%) rotate(0); opacity: 0; } }
@keyframes y-pour { 0% { transform: translateY(0) scaleY(.8); opacity: 0; } 15% { opacity: 1; } 100% { transform: translateY(900%) scaleY(1.15); opacity: 0; } }
@keyframes y-drop { 0% { transform: translateY(0); opacity: 0; } 15% { opacity: 1; } 100% { transform: translateY(520%); opacity: 0; } }

/* снег: три слоя, плитка сдвигается ровно на свою высоту */
.yol-snow { position: absolute; inset: 0; pointer-events: none; overflow: hidden; animation: y-drift 9s ease-in-out infinite alternate; }
.yol-snow i { position: absolute; left: -20px; right: -20px; bottom: 0; background-repeat: repeat; }
.yol-snow i:nth-child(1) { top: -270px; --c: rgba(255, 255, 255, .9); background-size: 270px 270px; animation: y-fall-a 26s linear infinite;
  background-image: radial-gradient(circle at 11% 17%, var(--c) 0 1.4px, transparent 2.1px), radial-gradient(circle at 69% 8%, var(--c) 0 1.1px, transparent 1.8px), radial-gradient(circle at 37% 49%, var(--c) 0 1.6px, transparent 2.3px), radial-gradient(circle at 88% 58%, var(--c) 0 1.2px, transparent 1.9px), radial-gradient(circle at 19% 81%, var(--c) 0 1.3px, transparent 2px), radial-gradient(circle at 57% 92%, var(--c) 0 1px, transparent 1.7px); }
.yol-snow i:nth-child(2) { top: -390px; --c: rgba(255, 255, 255, .75); background-size: 390px 390px; animation: y-fall-b 21s linear infinite;
  background-image: radial-gradient(circle at 23% 12%, var(--c) 0 2.3px, transparent 3.2px), radial-gradient(circle at 81% 31%, var(--c) 0 2px, transparent 2.9px), radial-gradient(circle at 46% 63%, var(--c) 0 2.6px, transparent 3.5px), radial-gradient(circle at 8% 74%, var(--c) 0 1.9px, transparent 2.8px); }
.yol-snow i:nth-child(3) { top: -530px; --c: rgba(255, 255, 255, .4); background-size: 530px 530px; animation: y-fall-c 15s linear infinite;
  background-image: radial-gradient(circle at 31% 22%, var(--c) 0 3.8px, transparent 5.4px), radial-gradient(circle at 76% 57%, var(--c) 0 4.4px, transparent 6px), radial-gradient(circle at 14% 88%, var(--c) 0 3.3px, transparent 4.8px); }
@keyframes y-fall-a { to { transform: translateY(270px); } } @keyframes y-fall-b { to { transform: translateY(390px); } } @keyframes y-fall-c { to { transform: translateY(530px); } }
@keyframes y-drift { from { transform: translateX(-9px); } to { transform: translateX(9px); } }

/* ---------- поверх сцены ---------- */
.yol-hud { position: absolute; inset: 0; pointer-events: none; }
.yol-hud > * { pointer-events: auto; }
.y-top { position: absolute; left: 0; right: 0; top: 0; display: grid; grid-template-columns: auto 1fr auto; align-items: start; gap: 10px; padding: calc(10px + var(--safe-t)) 12px 0; }
.y-round { position: relative; width: 3.45rem; height: 3.45rem; padding: 0; border: 0; border-radius: 50%; background: #fff; display: grid; place-items: center; box-shadow: inset 0 -3px 0 var(--line), 0 4px 0 rgba(29, 18, 56, .28), 0 8px 16px rgba(29, 18, 56, .22); transition: transform .12s; }
.y-round:active { transform: translateY(3px); }
.ya { display: block; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.y-round .ya { width: 2.9rem; height: 2.9rem; }
.y-badge { position: absolute; right: -5px; top: -5px; min-width: 1.75em; padding: .2em .4em; border-radius: 99px; background: var(--red); color: #fff; font-size: .78rem; font-weight: 800; line-height: 1.2; text-align: center; box-shadow: 0 2px 0 var(--red-d); }
.y-badge.is-zero { background: #b7abd6; box-shadow: 0 2px 0 #9486bb; }
.y-count { justify-self: center; padding: .5em 1.1em .55em; border-radius: 22px; background: #fff; text-align: center; box-shadow: inset 0 -3px 0 var(--line), 0 4px 0 rgba(29, 18, 56, .25), 0 8px 16px rgba(29, 18, 56, .2); }
.y-count b { display: block; font-size: 1.02rem; font-weight: 800; line-height: 1.15; }
.y-count span { display: block; margin-top: 1px; font-size: .78rem; color: var(--ink-2); }
.y-count--who { display: flex; align-items: center; gap: 10px; text-align: left; padding: .4em 1em .45em .45em; }
.y-count--who .ya { width: 2.8rem; height: 2.8rem; flex: none; }
.y-pos { align-self: center; min-width: 3.45rem; text-align: center; color: #fff; font-size: .82rem; font-weight: 600; text-shadow: 0 1px 4px rgba(29, 18, 56, .7); }
.y-ico { display: block; width: 1.7rem; height: 1.7rem; background: var(--ink); -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat; }
.y-ico--bell { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.5a6.5 6.5 0 0 0-6.5 6.5v3.6L3.7 16a1 1 0 0 0 .9 1.5h14.8a1 1 0 0 0 .9-1.5l-1.8-3.4V9A6.5 6.5 0 0 0 12 2.5ZM9.5 19a2.5 2.5 0 0 0 5 0Z'/%3E%3C/svg%3E"); }
.y-ico--home { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3 3 10.5V20a1 1 0 0 0 1 1h5v-6h6v6h5a1 1 0 0 0 1-1v-9.5Z'/%3E%3C/svg%3E"); }
.y-ico--left { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M15 4 7 12l8 8' fill='none' stroke='%23000' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.y-ico--right { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m9 4 8 8-8 8' fill='none' stroke='%23000' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.y-ico--lock { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 10V7.5a5 5 0 0 1 10 0V10h1a1.5 1.5 0 0 1 1.5 1.5v8A1.5 1.5 0 0 1 18 21H6a1.5 1.5 0 0 1-1.5-1.5v-8A1.5 1.5 0 0 1 6 10Zm2.5 0h5V7.5a2.5 2.5 0 0 0-5 0Z'/%3E%3C/svg%3E"); width: 20px; height: 20px; background: var(--accent); flex: none; }

.y-side { position: absolute; right: 10px; top: calc(50dvh + var(--scene-h) * (var(--base) - .5) - var(--tree-h) * .62); display: grid; gap: 14px; justify-items: center; }
.y-can, .y-wheelbtn { position: relative; width: 4.8rem; padding: 0; border: 0; background: none; display: grid; justify-items: center; gap: 2px; color: #fff; font-size: .82rem; font-weight: 800; text-shadow: 0 1px 4px rgba(29, 18, 56, .8); }
.y-can img { width: 4.5rem; height: 4.5rem; padding: .45rem; border-radius: 50%; background: #fff; box-shadow: inset 0 -4px 0 var(--line), 0 5px 0 rgba(29, 18, 56, .28), 0 10px 18px rgba(29, 18, 56, .25); transition: transform .12s; }
.y-can:active img { transform: translateY(4px); }
.y-can .y-badge { right: -2px; top: -4px; font-size: .9rem; }
.y-can.is-busy img { animation: y-spin 1s linear infinite; }
.y-wheelbtn__disc { display: block; width: 3.6rem; height: 3.6rem; border-radius: 50%; border: 4px solid #fff; background: conic-gradient(#e5484d 0 60deg, #a78bfa 0 120deg, #f472b6 0 180deg, #6d3fe0 0 240deg, #ff8f6b 0 300deg, #3fbf8f 0); box-shadow: 0 5px 0 rgba(29, 18, 56, .28), 0 10px 18px rgba(29, 18, 56, .25); animation: y-spin 9s linear infinite; }
@keyframes y-spin { to { transform: rotate(360deg); } }
.y-base { position: absolute; left: 50%; top: calc(50dvh + var(--scene-h) * (var(--base) - .5) + 12px); transform: translateX(-50%); }
.y-tag { display: grid; justify-items: center; gap: 3px; padding: .45em 1em .5em; border-radius: 16px; background: #fff; box-shadow: inset 0 -3px 0 var(--line), 0 3px 0 rgba(29, 18, 56, .2); white-space: nowrap; }
.y-tag b { font-size: .88rem; font-weight: 800; } .y-tag span { font-size: .74rem; color: var(--ink-2); }
.y-bar { display: block; width: 8.4em; height: 9px; border-radius: 5px; background: var(--soft); overflow: hidden; }
.y-bar i { display: block; height: 100%; border-radius: 5px; background: linear-gradient(90deg, #3fbf8f, #2f9e6e); transition: width .6s; }
.y-nav { position: absolute; top: 46%; width: 3.3rem; height: 3.3rem; padding: 0; border: 0; border-radius: 50%; background: #fff; display: grid; place-items: center; box-shadow: inset 0 -3px 0 var(--line), 0 4px 0 rgba(29, 18, 56, .28); }
.y-nav--prev { left: 8px; } .y-nav--next { right: 8px; }
.y-nav:active { transform: translateY(3px); }

.y-dock { position: absolute; left: 50%; bottom: calc(10px + var(--safe-b)); transform: translateX(-50%); width: min(100% - 20px, 30.5rem); display: grid; grid-template-columns: 1.15fr 1fr 1fr; gap: .6rem; }
.y-dock--two { grid-template-columns: 1fr 1fr; }
.y-dockbtn { position: relative; min-height: 4.1rem; padding: .55em .4em .6em; border: 0; border-radius: 20px; background: linear-gradient(180deg, #fff 0%, #f4f0ff 100%); display: grid; align-content: center; gap: 2px; text-align: center; box-shadow: inset 0 2px 0 #fff, inset 0 -4px 0 var(--line), 0 5px 0 rgba(29, 18, 56, .3), 0 12px 20px rgba(29, 18, 56, .25); transition: transform .12s, box-shadow .12s; }
.y-dockbtn b { font-size: 1.06rem; font-weight: 800; line-height: 1.1; } .y-dockbtn span { font-size: .74rem; color: var(--ink-2); line-height: 1.15; }
.y-dockbtn:active { transform: translateY(4px); box-shadow: inset 0 2px 0 #fff, inset 0 -4px 0 var(--line), 0 1px 0 rgba(29, 18, 56, .3), 0 4px 8px rgba(29, 18, 56, .2); }
.y-dockbtn.is-main { color: #fff; background: linear-gradient(180deg, #8f63f5 0%, var(--accent) 55%, #5a2fd0 100%); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .4), inset 0 -4px 0 rgba(29, 18, 56, .22), 0 5px 0 #37189a, 0 12px 20px rgba(29, 18, 56, .3); }
.y-dockbtn.is-main span { color: #e6dcff; }
.y-dockbtn.is-off { opacity: .6; cursor: default; }
.y-dockbtn.is-nudge { animation: y-nudge .6s ease-in-out 2; }
@keyframes y-nudge { 0%, 100% { transform: translateY(0); } 30% { transform: translateY(-8px) rotate(-2deg); } 60% { transform: translateY(0) rotate(2deg); } }
.y-dot { position: absolute; right: 8px; top: 8px; width: 12px; height: 12px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 3px #fff; }
.y-dockbtn.is-main .y-dot { box-shadow: 0 0 0 3px var(--accent); }

.y-pick { position: absolute; left: 50%; top: calc(10px + var(--safe-t)); transform: translateX(-50%); width: min(100% - 20px, 30.5rem); display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 22px; background: #fff; box-shadow: inset 0 -3px 0 var(--line), 0 5px 0 rgba(29, 18, 56, .28), 0 12px 20px rgba(29, 18, 56, .25); }
.y-pick__toy { flex: none; width: 3.3rem; height: 3.3rem; border-radius: 14px; background: var(--soft); padding: 4px; }
.y-pick__toy img { width: 100%; height: 100%; }
.y-pick__text { flex: 1; min-width: 0; } .y-pick__text b { display: block; font-size: 1rem; font-weight: 800; } .y-pick__text span { display: block; font-size: .78rem; color: var(--ink-2); }

@media (min-aspect-ratio: 1/1) {
  .y-top { grid-template-columns: auto auto 1fr auto; } .y-top .y-bell { grid-column: 4; }
  .y-count { justify-self: start; }
  .y-side { right: auto; left: calc(50% + var(--tree-h) * .46); top: calc(50dvh + var(--scene-h) * (var(--base) - .5) - var(--tree-h) * .7); }
  .y-base { top: calc(10px + var(--safe-t)); }
  .y-beaver { left: calc(var(--tree-h) * -.66); width: calc(var(--tree-h) * .3); bottom: calc(var(--tree-h) * -.14); }
  .y-nav--prev { left: calc(50% - var(--tree-h) * .95); } .y-nav--next { right: calc(50% - var(--tree-h) * .95); }
}

/* ---------- кнопки, поля ---------- */
.y-btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; min-height: 50px; padding: .7em 1.4em .8em; border: 0; border-radius: 999px; color: #fff; font-weight: 800; font-size: 1.02rem; line-height: 1.1; text-decoration: none; text-align: center;
  background: linear-gradient(180deg, #8f63f5 0%, var(--accent) 55%, #5a2fd0 100%); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .4), inset 0 -3px 0 rgba(29, 18, 56, .2), 0 5px 0 #37189a, 0 10px 16px rgba(29, 18, 56, .22); transition: transform .12s, box-shadow .12s; }
.y-btn:active { transform: translateY(4px); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .4), inset 0 -3px 0 rgba(29, 18, 56, .2), 0 1px 0 #37189a, 0 3px 6px rgba(29, 18, 56, .2); }
.y-btn--soft { color: var(--ink); background: linear-gradient(180deg, #fff 0%, #f1ecff 100%); box-shadow: inset 0 2px 0 #fff, inset 0 -3px 0 var(--line), 0 5px 0 #c9bdee, 0 10px 16px rgba(29, 18, 56, .12); }
.y-btn--soft:active { box-shadow: inset 0 2px 0 #fff, inset 0 -3px 0 var(--line), 0 1px 0 #c9bdee; }
.y-btn--danger { background: linear-gradient(180deg, #f2676b 0%, var(--red) 60%, #cf3a40 100%); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .35), 0 5px 0 var(--red-d), 0 10px 16px rgba(29, 18, 56, .2); }
.y-btn--wide { width: 100%; } .y-btn--small { min-height: 44px; padding: .55em 1.1em .62em; font-size: .92rem; }
.y-btn:disabled, .y-btn.is-busy { opacity: .6; cursor: default; }
.y-link { min-height: 44px; padding: .4em .5em; border: 0; background: none; color: var(--accent); font-weight: 700; font-size: .92rem; text-decoration: underline; text-underline-offset: 3px; }
.y-link--danger { color: var(--red-d); }
.y-row { display: flex; gap: 10px; margin-top: 16px; } .y-row > * { flex: 1; } .y-row--split { justify-content: space-between; align-items: center; } .y-row--split > * { flex: none; }
.y-col { display: grid; gap: 12px; margin-top: 16px; justify-items: center; }
.y-inline { display: flex; align-items: end; gap: 10px; } .y-inline .y-field { flex: 1; margin: 0; }
.y-field { display: grid; gap: 5px; margin-bottom: 13px; }
.y-field > span, .y-field__label { font-size: .84rem; font-weight: 700; color: var(--ink-2); } .y-field small, .y-small { font-size: .8rem; color: var(--ink-2); line-height: 1.35; }
/* ошибка у своего поля (Герман 17.11): отказ сервера и «Введи …» — под полем, поле с красной рамкой */
.y-ferr { margin: 1px 0 0; color: var(--red-d); font-size: .84rem; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; } .y-ferr:empty { display: none; }
.y-input[aria-invalid="true"] { border-color: var(--red-d); }
.y-ferr .y-ferr__go { min-height: 44px; margin: 0; padding: 0 .2em; font-size: .84rem; color: var(--accent-d); }
/* поле пароля с глазиком: глаз справа внутри поля, касание 46×44; у Edge свой глаз — второй не нужен */
.y-pw { position: relative; }
.y-pw .y-input { padding-right: 52px; }
.y-pw .y-input::-ms-reveal, .y-pw .y-input::-ms-clear { display: none; }
.y-pw__eye, .y-copy__btn { position: absolute; top: 2px; right: 2px; bottom: 2px; width: 46px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 0 14px 14px 0; background: none; color: var(--ink-2); }
.y-pw__eye:hover, .y-pw__eye[aria-pressed="true"], .y-copy__btn:hover { color: var(--accent); }
.y-svg { display: block; width: 22px; height: 22px; }
/* правила пароля под полем: кружок — ещё нет, зелёная галочка — выполнено, красный крестик — не выполнено после попытки */
.y-rules { margin: 4px 0 0; }
.y-rules ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.y-rule { display: flex; align-items: flex-start; gap: 8px; font-size: .8rem; font-weight: 600; line-height: 1.3; color: var(--ink-2); }
.y-rule__mark { flex: none; display: grid; place-items: center; width: 18px; height: 18px; margin-top: -1px; border: 2px solid #b9abe6; border-radius: 50%; background: #fff; color: #fff; transition: background .15s, border-color .15s; }
.y-rule__mark .y-svg { width: 12px; height: 12px; stroke-width: 3.2; }
.y-rule[data-state="ok"] { color: var(--ok); } .y-rule[data-state="ok"] .y-rule__mark { border-color: var(--ok); background: var(--ok); }
.y-rule[data-state="bad"] { color: var(--red-d); } .y-rule[data-state="bad"] .y-rule__mark { border-color: var(--red-d); background: var(--red-d); }
.y-rules__note { margin: 5px 0 0 26px; font-size: .76rem; line-height: 1.3; color: var(--ink-2); }
.y-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
/* поле «скопировать» (новый пароль после сброса): значок двух квадратов справа, после копирования — галочка */
.y-copy { position: relative; margin: 4px 0 10px; }
.y-copy .y-input { padding-right: 52px; font-size: 1.15rem; font-weight: 700; letter-spacing: .06em; }
.y-copy__btn.is-done { color: var(--ok); }
.y-copy__done { position: absolute; top: 50%; right: 50px; padding: 2px 6px; border-radius: 8px; background: #e3f3ea; color: var(--ok); font-size: .8rem; font-weight: 800; line-height: 1.2; transform: translateY(-50%); pointer-events: none; }
.y-copy__done:empty { display: none; }
.y-input { width: 100%; min-height: 48px; padding: .6em .9em; border: 2px solid var(--line); border-radius: 16px; background: #faf8ff; font-size: 16px; font-weight: 600; outline: none; transition: border-color .15s, background .15s; }
.y-input:focus { border-color: var(--accent); background: #fff; }
.y-input--link { font-size: .86rem; font-weight: 600; }
.y-textarea { min-height: 7em; resize: none; font-family: var(--hand); font-size: 1.5rem; line-height: 1.2; font-weight: 500; }
.y-cnt { display: block; margin: 4px 0 12px; text-align: right; font-size: .78rem; color: var(--ink-2); }
.y-err { min-height: 1.3em; margin: 0 0 10px; color: var(--red-d); font-size: .88rem; font-weight: 700; }
.y-p { margin: 0 0 12px; font-size: .95rem; line-height: 1.45; } .y-p--center { text-align: center; }
.y-lead { margin: 0 0 14px; font-size: .92rem; line-height: 1.4; color: var(--ink-2); }
.y-h3 { margin: 22px 0 10px; font-size: 1.05rem; font-weight: 800; }

/* ---------- листы ---------- */
.y-veil { position: fixed; inset: 0; z-index: 30; display: grid; align-items: end; justify-items: center; background: rgba(29, 18, 56, 0); transition: background .22s; }
.y-veil.is-on { background: rgba(29, 18, 56, .56); }
.y-sheet { width: min(100%, 34.5rem); max-height: 88dvh; display: grid; grid-template-rows: auto 1fr; border-radius: 28px 28px 0 0; background: #fff; box-shadow: 0 -8px 30px rgba(29, 18, 56, .3); transform: translateY(104%); transition: transform .26s cubic-bezier(.2, .9, .3, 1); }
.y-veil.is-on .y-sheet { transform: none; }
.y-sheet--wide { width: min(100%, 41rem); }
.y-sheet__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 16px 6px 22px; }
.y-sheet__title { margin: 0; font-size: 1.4rem; font-weight: 800; line-height: 1.15; }
.y-sheet__body { overflow-y: auto; overscroll-behavior: contain; padding: 8px 20px calc(22px + var(--safe-b)); }
.y-x { flex: none; width: max(44px, 2.9rem); height: max(44px, 2.9rem); border: 0; border-radius: 50%; background: var(--soft); position: relative; }
.y-x::before, .y-x::after { content: ""; position: absolute; left: 50%; top: 50%; width: 18px; height: 3px; margin: -1.5px 0 0 -9px; border-radius: 2px; background: var(--ink); transform: rotate(45deg); }
.y-x::after { transform: rotate(-45deg); }
@media (min-width: 720px) and (min-height: 560px) {
  .y-veil { align-items: center; }
  .y-sheet { border-radius: 28px; transform: translateY(24px) scale(.96); opacity: 0; transition: transform .22s, opacity .22s; }
  .y-veil.is-on .y-sheet { opacity: 1; }
}
.y-toast { position: fixed; left: 50%; bottom: calc(96px + var(--safe-b)); z-index: 60; max-width: min(92vw, 440px); padding: .7em 1.2em .75em; border-radius: 18px; background: var(--ink); color: #fff; font-size: .92rem; font-weight: 700; line-height: 1.3; text-align: center; box-shadow: 0 8px 20px rgba(29, 18, 56, .4); transform: translate(-50%, 24px); opacity: 0; pointer-events: none; transition: transform .22s, opacity .22s; }
.y-toast.is-on { transform: translate(-50%, 0); opacity: 1; }
.y-toast[data-kind="good"] { background: var(--ok); } .y-toast[data-kind="bad"] { background: var(--red-d); }

/* ---------- игры ---------- */
.y-games { display: grid; gap: 10px; }
.y-game, .y-wheelrow, .y-friend { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 12px 11px 9px; border: 0; border-radius: 20px; background: var(--soft); text-align: left; box-shadow: inset 0 -3px 0 var(--line); transition: transform .12s; }
.y-game:active, .y-wheelrow:active, .y-friend:active { transform: translateY(2px); }
.y-game__pic { flex: none; width: 3.85rem; height: 3.85rem; border-radius: 16px; background: linear-gradient(180deg, #3a2470, #24153f); display: grid; place-items: center; }
.y-game__pic img { width: 82%; height: 82%; object-fit: contain; filter: drop-shadow(0 3px 3px rgba(0, 0, 0, .3)); }
.y-game__text { flex: 1; min-width: 0; display: grid; gap: 1px; } .y-game__text b { font-size: 1.05rem; font-weight: 800; } .y-game__text span { font-size: .8rem; color: var(--ink-2); } .y-game__text small { font-size: .74rem; color: var(--accent); font-weight: 700; }
.y-game__go { flex: none; padding: .55em 1em .62em; border-radius: 99px; background: var(--accent); color: #fff; font-size: .88rem; font-weight: 800; box-shadow: 0 3px 0 #37189a; }
.y-wheelrow { margin-bottom: 12px; background: #fff1ea; box-shadow: inset 0 -3px 0 #ffd9c9; }
.y-wheelrow .y-wheelbtn__disc { flex: none; animation-duration: 6s; } .y-wheelrow .y-game__go { background: var(--red); box-shadow: 0 3px 0 var(--red-d); }

.y-play { position: fixed; inset: 0; z-index: 20; display: grid; grid-template-rows: auto auto 1fr; background: linear-gradient(180deg, rgba(29, 18, 56, .93) 0%, rgba(42, 26, 82, .9) 60%, rgba(58, 36, 112, .86) 100%), url(img/yard-tall.webp) center / cover no-repeat var(--night); color: #fff; --yg-paper: #f7f3ff; }
@media (min-aspect-ratio: 1/1) { .y-play { background-image: linear-gradient(180deg, rgba(29, 18, 56, .93) 0%, rgba(42, 26, 82, .9) 60%, rgba(58, 36, 112, .86) 100%), url(img/yard-wide.webp); } }
.y-play__bar { display: grid; grid-template-columns: auto 1fr auto auto auto; align-items: center; gap: 10px; width: min(100% - 20px, 61rem); margin: calc(8px + var(--safe-t)) auto 0; padding: 7px 14px 8px 7px; border-radius: 22px; background: #fff; color: var(--ink); box-shadow: inset 0 -3px 0 var(--line), 0 5px 0 rgba(0, 0, 0, .25); }
/* название и строка под ним («Ходы 14») стоят столбиком: длинное название не обрезается */
.y-play__bar { grid-template-columns: auto 1fr auto auto; grid-template-rows: auto auto; row-gap: 0; }
.y-play__bar .y-x { grid-column: 1; grid-row: 1 / 3; } .y-play__score { grid-column: 3; grid-row: 1 / 3; } .y-play__stars { grid-column: 4; grid-row: 1 / 3; }
.y-play__title { grid-column: 2; grid-row: 1; align-self: end; font-size: 1.05rem; font-weight: 800; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.y-play__left { grid-column: 2; grid-row: 2; align-self: start; font-size: .78rem; line-height: 1.2; color: var(--ink-2); white-space: nowrap; } .y-play__score { font-size: 1.08rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.y-play__tip { min-height: 1.5em; padding: 6px 16px 0; text-align: center; font-size: .84rem; color: #d9d2f3; }
.y-play__root { position: relative; overflow: hidden; width: min(100% - 16px, 61rem); margin: 6px auto calc(8px + var(--safe-b)); min-height: 0; }
.y-stars { display: inline-flex; gap: 3px; }
.y-stars i { width: 20px; height: 20px; background: #dcd4f3; -webkit-mask: var(--star) center / contain no-repeat; mask: var(--star) center / contain no-repeat; --star: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m12 1.8 3 6.5 7.1.8-5.3 4.8 1.5 7-6.3-3.6-6.3 3.6 1.5-7L1.9 9.1 9 8.3Z'/%3E%3C/svg%3E"); }
.y-stars i.is-on { background: var(--peach); }
.y-stars--big { display: flex; justify-content: center; gap: 10px; margin: 4px 0 6px; } .y-stars--big i { width: 3.6rem; height: 3.6rem; }
.y-stars--big i.is-on { animation: y-star .5s cubic-bezier(.3, 1.6, .5, 1) backwards; }
@keyframes y-star { from { transform: scale(0) rotate(-40deg); } to { transform: none; } }
.y-score { margin: 0 0 10px; text-align: center; font-size: 1.25rem; font-weight: 800; }
.y-prizes { display: flex; justify-content: center; gap: 12px; margin: 8px 0 4px; }
.y-prize { flex: 1; max-width: 190px; display: grid; justify-items: center; gap: 4px; padding: 14px 10px 14px; border-radius: 22px; background: var(--soft); box-shadow: inset 0 -4px 0 var(--line); animation: y-pop .45s cubic-bezier(.3, 1.5, .5, 1) backwards; }
.y-prize:nth-child(2) { animation-delay: .15s; }
.y-prize img { width: 6.1rem; height: 6.1rem; object-fit: contain; filter: drop-shadow(0 5px 5px rgba(29, 18, 56, .25)); }
.y-prize b { font-size: 1rem; font-weight: 800; text-align: center; }
@keyframes y-pop { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
.y-rar { padding: .12em .7em .2em; border-radius: 99px; background: #fff; font-size: .74rem; font-weight: 700; color: var(--ink-2); }
[data-r="rare"] .y-rar, [data-r="rare"] > span:last-child.y-rar { background: var(--accent); color: #fff; }
[data-r="special"] .y-rar { background: var(--red); color: #fff; }
.y-prize[data-r="rare"], .y-cell[data-r="rare"], .y-toycard[data-r="rare"] { background: #e6dcff; box-shadow: inset 0 -4px 0 #cdbdf7; }
.y-prize[data-r="special"], .y-cell[data-r="special"], .y-toycard[data-r="special"] { background: #ffe3dc; box-shadow: inset 0 -4px 0 #ffc6b8; }

.y-wheel { position: relative; width: min(74vw, 300px); aspect-ratio: 1; margin: 6px auto 14px; }
.y-wheel__disc { position: absolute; inset: 0; border-radius: 50%; border: 8px solid #fff; box-shadow: 0 0 0 4px var(--line), 0 10px 22px rgba(29, 18, 56, .25); transition: transform 4.2s cubic-bezier(.12, .72, .1, 1); }
.y-wheel__lab { position: absolute; left: 50%; top: 50%; width: 0; height: 0; }
.y-wheel__lab b { position: absolute; left: 0; bottom: 0; width: 8em; margin-left: -4em; padding-bottom: calc(min(74vw, 300px) * .27); color: #fff; font-size: .78rem; font-weight: 800; line-height: 1.05; text-align: center; text-shadow: 0 1px 2px rgba(29, 18, 56, .55); }
.y-wheel__pin { position: absolute; left: 50%; top: -10px; z-index: 2; width: 0; height: 0; margin-left: -13px; border: 13px solid transparent; border-top: 24px solid var(--ink); filter: drop-shadow(0 2px 0 #fff); }

/* низкий экран (телефон 390×664, ноутбук 1366×657): приз целиком помещается в лист без прокрутки */
@media (max-height: 700px) { .y-prize img { width: 4.6rem; height: 4.6rem; } .y-stars--big i { width: 2.9rem; height: 2.9rem; } .y-prize { padding: 10px 8px; } .y-sheet--prize .y-col { gap: 9px; margin-top: 12px; } .y-score { margin-bottom: 6px; } }

/* ---------- игрушки, друзья, лента ---------- */
.y-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 5px; margin-bottom: 14px; border-radius: 99px; background: var(--soft); }
.y-tabs button { min-height: 44px; border: 0; border-radius: 99px; background: none; font-weight: 800; font-size: .88rem; color: var(--ink-2); }
.y-tabs button[aria-selected="true"] { background: #fff; color: var(--ink); box-shadow: 0 2px 0 var(--line); }
.y-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(6.1rem, 1fr)); gap: 10px; }
.y-cell { display: grid; justify-items: center; gap: 4px; padding: 10px 6px 10px; border: 0; border-radius: 20px; background: var(--soft); box-shadow: inset 0 -4px 0 var(--line); text-align: center; }
.y-cell img { width: 4.25rem; height: 4.25rem; object-fit: contain; filter: drop-shadow(0 3px 3px rgba(29, 18, 56, .25)); }
.y-cell span { font-size: .76rem; font-weight: 700; line-height: 1.15; }
button.y-cell:active { transform: translateY(3px); }
.y-cell.is-none img { filter: brightness(0) opacity(.16); } .y-cell.is-none span { color: var(--ink-2); font-weight: 600; }
.y-toycard { display: grid; justify-items: center; gap: 6px; padding: 18px; border-radius: 24px; background: var(--soft); box-shadow: inset 0 -4px 0 var(--line); }
.y-toycard img { width: 8.8rem; height: 8.8rem; object-fit: contain; filter: drop-shadow(0 6px 6px rgba(29, 18, 56, .28)); }
.y-from { display: flex; align-items: center; gap: 12px; margin-top: 14px; } .y-from .ya { width: 46px; height: 46px; flex: none; }
.y-from b { display: block; font-size: 1rem; } .y-from span { font-size: .8rem; color: var(--ink-2); }
.y-note { margin: 12px 0 0; padding: 12px 16px 14px; border-radius: 18px; background: #fff4ee; font-family: var(--hand); font-size: 1.65rem; font-weight: 500; line-height: 1.15; color: #3a2470; white-space: pre-wrap; overflow-wrap: anywhere; }
.y-note--small { font-size: 1.35rem; padding: 8px 12px 10px; }
.y-locked { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding: 10px 14px; border-radius: 16px; background: var(--soft); font-size: .88rem; font-weight: 700; color: var(--accent-d); }
.y-noteto { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; } .y-noteto img { width: 64px; height: 64px; flex: none; } .y-noteto .y-p { margin: 0; font-size: .86rem; color: var(--ink-2); }
.y-friend { margin-bottom: 8px; padding: 8px 12px 10px 8px; } .y-friend .ya { width: 3.3rem; height: 3.3rem; flex: none; }
.y-friend__text { flex: 1; min-width: 0; display: grid; } .y-friend__text b { font-size: 1.02rem; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .y-friend__text span { font-size: .78rem; color: var(--ink-2); }
.y-mark { flex: none; padding: .3em .8em .38em; border-radius: 99px; background: #fff; font-size: .76rem; font-weight: 800; color: var(--accent); }
.y-mark--ok { color: var(--ok); background: #dff3e8; } .y-mark--gift { color: #fff; background: var(--red); }
.y-news { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 2px solid var(--soft); }
.y-news__pic { flex: none; width: 46px; height: 46px; object-fit: contain; }
.y-news > div { flex: 1; min-width: 0; } .y-news b { display: block; font-size: .96rem; font-weight: 800; line-height: 1.25; } .y-news span { font-size: .78rem; color: var(--ink-2); }
.y-news.is-new b::after { content: ""; display: inline-block; width: 9px; height: 9px; margin-left: 7px; border-radius: 50%; background: var(--red); vertical-align: 1px; }
/* пометка «команда» у имени человека из панели (team в ответах сервера): «В гости», шапка чужого двора, лента, даритель,
   «Мои подарки», приглашение — друг не выдаст себя за команду. Сиреневая, без жёлтого; в строке текста стоит после имени */
.y-teamtag { display: inline-block; padding: .17em .55em .22em; border-radius: 99px; background: #e6dcff; color: #3a1797; font-size: .7rem; font-weight: 800;
  line-height: 1.1; letter-spacing: .01em; vertical-align: .12em; white-space: nowrap; box-shadow: inset 0 0 0 1px #cdbdf7, inset 0 -2px 0 #cdbdf7; }   /* текст к фону APCA Lc 78 */
/* имя в одну строку («В гости», шапка чужого двора): длинное обрезается многоточием, пометка видна всегда */
.y-friend__text .y-who, .y-count .y-who { display: flex; align-items: center; gap: 6px; min-width: 0; }
.y-who > bdi { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.y-who > .y-teamtag { flex: none; }
/* то же в заголовке листа («Подарок: …», «Записка: …») и в полосе выбора ветки («Подарок: …») (доделки 17.11, S13).
   Колонка листа не шире самого листа: иначе заголовок в одну строку раздвигал лист за край экрана */
.y-sheet { grid-template-columns: minmax(0, 1fr); }
.y-sheet__title { min-width: 0; }
.y-sheet__title .y-who, .y-pick__text .y-who { display: flex; align-items: center; gap: 6px; min-width: 0; white-space: nowrap; }
.y-pick__text .y-who { gap: 5px; }
.y-who__head { flex: none; }
.y-toast .y-teamtag { margin: 0 .1em; }
.y-weak__out { display: block; margin: 14px auto 0; }
.y-count--who { min-width: 0; max-width: 100%; } .y-count--who > div { min-width: 0; }
.y-hint { display: block; margin: 5px 0 0; font-size: .8rem; line-height: 1.35; color: var(--ink-2); }

/* ---------- кабинет ---------- */
.y-me { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; } .y-me__ava { width: 68px; height: 68px; flex: none; }
.y-me b { display: block; font-size: 1.25rem; font-weight: 800; } .y-me span { display: block; font-size: .82rem; color: var(--ink-2); }
.y-avas { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 8px; }
.y-avabtn { aspect-ratio: 1; padding: 3px; border: 3px solid transparent; border-radius: 50%; background: none; } .y-avabtn.is-on { border-color: var(--accent); }
/* «Позвать друзей» — у любого игрока (Герман 17.11): за что награды, ссылка, копировать / поделиться / новая, счёт, пришедшие */
.y-invite { padding: 14px; border-radius: 20px; background: var(--soft); }
.y-invite__lead { margin: 0 0 10px; font-size: .9rem; line-height: 1.4; font-weight: 600; color: var(--ink); }
.y-invite .y-input { margin: 0 0 10px; background: #fff; }
.y-invite .y-small { color: #4f4172; }   /* на сиреневом блоке APCA Lc 80 (--ink-2 тут давал 74) */
.y-invite__sub { margin: 18px 0 2px; font-size: .95rem; font-weight: 800; color: var(--ink); }   /* админу: друзья по чужим ссылкам */
.y-invite__sub + .y-small { margin: 0; }
.y-invite__acts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.y-invite__acts .y-link { margin-left: auto; }
.y-invite__stats { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 2px; }
.y-pill { display: inline-block; padding: .38em .85em .42em; border-radius: 99px; background: #fff; font-size: .8rem; font-weight: 700; line-height: 1.2; color: var(--ink); box-shadow: inset 0 -2px 0 var(--line); }
.y-pill--rare { background: #e6dcff; color: #3a1797; box-shadow: inset 0 -2px 0 #cdbdf7; }   /* как пометка «команда»: APCA Lc 78 */
.y-list { display: grid; gap: 4px; margin-top: 8px; }
.y-invitee { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; column-gap: 10px; padding: 7px 0; border-top: 2px solid #fff; }
.y-invitee .ya { width: 40px; height: 40px; }
.y-invitee__text { min-width: 0; display: grid; gap: 1px; }
.y-invitee__text b { font-size: .95rem; font-weight: 800; } .y-invitee__text > span { font-size: .78rem; color: #4f4172; }   /* на сиреневом фоне блока APCA Lc 80 */
.y-invitee__text .y-who { display: flex; align-items: center; gap: 6px; min-width: 0; }
.y-invitee__acts { grid-column: 2 / -1; display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: -4px; }
.y-invitee__acts .y-link { padding-left: 0; padding-right: 0; }
.y-invite .y-link { color: var(--accent-d); } .y-invite .y-link--danger { color: #8a1b22; }   /* на сиреневом блоке APCA Lc 79 (#9e2229 давал 74,4 — R7) */
.y-invitee.is-off { opacity: .55; }
/* награда позвавшему за пришедшего: редкая — сиреневая с белой звездой, лейка — белая с картинкой лейки */
.y-rew { display: inline-flex; align-items: center; gap: 5px; padding: .3em .7em .34em .42em; border-radius: 99px; font-size: .74rem; font-weight: 800; line-height: 1.1; white-space: nowrap; }
.y-rew--rare { background: var(--accent); color: #fff; box-shadow: inset 0 -2px 0 var(--accent-d); }
.y-rew--can { background: #fff; color: var(--ink); box-shadow: inset 0 -2px 0 var(--line); }
.y-rew img { width: 1.4rem; height: 1.4rem; object-fit: contain; margin: -.2em 0; }
.y-rew__star { display: block; width: 1.05rem; height: 1.05rem; background: #fff; -webkit-mask: var(--star) center / contain no-repeat; mask: var(--star) center / contain no-repeat;
  --star: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m12 1.8 3 6.5 7.1.8-5.3 4.8 1.5 7-6.3-3.6-6.3 3.6 1.5-7L1.9 9.1 9 8.3Z'/%3E%3C/svg%3E"); }
.y-sent { display: flex; gap: 12px; padding: 8px 0; border-bottom: 2px solid var(--soft); } .y-sent img { width: 54px; height: 54px; flex: none; object-fit: contain; }
.y-sent b { display: block; font-size: .95rem; } .y-sent span { font-size: .78rem; color: var(--ink-2); } .y-sent > div { flex: 1; min-width: 0; }
.y-pass { padding: 14px; border-radius: 20px; background: var(--soft); } .y-pass .y-input { background: #fff; }
.y-pass .y-err:empty { display: none; }
/* «Подарки» в кабинете: вкладки «Тебе» / «От тебя», записка под замком до финала, пусто — как подарить и «В гости» */
.y-gifts .y-small { margin: 0; line-height: 1.45; }
.y-gifts__acts { margin-top: 12px; }
.y-sent__lock { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-size: .8rem; font-weight: 700; color: var(--accent-d); }
.y-sent__lock .y-ico--lock { width: 16px; height: 16px; }
.y-newpass__where { margin: 0; } .y-newpass__url { font-weight: 700; color: var(--ink); overflow-wrap: anywhere; }
.y-cardimg { display: block; width: min(100%, 320px); margin: 0 auto 14px; border-radius: 18px; box-shadow: 0 8px 20px rgba(29, 18, 56, .25); }

/* ---------- вход ---------- */
/* слой входа прокручивается только вниз: снег — рядом с ним (screens.js → shell), а вбок ничего не торчит (Герман 17.11) */
.yol-enter { position: absolute; inset: 0; overflow-x: hidden; overflow-y: auto; }
.y-enter { position: relative; width: min(100% - 28px, 28rem); margin: 0 auto; padding: calc(28px + var(--safe-t)) 0 calc(28px + var(--safe-b)); min-height: 100%; display: grid; align-content: center; gap: 16px; }
.y-enter__head { text-align: center; color: #fff; }
.y-enter__ava { width: 6.4rem; height: 6.4rem; margin: 0 auto 10px; border: 4px solid #fff; box-shadow: 0 8px 20px rgba(0, 0, 0, .3); }
.y-enter__head h1 { margin: 0; font-size: clamp(1.7rem, 7vmin, 2.4rem); font-weight: 800; line-height: 1.05; }
.y-enter__head p { margin: 6px 0 0; font-size: 1.05rem; color: #d9d2f3; }
.y-card { padding: 20px 20px 18px; border-radius: 28px; background: #fff; box-shadow: inset 0 -5px 0 var(--line), 0 8px 0 rgba(0, 0, 0, .22), 0 18px 30px rgba(0, 0, 0, .25); display: grid; }
.y-card .y-link { justify-self: center; margin-top: 6px; } .y-card .y-small { margin: 12px 0 0; text-align: center; }
.y-form { display: grid; }
.y-enter__tabs { margin: -4px -6px 16px; }
.y-team { margin: 0; text-align: center; font-size: .86rem; color: #c9bff0; } .y-team a { color: #fff; font-weight: 700; }

/* ---------- украшения двора (decor.js; замечание 2 Германа, 16.11) ---------- */
/* фон без избы, когда во дворе другой дом (картинка — переменной --bg: её же берут поля за краями сцены) */
.yol-scene.yd-nohut { --bg: url(/assets/yolochka/img/yard-tall-nohut.webp); }
@media (min-aspect-ratio: 1/1) { .yol-scene.yd-nohut { --bg: url(/assets/yolochka/img/yard-wide-nohut.webp); } }
.yd-layer { position: absolute; inset: 0; pointer-events: none; }
.yd-layer > * { pointer-events: auto; }
.yd-fence { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 300; pointer-events: none !important; overflow: visible; }   /* гирлянда идёт и по полям */
/* новый забор (v3, часть C): фон без нарисованного забора, забор — картинка полосы фона (decor.js → GEO.band); у широкого
   двора с избой изба отдельной картинкой поверх забора и гирлянды. Нажатие на забор ловит сцена (decor.js → wallHit) */
.yol-scene.yd-nofence { --bg: url(/assets/yolochka/img/yard-tall-nofence.webp); }
.yol-scene.yd-nofence.yd-nohut { --bg: url(/assets/yolochka/img/yard-tall-nohut-nofence.webp); }
@media (min-aspect-ratio: 1/1) {
  .yol-scene.yd-nofence { --bg: url(/assets/yolochka/img/yard-wide-nofence.webp); }
  .yol-scene.yd-nofence.yd-nohut { --bg: url(/assets/yolochka/img/yard-wide-nohut-nofence.webp); }
}
/* коробка забора: сам забор и отражённые полосы в полях за краями сцены; отражённый двор гостя отражает её целиком */
.yd-wallbox { position: absolute; inset: 0; z-index: 290; pointer-events: none !important; }
.yd-wall { position: absolute; left: 0; width: 100%; pointer-events: none !important; user-select: none; -webkit-user-drag: none; }
.yd-wallx { position: absolute; width: calc(12% + 3px); overflow: hidden; transform: scaleX(-1); pointer-events: none; }
.yd-wallx--l { left: -12%; } .yd-wallx--r { left: calc(100% - 3px); }
.yd-wallx__img { position: absolute; top: 0; height: 100%; width: calc(var(--scene-h) * var(--aspect)); max-width: none; user-select: none; -webkit-user-drag: none; }
.yd-wallx--l .yd-wallx__img { left: 0; } .yd-wallx--r .yd-wallx__img { right: 0; }
.yd-hutfront { position: absolute; z-index: 310; pointer-events: none !important; user-select: none; -webkit-user-drag: none; }
.yd-item, .yd-house { position: absolute; padding: 0; border: 0; background: none; transform: translate(-50%, -100%); touch-action: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.yd-pic { display: block; transform-origin: 50% 100%; }
.yd-item img, .yd-house img { display: block; width: 100%; pointer-events: none; user-select: none; -webkit-user-select: none; -webkit-user-drag: none;
  filter: drop-shadow(0 calc(var(--tree-h) * .012) calc(var(--tree-h) * .016) rgba(29, 18, 56, .3)); }
.yd-oldhouse { position: absolute; padding: 0; border: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
/* бобёр в наряде: картинка без полена, по росту */
.y-beaver.yd-look { width: auto; }
.y-beaver.yd-look img { width: auto; height: calc(var(--tree-h) * .29 * var(--lk, 1)); }   /* --lk: рост образа v3 (decor.js → LOOK_K) */
/* гирлянды на ёлке: нити по маске самой картинки ёлки, игрушки висят поверх */
.yd-gar { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none;
  -webkit-mask-size: 100% 100%; mask-size: 100% 100%; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; }
.yd-bulb { animation: yd-tw 2.6s ease-in-out infinite; }
.yt.is-lit .yd-bulb { animation-duration: 1.3s; }
@keyframes yd-tw { 0%, 100% { opacity: 1; } 50% { opacity: .5; } }
/* частицы нажатий */
.yd-fx { position: absolute; inset: 0; z-index: 3000; pointer-events: none; overflow: visible; }
.yd-p { position: absolute; display: block; background: currentColor; border-radius: 50%; pointer-events: none; will-change: transform, opacity; }
.yd-p--snow { box-shadow: 0 0 0 1px rgba(109, 63, 224, .22), 0 1px 3px rgba(29, 18, 56, .28); }
.yd-p--spark { border-radius: 0; clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%); filter: drop-shadow(0 0 2px rgba(255, 255, 255, .95)) drop-shadow(0 1px 2px rgba(29, 18, 56, .35)); }
.yd-p--heart { border-radius: 0; -webkit-mask: var(--heart) center / contain no-repeat; mask: var(--heart) center / contain no-repeat;
  --heart: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 22'%3E%3Cpath d='M12 21.3 10.6 20C5.4 15.4 2 12.3 2 8.5 2 5.4 4.4 3 7.5 3c1.7 0 3.4.8 4.5 2.1C13.1 3.8 14.8 3 16.5 3 19.6 3 22 5.4 22 8.5c0 3.8-3.4 6.9-8.6 11.5z'/%3E%3C/svg%3E"); }
.yd-p--chip { border-radius: 35% 20%; }
.yd-p--smoke { background: radial-gradient(circle, rgba(255, 255, 255, .95) 0, rgba(240, 236, 255, .7) 45%, rgba(240, 236, 255, 0) 70%); }
.yd-p--flash { background: radial-gradient(circle, rgba(255, 228, 210, .95) 0, rgba(255, 196, 170, .45) 35%, rgba(255, 196, 170, 0) 70%); mix-blend-mode: screen; }
/* кнопка «Украсить» под лейкой и колесом */
.y-deco img { object-fit: contain; }

/* режим «Украсить»: сцена поднимается над лотком (--yd-ty, --yd-s считает decor.js), остальной интерфейс прячется */
.yol-scene { transform-origin: 50% 0; transition: transform .38s cubic-bezier(.2, .9, .3, 1); }
body.y-decorating .yol-scene { transform: translate(-50%, -50%) translateY(var(--yd-ty, 0px)) scale(var(--yd-s, 1)); }
body.y-decorating .y-top, body.y-decorating .y-side, body.y-decorating .y-base, body.y-decorating .y-dock, body.y-decorating .y-beaver__say,
body.y-decorating .y-gift, body.y-decorating .y-under { display: none !important; }
body.y-decorating .yol-snow { opacity: .35; }
.yd-tray { position: absolute; z-index: 12; left: 50%; bottom: 0; transform: translateX(-50%); width: 100%; padding: 12px max(0px, (100% - 44rem) / 2) calc(14px + var(--safe-b)); border-radius: 28px 28px 0 0; background: #fff;
  box-shadow: 0 -8px 30px rgba(29, 18, 56, .3); animation: yd-up .34s cubic-bezier(.2, .9, .3, 1) both; }
.yd-tray.is-out { transform: translate(-50%, 105%); transition: transform .3s cubic-bezier(.5, 0, .8, .4); pointer-events: none; }
.yd-shield { position: fixed; inset: 0; z-index: 55; }   /* пока лоток уезжает: двойное нажатие «Готово» не жмёт то, что под ним */
@keyframes yd-up { from { transform: translate(-50%, 105%); } }
.yd-head { display: flex; align-items: center; gap: 8px; margin: 0 12px 10px; }
.yd-tabs { flex: 1; min-width: 0; display: grid; grid-template-columns: repeat(5, auto); gap: 2px; padding: 4px; border-radius: 99px; background: var(--soft); }
.yd-tabs button { min-height: 40px; padding: 0 .55em; border: 0; border-radius: 99px; background: none; font: inherit; font-weight: 800; font-size: .8rem; color: var(--ink-2); white-space: nowrap; }
/* пять вкладок (v3: «Забор») на узком телефоне — поуже */
@media (max-width: 430px) { .yd-tabs button { padding: 0 .36em; font-size: .76rem; } .yd-head { gap: 6px; margin: 0 8px 10px; } }
.yd-tabs button[aria-selected="true"] { background: #fff; color: var(--ink); box-shadow: 0 2px 0 var(--line); }
.yd-done { flex: none; }
.yd-group + .yd-group { margin-top: 6px; }
/* два ряда (вкладки «Ёлка» и «Забор») на широком экране — рядом: лоток ниже, ёлка над ним целиком */
@media (min-aspect-ratio: 1/1) and (min-width: 720px) {
  .yd-body--two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 12px; align-items: start; }
  .yd-body--two > .yd-group + .yd-group { margin-top: 0; }
}
.yd-label { margin: 0 12px 4px 16px; font-size: .74rem; font-weight: 800; color: var(--ink-2); }
.yd-row { display: flex; gap: 8px; overflow-x: auto; padding: 2px 12px 6px; scrollbar-width: none; touch-action: pan-x; overscroll-behavior-x: contain; }
.yd-row::-webkit-scrollbar { display: none; }
.yd-row.is-dragging { cursor: grabbing; }
.yd-row.is-dragging .yd-cell { pointer-events: none; }
/* ряд, который не влез: стрелки по краям и угасающий край — видно, что дальше есть ещё */
.yd-rowwrap { position: relative; }
.yd-arrow { position: absolute; top: 50%; z-index: 2; display: none; place-items: center; width: 2.75rem; height: 2.75rem; margin-top: -1.6rem; padding: 0; border: 0; border-radius: 50%;
  background: #fff; box-shadow: inset 0 -3px 0 var(--line), 0 3px 0 rgba(29, 18, 56, .18), 0 6px 14px rgba(29, 18, 56, .22); }
.yd-arrow::before { content: ""; width: .62rem; height: .62rem; border: solid var(--ink); border-width: 0 3px 3px 0; border-radius: 2px; transform: translateX(.12rem) rotate(135deg); }
.yd-arrow--next::before { transform: translateX(-.12rem) rotate(-45deg); }
.yd-arrow--prev { left: 6px; } .yd-arrow--next { right: 6px; }
.yd-arrow:active { transform: translateY(2px); }
.has-prev > .yd-arrow--prev, .has-next > .yd-arrow--next { display: grid; }
.has-next > .yd-row { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 3.5rem), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 3.5rem), transparent); }
.has-prev > .yd-row { -webkit-mask-image: linear-gradient(to left, #000 calc(100% - 3.5rem), transparent); mask-image: linear-gradient(to left, #000 calc(100% - 3.5rem), transparent); }
.has-prev.has-next > .yd-row { -webkit-mask-image: linear-gradient(to right, transparent, #000 3.5rem, #000 calc(100% - 3.5rem), transparent); mask-image: linear-gradient(to right, transparent, #000 3.5rem, #000 calc(100% - 3.5rem), transparent); }
/* мышью ряд листается и полосой прокрутки */
@media (pointer: fine) {
  .yd-row { scrollbar-width: thin; scrollbar-color: #c9bdee transparent; padding-bottom: 8px; }
  .yd-row::-webkit-scrollbar { display: block; height: 6px; }
  .yd-row::-webkit-scrollbar-thumb { border-radius: 99px; background: #c9bdee; }
}
.yd-cell { position: relative; flex: none; width: 5.2rem; display: grid; justify-items: center; align-content: start; gap: 3px; padding: 8px 4px; border: 0; border-radius: 18px; background: var(--soft); box-shadow: inset 0 -4px 0 var(--line); font: inherit; color: var(--ink); text-align: center; touch-action: pan-x; user-select: none; -webkit-user-select: none; }
.yd-cell__pic { position: relative; display: grid; place-items: center; width: 3.6rem; height: 3.6rem; }
.yd-cell__pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 3px 3px rgba(29, 18, 56, .22)); pointer-events: none; -webkit-user-drag: none; }
.yd-cell__name { font-size: .7rem; font-weight: 700; line-height: 1.12; }
.yd-cell__lock { font-size: .66rem; font-weight: 700; color: var(--accent); }
.yd-cell__n { position: absolute; right: 4px; top: 4px; min-width: 1.6em; padding: .1em .35em; border-radius: 99px; background: #fff; font-size: .7rem; font-weight: 800; box-shadow: 0 1px 0 var(--line); }
.yd-cell.is-sel { background: #e6dcff; box-shadow: inset 0 0 0 3px var(--accent), inset 0 -4px 0 #cdbdf7; }
/* несобранное и вещи закрытых наборов — под замком (фидбек 17.11: гирлянды-нити были цветными, будто уже есть): силуэт и
   у картинок, и у нарисованных гирлянд, значок замка в углу */
.yd-cell.is-locked .yd-cell__pic img, .yd-cell.is-locked .yd-cell__pic .yd-gico { filter: brightness(0) opacity(.16); }
.yd-cell.is-locked .yd-cell__name { color: var(--ink-2); font-weight: 600; }
.yd-cell__lockico { position: absolute; right: -6px; top: -4px; width: 17px; height: 17px; }
.yd-gico svg { display: block; width: 3.5rem; height: auto; overflow: visible; }
.yd-cell__note { font-size: .62rem; font-weight: 700; line-height: 1.1; color: var(--accent-d); }
/* шапка ряда: подсказка и кнопка «Править» (крестики у вещей и своих игрушек) или «Под ёлку» */
/* узко (телефон с двумя кнопками, половина лотка на компьютере) — кнопки уходят строкой ниже, подсказка не дробится на 5 строк */
.yd-headrow { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 4px 8px; min-height: 36px; margin: 0 12px 4px 16px; }
.yd-headrow .yd-label { flex: 1 1 13em; min-width: 0; margin: 0; }
.yd-headbtns { flex: none; display: flex; gap: 8px; }
.yd-hint { line-height: 1.25; }
.yd-chip { position: relative; flex: none; display: inline-flex; align-items: center; gap: 5px; min-height: 34px; padding: .25em .85em .3em .65em; border: 0; border-radius: 99px; background: var(--soft);
  color: var(--ink); font: inherit; font-size: .78rem; font-weight: 800; line-height: 1; white-space: nowrap; box-shadow: inset 0 -2px 0 var(--line); transition: background .15s, color .15s; }
.yd-chip::after { content: ""; position: absolute; inset: -5px -2px; }   /* зона нажатия 44 px по высоте */
.yd-chip:active { transform: translateY(1px); }
.yd-chip.is-on { background: var(--accent); color: #fff; box-shadow: inset 0 -2px 0 var(--accent-d); }
.yd-chip__ico { width: 15px; height: 15px; background: currentColor;
  -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat;
  --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 17.25V21h3.75L17.81 9.94l-3.75-3.75Zm17.71-10.2a1 1 0 0 0 0-1.42l-2.34-2.34a1 1 0 0 0-1.42 0l-1.83 1.83 3.75 3.75Z'/%3E%3C/svg%3E"); }
/* пустой запас на вкладке «Ёлка» */
.yd-empty { flex: none; display: grid; align-content: center; gap: 3px; min-height: 5.4rem; padding: 8px 16px; border-radius: 18px; background: var(--soft); color: var(--ink-2); font-size: .74rem; line-height: 1.2; }
.yd-empty b { color: var(--ink); font-size: .82rem; }
/* предметы в режиме украшения: кольцо под ногами, перетаскиваемый; «Править» — крестик «убрать в запас» у каждого: красный
   круг 30 px, зона нажатия 44 px (в «Украсить» сцена чуть уменьшена, на экране не меньше 40) */
body.y-decorating .yd-item::after { content: ""; position: absolute; left: 6%; right: 6%; bottom: -5%; height: calc(var(--tree-h) * .045); border: 2px dashed rgba(109, 63, 224, .75); border-radius: 50%; z-index: -1; }
.yd-item.is-drag .yd-pic { transform: translateY(-7%) scale(1.08); filter: drop-shadow(0 calc(var(--tree-h) * .05) calc(var(--tree-h) * .03) rgba(29, 18, 56, .3)); transition: transform .12s; }
.yd-x, .yt-x { position: absolute; z-index: 4500; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; transform: translate(-50%, -50%); cursor: pointer;
  background: radial-gradient(circle, var(--red) 0 12px, #fff 12.5px 14.5px, rgba(255, 255, 255, 0) 15px); filter: drop-shadow(0 2px 2px rgba(29, 18, 56, .35));
  animation: yd-xin .3s cubic-bezier(.3, 1.6, .5, 1) backwards; -webkit-tap-highlight-color: transparent; }
@keyframes yd-xin { from { transform: translate(-50%, -50%) scale(.4); opacity: 0; } }
.yd-x::before, .yd-x::after, .yt-x::before, .yt-x::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 2.6px; margin: -1.3px 0 0 -6px; border-radius: 2px; background: #fff; transform: rotate(45deg); }
.yd-x::after, .yt-x::after { transform: rotate(-45deg); }
.yd-x:active, .yt-x:active { transform: translate(-50%, -50%) scale(.92); }
/* у игрушки на ёлке крестик поменьше и в её правом верхнем углу */
.yt-x { width: 34px; height: 34px; margin: calc(var(--toy) * -.08) 0 0 calc(var(--toy) * .4); background: radial-gradient(circle, var(--red) 0 9.5px, #fff 10px 12px, rgba(255, 255, 255, 0) 12.5px); }
.yt-x::before, .yt-x::after { width: 10px; margin-left: -5px; }
/* своя ёлка на вкладке «Ёлка»: свободные ветки видны тихо, а когда игрушка в руке — зовут нажать; игрушка в руке в кольце */
.yt.is-edit .yt-toy, .yt.is-edit .yt-slot { touch-action: none; }
.yt-slot--edit { border-width: 2px; background: rgba(255, 255, 255, .16); box-shadow: none; opacity: .75; animation: none; transform: translate(-50%, -16%) scale(.6); }
.yt.is-hand .yt-slot--edit { opacity: 1; background: rgba(255, 255, 255, .3); box-shadow: 0 0 0 3px rgba(109, 63, 224, .4); animation: yt-slot-ed 1.3s ease-in-out infinite; }
@keyframes yt-slot-ed { 0%, 100% { transform: translate(-50%, -16%) scale(.56); } 50% { transform: translate(-50%, -16%) scale(.76); } }
.yt-toy.is-hand::before { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 3px var(--accent), 0 0 12px rgba(255, 255, 255, .8); pointer-events: none; }
.yt-toy.is-hand img { animation: yt-sway .5s ease-in-out infinite alternate; }
.yt-toy.is-lift { opacity: .28; }
.yt-slot.is-target { opacity: 1; background: rgba(255, 255, 255, .55); box-shadow: 0 0 0 5px var(--accent); animation: none; transform: translate(-50%, -16%) scale(1.05); }
.yt-toy.is-target::before { content: ""; position: absolute; inset: -6px; border-radius: 50%; box-shadow: 0 0 0 4px var(--accent); pointer-events: none; }
.yt-toy.is-moved img { animation: yt-moved .5s cubic-bezier(.3, 1.5, .5, 1), yt-sway 5s ease-in-out .5s infinite alternate; }
@keyframes yt-moved { 0% { transform: scale(.55) rotate(-12deg); } 60% { transform: scale(1.12) rotate(6deg); } 100% { transform: none; } }
.yd-ghost { position: fixed; left: 0; top: 0; z-index: 40; pointer-events: none; object-fit: contain; filter: drop-shadow(0 10px 10px rgba(29, 18, 56, .4)); will-change: transform; }
/* приз-украшение; в гостях облачко бобра не нужно */
.y-prize[data-d] { background: #e6dcff; box-shadow: inset 0 -4px 0 #cdbdf7; }
.y-prize .yd-gico--big { display: grid; place-items: center; width: 6.1rem; height: 6.1rem; }
.y-prize .yd-gico--big svg { width: 6.1rem; }
#yol[data-view="guest"] .y-beaver__say { display: none; }

/* ---------- приглашения для всех, знакомство, указатель (решения Германа 17.11) ---------- */
/* меню кабинета: «Позвать друзей» (к блоку ниже) и «Как играть» (знакомство заново) */
.y-menu { display: flex; flex-wrap: wrap; gap: 8px; margin: -2px 0 18px; }
/* «Написать разработчикам» (17.11): поле обычным шрифтом — сообщение бывает длинным; счётчик справа, ошибка под полем */
.y-fb { display: grid; gap: 8px; }
.y-fb__lead { margin: 0 0 4px; }
.y-fb__text { min-height: 9.5em; resize: vertical; line-height: 1.38; font-weight: 500; }
.y-fb__count { justify-self: end; margin: 0; font-variant-numeric: tabular-nums; }
.y-fb__err { margin: 0; font-size: .86rem; font-weight: 700; line-height: 1.35; color: var(--red-d); }
.y-fb .y-btn--wide { margin-top: 4px; }
.y-chip { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: .4em 1.05em .45em .5em; border: 0; border-radius: 99px; background: var(--soft); color: var(--ink);
  font-weight: 800; font-size: .9rem; line-height: 1.1; box-shadow: inset 0 -3px 0 var(--line); transition: transform .12s; }
.y-chip img { width: 1.8rem; height: 1.8rem; object-fit: contain; filter: drop-shadow(0 2px 2px rgba(29, 18, 56, .22)); }
.y-chip:active { transform: translateY(2px); }
.y-me span.y-me__by { display: flex; flex-wrap: wrap; align-items: center; gap: 0 5px; }
.y-friends__invite { margin-top: 10px; }
/* регистрация по ссылке: под «Тебя зовёт …» — что дают за приход */
.y-enter__head .y-enter__gift { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; margin: 12px auto 0; padding: .3em 1.05em .34em .4em; border-radius: 99px;
  background: rgba(255, 255, 255, .16); color: #fff; font-size: .86rem; font-weight: 700; line-height: 1.2; text-align: left; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .28); }
.y-enter__gift img { flex: none; width: 2.1rem; height: 2.1rem; object-fit: contain; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .3)); }

/* знакомство: три окна по одному, картинки из графики игры */
.y-sheet--onb { width: min(100%, 31rem); }
.y-onb.is-in > * { animation: y-onb-in .34s cubic-bezier(.2, .9, .3, 1) backwards; }
.y-onb.is-in > :nth-child(2) { animation-delay: .05s; } .y-onb.is-in > :nth-child(n+3) { animation-delay: .09s; }
@keyframes y-onb-in { from { opacity: 0; transform: translateY(10px); } }
.y-onb__pic { position: relative; height: clamp(8.5rem, 26dvh, 12.5rem); border-radius: 24px; overflow: hidden;
  background: radial-gradient(120% 90% at 50% 105%, #fff 0%, #f1ecff 42%, #ddd2fb 100%); box-shadow: inset 0 -4px 0 var(--line); }
.y-onb__pic img { position: absolute; display: block; object-fit: contain; user-select: none; -webkit-user-drag: none; filter: drop-shadow(0 5px 6px rgba(29, 18, 56, .25)); }
.y-onb__treebox { position: absolute; left: 50%; bottom: 5%; height: 90%; transform: translateX(-50%); }
.y-onb__treebox .y-onb__tree { position: absolute; inset: 0; width: 100%; height: 100%; }
.y-onb__treebox .y-onb__toy { width: 21%; transform: translate(-50%, -16%); filter: drop-shadow(0 2px 2px rgba(20, 10, 40, .35)); }
.y-onb__can { position: absolute; left: 6%; top: 10%; width: 25%; max-width: 6.5rem; aspect-ratio: 1; transform: rotate(24deg); animation: y-onb-pour 2.4s ease-in-out infinite; }
.y-onb__can img { position: static; width: 100%; transform: scaleX(-1); }
.y-onb__can i { position: absolute; right: -8%; top: 58%; width: 8%; aspect-ratio: 1 / 1.4; border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%; background: #a9dcff; animation: y-drop .9s ease-in infinite; }
.y-onb__can i:nth-child(3) { right: -2%; animation-delay: .3s; } .y-onb__can i:nth-child(4) { right: -14%; animation-delay: .6s; }
@keyframes y-onb-pour { 0%, 100% { transform: rotate(18deg); } 50% { transform: rotate(30deg); } }
.y-onb__stars { position: absolute; left: 50%; top: 9%; display: flex; gap: 6%; width: 60%; justify-content: center; transform: translateX(-50%); }
.y-onb__stars i { width: 22%; max-width: 3.2rem; aspect-ratio: 1; background: var(--peach); filter: drop-shadow(0 3px 0 #e2643f);
  -webkit-mask: var(--star) center / contain no-repeat; mask: var(--star) center / contain no-repeat; animation: y-star .5s cubic-bezier(.3, 1.6, .5, 1) backwards;
  --star: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m12 1.8 3 6.5 7.1.8-5.3 4.8 1.5 7-6.3-3.6-6.3 3.6 1.5-7L1.9 9.1 9 8.3Z'/%3E%3C/svg%3E"); }
.y-onb__stars i:nth-child(2) { animation-delay: .14s; margin-top: -4%; } .y-onb__stars i:nth-child(3) { animation-delay: .28s; }
.y-onb__prizes { position: absolute; left: 30%; right: 4%; bottom: 7%; height: 46%; display: flex; align-items: flex-end; justify-content: space-around; }
.y-onb__prizes img { position: static; height: 86%; max-width: 30%; }
.y-onb__prizes img:nth-child(2) { height: 76%; margin-bottom: 6%; }
.y-onb__beaver { left: 3%; bottom: -4%; width: 31%; max-width: 8rem; }
.y-onb__gift { left: 17%; bottom: 7%; height: 68%; transform: rotate(-6deg); }
.y-onb__pic--gifts .y-onb__toy--d { left: 57%; top: 13%; width: 21%; max-width: 5rem; transform: rotate(8deg); }
.y-onb__note { position: absolute; right: 7%; bottom: 10%; display: grid; justify-items: center; gap: 2px; padding: .55em .8em .5em; border-radius: 10px 14px 12px 10px; background: #fff4ee;
  box-shadow: 0 4px 0 #f1d9cc, 0 8px 14px rgba(29, 18, 56, .2); transform: rotate(-5deg); }
.y-onb__note b { font-family: var(--hand); font-size: 1.5rem; font-weight: 700; line-height: 1; color: #3a2470; }
.y-onb__note .y-ico--lock { width: 22px; height: 22px; }
.y-onb__text { margin: 16px 2px 4px; }
.y-onb__text p { margin: 0 0 6px; font-size: 1rem; line-height: 1.42; font-weight: 600; color: var(--ink); }
.y-onb__dots { display: flex; justify-content: center; gap: 8px; margin: 10px 0 2px; }
.y-onb__dots i { width: 9px; height: 9px; border-radius: 50%; background: #d6ccf3; transition: background .2s, width .2s; }
.y-onb__dots i.is-on { width: 24px; border-radius: 99px; background: var(--accent); }
.y-onb .y-row { margin-top: 14px; }
@media (max-height: 700px) { .y-onb__pic { height: clamp(8rem, 24dvh, 10.5rem); } .y-onb__text { margin-top: 12px; } .y-onb__text p { font-size: .95rem; } }

/* подарок за приход по приглашению */
.y-sheet--gift { width: min(100%, 26rem); }
.y-gift-card img { animation: y-pop .5s cubic-bezier(.3, 1.5, .5, 1) .05s backwards; }
.y-gift-text { margin: 14px 0 6px; font-size: 1.02rem; font-weight: 700; }

/* указатель «Боброкарта → / ← Студенты» (decor.js): стоит за забором сбоку, надписи текстом поверх досок.
   Картинка — за забором и ёлкой (290), доски с надписями — тем же размером поверх сцены (2900, ниже частиц 3000):
   прозрачный край коробки ёлки не забирает нажатие по доске (R1, 17.11) */
.yd-layer > .y-sign { position: absolute; z-index: 290; pointer-events: none; }
.yd-layer > .y-sign--boards { z-index: 2900; }
.y-sign__body { position: absolute; inset: 0; transform-origin: 50% 92%; }
.y-sign__img { display: block; width: 100%; height: 100%; pointer-events: none; user-select: none; -webkit-user-drag: none;
  filter: drop-shadow(0 calc(var(--tree-h) * .01) calc(var(--tree-h) * .016) rgba(29, 18, 56, .3)); }
.y-sign__board { position: absolute; padding: 0; border: 0; background: none; pointer-events: auto; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
/* зона нажатия — по лицевой плоскости доски, не ниже 40 px (и не больше половины расстояния между досками) */
.y-sign__board--karta { left: 8.23%; width: 87.73%; top: calc(33.505% - min(12.2%, max(20px, 6.955%))); height: min(24.4%, max(40px, 13.91%)); }
.y-sign__board--students { left: 2.45%; width: 78.36%; top: calc(57.99% - min(12.2%, max(20px, 7.22%))); height: min(24.4%, max(40px, 14.44%)); }
.y-sign__face { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 0 3.5% 0 2%; }
.y-sign__board--students .y-sign__face { padding: 0 2% 0 3.5%; }
.y-sign__text { display: block; font-family: var(--font); font-weight: 700; font-size: 12px; line-height: 1; white-space: nowrap; color: #fff5e8; letter-spacing: .003em;
  text-shadow: 0 1px 0 rgba(74, 26, 10, .85), 0 1.5px 3px rgba(52, 18, 6, .6); transition: transform .15s; }
.y-sign__board:focus-visible { outline: 3px solid #fff; outline-offset: -2px; border-radius: 10px; }
@media (hover: hover) { .y-sign__board:hover .y-sign__text { transform: scale(1.06); } }
.y-sign__board:active .y-sign__text { transform: scale(.96); }
body.y-decorating .y-sign__board { pointer-events: none; }

/* окна указателя: картинка, пара строк, «Перейти» и «Отмена» */
.y-sheet--promo { width: min(100%, 30rem); }
.y-promo__pic { position: relative; height: clamp(8.5rem, 30dvh, 13rem); margin: 0 0 14px; border-radius: 24px; overflow: hidden;
  background: radial-gradient(110% 95% at 50% 100%, #fff 0%, #ece6ff 48%, #d6cafb 100%); box-shadow: inset 0 -4px 0 var(--line); }
.y-promo__pic img { position: absolute; left: 8%; top: 4%; width: 84%; height: 92%; object-fit: contain; filter: drop-shadow(0 8px 10px rgba(29, 18, 56, .22)); }
.y-sheet--promo-karta .y-promo__pic img { top: 6%; height: 94%; object-position: 50% 100%; }
.y-sheet--promo-students .y-promo__pic img { top: 4%; height: 94%; object-position: 50% 100%; }
.y-promo__text { margin: 0 2px 4px; font-size: 1rem; line-height: 1.45; font-weight: 600; }
.y-sheet--promo .y-row { margin-top: 14px; }
.y-sheet--promo .y-row > .y-btn { white-space: nowrap; padding-left: .9em; padding-right: .9em; }
.y-sheet--promo .y-row > .y-btn--soft { flex: .7; }


/* ---------- лист «Игры»: 14 игр (часть B v3, 17.11) ----------
   Герман: «если там с прокруткой, чтобы там все хорошо работало в списке игр». Строки ниже и плотнее (на 390×664 сверху
   мешок, колесо и первые три игры без прокрутки), на телефоне лист выше. Тени у краёв показывают, что есть ещё: тень
   появляется, только когда в ту сторону можно листать (фон с background-attachment: local закрывает её у края списка).
   На ноутбуке лист шире и игры в два столбца. Отклик на наведение — без стрелок: строка светлеет, значок подпрыгивает. */
.y-games { gap: 8px; }
.y-games .y-game { gap: 10px; padding: 7px 10px 9px 7px; border-radius: 18px; transition: transform .12s, background-color .15s, box-shadow .15s; }
.y-games .y-game__pic { width: 3.3rem; height: 3.3rem; border-radius: 14px; overflow: hidden; }
.y-games .y-game__pic img { width: 86%; height: 86%; transition: transform .18s cubic-bezier(.3, 1.6, .5, 1); }
.y-games .y-game__text b { font-size: 1rem; line-height: 1.2; }
.y-games .y-game__text span { font-size: .78rem; line-height: 1.25; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
.y-games .y-game__text small { font-size: .72rem; line-height: 1.2; }
.y-games .y-game__go { padding: .5em .95em .56em; font-size: .85rem; }
.y-sheet--games .y-sheet__body {
  scrollbar-width: thin; scrollbar-color: #c9bdee transparent; scroll-padding: 12px;
  background: linear-gradient(#fff 35%, rgba(255, 255, 255, 0)) top / 100% 28px no-repeat local,
    linear-gradient(rgba(255, 255, 255, 0), #fff 65%) bottom / 100% 28px no-repeat local,
    radial-gradient(farthest-side at 50% 0, rgba(36, 21, 63, .2), rgba(36, 21, 63, 0)) top / 100% 12px no-repeat scroll,
    radial-gradient(farthest-side at 50% 100%, rgba(36, 21, 63, .2), rgba(36, 21, 63, 0)) bottom / 100% 12px no-repeat scroll;
  background-color: #fff;
}
.y-sheet--games .y-sheet__body::-webkit-scrollbar { width: 8px; }
.y-sheet--games .y-sheet__body::-webkit-scrollbar-thumb { border-radius: 99px; background: #c9bdee; border: 2px solid #fff; }
@media (max-width: 719px), (max-height: 559px) { .y-sheet--games { max-height: 92dvh; } }
@media (min-width: 720px) and (min-height: 560px) {
  .y-sheet--games { width: min(100% - 40px, 47rem); }
  .y-games { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; }
}
@media (pointer: fine) {
  .y-games .y-game:hover { background: #e6dcff; box-shadow: inset 0 -3px 0 #cdbdf7; }
  .y-games .y-game:hover .y-game__pic img { transform: translateY(-3px) scale(1.07); }
  .y-games .y-game:hover .y-game__go { background: var(--accent-d); }
}
.y-games .y-game:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* подсказка после знакомства: стрелка на кнопку «Игры» (screens.js, gamesHint). Свой слой над двором, нажатия не забирает */
.y-garrow { position: fixed; z-index: 4500; transform: translate(-50%, -100%); pointer-events: none; transition: opacity .25s; animation: y-garrow-in .35s ease-out; }
.y-garrow.is-out { opacity: 0; }
.y-garrow__in { position: relative; display: grid; gap: 1px; justify-items: center; padding: .55em 1.1em .6em; border-radius: 18px; background: #fff; color: var(--ink); text-align: center; white-space: nowrap;
  box-shadow: inset 0 -3px 0 var(--line), 0 4px 0 rgba(29, 18, 56, .3), 0 12px 20px rgba(29, 18, 56, .3); animation: y-garrow-bob 1.1s ease-in-out infinite; }
.y-garrow__in b { font-size: 1.02rem; font-weight: 800; line-height: 1.1; } .y-garrow__in span { font-size: .78rem; font-weight: 700; color: var(--ink-2); }
.y-garrow__in i { position: absolute; left: calc(50% + var(--dx, 0px)); bottom: -11px; width: 22px; height: 22px; margin-left: -11px; background: #fff; transform: rotate(45deg); border-radius: 0 0 6px 0; }
@keyframes y-garrow-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
@keyframes y-garrow-in { from { opacity: 0; margin-top: 14px; } }
