:root {
  color-scheme: dark;
  --bg: #101114;
  --panel: #191b20;
  --panel-2: #20242b;
  --text: #f5f3ef;
  --muted: #a8acb5;
  --line: rgba(255, 255, 255, 0.1);
  --hot: #ff5c35;
  --aqua: #36c4d6;
  --gold: #ffc857;
  --danger: #ff496d;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { overflow-x: hidden; overflow-y: scroll; }
body { overflow-x: hidden; max-width: 100vw; position: relative; }
html.sheetOpen {
  overflow: hidden;
}
body.sheetOpen {
  overflow: hidden;
}
html, body, #app { min-height: 100%; margin: 0; }
#app { max-width: 100vw; overflow-x: hidden; }
body {
  background: radial-gradient(circle at top left, rgba(255, 92, 53, 0.045), transparent 22rem), var(--bg);
  color: var(--text);
}
a {
  color: inherit;
}
button, input {
  font: inherit;
}
button {
  border: 0;
  color: inherit;
  cursor: pointer;
}
input {
  width: 100%;
  border: 1px solid var(--line);
  background: #111318;
  color: var(--text);
  border-radius: 8px;
  padding: 13px 14px;
  outline: none;
}
.gate {
  min-height: 100vh;
  display: grid;
  place-items: end center;
  padding: 24px;
}
.gatePanel {
  width: min(100%, 460px);
  display: grid;
  gap: 18px;
  padding: 28px 0 8px;
}
.gateForm {
  display: grid;
  gap: 12px;
}
.authChoice {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.authChoice button {
  min-width: 0;
  min-height: 68px;
  display: grid;
  align-content: center;
  gap: 3px;
  padding: 10px 8px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--panel);
  text-align: left;
}
.authChoice button.active {
  border-color: var(--hot);
  background: rgba(255, 92, 53, 0.13);
}
.authChoice strong {
  font-size: 14px;
}
.authChoice span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
}
.gateFootnote {
  display: block;
  text-align: center;
}
.appRoute .siteHome,
body:has(.gate) .siteHome,
body:has(.lobbyShell) .siteHome,
body:has(.appShell) .siteHome {
  display: none;
}
.siteHome {
  min-height: 100vh;
  width: min(100%, 960px);
  margin: 0 auto;
  padding: 0 20px 0;
}
.siteTop {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(16, 17, 20, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  margin: 0 -20px;
  padding-inline: 20px;
}
.siteBrand {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  color: var(--text);
  text-decoration: none;
  font-size: 26px;
  font-weight: 900;
}
.siteTop .siteBrand {
  font-size: 31px;
}
.siteBrand strong {
  color: var(--hot);
}
.siteTop .siteNavCta {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  padding: 0 16px;
  border-radius: 8px;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--text);
  text-decoration: none;
  font-weight: 850;
  font-size: 13px;
  transition: background 0.15s;
}
.siteTop .siteNavCta:hover {
  background: var(--panel-2);
}
.siteHero {
  position: relative;
  display: grid;
  gap: 40px;
  padding: 56px 0 24px;
  overflow: hidden;
}
.siteHeroCopy {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: start;
  gap: 14px;
  max-width: 560px;
}
.siteHeroCopy .eyebrow {
  color: var(--aqua);
  font-weight: 900;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.siteHeroCopy h1 {
  margin: 0;
  font-size: clamp(36px, 10vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.025em;
  font-weight: 950;
}
.siteHeroCopy > p {
  max-width: 440px;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}
.siteWaveVisual {
  position: relative;
  width: min(100%, 520px);
  height: 132px;
  margin: 6px 0 2px;
  overflow: hidden;
  pointer-events: none;
}
.siteWaveVisual svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.waveLine {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 820;
  animation: waveTrace 5.8s ease-in-out infinite;
}
.waveBack {
  stroke: rgba(255, 255, 255, 0.14);
  stroke-width: 7;
  animation-delay: -2.2s;
}
.waveMain {
  stroke: var(--aqua);
  stroke-width: 9;
  filter: drop-shadow(0 0 22px rgba(54, 196, 214, 0.28));
}
.waveHot {
  stroke: var(--hot);
  stroke-width: 5;
  stroke-dasharray: 260 56;
  animation-duration: 4.2s;
  animation-direction: reverse;
  filter: drop-shadow(0 0 18px rgba(255, 92, 53, 0.3));
}
.waveGlow {
  position: absolute;
  left: 10%;
  right: 12%;
  bottom: 18px;
  height: 34px;
  background: linear-gradient(90deg, rgba(255, 92, 53, 0.22), rgba(54, 196, 214, 0.22), rgba(255, 200, 87, 0.1));
  filter: blur(22px);
  opacity: 0.78;
  animation: waveGlow 4s ease-in-out infinite;
}
@keyframes waveTrace {
  0%, 100% { stroke-dashoffset: 0; transform: translateX(0); opacity: 0.72; }
  50% { stroke-dashoffset: -120; transform: translateX(-10px); opacity: 1; }
}
@keyframes waveGlow {
  0%, 100% { transform: translateX(-6px) scaleX(0.92); opacity: 0.48; }
  50% { transform: translateX(8px) scaleX(1.04); opacity: 0.84; }
}
.siteHeroCta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 52px;
  min-height: 52px;
  padding: 0 24px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff7048, #ff4f2c);
  color: white;
  text-decoration: none;
  font-size: 15px;
  font-weight: 950;
  width: fit-content;
  box-shadow: 0 16px 34px rgba(255, 92, 53, 0.24);
  transition: transform 0.12s, box-shadow 0.12s, filter 0.12s;
}
.siteHeroCta:hover {
  transform: translateY(-2px);
  filter: brightness(1.04);
  box-shadow: 0 20px 42px rgba(255, 92, 53, 0.34);
}
.siteHeroCta small {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  font-weight: 700;
  font-size: 12px;
}
.siteHow {
  display: grid;
  gap: 20px;
  padding: 28px 0;
}
.siteHow h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 950;
  letter-spacing: -0.01em;
}
.siteSteps {
  display: grid;
  gap: 0;
  counter-reset: step;
}
.siteSteps li {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
  list-style: none;
  counter-increment: step;
}
.siteSteps li:last-child {
  border-bottom: 1px solid var(--line);
}
.siteSteps strong::before {
  content: counter(step) "  ";
  color: var(--hot);
  font-weight: 950;
}
.siteSteps strong {
  display: block;
  font-size: 16px;
  font-weight: 900;
}
.siteSteps span {
  color: var(--muted);
  line-height: 1.55;
  font-size: 14px;
}
.siteFeatures {
  display: grid;
  gap: 20px;
  padding: 52px 0;
}
.siteFeatures h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 950;
  letter-spacing: -0.01em;
}
.siteFeatures > div {
  display: grid;
  gap: 8px;
}
.siteFeat {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
}
.siteFeat strong {
  font-size: 15px;
  font-weight: 900;
}
.siteFeat span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.5;
  font-size: 13px;
}
.siteCta {
  display: grid;
  gap: 10px;
  padding: 52px 0 40px;
  text-align: center;
  justify-items: center;
}
.siteCta h2 {
  margin: 0;
  font-size: clamp(26px, 7vw, 40px);
  line-height: 1.1;
  font-weight: 950;
  letter-spacing: -0.02em;
}
.siteCta p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}
.siteCta a {
  margin-top: 6px;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 32px;
  border-radius: 10px;
  background: var(--hot);
  color: white;
  text-decoration: none;
  font-size: 15px;
  font-weight: 950;
  box-shadow: 0 2px 16px rgba(255, 92, 53, 0.25);
  transition: transform 0.12s, box-shadow 0.12s;
}
.siteCta a:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 24px rgba(255, 92, 53, 0.35);
}
.siteFooter {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 18px 0 max(18px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}
.siteFooter div {
  display: flex;
  gap: 16px;
}
.siteFooter a {
  color: var(--text);
  text-decoration: none;
  font-weight: 850;
  font-size: 12px;
}
@media (min-width: 640px) {
  .siteHero {
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 48px;
  }
  .siteHeroCopy {
    max-width: none;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 48%);
    column-gap: 48px;
    align-items: center;
  }
  .siteHeroCopy .eyebrow,
  .siteHeroCopy h1,
  .siteHeroCopy > p,
  .siteHeroCta {
    grid-column: 1;
  }
  .siteWaveVisual {
    grid-column: 2;
    grid-row: 1 / span 5;
    width: 100%;
    height: 220px;
    margin: 0;
  }
  .siteFeatures > div {
    grid-template-columns: 1fr 1fr;
  }
}
.seoHome,
.seoPage {
  width: min(100%, 1040px);
  margin: 0 auto;
  padding: 42px 18px 70px;
}
.seoHome {
  border-top: 1px solid var(--line);
}
.seoPage {
  min-height: 100vh;
  padding-top: max(32px, env(safe-area-inset-top));
}
body:has(.lobbyShell) .seoHome,
body:has(.appShell) .seoHome {
  display: none;
}
.seoHero {
  display: grid;
  gap: 14px;
  max-width: 760px;
}
.seoHero h1 {
  margin: 0;
  font-size: clamp(34px, 8vw, 72px);
  line-height: 0.98;
}
.seoHero p {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.5;
}
.seoLinks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}
.seoLinks a {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 8px;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--text);
  text-decoration: none;
  font-weight: 900;
  font-size: 13px;
}
.seoLinks a:first-child {
  background: var(--hot);
  border-color: var(--hot);
  color: #120704;
}
.seoGrid {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}
.seoGrid article {
  padding: 16px;
  border-radius: 8px;
  background: var(--panel);
  border: 1px solid var(--line);
}
.seoGrid h2 {
  margin: 0 0 8px;
  font-size: 20px;
}
.seoGrid p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}
.livePill, .eyebrow, .roomStatus {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0;
  font-size: 12px;
  font-weight: 800;
}
.livePill span, .liveDot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #49f59a;
  margin-right: 8px;
}
.gate h1 {
  margin: 0;
  font-size: clamp(40px, 12vw, 64px);
  line-height: 0.92;
}
.gate h1 span {
  display: block;
}
.gate h1 span + span {
  color: var(--hot);
}
.gate p {
  color: var(--muted);
  margin: 0;
  font-size: 18px;
  line-height: 1.35;
}
.field span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
.genderGrid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.genderChip {
  position: relative;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 8px;
  padding: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}
.genderChip input {
  position: absolute;
  inset: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}
.genderChip strong, .gender {
  color: var(--aqua);
}
.gender.female { color: #ff6fae; }
.gender.male { color: #55a6ff; }
.gender.transgender { color: #ff8bd5; }
.genderChip.selected {
  border-color: var(--hot);
  background: rgba(255, 92, 53, 0.12);
}
.primaryCta, .createRoom button, .roomCard button, .sheetActions button {
  min-height: 48px;
  border-radius: 8px;
  background: var(--hot);
  color: white;
  font-weight: 900;
  padding: 0 16px;
}
.textButton {
  min-height: 38px;
  background: transparent;
  color: var(--muted);
  font-weight: 850;
  text-align: center;
}
.textButton:hover {
  color: var(--text);
}
.gate small {
  color: var(--muted);
}
.lobbyShell, .appShell {
  max-width: 860px;
  margin: 0 auto;
  min-height: 100vh;
  padding: max(16px, env(safe-area-inset-top)) 14px max(82px, env(safe-area-inset-bottom));
}
.appShell {
  height: 100dvh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: max(10px, env(safe-area-inset-top)) 14px max(8px, env(safe-area-inset-bottom));
}
.lobbyHeader, .roomHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 4px 0 14px;
}
.lobbyHeader .siteBrand {
  font-size: 22px;
  text-decoration: none;
}
.lobbyActions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}
.profileButton {
  height: 42px;
  border-radius: 8px;
  padding: 0 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  font-weight: 900;
}
.lobbyHeader h1 {
  margin: 2px 0;
  font-size: 22px;
}
.lobbyHeader span, .roomHeader span {
  color: var(--muted);
}
.iconButton {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: var(--panel);
  border: 1px solid var(--line);
}
.connectIconButton {
  display: grid;
  place-items: center;
}
.connectIconButton.connected {
  border-color: rgba(73, 245, 154, 0.65);
  background: rgba(73, 245, 154, 0.12);
}
.connectIconButton svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.roomList {
  display: grid;
  gap: 10px;
}
.roomListFooter {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}
.roomListFooter span {
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}
.roomListFooter button {
  min-height: 46px;
  border-radius: 8px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  font-weight: 900;
}
.lobbyTools {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}
.lobbyStats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.lobbyStats span {
  min-height: 48px;
  border-radius: 8px;
  background: var(--panel);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 12px;
}
.lobbyStats strong {
  color: var(--text);
  font-size: 18px;
}
.roomSearch {
  height: 46px;
}
.roomCard {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}
.roomCard h2 {
  margin: 4px 0;
  font-size: 20px;
}
.roomCard p {
  margin: 0;
  color: var(--muted);
}
.roomCard button {
  grid-column: 1 / -1;
}
.mainRoom {
  border-color: rgba(255, 92, 53, 0.55);
}
.roomStats {
  display: grid;
  gap: 6px;
  text-align: right;
  color: var(--muted);
}
.roomStats strong {
  color: var(--text);
}
.createRoom {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  padding: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.roomHeader {
  position: static;
  z-index: 5;
  flex-shrink: 0;
  background: rgba(16, 17, 20, 0.92);
  backdrop-filter: blur(14px);
}
.roomHeader p {
  margin: 0 0 3px;
  font-weight: 900;
}
.headerActions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.stopButton {
  height: 42px;
  border-radius: 8px;
  padding: 0 12px;
  background: var(--danger);
  font-weight: 900;
}
.compactStop {
  min-width: 68px;
}
.lobbyToyCard {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
  padding: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.lobbyToyCard.online {
  border-color: rgba(73, 245, 154, 0.55);
  background: linear-gradient(135deg, rgba(73, 245, 154, 0.12), rgba(25, 27, 32, 0.96));
}
.lobbyToyCard.stale {
  border-color: rgba(255, 200, 87, 0.6);
}
.lobbyToyCard.linked {
  border-color: rgba(54, 196, 214, 0.55);
}
.lobbyToyCard strong {
  display: block;
  margin: 3px 0;
}
.lobbyToyCard small {
  display: block;
  color: var(--muted);
  line-height: 1.35;
}
.lobbyToyCard button {
  min-height: 44px;
  border-radius: 8px;
  padding: 0 14px;
  background: var(--aqua);
  color: #071113;
  font-weight: 900;
}
.wavePanel {
  position: static;
  z-index: 4;
  display: grid;
  gap: 9px;
  flex-shrink: 0;
  padding: 10px;
  margin-bottom: 0;
  background: rgba(25, 27, 32, 0.96);
  border: 1px solid var(--line);
  border-radius: 8px;
  backdrop-filter: blur(14px);
}
.waveTop {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 12px;
  align-items: center;
}
.waveOrb {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--hot) calc(var(--progress) * 1%), rgba(255,255,255,.12) 0);
}
.waveOrb span {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--panel);
  font-size: 25px;
}
.waveInfo {
  min-width: 0;
}
.waveInfo small {
  color: var(--muted);
}
.waveInfo strong {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.timer {
  text-align: center;
}
.timer strong {
  display: block;
  font-size: 26px;
}
.timer small {
  color: var(--muted);
}
.voteGrid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}
.voteButton {
  min-width: 0;
  height: 64px;
  border-radius: 8px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  padding: 5px;
  position: relative;
}
.voteButton.selected {
  border-color: var(--gold);
  background: rgba(255, 200, 87, 0.12);
}
.voteButton span {
  font-size: 20px;
}
.voteButton strong {
  font-size: 11px;
}
.voteButton em {
  position: absolute;
  top: 4px;
  right: 5px;
  font-style: normal;
  font-size: 11px;
  color: var(--gold);
}
.chatList {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-height: 0;
  padding: 10px 0 8px;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  touch-action: pan-y;
  overflow-anchor: none;
}
.chatList::before {
  content: "";
  margin-top: auto;
  flex-shrink: 0;
}
.chatMessage {
  --chat-avatar-size: 38px;
  width: fit-content;
  max-width: min(86%, 560px);
  display: grid;
  grid-template-columns: var(--chat-avatar-size) minmax(0, 1fr);
  align-items: end;
  gap: 7px;
}
.chatMessage.mine {
  margin-left: auto;
}
.chatMessage.mine .chatBubble {
  background: rgba(54, 196, 214, 0.12);
}
.chatAvatarWrap {
  position: relative;
  width: var(--chat-avatar-size);
  height: var(--chat-avatar-size);
  flex-shrink: 0;
}
.chatAvatar {
  width: var(--chat-avatar-size);
  height: var(--chat-avatar-size);
  border-radius: 8px;
  object-fit: cover;
  display: grid;
  place-items: center;
  background: var(--panel-2);
  border: 1px solid var(--line);
  font-size: calc(var(--chat-avatar-size) * 0.48);
  line-height: 1;
}
.chatGenderBadge {
  position: absolute;
  bottom: -3px;
  right: -3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 9px;
  font-style: normal;
  line-height: 1;
  background: var(--panel);
  border: 1px solid var(--line);
}
.chatBubble {
  min-width: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 11px;
}
.chatMessage span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.verifiedBadge {
  width: 14px;
  height: 14px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(72, 214, 181, 0.18);
  color: var(--aqua);
  border: 1px solid rgba(72, 214, 181, 0.35);
  font-size: 9px;
  font-style: normal;
  line-height: 1;
}
.chatMessage p {
  margin: 3px 0 0;
  overflow-wrap: anywhere;
}
.chatMessage p a {
  color: var(--aqua);
  font-weight: 850;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.chatInput {
  position: static;
  transform: none;
  width: 100%;
  flex-shrink: 0;
  display: grid;
  grid-template-columns: 1fr 50px;
  gap: 8px;
  padding: 8px 0 0;
  background: rgba(16, 17, 20, 0.94);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
}
.chatInput button {
  border-radius: 8px;
  background: var(--aqua);
  color: #071113;
  font-weight: 900;
}
.toast {
  position: fixed;
  z-index: 20;
  top: max(12px, env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  width: min(calc(100vw - 28px), 520px);
  min-height: 48px;
  border-radius: 8px;
  padding: 10px 14px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  text-align: center;
  overflow-wrap: anywhere;
}
.toast.error, .toast.filter {
  border-color: rgba(255, 73, 109, 0.65);
}
.sheetBackdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  align-items: end;
  background: rgba(0, 0, 0, 0.58);
  overscroll-behavior: contain;
  touch-action: none;
}
.toySheet {
  width: min(100vw, 620px);
  margin: 0 auto;
  max-height: 88vh;
  overflow: auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px 8px 0 0;
  padding: 14px;
  overscroll-behavior: contain;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
}
.toySheet, .toySheet * {
  max-width: 100%;
}
.toySheet * {
  min-width: 0;
}
.sheetHeader, .connectStatus, .toyItem {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.connectStatus {
  justify-content: flex-start;
  padding: 12px;
  border-radius: 8px;
  background: #14171c;
  margin: 12px 0;
}
.connectStatus div {
  min-width: 0;
}
.connectStatus > span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--gold);
}
.connectStatus.online > span {
  background: #49f59a;
}
.connectStatus.stale > span {
  background: var(--danger);
}
.connectStatus small, .toyItem small, .connectHint {
  color: var(--muted);
}
.sheetError {
  color: var(--danger);
}
.toyList {
  display: grid;
  gap: 8px;
}
.toyItem {
  padding: 10px;
  border-radius: 8px;
  background: #14171c;
  border: 1px solid var(--line);
}
.toyItem span, .toyItem small {
  display: block;
}
.toyItem button {
  min-height: 36px;
  border-radius: 8px;
  background: var(--aqua);
  color: #071113;
  font-weight: 900;
  padding: 0 10px;
}
.sheetActions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}
.sheetActions .dangerAction {
  grid-column: 1 / -1;
  background: var(--danger);
}
.sheetActions .ghostButton {
  background: transparent;
  border: 1px solid var(--line);
}
.dangerGhost {
  background: transparent;
  border: 1px solid rgba(255, 73, 109, 0.42);
  color: #ff8da4;
}
.accountTools {
  margin-top: 12px;
}
.formStack {
  display: grid;
  gap: 10px;
}
.profileAvatar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding: 10px;
  border-radius: 8px;
  background: #14171c;
  border: 1px solid var(--line);
}
.profileAvatar img, .profileAvatar > span {
  width: 54px;
  height: 54px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  object-fit: cover;
  background: var(--panel-2);
  font-size: 25px;
}
.uploadButton {
  min-height: 44px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--aqua);
  color: #071113;
  font-weight: 900;
  cursor: pointer;
}
.uploadButton input {
  display: none;
}
.qrFrame {
  width: min(220px, 68vw);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  padding: 12px;
  background: white;
  border-radius: 8px;
  margin: 12px auto;
}
.qrFrame img {
  width: 100%;
  height: auto;
}
.codeButton, .linkButton {
  width: 100%;
  min-height: 42px;
  border-radius: 8px;
  margin-top: 8px;
  background: #14171c;
  border: 1px solid var(--line);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.helpPanel {
  margin-top: 12px;
  padding: 12px;
  border-radius: 8px;
  background: #14171c;
  color: var(--muted);
}
.sheetHeader small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.connectSheet {
  display: grid;
  gap: 12px;
  padding: 16px;
}
.connectHero {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(54, 196, 214, 0.12), #14171c);
  border: 1px solid rgba(54, 196, 214, 0.34);
}
.connectHero.online {
  border-color: rgba(73, 245, 154, 0.55);
  background: linear-gradient(135deg, rgba(73, 245, 154, 0.13), #14171c);
}
.connectHero.linked {
  border-color: rgba(255, 200, 87, 0.5);
  background: linear-gradient(135deg, rgba(255, 200, 87, 0.12), #14171c);
}
.connectHero.stale {
  border-color: rgba(255, 73, 109, 0.6);
  background: linear-gradient(135deg, rgba(255, 73, 109, 0.12), #14171c);
}
.connectHeroIcon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--aqua);
}
.connectHero.online .connectHeroIcon {
  color: #49f59a;
}
.connectHero.stale .connectHeroIcon {
  color: var(--danger);
}
.connectHeroIcon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.connectHero strong {
  display: block;
  font-size: 19px;
}
.connectHero small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  line-height: 1.35;
}
.connectSteps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.connectSteps span {
  min-width: 0;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #14171c;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}
.connectSteps b {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--panel-2);
  color: var(--muted);
  font-size: 12px;
}
.connectSteps span.active {
  color: var(--gold);
  border-color: rgba(255, 200, 87, 0.48);
}
.connectSteps span.active b {
  background: rgba(255, 200, 87, 0.18);
  color: var(--gold);
}
.connectSteps span.done {
  color: #49f59a;
  border-color: rgba(73, 245, 154, 0.42);
}
.connectSteps span.done b {
  background: rgba(73, 245, 154, 0.18);
  color: #49f59a;
}
.connectSummary {
  padding: 12px;
  border-radius: 8px;
  background: #14171c;
  border: 1px solid var(--line);
}
.connectSummary strong {
  display: block;
}
.connectSummary small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.4;
}
.connectPanel {
  display: grid;
  gap: 12px;
}
.toyItem.connectedToy b {
  min-width: 50px;
  min-height: 30px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(73, 245, 154, 0.14);
  color: #49f59a;
  font-size: 12px;
}
.sheetActions {
  margin-top: 0;
}
.sheetActions button {
  min-width: 0;
}
.sheetActions .primaryConnect {
  min-height: 52px;
  background: var(--aqua);
  color: #071113;
}
.fallbackPanel {
  display: grid;
  gap: 8px;
  padding: 10px;
  border-radius: 8px;
  background: #14171c;
  border: 1px solid var(--line);
}
.fallbackPanel .qrFrame {
  width: min(190px, 58vw);
  margin: 0 auto;
}
.fallbackPanel .codeButton,
.fallbackPanel .linkButton,
.connectPanel > .linkButton {
  margin-top: 0;
}
.helpPanel {
  margin-top: 0;
}
.helpPanel ol {
  margin: 8px 0 0;
  padding-left: 20px;
}
.helpPanel li {
  margin: 5px 0;
}
@media (min-width: 720px) {
  .siteHome {
    padding: 18px 24px 48px;
  }
  .siteTop .siteBrand {
    font-size: 34px;
  }
  .siteMenu {
    grid-column: auto;
    justify-content: center;
    overflow: visible;
    padding-bottom: 0;
  }
  .siteHero {
    display: block;
    padding: 72px 0 82px;
  }
  .siteSections {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .siteSteps {
    grid-template-columns: 0.8fr 1.2fr;
    align-items: start;
  }
  .siteCallout {
    grid-template-columns: 1fr auto;
    padding: 22px;
  }
  .siteCallout .primaryCta {
    width: auto;
    min-width: 168px;
  }
  .gate {
    place-items: center;
  }
  .seoGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .roomCard {
    grid-template-columns: 1fr auto auto;
  }
  .roomList {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    max-height: min(58vh, 620px);
    overflow: auto;
    padding-right: 2px;
  }
  .roomCard button {
    grid-column: 1 / -1;
    min-width: 120px;
  }
  .createRoom {
    grid-template-columns: 1fr 1fr auto;
    align-items: end;
  }
  .createRoom strong {
    grid-column: 1 / -1;
  }
  .voteGrid {
    gap: 8px;
  }
  .voteButton {
    height: 74px;
  }
  .chatMessage {
    --chat-avatar-size: 36px;
  }
  .sheetBackdrop {
    align-items: center;
    padding: 24px;
  }
  .toySheet {
    border-radius: 8px;
    max-height: min(760px, 92vh);
  }
  .connectSheet {
    padding: 18px;
  }
}
@media (max-width: 719px) {
  .siteHome {
    padding-inline: 12px;
  }
  .siteNav {
    position: sticky;
    top: 0;
    z-index: 2;
    min-height: 56px;
    background: rgba(16, 17, 20, 0.94);
    border-bottom: 1px solid var(--line);
  }
  .siteHero {
    min-height: auto;
    padding: 14px 0 20px;
  }
  .siteHeroCopy {
    gap: 12px;
  }
  .siteHero h1 {
    font-size: clamp(40px, 14.5vw, 58px);
  }
  .siteHero p {
    font-size: 15px;
    line-height: 1.5;
  }
  .siteWaveVisual {
    height: 108px;
    margin: 0;
  }
  .siteHeroCta {
    justify-self: center;
    align-self: start;
    width: min(100%, 210px);
    height: 54px;
    min-height: 54px;
  }
  .siteHow {
    padding-top: 16px;
  }
  .siteActions {
    display: grid;
    grid-template-columns: 1fr;
  }
  .siteActions a {
    width: 100%;
  }
  .sitePanel {
    padding: 12px;
  }
  .siteVotePreview {
    grid-template-columns: 1fr;
  }
  .siteFactList li {
    grid-template-columns: 1fr;
    gap: 3px;
  }
  .siteSteps li {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .appShell {
    padding: 0;
    max-width: 100%;
  }
  .roomHeader {
    padding: max(7px, env(safe-area-inset-top)) 10px 8px;
    border-bottom: 1px solid var(--line);
  }
  .roomHeader > div:nth-child(2) {
    flex: 1;
    min-width: 0;
  }
  .roomHeader p,
  .roomHeader span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .roomHeader .iconButton {
    width: 38px;
    height: 38px;
  }
  .headerActions {
    gap: 6px;
  }
  .wavePanel {
    border-left: 0;
    border-right: 0;
    border-radius: 0;
    gap: 7px;
    padding: 8px 10px;
  }
  .waveTop {
    grid-template-columns: 42px 1fr 42px;
    gap: 8px;
  }
  .waveOrb {
    width: 42px;
    height: 42px;
  }
  .waveOrb span {
    width: 34px;
    height: 34px;
    font-size: 19px;
  }
  .timer strong {
    font-size: 21px;
  }
  .timer small,
  .waveInfo small {
    font-size: 11px;
  }
  .voteGrid {
    gap: 5px;
  }
  .voteButton {
    height: 49px;
    padding: 4px 3px;
  }
  .voteButton span {
    font-size: 17px;
  }
  .voteButton strong {
    font-size: 10px;
  }
  .chatList {
    padding: 8px 10px;
  }
  .chatMessage {
    --chat-avatar-size: 36px;
    max-width: 94%;
    gap: 6px;
  }
  .chatAvatar {
    border-radius: 7px;
  }
  .chatBubble {
    padding: 7px 9px;
  }
  .chatMessage p {
    font-size: 14px;
    line-height: 1.35;
  }
  .chatInput {
    padding: 8px 10px max(8px, env(safe-area-inset-bottom));
    grid-template-columns: 1fr 46px;
  }
  .chatInput input {
    min-height: 44px;
    padding: 11px 12px;
  }
  .chatInput button {
    min-height: 44px;
  }
}
@media (max-height: 700px) {
  .wavePanel {
    gap: 6px;
    padding-block: 7px;
  }
  .waveInfo small {
    display: none;
  }
  .voteButton {
    height: 42px;
  }
  .voteButton span {
    font-size: 16px;
  }
  .voteButton strong {
    font-size: 9px;
  }
  .chatList {
    gap: 6px;
    padding-block: 6px;
  }
  .chatMessage {
    --chat-avatar-size: 26px;
  }
  .chatBubble {
    padding-block: 6px;
  }
  .chatGenderBadge {
    width: 12px;
    height: 12px;
    font-size: 7px;
  }
}
@media (max-width: 360px) {
  .chatMessage {
    --chat-avatar-size: 26px;
    max-width: 96%;
  }
}
@media (max-width: 420px) {
  .toySheet {
    max-height: 92dvh;
    padding: 12px;
  }
  .connectStatus {
    padding: 10px;
    gap: 10px;
  }
  .qrFrame {
    width: min(190px, 62vw);
    padding: 10px;
    margin: 10px auto;
  }
  .sheetActions {
    gap: 7px;
  }
  .sheetActions button {
    min-height: 44px;
    padding: 0 10px;
  }
}
