@charset "UTF-8";
:root {
  color-scheme: dark;
  font-family: "Trebuchet MS", system-ui, sans-serif;
  --back: #151225;
  --card: #211b33;
  --card-high: #2d2544;
  --border: #42365d;
  --text: #fcf9ff;
  --muted: #c0b4d1;
  --lime: #d8fb6c;
  --lavender: #c8afff;
  --orange: #ff9a79;
  --pink: #ff8ba7;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 280px; min-height: 100dvh; background: var(--back); color: var(--text); }
button, input, select { font: inherit; }
button, label.choice, input[type=checkbox], input[type=radio] { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .55; }
:focus-visible { outline: 3px solid var(--lavender); outline-offset: 4px; }
h1, h2, p { margin: 0; }
h1, h2, .brand, .tile, .big-letter { font-family: "Arial Black", "Trebuchet MS", system-ui, sans-serif; font-weight: 950; }
h1 { font-size: clamp(2rem, 8vw, 2.8rem); line-height: 1; letter-spacing: -.06em; overflow-wrap: anywhere; }
h2 { font-size: 1.2rem; line-height: 1.2; letter-spacing: -.03em; overflow-wrap: anywhere; }
p { line-height: 1.48; }
.accent { color: var(--lime); }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.subheading { color: var(--muted); margin-top: .6rem; }
.backdrop {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse at 50% -10%, #422660 0, transparent 54%),
    radial-gradient(ellipse at 5% 85%, #261c40, transparent 46%),
    radial-gradient(circle, #d5b7ff24 1px, transparent 1.2px);
  background-size: auto, auto, 24px 24px;
  mask-image: linear-gradient(#000, #000 55%, #0009);
}
.shell { width: min(100%, 550px); margin: auto; padding: max(14px, env(safe-area-inset-top)) clamp(16px, 5vw, 28px) max(28px, env(safe-area-inset-bottom)); }
.topbar { display: flex; align-items: center; justify-content: space-between; min-height: 45px; margin-bottom: clamp(18px, 5vw, 28px); }
.brand { display: flex; gap: .57rem; align-items: center; font-size: 1.15rem; letter-spacing: -.08em; }
.brand-mark { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 9px; transform: rotate(-9deg); color: #20182d; background: var(--lime); box-shadow: 0 3px 0 #7d9537; font-size: 1.13rem; }
.connection { color: var(--orange); font-size: .875rem; }
.screen { display: grid; gap: 17px; }
.page { display: grid; gap: 17px; animation: arrive .26s ease-out both; }
@keyframes arrive { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }
.hero {
  position: relative; isolation: isolate; overflow: hidden; display: grid; align-content: center;
  min-height: clamp(180px, 48vw, 255px); padding: 25px 14px 23px; text-align: center;
  border: 1px solid #6e5196; border-radius: 29px;
  background: radial-gradient(ellipse at 50% 120%, #704a99, transparent 67%), linear-gradient(145deg, #382550, #271e42);
  box-shadow: 0 8px 0 #100d1c, 0 18px 28px #0a081c50;
}
.hero::before { content: ""; position: absolute; z-index: -1; inset: 0; background: repeating-conic-gradient(from 12deg at 50% 54%, #dfc4ff12 0deg 10deg, transparent 10deg 23deg); mask-image: radial-gradient(ellipse, #000 16%, transparent 72%); }
.hero-title { display: flex; align-items: center; justify-content: center; gap: clamp(4px, 1.5vw, 9px); margin: 0 0 20px; }
.tile {
  display: grid; place-items: center; width: clamp(36px, 13vw, 69px); aspect-ratio: 1 / 1.07;
  border-radius: clamp(9px, 3vw, 15px); background: var(--tile, var(--lime)); color: #251b32;
  font-size: clamp(1.8rem, 8vw, 3.7rem); line-height: 1; letter-spacing: -.06em;
  box-shadow: 0 5px 0 var(--shade, #859d3f), inset 0 2px 0 #fff6, 0 10px 16px #100d2766;
  transform: rotate(var(--turn, -10deg)) translateY(var(--lift, 3px)); animation: deal .55s cubic-bezier(.2,.7,.3,1.3) both;
}
.tile:nth-child(2) { --tile: #c9afff; --shade: #8c6dcf; --turn: 6deg; --lift: -4px; animation-delay: .04s; }
.tile:nth-child(3) { --tile: #ffab87; --shade: #c76f50; --turn: -5deg; --lift: 1px; animation-delay: .08s; }
.tile:nth-child(4) { --tile: #f1dcff; --shade: #9d77bb; --turn: 8deg; --lift: -4px; animation-delay: .12s; }
.tile:nth-child(5) { --tile: #d8fb6c; --turn: -8deg; --lift: 5px; animation-delay: .16s; }
@keyframes deal { from { opacity: 0; transform: translateY(22px) rotate(8deg) scale(.7); } }
.hero p { color: #f1e5ff; font-weight: 700; }
.panel { background: var(--card); border: 1px solid var(--border); border-radius: 22px; padding: clamp(15px, 4vw, 22px); box-shadow: 0 5px 0 #100e19b3; }
.stack, form, .form-group { display: grid; gap: 14px; }
.form-group { gap: 7px; }
form { margin: 0; }
label, legend { font-weight: 750; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { padding: 0; margin-bottom: 9px; }
input:not([type=checkbox]):not([type=radio]) {
  width: 100%; min-width: 0; padding: 11px 13px; min-height: 48px; border: 1px solid #53466d;
  border-radius: 12px; background: #171326; color: var(--text); font-size: 1rem;
}
input::placeholder { color: #aa9dbe; }
input[type=checkbox], input[type=radio] { width: 1.13rem; height: 1.13rem; margin: 0; flex: none; accent-color: var(--lime); }
.btn, .text-btn {
  display: flex; justify-content: center; align-items: center; text-align: center; gap: 9px;
  border: 1px solid transparent; border-radius: 14px; min-height: 49px; padding: 10px 16px;
  color: var(--text); background: var(--card-high); font-weight: 850; line-height: 1.18;
}
.btn { box-shadow: 0 4px 0 #140f22; transition: filter .15s, transform .15s, box-shadow .15s; }
.btn:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 #140f22; }
@media (hover: hover) { .btn:hover:not(:disabled) { filter: brightness(1.12); } }
.btn.primary { background: var(--lime); color: #20162d; box-shadow: 0 4px 0 #7b943b; }
.btn.secondary { border-color: #66518c; background: #382851; }
.btn.stop { background: var(--orange); color: #23192b; box-shadow: 0 4px 0 #a9504d; text-transform: uppercase; letter-spacing: .09em; }
.btn.compact { min-height: 44px; padding: 8px 12px; }
.text-btn { justify-self: start; align-self: start; padding-inline: 0; color: var(--lavender); background: transparent; box-shadow: none; }
.home-controls { margin-top: 3px; }
.error { color: #ffacc0; font-size: .9rem; }
.choice { display: flex; align-items: center; min-height: 44px; gap: .6rem; padding: 8px 10px; border: 1px solid var(--border); border-radius: 11px; background: #2b233e; overflow-wrap: anywhere; }
.choice:has(input:checked) { border-color: #91a954; background: #34403e; }
.grid-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.inline { display: flex; align-items: end; gap: 8px; }
.inline > :first-child { flex: 1; }
.row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 7px; }
.list, .ranking { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.room-card { width: 100%; justify-content: space-between; text-align: left; min-height: 60px; }
.room-card span:first-child { overflow-wrap: anywhere; min-width: 0; }
.badge { flex: none; border-radius: 20px; padding: .26rem .62rem; color: #e5d4ff; background: #3b2b56; font-size: .875rem; font-weight: 700; }
.player, .rank-item { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 9px 10px; background: #2a223e; border-radius: 12px; }
.player-name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.avatar { width: 33px; height: 33px; border-radius: 10px; background: var(--lavender); color: #21162a; display: grid; place-items: center; flex: none; font-weight: 900; }
.settings { display: flex; flex-wrap: wrap; gap: 8px; }
.round-head { position: sticky; top: 0; z-index: 1; margin: 0 -3px; }
.round-bar { display: flex; align-items: center; gap: 12px; background: #29203e; border: 1px solid #67558c; border-radius: 17px; padding: 9px 12px; box-shadow: 0 7px 12px #120d2059; }
.big-letter { background: var(--lime); color: #20152d; border-radius: 10px; font-size: 2rem; width: 51px; height: 51px; flex: none; display: grid; place-items: center; box-shadow: 0 3px 0 #83983c; }
.clock { color: var(--lime); font-weight: 900; font-variant-numeric: tabular-nums; margin-left: auto; white-space: nowrap; }
.clock.urgent { color: #ffad92; }
.answers { gap: 12px; }
.answers input { scroll-margin: 80px 0 90px; }
.play-controls { position: sticky; bottom: 0; padding: 9px 0 max(9px, env(safe-area-inset-bottom)); background: linear-gradient(transparent, #151225 20%); z-index: 2; display: grid; gap: 8px; }
.count-card { text-align: center; min-height: 245px; place-content: center; }
.count { font-family: "Arial Black", system-ui, sans-serif; font-size: clamp(5rem, 24vw, 8rem); line-height: .9; color: var(--lime); text-shadow: 0 6px #819535; }
.count.pop { animation: pop .58s both; }
@keyframes pop { 0% { opacity: 0; transform: scale(.5) rotate(-12deg); } 45% { opacity: 1; transform: scale(1.08) rotate(4deg); } 100% { transform: none; } }
.stop-title { color: var(--orange); text-shadow: 0 3px #845039; }
.enter-review .stop-title { animation: pop .5s both; }
.tabs { display: flex; gap: 7px; overflow-x: auto; padding: 4px 4px 7px; }
.tab { flex: none; min-height: 44px; border: 1px solid var(--border); border-radius: 20px; padding: 7px 12px; background: #2c233f; color: var(--text); font-weight: 750; }
.tab[aria-pressed=true] { background: var(--lavender); color: #241731; }
.vote-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.vote-item:last-child { border-bottom: 0; }
.vote-item strong, .vote-item span { overflow-wrap: anywhere; }
.vote-controls { display: flex; gap: 6px; }
.vote-controls button { min-width: 44px; min-height: 44px; background: #302545; color: var(--text); border: 1px solid #65547f; border-radius: 10px; font-size: 1.12rem; }
.vote-controls .yes[aria-pressed=true] { background: var(--lime); color: #21162a; }
.vote-controls .no[aria-pressed=true] { background: var(--pink); color: #21162a; }
.rank-item { padding: 11px 9px; }
.rank-pos { min-width: 2.1rem; text-align: center; font-weight: 900; }
.rank-item.first { background: #343b32; border: 1px solid #8f9e5b; }
.rank-item.first .rank-pos, .points { color: var(--lime); }
.points { flex: none; font-weight: 850; }
.podium { text-align: center; background: radial-gradient(ellipse at 50% 0, #533968, transparent 84%), var(--card); }
.medal { display: grid; place-items: center; margin: 0 auto 6px; width: 54px; height: 54px; border-radius: 17px; transform: rotate(-9deg); background: var(--lime); color: #222132; font-weight: 950; box-shadow: 0 4px #7d9242; }
details summary { cursor: pointer; min-height: 35px; font-weight: 750; }
.notice { position: fixed; z-index: 5; bottom: max(16px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100% - 32px); background: #3d2c55; border: 1px solid #745f91; border-radius: 13px; padding: 12px 15px; box-shadow: 0 8px 26px #0c0917b3; }
.loading { padding: 24px 12px; color: var(--muted); }
@media (max-width: 350px) { .grid-two { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
