* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; font-family: "Trebuchet MS", system-ui, sans-serif; color: #fff; text-align: center; padding-bottom: 30px;
  background: url("public/generated/lobby-9bdf8607-707f-5ac0-916c-266f51fa995d.png") left center / 50% 100% no-repeat fixed,
    url("public/generated/pool2-5ec407b2-d87f-5dc3-9ba4-82db613c7e7a.png") right center / 50% 100% no-repeat fixed; }
header { background: linear-gradient(90deg, #ff4fa3, #ffb347, #ff4fa3); padding: 12px; border-bottom: 5px solid gold; box-shadow: 0 4px 12px #0006; }
h1 { margin: 0; color: #fff; font-size: 2.4rem; letter-spacing: 3px; text-shadow: 0 3px 0 #c2185b, 0 0 14px gold; }
#stars { font-size: 2.2rem; color: #fff176; text-shadow: 0 2px 0 #e65100; }
#coins { font-size: 1.4rem; font-weight: bold; text-shadow: 0 2px 0 #0005; }
#help { color: #fff; font-weight: bold; text-shadow: 0 2px 0 #0007; }
section { max-width: 640px; margin: 12px auto; padding: 0 10px; }
h2 { font-size: 1.2rem; color: #fff; margin: 6px 0; text-shadow: 0 2px 0 #0006; }
#queue { min-height: 90px; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; background: #7b1fa2aa; border: 4px solid #ffd54f; border-radius: 18px; padding: 10px; }
.guest { background: linear-gradient(#fff, #ffe0f0); color: #222; border-radius: 16px; padding: 6px 12px; cursor: pointer; font-size: 2.2rem; border: 4px solid #ff80ab; box-shadow: 0 4px 0 #c2185b; transition: transform .15s; }
.guest:hover { transform: translateY(-3px); }
.guest.pick { border-color: gold; transform: scale(1.15); box-shadow: 0 0 16px gold; }
.bar { height: 7px; background: #ddd; border-radius: 4px; margin-top: 4px; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, #00e676, #76ff03); border-radius: 4px; }
#rooms { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.room { background: linear-gradient(#fff3c4, #ffd27f); color: #5d2e00; border-radius: 16px; padding: 12px 4px; min-height: 96px; font-size: 2rem; cursor: pointer; border: 4px solid #ff9800; box-shadow: 0 5px 0 #e65100; transition: transform .15s; }
.room:hover { transform: translateY(-3px); }
.room small { display: block; font-size: 0.9rem; font-weight: bold; }
.room.busy { background: linear-gradient(#b9f6ca, #4de39a); border-color: #00a152; box-shadow: 0 5px 0 #00796b; cursor: default; }
.room.dirty { background: linear-gradient(#e1bee7, #ba68c8); border-color: #7b1fa2; box-shadow: 0 5px 0 #4a148c; color: #fff; }
button { font-size: 1.15rem; font-weight: bold; padding: 12px 22px; border-radius: 30px; border: 0; background: linear-gradient(#ffe066, #ffa000); color: #4e2600; cursor: pointer; margin-top: 14px; box-shadow: 0 5px 0 #e65100; }
button:hover:not(:disabled) { filter: brightness(1.1); }
button:disabled { background: #b0a0c0; color: #eee; box-shadow: 0 5px 0 #7e6a96; cursor: default; }
#win { position: fixed; inset: 0; background: #000a; display: flex; align-items: center; justify-content: center; }
#win[hidden] { display: none; }
#win > div { background: linear-gradient(#ff4fa3, #7b1fa2); padding: 24px 36px; border-radius: 20px; border: 5px solid gold; }
#help, h2 { display: inline-block; background: #7b1fa2cc; padding: 4px 14px; border-radius: 14px; }
#help { margin: 8px 0 0; }
.splash { position: fixed; width: 0; height: 0; pointer-events: none; z-index: 50; }
.splash::before { content: ""; position: absolute; left: -10px; top: -10px; width: 20px; height: 20px; border: 4px solid #fff; border-radius: 50%; animation: ring 1.8s ease-out forwards; }
.splash i { position: absolute; left: -7px; top: -7px; width: 14px; height: 14px; background: #4fc3f7; border: 2px solid #fff; border-radius: 50% 50% 50% 0; animation: drop 1.8s ease-out forwards; }
@keyframes ring { to { transform: scale(5); opacity: 0; } }
@keyframes drop { to { transform: translate(var(--dx), calc(var(--dy) + 40px)); opacity: 0; } }
.guest img, .room img { width: 56px; height: 56px; object-fit: cover; border-radius: 50%; border: 3px solid #fff; display: block; margin: 0 auto; }
.room img { width: 50px; height: 50px; }
#pause { margin-top: 6px; padding: 6px 18px; }
body.paused .room, body.paused .guest { filter: grayscale(.7); pointer-events: none; }
.guest { padding: 4px 8px; }
.guest img.body { width: 70px; height: 110px; object-fit: contain; border: 0; border-radius: 8px; background: #fff; }
#queue { align-items: flex-end; }
#queue { position: fixed; left: 6px; bottom: 28vh; width: 200px; min-height: 0; flex-wrap: nowrap; justify-content: flex-start; gap: 0; background: none; border: 0; padding: 0; z-index: 5; }
.guest { background: none; border: 0; box-shadow: none; padding: 0; margin-left: -26px; }
.guest:first-child { margin-left: 0; }
.guest img.body { width: 56px; height: 88px; background: none; mix-blend-mode: multiply; }
.guest.pick { box-shadow: none; transform: scale(1.15); filter: drop-shadow(0 0 8px gold) drop-shadow(0 0 8px gold); }
.guest .bar { width: 40px; margin: 2px auto 0; }
.room { position: relative; }
.room::after { content: "🛁"; position: absolute; right: 8px; bottom: 4px; font-size: 1.1rem; }
.room.out { background: linear-gradient(#ffcdd2, #ff8a80); border-color: #d32f2f; box-shadow: 0 5px 0 #b71c1c; }
.room.out button { margin: 4px 0 0; padding: 6px 12px; font-size: 1rem; background: #fff; color: #b71c1c; box-shadow: 0 3px 0 #b71c1c; }
section { position: fixed; right: 8px; top: 200px; width: 330px; max-width: none; margin: 0; padding: 0; z-index: 5; }
#rooms { grid-template-columns: repeat(2, 1fr); gap: 8px; }
.room { min-height: 84px; padding: 8px 4px; }
#upgrade { position: fixed; left: 8px; bottom: 8px; margin: 0; z-index: 5; }
#guests { font-size: 1.2rem; font-weight: bold; text-shadow: 0 2px 0 #0005; }
#restaurant { position: fixed; left: 50%; transform: translateX(-60%); bottom: 18vh; width: 200px; z-index: 4; border: 4px solid #ffd54f; border-radius: 16px; overflow: hidden; box-shadow: 0 5px 0 #c2185b; background: #fff; }
#restaurant img { width: 100%; height: 130px; object-fit: cover; display: block; }
#restaurant span { display: block; background: #7b1fa2; color: #fff; font-weight: bold; padding: 3px; }
#restaurant { position: fixed; }
#diners { position: absolute; left: 0; right: 0; top: 56px; height: 76px; display: flex; justify-content: space-around; align-items: flex-end; pointer-events: none; }
#diners img { height: 70px; width: 44px; object-fit: contain; mix-blend-mode: multiply; }
#diners { top: 36px; height: 96px; }
#diners img { height: 90px; width: 56px; }
#restaurant { left: 50%; transform: translateX(-50%); }
#diners { display: block; top: 0; height: 130px; }
#diners img { position: absolute; top: 62px; width: 34px; height: 34px; object-fit: cover; object-position: top; border-radius: 50%; border: 2px solid #fff; mix-blend-mode: normal; background: #fff; }
#restaurant { position: fixed; }
#restaurant img.r2, #restaurant img.r3 { position: absolute; left: 0; top: 0; opacity: 0; }
#restaurant img { animation: rfade 12s infinite, rbob 2s ease-in-out infinite; }
#restaurant img.r1 { animation-name: rfade1, rbob; }
#restaurant img.r2 { animation-delay: -8s, 0s; }
#restaurant img.r3 { animation-delay: -4s, 0s; }
@keyframes rfade { 0%, 28% { opacity: 1; } 33%, 95% { opacity: 0; } 100% { opacity: 1; } }
@keyframes rfade1 { 0%, 28% { opacity: 1; } 33%, 95% { opacity: 0; } 100% { opacity: 1; } }
@keyframes rbob { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.04); } }
body.paused #restaurant img { animation-play-state: paused; }
