:root {
  --pink: #ff86ad; --pink-d: #e8417a; --mint: #7fdcc0; --lav: #c5a3ff; --peach: #ffc6a0; --sun: #ffe27a;
  --ink: #5a3f6b; --card: #fffaff; --shadow: 0 6px 0 rgba(160, 110, 190, .25), 0 10px 24px rgba(160, 110, 190, .25);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; }
body {
  font-family: ui-rounded, 'SF Pro Rounded', 'Nunito', system-ui, sans-serif; font-weight: 800; color: var(--ink);
  background: linear-gradient(180deg, #ffe6f1, #e8f7ff); user-select: none; -webkit-user-select: none; touch-action: none;
}
button { font: inherit; color: inherit; border: 0; cursor: pointer; background: none; touch-action: manipulation; }
svg { display: block; }

/* ---------- мир ---------- */
#world { position: absolute; left: 50%; top: 50%; width: 1600px; height: 1000px; transform-origin: center; overflow: hidden; border-radius: 28px; background: #bfe6ff; }
#scene { position: absolute; inset: 0; }
#actors { position: absolute; inset: 0; pointer-events: none; }
#tint { position: absolute; inset: 0; z-index: 5000; pointer-events: none; background: rgba(46, 32, 120, .42); mix-blend-mode: multiply; opacity: 0; transition: opacity 2s; }
.night #tint { opacity: 1; }
.w-rain #tint { opacity: .35; background: rgba(110, 120, 160, .5); }
.night.w-rain #tint { opacity: 1; }
#weather { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 10; }

.prop { position: absolute; }
.prop svg, .furn svg { width: 100%; height: auto; overflow: visible; }
.building, .tree, .flower, .bench, .furn, .prop[class*=" "] { cursor: pointer; }

/* небо */
.sky { position: absolute; inset: 0; overflow: hidden; background: linear-gradient(#a9dcff, #fde3f1); }
.sky.big { height: 640px; bottom: auto; }
.sky::before, .sky::after { content: ''; position: absolute; inset: 0; opacity: 0; transition: opacity 2s; }
.sky::before { background: linear-gradient(#1f1a55, #5b3f93 70%, #9a64b8); }
.sky::after { background: linear-gradient(#aeb6cc, #dfe3ee); }
.night .sky::before { opacity: 1; }
.w-rain .sky::after, .w-snow .sky::after { opacity: .85; }
.night.w-rain .sky::after, .night.w-snow .sky::after { opacity: .25; }
.sun { position: absolute; right: 10%; top: 12%; width: 120px; height: 120px; border-radius: 50%; background: radial-gradient(#fff6b0, #ffd36e); box-shadow: 0 0 60px 30px rgba(255, 230, 120, .6); z-index: 1; transition: transform 2s, opacity 2s; animation: pulse-sun 4s ease-in-out infinite; }
.moon { position: absolute; right: 14%; top: 12%; width: 100px; height: 100px; border-radius: 50%; box-shadow: -22px 10px 0 0 #fff4c2; transform: translateY(300px); opacity: 0; transition: transform 2s, opacity 2s; z-index: 1; }
.night .sun, .w-rain .sun, .w-snow .sun { transform: translateY(300px); opacity: 0; }
.night .moon { transform: none; opacity: 1; }
.stars { position: absolute; inset: 0; opacity: 0; transition: opacity 2s; z-index: 1;
  background: radial-gradient(2px 2px at 10% 20%, #fff, transparent), radial-gradient(2px 2px at 30% 10%, #fff, transparent), radial-gradient(3px 3px at 50% 30%, #fff8c0, transparent),
    radial-gradient(2px 2px at 70% 15%, #fff, transparent), radial-gradient(2px 2px at 85% 40%, #fff, transparent), radial-gradient(3px 3px at 20% 45%, #fff, transparent), radial-gradient(2px 2px at 60% 50%, #fff, transparent); animation: twinkle 3s infinite alternate; }
.night .stars { opacity: 1; }
.cloud { position: absolute; width: 260px; opacity: .95; z-index: 2; animation: drift 80s linear infinite; }
.cloud.c1 { top: 8%; animation-duration: 90s; animation-delay: -20s; }
.cloud.c2 { top: 22%; width: 200px; animation-duration: 70s; animation-delay: -55s; }
.cloud.c3 { top: 4%; width: 160px; animation-duration: 110s; animation-delay: -80s; }
.w-rain .cloud svg g, .w-snow .cloud svg g { fill: #e3e6f0; }
.night .cloud { opacity: .35; }
.precip { position: absolute; inset: 0; z-index: 3; }
.w-rain .window .precip { background: repeating-linear-gradient(105deg, transparent 0 14px, rgba(160, 190, 255, .7) 14px 16px); background-size: 40px 40px; animation: rain .4s linear infinite; }
.w-snow .window .precip { background: radial-gradient(circle, #fff 2px, transparent 3px) 0 0/30px 30px, radial-gradient(circle, #fff 3px, transparent 4px) 15px 10px/45px 45px; animation: snow 4s linear infinite; }
.rainbow { position: absolute; left: 480px; top: 80px; width: 640px; opacity: 0; transition: opacity 3s; z-index: 2; }
.rainbow-on .rainbow { opacity: .75; }

/* город */
.hills { position: absolute; left: -100px; right: -100px; top: 470px; height: 260px;
  background: radial-gradient(ellipse 420px 160px at 15% 100%, #9fe0a8 98%, transparent), radial-gradient(ellipse 520px 190px at 60% 100%, #8fd8a0 98%, transparent), radial-gradient(ellipse 420px 150px at 100% 100%, #a6e6b2 98%, transparent); }
.grass { position: absolute; left: 0; right: 0; top: 600px; bottom: 0; background: linear-gradient(#b8ecb2, #9fe0a8); }
.w-snow .grass, .w-snow .hills { filter: saturate(.25) brightness(1.25); }
.path { position: absolute; left: 120px; right: 120px; top: 640px; height: 330px; border-radius: 50% 50% 40% 40%; background: radial-gradient(ellipse at 50% 30%, #fff1d9, #ffe1bd); opacity: .9; }
.building svg .win { transition: fill 2s; }
.night .building svg .win { fill: #fff3a8; }
.building.locked { filter: saturate(.55) brightness(.97); }
.lamppost .night-glow { opacity: 0; transition: opacity 2s; }
.night .lamppost .night-glow { opacity: .8; }

/* дом и салон */
.wall { position: absolute; left: 0; right: 0; top: 0; height: 620px; }
.floor { position: absolute; left: 0; right: 0; top: 620px; bottom: 0; }
.baseboard { position: absolute; left: 0; right: 0; top: 608px; height: 24px; background: #fff; box-shadow: 0 4px 0 rgba(0, 0, 0, .06); }
.window { position: absolute; left: 1080px; top: 80px; width: 340px; height: 250px; border-radius: 36px; overflow: hidden; border: 14px solid #fff; box-shadow: var(--shadow); }
.window .sky { inset: 0; }
.window .cloud { width: 120px; }
.window .sun { width: 60px; height: 60px; right: 14%; top: 14%; }
.window .moon { width: 50px; height: 50px; box-shadow: -12px 6px 0 0 #fff4c2; }
.window .frame { position: absolute; inset: 0; z-index: 5; background: linear-gradient(90deg, transparent calc(50% - 6px), #fff calc(50% - 6px) calc(50% + 6px), transparent 0), linear-gradient(transparent calc(50% - 6px), #fff calc(50% - 6px) calc(50% + 6px), transparent 0); }
.salon-wall { background: repeating-linear-gradient(90deg, #f3e8ff 0 60px, #ffe6f1 60px 120px); }
.furn { position: absolute; transform: translate(-50%, -100%); }
.furn.flat { transform: translate(-50%, -50%); }
.furn.flipped svg { transform: scaleX(-1); }
.editing .furn { outline: 4px dashed rgba(255, 134, 173, .6); outline-offset: 6px; border-radius: 20px; cursor: move; }
.furn.dragging { filter: drop-shadow(0 20px 14px rgba(90, 60, 120, .35)); z-index: 4000 !important; }

/* персонажи */
.actor { position: absolute; width: 170px; pointer-events: auto; cursor: grab; transform-origin: 50% 100%; touch-action: none; }
.actor .flip { transition: transform .25s; }
.actor .flip.left { transform: scaleX(-1); }
.actor .avatar { width: 100%; height: auto; overflow: visible; }
.actor .anim { transform-origin: 50% 100%; animation: idle 2.6s ease-in-out infinite; }
.actor.walking .anim { animation: hop .36s ease-in-out infinite; }
.actor.held { cursor: grabbing; }
.actor.held .anim { animation: dangle .5s ease-in-out infinite; transform-origin: 50% 20%; }
.actor .tag { position: absolute; left: 50%; top: 88%; transform: translate(-50%, 0); white-space: nowrap; font-size: 20px; padding: 2px 14px; border-radius: 20px; background: rgba(255, 255, 255, .85); box-shadow: 0 3px 0 rgba(0, 0, 0, .08); }
.actor.me .tag { background: #ffe0ec; color: var(--pink-d); }
.actor .bubble { position: absolute; left: 50%; bottom: 102%; transform: translate(-50%, 0) scale(0); transform-origin: 50% 100%; white-space: nowrap; font-size: 26px; padding: 10px 20px; background: #fff; border-radius: 26px; box-shadow: var(--shadow); transition: transform .25s cubic-bezier(.3, 1.6, .5, 1); pointer-events: none; }
.actor .bubble::after { content: ''; position: absolute; left: 50%; top: 100%; margin-left: -10px; border: 10px solid transparent; border-top-color: #fff; }
.actor .bubble.show { transform: translate(-50%, 0) scale(1); }
.actor .bubble .emo { font-size: 44px; }
.actor .ring { position: absolute; left: 15%; right: 15%; bottom: -8px; height: 26px; border-radius: 50%; border: 5px solid #ffd23f; box-shadow: 0 0 16px #ffd23f; opacity: 0; }
.actor.target .ring { opacity: 1; animation: pulse 1s infinite; }

/* части аватара */
.avatar .eyes-closed, .avatar .mouth-o { display: none; }
.avatar .blink { transform-box: fill-box; transform-origin: center; animation: blink 5s infinite; }
.e-sleep .eyes-open, .e-laugh .eyes-open { display: none; }
.e-sleep .eyes-closed, .e-laugh .eyes-closed { display: inline; }
.e-surprise .mouth-normal { display: none; }
.e-surprise .mouth-o, .e-laugh .mouth-o { display: inline; }
.e-laugh .mouth-normal { display: none; }
.avatar .arm { transform-box: view-box; transition: transform .3s; }
.avatar .arm-l { transform-origin: 52px 162px; }
.avatar .arm-r { transform-origin: 148px 162px; }
.e-high5 .arm-r, .e-high5 .arm-l { animation: wave .6s ease-in-out 2; }
.e-high5 .arm-r { transform: rotate(-150deg); }
.e-high5 .arm-l { transform: rotate(150deg); }
.e-hug .arm-l { transform: rotate(-40deg); }
.e-hug .arm-r { transform: rotate(40deg); }
.e-dance .arm-l { animation: armwave .5s ease-in-out infinite alternate; }
.e-dance .arm-r { animation: armwave2 .5s ease-in-out infinite alternate; }
.anim.e-dance, .avatar.e-dance { animation: dance .65s ease-in-out infinite !important; }
.anim.e-hug { animation: squish 1.6s ease-in-out !important; }
.anim.e-jump, .avatar.e-jump, .anim.e-high5 { animation: jump .6s cubic-bezier(.3, 1.5, .5, 1) !important; }
.anim.e-laugh { animation: shake .25s ease-in-out infinite !important; }
.anim.e-surprise { animation: jump .5s ease-out !important; }
.anim.e-sleep { animation: sleep 2s ease-in-out infinite !important; transform-origin: 50% 100%; }
.avatar .wings { transform-box: view-box; transform-origin: 100px 175px; animation: flap 1.6s ease-in-out infinite; }
.avatar .twinkle { transform-box: fill-box; transform-origin: center; animation: twinkle-s 1.4s ease-in-out infinite alternate; }
.mat-glitter { animation: glitter 1.2s steps(2) infinite; }
.mat-holo { opacity: .5; mix-blend-mode: screen; animation: holo 4s linear infinite; }
.avatar.idle { animation: idle 2.6s ease-in-out infinite; transform-origin: 50% 100%; }

/* анимации предметов */
.boing { animation: boing .45s cubic-bezier(.3, 1.8, .5, 1); }
.prop.boing, .furn.boing { animation: boing-t .45s cubic-bezier(.3, 1.8, .5, 1); }
.furn.flat.boing { animation: boing-f .45s cubic-bezier(.3, 1.8, .5, 1); }
.sway { transform-box: fill-box; transform-origin: 50% 100%; animation: sway 4s ease-in-out infinite; }
.glow { animation: pulse-glow 2s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.tvscreen { animation: tv 3s linear infinite; }
.swim { animation: swim 5s ease-in-out infinite; }
.swim2 { animation: swim 4s ease-in-out infinite reverse; }
.bub { animation: bub 2s ease-in infinite; }
.clock-m { transform-box: view-box; transform-origin: 40px 40px; animation: spin 10s linear infinite; }
.clock-h { transform-box: view-box; transform-origin: 40px 40px; animation: spin 120s linear infinite; }
.bulb { animation: bulb 1.6s ease-in-out infinite; }

/* ---------- HUD ---------- */
#hud { position: fixed; top: 0; left: 0; right: 0; display: flex; gap: 10px; align-items: center; padding: max(10px, env(safe-area-inset-top)) 14px 10px; z-index: 60; pointer-events: none; }
#hud > * { pointer-events: auto; }
#hud .spacer { flex: 1; pointer-events: none; }
#hud button { position: relative; width: 62px; height: 62px; border-radius: 22px; background: var(--card); box-shadow: var(--shadow); font-size: 32px; line-height: 1; }
#hud button:active { transform: translateY(3px); box-shadow: 0 2px 0 rgba(160, 110, 190, .25); }
#coins { display: flex; align-items: center; gap: 6px; height: 56px; padding: 0 20px 0 10px; border-radius: 28px; background: var(--card); box-shadow: var(--shadow); font-size: 28px; color: var(--pink-d); }
.gummy { display: inline-block; width: 1.1em; height: 1.1em; vertical-align: -0.18em; }
.gummy svg { width: 100%; height: 100%; }
#coins .gummy { width: 40px; height: 40px; }
.pulse { animation: pulse 1.2s ease-in-out infinite; }
#b-gift.pulse { background: #fff3c4 !important; }
#b-friends.online { background: #d8f5ea !important; }
#room-badge { position: absolute; left: 50%; bottom: -8px; transform: translateX(-50%); font-size: 11px; letter-spacing: 1px; background: var(--mint); color: #fff; padding: 1px 6px; border-radius: 8px; }
#room-badge:empty { display: none; }

#ui-bottom { position: fixed; left: 0; right: 0; bottom: 0; z-index: 55; display: flex; justify-content: center; align-items: flex-end; padding: 0 14px max(12px, env(safe-area-inset-bottom)); pointer-events: none; }
#ui-bottom > * { pointer-events: auto; }
.fab { position: absolute; left: 16px; bottom: max(14px, env(safe-area-inset-bottom)); width: 76px; height: 76px; border-radius: 28px; background: var(--card); box-shadow: var(--shadow); font-size: 38px; }
.fab.on { background: var(--mint); }
.tray { display: flex; flex-direction: column; gap: 8px; width: min(980px, calc(100% - 100px)); margin-left: 80px; padding: 10px; border-radius: 28px; background: rgba(255, 250, 255, .94); box-shadow: var(--shadow); }
.tray.salon { margin-left: 0; width: min(1000px, 100%); }
.tray-tabs { display: flex; gap: 8px; align-items: center; }
.tray-tabs button { width: 56px; height: 52px; border-radius: 18px; background: #f3eafd; font-size: 28px; }
.tray-tabs button.on { background: var(--pink); box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .12); }
.tray-tabs .client { width: 56px; height: 56px; border-radius: 50%; overflow: hidden; background: #fff0f5; border: 3px solid #ffd23f; }
.tray-items { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 6px; scrollbar-width: thin; touch-action: pan-x; }
.titem { position: relative; flex: 0 0 92px; height: 92px; border-radius: 22px; background: #fff; box-shadow: inset 0 0 0 3px #f1e4fb; padding: 8px; display: flex; align-items: center; justify-content: center; }
.titem svg { width: 100%; height: 100%; }
.titem.sel { box-shadow: inset 0 0 0 5px var(--pink); }
.titem.swatchy > span:first-child, .swatchy-big { display: block; width: 100%; height: 100%; border-radius: 14px; }
.swatchy-big { width: 200px; height: 140px; margin: auto; }
#trash { position: fixed; right: 20px; top: 100px; z-index: 70; width: 110px; height: 110px; border-radius: 50%; display: grid; place-items: center; font-size: 56px; background: #ffe0e6; box-shadow: var(--shadow); transform: scale(0); transition: transform .2s; pointer-events: none; }
#trash.show { transform: scale(1); }
#trash.hot { transform: scale(1.25); background: #ff9ab0; }

/* ---------- окна ---------- */
#overlay { position: fixed; inset: 0; z-index: 80; pointer-events: none; }
.modal-wrap { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(110, 70, 150, .35); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); pointer-events: auto; animation: fadein .2s; padding: 12px; }
.modal-wrap.closing { animation: fadeout .2s forwards; }
.modal { position: relative; background: var(--card); border-radius: 36px; box-shadow: 0 10px 0 rgba(160, 110, 190, .3), 0 30px 60px rgba(90, 60, 120, .35); padding: 22px; animation: popin .35s cubic-bezier(.3, 1.5, .5, 1); max-height: 94vh; overflow: auto; }
.modal.wide { width: min(1160px, 98vw); height: min(760px, 94vh); overflow: hidden; }
.modal.small { width: min(600px, 96vw); }
.modal.sheet { align-self: end; width: min(900px, 98vw); }
.btn-close { position: absolute; right: 12px; top: 12px; width: 52px; height: 52px; border-radius: 18px; background: #ffe0ec; font-size: 24px; z-index: 3; color: var(--pink-d); }
.big { min-width: 84px; height: 72px; padding: 0 22px; border-radius: 24px; background: #f3eafd; font-size: 34px; box-shadow: 0 5px 0 rgba(160, 110, 190, .25); }
.big:active { transform: translateY(3px); box-shadow: 0 2px 0 rgba(160, 110, 190, .25); }
.big.yes { background: var(--mint); color: #fff; }
.big.no { background: #ffe0ec; }
.big[disabled] { opacity: .4; }
.huge { width: 200px; height: 200px; border-radius: 48px; font-size: 76px; background: #f3eafd; box-shadow: var(--shadow); }
.huge.create { background: #ffe0ec; }
.huge.join { background: #d8f5ea; }
.row { display: flex; gap: 16px; justify-content: center; }
.shake { animation: shake .12s 4; }

.toast { display: flex; align-items: center; gap: 10px; padding: 10px 22px; border-radius: 26px; background: var(--card); box-shadow: var(--shadow); font-size: 22px; animation: popin .35s cubic-bezier(.3, 1.5, .5, 1); transition: opacity .4s, transform .4s; }
.toast svg { width: 44px; height: 44px; }
.toast.out { opacity: 0; transform: translateY(-20px); }
#toasts { position: fixed; top: 86px; left: 50%; transform: translateX(-50%); z-index: 90; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }

/* покупка */
.buy { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.buy-preview { width: 240px; height: 260px; display: grid; place-items: center; background: radial-gradient(#fff, #fdeefe); border-radius: 30px; }
.buy-preview svg { max-width: 92%; max-height: 92%; width: 100%; height: 100%; }
.buy-preview .sw.big-sw { width: 140px; height: 140px; }
.buy-price { font-size: 44px; color: var(--pink-d); display: flex; align-items: center; gap: 8px; }
.buy-need { font-size: 20px; color: #a0789c; }

/* гардероб */
.wardrobe { display: grid; grid-template-columns: minmax(200px, 300px) 1fr; gap: 18px; height: 100%; }
.w-left { display: flex; flex-direction: column; align-items: center; justify-content: center; background: radial-gradient(ellipse at 50% 80%, #ffe6f1, #f0e6ff); border-radius: 30px; padding: 16px; }
.w-preview { width: 100%; max-width: 260px; cursor: pointer; }
.w-name { margin-top: 8px; font-size: 22px; color: var(--pink-d); text-align: center; }
.w-right { display: flex; flex-direction: column; min-height: 0; }
.w-tabs { display: flex; flex-wrap: wrap; gap: 8px; padding-right: 60px; }
.tab { width: 60px; height: 56px; border-radius: 18px; background: #f3eafd; font-size: 30px; }
.tab.on { background: var(--pink); box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .12); }
.w-body { flex: 1; overflow-y: auto; margin-top: 12px; padding: 4px 4px 20px; touch-action: pan-y; }
.sec { margin-bottom: 16px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(98px, 1fr)); gap: 10px; }
.tile { position: relative; aspect-ratio: 1; border-radius: 24px; background: #fff; box-shadow: inset 0 0 0 3px #f1e4fb; padding: 6px; transition: transform .15s; }
.tile.tall { aspect-ratio: .7; }
.tile svg { width: 100%; height: 100%; }
.tile.sel, .sw.sel { box-shadow: inset 0 0 0 5px var(--pink); }
.tile:active, .sw:active, .titem:active { transform: scale(.94); }
.tile.none::after { content: '✖'; position: absolute; right: 8px; bottom: 6px; font-size: 18px; color: #d6b6e6; }
.lock { position: absolute; left: 4px; top: 4px; display: flex; align-items: center; gap: 2px; font-size: 16px; background: rgba(255, 255, 255, .92); border-radius: 12px; padding: 2px 6px; }
.lock .price { display: flex; align-items: center; gap: 2px; color: var(--pink-d); font-size: 15px; }
.lock .gummy { width: 16px; height: 16px; }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.sw { position: relative; width: 58px; height: 58px; border-radius: 50%; padding: 5px; background: #fff; box-shadow: inset 0 0 0 3px #f1e4fb; display: inline-block; }
.sw-in { display: block; width: 100%; height: 100%; border-radius: 50%; box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .1); }
.titem .sw { width: 64px; height: 64px; }
.none-sw { display: grid; place-items: center; font-size: 26px; color: #d6b6e6; }
.sw .lock { left: -6px; top: -6px; padding: 1px 4px; }
.cols { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.col-card { position: relative; background: linear-gradient(#fff, #fbefff); border-radius: 28px; padding: 10px; display: flex; flex-direction: column; align-items: center; box-shadow: inset 0 0 0 3px #f1e4fb; }
.col-card > svg { height: 210px; width: auto; }
.col-ic { position: absolute; left: 10px; top: 8px; font-size: 34px; }
.col-card .big { font-size: 24px; height: 56px; display: flex; align-items: center; gap: 6px; }
.outfits { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.outfit { position: relative; aspect-ratio: .68; border-radius: 24px; background: #fff; box-shadow: inset 0 0 0 3px #f1e4fb; padding: 6px; cursor: pointer; }
.outfit svg { width: 100%; height: 100%; }
.outfit.empty { display: grid; place-items: center; background: #fbf5ff; border: 3px dashed #e3cdf3; box-shadow: none; }
.plus { font-size: 40px; color: #c9a6e6; }
.of-btns { position: absolute; right: 4px; top: 4px; display: flex; flex-direction: column; gap: 4px; }
.of-btns button { width: 34px; height: 34px; border-radius: 12px; background: #fff; box-shadow: 0 2px 0 rgba(0, 0, 0, .08); font-size: 16px; }
.name-tab { display: flex; flex-direction: column; align-items: center; gap: 18px; padding-top: 30px; }
.name-row { display: flex; align-items: center; gap: 16px; }
.name-word { min-width: 260px; text-align: center; font-size: 40px; color: var(--pink-d); }
.skins { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.skin-card { background: #fff; border-radius: 24px; padding: 10px; box-shadow: inset 0 0 0 3px #f1e4fb; display: flex; flex-direction: column; gap: 8px; align-items: center; justify-content: center; min-height: 150px; }
.skin-img { width: 120px; height: 120px; border-radius: 18px; background-size: cover; image-rendering: pixelated; position: relative; overflow: hidden; }
.skin-img.mat-glitter::after { content: '✦ ✧ ✦'; position: absolute; inset: 0; color: #fff; display: grid; place-items: center; font-size: 26px; animation: glitter 1s steps(2) infinite; }
.skin-img.mat-holo::after { content: ''; position: absolute; inset: 0; background: linear-gradient(135deg, #ff9ec7, #9fe8d4, #b8a6ff, #ffe27a); mix-blend-mode: screen; opacity: .5; animation: holo 4s linear infinite; }
.skin-img.mat-neon { box-shadow: 0 0 18px #ff86ad, 0 0 4px #fff inset; }
.skin-btns { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; }
.skin-btns button { width: 38px; height: 38px; border-radius: 12px; background: #f3eafd; font-size: 20px; }

/* редактор скина */
.paint { display: grid; grid-template-columns: auto 150px 1fr; gap: 16px; height: 100%; align-items: start; }
.p-left { display: flex; flex-direction: column; gap: 10px; }
.p-canvas { width: min(56vh, 460px); aspect-ratio: 1; border-radius: 24px; overflow: hidden; box-shadow: inset 0 0 0 4px #f1e4fb, var(--shadow); background: #fff; }
.p-canvas canvas { width: 100%; height: 100%; image-rendering: pixelated; touch-action: none; cursor: crosshair; }
.p-palette { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; width: min(56vh, 460px); }
.pc { aspect-ratio: 1; border-radius: 50%; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .12), 0 0 0 2px #f1e4fb; }
.pc.on { box-shadow: 0 0 0 4px var(--pink), inset 0 -3px 0 rgba(0, 0, 0, .12); transform: scale(1.1); }
.p-mid { display: flex; flex-direction: column; gap: 10px; padding-top: 50px; }
.p-tools { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.p-tools button, .p-target button, .p-mats button, .p-stickers button { height: 46px; border-radius: 14px; background: #f3eafd; font-size: 22px; display: grid; place-items: center; }
.p-tools button[data-t] { grid-column: span 1; }
.p-tools .on, .p-target .on, .p-mats .on, .p-stickers .on { background: var(--pink); }
.p-stickers { display: none; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.p-stickers.show { display: grid; }
.p-stickers canvas { width: 30px; height: 30px; }
.p-right { display: flex; flex-direction: column; align-items: center; gap: 10px; height: 100%; padding-top: 40px; }
.p-preview { width: 100%; max-width: 230px; flex: 1; min-height: 0; display: flex; align-items: center; }
.p-preview svg { max-height: 100%; }
.p-target, .p-mats { display: flex; gap: 6px; }
.p-target button, .p-mats button { width: 54px; }

/* чат */
.chat { display: flex; flex-direction: column; gap: 12px; padding-top: 30px; }
.emotes, .emojis { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.emotes button, .emojis button { width: 64px; height: 64px; border-radius: 22px; background: #f3eafd; font-size: 34px; box-shadow: 0 4px 0 rgba(160, 110, 190, .2); }
.emotes button { background: #ffe0ec; }
.phrases { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
.phrases button { min-height: 56px; border-radius: 20px; background: #d8f5ea; font-size: 20px; padding: 6px 12px; box-shadow: 0 4px 0 rgba(90, 170, 150, .25); }
.chat button:active { transform: translateY(3px); }

/* комната */
.room-start { display: flex; gap: 24px; justify-content: center; padding: 30px 0 10px; }
.room { display: flex; flex-direction: column; gap: 16px; align-items: center; }
.room-code { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 18px; color: #a0789c; }
.room-code b { display: flex; gap: 6px; }
.room-code i, .code-boxes i { font-style: normal; width: 58px; height: 70px; display: grid; place-items: center; border-radius: 18px; background: #fff0f5; color: var(--pink-d); font-size: 40px; box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .06); }
.players { display: flex; flex-direction: column; gap: 10px; width: 100%; }
.pl { display: flex; align-items: center; gap: 12px; background: #fff; border-radius: 24px; padding: 8px 12px; box-shadow: inset 0 0 0 3px #f1e4fb; }
.pl-av { width: 64px; height: 64px; border-radius: 50%; background: #fff0f5; overflow: hidden; }
.pl-name { flex: 1; font-size: 22px; }
.pl-btns { display: flex; gap: 6px; }
.pl-btns button { width: 56px; height: 56px; border-radius: 18px; background: #f3eafd; font-size: 28px; }
.keypad { display: flex; flex-direction: column; align-items: center; gap: 16px; padding-top: 30px; }
.code-boxes { display: flex; gap: 6px; }
.code-boxes i.filled { background: #ffe0ec; }
.keys { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; width: 100%; }
.keys button { height: 54px; border-radius: 16px; background: #f3eafd; font-size: 24px; }
.keys .ok { background: var(--mint); color: #fff; grid-column: span 3; }
.keys [data-k=del] { grid-column: span 3; }

/* подарок */
.gift { display: flex; flex-direction: column; align-items: center; gap: 14px; padding-top: 30px; }
.days { display: flex; gap: 8px; }
.day { width: 52px; height: 52px; border-radius: 16px; background: #f3eafd; display: grid; place-items: center; font-size: 22px; }
.day.done { background: var(--mint); color: #fff; }
.day.today { background: #ffe27a; animation: pulse 1s infinite; }
.day.big { width: 64px; font-size: 30px; }
.giftbox { width: 260px; cursor: pointer; }
.giftbox.ready { animation: wobble 1.4s ease-in-out infinite; }
.giftbox .lid-open { animation: lid .8s forwards; transform-box: view-box; transform-origin: 100px 80px; }
.gift-msg { font-size: 24px; text-align: center; min-height: 40px; }
.big-coins { font-size: 48px; color: var(--pink-d); display: inline-flex; align-items: center; gap: 8px; }

/* заставка */
#splash { position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; cursor: pointer;
  background: radial-gradient(circle at 20% 20%, #fff 0 4px, transparent 5px) 0 0/80px 80px, linear-gradient(160deg, #ffd6e8, #e6dcff 50%, #c9f2e6); transition: opacity .6s, transform .6s; }
#splash.gone { opacity: 0; transform: scale(1.1); pointer-events: none; }
.logo { display: flex; font-size: clamp(48px, 10vw, 110px); font-weight: 900; color: #fff; text-shadow: 0 6px 0 var(--pink-d), 0 12px 24px rgba(232, 65, 122, .35); letter-spacing: 2px; }
.logo span { display: inline-block; animation: letter 1.6s ease-in-out infinite; }
.logo span:nth-child(odd) { color: #fff6fb; }
.logo span:nth-child(3n) { text-shadow: 0 6px 0 #a88bff, 0 12px 24px rgba(160, 120, 255, .35); }
.logo span:nth-child(3n+1) { text-shadow: 0 6px 0 #2fb79a, 0 12px 24px rgba(47, 183, 154, .35); }
.splash-av { width: min(36vh, 260px); }
.tap { font-size: 28px; padding: 14px 30px; border-radius: 30px; background: #fff; box-shadow: var(--shadow); animation: pulse 1.2s infinite; color: var(--pink-d); }

/* эффекты */
#fx { position: fixed; inset: 0; pointer-events: none; z-index: 95; overflow: hidden; }
.fx { position: absolute; pointer-events: none; }
.sparkle { animation: sparkle .9s ease-out forwards; transform: translate(-50%, -50%); text-shadow: 0 0 8px #fff; }
.confetti { width: 12px; height: 16px; animation: confetti 3s ease-in forwards; }
.soap { border-radius: 50%; background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, .95) 0 12%, rgba(200, 230, 255, .25) 30%, rgba(255, 180, 230, .35) 90%); border: 2px solid rgba(255, 255, 255, .8); animation: soap 2.6s ease-out forwards; }
.floaty { animation: floaty 1.8s ease-out forwards; transform: translate(-50%, -50%); }
.floattext { font-size: 34px; font-weight: 900; transform: translate(-50%, -50%); animation: floaty 1.5s ease-out forwards; text-shadow: 0 3px 0 #fff; white-space: nowrap; }
.flycoin { position: absolute; font-size: 40px; animation: fly .9s cubic-bezier(.5, -0.4, .7, 1) forwards; }

@keyframes idle { 0%, 100% { transform: translateY(0) scaleY(1); } 50% { transform: translateY(-3px) scaleY(1.015); } }
@keyframes hop { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-16px) rotate(2deg); } }
@keyframes dangle { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg); } }
@keyframes dance { 0%, 100% { transform: rotate(-8deg) translateY(0); } 25% { transform: rotate(0) translateY(-14px); } 50% { transform: rotate(8deg) translateY(0); } 75% { transform: rotate(0) translateY(-14px); } }
@keyframes jump { 0% { transform: translateY(0) scale(1, 1); } 20% { transform: translateY(0) scale(1.1, .9); } 50% { transform: translateY(-50px) scale(.95, 1.05); } 100% { transform: translateY(0) scale(1); } }
@keyframes squish { 0%, 100% { transform: scale(1); } 30%, 70% { transform: scale(1.08, .94); } }
@keyframes shake { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-4deg); } 75% { transform: rotate(4deg); } }
@keyframes sleep { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(-7deg) translateY(2px); } }
@keyframes wave { 50% { transform: rotate(-170deg); } }
@keyframes armwave { from { transform: rotate(20deg); } to { transform: rotate(140deg); } }
@keyframes armwave2 { from { transform: rotate(-140deg); } to { transform: rotate(-20deg); } }
@keyframes blink { 0%, 94%, 100% { transform: scaleY(1); } 97% { transform: scaleY(.1); } }
@keyframes flap { 0%, 100% { transform: scaleX(1); } 50% { transform: scaleX(.86); } }
@keyframes twinkle-s { from { transform: scale(.85) rotate(-8deg); opacity: .8; } to { transform: scale(1.12) rotate(8deg); opacity: 1; } }
@keyframes twinkle { from { opacity: .6; } to { opacity: 1; } }
@keyframes glitter { 0% { opacity: .9; } 100% { opacity: .2; } }
@keyframes holo { from { filter: hue-rotate(0deg); } to { filter: hue-rotate(360deg); } }
@keyframes boing { 0% { transform: scale(1); } 30% { transform: scale(1.18, .85); } 60% { transform: scale(.92, 1.1); } 100% { transform: scale(1); } }
@keyframes boing-t { 0% { transform: translate(-50%, -100%) scale(1); } 30% { transform: translate(-50%, -100%) scale(1.12, .88); } 60% { transform: translate(-50%, -100%) scale(.94, 1.08); } 100% { transform: translate(-50%, -100%) scale(1); } }
@keyframes boing-f { 0% { transform: translate(-50%, -50%) scale(1); } 30% { transform: translate(-50%, -50%) scale(1.08, .9); } 100% { transform: translate(-50%, -50%) scale(1); } }
@keyframes sway { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }
@keyframes pulse-glow { 0%, 100% { opacity: .45; transform: scale(1); } 50% { opacity: .7; transform: scale(1.08); } }
@keyframes pulse-sun { 0%, 100% { box-shadow: 0 0 60px 30px rgba(255, 230, 120, .6); } 50% { box-shadow: 0 0 80px 40px rgba(255, 230, 120, .45); } }
@keyframes tv { from { filter: hue-rotate(0); } to { filter: hue-rotate(360deg); } }
@keyframes swim { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(30px); } }
@keyframes bub { from { transform: translateY(20px); opacity: 0; } 30% { opacity: .9; } to { transform: translateY(-30px); opacity: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes bulb { 0%, 100% { fill: #fff8d0; } 50% { fill: #ffe27a; } }
@keyframes drift { from { transform: translateX(-320px); } to { transform: translateX(1900px); } }
@keyframes rain { to { background-position: -10px 40px; } }
@keyframes snow { to { background-position: 10px 300px, 25px 310px; } }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }
@keyframes wobble { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(-6deg) scale(1.04); } 40% { transform: rotate(6deg); } 60% { transform: rotate(-3deg); } }
@keyframes lid { 0% { transform: none; } 40% { transform: translateY(-60px) rotate(-20deg); } 100% { transform: translate(-60px, -40px) rotate(-35deg); opacity: .9; } }
@keyframes letter { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
@keyframes sparkle { from { opacity: 1; transform: translate(-50%, -50%) scale(.4); } to { opacity: 0; transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1.2) rotate(90deg); } }
@keyframes confetti { to { transform: translate(var(--dx), 110vh) rotate(var(--rot)); } }
@keyframes soap { 0% { transform: translate(-50%, 0) scale(.3); opacity: 0; } 15% { opacity: 1; } 100% { transform: translate(calc(-50% + var(--dx)), -260px) scale(1); opacity: 0; } }
@keyframes floaty { 0% { opacity: 0; transform: translate(-50%, 0) scale(.5); } 20% { opacity: 1; } 100% { opacity: 0; transform: translate(calc(-50% + var(--dx, 0px)), -140px) scale(1.2); } }
@keyframes fly { to { transform: translate(var(--tx), var(--ty)) scale(.6); opacity: .6; } }
@keyframes popin { from { transform: scale(.7); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes fadein { from { opacity: 0; } }
@keyframes fadeout { to { opacity: 0; } }

@media (max-width: 760px), (max-height: 520px) {
  #hud { gap: 6px; padding: 6px 8px; }
  #hud button { width: 46px; height: 46px; border-radius: 16px; font-size: 24px; }
  #coins { height: 44px; font-size: 22px; padding: 0 12px 0 6px; }
  #coins .gummy { width: 30px; height: 30px; }
  .wardrobe { grid-template-columns: 150px 1fr; gap: 10px; }
  .w-left { padding: 6px; }
  .w-preview { max-width: 130px; }
  .modal { padding: 12px; border-radius: 26px; }
  .w-name { display: none; }
  .tab { width: 48px; height: 46px; font-size: 24px; }
  .tiles { grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); }
  .outfits { grid-template-columns: repeat(4, 1fr); }
  .paint { grid-template-columns: 1fr; overflow-y: auto; }
  .p-canvas, .p-palette { width: min(86vw, 420px); }
  .p-mid, .p-right { padding-top: 0; }
  .p-tools { grid-template-columns: repeat(7, 1fr); }
  .titem { flex-basis: 72px; height: 72px; }
  .tray-tabs button { width: 46px; height: 44px; font-size: 22px; }
  .fab { width: 60px; height: 60px; font-size: 30px; }
  .huge { width: 140px; height: 140px; font-size: 54px; }
}

@media (max-width: 560px) and (orientation: portrait) {
  .wardrobe { grid-template-columns: 1fr; grid-template-rows: 170px 1fr; }
  .w-preview { max-width: 110px; }
}

/* ---------- кафе ---------- */
.cafe-wall { background: radial-gradient(circle at 30px 30px, #ffd6e3 5px, transparent 6px) 0 0/60px 60px, #fff1e6; }
.cafe-window { left: 940px; top: 130px; width: 300px; height: 220px; }
.case-cake svg { overflow: visible; }
.fab.cook { background: #ffe6f1; font-size: 42px; animation: pulse 1.6s ease-in-out infinite; }
.treat .flame { transform-box: fill-box; transform-origin: 50% 100%; animation: flame .4s ease-in-out infinite alternate; }
.treat .twinkle { transform-box: fill-box; transform-origin: center; animation: twinkle-s 1.4s ease-in-out infinite alternate; }
.fresh-layer .layer:last-of-type, .fresh-top .top-item:last-of-type { animation: drop .45s cubic-bezier(.3, 1.6, .5, 1); }
.fresh-liquid .liquid:last-of-type { animation: pour .5s ease-out; transform-box: fill-box; transform-origin: 50% 100%; }
.kitchen { display: grid; grid-template-columns: minmax(240px, 42%) 1fr; gap: 18px; height: 100%; }
.k-left { display: grid; place-items: center; border-radius: 30px; background: linear-gradient(#fff6ee, #ffe8f1); }
.k-plate { width: min(100%, 340px); }
.k-plate svg { width: 100%; height: auto; overflow: visible; }
.k-right { display: flex; flex-direction: column; gap: 12px; min-height: 0; }
.k-modes { display: flex; gap: 10px; }
.k-modes button { width: 84px; height: 70px; border-radius: 24px; background: #f3eafd; font-size: 40px; }
.k-modes button.on { background: var(--pink); box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .12); }
.k-body { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; touch-action: pan-y; }
.k-sec { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px; border-radius: 24px; background: #fff; box-shadow: inset 0 0 0 3px #f1e4fb; }
.k-lbl { width: 100%; font-size: 20px; color: #a0789c; }
.k-ic { width: 60px; height: 60px; border-radius: 20px; background: #f3eafd; font-size: 32px; }
.k-ic.sel { box-shadow: inset 0 0 0 4px var(--pink); }

/* ---------- родителям ---------- */
#b-parent { font-size: 22px !important; width: 46px !important; opacity: .7; }
#b-parent.holding { animation: hold 1.2s linear forwards; }
.modal.parent { font-weight: 700; }
.pinpad { display: flex; flex-direction: column; align-items: center; gap: 14px; padding-top: 24px; }
.pin-title { font-size: 26px; }
.pin-sub { font-size: 18px; color: #a0789c; text-align: center; }
.pin-dots { display: flex; gap: 10px; }
.pin-dots i { font-style: normal; width: 54px; height: 64px; border-radius: 18px; background: #f3eafd; display: grid; place-items: center; font-size: 30px; color: var(--pink-d); }
.pin-dots i.filled { background: #ffe0ec; }
.pin-keys { display: grid; grid-template-columns: repeat(3, 84px); gap: 10px; }
.pin-keys button { height: 68px; border-radius: 22px; background: #f3eafd; font-size: 30px; box-shadow: 0 4px 0 rgba(160, 110, 190, .2); }
.pin-keys .ok { background: var(--mint); color: #fff; }
.parent-panel { height: 100%; overflow-y: auto; padding-right: 6px; touch-action: pan-y; font-size: 18px; }
.parent-panel h2 { margin: 4px 0 14px; font-size: 28px; }
.parent-panel h3 { margin: 0 0 8px; font-size: 20px; }
.parent-panel section { background: #fff; border-radius: 24px; padding: 14px 16px; margin-bottom: 12px; box-shadow: inset 0 0 0 3px #f1e4fb; }
.pp-note { font-size: 16px; color: #8a6b8a; margin-bottom: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 44px; padding: 6px 16px; border-radius: 16px; background: #f3eafd; font-size: 16px; font-weight: 800; }
.chip.on { background: var(--pink); color: #fff; }
.chip.wide { width: 100%; text-align: left; margin-bottom: 8px; min-height: 54px; font-size: 18px; }
.pp-list { display: flex; flex-direction: column; gap: 6px; max-height: 260px; overflow-y: auto; }
.pp-row { display: grid; grid-template-columns: 130px 1fr auto; gap: 10px; align-items: center; font-size: 16px; padding: 6px 4px; border-bottom: 1px dashed #eadcf5; }
.pp-row .gummy { width: 18px; height: 18px; }
.tag-test { font-style: normal; font-size: 12px; background: #ffe27a; padding: 1px 6px; border-radius: 8px; }
.pp-empty { color: #b59ab5; font-size: 16px; }
.pp-friend { display: flex; align-items: center; gap: 10px; }
.pp-friend.blocked { opacity: .55; }
.pp-friend .pl-av { width: 52px; height: 52px; flex: none; }
.pf-name { flex: 1; display: flex; flex-direction: column; }
.pf-name small { font-size: 13px; color: #a0789c; }
.timelock { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 20px 0 6px; text-align: center; }
.tl-moon { font-size: 90px; animation: sleep 2s ease-in-out infinite; }
.tl-title { font-size: 34px; color: var(--pink-d); }
.tl-sub { font-size: 20px; color: #8a6b8a; }
.shop { display: flex; flex-direction: column; gap: 16px; padding-top: 24px; }
.shop-packs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.pack { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px 8px; border-radius: 28px; background: linear-gradient(#fff, #ffeef6); box-shadow: inset 0 0 0 3px #f1e4fb, 0 5px 0 rgba(160, 110, 190, .2); }
.pack b { font-size: 34px; color: var(--pink-d); }
.pack-coins .gummy { width: 34px; height: 34px; margin: 0 -6px; }
.pack-price { font-size: 16px; color: #8a6b8a; }
.shop-note { text-align: center; font-size: 18px; color: #8a6b8a; }
#coins { cursor: pointer; }

@keyframes flame { from { transform: scale(.9, 1); } to { transform: scale(1.1, 1.15); } }
@keyframes drop { from { transform: translateY(-60px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes pour { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes hold { from { box-shadow: inset 0 0 0 0 var(--mint); } to { box-shadow: inset 0 0 0 30px var(--mint); } }

@media (max-width: 760px), (max-height: 520px) {
  .kitchen { grid-template-columns: 38% 1fr; gap: 10px; }
  .k-ic { width: 48px; height: 48px; font-size: 26px; }
  .k-modes button { width: 64px; height: 52px; font-size: 30px; }
  .pin-keys { grid-template-columns: repeat(3, 70px); }
  .pin-keys button { height: 50px; }
  .pinpad { gap: 8px; padding-top: 8px; }
  .pin-dots i { height: 48px; }
  .pp-row { grid-template-columns: 100px 1fr auto; }
}

/* ---------- бутик ---------- */
.boutique-wall { background: repeating-linear-gradient(90deg, #e9fbf4 0 70px, #fff 70px 140px); }
.hanger svg { transform-origin: 50% 4%; animation: hangsway 3.5s ease-in-out infinite; }
.hanger:nth-child(odd) svg { animation-delay: -1.2s; }
.spot { opacity: 0; transition: opacity .6s; pointer-events: none; }
.showtime .spot { opacity: 1; animation: spot 1.6s ease-in-out infinite alternate; }
.booth .curtain { transform-box: view-box; transform-origin: 18px 36px; transition: transform .35s cubic-bezier(.3, 1.4, .5, 1); transform: scaleX(.18); }
.booth.closed .curtain { transform: scaleX(1); }
.showtime .audience .clap { animation: clap .25s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: center; }
.showtime .audience { animation: hop .5s ease-in-out infinite; }
.fab.show { background: #ffe6f1; font-size: 42px; }
.fab.show.on { background: #ffd23f; }
.camflash { position: absolute; inset: 0; background: #fff; animation: camflash .35s ease-out forwards; }
.anim.e-pose { animation: pose 1.4s ease-in-out !important; }

/* ---------- парк и питомцы ---------- */
.pet { position: absolute; width: 112px; pointer-events: auto; cursor: pointer; transform-origin: 50% 100%; }
.pet .pflip { transition: transform .25s; }
.pet .pflip.left { transform: scaleX(-1); }
.pet svg { width: 100%; height: auto; overflow: visible; }
.pet .panim { transform-origin: 50% 100%; animation: idle 2s ease-in-out infinite; }
.pet.walking .panim { animation: hop .3s ease-in-out infinite; }
.panim.p-happy { animation: jump .6s cubic-bezier(.3, 1.5, .5, 1) 2 !important; }
.panim.p-eat .p-head { animation: nom .3s ease-in-out 4; }
.petsvg .p-tail { transform-box: fill-box; transform-origin: 100% 100%; animation: wag .5s ease-in-out infinite alternate; }
.petsvg .p-wing { transform-box: fill-box; transform-origin: 80% 100%; animation: wag 1s ease-in-out infinite alternate; }
.petsvg .p-head { transform-box: fill-box; transform-origin: 50% 100%; }
.petsvg .p-eye { transform-box: fill-box; transform-origin: center; animation: blink 4.5s infinite; }
.pet .pbubble { position: absolute; left: 50%; bottom: 100%; transform: translateX(-50%) scale(0); font-size: 34px; background: #fff; border-radius: 22px; padding: 4px 12px; box-shadow: var(--shadow); transition: transform .25s cubic-bezier(.3, 1.6, .5, 1); pointer-events: none; }
.pet .pbubble.show { transform: translateX(-50%) scale(1); }
.shelter-pet { cursor: pointer; }
.shelter-pet.adopted::after { content: '✔'; position: absolute; right: -6px; top: -10px; width: 30px; height: 30px; border-radius: 50%; background: var(--mint); color: #fff; display: grid; place-items: center; font-size: 18px; }
.duck-swim { animation: duck 14s ease-in-out infinite; }
.ball { animation: ballbounce .6s ease-out; pointer-events: none; }
.tray.park { margin-left: 0; width: min(1000px, 100%); }
.pet-client { display: grid; place-items: center; font-size: 30px; background: #fff7e6 !important; }
.pet-client svg { width: 100%; height: 100%; }
.pet-name { font-size: 18px; color: var(--pink-d); margin-right: 4px; }
.tray-tabs button[disabled] { opacity: .35; }
.titem.not-mine svg { filter: saturate(.7); }
.titem .food { font-size: 48px; }
.titem .fav { position: absolute; right: 4px; top: 2px; font-size: 18px; }

@keyframes hangsway { 0%, 100% { transform: rotate(-2deg); } 50% { transform: rotate(2deg); } }
@keyframes spot { from { opacity: .55; } to { opacity: 1; } }
@keyframes clap { from { transform: scaleX(1); } to { transform: scaleX(.6); } }
@keyframes camflash { from { opacity: .8; } to { opacity: 0; } }
@keyframes pose { 0% { transform: none; } 35% { transform: scaleX(-1) translateY(-14px); } 70% { transform: scaleX(1) translateY(-14px); } 100% { transform: none; } }
@keyframes wag { from { transform: rotate(-10deg); } to { transform: rotate(12deg); } }
@keyframes nom { 50% { transform: translateY(6px) rotate(8deg); } }
@keyframes duck { 0% { transform: translateX(0); } 45% { transform: translateX(200px); } 50% { transform: translateX(200px) scaleX(-1); } 95% { transform: translateX(0) scaleX(-1); } 100% { transform: translateX(0); } }
@keyframes ballbounce { 0% { transform: translateY(-300px); } 60% { transform: translateY(0); } 80% { transform: translateY(-40px); } 100% { transform: none; } }

/* ---------- пижамная комната ---------- */
.pajama-wall { background: radial-gradient(circle at 40px 40px, #fff8c0 2.5px, transparent 3.5px) 0 0/90px 90px, radial-gradient(circle at 70px 20px, #fff 2px, transparent 3px) 0 0/130px 110px, linear-gradient(#4a3f8a, #7d5cba); }
.pj-window { left: 700px; top: 110px; width: 300px; height: 220px; }
.bulb2 { animation: twinkle 1.2s ease-in-out infinite alternate; }
.flying-pillow { position: absolute; width: 90px; margin: -30px 0 0 -45px; animation: pillowfly .65s cubic-bezier(.3, .2, .6, 1) forwards; pointer-events: none; }
.magic-ball.shaking { animation: shakeball .12s linear 7; }
.mb-glow { animation: pulse-glow 2s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.anim.e-sing { animation: sing .6s ease-in-out infinite alternate !important; }
.pet-name { display: inline-block; min-width: 90px; }

/* ---------- мини-игры и задания ---------- */
#b-games.pulse { background: #fff3c4 !important; }
.games-menu { display: flex; flex-direction: column; gap: 14px; padding-top: 24px; }
.games-menu h3 { margin: 6px 0 0; }
.g-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.g-card { aspect-ratio: 1; border-radius: 32px; font-size: 64px; background: linear-gradient(#fff, #ffe6f1); box-shadow: inset 0 0 0 3px #f1e4fb, 0 6px 0 rgba(160, 110, 190, .25); }
.g-card:nth-child(2) { background: linear-gradient(#fff, #e6f7ff); }
.g-card:nth-child(3) { background: linear-gradient(#fff, #efe6ff); }
.g-card:active { transform: translateY(4px); }
.quests { display: flex; flex-direction: column; gap: 8px; }
.quest { display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 22px; padding: 8px 12px; box-shadow: inset 0 0 0 3px #f1e4fb; font-size: 17px; }
.quest.done { box-shadow: inset 0 0 0 3px var(--mint); background: #f2fffa; }
.q-ic { font-size: 30px; }
.q-txt { flex: 1; }
.q-n { color: #a0789c; }
.q-ok { font-size: 26px; color: var(--mint); }
.q-price { display: flex; align-items: center; gap: 2px; color: var(--pink-d); }
.q-claim { height: 48px; font-size: 20px; padding: 0 12px; min-width: 0; animation: pulse 1s infinite; }
.g-cap { text-align: center; font-size: 15px; color: #a0789c; display: flex; align-items: center; justify-content: center; gap: 4px; }
.game { position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px; height: 100%; }
.game canvas { max-width: 100%; max-height: calc(100% - 60px); border-radius: 24px; touch-action: none; }
.g-bar { width: min(800px, 90%); height: 14px; border-radius: 7px; background: #f3eafd; overflow: hidden; }
.g-bar i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, var(--pink), var(--sun)); }
.g-hud { font-size: 28px; display: flex; align-items: center; gap: 10px; color: var(--pink-d); }
.g-end { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; background: rgba(255, 250, 255, .92); border-radius: 28px; animation: popin .35s; }
.g-score { font-size: 64px; color: var(--pink-d); }
.g-got { font-size: 36px; display: flex; align-items: center; gap: 8px; text-align: center; max-width: 80%; }
.g-got .gummy { width: 40px; height: 40px; }
.pz-wrap { display: flex; gap: 20px; align-items: center; flex: 1; }
.pz-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; width: min(62vh, 480px); aspect-ratio: 1; padding: 4px; border-radius: 24px; background: #f1e4fb; }
.pz { background-size: 300% 300%; border-radius: 14px; transition: transform .15s; box-shadow: inset 0 0 0 2px #fff; }
.pz.sel { transform: scale(.9); box-shadow: inset 0 0 0 5px var(--pink); }
.pz.ok { box-shadow: inset 0 0 0 3px #9fe8d4; }
.pz-grid.solved { gap: 0; transition: gap .4s; }
.pz-grid.solved .pz { border-radius: 0; box-shadow: none; }
.pz-hint { width: 120px; aspect-ratio: 1; border-radius: 18px; background-size: cover; opacity: .9; box-shadow: inset 0 0 0 3px #f1e4fb; }
.rh-main { display: flex; gap: 16px; align-items: center; flex: 1; min-height: 0; }
.rh-main canvas { height: 100%; width: auto; }
.rh-dancer { width: 160px; }
.rh-keys { display: grid; grid-template-columns: repeat(4, 96px); gap: 10px; }
.rh-keys button { height: 80px; border-radius: 26px; font-size: 40px; box-shadow: 0 6px 0 rgba(0, 0, 0, .15); }
.rh-keys button.press { animation: press .18s; }
.judge { font-size: 24px; color: #7d5cff; }
.judge.pop { animation: popin .3s; }

@keyframes pillowfly { 0% { transform: translate(0, 0) rotate(0); } 50% { transform: translate(calc(var(--dx) / 2), calc(var(--dy) / 2 - 140px)) rotate(200deg); } 100% { transform: translate(var(--dx), var(--dy)) rotate(400deg); } }
@keyframes shakeball { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-8px) rotate(-6deg); } 75% { transform: translateX(8px) rotate(6deg); } }
@keyframes sing { from { transform: rotate(-4deg) scale(1, 1); } to { transform: rotate(4deg) scale(1.02, .98); } }
@keyframes press { 50% { transform: translateY(5px) scale(.94); } }

@media (max-width: 760px), (max-height: 520px) {
  .g-card { font-size: 44px; border-radius: 24px; }
  .rh-keys { grid-template-columns: repeat(4, 70px); }
  .rh-keys button { height: 58px; font-size: 30px; }
  .rh-dancer { width: 90px; }
  .pz-hint { display: none; }
}

/* ---------- друзья ---------- */
.room-tabs { display: flex; gap: 10px; margin-bottom: 14px; padding-right: 60px; }
.room-tabs button { position: relative; width: 84px; height: 62px; border-radius: 22px; background: #f3eafd; font-size: 32px; }
.room-tabs button.on { background: var(--pink); box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .12); }
.room-tabs .news, #b-friends.has-news::after { position: absolute; right: 6px; top: 6px; width: 14px; height: 14px; border-radius: 50%; background: #ff4f6b; box-shadow: 0 0 0 3px #fff; display: none; }
.room-tabs .news.on { display: block; }
#b-friends.has-news::after { content: ''; display: block; }
.friends-tab { display: flex; flex-direction: column; gap: 10px; align-items: stretch; }
.fr-me { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 18px; color: #a0789c; }
.fr-me b { display: flex; gap: 6px; }
.fr-me i { font-style: normal; width: 50px; height: 60px; display: grid; place-items: center; border-radius: 16px; background: #fff0f5; color: var(--pink-d); font-size: 34px; }
.fr-add { align-self: center; }
.pl-name small { display: block; font-size: 14px; color: #a0789c; }
.pl.incoming, .pl.invite { box-shadow: inset 0 0 0 3px var(--pink); background: #fff6fa; }
.pl.online .pl-av { box-shadow: 0 0 0 3px var(--mint); }
.pl-btns .yes { background: var(--mint); color: #fff; }
.pl-btns .small-x { width: 44px; font-size: 20px; opacity: .6; }
.fr-wait { text-align: center; font-size: 15px; color: #a0789c; }
.fr-empty { text-align: center; padding: 10px; }

/* ---------- позы: сидя / лёжа, предмет в руке ---------- */
.actor.pose-lie .flip, .actor.pose-lie .flip.left { transform: rotate(-90deg); }
.actor.pose-lie .anim, .actor.pose-sit .anim { animation: breathe 3.2s ease-in-out infinite; }
.actor.pose-lie .tag, .actor.pose-lie .ring, .actor.pose-lie .avatar .shadow, .actor.pose-sit .avatar .shadow { display: none; }
.actor.pose-lie .bubble { transform: translate(-50%, 0) rotate(90deg) scale(0); }
.actor.pose-lie .bubble.show { transform: translate(-50%, 0) rotate(90deg) scale(1); }
.actor.pose-sleep .eyes-open { display: none; }
.actor.pose-sleep .eyes-closed { display: inline; }
.actor.pose-sit .tag { top: 80%; }
.furn.blanket { transform: translate(-50%, -100%); }
.furn.blanket.flipped svg { transform: scaleX(-1); }
.furn.placed-item { transform: translate(-50%, -100%); filter: drop-shadow(0 4px 2px rgba(90, 60, 120, .2)); }
#hold-btn { position: fixed; right: 16px; top: max(92px, calc(env(safe-area-inset-top) + 82px)); z-index: 61; width: 76px; height: 76px; border-radius: 26px; background: var(--card); box-shadow: var(--shadow); display: none; align-items: center; justify-content: center; font-size: 30px; }
#hold-btn.show { display: flex; animation: popin .3s cubic-bezier(.3, 1.5, .5, 1); }
#hold-btn svg { width: 46px; height: 46px; }
#hold-btn span { position: absolute; right: 4px; bottom: 2px; font-size: 18px; }
.editing #hold-btn { display: none; }
.item .steam { animation: steam 1.6s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.01, .99); } }
@keyframes steam { 0%, 100% { opacity: .2; transform: translateY(2px); } 50% { opacity: .9; transform: translateY(-2px); } }

/* ---------- занятия ---------- */
.actor.playing .arm-l { animation: armwave .35s ease-in-out infinite alternate; }
.actor.playing .arm-r { animation: armwave2 .35s ease-in-out infinite alternate; animation-delay: .17s; }
.actor.sliding .flip { transform: rotate(-12deg); }
.actor.sliding .flip.left { transform: scaleX(-1) rotate(-12deg); }
.actor.in-bath .tag, .actor.on-swing .tag { display: none; }
.actor.on-swing { transform-origin: 50% 0; }
.fxpic { transform: translate(-50%, -50%); animation: fxpic 1.3s ease-in-out forwards; }
.fxpic svg { width: 100%; height: auto; }
.fxpic.dryer svg { transform: scaleX(-1); }
@keyframes fxpic { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.6); } 15%, 80% { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(-6deg); } 50% { transform: translate(-50%, -50%) scale(1) rotate(6deg); } 100% { opacity: 0; } }
.pet.resting .panim { animation: none; transform: scale(1.06, .9); transform-origin: 50% 100%; }
.pet.sleeping .p-eye { transform: scaleY(.12); animation: none; }
.pet.sleeping .p-tail { animation: none; }
.umbrella { transform-box: view-box; transform-origin: 47px 214px; animation: umbrella 2.4s ease-in-out infinite; }
@keyframes umbrella { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }

/* ---------- селфи 🪄 ---------- */
.selfie-btn { width: 100%; margin-bottom: 14px; font-size: 34px; background: linear-gradient(90deg, #ffe0ec, #e6dcff, #d8f5ea); }
.selfie { display: flex; flex-direction: column; align-items: center; gap: 12px; padding-top: 24px; }
.sf-view { position: relative; width: min(100%, 480px); aspect-ratio: 4 / 3; border-radius: 26px; overflow: hidden; background: #2f2b3f; }
.sf-view video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.sf-oval { position: absolute; inset: 0; width: 100%; height: 100%; }
.sf-hint { font-size: 20px; }
.sf-note { font-size: 14px; color: #a0789c; }
.selfie-result { display: flex; flex-direction: column; align-items: center; gap: 10px; padding-top: 20px; }
.sr-title { font-size: 44px; }
.sr-av { width: 220px; }
.actor.pose-lie { transform-origin: 50% 50%; }
