/* ==========================================================================
   BUBBLE NOVA — visual system
   ========================================================================== */
@font-face {
  font-family: 'Fredoka';
  src: url('../assets/fonts/fredoka-latin.woff2') format('woff2');
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #050814;
  --bg-2: #080d20;
  --panel: rgba(14, 22, 46, 0.68);
  --panel-strong: rgba(15, 24, 50, 0.9);
  --panel-soft: rgba(120, 160, 255, 0.06);
  --line: rgba(155, 186, 255, 0.13);
  --line-strong: rgba(174, 206, 255, 0.24);
  --text: #eef4ff;
  --muted: #93a4c8;
  --muted-2: #6e7fa4;
  --cyan: #61e8ff;
  --sky: #5ab4ff;
  --violet: #9c86ff;
  --pink: #ff62a5;
  --lime: #b8f56a;
  --amber: #ffcc5c;
  --coral: #ff6a7f;
  --danger: #ff5473;
  --good: #58e6b3;
  --font-display: 'Fredoka', ui-rounded, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', system-ui, sans-serif;
  --font-ui: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', system-ui, sans-serif;
  --radius: 22px;
  --radius-sm: 14px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --ease-back: cubic-bezier(.34, 1.56, .64, 1);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
  --glow-cyan: 0 0 30px rgba(97, 232, 255, 0.24);
  --glow-pink: 0 0 30px rgba(255, 98, 165, 0.22);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body.no-scroll { overflow: hidden; }
button, input { font: inherit; color: inherit; }
button { border: 0; background: none; cursor: pointer; }
button:disabled { cursor: not-allowed; }
a { color: inherit; }
::selection { background: rgba(97, 232, 255, 0.35); color: #fff; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
.hidden, [hidden] { display: none !important; }

* { scrollbar-width: thin; scrollbar-color: rgba(120, 150, 220, .35) transparent; }
*::-webkit-scrollbar { width: 7px; height: 7px; }
*::-webkit-scrollbar-thumb { background: rgba(120, 150, 220, .3); border-radius: 99px; }
*::-webkit-scrollbar-track { background: transparent; }

/* ---------- background ---------- */
#bg-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}
.aurora {
  position: fixed;
  inset: -20%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 16% 12%, rgba(54, 219, 255, 0.16), transparent 30%),
    radial-gradient(circle at 87% 8%, rgba(140, 97, 255, 0.18), transparent 34%),
    radial-gradient(circle at 74% 92%, rgba(255, 84, 160, 0.12), transparent 32%),
    radial-gradient(circle at 8% 86%, rgba(72, 255, 195, 0.08), transparent 28%);
  filter: blur(22px);
  animation: auroraDrift 26s ease-in-out infinite alternate;
}
@keyframes auroraDrift {
  0% { transform: translate3d(-1.5%, -1%, 0) scale(1); }
  100% { transform: translate3d(2.5%, 1.5%, 0) scale(1.06); }
}
.grain {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: .045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.6'/%3E%3C/svg%3E");
}

/* ---------- shared bits ---------- */
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 1.15em; height: 1.15em; display: inline-block; vertical-align: -0.18em; fill: currentColor; flex: 0 0 auto; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: #9db3dd;
}
.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--good);
  box-shadow: 0 0 0 4px rgba(88, 230, 179, .1), 0 0 12px rgba(88, 230, 179, .8);
  animation: livePulse 2s ease-in-out infinite;
}
.live-dot.small { width: 6px; height: 6px; }
@keyframes livePulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(.68); opacity: .55; }
}
.title-dot, .brand-en em { color: var(--pink); font-style: normal; }

.panel {
  position: relative;
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.055), transparent 34%),
    var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(18px) saturate(115%);
  -webkit-backdrop-filter: blur(18px) saturate(115%);
}
.panel::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(120% 80% at 20% 0%, rgba(255, 255, 255, .06), transparent 45%);
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  color: #c2d3f2;
}
.panel-head span:first-child { text-transform: uppercase; }
.panel-meta {
  font-size: 11px;
  letter-spacing: .04em;
  color: var(--muted-2);
  font-variant-numeric: tabular-nums;
}
.panel-meta b { color: var(--cyan); font-weight: 700; }

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 16px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  border: 1px solid transparent;
  transition: transform .18s var(--ease), background .18s, border-color .18s, box-shadow .18s, opacity .18s;
  user-select: none;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.985); }
.btn .icon { width: 17px; height: 17px; }
.btn-primary {
  color: #031322;
  background: linear-gradient(118deg, #68eaff 0%, #8fd8ff 32%, #b5a5ff 68%, #ff86bd 100%);
  box-shadow: 0 12px 34px rgba(102, 222, 255, .22), inset 0 1px 0 rgba(255, 255, 255, .6);
}
.btn-primary:hover { box-shadow: 0 16px 42px rgba(112, 218, 255, .32), inset 0 1px 0 rgba(255, 255, 255, .7); }
.btn-primary:disabled {
  opacity: .42;
  filter: saturate(.5);
  box-shadow: none;
}
.btn-glass {
  background: rgba(255, 255, 255, .045);
  border-color: var(--line);
  color: #dbe7ff;
}
.btn-glass:hover { background: rgba(255, 255, 255, .08); border-color: var(--line-strong); }
.btn-ghost {
  background: transparent;
  color: var(--muted);
  border-color: transparent;
}
.btn-ghost:hover { color: var(--text); background: rgba(255, 255, 255, .04); }
.btn[disabled] { opacity: .45; }
.btn-hero {
  height: 66px;
  padding: 0 26px;
  justify-content: flex-start;
  border-radius: 20px;
  font-size: 18px;
  overflow: hidden;
  isolation: isolate;
}
.btn-hero .icon { width: 21px; height: 21px; }
.btn-hero small {
  margin-left: auto;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .02em;
  opacity: .64;
  color: #08202e;
}
.btn-glint {
  position: absolute;
  top: -60%;
  left: -20%;
  width: 40%;
  height: 220%;
  transform: rotate(22deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .6), transparent);
  animation: glint 4.6s ease-in-out infinite;
  pointer-events: none;
}
@keyframes glint {
  0%, 55% { left: -45%; }
  78%, 100% { left: 125%; }
}
.mini-btn {
  min-height: 34px;
  padding: 0 13px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  background: rgba(97, 232, 255, .13);
  border: 1px solid rgba(97, 232, 255, .24);
  color: #bff6ff;
  transition: .18s;
}
.mini-btn:hover { background: rgba(97, 232, 255, .2); }
.mini-btn.ghost { background: transparent; border-color: var(--line); color: var(--muted); }
.link-btn {
  font-size: 11px;
  font-weight: 700;
  color: var(--cyan);
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(97, 232, 255, .08);
}
.link-btn:hover { background: rgba(97, 232, 255, .16); }
.icon-btn {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border-radius: 13px;
  color: #b7c8e8;
  border: 1px solid transparent;
  transition: .18s;
}
.icon-btn:hover { color: #fff; background: rgba(255, 255, 255, .06); border-color: var(--line); }
.icon-btn .icon { width: 20px; height: 20px; }
.icon-btn.small { width: 34px; height: 34px; border-radius: 10px; background: rgba(255, 255, 255, .04); border-color: var(--line); }
.icon-btn.small .icon { width: 16px; height: 16px; }

/* ---------- topbar ---------- */
.topbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: 72px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 28px;
  background: linear-gradient(180deg, rgba(5, 8, 20, .92), rgba(5, 8, 20, .55) 62%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px;
  border-radius: 14px;
  text-align: left;
  color: var(--text);
  flex: 0 0 auto;
}
.brand-orb {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 31% 24%, rgba(255, 255, 255, .95), rgba(255, 255, 255, 0) 24%),
    radial-gradient(circle at 40% 35%, #baf6ff, #56b8ff 42%, #7c6bff 82%);
  box-shadow: 0 0 22px rgba(97, 232, 255, .28), inset 0 -4px 10px rgba(3, 12, 40, .35);
}
.brand-orb i {
  position: absolute;
  left: 27%;
  top: 26%;
  width: 10%;
  height: 12%;
  border-radius: 50%;
  background: rgba(255, 255, 255, .9);
}
.brand-orb b {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .35);
}
.brand-words { display: flex; flex-direction: column; gap: 1px; }
.brand-en {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: .04em;
  line-height: 1;
}
.brand-en em { letter-spacing: .03em; }
.brand-cn {
  font-size: 9px;
  letter-spacing: .32em;
  color: var(--muted-2);
  line-height: 1.5;
}
.topbar-mid { flex: 1 1 auto; display: flex; align-items: center; justify-content: center; min-width: 0; }
.topbar-actions { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.conn-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 30px;
  padding: 0 11px;
  border-radius: 99px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .035);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--muted);
  margin-right: 4px;
  transition: .2s;
}
.conn-pill i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted-2);
  transition: .2s;
}
.conn-pill[data-state='open'] { color: #bff6e2; border-color: rgba(88, 230, 179, .24); }
.conn-pill[data-state='open'] i { background: var(--good); box-shadow: 0 0 9px rgba(88, 230, 179, .8); }
.conn-pill[data-state='connecting'] { color: #ffe3a8; border-color: rgba(255, 204, 92, .22); }
.conn-pill[data-state='connecting'] i { background: var(--amber); animation: livePulse 1s infinite; }
.conn-pill[data-state='offline'] { color: #ffb6c6; border-color: rgba(255, 84, 115, .22); }
.conn-pill[data-state='offline'] i { background: var(--danger); }

/* ---------- screens ---------- */
#app { position: relative; z-index: 1; padding-top: 72px; }
.screen { display: none; min-height: calc(100dvh - 72px); }
.screen.is-active { display: block; animation: screenIn .5s var(--ease) both; }
@keyframes screenIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.reveal { opacity: 0; transform: translateY(14px); animation: revealUp .8s var(--ease) forwards; }
.reveal:nth-child(1) { animation-delay: .05s; }
.reveal:nth-child(2) { animation-delay: .1s; }
.reveal:nth-child(3) { animation-delay: .16s; }
.reveal:nth-child(4) { animation-delay: .22s; }
.reveal:nth-child(5) { animation-delay: .3s; }
.reveal:nth-child(6) { animation-delay: .38s; }
.reveal:nth-child(7) { animation-delay: .46s; }
@keyframes revealUp { to { opacity: 1; transform: translateY(0); } }

/* ---------- home ---------- */
.screen-home {
  position: relative;
  padding: 4vh 28px 30px;
  max-width: 1440px;
  margin: 0 auto;
}
.home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr);
  align-items: center;
  gap: clamp(24px, 4vw, 70px);
  max-width: 1260px;
  margin: 0 auto;
}
.home-copy { max-width: 620px; }
.logo {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  margin: 14px 0 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(64px, 8.2vw, 118px);
  line-height: .84;
  letter-spacing: -.045em;
  color: #f3f8ff;
  text-shadow: 0 10px 50px rgba(98, 180, 255, .16);
}
.logo-bubble { color: #fff; }
.logo-nova {
  display: block;
  width: 100%;
  margin-top: 2px;
  font-size: .78em;
  letter-spacing: -.005em;
  background: linear-gradient(100deg, #7ceaff 4%, #9b9dff 44%, #ff8ec3 96%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 8px 24px rgba(140, 140, 255, .18));
}
.logo-cn {
  margin-top: 16px;
  font-size: clamp(14px, 1.4vw, 18px);
  font-weight: 600;
  letter-spacing: .42em;
  color: #b8c9ea;
  padding-left: .3em;
}
.tagline {
  margin: 26px 0 0;
  font-size: clamp(15px, 1.15vw, 17px);
  line-height: 1.85;
  color: var(--muted);
  letter-spacing: .02em;
}
.profile-card {
  margin-top: 32px;
  width: min(100%, 470px);
  padding: 18px 20px 16px;
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .055), transparent 42%),
    rgba(12, 19, 40, .6);
  border: 1px solid var(--line);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .24);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.profile-main { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.field-label { display: block; margin-bottom: 7px; font-size: 10px; letter-spacing: .18em; color: var(--muted-2); font-weight: 700; text-transform: uppercase; }
.name-row { position: relative; display: flex; align-items: center; gap: 8px; }
.name-input {
  width: 100%;
  min-width: 0;
  height: 38px;
  padding: 0 2px;
  border: 0;
  border-bottom: 1px solid rgba(160, 190, 255, .24);
  background: transparent;
  border-radius: 0;
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 500;
  letter-spacing: .01em;
  color: var(--text);
  outline: none;
  transition: border-color .2s;
}
.name-input::placeholder { color: #5f7095; font-weight: 400; }
.name-input:focus { border-color: var(--cyan); }
.dice-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #a7f2ff;
  background: rgba(97, 232, 255, .08);
  border: 1px solid rgba(97, 232, 255, .14);
  transition: .2s;
  flex: 0 0 auto;
}
.dice-btn:hover { transform: rotate(15deg) scale(1.05); background: rgba(97, 232, 255, .15); }
.dice-btn .icon { width: 15px; height: 15px; }
.avatar-picker { display: flex; gap: 6px; margin-top: 16px; }
.avatar-choice {
  position: relative;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 50%;
  border: 2px solid transparent;
  transition: transform .18s var(--ease-back), border-color .18s, box-shadow .18s;
  background: transparent;
}
.avatar-choice svg { width: 100%; height: 100%; display: block; }
.avatar-choice:hover { transform: translateY(-3px) scale(1.05); }
.avatar-choice[aria-checked='true'] {
  border-color: rgba(255, 255, 255, .9);
  box-shadow: 0 0 0 4px rgba(97, 232, 255, .13), 0 0 20px rgba(97, 232, 255, .28);
  transform: translateY(-2px) scale(1.06);
}
.home-actions { margin-top: 26px; width: min(100%, 470px); }
.btn-hero { width: 100%; }
.home-actions-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.home-actions-row .btn { min-height: 46px; font-size: 14px; }
.home-note { margin: 14px 0 0; font-size: 11px; letter-spacing: .08em; color: var(--muted-2); }
.invite-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  width: min(100%, 470px);
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(97, 232, 255, .24);
  background: rgba(97, 232, 255, .07);
  font-size: 13px;
  color: #d6f7ff;
}
.invite-banner code { font-family: var(--font-display); letter-spacing: .16em; color: #fff; }
.home-footer {
  max-width: 1260px;
  margin: 46px auto 0;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 10px;
  letter-spacing: .12em;
  color: #5f7096;
  text-transform: uppercase;
}
.foot-dot { color: #35425f; }
.feature-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  max-width: 1260px;
  margin: 38px auto 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.feature {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 20px 22px;
  position: relative;
}
.feature + .feature::before {
  content: '';
  position: absolute;
  left: 0;
  top: 22%;
  height: 56%;
  width: 1px;
  background: var(--line);
}
.feature .icon { width: 22px; height: 22px; color: #8fdcff; opacity: .8; }
.feature b { display: block; font-size: 13px; font-weight: 700; color: #dfeaff; letter-spacing: .02em; }
.feature span { display: block; margin-top: 2px; font-size: 11px; color: var(--muted-2); letter-spacing: .03em; }

/* home visual */
.home-visual { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 0; }
.orb-stage {
  position: relative;
  width: min(100%, 560px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}
.orb-halo {
  position: absolute;
  inset: 8%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(86, 190, 255, .2), rgba(125, 95, 255, .08) 46%, transparent 68%);
  filter: blur(20px);
}
.orb-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(142, 192, 255, .14);
  pointer-events: none;
}
.orb-ring-a { inset: 3%; border-style: dashed; animation: ringSpin 50s linear infinite; }
.orb-ring-b { inset: 15%; border-color: rgba(255, 255, 255, .07); animation: ringSpin 38s linear infinite reverse; }
.orb-ring-c { inset: 27%; border-style: dashed; border-color: rgba(170, 130, 255, .12); animation: ringSpin 60s linear infinite; }
@keyframes ringSpin { to { transform: rotate(360deg); } }
.orb-core {
  position: relative;
  width: 42%;
  aspect-ratio: 1;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background:
    radial-gradient(circle at 34% 24%, rgba(255, 255, 255, .95), rgba(255, 255, 255, 0) 20%),
    radial-gradient(circle at 38% 30%, rgba(156, 244, 255, .95), rgba(70, 143, 255, .72) 44%, rgba(98, 72, 205, .82) 76%, rgba(12, 16, 48, .94));
  border: 1px solid rgba(255, 255, 255, .35);
  box-shadow:
    0 30px 70px rgba(44, 116, 255, .3),
    inset 0 -18px 36px rgba(4, 10, 40, .55),
    inset 0 8px 22px rgba(255, 255, 255, .35);
  animation: coreFloat 7s ease-in-out infinite;
}
@keyframes coreFloat { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-12px) rotate(1deg); } }
.orb-core::before {
  content: '';
  position: absolute;
  inset: -9%;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .1);
}
.orb-core::after {
  content: '';
  position: absolute;
  left: 16%;
  top: 12%;
  width: 38%;
  height: 20%;
  border-radius: 50%;
  background: rgba(255, 255, 255, .34);
  filter: blur(5px);
  transform: rotate(-28deg);
}
.orb-core b {
  position: relative;
  z-index: 1;
  font-family: var(--font-display);
  font-size: clamp(54px, 8vw, 96px);
  font-weight: 600;
  color: #fff;
  line-height: .92;
  text-shadow: 0 5px 30px rgba(97, 232, 255, .45);
}
.orb-core span {
  position: relative;
  z-index: 1;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .28em;
  text-align: center;
  color: rgba(230, 244, 255, .7);
  line-height: 1.6;
}
.orb-shine {
  position: absolute;
  inset: 4%;
  border-radius: 50%;
  background: radial-gradient(circle at 70% 80%, transparent 52%, rgba(255, 255, 255, .08) 72%, transparent 74%);
}
.orbit-orbit { position: absolute; inset: 0; pointer-events: none; }
.orb-avatar {
  position: absolute;
  width: 11.5%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, .38));
  animation: satFloat 5.4s ease-in-out infinite;
}
.orb-avatar svg { width: 100%; height: 100%; display: block; }
@keyframes satFloat { 0%, 100% { margin-top: 0; } 50% { margin-top: -9px; } }
.float-bubble {
  position: absolute;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 27%, rgba(255, 255, 255, .85), transparent 20%),
    radial-gradient(circle at 38% 34%, rgba(255, 255, 255, .16), rgba(120, 160, 255, .1) 48%, rgba(40, 70, 160, .25));
  border: 1px solid rgba(255, 255, 255, .16);
  box-shadow: inset 0 -8px 18px rgba(10, 16, 50, .28);
  backdrop-filter: blur(2px);
  animation: bubbleFloat 8s ease-in-out infinite;
}
.float-bubble i { position: absolute; inset: 12%; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .07); }
.fb-a { width: 26px; height: 26px; left: 7%; top: 23%; animation-delay: -2s; }
.fb-b { width: 14px; height: 14px; left: 84%; top: 18%; animation-delay: -4s; }
.fb-c { width: 38px; height: 38px; left: 89%; top: 67%; animation-delay: -1s; }
.fb-d { width: 18px; height: 18px; left: 13%; top: 75%; animation-delay: -5s; }
@keyframes bubbleFloat { 0%, 100% { transform: translateY(0) translateX(0); } 50% { transform: translateY(-18px) translateX(5px); } }
.visual-caption {
  display: flex;
  gap: 18px;
  margin-top: -4px;
  font-size: 9px;
  letter-spacing: .14em;
  color: #7184ab;
  text-transform: uppercase;
}
.visual-caption span { position: relative; padding-left: 13px; }
.visual-caption span::before { content: ''; position: absolute; left: 0; top: 50%; width: 5px; height: 5px; border-radius: 50%; background: var(--cyan); opacity: .7; transform: translateY(-50%); }

/* ---------- lobby ---------- */
.screen-lobby { padding: 34px 28px 50px; }
.lobby-shell { max-width: 1200px; margin: 0 auto; }
.lobby-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.screen-title {
  margin: 10px 0 0;
  font-family: var(--font-display);
  font-size: clamp(40px, 5vw, 62px);
  font-weight: 600;
  line-height: .95;
  letter-spacing: -.03em;
  color: #f5f9ff;
}
.screen-sub { margin: 12px 0 0; color: var(--muted); font-size: 13px; letter-spacing: .02em; }
.room-ticket {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px 14px 14px 22px;
  border-radius: 20px;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, .06), transparent 40%),
    rgba(12, 20, 43, .74);
  border: 1px solid var(--line);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .24);
  position: relative;
  overflow: hidden;
}
.room-ticket::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--cyan), var(--violet), var(--pink));
}
.ticket-left { display: flex; flex-direction: column; gap: 2px; }
.ticket-label { font-size: 9px; letter-spacing: .24em; color: var(--muted-2); font-weight: 700; }
.room-code {
  font-family: var(--font-display);
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 600;
  letter-spacing: .17em;
  color: #fff;
  line-height: 1.1;
}
.ticket-hint { font-size: 10px; color: var(--muted-2); letter-spacing: .04em; }
.ticket-actions { display: flex; gap: 6px; }
.lobby-layout { display: grid; grid-template-columns: minmax(0, 1fr) 350px; gap: 20px; align-items: start; }
.seats-panel { padding: 24px; }
.seats-panel .panel-head { margin-bottom: 18px; }
.seats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.seat {
  position: relative;
  min-height: 154px;
  padding: 15px 13px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .025);
  border: 1px solid rgba(160, 190, 255, .1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
  transition: .25s var(--ease);
}
.seat.is-filled { background: linear-gradient(160deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .015)); border-color: var(--line); }
.seat.is-self { border-color: rgba(97, 232, 255, .42); box-shadow: inset 0 0 30px rgba(97, 232, 255, .06), 0 0 24px rgba(97, 232, 255, .08); }
.seat.is-bot { opacity: .86; }
.seat.is-offline { opacity: .5; filter: grayscale(.5); }
.seat.is-empty { border-style: dashed; color: var(--muted-2); }
.seat .avatar {
  width: 58px;
  height: 58px;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .3));
}
.seat-name { font-size: 13px; font-weight: 700; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seat-tags { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; justify-content: center; min-height: 16px; }
.tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 16px;
  padding: 0 6px;
  border-radius: 99px;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #9fb3d6;
  background: rgba(255, 255, 255, .05);
}
.tag.host { color: #ffe3a1; background: rgba(255, 204, 92, .11); }
.tag.bot { color: #9dd7ff; background: rgba(90, 180, 255, .1); }
.tag.offline { color: #ffb1c0; background: rgba(255, 84, 115, .1); }
.tag.you { color: #9ff5ff; background: rgba(97, 232, 255, .1); }
.seat-empty-plus {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px dashed rgba(160, 190, 255, .25);
  color: #6c81ab;
  font-size: 22px;
  font-weight: 300;
}
.seat-empty-label { font-size: 10px; letter-spacing: .08em; }
.seat-crown {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 18px;
  height: 18px;
  color: #ffd56a;
  filter: drop-shadow(0 0 8px rgba(255, 204, 92, .45));
}
.seat-place {
  position: absolute;
  top: 9px;
  left: 9px;
  font-family: var(--font-display);
  font-size: 10px;
  color: var(--muted-2);
}
.seats-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(150, 180, 255, .08);
  font-size: 11px;
  color: var(--muted-2);
}
.seats-foot .icon { color: #7e95c0; width: 15px; height: 15px; }
.lobby-side { display: flex; flex-direction: column; gap: 14px; }
.settings-panel, .how-panel { padding: 20px; }
.host-tag { color: #7f93ba; font-size: 9px; letter-spacing: .12em; }
.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
  cursor: pointer;
}
.switch-copy b { display: block; font-size: 13px; }
.switch-copy small { display: block; margin-top: 3px; font-size: 10px; color: var(--muted-2); }
.switch-row input { position: absolute; opacity: 0; pointer-events: none; }
.switch {
  position: relative;
  width: 46px;
  height: 26px;
  border-radius: 99px;
  background: rgba(255, 255, 255, .1);
  border: 1px solid var(--line);
  transition: .22s;
  flex: 0 0 auto;
}
.switch::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #8fa4c8;
  transition: .22s var(--ease-back);
}
.switch-row input:checked + .switch { background: rgba(97, 232, 255, .25); border-color: rgba(97, 232, 255, .4); }
.switch-row input:checked + .switch::after { left: 23px; background: #d9fbff; box-shadow: 0 0 12px rgba(97, 232, 255, .8); }
.switch-row input:disabled + .switch { opacity: .45; }
.settings-list { margin-top: 18px; border-top: 1px solid rgba(150, 180, 255, .08); padding-top: 12px; display: grid; gap: 9px; }
.settings-list div { display: flex; align-items: center; justify-content: space-between; font-size: 11px; color: var(--muted-2); }
.settings-list b { color: #b9c9e6; font-weight: 600; }
.how-list { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 11px; counter-reset: how; }
.how-list li { display: grid; grid-template-columns: 26px 1fr; gap: 10px; align-items: center; counter-increment: how; }
.how-list li::before {
  content: '0' counter(how);
  font-family: var(--font-display);
  font-size: 11px;
  color: var(--cyan);
  opacity: .8;
  grid-row: span 2;
}
.how-list b { font-size: 12px; color: #d7e4fb; }
.how-list span { font-size: 10px; color: var(--muted-2); }
.auto-countdown {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(97, 232, 255, .055);
  border: 1px solid rgba(97, 232, 255, .16);
}
.auto-ring {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--cyan) calc(var(--p, 0) * 1%), rgba(255, 255, 255, .08) 0);
  flex: 0 0 auto;
}
.auto-ring::before { content: ''; position: absolute; inset: 4px; border-radius: 50%; background: #0b1429; }
.auto-ring span { position: relative; z-index: 1; font-family: var(--font-display); font-size: 15px; color: #d8fcff; }
.auto-countdown b { display: block; font-size: 12px; color: #d8f9ff; }
.auto-countdown span { display: block; font-size: 10px; color: var(--muted-2); margin-top: 2px; }
.lobby-actions { display: flex; flex-direction: column; gap: 6px; margin-top: 2px; }
.lobby-actions .btn-primary { width: 100%; min-height: 54px; font-size: 16px; }
.waiting-copy { margin: 6px 0 0; text-align: center; font-size: 11px; color: var(--muted-2); }

/* ---------- game ---------- */
.screen-game { padding: 14px 22px 18px; }
.screen-game.is-active { display: flex; flex-direction: column; height: calc(100dvh - 72px); min-height: 560px; }
.game-shell {
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr) 292px;
  gap: 16px;
  width: 100%;
  max-width: 1420px;
  margin: 0 auto;
  flex: 1;
  min-height: 0;
}
.rivals-panel {
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 14px;
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(255, 255, 255, .035), transparent 44%), rgba(10, 17, 37, .52);
  border: 1px solid rgba(160, 190, 255, .09);
}
.rivals-head { padding: 2px 2px 12px; }
.rivals { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; overflow-y: auto; min-height: 0; padding: 1px; align-content: start; }
.rivals-hint { margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(150, 180, 255, .07); font-size: 9px; color: var(--muted-2); text-align: center; letter-spacing: .04em; }
.rival {
  position: relative;
  min-width: 0;
  padding: 8px;
  border-radius: 13px;
  background: rgba(255, 255, 255, .028);
  border: 1px solid rgba(160, 190, 255, .08);
  cursor: pointer;
  transition: .18s var(--ease);
  overflow: hidden;
}
.rival:hover { border-color: rgba(97, 232, 255, .26); background: rgba(97, 232, 255, .045); transform: translateY(-1px); }
.rival.is-target { border-color: rgba(97, 232, 255, .66); box-shadow: 0 0 0 1px rgba(97, 232, 255, .18), 0 0 18px rgba(97, 232, 255, .12); background: rgba(97, 232, 255, .06); }
.rival.is-dead { opacity: .43; filter: grayscale(.7); }
.rival.is-spectated { border-color: rgba(255, 98, 165, .55); }
.rival-top { display: flex; align-items: center; gap: 6px; min-width: 0; }
.rival-avatar { width: 24px; height: 24px; flex: 0 0 auto; }
.rival-name { min-width: 0; font-size: 10px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #d7e4f8; }
.rival-bot { font-size: 8px; color: #81c8ff; border: 1px solid rgba(90, 180, 255, .22); border-radius: 4px; padding: 0 3px; flex: 0 0 auto; }
.rival-body { display: flex; align-items: flex-end; gap: 7px; margin-top: 6px; }
.rival-board { width: 43px; height: 67px; border-radius: 6px; background: #071022; border: 1px solid rgba(140, 175, 255, .1); flex: 0 0 auto; display: block; }
.rival-info { min-width: 0; flex: 1; }
.rival-score { font-family: var(--font-display); font-size: 17px; line-height: 1; color: #fff; font-variant-numeric: tabular-nums; }
.rival-score small { font-size: 8px; color: var(--muted-2); font-family: var(--font-ui); font-weight: 600; margin-left: 2px; }
.rival-danger { height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .08); margin-top: 6px; overflow: hidden; }
.rival-danger i { display: block; height: 100%; width: var(--danger, 0%); border-radius: 3px; background: linear-gradient(90deg, #52e0b5, #ffcc5c 60%, #ff5473); transition: width .4s var(--ease); }
.rival-place {
  position: absolute;
  inset: auto 6px 6px auto;
  font-size: 8px;
  font-weight: 700;
  color: #ffd0da;
  background: rgba(255, 84, 115, .14);
  border: 1px solid rgba(255, 84, 115, .2);
  padding: 1px 4px;
  border-radius: 4px;
}
.rival-flag { position: absolute; top: 5px; right: 5px; width: 12px; height: 12px; color: var(--cyan); opacity: .9; }
.rival-attack {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid rgba(255, 84, 115, .8);
  animation: attackBorder .6s ease-out;
  pointer-events: none;
}
@keyframes attackBorder { from { opacity: 1; box-shadow: inset 0 0 30px rgba(255, 84, 115, .3); } to { opacity: 0; } }

.arena { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.arena-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 4px 10px; }
.target-readout { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--muted); white-space: nowrap; }
.target-readout .icon { width: 14px; height: 14px; color: var(--cyan); }
.target-readout b { color: #e9f7ff; font-weight: 700; }
.arena-tags { display: flex; align-items: center; gap: 8px; }
.round-pill {
  padding: 3px 9px;
  border-radius: 99px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .035);
  font-size: 9px;
  letter-spacing: .1em;
  color: #9fb3d6;
}
.danger-tag {
  padding: 3px 8px;
  border-radius: 99px;
  color: #ffd5dd;
  background: rgba(255, 84, 115, .16);
  border: 1px solid rgba(255, 84, 115, .32);
  font-size: 9px;
  font-weight: 700;
  animation: dangerPulse 1s ease-in-out infinite;
}
@keyframes dangerPulse { 50% { opacity: .58; } }
.board-frame {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 30px;
  background:
    radial-gradient(90% 70% at 50% 109%, rgba(86, 170, 255, .14), transparent 60%),
    linear-gradient(180deg, rgba(255, 255, 255, .035), transparent 28%),
    rgba(8, 14, 32, .56);
  border: 1px solid rgba(150, 190, 255, .13);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .42), inset 0 1px 0 rgba(255, 255, 255, .05);
  overflow: hidden;
  isolation: isolate;
}
.board-glow {
  position: absolute;
  inset: auto 10% -24%;
  height: 44%;
  background: radial-gradient(ellipse, rgba(90, 180, 255, .18), transparent 67%);
  filter: blur(16px);
  pointer-events: none;
}
#game-board {
  display: block;
  border-radius: 22px;
  touch-action: none;
  cursor: crosshair;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .035), 0 24px 60px rgba(0, 0, 0, .45);
  user-select: none;
  -webkit-user-select: none;
}
.arena-foot { display: flex; align-items: center; gap: 16px; padding: 11px 4px 0; min-height: 58px; }
.ammo { display: flex; align-items: center; gap: 7px; }
.ammo-label { font-size: 8px; letter-spacing: .12em; color: var(--muted-2); text-transform: uppercase; }
.ammo-current { width: 42px; height: 42px; }
.ammo-current svg, .ammo-current .bubble-chip { width: 100%; height: 100%; }
.ammo-next { display: flex; gap: 5px; }
.ammo-next .bubble-chip { width: 26px; height: 26px; opacity: .7; }
.aim-hint { flex: 1; text-align: center; font-size: 10px; color: var(--muted-2); letter-spacing: .05em; }
.fire-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 48px;
  padding: 0 18px 0 8px;
  border-radius: 99px;
  background: linear-gradient(120deg, rgba(97, 232, 255, .2), rgba(156, 134, 255, .22));
  border: 1px solid rgba(150, 230, 255, .36);
  box-shadow: 0 10px 30px rgba(80, 180, 255, .16), inset 0 1px 0 rgba(255, 255, 255, .2);
  transition: .18s var(--ease);
}
.fire-btn:hover { transform: translateY(-1px); box-shadow: 0 14px 34px rgba(80, 180, 255, .26); }
.fire-btn:active { transform: scale(.97); }
.fire-btn.is-cooling { opacity: .5; }
.fire-core {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(140deg, #8ff3ff, #88a9ff);
  color: #07152c;
}
.fire-core .icon { width: 16px; height: 16px; }
.fire-label { font-size: 12px; font-weight: 700; color: #d9fbff; letter-spacing: .08em; }

.tactics-panel { display: flex; flex-direction: column; gap: 10px; min-height: 0; overflow-y: auto; padding-right: 2px; }
.self-panel { padding: 14px; }
.self-row { display: flex; align-items: center; gap: 10px; }
.self-avatar { width: 45px; height: 45px; flex: 0 0 auto; }
.self-meta { min-width: 0; flex: 1; }
.self-meta b { display: block; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.self-score { display: block; margin-top: 2px; font-size: 10px; color: var(--muted-2); }
.self-score em { font-style: normal; font-family: var(--font-display); font-size: 21px; color: #fff; margin-right: 2px; }
.self-combo {
  font-family: var(--font-display);
  font-size: 16px;
  color: #ffdcf0;
  padding: 3px 8px;
  border-radius: 8px;
  background: rgba(255, 98, 165, .1);
  border: 1px solid rgba(255, 98, 165, .18);
  transition: .2s;
}
.self-combo.hot { color: #fff; background: rgba(255, 98, 165, .22); box-shadow: 0 0 18px rgba(255, 98, 165, .24); }
.self-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 12px; padding-top: 10px; border-top: 1px solid rgba(150, 180, 255, .08); }
.self-stats div { text-align: center; }
.self-stats span { display: block; font-size: 8px; color: var(--muted-2); letter-spacing: .05em; }
.self-stats b { display: block; margin-top: 1px; font-family: var(--font-display); font-weight: 500; font-size: 14px; color: #d9e9ff; }
.energy-panel, .target-panel, .social-panel, .feed-panel { padding: 13px 14px; }
.energy-panel .panel-head, .target-panel .panel-head, .social-panel .panel-head, .feed-panel .panel-head { font-size: 10px; }
.energy-pips { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; margin-top: 10px; }
.energy-pips i {
  height: 8px;
  border-radius: 99px;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(160, 190, 255, .08);
  transition: .18s;
}
.energy-pips i.on { background: linear-gradient(90deg, #6ee7ff, #bc8dff); border-color: transparent; box-shadow: 0 0 10px rgba(120, 200, 255, .4); }
.energy-pips i.ready { animation: energyReady 1s ease-in-out infinite; }
@keyframes energyReady { 50% { box-shadow: 0 0 18px rgba(190, 140, 255, .9); } }
.energy-copy { margin: 9px 0 0; font-size: 9px; line-height: 1.5; color: var(--muted-2); }
.target-face { margin-top: 8px; min-height: 38px; }
.target-chip { display: flex; align-items: center; gap: 8px; padding: 5px 8px; border-radius: 10px; background: rgba(97, 232, 255, .05); border: 1px solid rgba(97, 232, 255, .13); }
.target-chip .avatar { width: 28px; height: 28px; }
.target-chip b { font-size: 11px; }
.target-chip span { display: block; font-size: 8px; color: var(--muted-2); }
.target-auto { font-size: 9px; color: var(--muted-2); }
.emote-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; margin-top: 8px; }
.emote-btn {
  height: 30px;
  border-radius: 8px;
  font-size: 15px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(160, 190, 255, .07);
  transition: .15s;
}
.emote-btn:hover { background: rgba(97, 232, 255, .12); transform: translateY(-1px); }
.chat-row { display: flex; gap: 5px; margin-top: 5px; overflow-x: auto; padding-bottom: 2px; }
.chat-btn {
  flex: 0 0 auto;
  height: 24px;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 9px;
  color: #a7b8d8;
  background: rgba(255, 255, 255, .035);
  border: 1px solid rgba(160, 190, 255, .07);
}
.chat-btn:hover { color: #fff; background: rgba(255, 255, 255, .07); }
.feed-panel { flex: 1; min-height: 80px; display: flex; flex-direction: column; }
.feed { display: flex; flex-direction: column; gap: 5px; margin-top: 8px; overflow-y: auto; flex: 1; min-height: 0; }
.feed-item { display: flex; gap: 6px; font-size: 9px; line-height: 1.5; color: var(--muted); animation: feedIn .3s var(--ease); }
.feed-item b { color: #cfe0fa; font-weight: 600; }
.feed-item em { font-style: normal; color: #ffd38e; }
.feed-item .feed-dot { width: 4px; height: 4px; border-radius: 50%; background: #506282; margin-top: 5px; flex: 0 0 auto; }
.feed-item.danger .feed-dot { background: var(--danger); }
.feed-item.good .feed-dot { background: var(--good); }
.feed-item.gold .feed-dot { background: var(--amber); }
@keyframes feedIn { from { opacity: 0; transform: translateX(-4px); } }

/* game overlays */
.countdown-overlay {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: radial-gradient(circle at 50% 55%, rgba(7, 12, 28, .5), rgba(5, 8, 20, .82));
  backdrop-filter: blur(3px);
  border-radius: 22px;
  pointer-events: none;
}
.countdown-kicker { font-size: 10px; letter-spacing: .3em; color: #9db5de; text-transform: uppercase; }
.countdown-overlay strong {
  font-family: var(--font-display);
  font-size: clamp(74px, 11vw, 118px);
  font-weight: 600;
  line-height: 1;
  background: linear-gradient(120deg, #8af4ff, #b5a0ff 55%, #ff8fc3);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 50px rgba(97, 232, 255, .35);
  animation: countPop .9s var(--ease-back);
}
@keyframes countPop { from { transform: scale(.6); opacity: 0; } }
.countdown-text { font-size: 11px; color: var(--muted); letter-spacing: .08em; }
.dead-overlay {
  position: absolute;
  inset: 0;
  z-index: 7;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: radial-gradient(circle at 50% 50%, rgba(20, 8, 24, .36), rgba(4, 7, 18, .78));
  backdrop-filter: blur(2px);
  border-radius: 22px;
  text-align: center;
}
.dead-kicker { font-size: 10px; letter-spacing: .3em; color: #ff9db1; }
.dead-overlay strong { font-family: var(--font-display); font-size: 46px; font-weight: 600; color: #fff; line-height: 1; }
.dead-overlay p { margin: 2px 0 10px; font-size: 12px; color: var(--muted); }
.dead-actions { display: flex; gap: 8px; }
.conn-overlay {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(5, 8, 20, .76);
  backdrop-filter: blur(5px);
  border-radius: 22px;
  text-align: center;
}
.conn-overlay strong { font-size: 14px; margin-top: 4px; }
.conn-overlay span { font-size: 11px; color: var(--muted); }
.spinner {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .12);
  border-top-color: var(--cyan);
  animation: spin .9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.combo-banner {
  position: absolute;
  top: 16%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  padding: 8px 20px;
  border-radius: 99px;
  background: rgba(10, 16, 34, .72);
  border: 1px solid rgba(255, 128, 190, .3);
  box-shadow: 0 0 36px rgba(255, 90, 170, .24);
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: .02em;
  color: #ffe6f3;
  text-shadow: 0 0 20px rgba(255, 98, 165, .5);
  pointer-events: none;
  animation: comboPop .35s var(--ease-back);
  white-space: nowrap;
}
@keyframes comboPop { from { opacity: 0; transform: translateX(-50%) scale(.7); } }
.attack-flash {
  position: absolute;
  inset: 0;
  z-index: 4;
  border-radius: 22px;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle at 50% 80%, rgba(255, 84, 115, .0), rgba(255, 84, 115, .3) 70%, rgba(255, 84, 115, .45));
}
.attack-flash.flash { animation: attackFlash .55s ease-out; }
@keyframes attackFlash { 0% { opacity: 0; } 18% { opacity: 1; } 100% { opacity: 0; } }

/* topbar match widget */
.match-widget { display: flex; align-items: center; gap: 14px; min-width: 0; }
.match-timer {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 99px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .03);
  font-family: var(--font-display);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  letter-spacing: .04em;
  color: #e5f2ff;
}
.match-timer .icon { width: 14px; height: 14px; color: var(--cyan); }
.match-timer.low { color: #ffc1cd; border-color: rgba(255, 84, 115, .32); background: rgba(255, 84, 115, .08); }
.match-timer.low .icon { color: var(--danger); }
.match-room { font-size: 10px; letter-spacing: .16em; color: var(--muted-2); }
.match-room b { color: #c8d9f4; letter-spacing: .2em; }

/* ---------- result ---------- */
.screen-result {
  position: relative;
  padding: 32px 24px 60px;
  overflow: hidden;
}
#confetti-canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
.result-shell { position: relative; z-index: 1; max-width: 1000px; margin: 0 auto; }
.result-top { text-align: center; margin-bottom: 26px; }
.result-kicker { font-size: 10px; letter-spacing: .34em; color: #8ea5cc; text-transform: uppercase; }
.result-title {
  margin: 8px 0 0;
  font-family: var(--font-display);
  font-size: clamp(58px, 8vw, 92px);
  font-weight: 600;
  line-height: .9;
  letter-spacing: -.02em;
  background: linear-gradient(100deg, #94f1ff, #b4a4ff 45%, #ff9ac9 92%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 10px 30px rgba(130, 160, 255, .2));
}
.result-sub { margin: 12px 0 0; color: var(--muted); font-size: 13px; letter-spacing: .03em; }
.podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; gap: 12px; align-items: end; margin: 26px auto 20px; max-width: 820px; }
.podium-card {
  position: relative;
  padding: 20px 12px 16px;
  border-radius: 20px;
  text-align: center;
  background: linear-gradient(165deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .02));
  border: 1px solid var(--line);
  transition: .3s;
}
.podium-card.p1 {
  padding-top: 28px;
  background:
    radial-gradient(100% 80% at 50% 0%, rgba(255, 204, 92, .16), transparent 62%),
    linear-gradient(165deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, .02));
  border-color: rgba(255, 204, 92, .34);
  box-shadow: 0 26px 60px rgba(255, 182, 60, .12);
  transform: translateY(-10px);
}
.podium-card.p2 { border-color: rgba(196, 214, 255, .2); }
.podium-card.p3 { border-color: rgba(255, 170, 130, .18); }
.podium-rank {
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 12px;
  background: #111b34;
  border: 1px solid var(--line);
  color: #c9d9f3;
}
.podium-card.p1 .podium-rank { color: #201400; background: linear-gradient(140deg, #ffe8a3, #ffc44d); border-color: rgba(255, 255, 255, .5); box-shadow: 0 0 20px rgba(255, 200, 80, .45); }
.podium-card.p2 .podium-rank { color: #e8f0ff; background: linear-gradient(140deg, #d6e3f7, #8fa5c8); }
.podium-card.p3 .podium-rank { color: #241008; background: linear-gradient(140deg, #ffcaa2, #d38b62); }
.podium-avatar { width: 72px; height: 72px; margin: 2px auto 6px; }
.podium-card.p1 .podium-avatar { width: 92px; height: 92px; }
.podium-name { font-size: 13px; font-weight: 700; color: #ecf4ff; }
.podium-score { margin-top: 3px; font-family: var(--font-display); font-size: 23px; color: #fff; }
.podium-score small { font-family: var(--font-ui); font-size: 9px; color: var(--muted-2); margin-left: 2px; }
.podium-tags { display: flex; justify-content: center; gap: 4px; margin-top: 6px; }
.ranking-panel { padding: 20px 22px 12px; max-width: 820px; margin: 0 auto; }
.ranking { margin-top: 10px; }
.rank-row {
  display: grid;
  grid-template-columns: 36px 30px minmax(0, 1fr) 74px 64px 64px 58px;
  align-items: center;
  gap: 10px;
  padding: 9px 6px;
  border-top: 1px solid rgba(150, 180, 255, .07);
  font-size: 11px;
  color: var(--muted);
}
.rank-row:first-child { border-top: 0; }
.rank-row.is-me { background: linear-gradient(90deg, rgba(97, 232, 255, .08), transparent); border-radius: 8px; }
.rank-num { font-family: var(--font-display); font-size: 15px; color: #9fb3d6; }
.rank-row:nth-child(1) .rank-num { color: #ffd56a; }
.rank-avatar { width: 28px; height: 28px; }
.rank-name { color: #dce8fb; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-name .tag { margin-left: 5px; vertical-align: 1px; }
.rank-score { font-family: var(--font-display); font-size: 17px; color: #fff; text-align: right; }
.rank-stat { text-align: right; font-variant-numeric: tabular-nums; }
.rank-stat span { display: block; font-size: 7px; letter-spacing: .08em; color: var(--muted-2); }
.result-actions { display: flex; justify-content: center; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.result-hint { margin: 14px 0 0; text-align: center; font-size: 10px; letter-spacing: .08em; color: var(--muted-2); }

/* ---------- toasts / modal ---------- */
.toasts {
  position: fixed;
  right: 22px;
  top: 86px;
  z-index: 120;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
  pointer-events: none;
  max-width: min(360px, calc(100vw - 32px));
}
.toast {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 15px;
  border-radius: 12px;
  background: rgba(12, 20, 42, .92);
  border: 1px solid var(--line);
  box-shadow: 0 16px 36px rgba(0, 0, 0, .4);
  backdrop-filter: blur(14px);
  font-size: 12px;
  color: #e1ecfe;
  animation: toastIn .3s var(--ease) both;
}
.toast::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 10px var(--cyan); flex: 0 0 auto; }
.toast.error::before { background: var(--danger); box-shadow: 0 0 10px var(--danger); }
.toast.good::before { background: var(--good); box-shadow: 0 0 10px var(--good); }
.toast.out { animation: toastOut .25s ease both; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-6px) scale(.97); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(8px); } }

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: rgba(3, 6, 16, .68);
  backdrop-filter: blur(9px);
  animation: fadeIn .2s ease;
}
@keyframes fadeIn { from { opacity: 0; } }

.modal {
  width: min(540px, 100%);
  max-height: min(86vh, 860px);
  overflow-y: auto;
  padding: 26px;
  border-radius: 24px;
  background:
    radial-gradient(120% 60% at 0% 0%, rgba(97, 232, 255, .09), transparent 40%),
    linear-gradient(160deg, rgba(255, 255, 255, .06), transparent 26%),
    #0a1226;
  border: 1px solid rgba(170, 200, 255, .16);
  box-shadow: 0 40px 100px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .06);
  animation: modalIn .3s var(--ease-back);
}
@keyframes modalIn { from { opacity: 0; transform: translateY(14px) scale(.97); } }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.modal-kicker { font-size: 9px; letter-spacing: .26em; color: var(--cyan); text-transform: uppercase; }
.modal-title { margin: 3px 0 0; font-family: var(--font-display); font-size: 28px; font-weight: 600; letter-spacing: -.01em; }
.modal-close { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: var(--muted); background: rgba(255, 255, 255, .04); }
.modal-close:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.modal-body { margin-top: 18px; color: #b8c8e5; font-size: 13px; line-height: 1.75; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 22px; }
.code-input {
  width: 100%;
  height: 66px;
  margin-top: 12px;
  padding: 0 18px;
  border-radius: 15px;
  border: 1px solid var(--line);
  background: rgba(4, 8, 20, .62);
  font-family: var(--font-display);
  font-size: 30px;
  letter-spacing: .32em;
  text-align: center;
  text-transform: uppercase;
  color: #fff;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.code-input:focus { border-color: rgba(97, 232, 255, .5); box-shadow: 0 0 0 4px rgba(97, 232, 255, .08); }
.code-input::placeholder { color: #465877; letter-spacing: .2em; }
.code-help { margin: 8px 0 0; font-size: 10px; color: var(--muted-2); text-align: center; }
.rules-grid { display: grid; gap: 16px; }
.rule-block { padding: 13px 15px; border-radius: 14px; background: rgba(255, 255, 255, .025); border: 1px solid rgba(160, 190, 255, .08); }
.rule-block h4 { margin: 0 0 4px; font-size: 12px; color: #e2efff; display: flex; align-items: center; gap: 7px; }
.rule-block h4 .icon { color: var(--cyan); width: 15px; height: 15px; }
.rule-block p { margin: 0; font-size: 11px; line-height: 1.7; color: var(--muted); }
.rule-block b { color: #dfeaff; }
.rule-list { margin: 6px 0 0; padding-left: 18px; font-size: 11px; color: var(--muted); line-height: 1.8; }
.leave-warning { color: #ffc4cf; }

.noscript {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: #050814;
  z-index: 999;
  color: #fff;
  font-size: 16px;
}
.boot-overlay {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: rgba(4, 7, 18, .82);
  backdrop-filter: blur(10px);
}
.boot-overlay .brand-orb { width: 64px; height: 64px; animation: coreFloat 4s ease-in-out infinite; }
.boot-overlay strong { font-family: var(--font-display); font-size: 19px; font-weight: 500; }
.boot-overlay span { font-size: 11px; color: var(--muted); letter-spacing: .06em; }
.bubble-chip { display: inline-block; border-radius: 50%; position: relative; }
.bubble-chip svg { width: 100%; height: 100%; display: block; }
.empty-feed { font-size: 9px; color: #4e5f7f; padding: 6px 0; }

@media (max-width: 1180px) {
  .game-shell { grid-template-columns: 224px minmax(0, 1fr) 264px; gap: 12px; }
  .screen-game { padding: 12px 16px 16px; }
  .rival-board { width: 38px; height: 59px; }
  .rival-name { font-size: 9px; }
  .rival-score { font-size: 15px; }
}
@media (max-width: 1020px) {
  .home-grid { grid-template-columns: 1fr; gap: 16px; }
  .home-copy { max-width: 640px; margin: 0 auto; width: 100%; text-align: left; }
  .home-visual { order: 2; margin-top: 18px; }
  .orb-stage { width: min(80vw, 430px); }
  .feature-strip { grid-template-columns: repeat(2, 1fr); }
  .feature:nth-child(3)::before { display: none; }
  .lobby-layout { grid-template-columns: 1fr; }
  .lobby-side { display: grid; grid-template-columns: 1fr 1fr; align-items: start; }
  .lobby-actions, .auto-countdown { grid-column: 1 / -1; }
  .seats { grid-template-columns: repeat(4, 1fr); }
  .game-shell { grid-template-columns: 196px minmax(0, 1fr) 240px; gap: 10px; }
  .screen-game { padding: 10px 12px 14px; }
  .rivals { gap: 6px; }
  .rival { padding: 6px; }
  .rival-board { width: 32px; height: 50px; }
  .rival-score { font-size: 13px; }
  .target-panel, .social-panel { display: none; }
  .self-stats { display: none; }
  .self-panel { padding: 10px; }
}
@media (max-width: 820px) {
  .topbar { height: 60px; padding: 0 12px; gap: 8px; }
  #app { padding-top: 60px; }
  .screen { min-height: calc(100dvh - 60px); }
  .brand-orb { width: 32px; height: 32px; }
  .brand-en { font-size: 14px; }
  .brand-cn { font-size: 8px; }
  .conn-pill span:last-child { display: none; }
  .conn-pill { width: 30px; padding: 0; justify-content: center; }
  .topbar-actions { gap: 2px; }
  .icon-btn { width: 36px; height: 36px; }
  .screen-home { padding: 2vh 18px 24px; }
  .logo { font-size: clamp(56px, 15vw, 86px); }
  .logo-cn { font-size: 13px; letter-spacing: .34em; margin-top: 12px; }
  .tagline { margin-top: 18px; font-size: 14px; }
  .profile-card { margin-top: 22px; padding: 14px; }
  .home-actions { margin-top: 18px; }
  .home-visual { display: none; }
  .feature-strip { margin-top: 28px; }
  .feature { padding: 14px 10px; gap: 9px; }
  .feature .icon { width: 18px; height: 18px; }
  .feature b { font-size: 11px; }
  .feature span { font-size: 9px; }
  .home-footer { margin-top: 26px; font-size: 8px; }
  .screen-lobby { padding: 22px 16px 40px; }
  .lobby-head { gap: 18px; margin-bottom: 18px; }
  .room-ticket { width: 100%; justify-content: space-between; }
  .seats { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .seat { min-height: 126px; padding: 10px; }
  .seat .avatar { width: 46px; height: 46px; }
  .lobby-side { grid-template-columns: 1fr; }
  .lobby-side .how-panel { display: none; }
  .screen-game.is-active { display: block; height: auto; min-height: calc(100dvh - 60px); padding: 6px 8px 12px; }
  .game-shell { display: flex; flex-direction: column; gap: 6px; height: auto; }
  .rivals-panel { flex: 0 0 auto; padding: 8px; border-radius: 16px; }
  .rivals-head { padding: 0 2px 6px; font-size: 10px; }
  .rivals { display: flex; gap: 6px; overflow-x: auto; overflow-y: hidden; padding-bottom: 2px; }
  .rival { flex: 0 0 86px; padding: 6px; border-radius: 10px; }
  .rival-body { margin-top: 4px; gap: 4px; }
  .rival-board { width: 26px; height: 40px; border-radius: 4px; }
  .rival-score { font-size: 12px; }
  .rival-name { font-size: 8px; }
  .rival-avatar { width: 18px; height: 18px; }
  .rivals-hint { display: none; }
  .arena { flex: 1; min-height: 0; }
  .arena-head { padding: 2px 4px 6px; }
  .target-readout { font-size: 10px; }
  .arena-foot { padding: 6px 2px 0; min-height: 48px; gap: 8px; }
  .ammo-current { width: 34px; height: 34px; }
  .ammo-next .bubble-chip { width: 20px; height: 20px; }
  .aim-hint { font-size: 8px; }
  .tactics-panel {
    display: flex;
    flex-direction: row;
    gap: 6px;
    overflow: visible;
    padding: 0;
    align-items: stretch;
  }
  .self-panel { flex: 0 0 auto; padding: 8px 10px; display: flex; align-items: center; }
  .self-row { gap: 7px; }
  .self-avatar { width: 32px; height: 32px; }
  .self-score em { font-size: 16px; }
  .self-combo { font-size: 12px; padding: 2px 5px; }
  .self-stats { display: none; }
  .energy-panel { flex: 1; padding: 8px 10px; }
  .energy-panel .energy-copy { display: none; }
  .energy-pips { margin-top: 5px; }
  .feed-panel, .target-panel, .social-panel { display: none; }
  .fire-btn { height: 44px; padding: 0 14px 0 7px; }
  .fire-core { width: 30px; height: 30px; }
  .dead-overlay strong { font-size: 34px; }
  .screen-result { padding: 20px 14px 40px; }
  .podium { gap: 6px; margin-top: 18px; }
  .podium-card { padding: 16px 6px 12px; border-radius: 14px; }
  .podium-avatar { width: 52px; height: 52px; }
  .podium-card.p1 .podium-avatar { width: 66px; height: 66px; }
  .podium-name { font-size: 10px; }
  .podium-score { font-size: 18px; }
  .ranking-panel { padding: 14px 12px 8px; }
  .rank-row { grid-template-columns: 28px 26px minmax(0, 1fr) 52px 44px; gap: 6px; padding: 8px 2px; }
  .rank-stat:nth-last-child(-n+2) { display: none; }
  .rank-avatar { width: 24px; height: 24px; }
  .result-actions { gap: 6px; }
  .result-actions .btn { min-height: 42px; padding: 0 14px; font-size: 12px; }
  .toasts { right: 12px; top: 70px; }
  .modal { padding: 20px; border-radius: 20px; }
  .logo-nova { font-size: .78em; }
}
@media (max-width: 480px) {
  .home-grid { gap: 10px; }
  .home-actions-row { gap: 6px; }
  .home-actions-row .btn { padding: 0 10px; font-size: 12px; }
  .btn-hero { height: 58px; font-size: 16px; }
  .profile-main { display: block; }
  .avatar-picker { justify-content: space-between; gap: 2px; }
  .avatar-choice { width: 32px; height: 32px; }
  .feature-strip { grid-template-columns: 1fr 1fr; }
  .feature { padding: 12px 8px; }
  .seats-panel { padding: 14px; }
  .seat { min-height: 116px; }
  .seat .avatar { width: 42px; height: 42px; }
  .screen-title { font-size: 38px; }
  .room-code { font-size: 24px; }
  .podium { grid-template-columns: 1fr 1fr 1fr; gap: 4px; }
  .podium-card { padding: 12px 3px 10px; }
  .podium-card.p1 { transform: translateY(-4px); }
  .podium-avatar, .podium-card.p1 .podium-avatar { width: 42px; height: 42px; }
  .podium-name { font-size: 9px; }
  .podium-score { font-size: 15px; }
  .podium-score small { display: none; }
  .result-title { font-size: 50px; }
  .rank-row { grid-template-columns: 24px 24px minmax(0, 1fr) 48px; }
  .rank-stat { display: none; }
  .rank-name .tag { display: none; }
  .result-hint { font-size: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ==========================================================================
   Refinements
   ========================================================================== */
.muted { color: var(--muted-2); font-style: normal; font-weight: 400; }
.btn.is-busy { opacity: .72; }
.btn.is-busy .icon { animation: spin 1.1s linear infinite; }

.dead-overlay {
  inset: auto 14px 14px 14px;
  padding: 13px 16px;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 2px 14px;
  text-align: left;
  background:
    radial-gradient(120% 160% at 0% 0%, rgba(255, 84, 115, .13), transparent 50%),
    rgba(8, 12, 26, .9);
  border: 1px solid rgba(255, 84, 115, .32);
  border-radius: 16px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, .46);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.dead-kicker { width: 100%; font-size: 8px; letter-spacing: .3em; }
.dead-overlay strong { font-size: 27px; line-height: 1; }
.dead-overlay p { margin: 0; flex: 1; min-width: 120px; font-size: 10px; }
.dead-actions { margin-left: auto; display: flex; gap: 6px; }

.rival-speech {
  position: absolute;
  left: 50%;
  top: 4px;
  transform: translate(-50%, -50%);
  max-width: calc(100% - 10px);
  padding: 3px 7px;
  border-radius: 8px;
  background: rgba(8, 14, 32, .96);
  border: 1px solid rgba(150, 205, 255, .3);
  box-shadow: 0 8px 18px rgba(0, 0, 0, .4);
  color: #e8f6ff;
  font-size: 8px;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  z-index: 4;
  pointer-events: none;
  animation: speechPop .24s var(--ease-back);
}
.rival-speech.emote {
  top: 45%;
  padding: 0;
  font-size: 23px;
  line-height: 1;
  background: transparent;
  border: 0;
  box-shadow: none;
  text-shadow: 0 3px 14px rgba(0, 0, 0, .7);
}
@keyframes speechPop { from { opacity: 0; transform: translate(-50%, -50%) scale(.7); } }

.podium.podium-2 { grid-template-columns: 1fr 1fr; max-width: 560px; }
.podium.podium-2 .podium-card.p1 { transform: none; }

@media (max-width: 820px) {
  .screen-game.is-active {
    height: calc(100dvh - 60px);
    min-height: 0;
    overflow: hidden;
    padding-bottom: 8px;
    display: flex;
    flex-direction: column;
  }
  .game-shell { height: 100%; min-height: 0; flex: 1; }
  .arena { flex: 1; min-height: 0; }
  .board-frame { flex: 1; min-height: 0; max-height: none; }
  .tactics-panel { flex: 0 0 auto; }
  .dead-overlay { inset: auto 8px 8px 8px; padding: 10px 12px; border-radius: 13px; }
  .dead-overlay strong { font-size: 22px; }
  .dead-overlay p { font-size: 9px; }
  .dead-kicker { font-size: 7px; }
}
@media (max-width: 480px) {
  .dead-actions .mini-btn { min-height: 30px; padding: 0 9px; font-size: 10px; }
}

/* tighter game arena, larger rival monitors */
.game-shell { max-width: 1280px; }
.arena-head, .arena-foot { width: min(100%, 600px); margin-left: auto; margin-right: auto; }
.board-frame { width: min(100%, 600px); margin-left: auto; margin-right: auto; }
.rivals { flex: 1; align-content: start; }
.rivals-panel .rivals-hint { margin-top: auto; }
.rival-board { width: 64px; height: 65px; border-radius: 8px; }
@media (max-width: 1180px) {
  .rival-board { width: 56px; height: 57px; }
}
@media (max-width: 1020px) {
  .rival-board { width: 48px; height: 49px; }
}
@media (max-width: 820px) {
  .rivals { flex: 0 0 auto; }
  .rival-board { width: 34px; height: 35px; border-radius: 5px; }
  .arena-head, .arena-foot, .board-frame { width: 100%; }
}

/* fill the rivals rail and keep the combo banner out of the bubbles */
.rivals-panel { position: relative; overflow: hidden; }
.rivals-panel::before {
  content: '8';
  position: absolute;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  font-family: var(--font-display);
  font-size: 176px;
  line-height: .8;
  font-weight: 600;
  color: rgba(150, 195, 255, .035);
  pointer-events: none;
}
.rivals-panel::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 8%;
  width: 190px;
  height: 190px;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(97, 232, 255, .08), transparent 67%);
  filter: blur(12px);
  pointer-events: none;
}
.rivals-panel > * { position: relative; z-index: 1; }
.rival.is-danger .rival-board { box-shadow: 0 0 0 1px rgba(255, 84, 115, .5), 0 0 16px rgba(255, 84, 115, .22); }

.combo-banner {
  top: auto;
  bottom: 92px;
  font-size: 20px;
  padding: 7px 18px;
}
@media (max-width: 820px) {
  .combo-banner { bottom: 60px; font-size: 17px; padding: 5px 13px; }
}

@media (max-width: 820px) {
  .match-room { display: none; }
  .match-widget { gap: 6px; }
  .match-timer { font-size: 13px; padding: 4px 9px; }
  .topbar { padding: 0 10px; gap: 6px; }
  .topbar-actions .icon-btn { width: 34px; height: 34px; }
  .conn-pill { width: 26px; height: 26px; }
}
@media (max-width: 480px) {
  .brand-cn { display: none; }
  .brand { gap: 8px; }
  .brand-en { font-size: 13px; }
  .brand-orb { width: 30px; height: 30px; }
  .topbar-mid { justify-content: center; }
}

/* compact results so all eight players fit on a 900px screen */
.fire-btn:disabled { opacity: .45; cursor: not-allowed; }
.screen-result { padding: 18px 24px 32px; }
.result-top { margin-bottom: 16px; }
.result-kicker { font-size: 9px; }
.result-title { font-size: clamp(52px, 6.6vw, 78px); }
.result-sub { margin-top: 8px; font-size: 12px; }
.podium { margin: 18px auto 14px; gap: 10px; }
.podium-card { padding: 15px 10px 12px; }
.podium-card.p1 { padding-top: 21px; transform: translateY(-6px); }
.podium-avatar { width: 62px; height: 62px; }
.podium-card.p1 .podium-avatar { width: 78px; height: 78px; }
.podium-score { font-size: 20px; }
.ranking-panel { padding: 16px 20px 8px; }
.rank-row { padding: 7px 6px; }
.result-actions { margin-top: 16px; }
.result-hint { margin-top: 8px; }
@media (max-width: 820px) {
  .screen-result { padding: 16px 14px 30px; }
  .podium-card.p1 { transform: translateY(-3px); }
  .podium-avatar { width: 48px; height: 48px; }
  .podium-card.p1 .podium-avatar { width: 58px; height: 58px; }
  .podium-card { padding: 12px 5px 10px; }
  .ranking-panel { padding: 12px 10px 6px; }
  .rank-row { padding: 6px 2px; }
  .result-actions { margin-top: 12px; }
}

@media (max-width: 820px) {
  .lobby-side { order: -1; }
  .seats-panel { order: 0; }
}
