/* Уголок воспоминаний: два стены, тёплый свет, гирлянда, бумажные звёзды. Цвета стен и металла берутся из палитры. */
html #tree-container::before, html #tree-container::after { display: none !important; }
html #tree-container { overflow: visible; border-radius: 0; position: relative; width: 100%; max-width: none; height: auto; aspect-ratio: auto; margin: 6px 0 0; background: none; border: 0; box-shadow: none; }
.corner { position: relative; width: 100%; aspect-ratio: 5 / 6.4; perspective: 760px; perspective-origin: 50% 34%; overflow: hidden; isolation: isolate; border-radius: 14px;
  background: var(--midnight-deep); box-shadow: inset 0 0 0 1px rgba(var(--foil-rgb), .3), 0 18px 40px -22px rgba(0,0,0,.75); }
.c-floor { position: absolute; left: 0; right: 0; bottom: 0; height: 27%; z-index: 0;
  background: radial-gradient(60% 90% at 50% 0%, rgba(255,200,120,.34), transparent 70%), repeating-linear-gradient(90deg, rgba(0,0,0,.2) 0 1px, transparent 1px 34px), linear-gradient(180deg, #4a301c, #22140b); }
.c-walls { position: absolute; inset: 0 0 18% 0; transform-style: preserve-3d; z-index: 1; }
.c-wall { position: absolute; top: 3%; bottom: 0; width: 50%; transform-style: preserve-3d;
  background: repeating-linear-gradient(90deg, rgba(var(--foil-rgb), .04) 0 2px, transparent 2px 22px), linear-gradient(180deg, var(--night-hi) 0%, var(--midnight) 100%); }
.c-l { left: 0; transform-origin: 100% 50%; transform: rotateY(24deg); filter: brightness(.86); }
.c-r { right: 0; transform-origin: 0 50%; transform: rotateY(-24deg); }
.c-wall::before { content: ""; position: absolute; inset: 0; pointer-events: none; mix-blend-mode: screen; background: radial-gradient(75% 60% at 50% 10%, rgba(255,208,128,.42), transparent 72%); }
.c-wall::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6%; background: linear-gradient(var(--paper-hi), var(--paper-lo)); box-shadow: 0 -2px 6px rgba(0,0,0,.4); }
.c-glow { position: absolute; inset: 0; z-index: 3; pointer-events: none; mix-blend-mode: soft-light; background: radial-gradient(60% 45% at 50% 18%, rgba(255,214,140,.55), transparent 70%), radial-gradient(120% 90% at 50% 50%, transparent 55%, rgba(0,0,0,.55) 100%); }
.c-garland { position: absolute; left: 0; top: 0; width: 100%; height: 14%; overflow: visible; pointer-events: none; z-index: 2; }
.bl { animation: cBulb 2.8s ease-in-out infinite; animation-delay: var(--dl); transform-box: fill-box; transform-origin: center; }
@keyframes cBulb { 50% { opacity: .5; } }
.hs { position: absolute; top: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; transform-origin: 50% 0; animation: cSway 5.5s ease-in-out infinite alternate; filter: drop-shadow(0 0 7px rgba(255,214,140,.75)); pointer-events: none; }
.hs::before { content: ""; width: 1px; height: var(--len); background: rgba(var(--foil-rgb), .65); }
.hs i { display: block; width: var(--z); height: var(--z); background: var(--metal); clip-path: polygon(50% 0, 61% 36%, 98% 38%, 68% 59%, 79% 95%, 50% 74%, 21% 95%, 32% 59%, 2% 38%, 39% 36%); }
@keyframes cSway { from { transform: rotate(-5deg); } to { transform: rotate(5deg); } }
.c-grid { position: absolute; top: 17%; bottom: 10%; width: 90%; display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(6, 1fr); gap: 3% 3.5%; z-index: 2; }
.c-l .c-grid { right: 2%; } .c-r .c-grid { left: 2%; }
.pol { position: relative; min-width: 0; padding: 6% 6% 21%; border: 0; border-radius: 1px; background: var(--paper-hi); cursor: pointer; transform: rotate(var(--r));
  box-shadow: 0 2px 5px rgba(0,0,0,.5), 0 9px 14px -8px rgba(0,0,0,.65); transition: transform .3s cubic-bezier(.22, 1, .36, 1); }
.pol img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; filter: sepia(.12) saturate(.95) contrast(.98); background: var(--paper-lo); }
.pol:hover, .pol:focus-visible { transform: rotate(0) scale(1.28) translateY(-4px); z-index: 6; }
.tape { position: absolute; top: -7%; left: 50%; width: 46%; height: 15%; transform: translateX(-50%) rotate(var(--tr)); background: rgba(var(--foil-rgb), .6); opacity: 0; }
.pol:nth-child(3n+1) .tape { opacity: .85; }
.pol:nth-child(4n+2)::after { content: ""; position: absolute; top: -3%; left: 50%; width: 9%; aspect-ratio: 1; margin-left: -4.5%; border-radius: 50%; background: var(--cranberry-hi); box-shadow: 0 1px 2px rgba(0,0,0,.6), inset 0 1px 1px rgba(255,255,255,.55); }
.pl-play { position: absolute; left: 50%; top: 40%; width: 32%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; background: rgba(0,0,0,.5); }
.pl-play::after { content: ""; position: absolute; left: 38%; top: 28%; border-left: 7px solid #fff; border-top: 5px solid transparent; border-bottom: 5px solid transparent; }
.page.active .pol { animation: polIn .6s cubic-bezier(.22, 1, .36, 1) both; animation-delay: calc(var(--d) * 1ms); }
@keyframes polIn { from { opacity: 0; transform: translateY(20px) rotate(calc(var(--r) * 4)) scale(.78); } }
.cs { position: absolute; z-index: 4; width: var(--s); height: var(--s); pointer-events: none; background: var(--foil-light); clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%); animation: cTw 3.4s ease-in-out infinite; }
@keyframes cTw { 0%, 100% { opacity: .1; transform: scale(.6); } 50% { opacity: 1; transform: scale(1.5); } }
#polaroid-img[hidden] { display: none; } .polaroid-img-wrap video { display: block; width: 100%; max-height: 52vh; background: #000; }
@media (prefers-reduced-motion: reduce) { .bl, .hs, .cs, .page.active .pol { animation: none; } }
