* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #0b1026; color: #eef1f8; font: 17px/1.5 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; touch-action: manipulation; -webkit-user-select: none; user-select: none; }
canvas { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
.hud { position: fixed; top: calc(14px + env(safe-area-inset-top)); left: 0; right: 0; text-align: center; pointer-events: none; }
.score { font-size: 64px; font-weight: 800; letter-spacing: -0.04em; line-height: 1; text-shadow: 0 6px 30px rgba(0, 0, 0, .45); }
.best { font-size: 14px; color: #aab4d4; margin-top: 4px; }
.flash { position: fixed; top: 32%; left: 0; right: 0; text-align: center; font-size: 26px; font-weight: 800; letter-spacing: .02em; color: #7ef0c0; opacity: 0; pointer-events: none; transition: opacity .35s ease, transform .35s ease; transform: translateY(8px); }
.flash.on { opacity: 1; transform: none; }
.panel { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(92vw, 400px); max-height: 88vh; overflow: auto; padding: 24px; border-radius: 26px; background: rgba(17, 23, 48, .82); border: 1px solid rgba(255, 255, 255, .14); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .8); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); text-align: center; -webkit-user-select: text; user-select: text; }
.panel[hidden] { display: none; }
h1 { font-size: 36px; letter-spacing: -0.035em; margin: 0 0 8px; background: linear-gradient(92deg, #9db4ff, #c7b6ff 55%, #7ef0c0); -webkit-background-clip: text; background-clip: text; color: transparent; }
h2 { font-size: 34px; letter-spacing: -0.03em; margin: 2px 0 4px; }
h3 { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: #9db4ff; margin: 18px 0 8px; }
p { margin: 0 0 14px; color: #c3cce2; }
.small { font-size: 14px; color: #94a0bd; margin: 8px 0 0; min-height: 1em; }
.tag { display: inline-block; font-size: 12px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; color: #7ef0c0; background: rgba(126, 240, 192, .12); padding: 4px 10px; border-radius: 99px; margin: 0 0 6px; }
.go { font: inherit; font-weight: 750; font-size: 19px; width: 100%; min-height: 54px; border: 0; border-radius: 16px; color: #fff; background: linear-gradient(135deg, #2f5bff, #6a4dff); box-shadow: 0 14px 30px -12px #2f5bff; cursor: pointer; margin-top: 6px; }
.go:active { transform: scale(.98); }
.go:disabled { opacity: .55; }
form { display: flex; gap: 8px; margin-top: 12px; }
input { font: inherit; flex: 1 1 auto; min-width: 0; padding: 12px 14px; border-radius: 14px; border: 1px solid rgba(255, 255, 255, .18); background: rgba(255, 255, 255, .07); color: #fff; }
input::placeholder { color: #8f9ab8; }
input:focus { outline: 2px solid #7c96ff; outline-offset: 1px; }
.small-go { width: auto; flex: 0 0 auto; min-height: 0; padding: 0 16px; font-size: 16px; margin: 0; box-shadow: none; }
ol { list-style: none; margin: 0 0 14px; padding: 0; text-align: left; counter-reset: n; }
ol li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 4px; border-top: 1px solid rgba(255, 255, 255, .09); counter-increment: n; font-variant-numeric: tabular-nums; }
ol li::before { content: counter(n); flex: 0 0 22px; color: #8f9ab8; font-weight: 700; }
ol li span { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
ol li b { color: #7ef0c0; }
ol li.me span { color: #fff; font-weight: 700; }
ol li.quiet { color: #8f9ab8; justify-content: center; }
ol li.quiet::before { content: none; }
@media (prefers-reduced-motion: reduce) { .flash { transition: none; } }

/* players, pictures and chat */
.av { flex: 0 0 34px; width: 34px; height: 34px; border-radius: 50%; display: inline-grid; place-items: center; font-weight: 800; font-size: 15px; color: #fff; background: #4b5fd6; overflow: hidden; }
.av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.av.big { flex-basis: 84px; width: 84px; height: 84px; font-size: 34px; box-shadow: 0 0 0 3px rgba(255, 255, 255, .16); }
.av.h0 { background: #4b5fd6; } .av.h1 { background: #8a4bd6; } .av.h2 { background: #d64b8f; } .av.h3 { background: #d6814b; } .av.h4 { background: #2f9e77; } .av.h5 { background: #2f86c9; }
.me { font: inherit; width: 100%; display: flex; align-items: center; gap: 12px; text-align: left; padding: 10px 12px; margin: 2px 0 10px; border-radius: 16px; border: 1px solid rgba(255, 255, 255, .16); background: rgba(255, 255, 255, .06); color: #fff; cursor: pointer; }
.me .who { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.me .who b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me .who span { font-size: 13px; color: #94a0bd; }
.me .edit { font-size: 13px; font-weight: 700; color: #9db4ff; }
.alt { font: inherit; font-weight: 700; font-size: 16px; display: block; width: 100%; min-height: 48px; margin-top: 10px; border-radius: 14px; border: 1px solid rgba(255, 255, 255, .2); background: transparent; color: #fff; cursor: pointer; position: relative; }
.alt .dot { position: absolute; top: 12px; right: 14px; width: 10px; height: 10px; border-radius: 50%; background: #ff6b6b; }
.alt .dot[hidden] { display: none; }
.alt.file { display: grid; place-items: center; padding: 0 14px; margin: 0; min-height: 44px; width: auto; }
.alt.file input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; padding: 0; border: 0; cursor: pointer; }
.link { font: inherit; font-size: 14.5px; background: none; border: 0; color: #9db4ff; padding: 10px 4px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.pick { display: flex; align-items: center; justify-content: center; gap: 16px; margin: 10px 0 6px; }
.pick div { display: flex; flex-direction: column; align-items: flex-start; }
ol li { align-items: center; }
ol li .av { flex-basis: 28px; width: 28px; height: 28px; font-size: 13px; }
.panel.tall { display: flex; flex-direction: column; height: min(86vh, 640px); padding: 18px; text-align: left; }
.panel.tall[hidden] { display: none; }
.bar { display: flex; align-items: center; justify-content: space-between; }
.bar h2 { font-size: 24px; margin: 0; }
.x { font: inherit; font-size: 26px; line-height: 1; width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .1); color: #fff; cursor: pointer; }
.msgs { flex: 1 1 auto; overflow-y: auto; margin: 10px 0; padding-right: 2px; -webkit-overflow-scrolling: touch; }
.msgs .quiet { text-align: center; color: #8f9ab8; margin-top: 30px; }
.m { display: flex; gap: 10px; margin: 0 0 12px; }
.m .b { min-width: 0; }
.m .b b { font-size: 13.5px; color: #9db4ff; display: block; }
.m .b b small { font-weight: 400; color: #7d88a8; margin-left: 6px; }
.m .b span { display: inline-block; padding: 8px 12px; border-radius: 4px 16px 16px 16px; background: rgba(255, 255, 255, .09); color: #eef1f8; overflow-wrap: anywhere; }
.m.mine { flex-direction: row-reverse; }
.m.mine .b { text-align: right; }
.m.mine .b span { background: linear-gradient(135deg, #2f5bff, #6a4dff); border-radius: 16px 4px 16px 16px; text-align: left; }
ol li.me-row span { color: #fff; font-weight: 700; }
