/* Знакора: зима в веб-версии (js/winter.js) */
.wn-snow { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 40; }
.wn-sprite { --size: 100%; display: inline-block; width: var(--size); height: var(--size); background: url("/public/winter/sprites.webp") 0 0 / calc(var(--size) * 8) calc(var(--size) * 5) no-repeat; flex: 0 0 auto; }
.wn-sprite[hidden] { display: none; }
.sidebar-header { position: relative; }
.wn-garland { position: absolute; left: 0; right: 0; bottom: -20px; height: 30px; pointer-events: none; z-index: 3; color: var(--text-main); }
.wn-garland svg { width: 100%; height: 100%; display: block; overflow: visible; }
.wn-lamp { animation: wn-lamp 2.6s ease-in-out infinite; animation-delay: calc(var(--n) * -.43s); }
html[data-winter-still] .wn-lamp { animation: none; }
@keyframes wn-lamp { 50% { opacity: .42; } }
.wn-hatted { position: relative; overflow: visible; }
.wn-hat { position: absolute; left: -.16em; top: -.5em; width: 1em; height: 1em; line-height: 0; transform: rotate(-9deg); pointer-events: none; }
.wn-hat .wn-sprite { --size: 1em; }
.workspace-header { position: relative; }
html[data-winter-wallpaper] .messages { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180' fill='none' stroke='%237d9ab5' stroke-opacity='.20' stroke-width='1.6' stroke-linecap='round'%3E%3Cg transform='translate(40 46)'%3E%3Cpath d='M0-18V18M-15.6-9 15.6 9M-15.6 9 15.6-9M-5-14 0-9 5-14M-5 14 0 9 5 14'/%3E%3C/g%3E%3Cg transform='translate(132 116) scale(.7)'%3E%3Cpath d='M0-18V18M-15.6-9 15.6 9M-15.6 9 15.6-9M-5-14 0-9 5-14M-5 14 0 9 5 14'/%3E%3C/g%3E%3Ccircle cx='110' cy='34' r='2'/%3E%3Ccircle cx='62' cy='130' r='2.4'/%3E%3Ccircle cx='158' cy='64' r='1.6'/%3E%3C/svg%3E"); background-size: 180px 180px; background-repeat: repeat; }
.wn-banner { position: relative; margin: 8px 12px; padding: 16px; border-radius: 20px; color: #fff; background: linear-gradient(100deg, rgba(10, 20, 48, .82), rgba(10, 20, 48, .35)), url("/public/winter/night-wide.webp") center / cover; display: flex; flex-direction: column; gap: 12px; }
.wn-banner b { display: block; font-size: 15px; margin-bottom: 4px; padding-right: 26px; }
.wn-banner span { font-size: 13px; line-height: 1.4; opacity: .92; }
.wn-banner-row { display: flex; flex-wrap: wrap; gap: 8px; }
.wn-banner-row .btn { min-height: 36px; padding: 6px 14px; font-size: 13px; }
.wn-banner-row .btn-ghost { background: rgba(255, 255, 255, .16); color: #fff; }
.wn-banner-close { position: absolute; right: 10px; top: 10px; width: 30px; height: 30px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .16); color: #fff; cursor: pointer; }
.wn-overlay { display: flex; }
.wn-dialog { width: min(720px, calc(100vw - 24px)); height: min(860px, calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom))); max-height: none; display: flex; flex-direction: column; overflow: hidden; padding: 0; outline: 0; }
.wn-header { display: flex; align-items: center; gap: 10px; padding: 12px 14px; }
.wn-tabs { flex: 1; display: flex; gap: 4px; padding: 4px; border-radius: 20px; background: var(--surface); min-width: 0; }
.wn-tab { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--text-sec); font: inherit; font-size: 14px; font-weight: 500; padding: 9px 4px; border-radius: 16px; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: background .18s; }
.wn-tab[aria-selected="true"] { background: var(--surface-raised); color: var(--text-main); font-weight: 600; box-shadow: 0 1px 6px rgba(0, 0, 0, .1); }
.wn-body { flex: 1; min-height: 0; overflow: auto; padding: 2px 16px 22px; display: flex; flex-direction: column; gap: 14px; overscroll-behavior: contain; text-align: start; }
.wn-note { margin: 4px 0; text-align: center; color: var(--text-sec); font-size: 13px; line-height: 1.45; }
.wn-title { margin: 8px 2px 0; font-size: 14px; font-weight: 600; color: var(--text-sec); }
.wn-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 2px; cursor: pointer; }
.wn-row span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.wn-row b, .wn-choice > b { font-weight: 500; font-size: 15px; }
.wn-row small { color: var(--text-sec); font-size: 13px; line-height: 1.35; }
.wn-switch { appearance: none; -webkit-appearance: none; width: 46px; height: 28px; flex: 0 0 auto; border-radius: 14px; background: var(--border); position: relative; cursor: pointer; transition: background .18s; }
.wn-switch::after { content: ''; position: absolute; left: 3px; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .25); transition: transform .2s cubic-bezier(.3, 1.2, .4, 1); }
.wn-switch:checked { background: var(--primary); }
.wn-switch:checked::after { transform: translateX(18px); }
.wn-switch:focus-visible, .wn-chip:focus-visible, .wn-pick:focus-visible, .wn-toy:focus-visible, .wn-card:focus-visible, .wn-bulb:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.wn-choice { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.wn-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.wn-chip { border: 0; border-radius: 18px; padding: 9px 14px; background: var(--surface); color: var(--text-main); font: inherit; font-size: 14px; cursor: pointer; }
.wn-chip[aria-pressed="true"], .wn-pick[aria-pressed="true"] { background: var(--primary); color: var(--on-primary, #fff); }
.wn-body > * { flex: 0 0 auto; }
.wn-body > .wn-play { flex: 1 0 auto; }
.wn-room { position: relative; width: 100%; max-width: 480px; margin: 0 auto; aspect-ratio: 4 / 5; border-radius: 24px; overflow: hidden; background: #4a3642 center / cover no-repeat; flex: 0 0 auto; user-select: none; -webkit-user-select: none; }
.wn-tree { position: absolute; left: 7%; top: 10.32%; width: 86%; height: 81.18%; }
.wn-crown, .wn-lights, .wn-toys { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; }
.wn-topper { position: absolute; left: 50%; top: 6.2%; width: 20%; aspect-ratio: 1; transform: translate(-50%, -50%); container-type: inline-size; pointer-events: none; }
.wn-topper .wn-sprite { --size: 100cqw; }
.wn-toy { position: absolute; width: 15.5%; aspect-ratio: 1; padding: 0; border: 0; background: transparent; transform: translate(-50%, -50%); pointer-events: auto; touch-action: none; cursor: grab; container-type: inline-size; filter: drop-shadow(0 3px 3px rgba(0, 0, 0, .28)); transition: filter .15s; }
.wn-toy .wn-sprite { --size: 100cqw; }
.wn-toy.is-held { cursor: grabbing; filter: drop-shadow(0 10px 10px rgba(0, 0, 0, .4)); z-index: 2; }
.wn-toy.is-out { opacity: .45; }
.wn-toy.is-new { animation: wn-hang .45s cubic-bezier(.3, 1.5, .5, 1); }
@keyframes wn-hang { from { opacity: 0; transform: translate(-50%, -140%) scale(.6); } }
.wn-fire { position: absolute; right: -1%; bottom: 20%; width: 27%; height: 15%; pointer-events: none; overflow: hidden; display: flex; justify-content: center; align-items: flex-end; }
.wn-fire::before { content: ''; position: absolute; inset: -40% -10% -10%; background: radial-gradient(closest-side, rgba(255, 170, 80, .42), transparent); }
.wn-fire i { width: 20%; height: 72%; margin: 0 -3%; border-radius: 50% 50% 46% 46% / 74% 74% 26% 26%; background: radial-gradient(ellipse at 50% 88%, #fff2b8 0 18%, #ffc14d 40%, #ff7a2e 72%, rgba(255, 80, 30, 0) 100%); transform-origin: 50% 100%; animation: wn-flame 1.1s ease-in-out infinite alternate; }
.wn-fire i:nth-child(2) { height: 90%; animation-duration: .9s; } .wn-fire i:nth-child(3) { height: 100%; animation-duration: 1.3s; } .wn-fire i:nth-child(4) { height: 82%; animation-duration: 1s; } .wn-fire i:nth-child(5) { height: 64%; animation-duration: 1.2s; }
.wn-tree { z-index: 1; } .wn-room-tools { z-index: 2; }
html[data-winter-still] .wn-fire i { animation: none; }
@keyframes wn-flame { from { transform: scale(1, .78) skewX(-4deg); } to { transform: scale(.9, 1.05) skewX(5deg); } }
.wn-room-tools { position: absolute; right: 12px; top: 12px; display: flex; flex-direction: column; gap: 2px; padding: 5px; border-radius: 22px; background: rgba(14, 14, 24, .42); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.wn-tool { width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; color: #fff; font-size: 18px; cursor: pointer; }
.wn-tool:hover { background: rgba(255, 255, 255, .16); }
.wn-tool:disabled { opacity: .35; cursor: default; }
.wn-panel { display: flex; flex-direction: column; gap: 14px; }
.wn-strip { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.wn-strip::-webkit-scrollbar { display: none; }
.wn-pick { flex: 0 0 auto; min-width: 66px; min-height: 66px; padding: 6px; border: 0; border-radius: 18px; background: var(--surface); color: var(--text-main); font: inherit; font-size: 13px; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.wn-pick--text { min-height: 48px; padding: 8px 14px; flex-direction: row; }
.wn-pick.is-locked { opacity: .42; }
.wn-bank { display: flex; flex-direction: column; gap: 12px; padding: 22px 20px; min-height: 120px; justify-content: space-between; border-radius: 24px; color: #fff; background: linear-gradient(90deg, rgba(10, 20, 48, .7), transparent 80%), url("/public/winter/night-wide.webp") center / cover; }
.wn-bank .wn-flakes b { font-size: 30px; }
.wn-flakes { display: inline-flex; align-items: center; gap: 7px; color: inherit; }
.wn-flake-icon { font-style: normal; opacity: .85; }
.wn-day { flex: 0 0 64px; padding: 10px 4px; border: 2px solid transparent; border-radius: 18px; background: var(--surface); color: var(--text-main); font: inherit; display: flex; flex-direction: column; align-items: center; gap: 2px; cursor: default; }
.wn-day i { font-style: normal; font-size: 18px; }
.wn-day small { font-size: 11px; color: var(--text-sec); }
.wn-day.is-today { border-color: var(--primary); cursor: pointer; }
.wn-day.is-today i { animation: wn-wiggle 1.6s ease-in-out infinite; }
.wn-day.is-past, .wn-day.is-taken { opacity: .5; }
@keyframes wn-wiggle { 20% { transform: rotate(-10deg) scale(1.12); } 40% { transform: rotate(9deg) scale(1.12); } 60% { transform: none; } }
.wn-game { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 18px 18px 20px; border: 0; border-radius: 24px; color: #fff; font: inherit; text-align: start; cursor: pointer; transition: transform .16s; }
.wn-game:active { transform: scale(.98); }
.wn-game--post { background: linear-gradient(120deg, #2a5ba0, #15305e); }
.wn-game--pairs { background: linear-gradient(120deg, #8e4a8c, #4b2658); }
.wn-game--lights { background: linear-gradient(120deg, #2e7d62, #174035); }
.wn-game > span:first-child { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.wn-game b { font-size: 18px; }
.wn-game small { font-size: 14px; opacity: .88; line-height: 1.35; }
.wn-game em { font-style: normal; font-size: 13px; font-weight: 600; color: #ffe29a; }
.wn-game-art { display: flex; flex: 0 0 auto; background: radial-gradient(closest-side, rgba(255, 255, 255, .28), transparent); }
.wn-game-art .wn-sprite + .wn-sprite { margin-left: -14px; }
.wn-game-art .wn-sprite:nth-child(2) { transform: translateY(-12px); }
.wn-shop { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px; }
.wn-reward { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 14px 8px; border: 0; border-radius: 20px; background: var(--surface); color: var(--text-main); font: inherit; text-align: center; cursor: pointer; min-width: 0; }
.wn-reward b { font-size: 14px; font-weight: 600; min-height: 2.5em; display: grid; place-items: center; line-height: 1.25; }
.wn-reward small { font-size: 12px; color: var(--text-sec); }
.wn-reward.is-owned { background: var(--accent-subtle); cursor: default; }
.wn-reward .wn-owned { color: var(--primary); font-weight: 600; }
.wn-lamps { display: flex; gap: 5px; height: 58px; align-items: center; }
.wn-lamps i { width: 11px; height: 14px; border-radius: 50%; box-shadow: 0 0 8px rgba(255, 255, 255, .5); }
.wn-locked { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 44px 18px 90px; border-radius: 26px; color: #fff; text-align: center; background: linear-gradient(rgba(10, 20, 48, .6), rgba(10, 20, 48, .15)), url("/public/winter/night.webp") center bottom / cover; }
.wn-locked h3 { margin: 0; font-size: 24px; font-weight: 600; }
.wn-locked p { margin: 0; font-size: 15px; }
.wn-clock { display: flex; gap: 8px; }
.wn-clock span { width: 70px; padding: 10px 4px; border-radius: 16px; background: rgba(255, 255, 255, .16); display: flex; flex-direction: column; }
.wn-clock b { font-size: 24px; font-variant-numeric: tabular-nums; }
.wn-clock small { font-size: 12px; opacity: .85; }
.wn-play { flex: 1; display: flex; flex-direction: column; min-height: 420px; border-radius: 26px; overflow: hidden; background: #0f1d3c url("/public/winter/night.webp") center bottom / cover; color: #fff; }
.wn-play-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; }
.wn-play-head b { flex: 1; font-size: 16px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wn-play-back { width: 36px; height: 36px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .16); color: #fff; font-size: 22px; line-height: 1; cursor: pointer; }
.wn-badge { padding: 6px 12px; border-radius: 16px; background: rgba(255, 255, 255, .16); font-size: 14px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.wn-field { position: relative; flex: 1; min-height: 360px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.wn-canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: ew-resize; outline: 0; }
.wn-result { position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 20px; background: rgba(8, 14, 32, .78); text-align: center; animation: wn-in .3s ease; }
.wn-result h3 { margin: 0; font-size: 21px; }
.wn-result p { margin: 0; opacity: .9; }
.wn-result .wn-flakes b { font-size: 28px; }
.wn-result .btn { min-width: 200px; margin-top: 4px; }
.wn-result .btn-ghost { color: #fff; background: rgba(255, 255, 255, .14); }
@keyframes wn-in { from { opacity: 0; } }
.wn-pairs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; width: min(400px, calc(100% - 28px)); padding: 12px 0 24px; }
.wn-card { aspect-ratio: 1; padding: 0; border: 0; background: transparent; perspective: 600px; cursor: pointer; }
.wn-card-inner { position: relative; display: block; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .4s cubic-bezier(.4, 0, .2, 1); }
.wn-card.is-open .wn-card-inner { transform: rotateY(180deg); }
.wn-card-front, .wn-card-back { position: absolute; inset: 0; display: grid; place-items: center; border-radius: 18px; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.wn-card-back { background: linear-gradient(135deg, #4d7cc0, #2a4e8c 55%, #3b3f86); border: 1.6px solid rgba(232, 201, 138, .55); color: rgba(255, 255, 255, .75); font-size: 30px; }
.wn-card-front { background: linear-gradient(135deg, #fff, #dceaf8); transform: rotateY(180deg); }
.wn-card.is-found .wn-card-front { box-shadow: 0 0 0 3px #ffd98a, 0 0 18px rgba(255, 217, 138, .6); }
.wn-hint { font-size: 18px; font-weight: 600; margin: 0 0 14px; min-height: 1.4em; }
.wn-bulbs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 34px 40px; padding-bottom: 60px; }
.wn-bulb { position: relative; width: clamp(88px, 24vw, 120px); aspect-ratio: .82; border: 0; padding: 0; cursor: pointer; border-radius: 50% 50% 50% 50% / 38% 38% 62% 62%; background: radial-gradient(circle at 36% 30%, color-mix(in srgb, var(--c) 70%, #fff), var(--c) 48%, color-mix(in srgb, var(--c) 48%, #000)); opacity: .66; transition: opacity .12s, box-shadow .12s, transform .12s; }
.wn-bulb::before { content: ''; position: absolute; left: 31%; top: -13%; width: 38%; height: 19%; border-radius: 5px; background: linear-gradient(90deg, #4e5a6e, #b9c5d6 42%, #465063); }
.wn-bulb::after { content: ''; position: absolute; left: 20%; top: 20%; width: 14%; height: 46%; border-radius: 50%; background: rgba(255, 255, 255, .45); transform: rotate(10deg); }
.wn-bulb:active { transform: scale(.96); }
.wn-bulb.is-lit { opacity: 1; box-shadow: 0 0 60px 14px var(--c); }
@media (max-width: 600px) { .wn-dialog { width: 100vw; height: calc(100dvh - env(safe-area-inset-top)); border-radius: 26px 26px 0 0; align-self: flex-end; } .wn-body { padding-bottom: calc(22px + env(safe-area-inset-bottom)); } }
@media (prefers-reduced-motion: reduce) { .wn-lamp, .wn-fire i, .wn-day.is-today i, .wn-toy.is-new, .wn-result { animation: none; } .wn-card-inner { transition: none; } }

/* Гости комнаты, фото, поручения */
.wn-guests { position: absolute; inset: 0; pointer-events: none; }
.wn-guest { position: absolute; }
.wn-guest--nutcracker { left: 3.11%; top: 60.18%; width: 13.78%; }
.wn-guest--cat { left: 71.44%; top: 80.71%; width: 28.56%; z-index: 2; transform-origin: 50% 100%; animation: wn-purr 3.4s ease-in-out infinite; }
.wn-guest--train { left: 5%; top: 85.96%; width: 90%; }
.wn-photo { display: block; width: 72%; aspect-ratio: 1; margin: auto; border-radius: 50%; border: 3px solid #f2c14e; object-fit: cover; box-shadow: 0 2px 6px rgba(0, 0, 0, .3); }
.wn-face { display: grid; place-items: center; font-size: 30px; line-height: 1; }
.wn-quests { display: grid; gap: 8px; }
.wn-quest { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px; border: 0; border-radius: 18px; background: var(--surface, rgba(127, 127, 127, .1)); color: var(--text-main); font: inherit; text-align: start; }
.wn-quest > span:not(.wn-flakes) { display: flex; flex-direction: column; gap: 5px; flex: 1; min-width: 0; }
.wn-quest b { font-size: 15px; font-weight: 600; }
.wn-quest small { color: var(--text-sec); font-size: 13px; }
.wn-quest > span:not(.wn-flakes) > i { height: 6px; border-radius: 3px; background: linear-gradient(var(--primary), var(--primary)) 0 / calc(var(--part, 0) * 100%) 100% no-repeat, var(--border); }
.wn-quest.is-ready { background: var(--accent-subtle); cursor: pointer; }
.wn-quest.is-taken { opacity: .6; }
.wn-quest em { font-style: normal; color: var(--primary); font-size: 20px; }
.wn-quest .wn-flakes { flex: 0 0 auto; }
@keyframes wn-purr { 50% { transform: scaleY(1.025); } }
@media (prefers-reduced-motion: reduce) { .wn-guest--cat { animation: none; } }
