:root {
  /* From the printed card back: buffalo-check flannel torn open by zombie slime, on cream. */
  --bg: #130b0b;
  --panel: #221314;
  --panel-2: #311a1c;
  --ink: #f5f1dc;      /* card-border cream */
  --muted: #b8a49c;
  --flannel: #b3202e;  /* the bears */
  --slime: #b8f531;    /* the zombies, and danger */
  --pink: #b8f531;     /* accent alias kept for older selectors */
  --cyan: #7fd1c7;
  --lime: #b8f531;
  --amber: #f0a030;
  --red: #ff4646;
  --bear: #e0464f;
  --zombie: #b8f531;
  --weapon: #6aa5e8;
  --action: #c48ae6;
  --defuse: #ffd166;
  --event: #f0a030;
  --radius: 14px;
  --display: "Bowlby One", "Arial Black", system-ui, sans-serif;
  --plaid: repeating-linear-gradient(0deg, #0000008c 0 10px, transparent 10px 20px),
           repeating-linear-gradient(90deg, #0000008c 0 10px, transparent 10px 20px);
  font-family: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body { min-height: 100vh; -webkit-tap-highlight-color: transparent; }
h1, h2, h3 { margin: 0 0 .4em; line-height: 1.15; }
button {
  font: inherit; color: var(--ink); background: var(--panel-2); border: 1px solid #ffffff22;
  border-radius: 12px; padding: .8em 1em; cursor: pointer; text-align: left;
}
button:active { transform: scale(.98); }
button.primary { background: var(--ink); border-color: var(--ink); color: #130b0b; font-weight: 800; text-align: center; }
button:focus-visible, .hc:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; }
button.ghost { background: transparent; }
button:disabled { opacity: .4; }
input, select, textarea {
  font: inherit; color: var(--ink); background: var(--panel-2); border: 1px solid #ffffff33;
  border-radius: 10px; padding: .7em .8em; width: 100%;
}
.muted { color: var(--muted); }
.row { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: .6rem; }
.panel { background: var(--panel); border-radius: var(--radius); padding: 1rem; }
.pill { display: inline-block; padding: .15em .6em; border-radius: 999px; background: var(--panel-2); font-size: .85em; }
.neon { color: var(--ink); font-family: var(--display); font-weight: 400; letter-spacing: .01em; text-shadow: 3px 3px 0 var(--flannel); }
.slime { color: var(--slime); }

/* ---------- cards ---------- */
.card {
  position: relative; width: 7.2em; min-height: 9.6em; border-radius: 12px; padding: .5em .55em;
  background: linear-gradient(160deg, var(--panel-2), var(--panel)); border: 2px solid var(--c, #fff3);
  display: flex; flex-direction: column; gap: .25em; font-size: 15px; flex: none;
}
.card .name { font-weight: 800; font-size: .95em; line-height: 1.1; padding-right: 1.6em; }
.card .type { font-size: .65em; text-transform: uppercase; letter-spacing: .08em; color: var(--c); }
.card .text { font-size: .7em; color: var(--muted); line-height: 1.25; }
.card .num {
  position: absolute; top: -.55em; right: -.55em; width: 2.1em; height: 2.1em; border-radius: 50%;
  display: grid; place-items: center; font-weight: 900; font-size: 1.05em; background: var(--c); color: #120b18;
  box-shadow: 0 0 0 3px var(--bg);
}
.card.bear { --c: var(--bear); } .card.zombie { --c: var(--zombie); } .card.weapon { --c: var(--weapon); }
.card.action { --c: var(--action); } .card.defuse { --c: var(--defuse); } .card.event { --c: var(--event); }
.card.small { width: 5.4em; min-height: 3.2em; font-size: 13px; }
.card.small .text { display: none; }
.card.sideways { transform: rotate(-90deg) translateX(-.4em); margin: 0 1.2em; }
.card.selected { outline: 4px solid var(--lime); outline-offset: 2px; }
.card.dim { opacity: .35; }

/* ---------- club screen ---------- */
.club { padding: 1.4rem 1.8rem; display: grid; gap: 1.1rem; grid-template-columns: 1fr 22rem; grid-template-rows: auto auto minmax(0, 1fr) auto; height: 100vh; }
.club .top { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; gap: 1rem; height: 5.4rem; }
.club .turnbig { font-size: 2.1rem; font-weight: 900; }
.club .main { display: flex; flex-direction: column; gap: 1rem; min-height: 0; }
.club .side { display: flex; flex-direction: column; gap: 1rem; min-height: 0; overflow: hidden; }
.zone { background: var(--panel); border-radius: var(--radius); padding: .9rem 1rem; }
.zone h3 { font-size: .9rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.slots { display: flex; gap: .9rem; }
.slot { width: 7.6em; min-height: 10em; border-radius: 12px; border: 2px dashed #ffffff22; display: grid; place-items: center; color: var(--muted); font-size: 15px; text-align: center; padding: .3em; }
.slot.bite { border-color: var(--amber); color: var(--amber); }
.slot.lose { border-color: var(--red); color: var(--red); }
.line { display: flex; gap: .9rem; overflow-x: auto; padding: .9rem .6rem .4rem; align-items: flex-end; }
.nextwrap { position: relative; display: flex; flex-direction: column; align-items: center; gap: .3rem; }
.nexttag { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 800; color: #130b0b;
           background: var(--amber); padding: .15em .6em; border-radius: 999px; }
.nextwrap.deadly .nexttag { background: var(--red); }
.nextwrap.deadly .card { box-shadow: 0 0 0 3px var(--red), 0 0 24px #ff464677; }
.players { grid-column: 1 / -1; display: flex; gap: .8rem; overflow-x: auto; }
.player { background: var(--panel); border-radius: var(--radius); padding: .7rem .8rem; min-width: 13rem; border: 2px solid transparent; }
.player.current { border-color: var(--pink); box-shadow: 0 0 22px #ff4fa355; }
.player .pname { font-weight: 800; font-size: 1.15rem; }
.player .squad { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .4rem; }
.chip { font-size: .78rem; padding: .15em .5em; border-radius: 6px; background: #c98b4b33; border: 1px solid var(--bear); }
.chip.sideways { transform: rotate(-4deg); border-style: dashed; }
.chip small { color: var(--muted); font-size: .85em; }
.log { font-size: .85rem; color: var(--muted); display: flex; flex-direction: column; gap: .25rem; overflow-y: auto; min-height: 0; flex: 1; scrollbar-width: thin; }
.loghead { color: var(--ink); font-weight: 750; margin-top: .45rem; padding-top: .35rem; border-top: 1px solid #ffffff14; }
.log div:last-child { color: var(--ink); }
.rule { background: var(--panel-2); border-left: 4px solid var(--action); padding: .5em .7em; border-radius: 8px; font-size: .9rem; }
.spotlight { position: fixed; inset: 0; background: #0b0610ee; display: grid; place-items: center; z-index: 10; text-align: center; padding: 3rem; }
.spotlight .big { font-size: 3rem; font-weight: 800; max-width: 55rem; line-height: 1.2; }
.timeline { display: flex; gap: .3rem; align-items: center; }
.timeline .t { width: 1.1rem; height: 1.1rem; border-radius: 50%; background: var(--panel-2); border: 2px solid var(--event); }
.timeline .t.done { background: var(--event); }
.lobby { max-width: 70rem; margin: 0 auto; padding: 2rem; display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: start; }
#qr { width: max-content; }

/* ---------- phone: one fixed screen ---------- */
body.phone-page { height: 100dvh; overflow: hidden; }
.phone { height: 100dvh; display: grid; grid-template-rows: auto auto 1fr auto; grid-template-columns: minmax(0, 1fr);
         max-width: 34rem; margin: 0 auto; overflow: hidden;
         padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom); }
.flag { height: 12px; background-color: var(--flannel); background-image: var(--plaid);
        -webkit-mask: linear-gradient(#000 0 0); clip-path: polygon(0 0, 100% 0, 100% 60%, 92% 100%, 81% 55%, 68% 95%, 55% 50%, 41% 100%, 30% 60%, 17% 100%, 7% 55%, 0 90%); }
.bar { display: flex; justify-content: space-between; align-items: center; gap: .6rem; padding: .55rem .9rem .45rem; }
.bar .who { font-family: var(--display); font-size: 1.15rem; line-height: 1; }
.bar .who.mine { color: var(--slime); }
.pips { display: flex; gap: .28rem; align-items: center; font-size: .78rem; color: var(--muted); }
.pip { width: .8rem; height: .8rem; border-radius: 50%; border: 2px solid #ffffff33; }
.pip.on { background: var(--zombie); border-color: var(--zombie); }
.pip.on.bite { background: var(--amber); border-color: var(--amber); }
.pip.on.lose { background: var(--red); border-color: var(--red); }
.pip.on { box-shadow: 0 0 8px #b8f53188; }
.alert { margin: 0 .9rem .4rem; padding: .4em .7em; border-radius: 10px; font-size: .86rem; font-weight: 700;
         white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: var(--panel-2); }
.alert.danger { background: var(--slime); color: #130b0b; animation: pulse 1.2s infinite; padding: .4em .7em; text-align: left; }
.alert.bites { background: var(--amber); color: #130b0b; }
.main { min-height: 0; min-width: 0; overflow-y: auto; overflow-x: hidden; padding: .2rem .9rem .6rem; display: flex; flex-direction: column; gap: .6rem;
        overscroll-behavior: contain; }
.main h2 { font-family: var(--display); font-weight: 400; font-size: 1.35rem; margin: 0; }
.hint { color: var(--muted); font-size: .86rem; margin: 0; }
.opts { display: flex; flex-direction: column; gap: .4rem; }
.opt { display: grid; grid-template-columns: .35rem 1fr auto; gap: .65rem; align-items: center; padding: .55rem .7rem .55rem 0;
       border-radius: 12px; background: var(--panel); border: 1px solid #ffffff14; overflow: hidden; }
.opt .stripe { align-self: stretch; background: var(--c, #ffffff33); }
.opt .lbl { font-weight: 750; font-size: .98rem; line-height: 1.15; }
.opt .sub { font-size: .78rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.opt .n { font-family: var(--display); font-size: 1.05rem; color: var(--c); min-width: 1.4rem; text-align: right; }
.opt.bear { --c: var(--bear); } .opt.zombie { --c: var(--zombie); } .opt.weapon { --c: var(--weapon); }
.opt.action { --c: var(--action); } .opt.defuse { --c: var(--defuse); }
.group-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-top: .2rem; }
.quote { font-size: 1.45rem; line-height: 1.3; font-weight: 650; }
.quote::before { content: "“"; color: var(--bear); font-family: var(--display); }
.quote::after { content: "”"; color: var(--bear); font-family: var(--display); }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin-top: auto; }
.actions .wide { grid-column: 1 / -1; }
.actions button { text-align: center; }
.versus { display: flex; align-items: center; gap: .9rem; }
.total { font-family: var(--display); font-size: 2.6rem; line-height: 1; }
.total.ok { color: var(--lime); } .total.short { color: var(--amber); }
.recap { font-size: .84rem; color: var(--muted); display: flex; flex-direction: column; gap: .3rem; }
.recap div:last-child { color: var(--ink); }
.rule { font-size: .84rem; }
.turncard { background: var(--panel); border-radius: 12px; padding: .65rem .8rem; border-left: 4px solid #ffffff22; }
.turncard.live { border-left-color: var(--slime); }
.turncard .tc-who { font-family: var(--display); font-size: 1rem; margin-bottom: .25rem; }

/* the tray: squad + a fanned hand, always on screen */
.tray { background: linear-gradient(180deg, #130b0b00, #0c0707 30%); padding: .3rem .6rem .5rem; }
.tray .meta { display: flex; gap: .4rem; align-items: center; overflow-x: auto; scrollbar-width: none; padding: 0 .3rem .2rem; }
.tray .meta .chip { white-space: nowrap; font-size: .74rem; }
.crown { font-family: var(--display); color: var(--ink); white-space: nowrap; font-size: .9rem; }
.tray .tip { text-align: center; font-size: .74rem; color: var(--muted); height: 1rem; }
.fan { display: flex; justify-content: center; align-items: flex-end; height: 7.4rem; padding-top: 1.2rem; }
.hc { --c: #fff3; position: relative; flex: none; width: 4.9rem; height: 6.4rem; border-radius: 10px; padding: .35rem .4rem;
      background: linear-gradient(170deg, var(--panel-2), var(--panel)); border: 2px solid var(--c); font-size: .72rem;
      display: flex; flex-direction: column; gap: .15rem; transition: transform .18s ease, opacity .18s;
      transform: translateY(var(--lift, 0)) rotate(var(--rot, 0deg)); transform-origin: 50% 120%; }
.hc + .hc { margin-left: var(--overlap, -.9rem); }
.hc .t { padding-left: .8rem; font-size: .55rem; text-transform: uppercase; letter-spacing: .08em; color: var(--c); }
.hc .nm { font-weight: 800; line-height: 1.05; overflow-wrap: anywhere; }
.hc .nm.long { font-size: .86em; letter-spacing: -.01em; }
.hc .v { position: absolute; top: -.5rem; left: -.45rem; width: 1.55rem; height: 1.55rem; border-radius: 50%; display: grid;
         place-items: center; background: var(--c); color: #16100b; font-family: var(--display); font-size: .85rem; }
.hc.bear { --c: var(--bear); } .hc.zombie { --c: var(--zombie); } .hc.weapon { --c: var(--weapon); } .hc.action { --c: var(--action); }
.hc.pickable { box-shadow: 0 0 0 2px var(--ink), 0 0 14px #f5f1dc55; }
.hc.picked { --lift: -1.1rem; box-shadow: 0 0 0 3px var(--lime), 0 8px 18px #000a; }
.hc.off { opacity: .35; }
.hc.inspect { --lift: -.8rem; }
.card-detail { background: var(--panel); border-radius: 12px; padding: .7rem .8rem; border-left: 4px solid var(--c); }
.card-detail.bear { --c: var(--bear); } .card-detail.weapon { --c: var(--weapon); } .card-detail.action { --c: var(--action); }
.card-detail.zombie { --c: var(--zombie); }
.stars button { text-align: center; min-width: 3rem; }
.stars button.on { background: var(--ink); color: #130b0b; }
.hero-back { width: 62%; max-width: 15rem; border-radius: 14px; transform: rotate(-4deg); box-shadow: 0 18px 40px #000c; align-self: center; }
@media (prefers-reduced-motion: reduce) { .hc, .fx, .alert.danger, .ticker { transition: none; animation: none !important; } }
@media (max-width: 900px) {
  .club { grid-template-columns: 1fr; height: auto; }
  .lobby { grid-template-columns: 1fr; }
}

/* ---------- moments (animations) ----------
   Popup kinds are prefixed fx-* so they never pick up a board class (a .line popup once got the Line's layout). */
#fx { position: fixed; inset: 0; pointer-events: none; display: grid; place-items: center; z-index: 20; }
.fx { background: #120b18f2; border: 3px solid var(--fxc, var(--pink)); border-radius: 22px; padding: 1.6rem 2.4rem;
      text-align: center; box-shadow: 0 0 60px var(--fxc, var(--pink)); animation: pop .45s cubic-bezier(.2,1.4,.4,1) both; max-width: 80vw; }
.fx .head { font-size: 2.6rem; font-weight: 900; }
.fx .sub { font-size: 1.4rem; color: var(--muted); margin-top: .4rem; }
.fx.fx-slay { --fxc: var(--lime); }
.fx.fx-cleave { --fxc: var(--cyan); }
.fx.fx-zombie { --fxc: var(--zombie); animation: pop .45s cubic-bezier(.2,1.4,.4,1) both, shake .5s .45s; }
.fx.fx-bite, .fx.fx-overrun { --fxc: var(--red); animation: pop .45s both, shake .6s .45s; }
.fx.fx-coffee { --fxc: var(--defuse); }
.fx.fx-lastcall { --fxc: var(--event); }
.fx.leaving { animation: out .35s ease-in both; }
.fx-small { font-size: .9em; }
@keyframes pop { from { transform: scale(.55); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes out { to { transform: scale(.9); opacity: 0; } }
@keyframes shake { 0%,100% { translate: 0; } 20% { translate: -14px; } 40% { translate: 12px; } 60% { translate: -8px; } 80% { translate: 5px; } }
@keyframes pulse { 50% { box-shadow: 0 0 40px var(--red); } }
.danger { background: var(--red); color: #120b18; font-weight: 900; padding: .5em 1em; border-radius: 12px; animation: pulse 1.2s infinite; text-align: center; }

.ticker { background: var(--panel-2); border-radius: 10px; padding: .55em .8em; font-weight: 700; animation: pop .35s both; }
.recap { font-size: .85rem; color: var(--muted); display: flex; flex-direction: column; gap: .2rem; }

/* ---------- lobby ---------- */
.lobby2 { min-height: 100vh; max-width: 76rem; margin: 0 auto; padding: 1.6rem 2.5rem; display: grid;
          grid-template-columns: minmax(0, 1fr) minmax(0, 30rem); gap: 3.5rem; align-items: center; }
.door { display: flex; flex-direction: column; gap: 1.2rem; }
.door .title { font-size: clamp(3.4rem, 7vw, 6rem); line-height: .92; margin: 0; }
.tagline { font-size: 1.35rem; color: var(--muted); margin: 0; }
.ticket { display: flex; align-items: center; gap: 1.4rem; width: max-content; max-width: 100%; margin-top: .8rem;
          background: var(--ink); color: #130b0b; border-radius: 18px; padding: 1.1rem 1.6rem 1.1rem 1.1rem; position: relative;
          box-shadow: 0 20px 50px #000a; transform: rotate(-1.5deg); }
.ticket::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 12px; border-radius: 18px 18px 0 0;
                  background-color: var(--flannel); background-image: var(--plaid); }
.ticket #qr { margin-top: 10px; }
.ticket-text { display: flex; flex-direction: column; gap: .4rem; margin-top: 10px; }
.ticket-text b { font-family: var(--display); font-weight: 400; font-size: 1.5rem; line-height: 1.05; }
.ticket-text span { font-size: 1rem; font-variant-numeric: tabular-nums; opacity: .75; }
.host { display: flex; flex-direction: column; gap: .8rem; }
.panel2 { background: var(--panel); border-radius: 18px; padding: 1.1rem 1.2rem; display: flex; flex-direction: column; gap: .8rem; }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; }
.panel-head h2 { font-family: var(--display); font-weight: 400; font-size: 1.3rem; margin: 0; }
.count { color: var(--muted); font-variant-numeric: tabular-nums; }
.seats { display: grid; gap: .4rem; }
.seat { display: grid; grid-template-columns: 1.8rem 1fr auto auto; align-items: center; gap: .6rem; min-height: 2.5rem;
        padding: .35rem .5rem .35rem .8rem; border-radius: 12px; background: var(--panel-2); width: 100%; text-align: left; }
.seat-n { color: var(--muted); font-variant-numeric: tabular-nums; }
.seat-name { font-weight: 750; font-size: 1.1rem; }
.seat.empty { background: transparent; border: 1px dashed #ffffff1f; }
.seat.empty .seat-name { color: #ffffff40; font-weight: 500; }
.seat.open { background: transparent; border: 1px dashed var(--muted); }
.seat.open .seat-name { color: var(--ink); }
.tag { font-size: .75rem; color: var(--muted); padding: .1em .55em; border-radius: 999px; border: 1px solid #ffffff22; }
.tag.human { color: var(--slime); border-color: #b8f53155; }
.seat-x { background: transparent; border: 0; color: var(--muted); padding: .4rem .6rem; text-align: center; }
.seat-x:hover { color: var(--ink); }
.seat.empty > :nth-child(2) { grid-column: 2 / -1; }
.rules-grid { display: grid; grid-template-columns: 6rem 1fr; gap: .6rem 1rem; align-items: center; }
.rl { color: var(--muted); font-size: .95rem; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--bg); border-radius: 12px; padding: 4px; gap: 4px; }
.seg button { padding: .5em .4em; border: 0; border-radius: 9px; background: transparent; color: var(--muted); text-align: center; font-weight: 650; }
.seg button.on { background: var(--ink); color: #130b0b; }
.switchrow { display: flex; justify-content: space-between; align-items: center; gap: 1rem; width: 100%; background: transparent;
             border: 0; border-top: 1px solid #ffffff14; border-radius: 0; padding: .75rem 0 .1rem; }
.sw-label { display: block; font-weight: 650; }
.sw-hint { display: block; font-size: .85rem; color: var(--muted); }
.switch { flex: none; width: 2.9rem; height: 1.7rem; border-radius: 999px; background: var(--panel-2); position: relative; transition: background .15s; }
.switch span { position: absolute; top: 3px; left: 3px; width: calc(1.7rem - 6px); height: calc(1.7rem - 6px); border-radius: 50%;
               background: var(--muted); transition: transform .15s, background .15s; }
.switch.on { background: var(--slime); }
.switch.on span { transform: translateX(1.2rem); background: #130b0b; }
button.doors { font-family: var(--display); font-weight: 400; font-size: 1.6rem; padding: .7em; border-radius: 16px; }
button.doors:disabled { background: var(--panel-2); border-color: var(--panel-2); color: var(--muted); opacity: 1; }
.foot { color: var(--muted); margin: 0; text-align: center; font-size: .95rem; }
@media (max-width: 900px) { .lobby2 { grid-template-columns: 1fr; padding: 1.5rem 1rem; gap: 2rem; } .ticket { transform: none; } }

/* lobby fits one screen on laptops and TVs: everything scales with the window height */
@media (min-width: 901px) {
  .lobby2 { height: 100dvh; min-height: 0; overflow: hidden; padding: clamp(.8rem, 3.5vh, 3rem) 2.5rem; gap: clamp(1.5rem, 4vw, 3.5rem); }
  .door { gap: clamp(.5rem, 2vh, 1.2rem); }
  .door .title { font-size: clamp(2.4rem, min(7vw, 11vh), 6rem); }
  .tagline { font-size: clamp(1rem, 2.3vh, 1.35rem); }
  .ticket { padding: clamp(.6rem, 1.8vh, 1.1rem) 1.4rem clamp(.6rem, 1.8vh, 1.1rem) clamp(.6rem, 1.8vh, 1.1rem); margin-top: 0; }
  #qr canvas, #qr img { width: clamp(110px, 26vh, 220px) !important; height: auto !important; display: block; }
  .ticket-text b { font-size: clamp(1.1rem, 2.6vh, 1.5rem); }
  .host { gap: clamp(.4rem, 1.4vh, .8rem); max-height: 100%; }
  .panel2 { padding: clamp(.55rem, 1.6vh, 1.1rem) 1.1rem; gap: clamp(.35rem, 1.1vh, .8rem); }
  .panel-head h2 { font-size: clamp(1rem, 2.4vh, 1.3rem); }
  .seats { gap: clamp(.2rem, .6vh, .4rem); }
  .seat { min-height: clamp(1.9rem, 4.4vh, 2.5rem); padding-top: 0; padding-bottom: 0; }
  .seat-name { font-size: clamp(.9rem, 2vh, 1.1rem); }
  .rules-grid { gap: clamp(.3rem, 1vh, .6rem) 1rem; }
  .seg button { padding: clamp(.25em, .8vh, .5em) .4em; }
  .switchrow { padding: clamp(.35rem, 1.2vh, .75rem) 0 0; }
  button.doors { font-size: clamp(1.15rem, 3vh, 1.6rem); padding: clamp(.35em, 1.1vh, .7em); }
  .foot { font-size: clamp(.8rem, 1.8vh, .95rem); }
}
@media (min-width: 901px) and (max-height: 760px) { .sw-hint, .tagline { display: none; } }

/* sound control: bottom-right of the club screen */
.soundbar { position: fixed; right: .8rem; bottom: .8rem; z-index: 30; display: flex; gap: .4rem; }
.soundbtn { width: 2.4rem; height: 2.4rem; padding: 0; border-radius: 50%; display: grid; place-items: center; font-size: 1.05rem;
            background: #130b0bcc; border: 1px solid #ffffff22; opacity: .55; transition: opacity .2s; backdrop-filter: blur(6px); }
.soundbtn:hover, .soundbtn:focus-visible { opacity: 1; }
.soundbtn.waiting { opacity: 1; border-color: var(--slime); animation: soundnudge 2s ease-in-out infinite; }
@keyframes soundnudge { 50% { box-shadow: 0 0 0 6px #b8f53133; } }
@media (prefers-reduced-motion: reduce) { .soundbtn.waiting { animation: none; } }

/* table talk: a quiet zone in the side column, never over the board */
.talk { display: flex; flex-direction: column; gap: .45rem; }
.bubble { background: var(--panel-2); border-radius: 14px 14px 14px 4px; padding: .5rem .75rem; font-size: .95rem; line-height: 1.3;
          color: var(--muted); }
.bubble b { color: var(--ink); font-weight: 700; margin-right: .3rem; }
.bubble.new { color: var(--ink); }

/* turn narration: which step we're on, and what it means */
.steps { grid-column: 1 / -1; display: flex; flex-direction: column; gap: .45rem; margin-top: -.4rem; }
.ribbon { display: flex; gap: .4rem; flex-wrap: wrap; }
.st { font-size: .85rem; padding: .3em .8em; border-radius: 999px; background: var(--panel); color: var(--muted); }
.st.done { color: var(--ink); opacity: .55; }
.st.on { background: var(--slime); color: #130b0b; font-weight: 800; }
.narrator { font-size: 1.3rem; font-weight: 650; line-height: 1.3; height: 2.6em; overflow: hidden; }  /* fixed height so the board never jumps */

/* phone: between turns */
.upnext { font-family: var(--display); font-size: 1.05rem; color: var(--muted); }
.now { font-size: 1.15rem; line-height: 1.35; font-weight: 600; }

/* phone in landscape: what you're doing on the left, your hand on the right */
/* (driven by html.landscape, set from how the phone is held, so the keyboard can't trigger it) */
html.landscape .phone { max-width: none; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
           grid-template-rows: auto auto minmax(0, 1fr);
           grid-template-areas: "top top" "alert tray" "main tray";
           padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
html.landscape .p-top { grid-area: top; }
html.landscape .p-alert { grid-area: alert; }
html.landscape .phone .main { grid-area: main; padding-bottom: .4rem; }
html.landscape .phone .tray { grid-area: tray; align-self: end; background: none; padding: .2rem 1.4rem .4rem .4rem; }
html.landscape .bar { padding: .35rem .9rem .3rem; }
html.landscape .flag { height: 8px; }
html.landscape .fan { height: 6.4rem; padding-top: .9rem; }
html.landscape .hc { width: 4.4rem; height: 5.8rem; }
html.landscape .actions { margin-top: .3rem; }
html.landscape .quote { font-size: 1.15rem; }
html.landscape .total { font-size: 2rem; }

/* phone: pocket view of the table */
.strip { background: var(--panel); border-radius: 12px; padding: .5rem .65rem; display: flex; flex-direction: column; gap: .35rem; }
.srow { display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; }
.slabel { font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); min-width: 4.6rem; }
.zchip { font-size: .82rem; padding: .15em .55em; border-radius: 8px; border: 1px solid #b8f53166; background: #b8f53114; }
.zchip b { color: var(--slime); margin-left: .15em; }
.zchip.next { border-color: var(--amber); background: #f0a03022; }
.zchip.next::before { content: "next ▸ "; color: var(--amber); font-size: .72em; text-transform: uppercase; letter-spacing: .06em; }
.zchip.deadly { border-color: var(--red); background: #ff464622; }
.zchip.deadly::before { color: var(--red); }

.rc { display: grid; grid-template-columns: 1.4rem 1fr; gap: .3rem; align-items: baseline; color: var(--ink); }
.rc.big { font-weight: 700; }
.rc.small { color: var(--muted); font-size: .9em; }
.rc.said i { color: var(--muted); }
/* club feed: newest turn first, older turns fade */
.feed { display: flex; flex-direction: column; gap: .7rem; overflow: hidden; min-height: 0; flex: 1; font-size: .95rem; }
.fturn { display: flex; flex-direction: column; gap: .25rem; }
.fturn .loghead { margin: 0; padding: 0; border: 0; }
.fturn:not(.now) { opacity: .5; }
.fturn:nth-child(3) { opacity: .3; }

/* side panels: newest on top, older content fades out toward the bottom */
.fade-old { -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent 100%);
            mask-image: linear-gradient(to bottom, #000 55%, transparent 100%); overflow: hidden; }
.talkzone { flex: 0 1 auto; max-height: 34%; display: flex; flex-direction: column; min-height: 0; }
.talkzone .talk { min-height: 0; }
.fturn:not(.now) { opacity: .75; }
.fturn:nth-child(3) { opacity: .6; }

/* phone: tapping a card pops its info up just above the fan */
.tray { position: relative; }
.pop { position: absolute; left: .6rem; right: .6rem; bottom: calc(100% - 1.6rem); z-index: 5; display: flex; flex-direction: column;
       gap: .3rem; animation: pop .2s ease-out both; filter: drop-shadow(0 12px 24px #000c); }
.pop .card-detail { background: var(--panel-2); }
.pop .hint { text-align: center; font-size: .72rem; }

/* the deck pile the Line is drawn from */
.linerow { display: flex; gap: 1rem; align-items: flex-end; }
.deckpile { flex: none; position: relative; width: 5.2rem; }
.deckpile img { width: 100%; border-radius: 10px; display: block; box-shadow: 4px 4px 0 #0008, 8px 8px 0 #0005; }
.deckpile span { position: absolute; bottom: .3rem; left: 50%; transform: translateX(-50%); background: #130b0bdd; color: var(--ink);
                 font-weight: 800; font-size: .8rem; padding: .1em .5em; border-radius: 999px; }

/* the Line keeps its height when empty; a velvet rope marks the front */
.line { min-height: 11.4rem; }
.line.empty { align-items: center; gap: 1.2rem; }
.rope { flex: none; width: 4.4rem; height: auto; align-self: flex-end; margin-bottom: .2rem; }

/* phone: lingering rules as reminders on your turn and in fights */
.rstrip { display: flex; flex-direction: column; gap: .3rem; }
.rchip { font-size: .8rem; line-height: 1.3; padding: .4rem .6rem; border-radius: 10px; background: var(--panel); color: var(--muted);
         border-left: 3px solid var(--action); }
.rchip b { color: var(--ink); font-weight: 700; }
.rchip.mine { background: #c48ae622; color: var(--ink); border-left-color: var(--slime); }

.bouncer { flex: none; height: 13.5rem; width: auto; align-self: flex-end; margin: -2.2rem -.4rem -.4rem -.6rem;
           filter: drop-shadow(0 10px 18px #000a); pointer-events: none; }

/* phone: while typing an answer, the hand tray tucks away so the keyboard doesn't squash everything */
html.typing .phone .tray { display: none; }
html.typing .phone .p-alert { display: none; }

/* phone: who a prompt is aimed at */
.who { display: flex; flex-wrap: wrap; gap: .4rem; }
.who button { padding: .45em .9em; border-radius: 999px; text-align: center; }
.who button.on { background: var(--ink); color: #130b0b; font-weight: 800; }

.scores { display: grid; grid-template-columns: repeat(5, 1fr); gap: .5rem; }
.scores button { font-family: var(--display); font-size: 1.5rem; padding: .55em 0; text-align: center; }

/* phone: settings */
.gear { background: transparent; border: 0; padding: .2rem .4rem; font-size: 1.15rem; margin-left: auto; margin-right: .4rem; }
#sheet { position: relative; z-index: 100; }
.sheet { position: fixed; inset: 0; background: #000b; z-index: 100; display: flex; align-items: flex-end; isolation: isolate; }
.sheet-card { background: var(--panel); width: 100%; max-width: 34rem; margin: 0 auto; border-radius: 20px 20px 0 0;
              padding: 1rem 1.1rem calc(1.2rem + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: .55rem;
              max-height: 90dvh; overflow-y: auto; animation: pop .2s ease-out both; }
.sheet-card h2 { font-family: var(--display); font-weight: 400; margin: 0; }

/* end-of-night badges */
.badge { display: inline-block; font-size: .95rem; padding: .2em .65em; border-radius: 999px; background: var(--panel-2);
         border: 1px solid #ffffff1f; margin: .1rem .15rem; white-space: nowrap; }
.mybadges { display: flex; flex-direction: column; gap: .45rem; }
.mybadge { display: grid; grid-template-columns: 2.2rem 1fr; align-items: center; gap: .5rem; background: var(--panel);
           border-radius: 12px; padding: .55rem .7rem; }
.mybadge .bi { font-size: 1.6rem; text-align: center; }

/* how-to walkthrough on the TV */
.intro { min-height: 100vh; display: grid; place-items: center; padding: 2rem; }
.intro-card { max-width: 72rem; width: 100%; display: flex; flex-direction: column; gap: 1rem; }
.intro-art { min-height: 13rem; display: flex; align-items: center; }
.intro-art .card { font-size: 17px; }
.op { font-size: 1.8rem; font-weight: 800; }
.progress { height: 6px; background: var(--panel-2); border-radius: 999px; overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--slime); width: 0; animation: grow linear forwards; }
@keyframes grow { to { width: 100%; } }
.intro .st { font-size: 1.35rem; padding: .45em 1.1em; }

/* lobby: picking the bots */
.roster-wrap { position: fixed; inset: 0; background: #000b; z-index: 50; display: grid; place-items: center; padding: 2rem; }
.roster { background: var(--panel); border-radius: 20px; padding: 1.4rem 1.6rem; width: min(70rem, 100%); max-height: 90vh; overflow-y: auto;
          display: flex; flex-direction: column; gap: 1rem; }
.roster h2 { font-family: var(--display); font-weight: 400; margin: 0; }
.roster-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: .8rem; }
.bot { background: var(--panel-2); border-radius: 14px; padding: .8rem 1rem; display: flex; flex-direction: column; gap: .35rem; }
.bot p { margin: 0; line-height: 1.35; }
.bot.seated { opacity: .55; }
.bot-name { font-size: 1.2rem; }
.bot-meta { font-size: .8rem; }
.bot button { padding: .35em .9em; text-align: center; }

.closeclub { font-size: .85rem; padding: .35em .8em; color: var(--muted); border-color: #ffffff22; }
.closeclub:hover { color: var(--ink); }

.bot.spin { outline: 3px solid var(--slime); outline-offset: 2px; background: #b8f53122; box-shadow: 0 0 24px #b8f53155; }

/* bot portraits and player initials */
.avatar { border-radius: 50%; object-fit: cover; flex: none; border: 2px solid var(--ink); background: var(--panel-2); display: inline-block; }
.avatar.initial { display: inline-grid; place-items: center; font-family: var(--display); color: var(--ink); border-color: var(--slime); }
.bubble { display: flex; gap: .55rem; align-items: flex-start; }

/* ---------- TV layout (rework): the club scene, the player rail, one feed ---------- */
.club { grid-template-columns: minmax(0, 1fr) 24rem; grid-template-rows: auto auto minmax(0, 1fr) auto; gap: .9rem 1.2rem; padding: 1.1rem 1.6rem; }
.club .top { height: 4.8rem; }
.club .who .turnbig { display: flex; align-items: center; gap: .6rem; font-family: var(--display); font-weight: 400; font-size: 2.2rem; }
.steps.compact { flex-direction: row; align-items: center; gap: .8rem; }
.steps.compact .narrator { height: auto; font-size: 1.2rem; }
.scene { display: grid; grid-template-rows: auto minmax(0, 1fr); border-radius: 18px; overflow: hidden; min-height: 0;
         box-shadow: 0 0 0 1px #ffffff14; }
.scene-label { position: absolute; top: .55rem; left: .9rem; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase;
               color: var(--muted); z-index: 1; }
.outside { position: relative; padding: 1.6rem 1rem .6rem;
           background: linear-gradient(180deg, #1b1210, #140d0c),
                       repeating-linear-gradient(0deg, #ffffff06 0 2px, transparent 2px 26px); border-bottom: 3px solid #3a2420; }
.outside .line { min-height: 11rem; padding-top: .4rem; }
.inside { position: relative; padding: 2rem 1.2rem 1rem; display: flex; align-items: center;
          background:
            radial-gradient(ellipse at 50% 120%, rgba(255, 70, 70, calc(var(--heat) * .35)), transparent 60%),
            conic-gradient(#ffffff08 25%, transparent 0 50%, #ffffff08 0 75%, transparent 0) 0 0 / 64px 64px,
            #1a1012; transition: background .6s; }
.inside .slots { gap: 1.2rem; }
.inside .slot, .inside .card { font-size: 19px; }
.inside .card { width: 8.6em; min-height: 11.4em; }
.inside .slot { width: 8.6em; min-height: 11.4em; }
.feedpanel { background: var(--panel); border-radius: var(--radius); padding: .9rem 1rem; display: flex; flex-direction: column; gap: .8rem; height: 100%; min-height: 0; }
.fsec { display: flex; flex-direction: column; gap: .45rem; }
.fsec.grow { flex: 1; min-height: 0; }
.fsec h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin: 0; }
.rulechip { font-size: .85rem; background: var(--panel-2); border-left: 3px solid var(--action); border-radius: 8px; padding: .4rem .6rem; }
.rulechip .muted { font-size: .78rem; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rail { grid-column: 1 / -1; display: flex; align-items: flex-end; gap: .5rem; overflow-x: auto; padding-top: .6rem; }
.rail-arrow { color: var(--muted); font-size: 1.6rem; align-self: center; }
.ptile { background: var(--panel); border-radius: 16px; padding: .65rem .8rem; min-width: 14rem; border: 2px solid transparent;
         transition: transform .3s, box-shadow .3s; }
.ptile.current { border-color: var(--slime); transform: translateY(-.5rem); box-shadow: 0 10px 28px #b8f53133; }
.ptop { display: flex; gap: .6rem; align-items: center; }
.ptile .pname { font-weight: 800; font-size: 1.2rem; }
.pstats { font-size: .85rem; color: var(--muted); }
.ptile .squad { display: flex; flex-wrap: wrap; gap: .25rem; margin-top: .45rem; }

/* TV: everything in the scene scales with the screen height, so shorter laptop screens still fit the whole club */
.club { --cu: clamp(11px, 1.9vh, 19px); grid-template-columns: minmax(0, 1fr) clamp(17rem, 24vw, 24rem); }
.outside .line { min-height: calc(var(--cu) * 10); }
.outside .line .card { font-size: calc(var(--cu) * .9); }
.inside { container-type: size; padding-top: 2rem; }
/* floor cards fill the floor's height (a card is ~11.4em tall), never past full size or the floor's width */
.inside .slot, .inside .card { font-size: clamp(10px, min(6.6cqh, 2.2cqw), 21px); }
.club .bouncer { height: calc(var(--cu) * 12); }
.club .deckpile { width: calc(var(--cu) * 4.6); }
@media (max-height: 820px) {
  .club { padding: .7rem 1.2rem; gap: .6rem 1rem; }
  .club .top { height: 3.8rem; }
  .club .who .turnbig { font-size: 1.8rem; }
  .ptile { padding: .45rem .65rem; min-width: 12rem; }
  .ptile.current { transform: translateY(-.25rem); }
}

/* how-to: one picture per idea, short captions */
.intro-card { gap: .8rem; }
.intro-card h1 { font-size: clamp(2.2rem, 5vh, 3.4rem) !important; }
.intro-card p { font-size: clamp(1.15rem, 2.6vh, 1.6rem) !important; }
.intro-art { min-height: clamp(9rem, 26vh, 16rem); }
.howto-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; width: 100%; }
.howto-step { background: var(--panel); border-radius: 18px; padding: 1rem 1rem 1.1rem; display: flex; flex-direction: column; gap: .7rem;
              align-items: center; text-align: center; border: 2px solid transparent; }
.howto-step .pic { height: clamp(6rem, 17vh, 9.5rem); display: grid; place-items: center; width: 100%; }
.howto-step .pic svg { height: 100%; width: auto; max-width: 100%; }
.howto-step b { font-size: clamp(1.2rem, 2.6vh, 1.6rem); }
.howto-step span { color: var(--muted); font-size: clamp(1rem, 2vh, 1.3rem); line-height: 1.3; }
.howto-step .n { font-family: var(--display); color: var(--slime); font-size: 1.1rem; }
.howto-step.key { border-color: var(--slime); }
.howto-pic { height: clamp(9rem, 26vh, 15rem); }
.howto-pic svg { height: 100%; width: auto; }
@media (max-width: 900px) { .howto-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* end of the night: one screen, no scrolling on a TV or laptop */
.results { height: 100vh; height: 100dvh; max-width: 82rem; margin: 0 auto; padding: clamp(1rem, 3vh, 2.4rem) clamp(1rem, 3vw, 2.4rem);
           display: flex; flex-direction: column; gap: clamp(.6rem, 2vh, 1.4rem); overflow: hidden; }
.results.center { justify-content: center; align-items: center; text-align: center; }
.results header { display: flex; flex-direction: column; gap: clamp(.3rem, 1vh, .7rem); }
.res-title { font-size: clamp(2rem, 6.5vh, 3.6rem); margin: 0; line-height: 1.05; }
.res-why { font-size: clamp(1rem, 2.6vh, 1.5rem); margin: 0; max-width: 62rem; line-height: 1.35; }
.res-facts { display: flex; flex-wrap: wrap; gap: .5rem; }
.res-facts .pill { font-size: clamp(.8rem, 1.8vh, 1rem); }
.res-grid { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); grid-auto-rows: minmax(0, 1fr);
            gap: clamp(.5rem, 1.6vh, 1rem); align-content: stretch; max-height: 30rem; }
.res-player { background: var(--panel); border-radius: 16px; padding: clamp(.5rem, 1.6vh, 1rem) clamp(.7rem, 1.4vw, 1.1rem); display: flex;
              flex-direction: column; justify-content: center; gap: clamp(.3rem, 1vh, .7rem); min-height: 0; overflow: hidden; border: 2px solid transparent; }
.res-player.mvp { border-color: var(--slime); box-shadow: 0 0 28px #b8f53133; }
.res-top { display: flex; align-items: center; gap: .7rem; }
.res-top .avatar { width: clamp(2.2rem, 6vh, 3.4rem) !important; height: clamp(2.2rem, 6vh, 3.4rem) !important; }
.res-name { font-weight: 800; font-size: clamp(1.05rem, 2.5vh, 1.45rem); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.res-sub { font-size: clamp(.8rem, 1.8vh, 1rem); }
.res-pts { margin-left: auto; text-align: center; line-height: 1; }
.res-pts b { font-family: var(--display); font-weight: 400; font-size: clamp(1.6rem, 5vh, 2.6rem); display: block; }
.res-pts span { font-size: .7rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.res-badge { display: flex; align-items: center; gap: .6rem; background: var(--panel-2); border-radius: 12px; padding: .4rem .7rem; }
.res-badge .bi { font-size: clamp(1.3rem, 3.4vh, 2rem); }
.res-badge b { display: block; font-size: clamp(.9rem, 2vh, 1.1rem); }
.res-badge .muted { font-size: clamp(.72rem, 1.6vh, .9rem); }
.results footer { padding-right: 6.5rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
@media (max-height: 560px) { .res-badge .muted, .res-why { display: none; } }
@media (max-width: 900px) {
  .results footer { padding-right: 0; padding-bottom: 3.5rem; }
  .results { height: auto; min-height: 100dvh; overflow: visible; }
  .res-grid { grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); grid-auto-rows: auto; max-height: none; }
}

button.primary.soft { opacity: .55; }

/* lobby alignment: the ticket, the doors button and the hint share one width and one left edge;
   on wide screens the title lines up with the guest list's top and the button with the house rules' bottom */
.marquee { display: flex; flex-direction: column; gap: .4rem; }
.entry { display: flex; flex-direction: column; gap: clamp(.5rem, 1.6vh, .9rem); width: max-content; max-width: 100%; }
.entry .ticket { width: 100%; }  /* keeps its little tilt */
.entry .foot { text-align: left; }
@media (min-width: 901px) {
  .lobby2 { align-items: stretch; grid-template-rows: auto; align-content: center; }
  .door { justify-content: flex-start; gap: clamp(1.4rem, 5vh, 3rem); }  /* ticket follows the title, not pinned to the bottom */
}

/* the bot picker fits one screen: the whole tile is the invite button */
.roster-wrap { padding: clamp(.6rem, 3vh, 2rem); }
.roster { max-height: calc(100dvh - clamp(1.2rem, 6vh, 4rem)); padding: clamp(.8rem, 2.2vh, 1.4rem) clamp(1rem, 2vw, 1.6rem); gap: clamp(.5rem, 1.6vh, 1rem); }
.roster-head { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.roster-head h2 { font-size: clamp(1.2rem, 3.2vh, 1.7rem); }
.roster-head .row { margin-left: auto; }
.roster-grid { grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr)); gap: clamp(.4rem, 1.2vh, .8rem); overflow-y: auto; min-height: 0; }
.bot { all: unset; box-sizing: border-box; cursor: pointer; background: var(--panel-2); border-radius: 14px; border: 2px solid transparent;
       padding: clamp(.45rem, 1.3vh, .8rem) .9rem; display: flex; flex-direction: column; gap: clamp(.2rem, .7vh, .35rem);
       transition: border-color .15s, background .15s, transform .15s; }
.bot:hover:not(:disabled) { border-color: #ffffff33; transform: translateY(-2px); }
.bot:focus-visible { outline: 3px solid var(--slime); outline-offset: 2px; }
.bot:disabled { cursor: default; opacity: .45; }
.bot.seated { opacity: 1; border-color: var(--slime); background: #b8f5311a; }
.bot-top { display: flex; align-items: center; gap: .6rem; }
.bot-top .avatar { width: clamp(2rem, 5.5vh, 2.8rem) !important; height: clamp(2rem, 5.5vh, 2.8rem) !important; }
.bot-name { font-size: clamp(1rem, 2.3vh, 1.2rem); }
.bot-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* a small round mark, so it never squeezes the name: + to invite, ✓ when invited */
.bot-state { flex: none; width: 1.7rem; height: 1.7rem; display: grid; place-items: center; border-radius: 50%; font-size: 1rem;
             font-weight: 800; border: 1px solid #ffffff33; color: var(--ink); }
.bot-state:empty { display: none; }
.bot.seated .bot-state { background: var(--slime); color: #130b0b; border-color: var(--slime); }
.bot-profile { font-size: clamp(.8rem, 1.8vh, .95rem); line-height: 1.3; color: var(--ink);
               display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.bot-meta { font-size: clamp(.7rem, 1.5vh, .8rem); }
@media (max-height: 720px) { .bot-meta { display: none; } .bot-profile { -webkit-line-clamp: 2; } }
.entry .doors { margin-top: clamp(.6rem, 2.2vh, 1.4rem); }  /* breathing room under the tilted ticket */
/* the grid scrolls (so it clips): give tiles room to pulse, glow and lift without being cut off */
.roster-grid { padding: .75rem; margin: -.75rem; }
.ticket-code { font-family: var(--display); font-size: clamp(1.8rem, 5.5vh, 2.8rem) !important; letter-spacing: .12em; opacity: 1 !important;
               line-height: 1; color: var(--flannel); }
.roomcode { letter-spacing: .1em; color: var(--ink); }

/* how-to: slides change height, so the progress bar and buttons sit pinned at the bottom (Next never moves) */
.intro { height: 100vh; height: 100dvh; min-height: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto; place-items: stretch;
         padding: clamp(1rem, 4vh, 2.5rem) clamp(1rem, 4vw, 3rem); overflow: hidden; }
.intro-card { align-self: center; justify-self: center; overflow: hidden; }
.intro-foot { width: 100%; max-width: 72rem; justify-self: center; display: flex; flex-direction: column; gap: .8rem;
              padding-top: clamp(.6rem, 2vh, 1.2rem); }
/* the auto-advance timer is a quiet hairline under the buttons, not a slime-green bar */
.intro-foot .progress { height: 3px; background: #ffffff10; }
.intro-foot .progress span { background: #f5f1dc55; }
.soundlock { padding: .5em 1em; border-radius: 999px; background: #130b0bee; border: 2px solid var(--slime); color: var(--ink);
             font-weight: 700; animation: soundnudge 2s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .soundlock { animation: none; } }

/* phone: the selfie block in the lobby and settings */
.selfie { display: flex; align-items: center; gap: .9rem; background: var(--panel); border-radius: 14px; padding: .7rem .8rem; }
.selfie .hint { font-size: .8rem; }

/* phone: a card that just landed in your hand glows, then fades back (delay is set per card so redraws don't restart it) */
.hc.fresh { animation: freshglow 2.6s ease-out both; }
@keyframes freshglow {
  0%, 35% { box-shadow: 0 0 0 3px var(--slime), 0 0 26px #b8f531cc; }
  100% { box-shadow: 0 0 0 0 #b8f53100, 0 0 0 #b8f53100; }
}
@media (prefers-reduced-motion: reduce) { .hc.fresh { animation-duration: .01s; outline: 3px solid var(--slime); } }

/* end screen: the MVP line under the headline; cards sized to their content, centred in the space */
.res-tag { font-family: var(--display); font-size: clamp(1.2rem, 3.4vh, 2rem); margin: 0; color: var(--slime); line-height: 1.15; }
.res-why:empty { display: none; }
.res-grid { grid-auto-rows: auto; align-content: center; max-height: none; }
.res-art { flex: 1; min-height: 0; border-radius: 18px; background: center / cover no-repeat; box-shadow: 0 0 0 1px #ffffff14;
           -webkit-mask-image: linear-gradient(180deg, #000 70%, transparent); mask-image: linear-gradient(180deg, #000 70%, transparent); }
.results:has(.res-art) .res-grid { flex: none; }
@media (max-width: 900px) { .res-art { min-height: 12rem; } }
/* while sound is locked the wider prompt sits in the corner: the end screen's buttons make room for it */
body:has(.soundlock) .results footer { padding-right: 17rem; }

/* phone: the skip vote */
.skipcard { background: #f0a03022; border: 1px solid var(--amber); border-radius: 14px; padding: .7rem .8rem; margin-bottom: .7rem;
            font-size: .9rem; line-height: 1.35; }
.skipcard.mine { background: #ff464622; border-color: var(--red); }
.skipcard .actions { margin-top: .6rem; }
.results .cost { font-size: .85em; opacity: .8; }

/* report a problem: a small dialog above everything */
.report-wrap { position: fixed; inset: 0; background: #000b; z-index: 80; display: grid; place-items: center; padding: 1rem; }
.report-card { background: var(--panel); border-radius: 18px; padding: 1.1rem 1.2rem; width: min(30rem, 100%); display: flex;
               flex-direction: column; gap: .7rem; }
.report-card h2 { font-family: var(--display); font-weight: 400; margin: 0; font-size: 1.4rem; }
.report-card p { margin: 0; font-size: .9rem; }
.report-card textarea { width: 100%; }
/* lobby: a little air above the title */
.door .marquee { margin-top: clamp(.8rem, 3.5vh, 2.4rem); }

/* phone: a quick flash when it's your move */
html.needflash .phone::after { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 90;
  box-shadow: inset 0 0 0 6px var(--slime), inset 0 0 60px #b8f53188; animation: needflash 1.1s ease-out both; }
@keyframes needflash { 0%, 30% { opacity: 1; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { html.needflash .phone::after { animation-duration: .4s; } }

/* ---------- card art (from the printed deck) ---------- */
.card.has-art, .hc.has-art { text-shadow: 0 1px 3px #000, 0 0 8px #000; }
.card.has-art .text { margin-top: auto; color: var(--ink); }
/* zombies are landscape, like the printed zombie cards */
.card.zombie.has-art { width: 11em; min-height: 7.4em; }
.inside .card.zombie, .inside .slot { width: 12.6em; min-height: 8.4em; }
.inside .slot, .inside .card { font-size: clamp(10px, min(9cqh, 1.8cqw), 21px); }
.outside .line .card.zombie { width: 11em; min-height: 7.4em; }
/* the whole picture, at its own shape (portrait bears, landscape zombies), never cropped */
.card-detail .detail-art { display: block; width: calc(100% + 1.6rem); height: auto; max-height: 46dvh; object-fit: contain;
                           margin: -.7rem -.8rem .6rem; border-radius: 10px 10px 0 0; background: #000; }
.pop .popclose { align-self: flex-end; background: var(--panel-2); color: var(--muted); border-radius: 999px; padding: .2em .7em;
                 font-size: .75rem; }

/* cutaways: a comic panel above the moment's headline */
.fx .cutaway { display: block; width: min(40rem, 62vw); max-height: 48vh; object-fit: cover; border-radius: 14px; margin: 0 auto .8rem;
               border: 3px solid #000; box-shadow: 0 6px 0 #0008; animation: cutin .35s cubic-bezier(.2,1.4,.4,1) both; }
@keyframes cutin { from { transform: scale(.85) rotate(-2deg); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .fx .cutaway { animation: none; } }

/* phone: yes/no questions as two big, easy-to-hit buttons */
.bigyesno { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; margin-top: auto; padding-top: .8rem; }
.bigyesno button { min-height: 5.2rem; font-size: 1.25rem; font-weight: 800; border-radius: 18px; text-align: center; }

/* club: loading progress, bottom-left, gone when everything is in */
#warm { position: fixed; left: .8rem; bottom: .8rem; z-index: 30; font-size: .8rem; color: var(--muted); background: #130b0bcc;
        border: 1px solid #ffffff1a; border-radius: 999px; padding: .3rem .8rem; backdrop-filter: blur(6px); transition: opacity 1s; }
#warm.done { opacity: 0; }
/* the bouncer fits inside the Line's panel (he used to poke up past its top edge and lose his head) */
.club .bouncer { height: calc(var(--cu) * 9.6); margin: 0 -.4rem 0 -.6rem; object-fit: contain; }
/* the Line scrolls sideways, which also clips anything poking out of it: keep him inside, with a little headroom */
.club .outside .line { padding-top: .5rem; }

/* phone: bear and zombie chips are buttons that show the card */
button.chip.tap, button.zchip.tap { font: inherit; cursor: pointer; }
button.chip.tap.on, button.zchip.tap.on { outline: 2px solid var(--slime); outline-offset: 1px; }
/* number badges (zombie toughness, weapon strength): dark digits with a white glow, not the art's black shadow */
.card.has-art .num, .hc.has-art .v { text-shadow: 0 0 3px #fff, 0 0 6px #fff, 0 0 10px #ffffffaa; }

/* phone: waiting for someone else's turn */
.whoturn { display: flex; align-items: center; gap: .7rem; }
.whoturn-name { font-family: var(--display); font-size: 1.35rem; line-height: 1.1; }
.stepper { display: flex; align-items: center; gap: .3rem; margin: .7rem 0; }
.stp { display: flex; flex-direction: column; align-items: center; gap: .2rem; font-size: .72rem; color: var(--muted); min-width: 2.6rem; }
.stp b { width: 1.8rem; height: 1.8rem; border-radius: 50%; display: grid; place-items: center; font-size: .85rem;
         border: 2px solid #ffffff33; color: var(--muted); }
.stp.done b { border-color: var(--slime); color: var(--slime); }
.stp.on { color: var(--ink); font-weight: 800; }
.stp.on b { background: var(--slime); border-color: var(--slime); color: #130b0b; box-shadow: 0 0 12px #b8f53188; }
.stp-bar { flex: 1; height: 2px; background: #ffffff22; margin-bottom: 1.1rem; }

/* TV feed: this turn as a vertical stepper, past turns as one-liners */
.vsteps { display: flex; flex-direction: column; margin-top: .4rem; }
.vstep { display: grid; grid-template-columns: 1.7rem 1fr; gap: .55rem; position: relative; padding-bottom: .55rem; }
.vstep:not(:last-child)::before { content: ""; position: absolute; left: .8rem; top: 1.7rem; bottom: 0; width: 2px; background: #ffffff1c; }
.vstep.done:not(:last-child)::before { background: #b8f53166; }
.vdot { width: 1.7rem; height: 1.7rem; border-radius: 50%; display: grid; place-items: center; font-size: .8rem; font-weight: 800;
        border: 2px solid #ffffff33; color: var(--muted); background: var(--panel); z-index: 1; }
.vstep.done .vdot { border-color: var(--slime); color: var(--slime); }
.vstep.on .vdot { background: var(--slime); border-color: var(--slime); color: #130b0b; box-shadow: 0 0 14px #b8f53188; }
.vlabel { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: .25rem 0 .15rem; }
.vstep.on .vlabel { color: var(--slime); font-weight: 800; }
.vstep.todo { opacity: .4; }
.fturn.past { padding: .35rem 0; border-top: 1px solid #ffffff10; }
.pastline { display: flex; align-items: center; flex-wrap: wrap; gap: .35rem .6rem; font-size: .85rem; }
.pastline .pi { color: var(--ink); opacity: .85; white-space: nowrap; }
.stepper.compact { margin: 0 0 .6rem; } .stepper.compact .stp { flex-direction: row; gap: .3rem; min-width: 0; font-size: .7rem; }
.stepper.compact .stp b { width: 1.3rem; height: 1.3rem; font-size: .7rem; } .stepper.compact .stp-bar { margin-bottom: 0; }
.fx .cutaway.portrait { width: auto; height: min(44vh, 28rem); max-width: 70vw; object-fit: contain; background: #000; }
