#stage[data-theme=imposter]{--accent:#d4a5ff}
#stage[data-theme=mafia]{--accent:#fad69c}
#stage[data-theme=hotseat]{--accent:#ffcf70}
#stage[data-theme=quips]{--accent:#ffacf1}
#stage[data-theme=spectrum]{--accent:#fbd48a}
#stage[data-theme=word]{--accent:#f8db9d}
#stage[data-theme=true-color]{--accent:#80eddb}
#stage[data-theme=bombsquad]{--accent:#aaf892}
#stage[data-theme=wordchain]{--accent:#b2ecff}
#stage[data-theme=artillery]{--accent:#ffd394}
#catalog{display:grid;grid-template-columns:minmax(0,1fr) 450px;column-gap:48px;align-items:center}
#catalog.wide{grid-template-columns:1fr}
#catalog-main{position:relative;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;height:718px;min-width:0;padding:32px 40px}
#catalog-label{color:var(--accent);margin:0 0 18px;font-size:32px}
#catalog-title{font-size:76px;line-height:1.07;letter-spacing:-.04em;max-width:100%;overflow-wrap:anywhere;text-wrap:balance}
#catalog-detail{font-size:34px;color:#fff4dc;line-height:1.2;margin-top:22px}
#catalog-detail:empty,#catalog-content:empty{display:none}
#catalog-focus.portrait{width:145px;height:145px;margin-bottom:28px}
#catalog-focus.figure{position:relative;left:auto;bottom:auto;width:190px;height:232px;margin-bottom:10px}
#catalog-rail{align-self:center;background:#081321cc;border:2px solid #ffffff36;border-radius:24px;padding:28px 25px}
#catalog-rail-title{font-size:28px;color:var(--accent);margin:0 0 12px}
.catalog-row{display:flex;align-items:center;gap:12px;height:82px;border-top:1px solid #ffffff2c}
.catalog-row strong{font-size:28px;flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.catalog-row small{font-size:21px;max-width:45%;color:#e0eedf;line-height:1.12;overflow-wrap:anywhere}
.catalog-row .portrait{width:57px;height:57px;border-width:2px}
#catalog-pages{position:absolute;right:0;bottom:0;color:white;font-size:24px}
#catalog-content{width:100%;margin-top:22px}
#catalog-content.grid{display:grid;grid-template-columns:repeat(var(--size),1fr);grid-template-rows:repeat(var(--size),1fr);gap:8px;background:#50341d;padding:15px;width:510px;height:510px;border:5px solid #c4954a;border-radius:20px}
.grid .tile{display:grid;place-items:center;background:linear-gradient(145deg,#ffefce,#dcbb80);color:#10291c;border-radius:10px;font-size:50px;box-shadow:inset 0 -4px #bb9769}
#catalog-content.chain,#catalog-content.words,#catalog-content.choices,#catalog-content.console{display:flex;flex-wrap:wrap;gap:17px}
.chain .tile,.words .tile,.choices .tile,.console .tile{background:#07172b99;border:2px solid #ffffff38;border-radius:13px;padding:18px 25px;font-size:37px}
.chain .tile:not(:last-child)::after{content:' →';color:#aaf0ff}
#catalog[data-kind=console] #catalog-title{color:#c0ffac;text-transform:uppercase;font:800 100px/1.1 monospace}
#catalog[data-kind=console] #catalog-main{border:10px ridge #596056;border-radius:34px;background:radial-gradient(at 50% 50%,#23432a,#0b1a12);height:590px}
#catalog[data-kind=ballot] #catalog-main{align-items:center;text-align:center}
#catalog-content.ballot{display:flex;gap:34px;justify-content:center}
.ballot .tile{display:grid;place-items:center;color:#39112f;background:linear-gradient(150deg,#fff5dc,#e9d4bd);border-radius:20px;padding:34px;width:44%;min-height:215px;line-height:1.14;font-size:45px;overflow-wrap:anywhere}
#catalog-content.swatches{display:flex;gap:18px}.swatch{position:relative;height:330px;flex:1;border:4px solid #ffffff55;border-radius:19px}
.swatch b{position:absolute;left:16px;bottom:14px;padding:6px 14px;color:white;background:#09151ccb;border-radius:9px;font-size:26px}
#catalog-content.dial{width:670px;margin-left:10px}
.dial-face{position:relative;width:100%;height:308px;overflow:hidden;border-radius:335px 335px 8px 8px;border:8px solid #d2aa61;background:conic-gradient(from -90deg at 50% 100%,#53a5db 0deg,#65d8cc 56deg,#e8da91 98deg,#f4ad6c 135deg,#ef7871 180deg,#14162b 180deg)}
.dial-scale{position:absolute;inset:0}.dial-scale b{position:absolute;transform:translate(-50%,-50%);font-size:30px;color:#17202a}
.needle{position:absolute;right:50%;bottom:0;width:43%;height:8px;transform-origin:right center;background:#322822;border:2px solid #f8d594;border-radius:30px}
.dial-labels{text-align:center;font-size:32px;white-space:pre-wrap;font-weight:700}
#arena{position:relative;width:100%;aspect-ratio:2/1;max-height:470px;border:3px solid #eab18188;border-radius:20px;overflow:hidden;margin-top:24px}
#arena canvas{position:absolute;inset:0;width:100%;height:100%}
#stage[data-theme=mafia] #catalog-title{font-family:Georgia,serif;color:#ffeed1}
#stage[data-theme=imposter] #catalog-main{border:3px solid #d6aae958;background:linear-gradient(115deg,#291b37dc,#392644aa);border-radius:12px 36px 18px 12px;height:610px;box-shadow:-10px 10px 0 #c6a27f55}

#scenery #catalog-scenery>[data-scene]{position:absolute;inset:0;width:100%;height:100%;display:none;opacity:1;will-change:auto}
#scenery #catalog-scenery>[data-scene].on{display:block}
#scenery img{object-fit:cover}
/* These fields are the live room's gradients. Paint them at the stage's
   resolution so a blown-up preview never appears during the briefing. */
#catalog-scenery>[data-scene=wordchain]{background:linear-gradient(165deg,#193b9c,#1269c4 52%,#087bc2)}
#catalog-scenery>[data-scene=true-color]{background:radial-gradient(ellipse at 75% 5%,#703b66,#241e35 78%)}
#catalog-scenery>[data-scene=artillery]{background:radial-gradient(ellipse at 50% 0,#28575a,#102f35 80%)}
#catalog-scenery>[data-scene=quips]{overflow:hidden;background:#211127 url(punchline-tv-base.webp) center/100% 100%}
#catalog-scenery .quip-drift-tile{
  position:absolute;left:calc(50% + var(--tile-column) * 1382.4px);top:calc(50% + var(--tile-row) * 960px);
  width:1382.4px;height:960px;max-width:none;opacity:1;will-change:auto;pointer-events:none;
  animation:tv-punchline-drift 60s linear infinite;
}
#catalog-scenery>[data-scene=quips]::after{
  content:"";position:absolute;inset:0;background:url(punchline-tv-wash.webp) center/100% 100%;
}
@keyframes tv-punchline-drift{to{transform:translate(-1382.4px,960px)}}
#stage[data-theme=quips] #live-scenery{display:none}
#catalog-scenery{position:absolute;inset:0;pointer-events:none;transform:translateZ(0)}
#stage[data-theme=spectrum] #catalog-scenery>.on{
  visibility:hidden;
}
#stage[data-theme=spectrum] #catalog-scenery{
  background:radial-gradient(ellipse at 28% -26%,#f09b5940,transparent 57%),
    radial-gradient(ellipse at 78% 126%,#8c42e74d,transparent 58%),linear-gradient(#091524,#07111e 56%,#081522);
}
#stage[data-theme=spectrum] #catalog-scenery::before,
#stage[data-theme=spectrum] #catalog-scenery::after{
  content:"";position:absolute;left:50%;width:140px;height:2880px;
  margin:-1440px 0 0 -70px;transform:rotate(90deg);
  background-size:100% 480px;background-repeat:repeat-y;clip-path:inset(0 4px);
  animation:tv-setup-waves 14s linear infinite;
}
#stage[data-theme=spectrum] #catalog-scenery::before{
  top:36px;background-image:url(continuum-wave-warm.svg);
}
#stage[data-theme=spectrum] #catalog-scenery::after{
  top:calc(100% - 36px);background-image:url(continuum-wave-cool.svg);animation-direction:reverse;
}
@keyframes tv-setup-waves{to{transform:translateX(480px) rotate(90deg)}}
@media(prefers-reduced-motion:reduce){
  #stage[data-theme=spectrum] #catalog-scenery::before,
  #stage[data-theme=spectrum] #catalog-scenery::after{animation:none}
}
#stage[data-scene=catalog] #scenery i{display:none}
#catalog[data-kind=console] #catalog-main{background:#192e20;border:6px solid #6b7361}
#catalog[data-kind=chain] #catalog-content{flex-direction:column;align-items:flex-start;gap:7px}
.chain .tile{font-size:36px;padding:4px 20px;background:none;border:none}
.chain .tile:not(:last-child)::after{content:' ↓'}
#catalog[data-kind=chain] #catalog-content:has(>.tile:nth-child(5)){display:grid;grid-template-columns:1fr 1fr}
#stage[data-theme=mafia] #catalog-title{font-size:90px}
#arena{max-height:510px}

#catalog-main,#catalog-rail{contain:layout style}
#stage[data-theme=quips] #catalog-main{padding-inline:30px}
#catalog[data-kind=words] .tile{font-size:32px}
#catalog[data-kind=chain] #catalog-title{font-size:92px}
