/* =====================================================================
   Spin the Bottle - lamplit walnut table.
   One memorable thing: the green bottle in a pool of light.
   Orange is reserved for actions, lipstick red for kiss moments.
   ===================================================================== */

/* ---------- fonts (self-hosted, no external requests) ---------- */
@font-face {
  font-family: "Rubik";
  src: url("../fonts/rubik-latin.woff2") format("woff2");
  font-weight: 300 900; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Rubik";
  src: url("../fonts/rubik-cyrillic.woff2") format("woff2");
  font-weight: 300 900; font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Shrikhand";
  src: url("../fonts/shrikhand-latin.woff2") format("woff2");
  font-weight: 400; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- tokens ---------- */
:root {
  --walnut-950: #1a0d07;
  --walnut-900: #24120a;
  --walnut-800: #33190e;
  --walnut-700: #4a2716;
  --walnut-600: #64361f;
  --lamp: #ffdc9a;
  --orange: #ff8a1f;
  --orange-hi: #ffa53f;
  --orange-lo: #f0740c;
  --orange-edge: #a84600;
  --lip: #e5254d;
  --ink: #fbeedd;
  --ink-dim: #cdb59d;
  --line: rgba(255, 233, 205, .12);
  --male: #86c8ff;
  --female: #ff93bd;
  --other: #c9aaff;
  --font-ui: "Rubik", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Shrikhand", "Rubik", system-ui, sans-serif;
  --wood: url("../img/wood.webp");
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--walnut-950);
  color: var(--ink);
  font: 400 15px/1.4 var(--font-ui);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button { font: inherit; color: inherit; cursor: pointer; }
[hidden] { display: none !important; }
svg { display: block; }
:focus-visible { outline: 3px solid var(--lamp); outline-offset: 2px; }

/* ---------- shared avatar tile ---------- */
.tile {
  --s: 48px;
  width: var(--s); height: var(--s);
  flex: none;
  display: grid; place-items: center;
  overflow: hidden;
  border-radius: calc(var(--s) * .17);
  background: #5b3a26;
  color: #fff;
  font-weight: 700; line-height: 1;
  font-size: calc(var(--s) * .5);
  user-select: none;
}
.tile img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.tile.is-emoji { font-size: calc(var(--s) * .56); }
.tile.is-initial { font-family: var(--font-display); font-weight: 400; text-shadow: 0 2px 0 rgba(0, 0, 0, .22); }

/* ---------- buttons ---------- */
.cta {
  border: 0; border-radius: 15px;
  padding: 14px 22px;
  font-weight: 700; font-size: 17px; letter-spacing: .01em;
  color: #2b1300;
  background: linear-gradient(var(--orange-hi), var(--orange-lo));
  box-shadow: 0 4px 0 var(--orange-edge), 0 12px 22px rgba(0, 0, 0, .32), inset 0 1px 0 rgba(255, 255, 255, .4);
  transition: transform .08s, box-shadow .08s, filter .15s;
}
.cta:hover { filter: brightness(1.06); }
.cta:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--orange-edge), 0 4px 10px rgba(0, 0, 0, .3), inset 0 1px 0 rgba(255, 255, 255, .4); }
.cta:disabled { filter: grayscale(.6) brightness(.8); cursor: wait; }
.cta.kiss {
  color: #fff;
  background: linear-gradient(#f2456a, var(--lip));
  box-shadow: 0 4px 0 #8e1230, 0 12px 22px rgba(0, 0, 0, .32), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.cta.kiss:active { box-shadow: 0 1px 0 #8e1230, 0 4px 10px rgba(0, 0, 0, .3), inset 0 1px 0 rgba(255, 255, 255, .35); }
.ghost {
  border: 1px solid rgba(255, 233, 205, .28); border-radius: 15px;
  padding: 13px 22px; background: rgba(255, 233, 205, .06);
  font-weight: 600; font-size: 17px; color: var(--ink);
}
.ghost:hover { background: rgba(255, 233, 205, .12); }

/* =====================================================================
   Sign in
   ===================================================================== */
.login {
  position: fixed; inset: 0; z-index: 10;
  overflow: auto;
  display: grid; place-items: center;
  padding: max(28px, env(safe-area-inset-top)) 22px max(28px, env(safe-area-inset-bottom));
  background:
    radial-gradient(110% 85% at 28% 42%, rgba(26, 13, 7, .10), rgba(26, 13, 7, .86) 80%),
    var(--wood) center / cover no-repeat,
    #7a4118;
}
.login-inner {
  width: min(1000px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 410px);
  gap: clamp(28px, 6vw, 72px);
  align-items: center;
}
.hero { display: grid; justify-items: center; text-align: center; }
.logo-bottle { width: min(300px, 58vw); aspect-ratio: 1; display: grid; place-items: center; }
.logo-bottle svg {
  height: 100%; width: auto;
  transform: rotate(24deg);
  filter: drop-shadow(8px 12px 8px rgba(20, 6, 0, .5));
  animation: introSpin 2.8s cubic-bezier(.1, .72, .2, 1) both;
}
.hero h1 {
  margin: 6px 0 8px;
  font: 400 clamp(46px, 7vw, 78px)/1.02 var(--font-display);
  color: #fff1d6;
  text-shadow: 0 3px 0 #8f3f00, 0 12px 30px rgba(0, 0, 0, .55);
}
.hero p { margin: 0; max-width: 28ch; font-size: 18px; color: #f8e3c6; text-shadow: 0 1px 8px rgba(0, 0, 0, .7); }

.login-card {
  display: grid; gap: 16px;
  padding: 26px;
  border-radius: 26px;
  background: rgba(27, 13, 7, .84);
  border: 1px solid var(--line);
  backdrop-filter: blur(12px);
  box-shadow: 0 30px 70px rgba(0, 0, 0, .5);
}
.row { display: flex; gap: 12px; }
.grow { flex: 1; min-width: 0; }
.age { width: 92px; }
.field { display: grid; gap: 6px; margin: 0; padding: 0; border: 0; min-width: 0; }
.field > span, .field > legend, .lbl { padding: 0; font-size: 13px; font-weight: 500; color: var(--ink-dim); }
.field input:not([type=radio]):not([type=checkbox]) {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(255, 233, 205, .16); border-radius: 12px;
  background: rgba(0, 0, 0, .32);
  color: var(--ink); font: inherit; font-size: 16px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(255, 138, 31, .25); }
input[type=number] { -moz-appearance: textfield; appearance: textfield; }
input[type=number]::-webkit-inner-spin-button, input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.segopt { position: relative; }
.seg input { position: absolute; inset: 0; margin: 0; opacity: 0; pointer-events: none; }
.seg label {
  display: block;
  text-align: center; padding: 10px 6px; cursor: pointer;
  border-radius: 12px; border: 1px solid rgba(255, 233, 205, .14);
  background: rgba(0, 0, 0, .28); font-weight: 500;
  transition: background .15s, color .15s, border-color .15s;
}
.seg input:checked + label { background: var(--orange); border-color: var(--orange-hi); color: #2b1300; font-weight: 700; }
.seg input:focus-visible + label { outline: 3px solid var(--lamp); outline-offset: 2px; }

.look { display: flex; gap: 14px; align-items: center; }
.look-preview { position: relative; flex: none; width: 72px; height: 72px; padding: 0; border: 0; background: none; border-radius: 14px; }
.look-preview .tile { --s: 72px; box-shadow: 0 0 0 3px #fff4e0, 0 6px 12px rgba(0, 0, 0, .4); }
.cam { position: absolute; right: -8px; bottom: -8px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--orange); box-shadow: 0 2px 8px rgba(0, 0, 0, .5); }
.cam svg { width: 17px; height: 17px; fill: #2b1300; }
.emojis { flex: 1; display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.emojis button { aspect-ratio: 1; padding: 0; border-radius: 12px; border: 1px solid transparent; background: rgba(0, 0, 0, .28); font-size: 21px; line-height: 1; }
.emojis button[aria-checked="true"] { border-color: var(--orange); background: rgba(255, 138, 31, .22); }

.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; cursor: pointer; }
.check input {
  appearance: none; -webkit-appearance: none;
  flex: none; width: 22px; height: 22px; margin: 1px 0 0;
  display: grid; place-items: center;
  border-radius: 7px; border: 2px solid rgba(255, 233, 205, .38);
  background: rgba(0, 0, 0, .25); cursor: pointer;
}
.check input:checked { background: var(--orange); border-color: var(--orange-hi); }
.check input:checked::after { content: ""; width: 6px; height: 11px; border: solid #2b1300; border-width: 0 3px 3px 0; transform: translate(0, -1px) rotate(45deg); }
.error { min-height: 1.3em; margin: -4px 0 -4px; font-size: 14px; color: #ff9bb0; }

/* =====================================================================
   Game
   ===================================================================== */
#app {
  height: 100dvh;
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) 340px;
  background: #8a4d1e var(--wood) center / cover;
}

/* ---------- left rail ---------- */
#rail {
  display: flex; flex-direction: column; align-items: center; gap: 20px;
  padding: 16px 0 14px;
  background: linear-gradient(90deg, rgba(20, 9, 4, .42), rgba(20, 9, 4, 0));
  overflow-y: auto; scrollbar-width: none;
}
#rail::-webkit-scrollbar { display: none; }
.hearts { display: grid; justify-items: center; gap: 0; }
.hearts svg { width: 54px; height: 54px; fill: var(--orange); stroke: #fff; stroke-width: 1.3; stroke-linejoin: round; filter: drop-shadow(0 3px 0 var(--orange-edge)) drop-shadow(0 8px 10px rgba(20, 8, 0, .4)); }
.hearts b { margin-top: 2px; font-size: 18px; font-weight: 700; color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, .7); }
.hearts.bump svg { animation: bump .4s cubic-bezier(.3, 1.6, .5, 1); }
.rbtn {
  position: relative; flex: none;
  width: 54px; height: 54px; padding: 0;
  display: grid; place-items: center;
  border: 0; border-radius: 50%;
  color: #fff;
  background: linear-gradient(var(--orange-hi), var(--orange-lo));
  box-shadow: 0 4px 0 var(--orange-edge), 0 10px 18px rgba(20, 8, 0, .4), inset 0 1px 0 rgba(255, 255, 255, .38);
  transition: transform .08s, box-shadow .08s, filter .15s;
}
.rbtn svg { width: 26px; height: 26px; fill: currentColor; }
.rbtn:hover { filter: brightness(1.07); }
.rbtn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--orange-edge), 0 4px 8px rgba(20, 8, 0, .4), inset 0 1px 0 rgba(255, 255, 255, .38); }
.rbtn[aria-pressed="false"] { filter: saturate(.25) brightness(.85); }
.rbtn .pill {
  position: absolute; left: 50%; bottom: -10px; transform: translateX(-50%);
  padding: 1px 8px; border-radius: 99px;
  background: #fff6e6; color: #5a2a00;
  font-size: 11px; font-weight: 700; white-space: nowrap;
  box-shadow: 0 2px 5px rgba(0, 0, 0, .35);
}
.rbtn .dot { position: absolute; top: -2px; right: -2px; width: 16px; height: 16px; border-radius: 50%; background: var(--lip); border: 2px solid #fff; animation: dotPulse 1.6s ease-in-out infinite; }
#btnSwitch { margin-top: auto; }
.tableno { margin-top: -8px; display: grid; justify-items: center; font-size: 13px; font-weight: 500; line-height: 1.15; color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, .8); }
.tableno b { font-size: 16px; font-weight: 700; }

/* ---------- table ---------- */
#stageWrap { position: relative; min-width: 0; min-height: 0; overflow: hidden; }
#stageWrap::before { /* the lamp */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(closest-side at 50% 50%, rgba(255, 224, 160, .46), rgba(255, 224, 160, .14) 58%, transparent 100%);
}
#stageWrap::after { /* the dark room around it */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at 50% 50%, transparent 46%, rgba(22, 9, 3, .58) 100%);
}
#stage {
  position: absolute; z-index: 1;
  width: 640px; height: 640px;
  transform-origin: 0 0;
  --labelfs: 13px;
}

/* seats */
.seat {
  position: absolute;
  width: 104px; height: 104px; margin: -52px 0 0 -52px;
  padding: 0; border: 0; background: none; color: inherit;
  transform: rotate(var(--tilt, 0deg));
}
.seat .avatar { --s: 104px; position: absolute; inset: 0; box-shadow: 0 0 0 3px #fff4e0, 0 10px 16px rgba(20, 8, 0, .5); transition: transform .2s, box-shadow .2s; }
.seat.empty { pointer-events: none; }
.seat.empty .avatar { background: rgba(255, 240, 220, .06); box-shadow: none; border: 2px dashed rgba(255, 240, 220, .3); }
.seat .label {
  position: absolute; left: 50%; top: 100%; margin-top: 7px; transform: translateX(-50%);
  width: 134px; text-align: center;
  font-size: var(--labelfs); font-weight: 600; color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .95), 0 0 9px rgba(0, 0, 0, .55);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.seat.me .label { color: var(--lamp); }
.seat.me .label::before, .seat.me .label::after { content: "\25C6"; font-size: .7em; margin: 0 5px; opacity: .9; vertical-align: 1px; }
.seat::after { /* pulsing ring, only while it is this seat's turn */
  content: ""; position: absolute; inset: -6px; border-radius: 22px;
  border: 3px solid var(--lamp); opacity: 0; pointer-events: none;
}
.seat.turn .avatar { box-shadow: 0 0 0 4px var(--lamp), 0 0 28px 6px rgba(255, 200, 90, .6), 0 10px 16px rgba(20, 8, 0, .5); }
.seat.turn::after { animation: pulse 1.3s ease-out infinite; }
.seat.pointing .avatar { transform: scale(1.07); box-shadow: 0 0 0 4px #fff, 0 0 30px 8px rgba(255, 255, 255, .6), 0 10px 16px rgba(20, 8, 0, .5); }
.seat.target .avatar { box-shadow: 0 0 0 4px var(--lip), 0 0 30px 8px rgba(229, 37, 77, .6), 0 10px 16px rgba(20, 8, 0, .5); }

.seat .kiss { /* lipstick stamp with the kiss count */
  position: absolute; top: -13px; right: -15px; width: 48px; height: 31px;
  display: none; transform: rotate(9deg);
  filter: drop-shadow(0 3px 3px rgba(0, 0, 0, .45));
}
.seat.has-kiss .kiss { display: block; }
.kiss svg { position: absolute; inset: 0; width: 100%; height: 100%; fill: var(--lip); stroke: #fff; stroke-width: 1.5; stroke-linejoin: round; }
.kiss b { position: absolute; inset: 0; display: grid; place-items: center; padding-top: 1px; font-size: 13px; font-weight: 800; color: #fff; text-shadow: 0 1px 1px rgba(90, 0, 20, .7); }
.seat .gift {
  position: absolute; top: -13px; left: -14px; width: 38px; height: 38px;
  display: none; place-items: center;
  border-radius: 50%; background: #fff8ea; font-size: 22px; line-height: 1;
  box-shadow: 0 3px 8px rgba(0, 0, 0, .45);
}
.seat.has-gift .gift { display: grid; animation: pop .4s cubic-bezier(.3, 1.6, .5, 1); }
.seat .mark {
  position: absolute; right: -7px; bottom: -7px; width: 28px; height: 28px;
  display: none; place-items: center;
  border-radius: 50%; background: #2fb559; color: #fff; font-weight: 800; font-size: 15px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .45);
}
/* no tick on the seat once someone has answered: the kiss card shows each choice */

/* bottle */
#halo {
  position: absolute; left: 320px; top: 320px; width: 250px; height: 250px; margin: -125px 0 0 -125px;
  border-radius: 50%; border: 3px dashed rgba(255, 226, 165, .8);
  opacity: 0; transition: opacity .25s; pointer-events: none;
}
#stage.my-turn #halo { opacity: 1; animation: hint 16s linear infinite; }
#bottleWrap { position: absolute; left: 320px; top: 320px; width: 0; height: 0; filter: drop-shadow(6px 10px 7px rgba(30, 10, 0, .5)); }
#bottle {
  position: absolute; left: -27px; top: -105px; width: 54px; height: 210px;
  padding: 0; border: 0; background: none;
  transform: rotate(20deg); will-change: transform;
  cursor: default; touch-action: manipulation;
}
#bottle svg { width: 100%; height: 100%; }
#bottle:not(:disabled) { cursor: pointer; }
#bottle:not(:disabled)::before { /* generous tap target for thumbs */
  content: ""; position: absolute; left: 50%; top: 50%; width: 250px; height: 250px; transform: translate(-50%, -50%); border-radius: 50%;
}

/* status + prompt */
#status {
  position: absolute; left: 50%; top: 166px; transform: translateX(-50%);
  min-width: 210px; max-width: 330px; padding: 6px 18px 8px;
  text-align: center; font-size: 14.5px; font-weight: 500; line-height: 1.3;
  border-radius: 16px;
  background: rgba(28, 13, 6, .74); backdrop-filter: blur(6px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, .32);
}
.track { height: 3px; margin-top: 5px; overflow: hidden; border-radius: 3px; background: rgba(255, 255, 255, .16); }
.track i { display: block; width: 0; height: 100%; background: var(--lamp); }
#status.mine { background: linear-gradient(var(--orange-hi), var(--orange-lo)); color: #2b1300; font-weight: 700; }
#status.mine .track { background: rgba(43, 19, 0, .2); }
#status.mine .track i { background: #2b1300; }
#status.kissed { background: linear-gradient(#f2456a, var(--lip)); color: #fff; font-weight: 700; }
#status.dim { color: var(--ink-dim); }

#prompt {
  position: absolute; left: 50%; top: 330px; width: 280px; transform: translateX(-50%);
  padding: 14px 16px 14px; text-align: center;
  border-radius: 22px;
  background: rgba(28, 13, 6, .94); border: 1px solid rgba(255, 233, 205, .18);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .55);
  animation: rise .28s cubic-bezier(.2, .9, .3, 1.2);
}
#prompt .pair { display: flex; align-items: center; justify-content: center; gap: 12px; }
#prompt .tile { --s: 46px; box-shadow: 0 0 0 2px #fff4e0; }
#prompt .lips { font-size: 28px; }
#promptText { margin: 8px 0 10px; font: 400 22px/1.15 var(--font-display); color: #fff1d6; overflow-wrap: anywhere; }
#prompt .actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
#prompt .actions button { padding: 11px 10px; font-size: 16px; }
#prompt .track { margin-top: 12px; }

/* effects layer */
#fx { position: absolute; inset: 0; pointer-events: none; z-index: 5; overflow: visible; }
.fx-emoji { position: absolute; left: 0; top: 0; line-height: 1; font-size: 34px; will-change: transform, opacity; }
.fx-plus { position: absolute; left: 0; top: 0; font: 400 26px/1 var(--font-display); color: #fff; text-shadow: 0 2px 0 var(--lip), 0 4px 12px rgba(0, 0, 0, .5); white-space: nowrap; }
#net {
  position: absolute; z-index: 6; top: 12px; left: 50%; transform: translateX(-50%);
  padding: 8px 16px; border-radius: 999px;
  background: var(--lip); color: #fff; font-size: 14px; font-weight: 600;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .4);
}

/* ---------- chat ---------- */
#chat { display: flex; flex-direction: column; min-height: 0; background: var(--walnut-900); border-left: 1px solid var(--line); }
.chat-head { display: flex; justify-content: space-between; align-items: baseline; padding: 13px 16px 11px; border-bottom: 1px solid var(--line); }
.chat-head b { font-weight: 600; }
.chat-head small { color: var(--ink-dim); font-size: 12.5px; }
#chatList { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 8px; padding: 12px; scrollbar-width: thin; scrollbar-color: rgba(255, 233, 205, .25) transparent; }
.msg { display: flex; gap: 8px; align-items: flex-start; }
.mav { --s: 32px; }
.bubble { min-width: 0; max-width: calc(100% - 42px); padding: 6px 11px 7px; border-radius: 4px 14px 14px 14px; background: var(--walnut-700); overflow-wrap: anywhere; font-size: 14px; line-height: 1.35; }
.msg.mine .bubble { background: #5f3117; }
.mname { padding: 0; border: 0; background: none; font: inherit; font-weight: 600; color: inherit; text-align: left; }
.g-m { color: var(--male); }
.g-f { color: var(--female); }
.g-o { color: var(--other); }
.sys { align-self: center; max-width: 92%; padding: 2px 8px; text-align: center; font-size: 12.5px; color: var(--ink-dim); }
.sys.kiss { color: #ffb3c4; font-weight: 500; }
.sys .g-m, .sys .g-f, .sys .g-o { font-weight: 600; }
#chatForm { display: flex; gap: 8px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
#chatInput { flex: 1; min-width: 0; padding: 10px 16px; border: 1px solid var(--line); border-radius: 22px; background: rgba(0, 0, 0, .3); color: var(--ink); font: inherit; font-size: 16px; outline: none; }
#chatInput:focus { border-color: var(--orange); }
#chatInput::placeholder { color: rgba(205, 181, 157, .7); }
#chatForm button { flex: none; width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 50%; background: linear-gradient(var(--orange-hi), var(--orange-lo)); color: #fff; box-shadow: 0 3px 0 var(--orange-edge); }
#chatForm button:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--orange-edge); }
#chatForm svg { width: 22px; height: 22px; fill: currentColor; margin-left: 2px; }

/* ---------- toast ---------- */
#toast {
  position: fixed; z-index: 60; left: 50%; top: max(14px, env(safe-area-inset-top));
  max-width: min(92vw, 460px); padding: 10px 20px;
  transform: translate(-50%, -160%); opacity: 0; pointer-events: none;
  border-radius: 999px; background: #fff3df; color: #2b1300; text-align: center; font-weight: 600;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .4);
  transition: transform .3s cubic-bezier(.2, .9, .3, 1.2), opacity .2s;
}
#toast.show { transform: translate(-50%, 0); opacity: 1; }

/* ---------- dialogs ---------- */
dialog { width: min(440px, 92vw); max-width: none; max-height: none; margin: auto; padding: 0; border: 0; background: transparent; color: var(--ink); overflow: visible; }
dialog::backdrop { background: rgba(14, 6, 2, .72); backdrop-filter: blur(4px); }
dialog[open] .dlg-body { animation: dlgIn .24s cubic-bezier(.2, .9, .3, 1.1); }
.dlg-body { max-height: 88dvh; overflow: auto; padding: 26px 24px 24px; border-radius: 26px; background: var(--walnut-800); border: 1px solid var(--line); box-shadow: 0 30px 80px rgba(0, 0, 0, .6); }
.dlg-x { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(255, 233, 205, .1); color: var(--ink); }
.dlg-x svg { width: 20px; height: 20px; fill: currentColor; }
.dlg-body h2 { margin: 0 34px 4px 0; font: 400 30px/1.1 var(--font-display); color: #fff1d6; }
.dlg-body p { margin: 8px 0 0; }
.dlg-body .cta { margin-top: 18px; width: 100%; }

.pc-top { display: flex; gap: 16px; align-items: center; margin-bottom: 16px; padding-right: 34px; }
.pc-top .tile { --s: 84px; box-shadow: 0 0 0 3px #fff4e0, 0 8px 14px rgba(0, 0, 0, .4); }
.pc-top h2 { margin: 0; font: 700 22px/1.15 var(--font-ui); overflow-wrap: anywhere; }
.pc-top p { margin: 3px 0 0; color: var(--ink-dim); font-size: 14px; }
.sect { margin: 0 0 6px; font-size: 13px; font-weight: 500; color: var(--ink-dim); }
.gifts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 16px; }
.gbtn { display: grid; justify-items: center; gap: 2px; padding: 10px 4px 8px; border: 1px solid var(--line); border-radius: 16px; background: rgba(0, 0, 0, .22); font-size: 28px; line-height: 1.1; }
.gbtn small { font-size: 13px; font-weight: 600; color: var(--ink-dim); }
.gbtn:disabled { opacity: .38; cursor: not-allowed; }
.gbtn:not(:disabled):hover { border-color: var(--orange); background: rgba(255, 138, 31, .14); }
.pc-actions { display: flex; gap: 8px; }
.chip { flex: 1; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 233, 205, .06); font-weight: 500; }
.chip:hover { background: rgba(255, 233, 205, .12); }
.chip.danger { color: #ff9bb0; }

.top { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 6px; }
.top li { display: grid; grid-template-columns: 26px 38px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 6px 12px 6px 6px; border-radius: 14px; background: rgba(0, 0, 0, .2); }
.top li.me { background: rgba(255, 138, 31, .16); box-shadow: inset 0 0 0 1px rgba(255, 138, 31, .5); }
.top .rank { text-align: center; font-weight: 700; color: var(--ink-dim); }
.top li:nth-child(1) .rank { color: #ffd45f; }
.top .tile { --s: 38px; }
.top .who { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.top .who small { margin-left: 6px; font-weight: 400; color: var(--ink-dim); }
.top .kc { display: flex; gap: 6px; align-items: center; font-weight: 700; }
.top .kc svg { width: 21px; height: 13px; fill: var(--lip); }
.empty-note { margin: 16px 0 4px; color: var(--ink-dim); }

.steps { counter-reset: s; list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 14px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 34px 1fr; gap: 12px; align-items: start; }
.steps li::before { content: counter(s); width: 34px; height: 34px; border-radius: 50%; background: var(--orange); color: #2b1300; font: 400 18px/34px var(--font-display); text-align: center; }
.fine { margin-top: 16px !important; font-size: 13px; color: var(--ink-dim); }

/* ---------- motion ---------- */
@keyframes introSpin { from { transform: rotate(-696deg); } to { transform: rotate(24deg); } }
@keyframes pop { from { transform: scale(.3); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes rise { from { transform: translate(-50%, 14px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }
@keyframes pulse { from { transform: scale(1); opacity: .95; } to { transform: scale(1.2); opacity: 0; } }
@keyframes hint { to { transform: rotate(360deg); } }
@keyframes bump { 40% { transform: scale(1.25); } }
@keyframes dotPulse { 50% { transform: scale(1.18); } }
@keyframes dlgIn { from { transform: translateY(12px) scale(.97); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .logo-bottle svg, .seat::after, #stage.my-turn #halo, .rbtn .dot, .hearts.bump svg { animation: none !important; }
}

/* ---------- responsive ---------- */
@media (max-width: 1100px) and (orientation: landscape) {
  #app { grid-template-columns: 78px minmax(0, 1fr) 280px; }
  .rbtn { width: 46px; height: 46px; }
  .rbtn svg { width: 23px; height: 23px; }
  .hearts svg { width: 44px; height: 44px; }
}
@media (max-height: 520px) and (orientation: landscape) {
  #rail { gap: 12px; padding: 8px 0; }
  .rbtn { width: 40px; height: 40px; }
  .rbtn svg { width: 20px; height: 20px; }
  .hearts svg { width: 34px; height: 34px; }
  .hearts b { font-size: 15px; }
}
@media (max-width: 900px) and (orientation: portrait) {
  /* minmax(0, ...) so a wide button row can never stretch the page past the screen */
  #app { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) minmax(170px, 36dvh); }
  #rail { flex-direction: row; justify-content: space-between; gap: 14px 4px; flex-wrap: wrap; align-items: center; min-width: 0; padding: max(8px, env(safe-area-inset-top)) 8px 16px; background: linear-gradient(rgba(20, 9, 4, .5), rgba(20, 9, 4, 0)); overflow: visible; }
  .hearts { grid-auto-flow: column; align-items: center; gap: 6px; }
  .hearts svg { width: 34px; height: 34px; }
  .hearts b { margin: 0; font-size: 17px; }
  .rbtn { width: clamp(34px, 9.6vw, 42px); height: clamp(34px, 9.6vw, 42px); }
  .rbtn svg { width: 20px; height: 20px; }
  #btnSwitch { margin-top: 0; }
  .tableno { display: none; }
  #chat { border-left: 0; border-top: 1px solid var(--line); }
  .login-inner { grid-template-columns: minmax(0, 1fr); }
  .logo-bottle { width: min(190px, 44vw); }
  .hero h1 { font-size: clamp(40px, 12vw, 58px); }
  .hero p { font-size: 16px; }
}
@media (max-width: 720px) {
  .login-inner { grid-template-columns: minmax(0, 1fr); }
  .login-card { padding: 20px; }
}

/* =====================================================================
   v2: Google sign-in, roles, room shop, shared song
   ===================================================================== */

/* ---------- sign in ---------- */
.signin-lede { margin: 0 0 4px; font: 400 26px/1.15 var(--font-display); color: #fff1d6; text-align: center; }
.google-btn-slot { min-height: 44px; display: grid; justify-items: center; align-items: center; }
.google-btn-slot > div { max-width: 100%; }
.center { text-align: center; }
.login-card .fine { margin-top: 0 !important; }
.login-card > .error { text-align: center; margin: 0; }
.onboard-inner .login-card { gap: 16px; }
.look-choices { flex: 1; min-width: 0; display: grid; gap: 8px; }
.look-choices .chip { flex: none; }
.photo-preview { --s: 120px; margin: 16px auto 4px; box-shadow: 0 0 0 3px #fff4e0, 0 8px 16px rgba(0, 0, 0, .45); }

/* ---------- roles ---------- */
.seat .role {
  position: absolute; left: -9px; bottom: -9px; width: 28px; height: 28px;
  display: none; place-items: center;
  border-radius: 50%; background: #4aa8ff; border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .45);
}
.seat .role svg { width: 15px; height: 15px; fill: #fff; }
.seat[data-role="moderator"] .role, .seat[data-role="admin"] .role { display: grid; }
.seat[data-role="admin"] .role { background: var(--orange); }
.seat[data-role="admin"] .role svg { fill: #2b1300; }
.rolebadge {
  display: inline-block; margin-left: 4px; padding: 2px 8px; vertical-align: 3px;
  border-radius: 99px; font: 600 11px/1.4 var(--font-ui); letter-spacing: .02em;
  background: #4aa8ff; color: #04223f;
}
.rolebadge.role-admin { background: var(--orange); color: #2b1300; }
.admin-link { text-decoration: none; }

/* ---------- table surfaces (set by the server's background id) ---------- */
#app:has(#stage[data-bg="midnight"]) { background: #1a2a6c var(--wood) center / cover; background-blend-mode: luminosity; }
#app:has(#stage[data-bg="rosegold"]) { background: #e49a8a var(--wood) center / cover; background-blend-mode: luminosity; }
#app:has(#stage[data-bg="forest"])   { background: #1f6b43 var(--wood) center / cover; background-blend-mode: luminosity; }
#app:has(#stage[data-bg="neon"])     { background: #7b1fd4 var(--wood) center / cover; background-blend-mode: luminosity; }
#app:has(#stage[data-bg="neon"]) #stageWrap::before {
  background: radial-gradient(closest-side at 50% 50%, rgba(255, 70, 220, .5), rgba(60, 220, 255, .16) 58%, transparent 100%);
}
#app:has(#stage[data-bg="midnight"]) #stageWrap::before {
  background: radial-gradient(closest-side at 50% 50%, rgba(150, 190, 255, .4), rgba(150, 190, 255, .1) 58%, transparent 100%);
}
#app { transition: background-color .5s; }

/* ---------- bottle skins: one SVG, recoloured ---------- */
#bottle[data-skin="wine"] svg  { filter: hue-rotate(228deg) saturate(1.5) brightness(.8); }
#bottle[data-skin="gold"] svg  { filter: hue-rotate(-82deg) saturate(2.2) brightness(1.25); }
#bottle[data-skin="disco"] svg { animation: disco 3s linear infinite; }
@keyframes disco { to { filter: hue-rotate(360deg) saturate(1.8) brightness(1.15); } from { filter: hue-rotate(0deg) saturate(1.8) brightness(1.15); } }

/* ---------- room shop ---------- */
.shop h2 { margin-bottom: 6px; }
.shop .fine { margin: 6px 0 14px !important; }
.shop .sect { margin: 16px 0 8px; }
.shopgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.shopitem {
  display: grid; justify-items: center; gap: 3px; padding: 10px 6px 9px;
  border: 1px solid var(--line); border-radius: 16px; background: rgba(0, 0, 0, .22);
}
.shopitem b { font-size: 14px; font-weight: 600; }
.shopitem small { font-size: 12.5px; font-weight: 600; color: var(--ink-dim); }
.shopitem:not(:disabled):hover { border-color: var(--orange); background: rgba(255, 138, 31, .14); }
.shopitem:disabled { cursor: not-allowed; opacity: .45; }
.shopitem.active { opacity: 1; border-color: var(--orange); background: rgba(255, 138, 31, .2); }
.shopitem.active small { color: var(--lamp); }
.swatch { width: 100%; height: 44px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .2); display: block; margin-bottom: 4px; }
.swatch-bg-walnut   { background: #8a4d1e var(--wood) center / cover; }
.swatch-bg-midnight { background: #1a2a6c var(--wood) center / cover; background-blend-mode: luminosity; }
.swatch-bg-rosegold { background: #e49a8a var(--wood) center / cover; background-blend-mode: luminosity; }
.swatch-bg-forest   { background: #1f6b43 var(--wood) center / cover; background-blend-mode: luminosity; }
.swatch-bg-neon     { background: #7b1fd4 var(--wood) center / cover; background-blend-mode: luminosity; }
.swatch[class*="swatch-bottle-"] { background: rgba(0, 0, 0, .3) no-repeat center / auto 38px; position: relative; }
.swatch[class*="swatch-bottle-"]::before { content: ""; position: absolute; left: 50%; top: 50%; width: 14px; height: 34px; margin: -17px 0 0 -7px; border-radius: 5px 5px 4px 4px; transform: rotate(20deg); }
.swatch-bottle-classic::before { background: linear-gradient(90deg, #1f8a3d, #4cd06a, #1f8a3d); }
.swatch-bottle-wine::before    { background: linear-gradient(90deg, #5a0f22, #b0264a, #5a0f22); }
.swatch-bottle-gold::before    { background: linear-gradient(90deg, #a87b10, #ffd86b, #a87b10); }
.swatch-bottle-disco::before   { background: linear-gradient(180deg, #ff4fd8, #4fd8ff, #ffe34f); }
.shopsong { display: grid; gap: 10px; }
.shopsong input {
  width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line);
  background: rgba(0, 0, 0, .3); color: var(--ink); font: inherit;
}
.shopsong input:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px rgba(255, 138, 31, .25); }
.shopsong .cta { margin-top: 0; }

/* ---------- shared song ---------- */
#nowPlaying {
  position: absolute; left: 50%; top: 10px; transform: translateX(-50%); z-index: 4;
  display: flex; align-items: center; gap: 10px; max-width: 360px; padding: 6px 12px 6px 6px;
  border-radius: 16px; background: rgba(28, 13, 6, .82); backdrop-filter: blur(6px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, .35); font-size: 13px;
}
#ytPlayer, #nowPlaying iframe { width: 64px; height: 36px; border-radius: 8px; overflow: hidden; border: 0; flex: none; background: #000; }
#npTap { padding: 7px 12px; border: 0; border-radius: 10px; background: var(--orange); color: #2b1300; font-weight: 700; }
.np-info { display: grid; min-width: 0; }
.np-info small { color: var(--ink-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- warning from staff ---------- */
.warnbox h2 { color: #ffd0a0; }
.warnbox p { padding: 12px 14px; border-radius: 14px; background: rgba(229, 37, 77, .16); border: 1px solid rgba(229, 37, 77, .4); overflow-wrap: anywhere; }

@media (prefers-reduced-motion: reduce) { #bottle[data-skin="disco"] svg { animation: none; filter: hue-rotate(60deg) saturate(1.8); } }

/* =====================================================================
   v3: onboarding, gifts and bully items, screen effects, image looks,
   song queue
   ===================================================================== */

/* ---------- onboarding ---------- */
.ob-who { display: grid; justify-items: center; gap: 4px; text-align: center; }
.ob-who .photo-preview { margin: 4px auto 6px; }
.ob-gender { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 4px; }
.ob-gender .cta { margin: 0; font-size: 18px; padding: 15px 10px; }
.ob-gender [data-gender="m"] { background: #4aa8ff; color: #041b33; box-shadow: 0 4px 0 #2a78c4; }
.ob-gender [data-gender="f"] { background: #ff6f9c; color: #3a0717; box-shadow: 0 4px 0 #c94371; }
.ob-gender .cta:disabled { opacity: .6; }

/* ---------- picture looks ---------- */
#app:has(#stage[data-bg="image"]) { background: #1a0d06 var(--room-img) center / cover no-repeat; }
#bottle .bottle-img { display: none; position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
#bottle[data-skin="image"] svg { display: none; }
#bottle[data-skin="image"] .bottle-img { display: block; }
.swatch-bg-image { background: #2a1408 center / cover no-repeat; }
.swatch[class*="swatch-bottle-image"] { background: rgba(0, 0, 0, .3) center / contain no-repeat; }
.swatch[class*="swatch-bottle-image"]::before { display: none; }
.shopcustom { display: grid; gap: 4px; margin-top: 10px; padding: 12px; border-radius: 16px; border: 1px dashed rgba(255, 233, 205, .28); background: rgba(0, 0, 0, .18); }
.shopcustom b { font-size: 15px; }
.shopcustom small { color: var(--ink-dim); font-size: 13px; }
.shopcustom .chip { margin-top: 6px; justify-self: start; flex: none; }
.staff-look:not(:empty) { margin-top: 10px; display: flex; }
.staff-look .chip { flex: none; }

/* ---------- profile card: Gift / Bully ---------- */
.pc-big { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 4px 0 14px; }
.bigbtn {
  display: grid; justify-items: center; gap: 4px; padding: 14px 8px 12px;
  border: 0; border-radius: 18px; font-size: 34px; line-height: 1;
  box-shadow: 0 4px 0 rgba(0, 0, 0, .28);
  transition: transform .12s;
}
.bigbtn b { font-size: 16px; font-weight: 700; }
.bigbtn:active { transform: translateY(2px); box-shadow: 0 2px 0 rgba(0, 0, 0, .28); }
.gift-btn { background: linear-gradient(160deg, #ff8fb1, #e84d7f); color: #3a0717; }
.bully-btn { background: linear-gradient(160deg, #ffb357, #e5532d); color: #2e0d00; }
.items-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.items-head h2 { margin: 0; font-size: 22px; line-height: 1.15; }
.chip.back { flex: none; padding: 8px 12px; }
.itemgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ibtn {
  display: grid; justify-items: center; gap: 3px; padding: 12px 4px 9px; min-width: 0;
  border: 1px solid var(--line); border-radius: 16px; background: rgba(0, 0, 0, .22);
}
.ibtn .ie { font-size: 32px; line-height: 1.1; }
.ibtn b { font-size: 12.5px; font-weight: 600; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ibtn small { font-size: 12.5px; font-weight: 600; color: var(--ink-dim); }
.ibtn:disabled { opacity: .38; cursor: not-allowed; }
.ibtn:not(:disabled):hover { border-color: var(--orange); background: rgba(255, 138, 31, .14); }
.items-bully .ibtn:not(:disabled):hover { border-color: #ff6a3d; background: rgba(229, 83, 45, .18); }

/* ---------- throws ---------- */
.fx-drop { position: absolute; border-radius: 50%; will-change: transform, opacity; }
.seat.hit .avatar { animation: seatHit .6s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes seatHit {
  0% { transform: translate(0, 0) rotate(0); }
  20% { transform: translate(-7px, 3px) rotate(-6deg) scale(.94); }
  40% { transform: translate(6px, -2px) rotate(5deg); }
  60% { transform: translate(-4px, 1px) rotate(-3deg); }
  100% { transform: translate(0, 0) rotate(0); }
}
.sys.item-gift { color: #ffc2d4; }
.sys.item-bully { color: #ffb38a; }

/* ---------- full-screen effects on the receiver's screen ---------- */
#splat { position: fixed; inset: 0; z-index: 55; pointer-events: none; overflow: hidden; }
.splat-layer { position: absolute; inset: 0; transition: opacity var(--fade, 1200ms) ease-in; }
.splat-layer.fading { opacity: 0; }
.splat-blob {
  position: absolute; height: auto; overflow: visible;
  transform: translate(-50%, -30%);
  animation: splatIn .26s var(--delay, 0ms) cubic-bezier(.2, 1.5, .4, 1) both;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .35));
}
.splat-blob .drip { transform-box: fill-box; transform-origin: top; animation: drip var(--dur, 10s) .3s ease-in forwards; }
@keyframes splatIn {
  from { transform: translate(-50%, -30%) scale(.15); opacity: .4; }
  to { transform: translate(-50%, -30%) scale(1); opacity: .96; }
}
@keyframes drip { from { transform: translateY(0); } to { transform: translateY(45px); } }

.water-sheet {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(190, 230, 255, .35), transparent 60%),
    radial-gradient(ellipse at 75% 70%, rgba(120, 190, 255, .3), transparent 55%),
    rgba(90, 170, 240, .16);
  backdrop-filter: blur(.8px) saturate(1.2);
  animation: waterIn .3s ease-out both;
}
@keyframes waterIn { from { opacity: 0; transform: scale(1.04); } to { opacity: 1; transform: none; } }
.water-drop {
  position: absolute; border-radius: 50% 50% 48% 48% / 58% 58% 42% 42%;
  background: radial-gradient(circle at 34% 28%, rgba(255, 255, 255, .95) 0 10%, rgba(200, 235, 255, .55) 26%, rgba(90, 165, 235, .32) 68%, rgba(60, 130, 210, .45) 100%);
  box-shadow: inset -2px -3px 4px rgba(20, 70, 140, .35), 0 2px 3px rgba(0, 30, 70, .25);
  backdrop-filter: blur(1.2px) brightness(1.15);
  animation: dropSlide var(--dur, 10s) ease-in forwards;
}
@keyframes dropSlide { from { transform: translateY(0); } to { transform: translateY(var(--slide, 12vh)); } }
.water-streak {
  position: absolute; width: .7vmin; border-radius: 1vmin;
  background: linear-gradient(rgba(200, 235, 255, 0), rgba(200, 235, 255, .55) 30%, rgba(120, 190, 255, .35));
  transform-origin: top; animation: streak 1.4s ease-out both;
}
@keyframes streak { from { transform: scaleY(0); } to { transform: scaleY(1); } }

.float-heart, .twinkle { position: absolute; line-height: 1; animation-fill-mode: both; animation-iteration-count: infinite; }
.float-heart { animation-name: floatUp; animation-timing-function: ease-out; }
.twinkle { animation-name: twinkle; animation-timing-function: ease-in-out; }
@keyframes floatUp {
  from { transform: translateY(0) scale(.6) rotate(-10deg); opacity: 0; }
  20% { opacity: 1; }
  to { transform: translateY(-80vh) scale(1.1) rotate(12deg); opacity: 0; }
}
@keyframes twinkle {
  0%, 100% { transform: scale(.2) rotate(0); opacity: 0; }
  50% { transform: scale(1) rotate(45deg); opacity: 1; }
}

/* ---------- song bar and queue ---------- */
#nowPlaying { max-width: min(420px, 92%); }
.np-info { flex: 1; }
.np-info small:first-child { color: var(--ink); font-weight: 600; }
.np-btn { flex: none; padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255, 233, 205, .08); font-size: 13px; }
.np-btn b { display: inline-grid; place-items: center; min-width: 20px; height: 20px; margin-left: 4px; padding: 0 5px; border-radius: 99px; background: var(--orange); color: #2b1300; font-size: 12px; }
.queuebox .sect { margin: 14px 0 8px; }
.qrow { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 6px; border-radius: 14px; background: rgba(0, 0, 0, .2); margin-bottom: 6px; }
.qthumb { width: 64px; height: 48px; object-fit: cover; border-radius: 8px; background: #000; }
.qinfo { display: grid; min-width: 0; }
.qinfo b { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qinfo small { color: var(--ink-dim); font-size: 12.5px; }
.qrow .chip { flex: none; padding: 7px 10px; font-size: 13px; }
.chip.pay { background: var(--orange); color: #2b1300; border-color: transparent; font-weight: 700; }
.queuebox .pc-actions { margin-top: 12px; }

@media (prefers-reduced-motion: reduce) {
  .splat-blob, .splat-blob .drip, .water-drop, .water-streak, .water-sheet { animation: none; }
  .float-heart, .twinkle { animation-iteration-count: 1; }
}

/* =====================================================================
   v4: staff entry, onboarding photo, tables, requests, music, effects
   ===================================================================== */

/* bigger dialogs for the shop, music and tables on large screens */
dialog:has(.shop), dialog:has(.musicbox), dialog:has(.tablesbox) { width: min(560px, 94vw); }
@media (min-width: 1100px) and (min-height: 700px) {
  dialog:has(.shop) { width: min(860px, 80vw); }
  dialog:has(.musicbox), dialog:has(.tablesbox) { width: min(640px, 70vw); }
  .shop .shopgrid { grid-template-columns: repeat(5, 1fr); }
  .shop .swatch { height: 64px; }
  .shopitem { padding: 12px 8px 10px; }
}
dialog:has(.shop) .dlg-body, dialog:has(.musicbox) .dlg-body, dialog:has(.tablesbox) .dlg-body { max-height: min(86vh, 900px); overflow-y: auto; }

/* onboarding photo + staff entry */
.ob-photo-acts { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.ob-photo-acts .chip { flex: none; padding: 8px 12px; font-size: 14px; }
.ob-who .emojis, .entry-under .emojis { justify-content: center; }
.ob-who .emojis { width: 100%; max-width: 330px; }
.kiss-stamp { opacity: .92; }
.entry-self { display: grid; grid-template-columns: 56px 1fr; gap: 6px 12px; align-items: center; padding: 12px; border-radius: 16px; background: rgba(0, 0, 0, .22); }
.entry-self .tile { --s: 56px; }
.entry-self b { display: block; font-size: 17px; }
.entry-self small { color: var(--ink-dim); }
.entry-self .cta { grid-column: 1 / -1; margin: 6px 0 0; }
.entry-under { display: grid; gap: 10px; }
.entry-row { display: grid; grid-template-columns: 64px 1fr; gap: 12px; align-items: center; }
.entry-row .tile { --s: 64px; }
.entry-name { display: grid; gap: 4px; font-size: 13px; color: var(--ink-dim); }
.entry-name input {
  padding: 11px 12px; border-radius: 12px; border: 1px solid var(--line); background: rgba(0, 0, 0, .3); color: var(--ink); font: inherit; font-size: 16px;
}
.entry-name input:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px rgba(255, 138, 31, .25); }
.entry-under .cta { margin: 4px 0 0; background: #2b2b3a; color: #fff; box-shadow: 0 4px 0 #15151f; }

/* music dialog */
.musicbox .sect { margin: 14px 0 8px; }
.musicbox .shopsong { margin-top: 6px; }

/* tables list */
.tlist { display: grid; gap: 6px; margin-top: 8px; }
.trow { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 14px; background: rgba(0, 0, 0, .2); border: 1px solid transparent; }
.trow.here { border-color: var(--orange); }
.trow.private { background: rgba(120, 60, 200, .16); }
.tname { display: grid; min-width: 0; }
.tname b { display: flex; align-items: center; gap: 6px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tname small { color: var(--ink-dim); font-size: 13px; }
.lock svg { width: 15px; height: 15px; fill: #c9a7ff; display: block; }
.trow .chip { flex: none; padding: 8px 12px; font-size: 14px; }
.trow .tag { font-size: 13px; color: var(--ink-dim); padding: 0 6px; }
.tcreate { margin-top: 14px; padding-top: 4px; border-top: 1px solid var(--line); }
.tcreate .sect { margin: 12px 0 4px; }
.tcreate-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 8px; }
.tcreate-row input { padding: 11px 12px; border-radius: 12px; border: 1px solid var(--line); background: rgba(0, 0, 0, .3); color: var(--ink); font: inherit; }
.tcreate-row .cta { margin: 0; width: auto; padding: 11px 18px; }

/* join requests (staff at a private table) */
#requests {
  position: absolute; right: 12px; top: 64px; z-index: 7; width: min(300px, calc(100% - 24px));
  display: grid; gap: 6px; padding: 12px; border-radius: 16px;
  background: rgba(28, 13, 6, .92); border: 1px solid rgba(201, 167, 255, .5); box-shadow: 0 10px 24px rgba(0, 0, 0, .45);
  animation: dlgIn .24s cubic-bezier(.2, .9, .3, 1.1);
}
.rq-title { font-size: 14px; color: #d9c4ff; }
.rq { display: grid; grid-template-columns: 34px 1fr auto auto; gap: 6px; align-items: center; }
.rq .tile { --s: 34px; }
.rq-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rq .chip { flex: none; padding: 6px 10px; font-size: 13px; }

/* screen effects: big kiss and giant emoji */
.kiss-stamp {
  position: absolute; line-height: 1; transform: translate(-50%, -50%) rotate(var(--rot));
  animation: stamp .45s cubic-bezier(.2, 1.6, .4, 1) both; filter: drop-shadow(0 6px 12px rgba(120, 0, 40, .35));
}
@keyframes stamp {
  from { transform: translate(-50%, -50%) rotate(var(--rot)) scale(2.4); opacity: 0; }
  to { transform: translate(-50%, -50%) rotate(var(--rot)) scale(1); opacity: .95; }
}
.giant-emoji {
  position: absolute; left: 50%; top: 48%; font-size: min(62vmin, 520px); line-height: 1;
  transform: translate(-50%, -50%);
  animation: giantIn .5s cubic-bezier(.2, 1.6, .4, 1) both, giantShake .9s .5s ease-in-out infinite;
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, .45));
}
@keyframes giantIn { from { transform: translate(-50%, -50%) scale(.1) rotate(-30deg); opacity: 0; } to { transform: translate(-50%, -50%) scale(1); opacity: 1; } }
@keyframes giantShake {
  0%, 100% { transform: translate(-50%, -50%) rotate(0) scale(1); }
  20% { transform: translate(-52%, -54%) rotate(-8deg) scale(1.06); }
  40% { transform: translate(-48%, -50%) rotate(7deg) scale(.97); }
  60% { transform: translate(-51%, -55%) rotate(-5deg) scale(1.05); }
  80% { transform: translate(-49%, -50%) rotate(4deg) scale(.99); }
}
.giant-mini { position: absolute; line-height: 1; animation: floatUp 2.6s ease-out infinite both; }

@media (prefers-reduced-motion: reduce) {
  .giant-emoji { animation: giantIn .01s both; }
  .kiss-stamp { animation-duration: .01s; }
}

/* =====================================================================
   v5: picture items, masks, egg / blood / stench effects
   ===================================================================== */

/* an uploaded item picture behaves like an emoji: one line tall */
.glyph-img { width: 1em; height: 1em; object-fit: contain; vertical-align: -0.12em; display: inline-block; }
.chat-glyph { display: inline-block; width: 1.25em; text-align: center; }
.ibtn .ie .glyph-img { width: 32px; height: 32px; }

/* masks worn on a player's photo */
.seat .mask {
  position: absolute; inset: 0; z-index: 2; display: none; place-items: center;
  font-size: 92px; line-height: 1; pointer-events: none;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .45));
}
.seat .mask .glyph-img { width: 92px; height: 92px; }
.seat.has-mask .mask { display: grid; animation: maskOn .45s cubic-bezier(.2, 1.5, .4, 1); }
@keyframes maskOn { from { transform: translateY(-40px) scale(1.4) rotate(-12deg); opacity: 0; } to { transform: none; opacity: 1; } }

/* dripping blood */
.blood-top {
  position: absolute; left: 0; right: 0; top: 0; height: 9vh;
  background: linear-gradient(#6e0505, #a80c0c 70%, rgba(168, 12, 12, 0));
  animation: waterIn .3s ease-out both;
}
.blood-drip {
  position: absolute; top: 4vh; height: var(--len); border-radius: 0 0 99px 99px;
  background: linear-gradient(90deg, #7d0606, #c3150f 45%, #8a0808);
  transform-origin: top; animation: bloodRun ease-in both;
  box-shadow: inset -2px 0 3px rgba(0, 0, 0, .25);
}
.blood-drip::after {
  content: ""; position: absolute; left: 50%; bottom: -0.6em; width: 160%; aspect-ratio: 1; transform: translateX(-50%);
  border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%; background: #b0100c;
}
@keyframes bloodRun { from { transform: scaleY(0); } to { transform: scaleY(1); } }

/* stench lines and flies */
.stink-haze { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 80%, rgba(120, 160, 40, .28), rgba(90, 120, 30, .12) 60%, transparent 85%); animation: waterIn .4s ease-out both; }
.stink-line { position: absolute; width: auto; opacity: 0; animation: stinkRise ease-in-out infinite; filter: blur(.5px); }
@keyframes stinkRise {
  0% { transform: translateY(0) scaleX(1); opacity: 0; }
  25% { opacity: .85; }
  60% { transform: translateY(-14vh) scaleX(-1); opacity: .7; }
  100% { transform: translateY(-28vh) scaleX(1); opacity: 0; }
}
.fly {
  position: absolute; font-size: 5.5vmin; line-height: 1;
  animation-name: flyAbout, flyJitter; animation-timing-function: ease-in-out, steps(2); animation-iteration-count: infinite, infinite; animation-direction: alternate, normal;
}
@keyframes flyAbout { from { translate: 0 0; } to { translate: var(--fx) var(--fy); } }
@keyframes flyJitter { 0% { rotate: -12deg; } 100% { rotate: 14deg; } }

@media (prefers-reduced-motion: reduce) {
  .stink-line, .fly, .blood-drip { animation: none; }
  .stink-line { opacity: .7; }
}

/* =====================================================================
   v6: screen effects shown on the receiver's photo too
   ===================================================================== */
.seat .stain { position: absolute; inset: 0; z-index: 3; display: none; pointer-events: none; transition: opacity var(--fade, 1000ms) ease-in; }
.seat.has-stain .stain { display: block; }
.seat .stain.fading { opacity: 0; }
.seat .gift, .seat .kiss, .seat .mark, .seat .role { z-index: 4; }
.stain-clip { position: absolute; inset: 0; overflow: hidden; border-radius: calc(104px * .17); }
.stain-free { position: absolute; inset: 0; overflow: visible; }
/* splats: drips run a little way down the photo, not down the whole screen */
.stain .splat-blob { filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .35)); }
.stain .splat-blob .drip { animation-name: dripTile; }
@keyframes dripTile { from { transform: translateY(0); } to { transform: translateY(16px); } }
.stain .water-sheet { backdrop-filter: none; }
.stain .water-drop { backdrop-filter: none; }
.stain .blood-top { height: 18%; }
.stain .blood-drip { top: 8%; }
.stain .blood-drip::after { bottom: -3px; }
.stain .stink-haze { background: radial-gradient(ellipse at 50% 70%, rgba(120, 160, 40, .45), rgba(90, 120, 30, .2) 65%, transparent 90%); }
.stain .stink-line { transform-origin: bottom; animation-name: stinkRiseTile; filter: drop-shadow(0 0 2px rgba(40, 60, 10, .6)); }
@keyframes stinkRiseTile {
  0% { transform: translateY(0) scaleX(1); opacity: 0; }
  25% { opacity: .9; }
  60% { transform: translateY(-30px) scaleX(-1); opacity: .75; }
  100% { transform: translateY(-60px) scaleX(1); opacity: 0; }
}
.stain .fly { font-size: 18px; margin: -9px 0 0 -9px; }
.stain .kiss-stamp { filter: drop-shadow(0 2px 3px rgba(120, 0, 40, .35)); }
.stain .giant-emoji { top: 50%; font-size: 70px; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .45)); }
.stain .giant-emoji .glyph-img { width: 70px; height: 70px; }
.stain .float-heart { animation-name: floatUpTile; }
@keyframes floatUpTile {
  from { transform: translateY(0) scale(.6) rotate(-10deg); opacity: 0; }
  20% { opacity: 1; }
  to { transform: translateY(-110px) scale(1.1) rotate(12deg); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .stain .splat-blob .drip, .stain .stink-line, .stain .fly, .stain .blood-drip { animation: none; }
  .stain .stink-line { opacity: .7; }
}

/* =====================================================================
   v6: buying hearts
   ===================================================================== */
.hearts { position: relative; padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; border-radius: 16px; }
.hearts:focus-visible { outline: 3px solid var(--lamp); outline-offset: 3px; }
.hearts-plus {
  position: absolute; top: 0; right: -4px; width: 20px; height: 20px; display: grid; place-items: center;
  border-radius: 50%; background: #fff; color: var(--orange-edge); font-style: normal; font-weight: 800; font-size: 16px; line-height: 1;
  box-shadow: 0 2px 4px rgba(0, 0, 0, .35);
}
.hearts:hover svg { transform: scale(1.06); }
@media (max-width: 900px) and (orientation: portrait) { .hearts-plus { position: static; width: 18px; height: 18px; font-size: 14px; } }

.buybox h2 { margin-bottom: 2px; }
.buy-have { margin: 0 0 6px; font-weight: 700; font-size: 17px; color: var(--orange); }
.packs { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; margin: 14px 0 8px; }
.pack {
  position: relative; display: grid; justify-items: center; gap: 2px; padding: 18px 10px 12px;
  border: 1px solid var(--line); border-radius: 18px; background: rgba(255, 233, 205, .06); color: inherit; font: inherit; cursor: pointer;
  transition: transform .15s, background .15s, border-color .15s;
}
.pack:hover:not(:disabled) { transform: translateY(-2px); background: rgba(255, 233, 205, .12); border-color: var(--orange); }
.pack:disabled { cursor: default; opacity: .55; }
.pack.busy { opacity: 1; border-color: var(--orange); }
.pack.tagged { border-color: rgba(255, 160, 60, .7); }
.pack-tag {
  position: absolute; top: -10px; left: 50%; transform: translateX(-50%); white-space: nowrap;
  padding: 3px 9px; border-radius: 99px; background: var(--orange); color: #2b1300; font-size: 11.5px; font-weight: 800;
}
.pack-icon svg { width: 34px; height: 34px; fill: var(--orange); stroke: #fff; stroke-width: 1.3; }
.pack-n { font-size: 22px; font-weight: 800; line-height: 1.1; }
.pack small { color: var(--ink-dim); font-size: 12.5px; margin-top: -2px; }
.pack-price { margin-top: 8px; padding: 6px 14px; border-radius: 99px; background: var(--orange); color: #2b1300; font-weight: 800; font-size: 15px; }
.buy-off { margin: 6px 0 2px; font-weight: 700; color: #ffb38a; }
.buy-free { margin-top: 10px; }

/* the page Stripe returns to (opened in its own tab) */
.paid-page { display: grid; place-items: center; min-height: 100%; padding: 16px; box-sizing: border-box; }
.paid-card { max-width: 420px; text-align: center; padding: 32px 26px; border-radius: 24px; background: rgba(40, 18, 8, .85); border: 1px solid var(--line); box-shadow: 0 20px 50px rgba(0, 0, 0, .45); }
.paid-heart { width: 72px; height: 72px; fill: var(--orange); stroke: #fff; stroke-width: 1.3; filter: drop-shadow(0 3px 0 var(--orange-edge)); }
.paid-card h1 { margin: 12px 0 6px; font-family: var(--font-display); font-weight: 400; font-size: 30px; }
.paid-card p { margin: 0 0 18px; color: var(--ink-dim); line-height: 1.45; }
.paid-card .cta { display: inline-block; text-decoration: none; }
.paid-card .cta[hidden] { display: none; }
.buy-wait { display: grid; justify-items: center; text-align: center; gap: 4px; }
.buy-wait .pack-icon svg { width: 52px; height: 52px; }
.buy-wait .fine { max-width: 340px; margin-bottom: 14px; }
.buy-wait a { text-decoration: none; }
.buy-wait a.chip { color: var(--ink, #f4e3cf); }

/* remembered accounts on the sign-in screen */
.saved-accounts { display: grid; gap: 8px; }
.saved-acct { position: relative; display: flex; align-items: stretch; gap: 0; }
.saved-go {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 10px 44px 10px 10px;
  border: 1px solid var(--line); border-radius: 16px; background: rgba(255, 233, 205, .07); color: inherit; font: inherit; text-align: left; cursor: pointer;
  transition: background .15s, border-color .15s, transform .15s;
}
.saved-go:hover:not(:disabled) { background: rgba(255, 233, 205, .13); border-color: var(--orange); transform: translateY(-1px); }
.saved-go:disabled { opacity: .6; cursor: default; }
.saved-go .tile { --s: 46px; border-radius: 12px; }
.saved-txt { display: grid; min-width: 0; }
.saved-txt b { font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.saved-txt small { color: var(--ink-dim); font-size: 13px; }
.saved-x {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 50%;
  border: 0; background: rgba(255, 233, 205, .1); color: var(--ink-dim); font-size: 20px; line-height: 1; cursor: pointer;
}
.saved-x:hover { background: rgba(255, 120, 90, .25); color: #fff; }
.signin-other { margin: 6px 0 0; text-align: center; color: var(--ink-dim); font-size: 14px; }

/* sign-out choice */
.signout-box { display: grid; gap: 10px; text-align: center; }
.signout-box .fine { margin: 0 0 6px; }

/* =====================================================================
   v7: the kiss card, hats, gift all
   ===================================================================== */
#kissCard {
  position: absolute; left: 50%; top: 50%; z-index: 4; width: 330px; transform: translate(-50%, -50%);
  padding: 12px 14px 14px; text-align: center; border-radius: 26px;
  background: rgb(33, 16, 8); border: 1px solid rgba(255, 233, 205, .18);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .55);
  animation: kcIn .32s cubic-bezier(.2, 1.3, .4, 1);
}
@keyframes kcIn { from { transform: translate(-50%, -46%) scale(.9); opacity: 0; } to { transform: translate(-50%, -50%); opacity: 1; } }
.kc-title { margin: 0 0 4px; min-height: 30px; font: 400 27px/1.1 var(--font-display); color: #fff; text-shadow: 0 2px 0 rgba(0, 0, 0, .35); overflow-wrap: anywhere; }
#kissCard.kissed .kc-title { color: #ff8fb1; }
.kc-pair { position: relative; height: 210px; }
.kc-arrows { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.kc-arc { fill: none; stroke: #86c63f; stroke-width: 7; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100; opacity: 0; filter: drop-shadow(0 2px 0 rgba(0, 0, 0, .35)); }
.kc-arc.on { opacity: 1; animation: kcDraw .55s ease-out forwards; }
@keyframes kcDraw { to { stroke-dashoffset: 0; } }
.kc-p { position: absolute; top: 38px; width: 100px; }
#kcA { left: 18px; }
#kcB { right: 18px; }
.kc-p .tile { --s: 100px; border-radius: 18px; box-shadow: 0 0 0 3px #fff4e0, 0 8px 16px rgba(0, 0, 0, .45); transition: filter .25s, box-shadow .25s; }
.kc-p.said-yes .tile { box-shadow: 0 0 0 4px #86c63f, 0 0 22px rgba(134, 198, 63, .55); }
.kc-p.refused .tile { filter: grayscale(1) brightness(.6); box-shadow: 0 0 0 3px #e5484d; }
.kc-name { display: block; margin-top: 6px; font-weight: 700; font-size: 14px; color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, .9); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kc-count { position: absolute; top: -10px; right: -12px; width: 42px; height: 27px; transform: rotate(9deg); filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .45)); }
.kc-count svg { position: absolute; inset: 0; width: 100%; height: 100%; fill: var(--lip); stroke: #fff; stroke-width: 1.5; }
.kc-count b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 12.5px; font-weight: 800; color: #fff; }
.kc-count[hidden] { display: none; }
.kc-no { position: absolute; left: 0; top: 0; width: 100px; height: 100px; display: none; place-items: center; font-size: 64px; font-weight: 800; color: #ff5a5f; text-shadow: 0 3px 8px rgba(0, 0, 0, .6); animation: pop .3s cubic-bezier(.3, 1.6, .5, 1); }
.kc-p.refused .kc-no { display: grid; }
.kc-timer { position: absolute; left: 50%; top: 90px; transform: translate(-50%, -50%); font-size: 40px; font-weight: 800; line-height: 1; color: #fff; text-shadow: 0 3px 8px rgba(0, 0, 0, .55); }
.kc-medal {
  position: absolute; left: 50%; width: 34px; height: 34px; margin-left: -17px; display: grid; place-items: center;
  border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .4); font-size: 18px; line-height: 1;
  opacity: 0; transform: scale(.3); transition: opacity .25s .3s, transform .35s .3s cubic-bezier(.3, 1.6, .5, 1);
}
#kcMedalA { top: -9px; }
#kcMedalB { top: 185px; }
.kc-medal.on { opacity: 1; transform: none; }
.kc-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 8px; }
.kc-actions[hidden] { display: none; }
.kc-actions button {
  padding: 14px 10px; border: 0; border-radius: 16px; font: inherit; font-weight: 800; font-size: 18px; color: #fff; cursor: pointer;
  box-shadow: 0 4px 0 rgba(0, 0, 0, .3); transition: transform .1s, box-shadow .1s;
}
.kc-actions button:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(0, 0, 0, .3); }
.kc-refuse { background: linear-gradient(#ef4a3b, #d1311f); }
.kc-kiss { background: linear-gradient(#8fd14f, #6fb431); }
@media (prefers-reduced-motion: reduce) { .kc-arc.on { animation: none; stroke-dashoffset: 0; } }

/* hats, worn on top of a player's photo */
.seat .hat {
  position: absolute; left: 50%; top: -46px; z-index: 4; width: 92px; height: 70px; margin-left: -46px;
  display: none; place-items: end center; font-size: 62px; line-height: 1; pointer-events: none;
  filter: drop-shadow(0 4px 4px rgba(0, 0, 0, .4)); transform: rotate(var(--hat-tilt, 0deg)); transform-origin: 50% 100%;
}
.seat .hat .glyph-img { width: 92px; height: 76px; }
.seat.has-hat .hat { display: grid; animation: hatOn .5s cubic-bezier(.25, 1.5, .45, 1); }
@keyframes hatOn { from { transform: translateY(-60px) rotate(-25deg) scale(1.2); opacity: 0; } to { transform: rotate(var(--hat-tilt, 0deg)); opacity: 1; } }
.seat .gift, .seat .kiss, .seat .mark, .seat .role { z-index: 5; }

/* gift menu: one person or everyone */
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin: 0 0 12px; border-radius: 14px; background: rgba(0, 0, 0, .25); }
.seg button { padding: 9px 8px; border: 0; border-radius: 10px; background: none; color: var(--ink-dim); font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seg button.on { background: var(--orange); color: #2b1300; }
.ibtn small.each { font-size: 11px; opacity: .75; margin-top: -2px; }

/* kiss counts: white number on solid red lips, with a dark edge so it always reads */
.kiss b, .kc-count b { color: #fff; text-shadow: 0 1px 0 #7a0a26, 0 0 3px rgba(90, 0, 25, .9); }
.seat .kiss svg, .kc-count svg { fill: #e5254d; stroke: #fff; stroke-width: 1.4; paint-order: stroke; }

/* tipsy: a drink leaves the screen a little soft and swimmy */
.tipsy-blur {
  position: absolute; inset: 0;
  backdrop-filter: blur(1.4px) saturate(1.1);
  -webkit-backdrop-filter: blur(1.4px) saturate(1.1);
  background: radial-gradient(ellipse at 50% 50%, rgba(255, 196, 90, .03), rgba(255, 160, 60, .12) 78%);
  animation: tipsySway 2.6s ease-in-out infinite alternate, waterIn .5s ease-out both;
}
@keyframes tipsySway {
  0% { backdrop-filter: blur(.8px) saturate(1.05); -webkit-backdrop-filter: blur(.8px) saturate(1.05); }
  100% { backdrop-filter: blur(1.9px) saturate(1.15); -webkit-backdrop-filter: blur(1.9px) saturate(1.15); }
}
.tipsy-bubble {
  position: absolute; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, .9), rgba(255, 230, 160, .45) 45%, rgba(255, 200, 90, .2) 70%);
  box-shadow: inset 0 0 2px rgba(255, 255, 255, .7);
  animation: bubbleUp linear infinite both;
}
@keyframes bubbleUp { from { transform: translateY(0); opacity: 0; } 15% { opacity: .9; } to { transform: translateY(-70vh); opacity: 0; } }
.stain .tipsy-blur { backdrop-filter: blur(2.2px) saturate(1.2); -webkit-backdrop-filter: blur(2.2px) saturate(1.2); animation: none; }
.stain .tipsy-bubble { animation-name: bubbleUpTile; animation-duration: 2.2s; }
@keyframes bubbleUpTile { from { transform: translateY(0); opacity: 0; } 20% { opacity: .9; } to { transform: translateY(-90px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .tipsy-blur, .tipsy-bubble { animation: none; } }

/* the song player can't be clicked: no pausing, everyone hears the same moment */
#nowPlaying iframe { pointer-events: none; }

/* staff quick actions on a player's card */
.pc-name { display: flex; align-items: center; gap: 6px; min-width: 0; }
.pc-name h2 { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-pen { flex: none; width: 30px; height: 30px; border: 0; border-radius: 50%; background: rgba(255, 233, 205, .1); font-size: 14px; cursor: pointer; }
.pc-pen:hover { background: rgba(255, 233, 205, .2); }
.pc-staff { display: flex; flex-wrap: wrap; gap: 8px; margin: 2px 0 12px; padding: 10px; border-radius: 14px; background: rgba(74, 168, 255, .1); border: 1px dashed rgba(74, 168, 255, .45); }
.pc-staff .chip { flex: 1; min-width: 80px; }
.staff-box .staff-input { width: 100%; box-sizing: border-box; margin: 6px 0 10px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: rgba(0, 0, 0, .25); color: inherit; font: inherit; font-size: 20px; font-weight: 700; }
.staff-quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 12px; }
.staff-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.staff-ban { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.staff-ban .bigbtn { padding: 16px 8px; }

/* accessories: a drink or snack sits bottom right of the photo, no background */
.seat .refresh {
  position: absolute; right: -16px; bottom: -12px; z-index: 4; width: 52px; height: 52px;
  display: none; place-items: center; font-size: 40px; line-height: 1; pointer-events: none;
  filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .45));
}
.seat .refresh .glyph-img { width: 46px; height: 46px; }
.seat.has-refresh .refresh { display: grid; animation: pop .45s cubic-bezier(.3, 1.6, .5, 1); }
/* the same accessories on the kiss card */
.kc-p .mask, .kc-p .hat, .kc-p .refresh { position: absolute; display: none; place-items: center; pointer-events: none; line-height: 1; }
.kc-p .mask { left: 0; top: 0; width: 100px; height: 100px; font-size: 86px; z-index: 2; filter: drop-shadow(0 3px 5px rgba(0, 0, 0, .4)); }
.kc-p .mask .glyph-img { width: 86px; height: 86px; }
.kc-p .hat { left: 50%; top: -44px; width: 88px; height: 66px; margin-left: -44px; place-items: end center; font-size: 58px; z-index: 3; transform: rotate(var(--hat-tilt, 0deg)); transform-origin: 50% 100%; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .4)); }
.kc-p .hat .glyph-img { width: 88px; height: 72px; }
.kc-p .refresh { right: -14px; top: 64px; width: 48px; height: 48px; font-size: 38px; z-index: 3; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .45)); }
.kc-p .refresh .glyph-img { width: 42px; height: 42px; }
.kc-p.has-mask .mask, .kc-p.has-hat .hat, .kc-p.has-refresh .refresh { display: grid; }
.kc-p .kc-count { z-index: 4; }
/* your own card: what you're wearing */
.treat-btn { width: 100%; margin: -4px 0 12px; display: flex; align-items: center; justify-content: center; gap: 10px; }
.worn { margin: 0 0 12px; }
.worn .sect { margin: 0 0 6px; }
.worn-row { display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 12px; background: rgba(0, 0, 0, .2); margin-bottom: 6px; }
.worn-ic { font-size: 30px; line-height: 1; text-align: center; }
.worn-ic .glyph-img { width: 32px; height: 32px; }
.worn-name { font-weight: 600; }
/* locked items */
.ibtn { position: relative; }
.ibtn.locked .ie { filter: grayscale(1); opacity: .45; }
.ibtn .lock { position: absolute; top: 6px; right: 8px; font-size: 14px; }

/* the song player sits above the chat */
#chat > #nowPlaying {
  position: static; transform: none; max-width: none; width: auto; z-index: auto;
  margin: 10px 10px 0; padding: 8px 10px 8px 8px; border-radius: 14px;
  background: var(--walnut-700, rgba(70, 36, 18, .9)); backdrop-filter: none; box-shadow: none;
}
#chat > #nowPlaying[hidden] { display: none; }
#chat > #nowPlaying .np-info { flex: 1; }

/* the kiss round in the middle: no card background, just the players and their choices */
#kissCard { background: none; border: 0; box-shadow: none; padding-top: 0; }
#kissCard .kc-title { text-shadow: 0 2px 0 rgba(0, 0, 0, .45), 0 0 12px rgba(0, 0, 0, .6); }
#kissCard .kc-title:empty { min-height: 0; margin: 0; }
.kc-timer { text-shadow: 0 2px 0 rgba(0, 0, 0, .5), 0 0 12px rgba(0, 0, 0, .65); }
.kc-arc.no { stroke: #e5484d; }
.kc-medal.no { color: #e5484d; font-weight: 900; font-size: 20px; }
.kc-p.refused .kc-no { display: none; }
.kc-slap { grid-column: 1 / -1; background: linear-gradient(#ff8a3d, #e5661b); }
.kc-actions button[hidden] { display: none; }
/* slapped: a quick hard shake and a red flash */
.kc-p.slapped .tile { animation: slapShake .5s ease-out; }
.seat.slapped .avatar { animation: slapShake .5s ease-out; box-shadow: 0 0 0 4px #ff5a5f, 0 0 26px rgba(255, 90, 95, .7); }
@keyframes slapShake {
  0% { transform: translateX(0) rotate(0); }
  15% { transform: translateX(14px) rotate(6deg); }
  35% { transform: translateX(-10px) rotate(-4deg); }
  55% { transform: translateX(6px) rotate(2deg); }
  100% { transform: none; }
}

/* the gift / bully panel over the chat */
#chat { position: relative; }
#itemPanel {
  position: absolute; inset: 0; z-index: 6; overflow-y: auto; overscroll-behavior: contain;
  background: var(--walnut-900); border-left: 1px solid var(--line);
  animation: ipIn .22s ease-out; scrollbar-width: thin;
}
#itemPanel[hidden] { display: none; }
@keyframes ipIn { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.ip-body { padding: 12px 12px 18px; }
.ip-head { position: sticky; top: -12px; z-index: 1; display: flex; align-items: center; gap: 10px; margin: -12px -12px 10px; padding: 12px; background: var(--walnut-900); border-bottom: 1px solid var(--line); }
.ip-prof { flex: none; padding: 0; border: 0; background: none; cursor: pointer; border-radius: 12px; position: relative; }
.ip-prof .tile { --s: 42px; border-radius: 12px; box-shadow: 0 0 0 2px #fff4e0; }
.ip-prof::after { content: "\1F464"; position: absolute; right: -6px; bottom: -6px; width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; background: #4aa8ff; font-size: 11px; box-shadow: 0 1px 3px rgba(0, 0, 0, .4); }
.ip-back { flex: none; width: 40px; height: 40px; padding: 0; font-size: 22px; }
.ip-title { flex: 1; display: grid; min-width: 0; line-height: 1.2; }
.ip-title small { color: var(--ink-dim); font-size: 12.5px; }
.ip-title b { font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ip-x { flex: none; width: 38px; height: 38px; border: 0; border-radius: 50%; background: #6fb431; color: #fff; font-size: 18px; font-weight: 800; cursor: pointer; box-shadow: 0 3px 0 rgba(0, 0, 0, .3); }
.ip-tabs { margin-bottom: 8px; }
.ip-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ip-grid .ibtn { padding: 12px 4px 10px; }
.ip-grid .ibtn .ie { font-size: 40px; line-height: 1.05; }
.ip-grid .ibtn .ie .glyph-img { width: 44px; height: 44px; }
.ip-grid .ibtn b { font-size: 12.5px; }
.ibtn.sent { animation: sentPop .35s ease-out; }
@keyframes sentPop { 50% { transform: scale(.92); } }
.song-tile { background: linear-gradient(135deg, rgba(131, 56, 236, .35), rgba(58, 134, 255, .25)) !important; }
/* the song picker */
.mpick .shopsong { margin-bottom: 10px; }
.mtabs { grid-template-columns: repeat(4, 1fr); margin: 4px 0 8px; }
.mtabs button { font-size: 12.5px; padding: 8px 4px; }
.mlist { display: grid; gap: 6px; max-height: 46vh; overflow-y: auto; padding-right: 2px; }
#itemPanel .mlist { max-height: none; }
.mrow { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto auto; gap: 8px; align-items: center; padding: 6px; border-radius: 12px; background: rgba(0, 0, 0, .2); }
.mrow .qthumb { width: 56px; height: 42px; }
.mstar { width: 34px; height: 34px; border: 0; border-radius: 50%; background: rgba(255, 233, 205, .08); color: var(--ink-dim); font-size: 18px; cursor: pointer; }
.mstar.on { color: #ffd166; }
.mrow .chip { padding: 7px 10px; font-size: 13px; white-space: nowrap; }
.chat .sys.song, #chatList .sys.song { color: #c9b6ff; }

/* tables: tap one to see who's there */
.trow[role="button"] { cursor: pointer; }
.trow[role="button"]:hover { background: rgba(255, 233, 205, .1); }
.tchev { font-size: 24px; color: var(--ink-dim); margin-left: 4px; }
.peek-list { display: grid; gap: 6px; margin: 10px 0 14px; max-height: 50vh; overflow-y: auto; }
.peek-row { display: flex; align-items: center; gap: 12px; padding: 6px 8px; border-radius: 12px; background: rgba(0, 0, 0, .2); }
.peek-row .tile { --s: 44px; border-radius: 12px; }
.peek-who { display: grid; min-width: 0; }
.peek-who b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.peek-who small { color: var(--ink-dim); }
.peek .cta { width: 100%; }
.peek-tag { text-align: center; }

/* the bottle steps aside while the kiss round shows in the middle */
#stage #bottleWrap { transition: opacity .25s; }
#stage.kissing #bottleWrap, #stage.kissing #halo { opacity: 0; pointer-events: none; }
.treat-btn { background: linear-gradient(#a8743f, #7b4f27) !important; color: #fff !important; }
.treat-btn b { color: #fff; }

.tpeople { color: #ffd166 !important; font-weight: 600; }

/* Cupid's arrow: how many of their spins are still spoken for */
.seat .cupid { position: absolute; left: -10px; bottom: 18px; z-index: 5; display: none; padding: 2px 7px 2px 5px; border-radius: 99px; background: #fff; color: #e5254d; font-size: 12px; font-weight: 800; box-shadow: 0 2px 5px rgba(0, 0, 0, .4); }
.seat.has-cupid .cupid { display: block; animation: pop .35s cubic-bezier(.3, 1.6, .5, 1); }

.msource { margin: 0 0 4px; font-size: 12px; color: var(--ink-dim); }

/* slapped: their photo stays red for a while (10s), with a hand print */
.stain .slap-red { position: absolute; inset: 0; border-radius: inherit; background: radial-gradient(circle at 62% 42%, rgba(255, 40, 40, .62), rgba(214, 20, 30, .42) 70%); mix-blend-mode: multiply; animation: slapRed 1.2s ease-out; }
.stain .slap-mark { position: absolute; transform: translate(-50%, -50%) rotate(-18deg); font-size: 22px; opacity: .55; filter: hue-rotate(-30deg) saturate(2); }
@keyframes slapRed { 0% { background-color: rgba(255, 0, 0, .55); } 100% { background-color: transparent; } }

/* empty seats: tap one to move there */
.seat.empty:not(:disabled) { pointer-events: auto; cursor: pointer; }
.seat.empty:not(:disabled):hover .avatar, .seat.empty:not(:disabled):focus-visible .avatar { border-color: var(--orange); background: rgba(255, 138, 31, .12); }
.seat.empty:not(:disabled):hover .avatar::after { content: "+"; position: absolute; inset: 0; display: grid; place-items: center; font-size: 34px; color: var(--orange-hi); }
.seat.hop .avatar { animation: seatHop .45s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes seatHop { 0% { transform: scale(.6); opacity: .3; } 100% { transform: none; opacity: 1; } }
.seatmove { text-align: center; }

/* gift panel: headings for each type, locked items with progress */
.ip-group { grid-column: 1 / -1; margin: 8px 2px -2px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-dim); }
.ip-group.locked-head { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--line); }
.ibtn .lock-prog { display: inline-flex; align-items: center; gap: 3px; font-size: 11.5px; }
.ibtn .lock-glyph { font-size: 13px; line-height: 1; }
.ibtn .lock-glyph .glyph-img { width: 14px; height: 14px; }
.ibtn .lock-bar { display: block; width: 72%; height: 4px; margin-top: 3px; border-radius: 3px; background: rgba(255, 240, 220, .15); overflow: hidden; }
.ibtn .lock-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--orange-lo), var(--orange-hi)); border-radius: 3px; }
.ibtn.locked:disabled { opacity: .72; }
.ibtn.mystery { background: linear-gradient(160deg, rgba(155, 92, 255, .22), rgba(255, 207, 63, .12)); border-color: rgba(201, 167, 255, .45); }

/* a vote: over the table for everyone, can't be closed */
#pollBox {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 9;
  width: min(380px, calc(100% - 24px)); padding: 14px 16px; border-radius: 18px; display: grid; gap: 8px;
  background: rgba(28, 13, 6, .96); border: 2px solid #c9a7ff; box-shadow: 0 14px 34px rgba(0, 0, 0, .6), 0 0 0 6px rgba(201, 167, 255, .15);
  animation: dlgIn .28s cubic-bezier(.2, .9, .3, 1.15);
}
#pollBox[hidden] { display: none; }
.poll-top { display: flex; justify-content: space-between; align-items: center; }
.poll-kicker { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #d9c4ff; }
.poll-time { font-variant-numeric: tabular-nums; color: var(--orange-hi); }
.poll-who { display: grid; grid-template-columns: 52px 1fr; gap: 10px; align-items: center; }
.poll-who .tile { --s: 52px; }
.poll-q { margin: 0; font-weight: 600; font-size: 15.5px; }
.poll-by, .poll-tally { color: var(--ink-dim); font-size: 12.5px; }
.poll-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.poll-acts button { border: 0; border-radius: 12px; padding: 12px; font: 700 16px var(--font-ui); color: #fff; cursor: pointer; }
.poll-yes { background: linear-gradient(#7fd04b, #4fa52a); }
.poll-no { background: linear-gradient(#ff6b6f, #d6383d); }
.poll-acts button:disabled { opacity: .5; cursor: default; }
.poll-state { margin: 0; font-weight: 600; color: #d9c4ff; }
.poll-result { text-align: center; font-size: 17px; padding: 6px 0; }
.poll-result.yes { color: #9be26b; }
.poll-result.no { color: #ff8a8d; }
#banishBar {
  position: absolute; left: 50%; top: 12px; transform: translateX(-50%); z-index: 8;
  padding: 8px 14px; border-radius: 999px; font-weight: 600; font-size: 14px; white-space: nowrap;
  background: rgba(120, 20, 30, .92); border: 1px solid #ff8a8d; box-shadow: 0 6px 16px rgba(0, 0, 0, .4);
}
#banishBar[hidden] { display: none; }
.vote-kinds { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 10px 0; }
.vote-kind { display: grid; gap: 4px; text-align: center; padding: 12px 8px; }
.vote-kind small { color: var(--ink-dim); font-size: 12px; }
.vote-kind.on { outline: 3px solid #c9a7ff; outline-offset: 1px; }
.vote-name[hidden] { display: none; }
.vote-box .cta { width: 100%; margin-top: 12px; }

/* daily bonus: day 1-7 tiles and the day-7 wheel */
.daily { text-align: center; }
.daily-streak { margin: 4px 0 10px; font-weight: 600; color: var(--orange-hi); }
.daily-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 12px 0 14px; }
.dtile {
  position: relative; display: grid; justify-items: center; gap: 2px; padding: 8px 4px 7px; border-radius: 12px;
  background: rgba(255, 240, 220, .06); border: 1px solid var(--line);
}
.dtile small { font-size: 11.5px; color: var(--ink-dim); font-weight: 600; }
.dtile .dt-ic { font-size: 22px; line-height: 1.1; color: var(--lip); }
.dtile b { font-size: 14px; }
.dtile em { font-style: normal; font-size: 11px; color: var(--ink-dim); min-height: 14px; }
.dtile.won { background: rgba(127, 208, 75, .13); border-color: rgba(127, 208, 75, .45); }
.dtile.won .dt-check { position: absolute; top: 4px; right: 6px; font-size: 12px; color: #9be26b; font-weight: 900; }
.dtile.today { border: 2px solid var(--orange); background: rgba(255, 138, 31, .16); animation: tilePulse 1.4s ease-in-out infinite; }
.dtile.today em { color: var(--orange-hi); font-weight: 700; }
.dtile.next em { color: #d9c4ff; }
.dtile.later { opacity: .7; }
.dtile.wheel { grid-column: span 1; background: linear-gradient(160deg, rgba(255, 207, 63, .2), rgba(155, 92, 255, .18)); }
.dtile.top b { color: #ffcf3f; }
@keyframes tilePulse { 50% { box-shadow: 0 0 0 4px rgba(255, 138, 31, .25); } }
.daily-done { color: var(--ink-dim); font-weight: 600; }
.daily .cta { width: 100%; }
.wheel-wrap { position: relative; width: min(260px, 72vw); margin: 4px auto 14px; }
.wheel { display: block; width: 100%; height: auto; filter: drop-shadow(0 8px 18px rgba(0, 0, 0, .5)); }
#wheelSpin { transform-origin: 0 0; }
.wheel .wt { fill: #fff; font: 800 13px var(--font-ui); text-anchor: middle; dominant-baseline: middle; paint-order: stroke; stroke: rgba(0, 0, 0, .25); stroke-width: 2px; }
.wheel .wt.top, .wheel .wt.topn { fill: #6b3d00; stroke: none; font-size: 9px; }
.wheel .wt.topn { font-size: 10px; }
.wheel-pin { position: absolute; left: 50%; top: -6px; transform: translateX(-50%); width: 0; height: 0; border-left: 12px solid transparent; border-right: 12px solid transparent; border-top: 22px solid #fff; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .5)); }
.wheel-result { font-size: 18px; font-weight: 700; color: #9be26b; }
.wheel-result.top { color: #ffcf3f; font-size: 21px; }
.pcard .pc-more { margin-bottom: 8px; }

/* achievements */
.ach-btn { width: 100%; margin-top: 8px; padding: 12px; background: linear-gradient(160deg, rgba(255, 207, 63, .22), rgba(155, 92, 255, .16)); border: 1px solid rgba(255, 207, 63, .4); }
.achbox { display: grid; gap: 8px; }
.ach-row { display: grid; grid-template-columns: 44px 1fr auto; gap: 10px; align-items: center; padding: 10px; border-radius: 14px; background: rgba(255, 240, 220, .05); border: 1px solid var(--line); }
.ach-row.got { border-color: rgba(255, 207, 63, .45); }
.ach-row.done { background: linear-gradient(160deg, rgba(255, 207, 63, .16), rgba(255, 240, 220, .04)); }
.ach-ic { font-size: 30px; text-align: center; line-height: 1; }
.ach-ic .glyph-img { width: 34px; height: 34px; }
.ach-row:not(.got) .ach-ic { filter: grayscale(.8); opacity: .7; }
.ach-mid { display: grid; gap: 3px; min-width: 0; }
.ach-mid small { color: var(--ink-dim); font-size: 12.5px; }
.ach-pips { margin-left: 6px; letter-spacing: 1px; font-size: 12px; color: rgba(255, 240, 220, .25); }
.ach-pips i.on { color: #ffcf3f; font-style: normal; }
.ach-pips i { font-style: normal; }
.ach-bar { width: 100%; }
.ach-right { display: grid; justify-items: end; gap: 2px; text-align: right; }
.ach-right small { color: var(--ink-dim); font-size: 11.5px; white-space: nowrap; }
.trophies { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.trophy { position: relative; display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: rgba(255, 207, 63, .16); border: 1px solid rgba(255, 207, 63, .4); font-size: 16px; }
.trophy .glyph-img { width: 18px; height: 18px; }
.trophy b { position: absolute; right: -4px; bottom: -4px; min-width: 14px; height: 14px; padding: 0 3px; border-radius: 7px; background: #ffcf3f; color: #4a2b00; font-size: 10px; line-height: 14px; text-align: center; }

/* the microphone bar above the chat */
#micBar { padding: 8px 12px; border-bottom: 1px solid var(--line); background: rgba(124, 92, 255, .08); }
#micBar[hidden] { display: none; }
.mic-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mic-ic { font-size: 22px; }
.mic-ic.live { animation: micPulse 1.2s ease-in-out infinite; }
@keyframes micPulse { 50% { transform: scale(1.18); filter: drop-shadow(0 0 6px #ff5f8f); } }
.mic-info { display: grid; flex: 1; min-width: 120px; }
.mic-info b { font-size: 13.5px; font-weight: 600; }
.mic-info small { color: var(--ink-dim); font-size: 12px; font-variant-numeric: tabular-nums; }
.mic-acts { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.mic-acts .chip { padding: 6px 10px; font-size: 12.5px; }
.mic-acts .cta { padding: 8px 12px; font-size: 13px; width: auto; }
.mic-pos { color: #d9c4ff; font-size: 12.5px; }
.mic-queue { margin: 6px 0 0; padding-left: 22px; font-size: 12.5px; color: var(--ink-dim); max-height: 96px; overflow: auto; }
.mic-queue li.me { color: var(--orange-hi); font-weight: 600; }
.mic-tap { margin-top: 6px; width: 100%; border: 0; border-radius: 10px; padding: 8px; background: var(--orange); color: #2a1200; font: 700 13px var(--font-ui); cursor: pointer; }
.seat.on-mic .avatar { box-shadow: 0 0 0 4px #ff5f8f, 0 0 22px rgba(255, 95, 143, .8); }
.seat.on-mic::after { content: "\1F3A4"; position: absolute; left: -6px; top: -6px; z-index: 6; font-size: 20px; animation: micPulse 1.2s ease-in-out infinite; }
.kc-chat { grid-column: 1 / -1; background: linear-gradient(#ff7aa8, #e2457d); }
.micpass-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; margin-top: 10px; }
.micpass-p { display: grid; justify-items: center; gap: 4px; padding: 8px 4px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 240, 220, .05); color: inherit; cursor: pointer; }
.micpass-p .tile { --s: 52px; }
.mic-acts .chip { white-space: nowrap; flex: none; }

/* vote dialog: readable choices and name box */
.vote-kind { background: rgba(255, 240, 220, .07); color: var(--ink); border: 2px solid var(--line); box-shadow: none; font-size: 16px; }
.vote-kind b { font-size: 16px; color: var(--ink); }
.vote-kind small { color: var(--ink-dim); font-size: 12.5px; line-height: 1.3; }
.vote-kind.on { background: rgba(201, 167, 255, .18); border-color: #c9a7ff; outline: none; }
.vote-kind.on b { color: #fff; }
.vote-name { display: grid; gap: 6px; }
.vote-name .lbl { font-size: 13px; font-weight: 600; color: var(--ink-dim); }
.vote-box .staff-input { width: 100%; box-sizing: border-box; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: rgba(0, 0, 0, .25); color: var(--ink); font: inherit; font-size: 16px; }
.vote-box .staff-input::placeholder { color: rgba(255, 240, 220, .4); }

/* tables: a grid of tables, and who's at the chosen one underneath */
.tgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 10px; }
.ttile {
  position: relative; display: grid; justify-items: start; align-content: start; gap: 6px; min-width: 0;
  padding: 12px; border-radius: 16px; text-align: left; cursor: pointer; color: inherit; font: inherit;
  background: radial-gradient(circle at 50% 120%, rgba(255, 138, 31, .14), transparent 60%), rgba(0, 0, 0, .22);
  border: 2px solid var(--line); transition: border-color .15s, transform .12s;
}
.ttile:hover { border-color: rgba(255, 233, 205, .35); }
.ttile:active { transform: scale(.98); }
.ttile.sel { border-color: var(--orange); background: radial-gradient(circle at 50% 120%, rgba(255, 138, 31, .3), transparent 65%), rgba(0, 0, 0, .25); }
.ttile.here { box-shadow: inset 0 0 0 1px var(--orange); }
.ttile.private { background: radial-gradient(circle at 50% 120%, rgba(160, 100, 255, .22), transparent 60%), rgba(0, 0, 0, .22); }
.ttile.known::after { content: "\1F49B"; position: absolute; top: 8px; right: 10px; font-size: 15px; }
.tt-name { display: flex; align-items: center; gap: 6px; max-width: calc(100% - 22px); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tt-name .lock svg { width: 14px; height: 14px; }
.tt-faces { display: flex; align-items: center; min-height: 34px; }
.tt-faces .tile { --s: 34px; border-radius: 10px; box-shadow: 0 0 0 2px var(--walnut-900); }
.tt-faces .tile + .tile { margin-left: -8px; }
.tt-more { margin-left: 6px; font-size: 12.5px; color: var(--ink-dim); font-weight: 600; }
.tt-count { color: var(--ink-dim); font-size: 12.5px; }
.ttile .tpeople { font-size: 12px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tt-tag { font-size: 11.5px; font-weight: 700; color: var(--orange-hi); }
.tpeople-box { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.tpeople-box:empty { display: none; }
.tp-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.tp-head small { color: var(--ink-dim); }
.tpeople-box .peek-list { max-height: 34vh; }
.peek-row.known { background: rgba(255, 209, 102, .1); }
.tpeople-box .cta { width: 100%; }
/* tables: plain numbered buttons */
.tablesbox .tgrid { grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px; }
.tnum { aspect-ratio: 1; border-radius: 14px; border: 2px solid var(--line); background: rgba(0, 0, 0, .22); color: var(--ink); font: 700 22px var(--font-ui); cursor: pointer; transition: border-color .15s, background .15s; }
.tnum:hover { border-color: rgba(255, 233, 205, .35); }
.tnum.sel { border-color: var(--orange); background: rgba(255, 138, 31, .18); }
.tnum.private { background: rgba(160, 100, 255, .16); }
.trandom { width: 100%; margin-top: 8px; }
.tablesbox .trandom { background: rgba(255, 138, 31, .12); color: var(--orange-hi); border: 2px solid var(--orange); box-shadow: none; }
/* the table you're sitting at */
.tnum.here { position: relative; border-color: rgba(255, 138, 31, .55); color: var(--orange-hi); }
.tnum.here::after { content: "You"; position: absolute; left: 50%; bottom: 5px; transform: translateX(-50%); font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--orange-hi); }
.tnum.here.sel { border-color: var(--orange); }

/* a gift badge sits at the bottom left of the photo, no background (drinks are bottom right) */
.seat .gift {
  top: auto; right: auto; left: -16px; bottom: -12px; width: 52px; height: 52px;
  border-radius: 0; background: none; box-shadow: none; font-size: 40px; pointer-events: none;
  filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .45));
}
.seat .gift .glyph-img { width: 46px; height: 46px; }
/* Cupid's arrow tag moves up to the top left */
.seat .cupid { bottom: auto; top: -10px; left: -12px; }
.tnum.banish { background: rgba(229, 72, 77, .16); border-color: rgba(255, 120, 140, .35); }
.vote-existing { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.vote-existing .lbl { width: 100%; font-size: 12.5px; color: var(--ink-dim); }
.vote-existing .chip { padding: 6px 10px; font-size: 13px; }

/* phones: the hearts count and every button fit on one row */
@media (max-width: 900px) and (orientation: portrait) {
  #rail { gap: 10px 4px; padding-left: 6px; padding-right: 6px; }
  .hearts { gap: 3px; }
  .hearts svg { width: 28px; height: 28px; }
  .hearts b { font-size: 15px; }
  .hearts-plus { width: 16px; height: 16px; font-size: 13px; }
  .rbtn { width: clamp(30px, 8.4vw, 42px); height: clamp(30px, 8.4vw, 42px); }
  .rbtn svg { width: 18px; height: 18px; }
}
@media (max-width: 345px) and (orientation: portrait) {
  #rail { gap: 8px 2px; padding-left: 4px; padding-right: 4px; }
  .rbtn { width: 28px; height: 28px; }
  .rbtn svg { width: 16px; height: 16px; }
  .hearts svg { width: 24px; height: 24px; }
  .hearts b { font-size: 14px; }
}

/* the + for buying hearts sits inside the heart */
.hearts-ic { position: relative; display: grid; place-items: center; }
.hearts .hearts-plus, .hearts-ic .hearts-plus {
  position: absolute; inset: 0 0 8% 0; width: auto; height: auto; display: grid; place-items: center;
  background: none; box-shadow: none; border-radius: 0; color: #fff; font-style: normal; font-weight: 900;
  font-size: 26px; line-height: 1; text-shadow: 0 1px 2px rgba(120, 50, 0, .6); pointer-events: none;
}
@media (max-width: 900px) and (orientation: portrait) {
  .hearts .hearts-plus { position: absolute; width: auto; height: auto; font-size: 17px; }
}
@media (max-width: 345px) and (orientation: portrait) {
  .hearts .hearts-plus { font-size: 15px; }
}

/* the heart is the same size as the round buttons beside it */
.hearts svg { width: 54px; height: 54px; }
.hearts .hearts-plus { font-size: 26px; }
@media (max-width: 1100px) and (orientation: landscape) {
  .hearts svg { width: 46px; height: 46px; }
  .hearts .hearts-plus { font-size: 22px; }
}
@media (max-height: 520px) and (orientation: landscape) {
  .hearts svg { width: 40px; height: 40px; }
  .hearts .hearts-plus { font-size: 19px; }
}
@media (max-width: 900px) and (orientation: portrait) {
  .hearts svg { width: clamp(30px, 8.4vw, 42px); height: clamp(30px, 8.4vw, 42px); }
  .hearts .hearts-plus { font-size: clamp(15px, 4.2vw, 20px); }
}
@media (max-width: 345px) and (orientation: portrait) {
  .hearts svg { width: 28px; height: 28px; }
  .hearts .hearts-plus { font-size: 14px; }
}
/* the toast is a popover (so it shows above dialogs): undo the browser's popover box */
#toast[popover] { right: auto; bottom: auto; margin: 0; border: 0; overflow: visible; width: max-content; inset-inline-end: auto; }
#toast[popover]:not(:popover-open) { display: none; }

/* Continue with Facebook */
.fb-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; width: 280px; max-width: 100%; height: 44px; margin: -6px 0 0; justify-self: center; border-radius: 999px; background: #1877f2; color: #fff; font: 600 15px var(--font-ui); text-decoration: none; box-shadow: 0 2px 6px rgba(0, 0, 0, .3); }
.fb-btn:hover { background: #166fe5; }
.fb-btn svg { width: 22px; height: 22px; }
.fb-btn[hidden] { display: none; }
.fbchoice { text-align: center; display: grid; gap: 12px; }
.fb-pair { display: flex; align-items: flex-start; justify-content: center; gap: 14px; margin: 4px 0; }
.fb-who { display: grid; justify-items: center; gap: 2px; }
.fb-who .tile { --s: 64px; }
.fb-who small { color: var(--ink-dim); font-size: 12.5px; }
.fb-plus { font-size: 26px; font-weight: 800; color: var(--orange-hi); }
.fb-confirm { display: grid; justify-items: center; gap: 6px; }
.fb-confirm[hidden] { display: none; }
.fbchoice .cta { width: 100%; }
.fb-sep { justify-self: center; }
.fb-sep-hint { margin-top: -6px; }
.del-link { display: block; margin: 14px auto 0; background: none; border: 0; color: #ff9bb0; font: 600 13px var(--font-ui); text-decoration: underline; cursor: pointer; opacity: .8; }
.del-link:hover { opacity: 1; }
.delbox { display: grid; gap: 12px; text-align: center; }
.delbox .cta { width: 100%; }
.danger-cta { background: linear-gradient(#ff6b6f, #d6383d); box-shadow: 0 4px 0 #8f1f24; color: #fff; }
.delbox .chip { justify-self: center; }
