/* GXA Party House - the lobby (house.php).
   One idea: the whole party house at night, cut open like a dollhouse, every room lit its own color.
   Each room's color (den TV blue, living disco pink, kitchen fluorescent yellow, garage work-light
   orange, basement arcade cyan, backyard firefly green) is used everywhere that room shows up. */

.page-house {
  --bg: #0d0720; --panel: #1b1036; --line: #3a2a5c; --text: #fff1dc; --muted: #c9b6e4;
  --accent: #ffb547; --onaccent: #1d1530; --people: #5be3b5;
  --hx-night: #0d0720; --hx-ink: #1d1530; --hx-cream: #fff1dc; --hx-lilac: #c9b6e4;
  --hx-sodium: #ffb547; --hx-mint: #5be3b5; --hx-red: #ff3b5c;
  background: var(--hx-night);
}
.page-house main { max-width: 1240px; }
.page-house .foot { color: var(--muted); }

/* ---------- top: hello, status, countdown, home room ---------- */
.hx-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; padding: 8px 0 22px; }
.hx-title {
  margin: 0 0 8px; font: 400 clamp(2.2rem, 5.2vw, 3.8rem)/1 "Bungee", "Arial Black", sans-serif; color: var(--hx-sodium);
  text-shadow: 0 2px 0 #e0571f, 0 4px 0 #b8401a, 0 6px 0 #8a2c13, 0 0 40px rgba(255,140,60,.3);
  text-wrap: balance;
}
.hx-status { margin: 0; max-width: 60ch; color: var(--hx-lilac); font-size: 1.1rem; }
.hx-status strong { color: var(--hx-cream); font-size: 1.2em; }
.hx-onair {
  display: inline-block; margin-right: 6px; padding: 2px 10px 2px 22px; position: relative; border-radius: 99px;
  background: rgba(255,59,92,.16); border: 1px solid var(--hx-red); color: #ff8aa0; font-weight: 800; font-size: .9rem;
}
.hx-onair::before { content: ""; position: absolute; left: 8px; top: 50%; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%; background: var(--hx-red); animation: hxPulse 1.2s ease-in-out infinite; }
@keyframes hxPulse { 50% { opacity: .25; } }
.hx-head-side { display: flex; align-items: stretch; gap: 14px; flex-wrap: wrap; }
.hx-led { display: flex; gap: 8px; }
.hx-led > span { display: grid; justify-items: center; min-width: 66px; padding: 6px 8px 4px; border-radius: 10px; background: #07050d; border: 1px solid rgba(91,227,181,.3); }
.hx-led b { font: 400 2.3rem/1 "VT323", monospace; color: var(--hx-mint); text-shadow: 0 0 12px rgba(91,227,181,.6); }
.hx-led small { font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--hx-lilac); }
.hx-led-total > span { min-width: 120px; }
.hx-home {
  display: grid; align-content: center; gap: 0; padding: 8px 18px 8px 16px; border-radius: 12px; text-decoration: none;
  background: #150c2a; border: 2px solid var(--c); box-shadow: 0 0 24px color-mix(in srgb, var(--c) 30%, transparent);
  color: var(--hx-cream);
}
.hx-home span { font-size: .8rem; color: var(--hx-lilac); }
.hx-home strong { font: 400 1.15rem "Bungee", sans-serif; color: var(--c); }
.hx-home:hover { background: #1f1240; }

/* ---------- the stage: full width, scrolls sideways on small screens ---------- */
.hx-stage-wrap { position: relative; width: 100vw; margin-left: calc(50% - 50vw); }
.hx-stage { overflow-x: auto; overflow-y: hidden; scrollbar-width: none; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
.hx-stage::-webkit-scrollbar { display: none; }
.hx-canvas { position: relative; width: 100%; max-width: 1600px; margin: 0 auto; aspect-ratio: 1600 / 920; }
.hx-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hx-layer { position: absolute; inset: 0; pointer-events: none; }
@media (max-width: 900px) {
  .hx-canvas { width: 900px; max-width: none; }
}
@media (max-width: 520px) {
  .hx-canvas { width: 820px; }
}
.hx-hint { margin: 10px auto 0; padding: 0 20px; max-width: 1240px; color: var(--hx-lilac); font-size: .92rem; text-align: center; }
.hx-hint-touch { display: none; }
@media (hover: none) { .hx-hint-mouse { display: none; } .hx-hint-touch { display: inline; } }

/* ---------- the drawing ---------- */
.hx-svg text { pointer-events: none; }
.hx-sign-name { font: 400 19px "Bungee", "Arial Black", sans-serif; }
.hx-sign-count { font: 400 21px "VT323", monospace; fill: var(--hx-cream); }
.hx-room.is-lit .hx-sign-count { fill: var(--hx-mint); }
.hx-edge { fill: none; stroke: #120a20; stroke-width: 8; transition: stroke .2s; }
.hx-room { cursor: pointer; transition: filter .35s ease; }
/* The one big moment: on arrival the lights flick on room by room. */
.hx-svg .hx-room[style] { animation: hxLightsOn .7s steps(5) backwards; animation-delay: var(--d, 0s); }
@keyframes hxLightsOn { 0% { filter: brightness(.08); } 40% { filter: brightness(.7); } 60% { filter: brightness(.15); } 100% { filter: brightness(1); } }
.hx-room.is-locked { cursor: default; filter: brightness(.5) saturate(.5); }
.hx-room:not(.is-lit):not(.is-locked) { filter: brightness(.86) saturate(.9); }
.hx-room.is-mine .hx-edge { stroke: var(--hx-sodium); stroke-width: 5; stroke-dasharray: 14 8; }
/* Spotlight: point at a room and the rest of the house dims. */
.hx-svg:has(a.hx-room:hover) .hx-room:not(:hover),
.hx-svg:has(a.hx-room:focus-visible) .hx-room:not(:focus-visible),
.hx-svg.has-peek .hx-room:not(.is-peek) { filter: brightness(.5) saturate(.6); }
a.hx-room:hover, a.hx-room:focus-visible, .hx-room.is-peek { filter: brightness(1.12) saturate(1.1); }
a.hx-room:hover .hx-edge, a.hx-room:focus-visible .hx-edge, .hx-room.is-peek .hx-edge { stroke: var(--hx-cream); stroke-width: 6; stroke-dasharray: none; }
a.hx-room:focus { outline: none; }

/* guests */
.hx-guest { opacity: 0; transition: opacity .6s ease; }
.hx-guest.on { opacity: 1; }
.hx-guest.is-new { animation: hxArrive .7s cubic-bezier(.2,1.5,.4,1); }
@keyframes hxArrive { from { opacity: 0; } }
.hx-body { fill: #0a0612; stroke: var(--rim); stroke-width: 2.4; stroke-opacity: .75; }
.hx-arms path { fill: none; stroke: #0a0612; stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; }
.hx-cup { fill: #d7263d; stroke: none; }
.hx-bob, .hx-dance { transform-box: fill-box; transform-origin: 50% 100%; }
.hx-bob { animation: hxBob 2.6s ease-in-out infinite; }
.hx-dance { animation: hxDance .47s ease-in-out infinite alternate; }
@keyframes hxBob { 50% { transform: translateY(-3px); } }
@keyframes hxDance { from { transform: translateY(0) rotate(-4deg); } to { transform: translateY(-9px) rotate(4deg); } }

/* sky */
.hx-twinkle { animation: hxTwinkle 3.5s ease-in-out infinite; }
@keyframes hxTwinkle { 50% { opacity: .15; } }
.hx-moon { cursor: pointer; }
.hx-shoot { stroke-dasharray: 180; stroke-dashoffset: 180; opacity: 0; }
.hx-svg.is-wishing .hx-shoot { animation: hxShoot 1.1s ease-out forwards; }
@keyframes hxShoot { 0% { opacity: 1; stroke-dashoffset: 180; } 60% { opacity: 1; stroke-dashoffset: 0; } 100% { opacity: 0; stroke-dashoffset: -180; } }
.hx-smoke circle { fill: #c9b6e4; opacity: 0; animation: hxSmoke 6s ease-out infinite; transform-box: fill-box; transform-origin: center; }
.hx-smoke circle:nth-child(2) { animation-delay: -2s; }
.hx-smoke circle:nth-child(3) { animation-delay: -4s; }
@keyframes hxSmoke { 0% { opacity: .3; transform: translate(0, 0) scale(.6); } 100% { opacity: 0; transform: translate(36px, -90px) scale(2.2); } }
.hx-attic { animation: hxAttic 5s steps(1) infinite; }
@keyframes hxAttic { 0%, 70%, 74%, 100% { opacity: 1; } 72% { opacity: .55; } }
.hx-neighbor { animation: hxAttic 9s steps(1) infinite; }

/* den */
.hx-tv { fill: url(#hx-tvglow); animation: hxTv 3.2s steps(6) infinite; }
@keyframes hxTv { 0% { opacity: 1; } 20% { opacity: .78; } 40% { opacity: .95; } 60% { opacity: .7; } 80% { opacity: 1; } }
.hx-scan { animation: hxScan 2.4s linear infinite; }
@keyframes hxScan { from { transform: translateY(0); } to { transform: translateY(52px); } }
.hx-vcr { font: 400 15px "VT323", monospace; fill: #ff4f4f; animation: hxBlink 1s steps(1) infinite; }
@keyframes hxBlink { 50% { opacity: 0; } }
.hx-room[data-room="den"] .hx-wash { animation: hxTv 3.2s steps(6) infinite; }

/* living room */
.hx-beams { opacity: .2; transform-box: view-box; transform-origin: 735px 404px; animation: hxSweep 6s ease-in-out infinite alternate; mix-blend-mode: screen; }
@keyframes hxSweep { from { transform: rotate(-16deg); } to { transform: rotate(16deg); } }
.hx-ball { transform-box: view-box; transform-origin: 735px 404px; }
.hx-glints circle { fill: #fff; animation: hxTwinkle .9s ease-in-out infinite; }
.hx-glints circle:nth-child(2) { animation-delay: -.3s; }
.hx-glints circle:nth-child(3) { animation-delay: -.6s; }
.hx-cone { fill: #2a2238; stroke: #4a4060; stroke-width: 2; transform-box: fill-box; transform-origin: center; animation: hxThump .47s ease-out infinite; }
.hx-cone.big { animation-delay: -.12s; }
@keyframes hxThump { 0% { transform: scale(1.12); } 60%, 100% { transform: scale(.94); } }
.hx-floor { animation: hxFloor 1.88s steps(1) infinite; }
.hx-floor.t0 { fill: #ff4fa3; }
.hx-floor.t1 { fill: #4fe3ff; animation-delay: -.47s; }
.hx-floor.t2 { fill: #ffd166; animation-delay: -.94s; }
.hx-floor.t3 { fill: #6a4cff; animation-delay: -1.41s; }
@keyframes hxFloor { 0% { opacity: .95; } 25% { opacity: .25; } 50% { opacity: .6; } 75% { opacity: .15; } }
.hx-screen-big { font: 400 32px "Bungee", sans-serif; fill: var(--hx-cream); }
.hx-screen-small { font: 400 20px "VT323", monospace; fill: var(--hx-lilac); }
.hx-static { opacity: .9; animation: hxStatic .25s steps(2) infinite; }
@keyframes hxStatic { 50% { opacity: .55; } }
.hx-screen:not([data-screen-state="off"]) .hx-static { opacity: .12; animation: none; }
.hx-screen[data-screen-state="live"] .hx-screen-big { fill: var(--hx-red); animation: hxPulse 1.4s ease-in-out infinite; }
.hx-screen[data-screen-state="play"] .hx-screen-big { fill: var(--hx-mint); font-size: 26px; }
.hx-screen[data-screen-state="paused"] .hx-screen-big { fill: var(--hx-sodium); }

/* kitchen */
.hx-tube { fill: #fffbe6; filter: drop-shadow(0 0 8px #fff6c0); animation: hxTube 7s steps(1) infinite; }
@keyframes hxTube { 0%, 88%, 92%, 100% { opacity: 1; } 89% { opacity: .2; } 90% { opacity: .9; } 91% { opacity: .3; } }
.hx-note { font: 400 9.5px "Permanent Marker", cursive; fill: #1f3fae; }

/* garage */
.hx-poster { font: 400 13px "Bungee", sans-serif; fill: #d7263d; }
.hx-poster-s { font: 800 8px "Archivo", sans-serif; fill: #1d1530; letter-spacing: .08em; }
.hx-amp { font: 400 8px "Bungee", sans-serif; fill: #c9b6e4; }
.hx-drum { font: 400 14px "Bungee", sans-serif; fill: #d7263d; }
.hx-bulb-red { filter: drop-shadow(0 0 8px #ff7a45); animation: hxTwinkle 2.2s ease-in-out infinite; }
.hx-cymbal { transform-box: fill-box; transform-origin: center; animation: hxCymbal .94s ease-in-out infinite; }
@keyframes hxCymbal { 50% { transform: rotate(8deg); } }

/* basement */
.hx-xmas { animation: hxXmas 2s steps(1) infinite; }
@keyframes hxXmas { 50% { opacity: .25; } }
.hx-arcade { animation: hxTv 1.6s steps(4) infinite; }
.hx-neon { font: 400 34px "VT323", monospace; fill: #4fe3ff; filter: drop-shadow(0 0 6px #4fe3ff); animation: hxNeon 4s steps(1) infinite; letter-spacing: .1em; }
@keyframes hxNeon { 0%, 46%, 50%, 100% { opacity: 1; } 47% { opacity: .2; } 49% { opacity: .5; } }
.hx-pong { animation: hxPong 1.2s ease-in-out infinite alternate; }
@keyframes hxPong { 0% { transform: translate(0, 0); } 50% { transform: translate(42px, -18px); } 100% { transform: translate(84px, 0); } }
.hx-lava { animation: hxLava 6s ease-in-out infinite alternate; }
.hx-lava.l2 { animation-duration: 8s; animation-delay: -3s; }
@keyframes hxLava { from { transform: translateY(8px); } to { transform: translateY(-22px); } }

/* backyard */
.hx-fly { fill: #e8ff8a; filter: drop-shadow(0 0 5px #e8ff8a); animation: hxFly 3s ease-in-out infinite; }
@keyframes hxFly { 0%, 100% { opacity: 0; transform: translate(0, 0); } 40% { opacity: 1; } 70% { opacity: .2; transform: translate(10px, -8px); } }
.hx-swing { transform-box: view-box; transform-origin: 204px 606px; animation: hxSwing 2.6s ease-in-out infinite alternate; }
@keyframes hxSwing { from { transform: rotate(-10deg); } to { transform: rotate(10deg); } }
.hx-yard { font: 400 15px "Bungee", sans-serif; fill: #d7263d; }

/* ---------- overheard: chat bubbles that pop out of rooms ---------- */
.hx-bubble {
  position: absolute; z-index: 3; max-width: min(300px, 40%); padding: 9px 13px 10px; border-radius: 14px;
  background: var(--hx-cream); color: var(--hx-ink); border: 3px solid var(--c); font-size: .92rem; line-height: 1.3;
  box-shadow: 0 10px 30px rgba(0,0,0,.45); transform: translate(-50%, -100%); pointer-events: auto; cursor: pointer;
  animation: hxPop .45s cubic-bezier(.2,1.6,.4,1), hxFade .6s ease-in 7.4s forwards;
}
.hx-bubble::after { content: ""; position: absolute; left: 50%; bottom: -12px; margin-left: -9px; border: 9px solid transparent; border-top-color: var(--c); border-bottom: 0; }
.hx-bubble b { display: block; font-weight: 850; font-size: .82rem; color: color-mix(in srgb, var(--c) 55%, #1d1530); }
@keyframes hxPop { from { opacity: 0; transform: translate(-50%, -80%) scale(.6); } }
@keyframes hxFade { to { opacity: 0; transform: translate(-50%, -125%); } }
@media (max-width: 900px) { .hx-bubble { max-width: 240px; font-size: .86rem; } }

/* ---------- peek card ---------- */
.hx-peek {
  position: absolute; z-index: 5; width: 310px; padding: 18px 18px 16px; border-radius: 16px;
  background: rgba(13,7,32,.96); border: 2px solid var(--c, #ffb547); color: var(--hx-cream);
  box-shadow: 0 20px 50px rgba(0,0,0,.6), 0 0 40px color-mix(in srgb, var(--c, #ffb547) 25%, transparent);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.hx-peek[hidden] { display: none; }
.hx-peek-x { position: absolute; right: 8px; top: 6px; width: 34px; height: 34px; border: 0; background: none; color: var(--hx-lilac); font-size: 1.6rem; cursor: pointer; border-radius: 8px; }
.hx-peek-x:hover { color: var(--hx-cream); }
.hx-peek-count { margin: 0; font: 400 1.3rem "VT323", monospace; color: var(--hx-mint); }
.hx-peek-name { margin: 0 0 4px; font: 400 1.45rem/1.1 "Bungee", sans-serif; color: var(--c, #ffb547); padding-right: 26px; }
.hx-peek-who { margin: 0 0 10px; color: var(--hx-lilac); font-size: .95rem; }
.hx-peek-now { margin: 0 0 10px; font-size: .98rem; }
.hx-peek-said { margin: 0 0 12px; padding: 8px 10px; border-radius: 10px; background: rgba(255,241,220,.07); font-size: .92rem; }
.hx-peek-said b { color: var(--c, #ffb547); }
.hx-go {
  display: block; text-align: center; padding: 12px 16px; border-radius: 10px; font-weight: 850; text-decoration: none;
  background: var(--c, #ffb547); color: var(--hx-ink);
}
.hx-go:hover { filter: brightness(1.08); color: var(--hx-ink); }
@media (max-width: 760px), (hover: none) {
  .hx-peek { position: fixed; left: 12px !important; right: 12px; top: auto !important; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); width: auto; animation: hxSheet .3s cubic-bezier(.2,1.2,.4,1); }
  @keyframes hxSheet { from { transform: translateY(40px); opacity: 0; } }
}

/* new arrivals toast on the stage */
.hx-toast {
  position: absolute; left: 20px; bottom: 50px; z-index: 4; padding: 10px 16px; border-radius: 12px;
  background: rgba(13,7,32,.92); border: 2px solid var(--hx-mint); color: var(--hx-cream); font-weight: 700;
  box-shadow: 0 10px 30px rgba(0,0,0,.45); animation: hxPop2 .4s cubic-bezier(.2,1.5,.4,1);
}
.hx-toast[hidden] { display: none; }
@keyframes hxPop2 { from { opacity: 0; transform: translateY(14px); } }

/* ---------- rooms list ---------- */
.hx-rooms { margin-top: 40px; }
.hx-h2 { margin: 0 0 14px; font: 400 1.5rem "Bungee", sans-serif; color: var(--hx-cream); }
.hx-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.hx-tile {
  position: relative; display: grid; align-content: start; gap: 6px; padding: 16px 16px 18px; border-radius: 14px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--c) 14%, #150c2a), #150c2a 60%); border: 1px solid color-mix(in srgb, var(--c) 40%, transparent);
  border-top: 5px solid var(--c); color: var(--hx-cream); text-decoration: none; transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
a.hx-tile:hover, a.hx-tile:focus-visible { transform: translateY(-3px); border-color: var(--c); box-shadow: 0 12px 30px color-mix(in srgb, var(--c) 25%, transparent); color: var(--hx-cream); }
.hx-tile-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.hx-tile-name { font: 400 1.12rem/1.1 "Bungee", sans-serif; color: var(--c); }
.hx-tile-count { font: 400 1.3rem "VT323", monospace; color: var(--hx-mint); white-space: nowrap; }
.hx-tile-home { justify-self: start; padding: 2px 8px; border-radius: 99px; background: var(--c); color: var(--hx-ink); font-size: .76rem; font-weight: 800; }
.hx-tile-who { color: var(--hx-lilac); font-size: .92rem; }
.hx-tile-now { font-size: .95rem; }
.hx-tile.is-locked { opacity: .55; }
.hx-tile.is-flash { animation: hxFlash 1.2s ease-out; }
@keyframes hxFlash { 0% { box-shadow: 0 0 0 3px var(--c), 0 0 30px var(--c); } }

/* ---------- bottom: arrivals, invite ---------- */
.hx-bottom { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 34px; }
.hx-card { padding: 20px 22px; border-radius: 16px; background: #150c2a; border: 1px solid #2c1f4a; }
.hx-card p { margin: 0 0 12px; }
.hx-arrivals { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.hx-arrivals li { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; padding: 8px 10px; border-radius: 10px; background: rgba(255,241,220,.04); }
.hx-arrivals li span { color: var(--hx-lilac); font-size: .9rem; }
.hx-arrivals li.is-new { animation: hxFlash2 2s ease-out; }
@keyframes hxFlash2 { 0% { background: rgba(91,227,181,.3); } }
.hx-empty { color: var(--hx-lilac); }
.hx-invite { display: flex; gap: 0; }
.hx-invite input { flex: 1; min-width: 0; height: 48px; padding: 0 12px; font: inherit; color: var(--hx-cream); background: #07050d; border: 2px solid var(--hx-sodium); border-right: 0; border-radius: 10px 0 0 10px; }
.hx-copy { height: 48px; padding: 0 18px; border: 2px solid var(--hx-sodium); border-radius: 0 10px 10px 0; background: var(--hx-sodium); color: var(--hx-ink); font: 800 1rem "Archivo", sans-serif; cursor: pointer; }
.hx-copy:hover { background: #ffd27a; }
@media (max-width: 760px) {
  .hx-head { padding: 0 0 14px; gap: 12px; }
  .hx-title { font-size: 1.9rem; margin-bottom: 4px; }
  .hx-status { font-size: 1rem; }
  .hx-status-more { display: none; }
  .hx-head-side { gap: 8px; }
  .hx-led > span { padding: 4px 4px 2px; }
  .hx-led b { font-size: 1.5rem !important; }
  .hx-led small { font-size: .62rem; }
  .hx-home { display: flex; align-items: baseline; gap: 8px; padding: 8px 14px; }
  .hx-bottom { grid-template-columns: 1fr; }
  .hx-head { align-items: flex-start; }
  .hx-led > span { min-width: 0; flex: 1; }
  .hx-head-side, .hx-led { width: 100%; }
  .hx-home { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .hx-svg *, .hx-bubble, .hx-peek, .hx-toast, .hx-onair::before { animation: none !important; }
  .hx-bubble { animation: hxFade .6s ease-in 8s forwards !important; }
}
/* The Back Room (off the Basement) */
.hx-brneon { font: 400 15px "Bungee", sans-serif; fill: #ffe1ea; filter: drop-shadow(0 0 4px #ff4f7a); }
.hx-brlamp { animation: hx-brflick 7s ease-in-out infinite; }
@keyframes hx-brflick { 0%, 100% { opacity: 1; } 50% { opacity: .8; } }
@media (prefers-reduced-motion: reduce) { .hx-brlamp { animation: none; } }
