@font-face { font-family: 'Golos'; src: url('/s/assets/golos-500.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Golos'; src: url('/s/assets/golos-700.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Golos'; src: url('/s/assets/golos-900.woff2') format('woff2'); font-weight: 900; font-display: swap; }
@font-face { font-family: 'Maki'; src: url('/s/assets/maki.woff2') format('woff2'); font-display: swap; }

:root { --bg: #2d1f58; --circle: #3d2b78; --coral: #d84e68; --pink: #f3cde9; --cream: #fdf3fa; --lemon: #f4f3c4; --ink: #241a4d; --muted: #c9b8f0; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--cream); font-family: 'Golos', -apple-system, system-ui, sans-serif; font-weight: 500;
  overscroll-behavior: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
body::before { content: ''; position: fixed; left: 50%; top: 42%; width: 140vmax; height: 140vmax; margin: -70vmax 0 0 -70vmax; border-radius: 50%;
  background: radial-gradient(circle, #46338a 0%, #3a2a75 30%, rgba(45,31,88,0) 62%); pointer-events: none; z-index: 0; }
#snow { position: fixed; left: 0; top: 0; right: 0; bottom: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
#app { position: relative; z-index: 1; max-width: 460px; margin: 0 auto; min-height: 100%; min-height: 100dvh;
  padding: 18px; padding: calc(env(safe-area-inset-top) + 18px) 18px calc(env(safe-area-inset-bottom) + 18px); }
.hidden { display: none !important; }
.screen { display: flex; flex-direction: column; align-items: stretch; }
h1 { font-weight: 900; text-transform: uppercase; font-size: 40px; line-height: 1; margin: 6px 0 4px; text-align: center; letter-spacing: .01em; }
.maki { font-family: 'Maki', 'Golos', sans-serif; color: var(--pink); font-size: 24px; text-align: center; margin: 0 0 22px; }
.joinCat { display: block; margin: 10px auto 0; width: 190px; height: auto; }
.field { display: block; margin-bottom: 14px; }
.field span { display: block; font-size: 15px; color: var(--muted); margin: 0 0 6px 6px; }
input { width: 100%; font: inherit; font-size: 20px; font-weight: 700; color: var(--ink); background: var(--cream); border: 0; border-radius: 18px; padding: 16px 18px;
  outline: none; -webkit-user-select: text; user-select: text; }
input:focus { box-shadow: 0 0 0 4px rgba(244,243,196,.55); }
#code { text-transform: uppercase; letter-spacing: .14em; }
.btn { display: block; width: 100%; font: inherit; font-weight: 900; font-size: 19px; text-transform: uppercase; letter-spacing: .02em; border: 0; border-radius: 20px;
  padding: 17px 16px; margin-top: 10px; color: var(--cream); background: rgba(253,243,250,.12); cursor: pointer; touch-action: manipulation; }
.btn.lemon { background: var(--lemon); color: var(--ink); box-shadow: 0 6px 0 #c9c78f; }
.btn.lemon:active { transform: translateY(4px); box-shadow: 0 2px 0 #c9c78f; }
.btn.ghost { background: transparent; border: 2px solid rgba(253,243,250,.35); }
.btn:disabled { opacity: .55; }
.err { min-height: 20px; color: #ff9aac; font-size: 15px; margin: 4px 6px 0; }
.hint { color: var(--muted); font-size: 15px; margin: 8px 6px 0; }

.top { display: flex; align-items: center; gap: 10px; }
.teamName { flex: 1; min-width: 0; text-align: left; font: inherit; font-weight: 900; font-size: 22px; color: var(--cream); background: none; border: 0; padding: 6px 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.teamName::before { content: ''; display: inline-block; width: 14px; height: 14px; border-radius: 50%; background: var(--team, var(--coral)); margin-right: 10px; vertical-align: 1px; }
.score { font-weight: 900; font-size: 20px; color: var(--ink); background: var(--lemon); border-radius: 14px; padding: 6px 12px; min-width: 46px; text-align: center; }
.menuBtn { width: 44px; height: 44px; border-radius: 14px; border: 0; background: rgba(253,243,250,.12); color: var(--cream); font-size: 24px; line-height: 1; }
.status { margin-top: 18px; text-align: center; font-weight: 900; font-size: 24px; line-height: 1.2; min-height: 58px; }
.sub { text-align: center; color: var(--muted); font-size: 16px; min-height: 22px; margin-top: 2px; }
.buzzWrap { display: flex; justify-content: center; align-items: center; padding: 18px 0 8px; flex: 1; }
.buzz { position: relative; width: 78vw; height: 78vw; max-width: 340px; max-height: 340px; border-radius: 50%; border: 0; font: inherit; font-weight: 900; text-transform: uppercase;
  font-size: 34px; color: #fff; background: #4a3a86; box-shadow: 0 14px 0 #1e1442, inset 0 -10px 0 rgba(0,0,0,.18); touch-action: none; transition: transform .06s, background .15s;
  -webkit-user-select: none; user-select: none; }
.buzz span { position: relative; z-index: 2; pointer-events: none; padding: 0 20px; display: block; line-height: 1.1; }
.buzz.ready { background: var(--coral); }
.buzz.ready::after { content: ''; position: absolute; left: -14px; top: -14px; right: -14px; bottom: -14px; border-radius: 50%; border: 6px solid rgba(216,78,104,.55); animation: ring 1.2s infinite; }
@keyframes ring { 0% { transform: scale(.94); opacity: 1; } 100% { transform: scale(1.12); opacity: 0; } }
.buzz.down { transform: translateY(10px); box-shadow: 0 4px 0 #1e1442, inset 0 -6px 0 rgba(0,0,0,.18); }
.buzz.pending { background: var(--lemon); color: var(--ink); }
.buzz.me { background: #2f9e6e; }
.buzz.queue { background: #b58ad8; }
.buzz.blocked, .buzz.idle { background: #463879; color: rgba(253,243,250,.6); box-shadow: 0 14px 0 #1e1442; }
.panel { background: rgba(253,243,250,.08); border-radius: 24px; padding: 16px; margin-top: 10px; }
.panelTitle { font-weight: 900; font-size: 18px; text-transform: uppercase; margin-bottom: 10px; }
.stakeRow { display: flex; gap: 8px; }
.stakeRow input { text-align: center; font-size: 26px; }
.pm { width: 58px; flex: 0 0 58px; border-radius: 18px; border: 0; font: inherit; font-weight: 900; font-size: 28px; color: var(--cream); background: rgba(253,243,250,.14); }
.row2 { display: flex; gap: 10px; }
.row2 .btn { flex: 1; }
.sheet { position: fixed; left: 0; top: 0; right: 0; bottom: 0; background: rgba(15,8,35,.6); z-index: 20; display: flex; align-items: flex-end; justify-content: center; }
.sheetBox { width: 100%; max-width: 460px; background: #35266b; border-radius: 26px 26px 0 0; padding: 18px 18px calc(env(safe-area-inset-bottom) + 18px); }
#toast { position: fixed; left: 50%; top: calc(env(safe-area-inset-top) + 14px); transform: translateX(-50%); z-index: 30; max-width: 92vw; display: none;
  font-weight: 900; font-size: 20px; padding: 12px 22px; border-radius: 18px; background: var(--cream); color: var(--ink); box-shadow: 0 8px 24px rgba(0,0,0,.3); text-align: center; }
#toast.on { display: block; animation: pop .35s; }
#toast.ok { background: #2f9e6e; color: #fff; } #toast.no { background: #c7445f; color: #fff; }
@keyframes pop { 0% { transform: translateX(-50%) scale(.7); opacity: 0; } 100% { transform: translateX(-50%) scale(1); opacity: 1; } }
#offline { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; text-align: center; background: #c7445f; color: #fff; font-weight: 700;
  padding: 10px 10px calc(env(safe-area-inset-bottom) + 10px); }
@media (max-height: 640px) { .buzz { width: 66vw; height: 66vw; max-width: 260px; max-height: 260px; font-size: 28px; } .joinCat { width: 140px; } h1 { font-size: 32px; } }
@media (prefers-reduced-motion: reduce) { .buzz.ready::after { animation: none; opacity: .6; } }
