/* Dark theme in Incredible Marketing / im+ colours:
   near-black #101011, IM magenta #A71478 / im+ pink #DB1881, slate greys #3C3D41 · #656B6F · #717679,
   and the im+ rainbow accent stripe. Type: Geist for UI text, Montserrat for headings. */
:root {
  color-scheme: dark;
  --bg: #0B0B0C;
  --surface: #151517;
  --surface-2: #1D1D20;
  --surface-3: #26262A;
  --ink: #F4F4F5;
  --ink-2: #D4D5D8;
  --muted: #9A9FA4;
  --line: #2A2B2F;
  --line-2: #212124;
  --field: #3C3D41;
  --accent: #DB1881;
  --accent-ink: #A71478;
  --accent-soft: rgba(219, 24, 129, .16);
  --accent-text: #FF6FB5;
  --green: #00DE63;
  --red: #EE293D;
  --orange: #FF651F;
  --rainbow: linear-gradient(90deg, #EE293D, #FF651F 14%, #FAC831 28%, #00DE63 43%, #2CD2C6 57%, #3A67BC 71%, #813790 86%, #DB1881);
  --radius: 10px;
  --display: Montserrat, Geist, system-ui, sans-serif;
  font-family: Geist, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-feature-settings: "ss01", "tnum";
  -webkit-font-smoothing: antialiased;
  color: var(--ink);
  background: var(--bg);
}
* { box-sizing: border-box; }
html, body, #app { margin: 0; height: 100%; }
body { background: var(--bg); font-size: 14px; line-height: 1.4; letter-spacing: -0.003em; }
h1, h2, .title { font-family: var(--display); letter-spacing: -0.015em; }
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #2E2F33; border-radius: 10px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background-color: #45464B; }
::-webkit-scrollbar-track { background: transparent; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
::selection { background: var(--accent); color: #fff; }

/* ---------- buttons & fields ---------- */
.btn { height: 36px; padding: 0 14px; border-radius: 9px; border: 1px solid #2F3034; background: var(--surface-2); font-size: 13px; font-weight: 600; color: var(--ink-2); display: inline-flex; align-items: center; justify-content: center; gap: 7px; white-space: nowrap; transition: background .12s, border-color .12s, color .12s; box-shadow: 0 1px 0 rgba(255,255,255,.03) inset; }
.btn:hover { background: var(--surface-3); color: var(--ink); }
.btn.primary { background: linear-gradient(180deg, #E52C8E, #CC1478); border-color: #CC1478; color: #fff; font-weight: 700; box-shadow: 0 1px 0 rgba(255,255,255,.18) inset, 0 4px 14px rgba(219,24,129,.25); }
.btn.primary:hover { background: var(--accent-ink); border-color: var(--accent-ink); }
.btn.small { height: 30px; padding: 0 11px; font-size: 12.5px; border-radius: 8px; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--surface-3); }
.btn[disabled] { opacity: .45; cursor: default; }
.btn svg { width: 16px; height: 16px; flex: none; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.field input, .field select { height: 40px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--field); background: var(--surface-2); color: var(--ink); }
.field input:focus, .composer input:focus, .copy-row input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input::placeholder { color: #7D8287; }
.error-text { color: #FF6B7A; font-size: 13px; min-height: 18px; }

/* ---------- auth screens ---------- */
.auth { min-height: 100%; display: flex; align-items: center; justify-content: center; padding: 32px 16px; background: radial-gradient(1200px 500px at 50% -10%, rgba(219,24,129,.18), transparent 60%), var(--bg); }
.auth-card { position: relative; width: 100%; max-width: 820px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 32px; display: flex; flex-wrap: wrap; gap: 32px; overflow: hidden; }
.auth-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--rainbow); }
.auth-card.narrow { max-width: 420px; }
.auth-card h1 { margin: 0 0 4px; font-size: 24px; font-weight: 800; letter-spacing: -0.01em; }
.auth-card .lead { margin: 0 0 18px; color: var(--muted); line-height: 1.5; }
.auth-form { flex: 1 1 300px; display: flex; flex-direction: column; gap: 14px; }
.auth-side { flex: 1 1 300px; }

/* ---------- character maker ---------- */
.maker { display: flex; flex-direction: column; gap: 12px; }
.maker .preview { display: flex; justify-content: center; padding: 4px 0 8px; }
.maker .group { display: flex; flex-direction: column; gap: 6px; }
.maker .group-label { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.swatches { display: flex; flex-wrap: wrap; gap: 7px; }
.swatch { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--field); padding: 0; }
.swatch[aria-pressed="true"] { border: 3px solid var(--ink); box-shadow: 0 0 0 2px var(--accent); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { height: 32px; padding: 0 12px; border-radius: 16px; border: 1px solid var(--field); background: var(--surface-2); color: var(--ink-2); font-size: 12.5px; font-weight: 500; }
.chip:hover { background: var(--surface-3); }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 700; }

/* ---------- characters ---------- */
.char { position: relative; width: var(--size); height: var(--size); flex: none; }
.char .disc { width: 100%; height: 100%; border-radius: 50%; overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,.6); transition: box-shadow .15s; }
.char .disc.me { box-shadow: 0 0 0 2px #fff, 0 0 0 4.5px var(--accent); }
.char .disc.guest { box-shadow: 0 0 0 2px #fff, 0 0 0 4px #717679; }
.char .disc.speaking { box-shadow: 0 0 0 2px #fff, 0 0 0 5px var(--green); animation: talk 1s ease-in-out infinite; }
@keyframes talk { 50% { box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px var(--green); } }
.char .disc .photo { width: 100%; height: 100%; display: block; object-fit: cover; user-select: none; }
/* characters without a background: a thin white outline, plus a coloured outline for you / speaking / guests */
.char .cut { position: absolute; inset: 0; --edge: drop-shadow(0 0 .6px #fff) drop-shadow(0 0 .6px #fff) drop-shadow(0 0 .6px #fff);
  filter: var(--edge) drop-shadow(0 1.5px 2px rgba(0,0,0,.4)); transition: filter .15s; }
.char .cut .art, .char .cut .phones { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.char .cut.me { filter: var(--edge) drop-shadow(0 0 1px var(--accent)) drop-shadow(0 0 1px var(--accent)) drop-shadow(0 1.5px 2px rgba(0,0,0,.4)); }
.char .cut.guest { filter: var(--edge) drop-shadow(0 0 1px #717679) drop-shadow(0 0 1px #717679) drop-shadow(0 1.5px 2px rgba(0,0,0,.4)); }
.char .cut.speaking { filter: var(--edge) drop-shadow(0 0 1.2px var(--green)) drop-shadow(0 0 1.2px var(--green)) drop-shadow(0 0 2.5px var(--green)); animation: talkglow 1s ease-in-out infinite; }
@keyframes talkglow { 50% { filter: var(--edge) drop-shadow(0 0 .8px var(--green)) drop-shadow(0 0 .8px var(--green)) drop-shadow(0 1.5px 2px rgba(0,0,0,.4)); } }
@media (prefers-reduced-motion: reduce) { .char .cut.speaking { animation: none; } }
.char .phones { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.char .badge { position: absolute; border-radius: 50%; }
.char .badge.mic { right: -5px; bottom: -4px; width: 42%; height: 42%; min-width: 15px; min-height: 15px; background: #fff; border: 1px solid #3C3D41; display: flex; align-items: center; justify-content: center; }
.char .badge.mic svg { width: 62%; height: 62%; }
.char .badge.busy { right: -3px; top: -3px; width: 32%; height: 32%; min-width: 11px; min-height: 11px; background: var(--orange); border: 2px solid #fff; }
.char.away { opacity: .45; }

/* ---------- office layout ---------- */
.office { height: 100%; display: flex; flex-direction: column; }
.topbar { position: relative; height: 56px; flex: none; display: flex; align-items: center; gap: 10px; padding: 0 16px; background: #101011; border-bottom: 1px solid var(--line); }
.topbar::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--rainbow); opacity: .9; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand .mark { width: 30px; height: 30px; flex: none; border-radius: 8px; display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: 12.5px; letter-spacing: .02em; color: #fff; background: linear-gradient(135deg, #DB1881, #813790); box-shadow: 0 2px 10px rgba(219,24,129,.35); }
.topbar .title { font-size: 15.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .count { font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; padding: 3px 9px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); display: inline-flex; align-items: center; gap: 6px; }
.topbar .count::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(0,222,99,.15); }
.topbar .spacer { flex: 1; }
.conn-dot { font-size: 12px; color: var(--orange); }
.floor-tabs { display: flex; gap: 4px; }
.status-select { height: 36px; border-radius: 18px; border: 1px solid #2F3034; color: var(--ink); padding: 0 30px 0 28px; font-size: 13px; font-weight: 600; appearance: none; -webkit-appearance: none;
  background: var(--surface-2) no-repeat; background-image: radial-gradient(circle, var(--dot, var(--green)) 4px, transparent 4.5px), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%239A9FA4' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-position: 9px 50%, right 12px center; background-size: 12px 12px, 10px 6px; }
.status-select[data-status="busy"] { --dot: var(--orange); }
.status-select[data-status="away"] { --dot: #717679; }
.status-select option { background: #1D1D20; }
.mic-btn { width: 38px; height: 38px; border-radius: 50%; border: 1px solid #2F3034; background: var(--surface-2); display: flex; align-items: center; justify-content: center; color: var(--muted); }
.mic-btn:hover { background: var(--surface-3); }
.mic-btn.live { color: var(--green); border-color: rgba(0,222,99,.45); background: rgba(0,222,99,.12); }
.mic-btn.muted { color: #FF6B7A; border-color: rgba(238,41,61,.5); background: rgba(238,41,61,.14); }
.mic-btn svg { width: 18px; height: 18px; }
.me-btn { width: 40px; height: 40px; padding: 0; border: none; background: none; border-radius: 50%; }
.menu-wrap { position: relative; }
.menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 220px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 14px 34px rgba(0,0,0,.55); padding: 6px; z-index: 40; display: flex; flex-direction: column; }
.menu button { text-align: left; border: none; background: none; padding: 9px 10px; border-radius: 6px; font-size: 13px; color: var(--ink-2); }
.menu button:hover { background: var(--surface-3); color: var(--ink); }

.main { flex: 1; min-height: 0; display: flex; }
.viewport { flex: 1; min-width: 0; position: relative; overflow: hidden; background: radial-gradient(900px 600px at 50% 40%, #17171A, #0B0B0C 75%); }
.scaler { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.scaler .outside { position: absolute; pointer-events: none; filter: brightness(.82) saturate(.9); }

/* ---------- floor ---------- */
.stage { position: relative; box-sizing: content-box; border: 8px solid #2A2B2F; border-radius: 6px; box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.layer { position: absolute; }
.prop { position: absolute; box-sizing: border-box; }
.floor-label, .zone-label { position: absolute; font-size: 12px; font-weight: 700; padding: 4px 9px; border-radius: 11px; display: flex; align-items: center; gap: 5px; white-space: nowrap; box-shadow: 0 1px 3px rgba(0,0,0,.4); background: rgba(16,16,17,.92); color: var(--ink); }
.zone-label[hidden] { display: none; }
.zone-label.here { background: #101011; color: #fff; }
.zone-label { transition: opacity .6s ease; }
.zone-label.fade { opacity: 0; }
.zone-hit { position: absolute; border: 2px solid transparent; border-radius: 8px; background: transparent; padding: 0; }
.zone-hit { pointer-events: none; }
.zone-hit.here { border-color: var(--accent); background: rgba(219,24,129,.07); }
.zone-hit.locked { border: 2px dashed #F4F4F5; background: rgba(16,16,17,.18); }
.people { pointer-events: none; z-index: 5; }
.person { position: absolute; width: 72px; margin-left: -36px; transform-origin: 50% 19px; display: flex; flex-direction: column; align-items: center; gap: 3px; pointer-events: auto; background: none; border: none; padding: 0; transition: left .6s cubic-bezier(.3,.7,.3,1), top .6s cubic-bezier(.3,.7,.3,1); }
.person .tag { font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 8px; white-space: nowrap; max-width: 72px; overflow: hidden; text-overflow: ellipsis; background: rgba(16,16,17,.9); color: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.35); }
.person.me .tag { background: var(--accent); color: #fff; }

.popover { position: absolute; z-index: 30; width: 230px; max-width: calc(100% - 16px); overflow-y: auto; overscroll-behavior: contain; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 14px 36px rgba(0,0,0,.55); padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.popover .who { display: flex; gap: 10px; align-items: center; }
.popover .name { font-weight: 700; font-size: 14px; }
.popover .sub { font-size: 12px; color: var(--muted); }
.popover .actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* ---------- side panel ---------- */
.panel { width: 352px; flex: none; background: var(--surface); border-left: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.banners { display: flex; flex-direction: column; gap: 8px; padding: 12px 12px 0; }
.banners:empty { display: none; }
.banner { padding: 12px; border-radius: 10px; background: var(--accent-soft); border: 1px solid rgba(219,24,129,.4); display: flex; flex-direction: column; gap: 10px; font-size: 13px; line-height: 1.4; }
.banner.warn { background: rgba(255,101,31,.12); border-color: rgba(255,101,31,.45); }
.banner .row { display: flex; gap: 8px; }
.room-card { padding: 16px 16px 14px; border-bottom: 1px solid var(--line-2); display: flex; flex-direction: column; gap: 12px; }
.room-card h2 { margin: 0; font-size: 19px; font-weight: 800; }
.room-card .sub { font-size: 12.5px; color: var(--muted); margin-top: 3px; display: flex; align-items: center; gap: 7px; }
.room-card .sub.live { color: #7EEDB0; }
.room-card .sub.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(0,222,99,.18); animation: pulse 2s ease-in-out infinite; flex: none; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(0,222,99,0); } }
.room-people { display: flex; flex-wrap: wrap; gap: 10px; }
.room-person { display: flex; flex-direction: column; align-items: center; gap: 5px; width: 54px; font-size: 11.5px; font-weight: 500; color: var(--ink-2); }
.room-person span { max-width: 52px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.room-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.tabs { display: flex; gap: 2px; margin: 12px 12px 0; padding: 3px; border-radius: 10px; background: #0F0F10; border: 1px solid var(--line); }
.tab { flex: 1; height: 30px; padding: 0 12px; border-radius: 7px; border: none; background: transparent; color: var(--muted); font-size: 13px; font-weight: 600; position: relative; transition: background .12s, color .12s; }
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { background: var(--surface-3); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.4); }
.floor-tabs .tab { flex: none; }
.tab .dot { position: absolute; top: 4px; right: 3px; width: 7px; height: 7px; border-radius: 50%; background: var(--orange); }
.chat { flex: 1; min-height: 0; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 4px; }
.chat > .msg:not(.cont), .chat > .sys-line, .chat > .event { margin-top: 10px; }
.chat > :first-child { margin-top: 0; }
.chat .empty { color: var(--muted); font-size: 13px; text-align: center; margin: auto 0; }
.sys-line { align-self: center; font-size: 12px; color: var(--muted); padding: 2px 10px; text-align: center; display: flex; gap: 8px; align-items: baseline; }
.sys-line time, .event time { font-size: 11px; color: #6F7479; }
.event { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; background: linear-gradient(90deg, rgba(219,24,129,.12), rgba(129,55,144,.06)); border: 1px solid rgba(219,24,129,.22); font-size: 12.5px; }
.event .ico { width: 26px; height: 26px; flex: none; border-radius: 7px; display: grid; place-items: center; background: rgba(219,24,129,.2); color: #FF8CC6; }
.event .ico svg { width: 15px; height: 15px; }
.event .txt { flex: 1; min-width: 0; font-weight: 600; color: var(--ink); }
.msg { display: flex; gap: 10px; align-items: flex-start; }
.msg .body { flex: 1; min-width: 0; }
.msg .meta { display: flex; gap: 8px; align-items: baseline; }
.msg .meta b { font-size: 13px; font-weight: 600; color: var(--ink); }
.msg.cont { padding-left: 42px; }
.msg .meta time { font-size: 11px; color: #7D8287; }
.msg .text { font-size: 13.5px; line-height: 1.5; color: var(--ink-2); margin-top: 1px; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg .text a { color: var(--accent-text); font-weight: 500; border-bottom: 1px solid rgba(255,111,181,.35); }
.msg .text a:hover { text-decoration: none; border-bottom-color: var(--accent-text); }
.dm-list { flex: 1; overflow-y: auto; padding: 8px; display: flex; flex-direction: column; }
.dm-row { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 8px; border: none; background: none; text-align: left; width: 100%; }
.dm-row:hover { background: var(--surface-2); }
.dm-row .nm { font-size: 13px; font-weight: 600; }
.dm-row .wh { font-size: 11.5px; color: var(--muted); }
.dm-head { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--line-2); font-weight: 700; font-size: 13px; }
.composer { padding: 12px; border-top: 1px solid var(--line-2); display: flex; gap: 8px; }
.composer input { flex: 1; min-width: 0; height: 42px; padding: 0 14px; border-radius: 10px; border: 1px solid #2F3034; background: #0F0F10; color: var(--ink); font-size: 13.5px; }
.composer button { width: 42px; height: 42px; border-radius: 10px; border: none; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; }
.composer button:hover { background: var(--accent-ink); }

/* ---------- modal & toasts ---------- */
.modal-back { position: fixed; inset: 0; background: rgba(0,0,0,.6); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 16px; }
.modal { position: relative; width: 100%; max-width: 440px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 22px; display: flex; flex-direction: column; gap: 14px; max-height: 92vh; overflow-y: auto; box-shadow: 0 24px 60px rgba(0,0,0,.6); }
.modal h2 { margin: 0; font-size: 18px; font-weight: 800; }
.modal p { margin: 0; color: var(--muted); line-height: 1.5; }
.modal .actions { display: flex; justify-content: flex-end; gap: 8px; }
.copy-row { display: flex; gap: 8px; }
.copy-row input { flex: 1; min-width: 0; height: 38px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--field); background: var(--surface-2); color: var(--ink); font-size: 12.5px; }
#toasts { position: fixed; left: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; z-index: 60; }
.toast { background: var(--surface-3); color: #fff; border: 1px solid var(--field); border-left: 3px solid var(--accent); padding: 10px 14px; border-radius: 10px; font-size: 13px; max-width: 360px; box-shadow: 0 8px 24px rgba(0,0,0,.5); }

@media (max-width: 860px) {
  .main { flex-direction: column; }
  .viewport { flex: 1 1 55%; }
  .panel { width: auto; flex: 1 1 45%; border-left: none; border-top: 1px solid var(--line); }
  .topbar .count, .floor-tabs { display: none; }
}

/* ---------- table games ---------- */
.game-hit { position: absolute; border: 3px solid transparent; border-radius: 10px; background: transparent; padding: 0; z-index: 2; }
.game-hit:hover, .game-hit:focus-visible { border-color: #FFFFFF; box-shadow: 0 0 0 3px rgba(219,24,129,.7); }
.game-chip { position: absolute; left: 50%; top: -46px; transform: translateX(-50%); font-size: 22px; font-weight: 800; padding: 4px 16px; border-radius: 18px; background: var(--accent); color: #fff; opacity: 0; transition: opacity .15s; pointer-events: none; white-space: nowrap; }
.game-hit:hover .game-chip, .game-hit:focus-visible .game-chip { opacity: 1; }
.game-hit.live .game-chip { opacity: 1; background: var(--green); color: #101011; }
.game-hit.live .game-chip::after { content: " · live"; }
.game-panel { position: absolute; right: 16px; top: 16px; width: min(640px, calc(100% - 32px)); max-height: calc(100% - 32px); overflow-y: auto; z-index: 20; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 18px 50px rgba(0,0,0,.65); padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 12px; }
.game-panel::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--rainbow); border-radius: 14px 14px 0 0; }
.game-head { display: flex; align-items: center; justify-content: space-between; cursor: grab; user-select: none; touch-action: none; margin: -16px -18px 0; padding: 14px 18px 4px; }
.game-head.dragging { cursor: grabbing; }
.game-head h2::before { content: "⠿"; color: var(--muted); margin-right: 8px; font-weight: 400; }
.game-head h2 { margin: 0; font-size: 16px; font-weight: 800; }
.game-body { display: flex; flex-direction: column; gap: 12px; }
.game-picker { display: flex; gap: 6px; }
.game-picker .chip.on { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 700; }
.game-picker .chip:disabled { cursor: default; }
.game-picker .chip:disabled:not(.on) { opacity: .5; }
.game-players { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.game-seat { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 12px; border-radius: 10px; background: var(--soft); border: 2px solid transparent; }
.game-seat.turn { border-color: var(--side); }
.game-seat .dot { width: 14px; height: 14px; border-radius: 50%; background: var(--side); flex: none; }
.game-seat .nm { font-weight: 700; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.game-seat .nm.empty { font-weight: 500; color: var(--muted); }
.game-seat .who { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.game-seat .who .nm { flex: none; }
.game-seat .who .btn { align-self: flex-start; }
.game-seat .where { font-size: 11px; color: var(--muted); }
.game-seat .score { font-size: 20px; }
.game-canvas { width: 100%; aspect-ratio: 600 / 360; border-radius: 10px; display: block; touch-action: none; cursor: crosshair; }
.game-status { font-weight: 700; text-align: center; min-height: 20px; }
.game-actions { display: flex; justify-content: center; gap: 8px; }
.game-actions:empty { display: none; }
.game-help { font-size: 12px; color: var(--muted); text-align: center; }
.game-seat.golf .dot { background: var(--ball); box-shadow: 0 0 0 1.6px #111114, 0 0 0 3px rgba(255,255,255,.25); }
.ball-picker { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ball-picker .lbl { font-size: 12px; color: var(--muted); margin-right: 2px; }
.ball-chip { width: 30px; height: 30px; display: grid; place-items: center; padding: 0; border-radius: 50%; border: 2px solid transparent; background: var(--surface-2); }
.ball-chip i { width: 18px; height: 18px; border-radius: 50%; box-shadow: 0 0 0 1.6px #111114, inset -2px -2px 0 rgba(0,0,0,.12); }
.ball-chip:hover:not(:disabled) { border-color: #3C3D41; }
.ball-chip.on { border-color: var(--accent); background: var(--accent-soft); }
.ball-chip:disabled { opacity: .3; cursor: not-allowed; position: relative; }
.ball-chip:disabled::after { content: ""; position: absolute; left: 4px; right: 4px; top: 50%; height: 2px; background: #F4F4F5; transform: rotate(-45deg); }
.golf-card { width: 100%; border-collapse: collapse; font-size: 12.5px; background: var(--surface-2); border-radius: 9px; overflow: hidden; }
.golf-card th, .golf-card td { padding: 5px 8px; text-align: center; }
.golf-card th:first-child { text-align: left; font-weight: 600; white-space: nowrap; }
.golf-card tr:first-child th { color: var(--muted); font-size: 11px; font-weight: 600; }
.golf-card tr:first-child th.now { color: #fff; background: var(--accent-soft); }
.golf-card tr.par td, .golf-card tr.par th { color: var(--muted); font-size: 11.5px; }
.golf-card td.under { color: #7FE0A0; font-weight: 700; }
.golf-card td.over { color: #FFB4B4; }
.golf-card td.tot { font-weight: 700; color: #fff; }
.golf-card .sc-ball { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; box-shadow: 0 0 0 1.5px #111114; vertical-align: -1px; }

/* ---------- spots ---------- */
.spot-hit .game-chip { background: #3A3B40; }
.person.massaging .char { animation: massage .18s linear infinite; }
@keyframes massage { 0% { transform: translate(0, 0); } 25% { transform: translate(-1.2px, .6px); } 50% { transform: translate(1px, -.6px); } 75% { transform: translate(-.6px, -.8px); } 100% { transform: translate(0, 0); } }
/* hot seats in Sam's office: sweat drops run down both sides of the face until they get up */
.person.sweating::before, .person.sweating::after {
  content: ""; position: absolute; top: 4px; width: 5px; height: 7px; z-index: 2; pointer-events: none;
  background: #7EC8F2; border: 1px solid #fff; border-radius: 50% 50% 50% 50% / 65% 65% 35% 35%;
  clip-path: none; animation: sweat 1.1s ease-in infinite; opacity: 0;
}
.person.sweating::before { left: 20px; }
.person.sweating::after { right: 20px; animation-delay: .55s; }
.person.sweating .char { animation: fidget 2.4s ease-in-out infinite; }
@keyframes sweat { 0% { transform: translateY(0) scale(.6); opacity: 0; } 15% { opacity: 1; } 80% { opacity: 1; } 100% { transform: translateY(16px) scale(1); opacity: 0; } }
@keyframes fidget { 0%, 100% { transform: translateX(0); } 45% { transform: translateX(0); } 50% { transform: translateX(-1px); } 55% { transform: translateX(1px); } 60% { transform: translateX(0); } }
@media (prefers-reduced-motion: reduce) { .person.sweating::before, .person.sweating::after { animation: none; opacity: 1; } .person.sweating .char { animation: none; } }
@media (prefers-reduced-motion: reduce) { .person.massaging .char, .room-card .sub.live::before { animation: none; } }

/* ---------- pick a seat ---------- */
.seat-hit { position: absolute; border-radius: 50%; border: 3px solid transparent; background: transparent; padding: 0; z-index: 1; }
.seat-hit:hover, .seat-hit:focus-visible { border-color: #FFFFFF; background: rgba(219,24,129,.35); box-shadow: 0 0 0 3px rgba(219,24,129,.6); }

/* ---------- held items (beer) ---------- */
.person .held { position: absolute; left: calc(50% + 9px); top: 22px; width: 20px; height: 26px; pointer-events: none; filter: drop-shadow(0 2px 2px rgba(0,0,0,.45)); animation: pour .35s ease-out; transition: opacity 1.2s ease 2.5s; }
.person .held.empty { opacity: 0; }
.person .held svg { width: 100%; height: 100%; display: block; }
@keyframes pour { from { transform: translateY(-8px) scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- logo ---------- */
.brand .logo-mark { width: 30px; height: 30px; flex: none; display: block; }
.brand .logo-word { font-family: Montserrat, sans-serif; font-weight: 800; font-size: 21px; letter-spacing: -0.02em; color: #FFFFFF; line-height: 1; transform: translateY(-1px); }
.game-picker { flex-wrap: wrap; }
.game-actions { flex-wrap: wrap; }
.btn.throw { min-width: 110px; font-size: 14px; }
.btn.throw[aria-pressed="true"] { outline: 2px solid #fff; outline-offset: 2px; opacity: 1; }
.person .held .steam { animation: steam 1.6s ease-in-out infinite; }
.person .held.cool .steam { display: none; }
@keyframes steam { 0%, 100% { opacity: .2; transform: translateY(1px); } 50% { opacity: .9; transform: translateY(-1px); } }

/* ---------- turned map: keep people, labels and tags upright ---------- */
.scaler.rot .person { rotate: -90deg; }
.scaler.rot .zone-label { rotate: -90deg; transform-origin: 0 0; translate: 0 100%; }
.scaler.rot .game-chip { rotate: -90deg; }
.rotate-btn.on { color: var(--accent-text); border-color: rgba(219,24,129,.5); background: var(--accent-soft); }
.person.gone { opacity: 0; transition: opacity .4s ease !important; }

/* ---------- your own character's menu ---------- */
.popover:has(.me-menu) { width: 290px; }
.me-menu { display: flex; flex-direction: column; gap: 2px; margin: 0 -6px -6px; }
.me-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 8px; border: none; border-radius: 9px; background: none; text-align: left; color: var(--ink); }
.me-row:hover:not([disabled]) { background: var(--surface-3); }
.me-row[disabled] { opacity: .5; cursor: default; }
.me-ico { width: 32px; height: 32px; flex: none; border-radius: 8px; display: grid; place-items: center; background: var(--surface-3); color: var(--muted); }
.me-ico.on { color: var(--ink); }
.me-ico svg { width: 17px; height: 17px; }
.me-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.me-txt b { font-size: 13px; font-weight: 600; }
.me-txt small { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.switch { width: 34px; height: 20px; flex: none; border-radius: 10px; background: #3C3D41; position: relative; transition: background .15s; }
.switch i { position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.4); }
.switch.on { background: var(--green); }
.switch.on i { transform: translateX(14px); }
.me-chev { width: 18px; height: 18px; flex: none; color: var(--muted); }
.me-chev svg { width: 18px; height: 18px; }
.me-sep { height: 1px; background: var(--line); margin: 4px 8px; }

/* ---------- manage admins ---------- */
.team-list { display: flex; flex-direction: column; gap: 2px; max-height: 50vh; overflow-y: auto; margin: 0 -8px; }
.team-row { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 9px; }
.team-row:hover { background: var(--surface-2); }
.role-tag { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; color: var(--muted); background: var(--surface-3); }
.role-tag.admin { color: #fff; background: #3C3D41; }
.reset-btn { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 8px; border: 1px solid transparent; background: none; color: var(--muted); }
.reset-btn:hover { color: var(--ink); background: var(--surface-3); border-color: #2F3034; }
.reset-btn svg { width: 16px; height: 16px; }
.reset-btn.ghost { visibility: hidden; }
.switch-btn { border: none; background: none; padding: 0; display: flex; }
.me-row.static { cursor: default; }
.me-row.static:hover { background: none; }
.me-select { height: 30px; border-radius: 8px; border: 1px solid #3C3D41; background: var(--surface-3); color: var(--ink); font-size: 12.5px; font-weight: 600; padding: 0 6px; }

/* upload your own avatar */
.av-steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; line-height: 1.45; color: var(--ink-2); }
.av-prompt { width: 100%; box-sizing: border-box; height: 132px; resize: vertical; font: 12px/1.45 ui-monospace, Menlo, monospace; color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--line); border-radius: 9px; padding: 10px; }
.av-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.av-align { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.av-stage { position: relative; width: 280px; height: 280px; flex: none; border-radius: 12px; overflow: hidden; background: #26262A; touch-action: none; cursor: grab; }
.av-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.av-side { flex: 1 1 180px; display: flex; flex-direction: column; gap: 10px; font-size: 12.5px; color: var(--muted); }
.av-side input[type=range] { width: 100%; accent-color: var(--accent); }
.av-previews { display: flex; gap: 14px; align-items: flex-end; padding: 10px; border-radius: 10px; background: #46494E; }
.av-previews .char { margin: 6px; }
.modal:has(.av-steps) { max-width: 660px; }
.modal .actions { flex-wrap: wrap; }

/* character maker: preview on the left, every option as a little picture of you */
.maker { display: grid; grid-template-columns: 128px 1fr; gap: 16px; align-items: start; }
.maker .preview { position: sticky; top: 0; flex-direction: column; align-items: center; gap: 10px; }
.maker-opts { display: flex; flex-direction: column; gap: 12px; max-height: min(62vh, 560px); overflow-y: auto; padding-right: 4px; }
.thumbs { display: flex; flex-wrap: wrap; gap: 6px; }
.thumb { width: 44px; height: 44px; padding: 0; border-radius: 50%; border: 2px solid transparent; background: none; }
.thumb .thumb-pic { display: block; width: 100%; height: 100%; border-radius: 50%; overflow: hidden; background: #D3D1CC; }
.thumb:hover { border-color: #3C3D41; }
.thumb[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.modal:has(.maker) { max-width: 640px; }
@media (max-width: 560px) { .maker { grid-template-columns: 1fr; } .maker .preview { position: static; } }
.game-actions .btn.erving { background: #2A2520; border-color: #5C4A38; color: #F4E6CF; }
.game-actions .btn.erving:hover { background: #3A3128; }

/* kitchen sink: water spreads out from the middle of one bowl for five seconds, then drains back to the plughole */
.sink-water { position: absolute; z-index: 5; border-radius: 4px; overflow: hidden; pointer-events: none; }
.sink-fill { position: absolute; inset: 0; border-radius: 4px; transform: scale(0); transform-origin: 50% 50%;
  background: radial-gradient(ellipse at 50% 50%, rgba(120,190,245,.7), rgba(56,140,220,.82) 75%);
  box-shadow: inset 0 0 3px rgba(255,255,255,.65); animation: sink-fill 4s ease-out forwards, sink-ripple 1.2s ease-in-out infinite; }
.sink-water.draining .sink-fill { animation: sink-drain 1.5s ease-in forwards; }
@keyframes sink-fill { from { transform: scale(0); border-radius: 50%; } 60% { border-radius: 40%; } to { transform: scale(1); border-radius: 4px; } }
@keyframes sink-drain { from { transform: scale(1); opacity: 1; } to { transform: scale(0); opacity: .4; border-radius: 50%; } }
@keyframes sink-ripple { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.12); } }

/* map zoom controls */
.zoom-ctl { position: absolute; right: 14px; bottom: 14px; z-index: 20; display: flex; flex-direction: column; gap: 6px; }
.zoom-btn { width: 36px; height: 36px; border-radius: 10px; border: 1px solid rgba(255,255,255,.14); background: rgba(24,25,28,.88); color: #F4F4F5;
  font: 600 20px/1 Inter, system-ui, sans-serif; display: grid; place-items: center; cursor: pointer; box-shadow: 0 4px 14px rgba(0,0,0,.4); }
.zoom-btn:hover:not(:disabled) { background: #2A2B30; }
.zoom-btn:disabled { opacity: .4; cursor: default; }
.zoom-btn:focus-visible { outline: 2px solid #D81B72; outline-offset: 2px; }
.viewport.pannable { cursor: grab; }
.viewport.panning { cursor: grabbing; }
.viewport.panning .scaler * { pointer-events: none; }

/* office stats */
.stats-wrap { max-height: min(62vh, 560px); overflow-y: auto; margin: 0 -4px; }
.stats-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.stats-table th, .stats-table td { padding: 6px 8px; text-align: right; white-space: nowrap; }
.stats-table th[scope="row"] { text-align: left; font-weight: 500; white-space: normal; }
.stats-table thead th { position: sticky; top: 0; background: var(--surface); font-size: 12px; color: var(--muted, #A1A1AA); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.stats-table td { font-variant-numeric: tabular-nums; }
.stats-table td.lead { color: var(--muted, #A1A1AA); font-size: 13px; }
.stats-table tr.big th, .stats-table tr.big td:not(.lead) { font-weight: 700; }
.stats-table tr.sec th { text-align: left; padding-top: 16px; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: #D81B72; }
.stats-table tbody tr:not(.sec) { border-top: 1px solid rgba(255,255,255,.06); }
.modal:has(.stats-table) { max-width: 580px; }

/* the hot sauce dare: hazard toast and the black window */
.toast.hazard { background: #B3100E; border-color: #7A0A08; border-left: 6px solid #FFD60A; font-weight: 700; }
.hot-back { position: fixed; inset: 0; background: rgba(0,0,0,.75); display: flex; align-items: center; justify-content: center; z-index: 60; padding: 16px; }
.hot-panel { position: relative; width: min(560px, 100%); background: #000; border: 1px solid #2A0707; border-radius: 16px; padding: 22px 22px 26px; box-shadow: 0 20px 70px rgba(226,58,16,.25); display: flex; flex-direction: column; align-items: center; gap: 14px; }
.hot-close { position: absolute; top: 10px; right: 12px; background: none; border: 0; color: #A1A1AA; font-size: 18px; cursor: pointer; padding: 6px; }
.hot-close:hover { color: #fff; }
.hot-stage { width: 100%; display: flex; justify-content: center; }
.hot-bottle { background: none; border: 0; padding: 0; cursor: pointer; }
.hot-bottle img { display: block; height: min(52vh, 420px); width: auto; transition: transform .25s; }
.hot-bottle:hover img { transform: rotate(-3deg) scale(1.02); }
.hot-video { width: 100%; border-radius: 10px; background: #000; display: block; }
.hot-video[hidden] { display: none; }
.hot-line { margin: 0; min-height: 1.4em; color: #FFD60A; font-weight: 800; font-size: 18px; text-align: center; }
.hot-panel .btn[hidden] { display: none; }
