:root{--lime:#bcff00;--neon:#e833ff;--shadow:#9500d69c;--ink:#13051e}
body{
  background:radial-gradient(ellipse at 50% 32%,#360950 0%,transparent 58%),
    radial-gradient(ellipse at 5% 86%,#51096a77,transparent 45%),#09010f;
}
body[data-screen=host-setup],body[data-screen=lobby]{
  background:
    radial-gradient(ellipse at 0% 8%,#5d0b8055,transparent 32%),
    radial-gradient(ellipse at 100% 72%,#51096380,transparent 38%),
    radial-gradient(ellipse at 48% 48%,#31054c,transparent 70%),#09010f;
}
main{width:min(43rem,100%);padding:clamp(.6rem,2vw,1.2rem) clamp(.75rem,4vw,1.65rem) 1.2rem}
.party-header{position:relative;display:grid;place-items:center;min-height:3.5rem;margin-bottom:.3rem}
.party-header img{width:clamp(9rem,41vw,17rem);max-width:100%}
.spin-logo{display:none}
.party-header .back-home,.party-header #sound-toggle{
  position:absolute;top:.2rem;display:grid;place-items:center;width:2.8rem;height:2.8rem;min-height:0;padding:0;
  background:radial-gradient(ellipse at 50% 18%,#58386c,#110617 70%);
  border:2px solid #e7d1ef;color:white;border-radius:50%;line-height:1;box-shadow:0 0 .7rem #c157dd8c;
}
.party-header .back-home{left:0;text-decoration:none;font-size:2.5rem;padding-bottom:.2rem}
.party-header #sound-toggle{right:0;font-size:1.16rem}
.party-header .back-home:focus-visible{outline:3px solid var(--lime);outline-offset:3px}
.screen-heading{text-align:center;margin:0 0 .85rem}
.screen-heading h1,.roster-heading h2,#turn{
  margin:.12rem 0 .25rem;font-weight:950;font-style:italic;letter-spacing:-.045em;text-shadow:0 3px 0 #63347c,0 .2rem .7rem #000;
}
.screen-heading h1,.roster-heading h2{text-transform:uppercase}
.screen-heading h1{font-size:clamp(1.8rem,7.5vw,3.5rem)}
.screen-heading p,.screen-note{margin:0;color:#e7d9ed;font-style:italic;text-align:center;font-weight:700}
#lobby-heading[data-role=host] #lobby-title{
  width:100%;aspect-ratio:860 / 75;margin:.2rem auto .25rem;color:transparent;text-shadow:none;overflow:hidden;line-height:0;white-space:nowrap;
  background:url('/lobby-design.webp') no-repeat 54.88% 11.64% / 119.07% 2048%;
  mix-blend-mode:screen;
}
#lobby-name{font-size:clamp(1rem,4.1vw,1.55rem)}
#entry{background:none;border:0;border-radius:0;box-shadow:none;padding:.45rem 0}
body[data-screen=join] #entry nav,body[data-screen=host-setup] #entry nav{display:none}
#join-form,#host-form,.profile{gap:.75rem}
#join-form label,.profile>label{font-size:clamp(1rem,3.7vw,1.3rem)}
#join-form input:not([type=radio]),#host-form input[name=name],.room-invites button,.lobby-deck button,.player-row{
  border:2px solid #f585ff;background:linear-gradient(172deg,#55136a 0%,#1a0628 35%,#210631 69%,#430954);
  box-shadow:inset 0 0 .6rem #aa16cfaa,0 0 .55rem #b519e9a9;
}
#join-form input:not([type=radio]),#host-form input[name=name]{
  min-height:3.4rem;border-radius:999px;text-align:center;color:#fff;
}
#join-form input::placeholder,#host-form input::placeholder{color:#e3caed;font-style:italic}
#join-form input[name=code]{text-transform:uppercase;letter-spacing:.15em}
#join-form .vibe-picker legend,#host-form .vibe-picker legend{
  width:100%;text-align:center;font-size:clamp(1.35rem,5.7vw,2.65rem);line-height:1.12;
  font-weight:950;font-style:italic;text-transform:uppercase;margin:.25rem 0 .55rem;
}
.vibe-options{gap:clamp(.38rem,1.5vw,.7rem)}
.vibe-button{
  position:relative;min-height:7rem;padding:.5rem .24rem .6rem;border:2px solid #f17cff;
  border-radius:clamp(.65rem,3vw,1.3rem);background:linear-gradient(#23042f,#13031c 66%,#440855);
  box-shadow:inset 0 2px 0 #ffd4ff8c,inset 0 0 .64rem #a415cc,0 0 .48rem #c416e782;
  font-size:clamp(.86rem,3.6vw,1.32rem);font-weight:900;font-style:italic;
}
.vibe-choice input:checked+.vibe-button{
  background:linear-gradient(#2f0840,#16031e 70%,#40213c);border-color:var(--lime);
  box-shadow:0 0 .65rem #baff0099,inset 0 0 .4rem #baff0066;
}
.vibe-choice input:checked+.vibe-button::after{
  content:'✓';position:absolute;top:.24rem;right:.27rem;display:grid;place-items:center;
  width:1.25rem;height:1.25rem;line-height:1;background:var(--lime);color:#111;border-radius:50%;font-size:.95rem;
}
.vibe-icon{
  width:min(100%,6.4rem);border-radius:0;background-color:transparent;
  background-image:url('/join-design.webp');background-size:435.6% 653.4%;
  background-position:12.7% 63.4%;
  mask-image:radial-gradient(ellipse at 50% 50%,#000 52%,transparent 75%);
}
.vibe-icon[data-vibe=straight]{background-position:50.25% 63.4%}
.vibe-icon[data-vibe=soft]{background-position:89.85% 63.4%}
.lime-button,.primary.lime-button{
  min-height:3.35rem;width:100%;padding:.45rem .7rem;border:2px solid #d9ff46;border-radius:999px;
  background:linear-gradient(#f4ffc1 0%,#d3ff64 15%,#acfb05 37%,#8be000 64%,#bbfa1c 92%,#e7ffa8);
  box-shadow:0 0 .8rem #baff007f,inset 0 0 .55rem #f5ffc7;color:#111800;
  font-size:clamp(1.35rem,6vw,2.5rem);font-weight:950;font-style:italic;line-height:1.1;
}
.lime-button:disabled{opacity:.54}
.host-setup-badge{
  display:block;width:min(57%,13rem);aspect-ratio:340 / 95;margin:.52rem auto 0;
  background:url('/host-setup.webp') no-repeat 50% 20.96% / 301.18% 1616.84%;
}
#host-form .host-setup-submit{
  position:relative;min-height:0;aspect-ratio:934 / 175;padding:0;border:0;box-shadow:none;
  background:url('/host-setup.webp') no-repeat 51.11% 90.38% / 109.64% 877.71%;
}
#host-form .host-setup-submit span{
  position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;
}
body[data-screen=host-setup] .party-logo{display:block;width:48%}
body[data-screen=host-setup] .party-logo img{display:none}
body[data-screen=host-setup] .spin-logo{
  display:block;width:100%;aspect-ratio:390 / 157;
  background:url('/host-setup.webp') no-repeat 50.47% .8% / 262.56% 978.34%;
  mix-blend-mode:screen;
}
.room-info,#lobby{display:block;border:0;border-radius:0;background:none;box-shadow:none;padding:0}
.room-invites{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.65rem;margin:.7rem 0}
.room-invites .invite-tile{
  display:grid;grid-template-rows:1fr auto;place-items:center;gap:.4rem;min-width:0;
  padding:.65rem .35rem;border-radius:1rem;font-weight:850;font-style:italic;text-align:center;
  background:radial-gradient(ellipse at 45% -18%,#9d1bc09e,transparent 51%),linear-gradient(#3b0850,#10021c 48%,#360344);
  box-shadow:inset 0 2px 0 #fff8,inset 0 0 .85rem #df29eb,0 0 .65rem #db1bfa98;
}
.invite-tile:hover{border-color:#fbcaff}
#room-code{font-size:clamp(1rem,4.9vw,2rem);letter-spacing:.045em;font-family:ui-monospace,monospace;color:#c9ff00;text-shadow:0 0 .55rem #bbff007d}
#lobby-qr{
  display:block;width:min(100%,clamp(5.5rem,25vw,7rem));height:auto;aspect-ratio:1;
  background:#fff;border-radius:.22rem;image-rendering:pixelated;
}
.lobby-deck button{border-radius:999px;font-weight:850;font-style:italic}
.roster-heading{display:flex;align-items:center;justify-content:space-between;gap:.5rem;margin:.75rem 0 .45rem}
.roster-heading h2{font-size:clamp(1.17rem,4.5vw,2.1rem)}
#player-count{flex:none;color:#e5d3eb;font-weight:750;border-left:1px solid #e541ff;padding-left:.48rem}
#players{display:grid;gap:.4rem;list-style:none;margin:0 0 .7rem;padding:0}
#players .player-row{
  display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:.52rem;
  margin:0;padding:.35rem .58rem;border-radius:.85rem;
  box-shadow:inset 0 2px 0 #ffcfff77,inset 0 0 .63rem #a915caaa,0 0 .45rem #b519e9a9;
}
.player-avatar{
  display:grid;place-items:center;width:2.25rem;height:2.25rem;border-radius:50%;
  border:1.5px solid #f5b6ff;background:radial-gradient(ellipse at 50% 15%,#7c2c92,#21032d);
  font-weight:900;font-style:italic;
}
.player-name{display:grid;line-height:1.1;overflow-wrap:anywhere;font-size:clamp(1.05rem,3.8vw,1.45rem);font-weight:850;font-style:italic}
.player-role{font-size:.78rem;color:#e6c9ed;font-weight:650}
#players .player-row:has(.remove-shared){grid-template-columns:auto minmax(0,1fr) auto auto}
.remove-shared{display:grid;place-items:center;width:2.75rem;height:2.75rem;padding:0;border:0;background:transparent;color:#ffd0ee;font-size:1.25rem;line-height:1}
.remove-shared:hover{background:#682082}
#add-shared-player{width:100%;border:2px solid #f585ff;border-radius:999px;margin:0 0 .35rem}
.player-pour{display:flex;align-items:center;gap:.15rem;font-weight:800;font-style:italic;font-size:clamp(.75rem,3.1vw,.95rem)}
.player-pour>span:last-child{border-left:1px solid #d955eb;padding-left:.27rem}
.player-pour .vibe-icon{width:2.45rem}
.lobby-deck{min-width:0;margin:.7rem 0;padding:.4rem .45rem .55rem;border:1.5px solid var(--neon);border-radius:.9rem}
.lobby-deck legend{padding:0 .32rem;font-weight:850;font-style:italic}
.lobby-deck button{padding:.38rem .13rem;font-size:clamp(.76rem,3vw,1.02rem)}
#waiting,.age-note{text-align:center;color:#e7d9ed;font-weight:700}
#waiting{font-style:italic;margin:.65rem 0}
.age-note{margin-top:.65rem;font-size:.86rem}
#game{grid-template-columns:1fr;gap:clamp(.55rem,2vw,1rem);text-align:center}
.game-heading #deck{
  display:inline-block;margin:0 auto .4rem;border:2px solid #ff36c7;padding:.23rem .9rem;border-radius:999px;
  box-shadow:0 0 .6rem #ef15bd88;color:#ff5bd3;font-weight:950;font-style:italic;text-transform:uppercase;
}
.game-heading[data-deck=clean] #deck{border-color:#52dcff;color:#9feaff;box-shadow:0 0 .6rem #52dcff80}
.game-heading[data-deck=messy] #deck{border-color:#d58aff;color:#e8bcff;box-shadow:0 0 .6rem #d58aff80}
#turn{font-size:clamp(1.8rem,7.4vw,3.8rem);line-height:1.12}
.wheel{width:min(100%,33rem);margin:.32rem auto .25rem}
body[data-screen=playing]{
  background:#000;
}
body[data-screen=playing] main{
  width:min(100%,max(22rem,65svh),45rem);
  padding:.2rem .45rem .8rem;
}
body[data-screen=playing] .party-header{margin:0;min-height:0}
body[data-screen=playing] .party-logo{display:block;width:51%}
body[data-screen=playing] .party-logo img,body[data-screen=playing] .back-home{display:none}
body[data-screen=playing] .spin-logo{
  display:block;width:100%;aspect-ratio:507 / 191;
  background:url('/spin-design.webp') no-repeat 49.13% .37% / 201.97% 804.19%;
}
body[data-screen=playing] #sound-toggle{
  top:.35rem;right:.25rem;border:0;border-radius:.4rem;box-shadow:none;background:none;filter:grayscale(1);
}
body[data-screen=playing] #sound-toggle[aria-pressed=true]{
  color:transparent;background:url('/spin-design.webp') no-repeat 97.78% 1.36% / 1312.82% 2363.08%;
}
body[data-screen=playing] #game{gap:clamp(.12rem,.7vw,.38rem)}
.game-heading #deck{font-size:clamp(1rem,4.9vw,2.1rem);padding:.13rem .95rem;margin:.03rem auto .25rem;line-height:1.12}
body[data-screen=playing] #turn{margin:.02rem 0 .34rem;font-size:clamp(1.7rem,7.6vw,3.6rem)}
body[data-screen=playing] .wheel{width:97%;margin:.45rem auto .08rem}
body[data-screen=playing] #wheel{clip-path:circle(50%)}
body[data-screen=playing] .wheel .pointer{width:8.8%;left:45.6%;top:-1.6%}
#spin.primary.lime-button{
  position:relative;display:block;width:65%;min-height:0;aspect-ratio:660 / 182;
  border:0;border-radius:999px;padding:0;margin:0 auto;color:inherit;box-shadow:none;
  background:url('/spin-design.webp') no-repeat 49.45% 99.7% / 155.15% 843.96%;
}
#spin span{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
body[data-screen=playing] .room-controls{margin-top:.85rem}
body[data-screen=playing] .age-note{display:none}
@media(max-width:360px){.player-pour .vibe-icon{width:1.8rem}.party-header .back-home,.party-header #sound-toggle{width:2.6rem;height:2.6rem}}
