/* Everyday life in the sede: weather and city behind the window, lamps, moths, a phone. */
/* Behind the glass: lives inside .clubhouse-sky, which is masked to the window panes. */
.club-life-sky { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.club-life-sky > i { position: absolute; display: block; }
.club-life-tint { inset: 0; }
.club-life-tint--grey { background: #59606b; opacity: .38; mix-blend-mode: multiply; }
.club-life-tint--rain { background: linear-gradient(#2b3240, #4a5363); opacity: .28; mix-blend-mode: multiply; }
.club-life-tint--fog { background: #c9ced6; opacity: .55; }
.club-life-mist { left: -60%; top: 40%; width: 220%; height: 30%; background: linear-gradient(90deg, transparent, #e3e7ecaa 30%, #e3e7ec66 60%, transparent); filter: blur(4px); animation: club-life-mist 40s linear infinite; }
.club-life-mist--2 { top: 66%; height: 24%; animation-duration: 58s; animation-direction: reverse; opacity: .7; }
.club-life-cloud {
  left: 0; top: var(--y); width: 46%; height: 9%; border-radius: 3px; background: #eef1f5; opacity: .82; scale: var(--s);
  animation: club-life-drift var(--d) linear var(--o) infinite;
}
.club-life-cloud::before, .club-life-cloud::after { content: ""; position: absolute; bottom: 60%; height: 90%; border-radius: 3px; background: inherit; }
.club-life-cloud::before { left: 16%; width: 38%; }
.club-life-cloud::after { left: 44%; width: 30%; height: 70%; }
:is(.clubhouse-room, .chota-viewer-room-scene):is([data-time="night"], [data-time="evening"]) .club-life-cloud { background: #6d7486; opacity: .6; }
/* Shared rain v2: immutable streak shapes, three optical depths and glass droplets.
   Only transform/opacity animate. The existing pane masks remain the clipping authority. */
.club-rain-field{position:absolute;inset:0;display:block;overflow:hidden;pointer-events:none;contain:layout paint}
.club-rain-depth{position:absolute;inset:0;display:block;overflow:hidden}
.club-rain-streak{position:absolute;display:block;left:var(--rain-x);top:-18px;width:var(--rain-width);height:calc(100% + 36px);opacity:var(--rain-alpha);animation:club-rain-fall var(--rain-duration) linear var(--rain-phase) infinite;animation-play-state:paused}
.club-rain-streak::before{content:"";position:absolute;left:0;top:0;width:100%;height:var(--rain-length);border-radius:50%;background:linear-gradient(to bottom,transparent,#b2c9d8 76%,#d5e4ee);transform:rotate(calc(-1 * var(--rain-lean)));transform-origin:50% 100%}
.club-rain-depth[data-depth=far]{opacity:.8}.club-rain-depth[data-depth=near]{opacity:.9}
.club-rain-bead{position:absolute;display:block;left:var(--glass-x);top:var(--glass-y);width:var(--glass-width);height:var(--glass-height);border-radius:48% 48% 55% 55%;opacity:var(--glass-alpha);background:radial-gradient(ellipse at 30% 23%,#ecf4f9 0 13%,#a3b7c755 22% 50%,#33465588 77%,transparent 90%);box-shadow:inset -.4px -.4px .5px #d2e1eb66}
.club-rain-glass-run{position:absolute;display:block;left:var(--glass-x);top:var(--glass-y);width:1.7px;height:3.2px;border-radius:45% 45% 55% 55%;background:#c7dbe69c;opacity:0;animation:club-rain-on-glass var(--glass-duration) cubic-bezier(.45,0,.75,.42) var(--glass-phase) infinite;animation-play-state:paused}
.club-rain-glass-run::before{content:"";position:absolute;bottom:50%;left:.55px;width:.55px;height:var(--glass-tail);background:linear-gradient(transparent,#c1d7e344);border-radius:50%}
:is(.club-life-sky,.store-window)[data-rain-running=true] :is(.club-rain-streak,.club-rain-glass-run){animation-play-state:running}
@keyframes club-rain-fall{from{transform:translate3d(0,0,0)}to{transform:translate3d(var(--rain-drift),100%,0)}}
@keyframes club-rain-on-glass{0%,16%{transform:translate3d(0,0,0);opacity:0}22%{opacity:.22}34%{transform:translate3d(.2px,3px,0);opacity:.29}76%{opacity:.27}100%{transform:translate3d(1px,var(--glass-fall),0);opacity:0}}
:root[data-motion-quality=low] .club-rain-depth[data-depth=far] .club-rain-streak:nth-child(n+8),:root[data-motion-quality=low] .club-rain-depth[data-depth=middle] .club-rain-streak:nth-child(n+6),:root[data-motion-quality=low] .club-rain-depth[data-depth=near] .club-rain-streak:nth-child(n+3),:root[data-motion-quality=low] .club-rain-glass-run{display:none}
:root[data-reduced-motion=true] :is(.club-rain-streak,.club-rain-glass-run){display:none!important;animation:none!important}
@media(prefers-reduced-motion:reduce){.club-rain-streak,.club-rain-glass-run{display:none!important}.club-rain-field *{animation:none!important}}

.club-life-snow {
  inset: -30% 0 0; background-image: radial-gradient(#fff 1.2px, transparent 1.6px), radial-gradient(#fff 1px, transparent 1.4px);
  background-size: 22px 22px, 15px 15px; background-position: 0 0, 7px 9px; animation: club-life-snow 7s linear infinite;
}
.club-life-snow--far { opacity: .55; background-size: 12px 12px, 9px 9px; animation-duration: 11s; }
.club-life-window { left: var(--x); top: var(--y); width: 2.6%; height: 1.8%; background: #ffd77a; box-shadow: 0 0 3px #ffcc6699; transition: opacity 1.2s ease; }
.club-life-window.is-off { opacity: .08; }
.club-life-star { left: var(--x); top: var(--y); width: 26%; height: 1.5px; background: linear-gradient(90deg, transparent, #fff); rotate: 24deg; transform-origin: 100% 50%; animation: club-life-star 1.1s ease-out both; }
.club-life-sky.is-lit::after { content: ""; position: absolute; inset: 0; background: #f2f4ff; animation: club-life-lightning .9s steps(1) both; }
@keyframes club-life-mist { from { translate: 0 0; } to { translate: 45% 0; } }
@keyframes club-life-drift { from { translate: -110% 0; } to { translate: 260% 0; } }
@keyframes club-life-snow { to { background-position: 10px 66px, -6px 45px; } }
@keyframes club-life-star { 0% { opacity: 0; transform: translateX(-30%) scaleX(.2); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateX(80%) scaleX(1); } }
@keyframes club-life-lightning { 0% { opacity: .9; } 12% { opacity: 0; } 22% { opacity: .7; } 34%, 100% { opacity: 0; } }

/* Inside the room. Positions follow the illustration's 1024 px grid. */
.club-life { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.club-life > * { position: absolute; display: block; }
.club-life-flash { inset: 0; background: #dfe6ff; opacity: 0; mix-blend-mode: screen; }
.club-life-flash.is-on { animation: club-life-room-flash 1s steps(1) both; }
@keyframes club-life-room-flash { 0% { opacity: .32; } 12% { opacity: 0; } 22% { opacity: .2; } 34%, 100% { opacity: 0; } }
/* Lamps breathe a warm glow in the evening; they go out with the lights. */
.club-life-glow { width: 16%; aspect-ratio: 1; margin: -8% 0 0 -8%; border-radius: 50%; background: radial-gradient(#ffcf7a66, transparent 65%); opacity: 0; mix-blend-mode: screen; transition: opacity 3s ease; }
.club-life-glow--stump { left: 5.5%; top: 69%; }
.club-life-glow--lantern { left: 96.3%; top: 65.8%; width: 11%; margin: -5.5% 0 0 -5.5%; }
.club-life.is-night .club-life-glow { opacity: 1; animation: club-life-breathe 5s ease-in-out infinite; }
.club-life.is-night .club-life-glow--lantern { animation-duration: 3.4s; animation-delay: -1.2s; }
.club-life.is-lights-off .club-life-glow { opacity: 0; animation: none; }
@keyframes club-life-breathe { 0%, 100% { scale: 1; opacity: .85; } 40% { scale: 1.06; opacity: 1; } 47% { opacity: .7; } 52% { opacity: 1; } }
/* Two moths circle the ceiling lamp at night while the lights are on. */
.club-life-moths { left: 41%; top: 9.5%; width: 0; height: 0; opacity: 0; transition: opacity 2s ease; }
.club-life.is-night .club-life-moths { opacity: 1; }
.club-life.is-lights-off .club-life-moths { opacity: 0; }
.club-life-moths i { position: absolute; left: 0; top: 0; width: 5px; height: 4px; border-radius: 50% 50% 40% 40%; background: #e9dfc6; box-shadow: 0 0 3px #fff4cc; offset-path: path("M0 0 C 30 -14 46 10 20 18 C -6 26 -40 12 -26 -4 C -14 -18 -10 -4 0 0"); animation: club-life-moth 3.6s linear infinite; }
.club-life-moths i:nth-child(2) { animation-duration: 5.1s; animation-direction: reverse; animation-delay: -2s; scale: .8; }
@keyframes club-life-moth { to { offset-distance: 100%; } }
/* A phone left face up on the rug, by the sofa, buzzes now and then. */
.club-life-phone { left: 20.5%; top: 66.5%; width: 2.6%; aspect-ratio: .55; border: 1px solid #1a1410; border-radius: 2px; background: #22252b; rotate: -18deg; }
.club-life-phone i { position: absolute; inset: 12% 10%; border-radius: 1px; background: #3b4a63; opacity: .35; }
.club-life-phone b { position: absolute; left: 120%; top: -60%; color: #fff6e3; font: 800 clamp(7px, 1.6vw, 10px)/1 ui-monospace, monospace; text-shadow: 1px 1px 0 #1a1410; opacity: 0; white-space: nowrap; }
.club-life-phone.is-buzzing { animation: club-life-buzz 1.4s linear; }
.club-life-phone.is-buzzing i { background: #9fd3f0; opacity: 1; box-shadow: 0 0 8px #9fd3f0; transition: opacity .2s; }
.club-life-phone.is-buzzing b { animation: club-life-bzz 1.4s ease-out; }
.club-life.is-lights-off .club-life-phone { opacity: .5; }
@keyframes club-life-buzz { 0%, 100% { translate: 0 0; } 10%, 30%, 50%, 70% { translate: -1px 0; } 20%, 40%, 60%, 80% { translate: 1px 0; } }
@keyframes club-life-bzz { 0% { opacity: 0; translate: 0 4px; } 20%, 70% { opacity: 1; translate: 0 0; } 100% { opacity: 0; translate: 2px -6px; } }

/* Modest phones keep the weather, without the heavier moving layers. */
:root[data-motion-quality=low] :is(.club-life-mist, .club-life-snow--far, .club-life-moths) { display: none; }
@media (prefers-reduced-motion: reduce) {
  .club-life-sky *, .club-life * { animation: none !important; }
  .club-life-moths, .club-life-star, .club-life-sky.is-lit::after { display: none; }
}
