/* The Theater: lobby, cinema room, silhouettes. A host's own page CSS is added on top of this (scoped to .mpage), so every part has a plain class name: .th-title, .th-stage,
   .th-curtain, .th-screen, .th-bar, .th-cinema, .th-seat, .th-chair, .th-p (a person), .th-fig (their silhouette), .th-name, .th-side, .th-q (a queue row). */
:root { --bg: #07060a; --gold: #fdd21f; --gold-dim: rgba(253, 210, 31, 0.55); --text: #f5f2ea; --muted: rgba(245, 242, 234, 0.62); --line: rgba(245, 242, 234, 0.16); --panel: rgba(22, 18, 14, 0.9); --panel-2: rgba(245, 242, 234, 0.07); --red: #ff6a5f; }
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 Inter, system-ui, "Segoe UI", sans-serif; min-height: 100%; }
a { color: var(--gold); text-decoration: none; } a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; }
#mpbg { position: fixed; inset: 0; z-index: 0; pointer-events: none; } #mpbg[hidden] { display: none; }
.top { position: sticky; top: 0; z-index: 20; background: rgba(8, 7, 6, 0.9); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top-in { max-width: 1100px; margin: 0 auto; padding: 0.55rem 1rem; display: flex; align-items: center; gap: 0.9rem; }
.brand { display: flex; align-items: center; gap: 0.5rem; color: var(--text); font-weight: 800; letter-spacing: -0.01em; } .brand img { height: 30px; } .brand b { color: var(--gold); } .brand:hover { text-decoration: none; }
.top nav { margin-left: auto; display: flex; gap: 0.3rem; align-items: center; } .top nav a { color: var(--muted); font-weight: 600; font-size: 0.88rem; padding: 0.4rem 0.65rem; border-radius: 8px; } .top nav a:hover { color: var(--text); background: var(--panel-2); text-decoration: none; }
.col { position: relative; z-index: 1; max-width: 1100px; margin: 0 auto; padding: 1rem 0.8rem 4rem; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 0.9rem; backdrop-filter: blur(6px); } .pad { padding: 1rem 1.1rem; } .center { text-align: center; } .muted { color: var(--muted); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); padding: 0.45rem 0.95rem; border-radius: 999px; font-weight: 600; cursor: pointer; font-size: 0.9rem; }
.btn:hover { border-color: var(--gold-dim); text-decoration: none; } .btn.primary { background: var(--gold); color: #1a1500; border-color: var(--gold); } .btn.danger { color: var(--red); } .btn[disabled] { opacity: 0.45; cursor: not-allowed; } .btn.sm { padding: 0.28rem 0.7rem; font-size: 0.8rem; }
.btn.on { background: rgba(253, 210, 31, 0.16); border-color: var(--gold); color: var(--gold); }
.linkbtn { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 0.1rem 0.3rem; font-size: 0.82rem; } .linkbtn:hover { color: var(--gold); }
.skeleton { height: 120px; border-radius: 14px; margin-bottom: 0.9rem; background: linear-gradient(90deg, var(--panel-2), rgba(245, 242, 234, 0.12), var(--panel-2)); background-size: 200% 100%; animation: thsk 1.3s linear infinite; } @keyframes thsk { to { background-position: -200% 0; } }
#toast { position: fixed; left: 50%; bottom: 1.2rem; transform: translateX(-50%); z-index: 90; display: flex; flex-direction: column; gap: 0.4rem; align-items: center; pointer-events: none; }
#toast div { background: #1d1913; border: 1px solid var(--gold-dim); border-radius: 12px; padding: 0.55rem 0.9rem; font-size: 0.9rem; box-shadow: 0 8px 28px rgba(0, 0, 0, 0.5); } #toast .bad { border-color: var(--red); }
input[type=text], input[type=search], textarea, select { background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 0.5rem 0.75rem; color: var(--text); font: inherit; outline: none; width: 100%; } input:focus, textarea:focus, select:focus { border-color: var(--gold-dim); }
@media (pointer: coarse) { input[type=text], input[type=search], textarea, select { font-size: 16px; } }
#modal { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, 0.75); display: flex; align-items: center; justify-content: center; padding: 1rem; overflow-y: auto; }
#modal .box { width: 100%; max-width: 480px; background: #14110d; border: 1px solid var(--line); border-radius: 16px; padding: 1.2rem; max-height: 94vh; overflow-y: auto; } #modal .box.wide { max-width: 760px; } #modal h2 { margin: 0 0 0.6rem; }
#modal label { display: block; font-size: 0.78rem; color: var(--muted); margin: 0.8rem 0 0.25rem; font-weight: 600; } #modal .row { display: flex; gap: 0.5rem; justify-content: flex-end; margin-top: 1rem; flex-wrap: wrap; }
.chk { display: flex; gap: 0.5rem; align-items: flex-start; font-size: 0.9rem; cursor: pointer; margin-top: 0.7rem; } .chk input { margin-top: 0.25rem; accent-color: var(--gold); }

/* ---------- the lobby */
.th-hero { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; } .th-hero h1 { margin: 0; font-size: 1.5rem; } .th-hero .acts { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.th-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0.8rem; } .th-grid .th-card { margin: 0; }
.th-card { display: block; overflow: hidden; color: var(--text); cursor: pointer; transition: transform 0.12s, border-color 0.12s; } .th-card:hover { transform: translateY(-2px); border-color: var(--gold-dim); text-decoration: none; }
.th-card .thumb { height: 120px; background: radial-gradient(ellipse at 50% 0, #3a0d12, #0a0709 70%) center / cover; display: flex; align-items: center; justify-content: center; font-size: 2.2rem; position: relative; } .th-card .thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.9; }
.th-card .info { padding: 0.7rem 0.85rem 0.8rem; } .th-card h3 { margin: 0 0 0.15rem; font-size: 1rem; overflow-wrap: anywhere; } .th-card .sub { font-size: 0.82rem; color: var(--muted); } .th-card .np { font-size: 0.82rem; margin-top: 0.3rem; color: var(--gold); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.th-card .faces { display: flex; margin-top: 0.5rem; } .th-card .faces .av { width: 24px; height: 24px; margin-right: -6px; border: 2px solid #14110d; } .th-card .count { float: right; font-weight: 700; font-size: 0.85rem; } .th-card .lock { font-size: 0.72rem; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 0 0.4rem; margin-left: 0.3rem; }
.av { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; background: #2a2518; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; color: var(--gold); font-size: 0.8rem; }

/* ---------- the room */
.th-room { position: relative; isolation: isolate; contain: layout paint; border-radius: 16px; }
.th-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 0.8rem; flex-wrap: wrap; margin-bottom: 0.7rem; } .th-title { margin: 0; font-size: 1.6rem; line-height: 1.15; overflow-wrap: anywhere; } .th-sub { color: var(--muted); font-size: 0.88rem; } .th-acts { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.th-custom { padding: 0; overflow: hidden; background: transparent; border: 0; border-radius: 0; } .mp-frame { display: block; width: 100%; height: 120px; border: 0; background: transparent; }
.th-stage { position: relative; display: flex; align-items: stretch; justify-content: center; gap: 0; padding: 0.8rem 0 0.2rem; background: radial-gradient(ellipse at 50% 0%, rgba(253, 210, 31, 0.1), transparent 65%); border-radius: 16px 16px 0 0; }
.th-curtain { flex: 0 0 8%; min-width: 22px; background: repeating-linear-gradient(90deg, #5e0b16 0 12px, #7a1220 12px 22px, #4a0810 22px 32px); box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.6); border-radius: 0 0 18px 18px; position: relative; } .th-curtain.l { border-radius: 0 0 18px 4px; } .th-curtain.r { border-radius: 0 0 4px 18px; }
.th-curtain::after { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 16px; background: linear-gradient(#c79a2b, #7a5a12); border-bottom: 2px solid #2b1d04; }
.th-screenwrap { flex: 1 1 auto; min-width: 0; padding: 0 0.6rem; }
.th-screen { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; border: 4px solid #1a1612; border-radius: 6px; box-shadow: 0 0 0 2px #3b332a, 0 0 70px rgba(253, 210, 31, 0.18), 0 20px 50px rgba(0, 0, 0, 0.6); overflow: hidden; }
.th-screen iframe, .th-screen video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.th-idle { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 0.4rem; padding: 1rem; color: var(--muted); background: radial-gradient(ellipse at 50% 40%, #1b1410, #050404); } .th-idle b { font-size: 1.3rem; color: var(--text); letter-spacing: 0.04em; }
.th-gate { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, 0.6); z-index: 3; } .th-gate[hidden] { display: none; }
.th-bar { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; padding: 0.55rem 0.7rem; background: var(--panel); border: 1px solid var(--line); border-top: 0; } .th-now { flex: 1 1 200px; min-width: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .th-now small { display: block; color: var(--muted); font-weight: 500; }
.th-vol { display: inline-flex; align-items: center; gap: 0.35rem; } .th-vol input[type=range] { width: 90px; accent-color: var(--gold); padding: 0; }

/* the seats: two rows of chair backs, seen from the back of the cinema (the back row is nearer, so it is bigger and lower) */
.th-cinema { position: relative; padding: 1.6rem 0.4rem 0.4rem; background: linear-gradient(180deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.55)); border: 1px solid var(--line); border-top: 0; border-radius: 0 0 16px 16px; margin-bottom: 0.9rem; overflow: visible; overflow-x: clip; }
.th-rows { display: grid; grid-template-columns: repeat(8, 1fr); gap: 0.2rem 0.5rem; max-width: 880px; margin: 0 auto; }
.th-seat { position: relative; height: 104px; display: flex; align-items: flex-end; justify-content: center; cursor: default; } .th-seat.back { height: 128px; } .th-seat.free { cursor: pointer; } .th-seat.free:hover .th-chair { filter: brightness(1.7); }
.th-chair { position: relative; z-index: 2; width: 86%; height: 44px; background: linear-gradient(#2a1014, #12060a); border-radius: 14px 14px 5px 5px; box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.08), 0 -2px 10px rgba(0, 0, 0, 0.6); } .th-chair::before { content: ""; position: absolute; left: -7%; right: -7%; bottom: -6px; height: 10px; background: #0b0406; border-radius: 6px; }
.th-seat.back .th-chair { height: 54px; width: 92%; }
.th-p { position: absolute; left: 13%; right: 13%; bottom: 22px; display: flex; flex-direction: column; align-items: center; cursor: default; } .th-seat.back .th-p { bottom: 26px; left: 10%; right: 10%; }
.th-fig { position: relative; z-index: 1; width: 100%; filter: drop-shadow(0 0 3px var(--glow, #fdd21f)); transform-origin: 50% 100%; } .th-fig svg { display: block; width: 100%; height: auto; overflow: visible; }
.th-name { position: absolute; z-index: 3; bottom: -4px; left: 50%; transform: translateX(-50%); max-width: 100%; font-size: 0.62rem; font-weight: 700; color: #fff; text-shadow: 0 1px 3px #000, 0 0 6px #000; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 2px; pointer-events: none; }
.th-p .badge { position: absolute; top: -6px; right: 6%; font-size: 0.8rem; z-index: 3; filter: drop-shadow(0 1px 2px #000); } .th-p .vc { display: none; position: absolute; left: 50%; bottom: -21px; transform: translateX(-50%); z-index: 3; align-items: center; justify-content: center; min-width: 20px; height: 15px; padding: 0 5px; font-size: 0.6rem; line-height: 1; border-radius: 999px; background: rgba(0, 0, 0, 0.72); border: 1px solid rgba(255, 255, 255, 0.22); pointer-events: none; } .th-p .vc.on, .th-p .vc.off, .th-p .vc.muted { display: inline-flex; } .th-p .vc.off { opacity: 0.6; position: absolute; } .th-p .vc.off::after { content: ""; position: absolute; left: 3px; right: 3px; top: 50%; border-top: 2px solid #ff6a5f; transform: rotate(-35deg); } .th-p .vc.muted { border-color: #ff6a5f; background: rgba(90, 20, 15, 0.85); }
.th-p.speaking .vc.on { background: #2fb15a; border-color: #9fffbd; box-shadow: 0 0 8px #2fb15a; animation: thvc 0.6s ease-in-out infinite alternate; } @keyframes thvc { from { transform: translateX(-50%) scale(1); } to { transform: translateX(-50%) scale(1.18); } } @media (prefers-reduced-motion: reduce) { .th-p.speaking .vc.on { animation: none; } }
.th-p.me .th-name { color: var(--gold); } .th-p.host .th-fig { filter: drop-shadow(0 0 5px var(--glow, #fdd21f)) drop-shadow(0 0 2px #fff); }
.th-p.join .th-fig { animation: thpop 0.75s cubic-bezier(0.2, 1.4, 0.4, 1) both; } .th-p.leaving { pointer-events: none; } .th-p.leaving .th-fig, .th-p.leaving .th-name { animation: thout 0.5s ease-in both; }
.th-p.speaking .th-fig { animation: thbob 0.42s ease-in-out infinite alternate; filter: drop-shadow(0 0 10px var(--glow, #fdd21f)) drop-shadow(0 0 3px var(--glow, #fdd21f)); }
.th-p.speaking::before, .th-p.speaking::after { content: ""; position: absolute; left: 50%; top: 22%; width: 70%; aspect-ratio: 1; border: 2px solid var(--glow, #fdd21f); border-radius: 50%; transform: translate(-50%, -50%) scale(0.6); opacity: 0; animation: thwave 1.2s ease-out infinite; pointer-events: none; } .th-p.speaking::after { animation-delay: 0.6s; }
.th-p.clickable { cursor: pointer; }
@keyframes thpop { 0% { transform: translateY(45%) scale(0.2); opacity: 0; } 55% { transform: translateY(-10%) scale(1.12); opacity: 1; } 100% { transform: none; opacity: 1; } }
@keyframes thout { to { transform: translateY(55%) scale(0.5); opacity: 0; } }
@keyframes thbob { from { transform: translateY(0) rotate(-2deg); } to { transform: translateY(-5%) rotate(2deg); } }
@keyframes thwave { 0% { transform: translate(-50%, -50%) scale(0.6); opacity: 0.8; } 100% { transform: translate(-50%, -50%) scale(1.9); opacity: 0; } }

/* the side: queue, suggestions, adding a link */
.th-side { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem; } .th-side .card { margin: 0; } .th-side h3 { margin: 0 0 0.5rem; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.th-add { display: flex; gap: 0.4rem; } .th-add input { flex: 1; min-width: 0; }
.th-q { display: flex; align-items: center; gap: 0.6rem; padding: 0.4rem 0; border-top: 1px solid var(--line); } .th-q:first-of-type { border-top: 0; } .th-q img, .th-q .ph { width: 64px; height: 36px; border-radius: 6px; object-fit: cover; background: #1d1913; flex: none; display: flex; align-items: center; justify-content: center; font-size: 1rem; }
.th-q .t { flex: 1; min-width: 0; font-size: 0.88rem; font-weight: 600; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; } .th-q .t small { display: block; font-weight: 500; color: var(--muted); } .th-q .a { display: flex; gap: 0.1rem; flex: none; }
.th-empty { color: var(--muted); font-size: 0.88rem; padding: 0.4rem 0; }
.th-menu { position: fixed; z-index: 70; background: #1a1712; border: 1px solid var(--line); border-radius: 12px; padding: 0.3rem; box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6); min-width: 170px; } .th-menu button { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 0.5rem 0.7rem; border-radius: 8px; cursor: pointer; } .th-menu button:hover { background: var(--panel-2); } .th-menu .danger { color: var(--red); } .th-menu .hd { padding: 0.4rem 0.7rem; font-weight: 700; font-size: 0.85rem; border-bottom: 1px solid var(--line); margin-bottom: 0.2rem; }

/* the silhouette editor */
.ce { display: grid; grid-template-columns: 150px 1fr; gap: 1rem; } .ce-prev { background: radial-gradient(ellipse at 50% 100%, #2a1014, #0a0508); border-radius: 12px; padding: 0.6rem; display: flex; align-items: flex-end; justify-content: center; height: 180px; } .ce-prev .th-fig { width: 100px; }
.ce-opt { margin-bottom: 0.6rem; } .ce-opt .l { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); margin-bottom: 0.25rem; font-weight: 700; } .ce-opt .chips { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.ce-chip { background: var(--panel-2); border: 1px solid var(--line); border-radius: 999px; padding: 0.2rem 0.65rem; font-size: 0.8rem; cursor: pointer; text-transform: capitalize; } .ce-chip.on { border-color: var(--gold); color: var(--gold); background: rgba(253, 210, 31, 0.12); }
.ce-sw { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); cursor: pointer; padding: 0; } .ce-sw.on { border-color: #fff; box-shadow: 0 0 0 2px var(--gold); } input[type=color] { width: 34px; height: 28px; padding: 0; border: 0; background: none; cursor: pointer; border-radius: 6px; }

/* the room designer */
.ed-tabs { display: flex; gap: 0.3rem; margin-bottom: 0.6rem; } .ed-tabs button { background: none; border: 1px solid transparent; border-radius: 999px; padding: 0.3rem 0.8rem; color: var(--muted); cursor: pointer; font-weight: 600; } .ed-tabs button.on { color: var(--gold); border-color: var(--gold-dim); background: rgba(253, 210, 31, 0.08); }
.ed-pane.hidden { display: none; } textarea.code { font: 0.82rem/1.45 Consolas, "Courier New", monospace; min-height: 240px; white-space: pre; resize: vertical; } .presets { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 0.5rem; } .preset { text-align: left; border: 1px solid var(--line); background: var(--panel-2); border-radius: 12px; padding: 0.6rem 0.7rem; cursor: pointer; } .preset:hover { border-color: var(--gold-dim); } .preset b { display: block; } .preset span { font-size: 0.78rem; color: var(--muted); }

@media (max-width: 760px) {
  .th-side { grid-template-columns: 1fr; } .th-title { font-size: 1.3rem; } .th-rows { grid-template-columns: repeat(4, 1fr); gap: 0.1rem 0.4rem; } .th-seat { height: 98px; } .th-seat.back { height: 112px; } .th-p { left: 8%; right: 8%; } .th-seat.back .th-p { left: 6%; right: 6%; }
  .th-name { font-size: 0.62rem; } .ce { grid-template-columns: 1fr; } .top nav a.hide-s { display: none; } .th-curtain { flex-basis: 4%; min-width: 12px; } .th-screenwrap { padding: 0 0.3rem; }
}
@media (prefers-reduced-motion: reduce) { .th-p.join .th-fig, .th-p.speaking .th-fig, .th-p.speaking::before, .th-p.speaking::after, .th-p.leaving .th-fig { animation: none; } }
.th-upload { display: flex; flex-direction: column; gap: 0.35rem; align-items: flex-start; margin-top: 0.5rem; } .th-prog { position: relative; width: 100%; height: 20px; border-radius: 999px; background: rgba(255, 255, 255, 0.12); overflow: hidden; } .th-prog i { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--gold); transition: width 0.2s; } .th-prog span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 0.72rem; font-weight: 700; color: #111; mix-blend-mode: normal; text-shadow: 0 0 3px rgba(255, 255, 255, 0.7); }
.th-share { position: absolute; inset: 0; z-index: 7; background: #000; display: flex; align-items: center; justify-content: center; flex-direction: column; text-align: center; } .th-share[hidden], .th-share video[hidden], .th-sharemsg[hidden], .th-sharegate[hidden] { display: none; }
.th-share video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; } .th-sharemsg { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 0.5rem; align-items: center; padding: 1rem; } .th-sharemsg b { font-size: 1.2rem; } .th-sharemsg span { color: var(--muted); } .th-sharegate { position: absolute; z-index: 2; bottom: 1rem; left: 50%; transform: translateX(-50%); }
/* the room chat */
.th-side .th-chat { grid-column: 1 / -1; } .th-log { height: 210px; overflow-y: auto; margin-bottom: 0.5rem; padding: 0.4rem 0.5rem; background: rgba(0, 0, 0, 0.28); border: 1px solid var(--line); border-radius: 10px; font-size: 0.88rem; line-height: 1.4; overflow-wrap: anywhere; }
.th-msg { padding: 0.12rem 0; } .th-msg b { color: var(--accent, var(--gold)); font-weight: 700; } .th-msg.me b { color: var(--gold); } .th-msg span { color: var(--text, #f5ecd2); }
.th-bubble { position: absolute; z-index: 6; bottom: calc(100% - 4px); left: 50%; transform: translateX(-50%); width: max-content; max-width: 150px; padding: 0.3rem 0.5rem; background: #fff; color: #14110d; font-size: 0.72rem; font-weight: 600; line-height: 1.25; border-radius: 10px; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.55); pointer-events: none; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; animation: thbub 6.5s ease both; }
@keyframes thbub { 0% { opacity: 0; transform: translateX(-50%) translateY(6px) scale(0.85); } 6% { opacity: 1; transform: translateX(-50%) scale(1); } 90% { opacity: 1; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .th-bubble { animation: none; } }

/* ===== trivia game nights ===== */
.th-room.trivia .th-screen { aspect-ratio: auto; min-height: 400px; display: flex; } .th-room.trivia .th-idle, .th-room.trivia #thMedia, .th-room.trivia .th-gate { display: none; }
.tv-screen { position: relative; flex: 1; width: 100%; display: flex; flex-direction: column; justify-content: center; padding: 1.2rem 1.4rem; color: var(--text); background: radial-gradient(ellipse at 50% 0%, #2a1c12, #0a0706 72%); overflow: hidden; }
.tv-body { display: flex; flex-direction: column; gap: 0.8rem; } .tv-hd { display: flex; justify-content: space-between; align-items: center; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); } .tv-pts { background: var(--gold); color: #1a1500; border-radius: 999px; padding: 0.15rem 0.7rem; font-weight: 800; letter-spacing: 0; }
.tv-q { font-size: clamp(1.25rem, 3.2vw, 2.1rem); font-weight: 800; line-height: 1.25; text-align: center; overflow-wrap: anywhere; } .tv-img { max-width: 100%; max-height: 190px; object-fit: contain; align-self: center; border-radius: 10px; }
.tv-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; } .tv-choice { display: flex; align-items: center; gap: 0.6rem; padding: 0.65rem 0.8rem; border: 2px solid var(--line); border-radius: 12px; background: rgba(255, 255, 255, 0.06); font-weight: 700; overflow-wrap: anywhere; } .tv-choice b { width: 1.8rem; height: 1.8rem; border-radius: 50%; background: var(--gold); color: #1a1500; display: inline-flex; align-items: center; justify-content: center; flex: none; } .tv-choice span { flex: 1; } .tv-choice em { font-style: normal; opacity: 0.75; font-size: 0.85rem; }
.tv-choice.right { border-color: #6dffa0; background: rgba(80, 220, 130, 0.22); } .tv-choice.dim { opacity: 0.42; }
.tv-timer { position: relative; height: 22px; border-radius: 999px; background: rgba(255, 255, 255, 0.12); overflow: hidden; } .tv-timer i { position: absolute; inset: 0 auto 0 0; width: 100%; background: var(--gold); transition: width 0.28s linear; } .tv-timer span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 0.8rem; color: #111; text-shadow: 0 0 4px rgba(255, 255, 255, 0.6); } .tv-timer.warn i { background: #ff5b4d; }
.tv-status { text-align: center; color: var(--muted); font-size: 0.9rem; } .tv-banner { text-align: center; font-weight: 800; font-size: 1.15rem; color: var(--gold); padding: 0.4rem; }
.tv-answer { text-align: center; font-size: 1.5rem; } .tv-answer b { color: #6dffa0; } .tv-answer small { display: block; font-size: 0.8rem; color: var(--muted); } .tv-note { text-align: center; color: var(--muted); font-style: italic; } .tv-right { text-align: center; font-weight: 700; }
.tv-center { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 0.5rem; } .tv-logo { font-size: 3.2rem; } .tv-title { margin: 0; font-size: clamp(1.4rem, 3.5vw, 2.4rem); } .tv-sub { margin: 0; color: var(--muted); } .tv-wait { color: var(--gold); font-weight: 700; animation: thpulse 1.6s ease-in-out infinite; } @keyframes thpulse { 50% { opacity: 0.45; } }
.tv-teams { display: flex; gap: 0.5rem; flex-wrap: wrap; justify-content: center; } .tv-team { border: 2px solid var(--tc); border-radius: 999px; padding: 0.2rem 0.8rem; font-weight: 700; box-shadow: 0 0 12px var(--tc); }
.tv-board { display: grid; gap: 0.25rem; width: min(440px, 100%); align-self: center; } .tv-row { display: flex; align-items: center; gap: 0.5rem; padding: 0.3rem 0.6rem; border-radius: 8px; background: rgba(255, 255, 255, 0.07); } .tv-row .rk { width: 1.4rem; color: var(--muted); font-weight: 700; } .tv-row .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .tv-row .nm small { color: var(--muted); } .tv-row .sc { font-weight: 800; color: var(--gold); } .dot { display: inline-block; width: 0.7rem; height: 0.7rem; border-radius: 50%; margin-right: 0.35rem; vertical-align: middle; flex: none; }
.tv-podium { display: flex; gap: 0.6rem; align-items: flex-end; justify-content: center; margin: 0.5rem 0; } .tv-pod { display: flex; flex-direction: column; align-items: center; gap: 0.15rem; padding: 0.6rem 1rem; border-radius: 12px; background: rgba(255, 255, 255, 0.08); min-width: 110px; max-width: 170px; overflow-wrap: anywhere; } .tv-pod b { font-size: 1.8rem; } .tv-pod em { font-style: normal; font-weight: 800; color: var(--gold); font-size: 1.2rem; } .tv-pod.p1 { padding-bottom: 1.6rem; border: 2px solid var(--gold); } .tv-pod.p2 { padding-bottom: 1rem; } .tv-pod.p3 { padding-bottom: 0.6rem; }
/* the player's panel and the host's console */
.tv-panel { margin: 0; } .tv-player, .tv-console { border-radius: 0; border-top: 0; margin: 0; }
.tv-player { display: flex; flex-direction: column; gap: 0.6rem; } .tv-hint { color: var(--muted); } .tv-myteam { font-weight: 600; padding-left: 0.6rem; border-left: 5px solid var(--tc); } .tv-pick { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; } .tv-teambtn { border: 2px solid var(--tc); background: rgba(255, 255, 255, 0.06); color: var(--text); border-radius: 999px; padding: 0.3rem 0.9rem; font-weight: 700; cursor: pointer; } .tv-teambtn.on { background: var(--tc); color: #111; }
.tv-form { display: flex; gap: 0.5rem; } .tv-form input { flex: 1; min-width: 0; font-size: 1rem; } .tv-sent { padding: 0.5rem 0.7rem; border-radius: 10px; background: rgba(109, 255, 160, 0.1); border: 1px solid rgba(109, 255, 160, 0.35); overflow-wrap: anywhere; }
.tv-pickrow { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; } .tv-pickbtn { display: flex; align-items: center; gap: 0.5rem; text-align: left; padding: 0.7rem 0.8rem; border: 2px solid var(--line); border-radius: 12px; background: var(--panel-2); color: var(--text); font: inherit; font-weight: 700; cursor: pointer; min-height: 52px; overflow-wrap: anywhere; } .tv-pickbtn b { width: 1.8rem; height: 1.8rem; border-radius: 50%; background: var(--gold); color: #1a1500; display: inline-flex; align-items: center; justify-content: center; flex: none; } .tv-pickbtn.on { border-color: var(--gold); background: rgba(253, 210, 31, 0.16); } .tv-pickbtn[disabled] { opacity: 0.6; cursor: default; }
.tv-res { font-weight: 800; font-size: 1.1rem; } .tv-res.good { color: #6dffa0; } .tv-res.bad { color: var(--red); } .tv-res.none { color: var(--muted); }
.tv-console { display: flex; flex-direction: column; gap: 0.7rem; } .tv-chead { display: flex; justify-content: space-between; gap: 0.6rem; flex-wrap: wrap; align-items: center; } .tv-ctl { display: flex; gap: 0.4rem; flex-wrap: wrap; } .tv-pill { background: var(--panel-2); border: 1px solid var(--line); border-radius: 999px; padding: 0.1rem 0.6rem; font-size: 0.78rem; margin: 0 0.3rem; } .tv-ht { color: var(--gold); font-weight: 700; }
.tv-key { display: flex; flex-direction: column; gap: 0.15rem; padding: 0.55rem 0.8rem; border-radius: 10px; background: rgba(253, 210, 31, 0.1); border: 1px solid var(--gold-dim); } .tv-key small { color: var(--muted); } .tv-key b { font-size: 1.15rem; color: var(--gold); overflow-wrap: anywhere; }
.tv-sec h4 { margin: 0 0 0.35rem; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); } .tv-sec h4 small { text-transform: none; letter-spacing: 0; } .tv-sec summary { cursor: pointer; font-weight: 700; color: var(--muted); }
.tv-subs { max-height: 300px; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; } .tv-tbl { width: 100%; border-collapse: collapse; font-size: 0.9rem; } .tv-tbl td { padding: 0.32rem 0.5rem; border-bottom: 1px solid rgba(245, 242, 234, 0.07); vertical-align: middle; } .tv-tbl .who { white-space: nowrap; max-width: 150px; overflow: hidden; text-overflow: ellipsis; } .tv-tbl .who small { color: var(--muted); } .tv-tbl .ans { width: 100%; overflow-wrap: anywhere; font-weight: 600; } .tv-tbl .ms, .tv-tbl .rk { color: var(--muted); white-space: nowrap; } .tv-tbl .mt { color: #6dffa0; font-size: 0.75rem; white-space: nowrap; } .tv-tbl .gr { white-space: nowrap; text-align: right; } .tv-tbl select { width: auto; padding: 0.25rem 0.5rem; }
.gb { width: 32px; height: 28px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); cursor: pointer; font-weight: 800; } .gb.ok.on { background: #2fb15a; border-color: #6dffa0; color: #fff; } .gb.no.on { background: #c0392b; border-color: #ff8c7f; color: #fff; } .gb:hover { border-color: var(--gold); }
.th-p.teamed .th-name { box-shadow: 0 3px 0 var(--team); border-radius: 3px; } .th-p.teamed .th-fig { filter: drop-shadow(0 0 6px var(--team)); } .th-p .tvtick { position: absolute; top: 14px; right: 10%; z-index: 5; width: 16px; height: 16px; border-radius: 50%; background: #2fb15a; color: #fff; font-size: 0.65rem; font-weight: 800; display: flex; align-items: center; justify-content: center; border: 1px solid #fff; }
/* sets manager, set editor, launcher */
.tv-sets { display: grid; gap: 0.4rem; margin: 0.4rem 0; } .tv-set { display: flex; align-items: center; gap: 0.6rem; justify-content: space-between; flex-wrap: wrap; padding: 0.6rem 0.75rem; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-2); } .tv-set .t { display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; } .tv-set small { color: var(--muted); } .tv-set .a { display: flex; align-items: center; gap: 0.35rem; flex-wrap: wrap; }
.tvq { border: 1px solid var(--line); border-radius: 12px; padding: 0.65rem; margin: 0.6rem 0; background: rgba(255, 255, 255, 0.03); display: grid; gap: 0.45rem; } .tvq-h { display: flex; align-items: center; gap: 0.4rem; } .tvq-h b { color: var(--gold); min-width: 1.4rem; } .tvq-h select { width: auto; padding: 0.25rem 0.5rem; } .tvq-h .sp { flex: 1; }
.tvq-ch { display: grid; gap: 0.35rem; } .tvc { display: flex; align-items: center; gap: 0.5rem; margin: 0; } .tvc input[type=radio] { accent-color: var(--gold); width: 1.1rem; height: 1.1rem; flex: none; } .tvq-o { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.45rem; } .tvq-o label { margin: 0; font-size: 0.72rem; } .tvq-o input { margin-top: 0.2rem; }
.tv-imp { margin: 0.6rem 0; } .tv-imp summary { cursor: pointer; color: var(--muted); font-weight: 600; } .tv-g2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem; } .tv-teambox { border: 1px solid var(--line); border-radius: 12px; padding: 0.2rem 0.8rem 0.8rem; margin-top: 0.5rem; } .tv-names { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 0.4rem; }
@media (max-width: 760px) { .tv-choices, .tv-pickrow { grid-template-columns: 1fr; } .tvq-o, .tv-g2 { grid-template-columns: 1fr 1fr; } .th-room.trivia .th-screen { min-height: 320px; } .tv-screen { padding: 0.8rem; } .tv-form { flex-direction: column; } .tv-tbl .who { max-width: 90px; } }
@media (prefers-reduced-motion: reduce) { .tv-wait { animation: none; } .tv-timer i { transition: none; } }
#modal .tvc { display: flex; margin: 0; } #modal .tvq-o label { margin: 0; font-size: 0.72rem; } #modal .tv-teambox label.chk, #modal label.chk { display: flex; }

/* a character someone drew: a picture in the same square box as the built-in figure, so it has the same size, glow and moves */
.th-fig.drawn img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; user-select: none; -webkit-user-drag: none; pointer-events: none; }
.dr { display: grid; grid-template-columns: minmax(0, 288px) 1fr; gap: 1rem; align-items: start; } @media (max-width: 640px) { .dr { grid-template-columns: 1fr; } }
.dr-board { position: relative; width: 100%; max-width: 288px; aspect-ratio: 1; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: repeating-conic-gradient(#ffffff 0% 25%, #ededed 0% 50%) 0 0 / 24px 24px; }
.dr-guide { position: absolute; inset: 0; opacity: 0.3; pointer-events: none; } .dr-guide svg { display: block; width: 100%; height: 100%; }
.dr-cv { position: absolute; inset: 0; width: 100%; height: 100%; cursor: crosshair; touch-action: none; }
.dr-tools { display: flex; flex-direction: column; gap: 0.6rem; min-width: 0; } .dr-row { display: flex; flex-wrap: wrap; gap: 0.3rem; align-items: center; }
.dr-row input[type=range] { width: 8rem; vertical-align: middle; } .dr-row input[type=color] { width: 2rem; height: 1.8rem; padding: 0; border: 1px solid var(--line); border-radius: 6px; background: none; }
.dr .ce-chip { text-transform: none; }

/* My characters: the saved ones as small cards (wear, edit, export, delete), then the editor below */
.cw { display: grid; grid-template-columns: repeat(auto-fill, minmax(8.2rem, 1fr)); gap: 0.5rem; margin: 0.4rem 0 0.8rem; }
.cw-card { display: flex; flex-direction: column; align-items: center; gap: 0.25rem; padding: 0.5rem 0.4rem; border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 255, 255, 0.03); min-width: 0; } .cw-card.edit { border-color: var(--gold); background: rgba(253, 210, 31, 0.07); }
.cw-fig { width: 56px; height: 56px; display: flex; align-items: flex-end; justify-content: center; } .cw-fig .th-fig { width: 56px; }
.cw-nm { max-width: 100%; font-size: 0.82rem; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cw-acts { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.1rem 0.5rem; font-size: 0.75rem; } .cw-acts .linkbtn { font-size: 0.75rem; } .cw-acts .bad { color: #ef6a54; }
.cw-new { cursor: pointer; justify-content: center; color: var(--muted); font: inherit; font-size: 0.8rem; border-style: dashed; min-height: 6rem; } .cw-new span { font-size: 1.6rem; line-height: 1; } .cw-new:hover { color: var(--text); border-color: var(--gold-dim, var(--gold)); }
.ce-chip[data-a] { text-transform: none; }
