/* Spioen on a phone: one-handed, big buttons, dark like the TV. Modern browsers only. */
@font-face { font-family: 'Manrope'; font-weight: 700; src: url(/tv/fonts/manrope-700.woff2) format('woff2'); }
@font-face { font-family: 'Manrope'; font-weight: 800; src: url(/tv/fonts/manrope-800.woff2) format('woff2'); }
:root { --bg: #111a35; --ink: #fdf6e3; --dim: #b9c2dc; --amber: #fca311; --navy: #14213d; --coral: #ef6f5e; --mint: #5ccf9a; --panel: rgba(253,246,227,.08); }
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { min-height: 100%; }
body { background: radial-gradient(ellipse at 50% 0%, #1d2b52, var(--bg) 70%) fixed; color: var(--ink); font: 700 17px/1.35 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  -webkit-user-select: none; user-select: none; overscroll-behavior: none; }
#app { min-height: 100vh; display: flex; flex-direction: column; }
button { font: inherit; color: inherit; border: 0; background: var(--panel); border-radius: 18px; cursor: pointer; touch-action: manipulation; }
button:active { transform: scale(.97); }
button:disabled { opacity: .5; }
.av { display: block; width: 56px; height: 56px; border-radius: 50%; }
.av.me { width: 36px; height: 36px; }
.av.sm { width: 32px; height: 32px; display: inline-block; vertical-align: middle; }
.av.big { width: 120px; height: 120px; border: 5px solid var(--ink); }
.av.off { opacity: .35; }
.av.winner { border-color: var(--amber); box-shadow: 0 0 0 8px rgba(252,163,17,.3); }
h1 { font-size: 28px; font-weight: 800; line-height: 1.15; }
h2 { font-size: 21px; font-weight: 800; }
.note { color: var(--dim); font-size: 15px; text-align: center; }
.big { font-size: 21px; text-align: center; }

.bar { display: flex; align-items: center; gap: 10px; padding: 10px 16px; padding-top: calc(10px + env(safe-area-inset-top)); background: rgba(11,18,38,.6); position: sticky; top: 0; z-index: 2; }
.bar b { flex: 1; font-size: 18px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dot { width: 12px; height: 12px; border-radius: 50%; background: var(--coral); }
.dot.ok { background: var(--mint); }
.dot.warn { background: var(--amber); }
.lang { padding: 8px 14px; font-size: 15px; }
.body { flex: 1; display: flex; flex-direction: column; gap: 14px; padding: 16px 16px calc(24px + env(safe-area-inset-bottom)); max-width: 560px; width: 100%; margin: 0 auto; }
.center { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; flex: 1; }
.warnline, .pausedline { background: var(--coral); color: var(--navy); border-radius: 12px; padding: 8px 12px; text-align: center; font-size: 15px; }
.pausedline { background: var(--amber); }
.spinner { width: 48px; height: 48px; border-radius: 50%; border: 6px solid var(--panel); border-top-color: var(--amber); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* join form */
.form { display: flex; flex-direction: column; gap: 12px; padding: 20px 16px calc(24px + env(safe-area-inset-bottom)); max-width: 560px; width: 100%; margin: 0 auto; }
.brand { text-align: center; margin-bottom: 6px; }
.brand h1 { font-size: 44px; color: var(--amber); letter-spacing: 1px; }
.brand p { color: var(--dim); }
label { display: flex; flex-direction: column; gap: 6px; }
input { font: inherit; font-size: 22px; padding: 12px 14px; border-radius: 14px; border: 3px solid transparent; background: var(--ink); color: var(--navy); -webkit-user-select: text; user-select: text; }
input:focus { outline: none; border-color: var(--amber); }
.lbl { margin-top: 4px; }
.seg { display: flex; gap: 10px; }
.seg button { flex: 1; padding: 14px; border: 3px solid transparent; }
.seg button.on { border-color: var(--amber); background: rgba(252,163,17,.15); }
.avatars { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.avatars button { padding: 4px; border-radius: 50%; border: 3px solid transparent; background: none; }
.avatars button.on { border-color: var(--amber); }
.avatars .av { width: 100%; height: auto; aspect-ratio: 1; }
.primary { background: var(--amber); color: var(--navy); font-size: 21px; font-weight: 800; padding: 18px 20px; border-radius: 20px; width: 100%; }
.ghost { background: none; color: var(--dim); text-decoration: underline; padding: 10px; }
.faces { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.faces .av { width: 44px; height: 44px; }

/* the secret card */
.card { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 22px 18px; border-radius: 24px; width: 100%; text-align: center; position: relative; }
.card.closed { background: repeating-linear-gradient(45deg, #1d2b52, #1d2b52 14px, #22325e 14px, #22325e 28px); border: 3px dashed rgba(253,246,227,.3); min-height: 150px; justify-content: center; }
.card .seal { width: 54px; height: 54px; line-height: 54px; border-radius: 50%; background: var(--amber); color: var(--navy); font-size: 32px; font-weight: 800; }
.card.closed b { font-size: 20px; }
.card small { color: inherit; opacity: .75; font-size: 15px; }
.card.open { background: var(--ink); color: var(--navy); min-height: 150px; }
.card .what { font-size: 30px; font-weight: 800; line-height: 1.15; margin-bottom: 8px; }
.card .role { font-size: 20px; }
.card i { position: absolute; right: 14px; top: 10px; font-style: normal; font-size: 13px; opacity: .6; }
.card.spy { background: var(--coral); color: var(--navy); }
.card .hat { width: 90px; height: 72px; margin-bottom: 2px; }

.clock { align-self: center; font-size: 40px; font-weight: 800; color: var(--amber); }
.turn { text-align: center; color: var(--dim); }
.ask { display: flex; flex-direction: column; gap: 10px; background: rgba(252,163,17,.12); border: 3px solid var(--amber); border-radius: 22px; padding: 14px; }
.ask h2 { text-align: center; }
.ask.vote { background: rgba(239,111,94,.12); border-color: var(--coral); }
.people { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.people button { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px; border: 3px solid transparent; min-height: 96px; }
.people button b { font-size: 15px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.people button.on { border-color: var(--coral); background: rgba(239,111,94,.25); }
.actions { display: flex; flex-direction: column; gap: 10px; }
.votebtn { padding: 18px; font-size: 20px; background: rgba(239,111,94,.2); border: 3px solid var(--coral); }
.spybtn { padding: 18px; font-size: 20px; background: var(--coral); color: var(--navy); font-weight: 800; width: 100%; }
.list { background: var(--panel); border-radius: 18px; padding: 12px 16px; }
.list summary { font-size: 16px; color: var(--dim); }
.list ul { list-style: none; columns: 2; column-gap: 14px; margin-top: 8px; font-size: 15px; }
.list li { padding: 3px 0; break-inside: avoid; }
.picker { display: flex; flex-direction: column; gap: 10px; }
.picker h2 { text-align: center; color: var(--coral); }
.places { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.places button { padding: 14px 8px; font-size: 16px; min-height: 64px; }
.sure .big { font-size: 28px; background: var(--ink); color: var(--navy); border-radius: 18px; padding: 14px 20px; }
.tv { width: 90px; height: 60px; border: 6px solid var(--amber); border-radius: 10px; position: relative; }
.tv::after { content: ''; position: absolute; left: 50%; bottom: -18px; width: 40px; height: 6px; margin-left: -20px; background: var(--amber); border-radius: 3px; }
.end h1 { color: var(--amber); }
.placebox { background: var(--ink); color: var(--navy); border-radius: 20px; padding: 14px 24px; display: flex; flex-direction: column; }
.placebox b { font-size: 26px; }
.board { list-style: none; width: 100%; display: flex; flex-direction: column; gap: 6px; }
.board li { display: flex; align-items: center; gap: 10px; background: var(--panel); border-radius: 30px; padding: 4px 16px 4px 4px; }
.board li b { flex: 1; text-align: left; }
.board li.me { background: rgba(252,163,17,.2); }
