:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #15191b;
  color: #eef3ef;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    radial-gradient(circle at 22% 14%, rgba(207, 52, 81, 0.20), transparent 30%),
    linear-gradient(135deg, #15191b 0%, #202626 52%, #15191b 100%);
}

.game-page {
  user-select: none;
  -webkit-user-select: none;
}

button,
input {
  font: inherit;
}

.sr-only {
  position: absolute;
  overflow: hidden;
  width: 1px;
  height: 1px;
  padding: 0;
  border: 0;
  margin: -1px;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: clamp(12px, 2vw, 28px);
}

.game {
  width: min(1180px, 100%);
  user-select: none;
  -webkit-user-select: none;
}

.lobby-shell {
  align-items: center;
}

.entry-panel {
  display: grid;
  gap: 18px;
  width: min(520px, 100%);
  padding: 22px;
  border: 1px solid rgba(238, 243, 239, 0.14);
  border-radius: 8px;
  background: rgba(9, 13, 14, 0.54);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

.entry-brand {
  display: grid;
  justify-items: center;
  gap: 10px;
  text-align: center;
}

.brand-logo {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

.brand-logo--lobby {
  max-width: min(390px, 100%);
}

.brand-logo--game {
  width: auto;
  max-width: 188px;
  max-height: 72px;
}

.entry-form {
  display: grid;
  gap: 12px;
}

.entry-form label {
  display: grid;
  gap: 6px;
  color: #cfd8d4;
  font-size: 0.88rem;
  font-weight: 700;
}

.entry-form input {
  min-height: 42px;
  width: 100%;
  border: 1px solid rgba(238, 243, 239, 0.18);
  border-radius: 8px;
  padding: 0 12px;
  background: rgba(10, 15, 16, 0.58);
  color: #eef3ef;
}

.entry-form input:focus {
  border-color: #e0b54e;
  outline: none;
}

.entry-form button,
.entry-link,
.labs-menu a {
  min-height: 42px;
  border: 1px solid rgba(238, 243, 239, 0.17);
  border-radius: 8px;
  background: rgba(10, 15, 16, 0.55);
  color: #eef3ef;
  text-decoration: none;
}

.entry-form button {
  cursor: pointer;
}

.entry-form button:disabled {
  cursor: default;
  opacity: 0.45;
}

.entry-link,
.labs-menu a {
  display: inline-grid;
  place-items: center;
  padding: 0 14px;
}

.entry-form button:hover:not(:disabled),
.entry-link:hover,
.labs-menu a:hover {
  border-color: #e0b54e;
}

.entry-lobby {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(238, 243, 239, 0.12);
  border-radius: 8px;
  background: rgba(4, 8, 9, 0.32);
}

.entry-lobby[hidden] {
  display: none;
}

.entry-lobby strong {
  color: #fff5cf;
}

#entryLobbyState {
  color: #aebbb5;
  font-size: 0.88rem;
}

.labs-menu {
  display: grid;
  gap: 10px;
}

.topbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

h1 {
  margin: 0;
  font-size: clamp(1.4rem, 2vw, 2.2rem);
  letter-spacing: 0;
}

p {
  margin: 5px 0 0;
  color: #b8c6c0;
}

.score {
  display: grid;
  grid-template-columns: minmax(188px, auto) auto minmax(188px, auto);
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
}

.game-topbar {
  display: grid;
  grid-template-columns: minmax(230px, 1fr) minmax(240px, 0.85fr) minmax(230px, 1fr);
  align-items: end;
  gap: 14px;
}

.match-center {
  display: grid;
  justify-items: center;
  gap: 5px;
  min-width: 0;
  text-align: center;
}

.match-center p {
  overflow: hidden;
  max-width: 100%;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.match-center p {
  margin-top: 0;
}

.score-side {
  display: grid;
  min-width: 0;
}

.score-side--right {
  justify-items: end;
}

.multiplayer-lobby {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  margin: 0 0 12px;
  padding: 10px;
  border: 1px solid rgba(238, 243, 239, 0.14);
  border-radius: 8px;
  background: rgba(9, 13, 14, 0.46);
}

.multiplayer-lobby[hidden] {
  display: none;
}

.multiplayer-lobby strong,
.multiplayer-lobby span {
  display: block;
}

.multiplayer-lobby strong {
  color: #fff5cf;
  font-size: 0.9rem;
}

#lobbyState {
  margin-top: 2px;
  color: #aebbb5;
  font-size: 0.82rem;
}

.lobby-seats,
.lobby-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.lobby-seats span {
  min-width: 86px;
  padding: 7px 9px;
  border: 1px solid rgba(238, 243, 239, 0.14);
  border-radius: 8px;
  color: #aebbb5;
  background: rgba(10, 15, 16, 0.50);
  font-size: 0.78rem;
  font-weight: 700;
  text-align: center;
}

.lobby-seats span.occupied {
  color: #eef3ef;
  border-color: rgba(238, 243, 239, 0.28);
}

.lobby-seats span.mine {
  color: #fff5cf;
  border-color: #e0b54e;
}

.lobby-actions button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(238, 243, 239, 0.17);
  border-radius: 8px;
  background: rgba(10, 15, 16, 0.55);
  color: #eef3ef;
  cursor: pointer;
}

.lobby-actions button:hover:not(:disabled) {
  border-color: #e0b54e;
}

.lobby-actions button:disabled {
  cursor: default;
  opacity: 0.42;
}

.player-score,
.eight-score {
  border: 1px solid rgba(238, 243, 239, 0.20);
  border-radius: 8px;
  min-height: 42px;
  padding: 8px 10px;
  color: #cfd8d4;
  background: rgba(14, 19, 20, 0.42);
}

.player-score.active {
  border-color: #e0b54e;
  color: #fff5cf;
}

.player-score {
  display: grid;
  gap: 6px;
}

.game-topbar .player-score {
  width: min(100%, 270px);
  min-width: 220px;
}

.player-score:nth-child(3) {
  justify-items: end;
}

.score-side--right .player-score {
  justify-items: end;
}

.player-score__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1;
}

.player-score__group {
  flex: 0 0 auto;
  color: #aebbb5;
  font-size: 0.76rem;
  font-weight: 600;
  text-transform: uppercase;
}

.player-score__wins {
  flex: 0 0 auto;
  color: #fff5cf;
  font-size: 0.72rem;
  font-weight: 800;
}

.player-score__name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ball-rack {
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
  min-height: 21px;
}

.mini-ball {
  --ball-color: #d7d7d7;
  --number-scale: 1;
  position: relative;
  display: grid;
  place-items: center;
  width: 22px;
  aspect-ratio: 1;
  border-radius: 50%;
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 50%, #f8f0d0 0 25%, transparent 26%),
    radial-gradient(circle at 28% 20%, rgba(255, 255, 255, 0.72) 0 9%, transparent 24%),
    radial-gradient(circle at 68% 76%, rgba(0, 0, 0, 0.36), transparent 46%),
    var(--ball-color);
  box-shadow:
    inset -2px -3px 6px rgba(0, 0, 0, 0.34),
    inset 1px 1px 2px rgba(255, 255, 255, 0.24),
    0 1px 2px rgba(0, 0, 0, 0.42);
  transform: translateZ(0);
}

.mini-ball::before,
.mini-ball::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
}

.mini-ball::before {
  background: url("./assets/balls/matcap-bola.png") center / 128% 128%;
  mix-blend-mode: screen;
  opacity: 0.42;
  z-index: 2;
}

.mini-ball::after {
  width: 50%;
  aspect-ratio: 1;
  inset: auto;
  background: #f5f0da;
  border-radius: 50%;
  z-index: 1;
}

.mini-ball img {
  position: relative;
  z-index: 3;
  width: auto;
  max-width: 62%;
  height: calc(37% * var(--number-scale));
  display: block;
}

.mini-ball.two-digit img {
  max-width: 72%;
  height: calc(32% * var(--number-scale));
}

.mini-ball__number-text {
  position: relative;
  z-index: 3;
  color: #101414;
  font-size: 10px;
  font-weight: 850;
  line-height: 1;
  transform: translateY(-0.2px);
}

.mini-ball.stripe {
  background:
    radial-gradient(circle at 50% 50%, #f8f0d0 0 25%, transparent 26%),
    radial-gradient(circle at 28% 20%, rgba(255, 255, 255, 0.72) 0 9%, transparent 24%),
    radial-gradient(circle at 68% 76%, rgba(0, 0, 0, 0.36), transparent 46%),
    linear-gradient(180deg, #f8f0d0 0 30%, var(--ball-color) 30% 70%, #f8f0d0 70% 100%);
}

.mini-ball.eight {
  background:
    radial-gradient(circle at 50% 50%, #f8f0d0 0 25%, transparent 26%),
    radial-gradient(circle at 28% 20%, rgba(255, 255, 255, 0.36) 0 9%, transparent 24%),
    radial-gradient(circle at 68% 76%, rgba(0, 0, 0, 0.58), transparent 46%),
    #151515;
}

.mini-ball.pocketed {
  filter: grayscale(1) brightness(0.38);
  opacity: 0.54;
}

.mini-ball.unassigned {
  opacity: 0.38;
}

.mini-ball--empty {
  border: 1px solid rgba(238, 243, 239, 0.18);
  background: rgba(238, 243, 239, 0.07);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.22);
  opacity: 0.72;
}

.mini-ball--empty::before,
.mini-ball--empty::after {
  content: none;
}

.eight-score {
  display: grid;
  place-items: center;
  padding-inline: 8px;
}

.play-area {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 82px;
  gap: 12px;
  align-items: stretch;
}

.power-meter {
  --power: 0%;
  position: relative;
  display: grid;
  place-items: center;
  min-height: 100%;
  border: 1px solid rgba(238, 243, 239, 0.12);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.10), transparent 34%, rgba(0, 0, 0, 0.35)),
    #2c303b;
  box-shadow:
    inset 0 0 0 2px rgba(0, 0, 0, 0.22),
    0 16px 34px rgba(0, 0, 0, 0.28);
}

.power-meter__track {
  position: relative;
  width: 18px;
  height: calc(100% - 34px);
  min-height: 210px;
  max-height: 560px;
  overflow: hidden;
  border: 2px solid rgba(8, 10, 12, 0.88);
  border-radius: 999px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.28), transparent 38%, rgba(0, 0, 0, 0.34)),
    linear-gradient(180deg, #333842 0%, #171a20 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.10),
    0 0 0 5px rgba(10, 12, 15, 0.38);
}

.power-meter__fill {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--power);
  border-radius: 999px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.42), transparent 38%, rgba(117, 24, 13, 0.30)),
    linear-gradient(180deg, #fff22e 0%, #ffb31a 38%, #ff5716 68%, #d8251a 100%);
  transition: height 80ms linear;
}

.power-meter__thumb {
  position: absolute;
  left: 50%;
  bottom: var(--power);
  width: 13px;
  height: 24px;
  border: 1px solid rgba(245, 245, 245, 0.86);
  border-radius: 8px;
  background:
    linear-gradient(90deg, #5b626e, #f4f0df 45%, #343a45);
  box-shadow:
    0 1px 4px rgba(0, 0, 0, 0.55),
    inset 0 0 0 1px rgba(0, 0, 0, 0.22);
  transform: translate(-50%, 50%);
  transition: bottom 80ms linear;
}

.power-meter__track span {
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(68, 35, 18, 0.54);
}

.power-meter__track span:nth-of-type(1) {
  bottom: 20%;
}

.power-meter__track span:nth-of-type(2) {
  bottom: 40%;
}

.power-meter__track span:nth-of-type(3) {
  bottom: 60%;
}

.power-meter__track span:nth-of-type(4) {
  bottom: 80%;
}

.table-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1180 / 654;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.40);
}

canvas {
  display: block;
  width: 100%;
  height: 100%;
  background: #1f332d;
  touch-action: none;
}

.table-wrap > canvas {
  position: absolute;
  inset: 0;
}

#gameCanvas {
  position: relative;
  z-index: 1;
}

.ball-layer,
.ball-label-layer,
.table-overlay-layer,
.aim-layer {
  background: transparent;
  pointer-events: none;
}

.ball-layer {
  z-index: 2;
}

.ball-label-layer {
  z-index: 3;
}

.table-overlay-layer {
  z-index: 4;
}

.aim-layer {
  z-index: 5;
}

.free-lab-drag-layer {
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
}

.free-lab-drag-handle {
  position: absolute;
  display: none;
  width: 108px;
  height: 92px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  cursor: grab;
  touch-action: none;
  transform: translate(-50%, -50%);
  pointer-events: auto;
}

.free-lab-drag-handle.visible {
  display: block;
}

.free-lab-drag-handle:active {
  cursor: grabbing;
}

.controls {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  align-items: center;
  margin-top: 14px;
}

.controls button,
.controls label,
.controls a,
.lab-links a {
  min-height: 42px;
  border: 1px solid rgba(238, 243, 239, 0.17);
  border-radius: 8px;
  background: rgba(10, 15, 16, 0.55);
  color: #eef3ef;
  text-decoration: none;
}

.controls button,
.controls a,
.lab-links a {
  display: inline-grid;
  place-items: center;
  padding: 0 14px;
  cursor: pointer;
}

.controls button:hover,
.controls a:hover,
.lab-links a:hover {
  border-color: #e0b54e;
}

.controls label {
  display: grid;
  grid-template-columns: auto minmax(80px, 1fr);
  gap: 10px;
  align-items: center;
  padding: 0 12px;
  color: #cfd8d4;
}

.controls input[type="range"] {
  width: 100%;
  accent-color: #e0b54e;
}

.controls input[type="range"]:disabled {
  opacity: 0.92;
}

.power-control {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.controls .toggle {
  grid-template-columns: auto auto;
}

.debug-toggle-hidden {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.match-overlay {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(5, 8, 9, 0.58);
  backdrop-filter: blur(5px);
}

.match-overlay[hidden] {
  display: none;
}

.match-dialog {
  display: grid;
  gap: 12px;
  width: min(420px, 100%);
  padding: 22px;
  border: 1px solid rgba(238, 243, 239, 0.18);
  border-radius: 8px;
  background: rgba(12, 17, 18, 0.94);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.46);
  text-align: center;
}

.match-dialog h2 {
  margin: 0;
  color: #fff5cf;
  font-size: 1.35rem;
}

.match-score {
  color: #eef3ef;
  font-weight: 800;
}

.match-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 4px;
}

.match-actions button {
  min-height: 42px;
  border: 1px solid rgba(238, 243, 239, 0.17);
  border-radius: 8px;
  background: rgba(10, 15, 16, 0.55);
  color: #eef3ef;
  cursor: pointer;
}

.match-actions button:hover:not(:disabled) {
  border-color: #e0b54e;
}

.match-actions button:disabled {
  cursor: default;
  opacity: 0.52;
}

.controls input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #e0b54e;
}

.physics-lab {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(238, 243, 239, 0.14);
  border-radius: 8px;
  background: rgba(9, 13, 14, 0.46);
}

.physics-lab__header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
}

.physics-lab h2 {
  margin: 0;
  font-size: 1rem;
  letter-spacing: 0;
}

.physics-lab p {
  margin-top: 4px;
  font-size: 0.9rem;
}

.physics-lab button {
  min-height: 38px;
  border: 1px solid rgba(224, 181, 78, 0.28);
  border-radius: 8px;
  background: rgba(10, 15, 16, 0.58);
  color: #fff5cf;
  cursor: pointer;
}

.physics-lab button:hover {
  border-color: rgba(224, 181, 78, 0.82);
}

.physics-lab__header button {
  padding: 0 12px;
}

.profile-actions {
  display: flex;
  gap: 8px;
}

.lab-tests,
.lab-free-controls {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.lab-tests button,
.lab-free-controls button {
  padding: 0 10px;
}

.lab-free-controls button.active {
  border-color: #e0b54e;
  background: rgba(224, 181, 78, 0.18);
}

.lab-position-controls {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.lab-position-controls label {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) 44px;
  gap: 8px;
  align-items: center;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid rgba(238, 243, 239, 0.10);
  border-radius: 8px;
  background: rgba(4, 8, 9, 0.34);
  color: #cfd8d4;
  font-size: 0.78rem;
}

.lab-position-controls input {
  width: 100%;
  min-width: 0;
}

.lab-position-controls output {
  color: #fff5cf;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.lab-metrics {
  display: grid;
  grid-template-columns: repeat(16, minmax(0, 1fr));
  gap: 8px;
}

.lab-metrics span {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid rgba(238, 243, 239, 0.10);
  border-radius: 8px;
  background: rgba(4, 8, 9, 0.38);
}

.lab-metrics strong {
  color: #fff5cf;
  font-size: 0.96rem;
  line-height: 1;
}

.lab-metrics small {
  overflow: hidden;
  color: #9fb0aa;
  font-size: 0.72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.profile-grid label {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 6px 10px;
  align-items: center;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(238, 243, 239, 0.10);
  border-radius: 8px;
  background: rgba(4, 8, 9, 0.34);
  color: #cfd8d4;
  font-size: 0.82rem;
}

.control-title {
  min-width: 0;
}

.field-reset,
.field-help {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid rgba(238, 243, 239, 0.14);
  border-radius: 50%;
  background: rgba(10, 15, 16, 0.62);
  color: #fff5cf;
  font-size: 0.78rem;
  line-height: 1;
}

.field-reset {
  cursor: pointer;
}

.field-reset:hover,
.field-help:hover,
.field-help:focus {
  border-color: rgba(224, 181, 78, 0.78);
  outline: none;
}

.field-help {
  cursor: help;
}

.profile-grid input {
  grid-column: 1 / -1;
  width: 100%;
  accent-color: #e0b54e;
}

.profile-grid output {
  color: #fff5cf;
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
}

.lab-links {
  display: flex;
  grid-template-columns: none;
}

.table-lab-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 14px;
  align-items: start;
}

.ball-lab-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 14px;
  align-items: start;
}

.ball-lab-preview {
  position: relative;
  width: 100%;
  aspect-ratio: 1180 / 654;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.40);
}

.ball-lab-preview canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  cursor: default;
}

.aim-lab-preview {
  position: relative;
  width: 100%;
  aspect-ratio: 1180 / 654;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.40);
}

.aim-lab-preview canvas {
  display: block;
  width: 100%;
  height: 100%;
  background: #132720;
  cursor: default;
}

#ballLabCanvas {
  z-index: 1;
}

.table-lab-panel {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(238, 243, 239, 0.14);
  border-radius: 8px;
  background: rgba(9, 13, 14, 0.46);
}

.table-lab-panel label {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 6px;
  align-items: center;
  color: #cfd8d4;
  font-size: 0.86rem;
}

.table-lab-panel input[type="color"] {
  grid-column: 1 / -1;
  width: 100%;
  height: 38px;
  padding: 2px;
  border: 1px solid rgba(238, 243, 239, 0.16);
  border-radius: 8px;
  background: rgba(4, 8, 9, 0.40);
}

.table-lab-panel input[type="range"] {
  grid-column: 1 / -1;
  width: 100%;
  accent-color: #e0b54e;
}

.table-lab-panel output {
  color: #fff5cf;
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
}

.table-lab-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.table-lab-actions button {
  min-height: 38px;
  border: 1px solid rgba(224, 181, 78, 0.28);
  border-radius: 8px;
  background: rgba(10, 15, 16, 0.58);
  color: #fff5cf;
  cursor: pointer;
}

.spin-control {
  display: grid;
  place-items: center;
  min-height: 100%;
  border: 1px solid rgba(238, 243, 239, 0.15);
  border-radius: 8px;
  background: rgba(10, 15, 16, 0.62);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

.spin-ball {
  position: relative;
  width: 56px;
  aspect-ratio: 1;
  border-radius: 50%;
  cursor: crosshair;
  background:
    radial-gradient(circle at 34% 26%, rgba(255, 255, 255, 0.96) 0 8%, rgba(255, 255, 255, 0.48) 18%, transparent 28%),
    radial-gradient(circle at 46% 40%, #fffefa 0 18%, #f2ecd3 54%, #c9c1a8 100%);
  box-shadow:
    inset -22px -28px 48px rgba(0, 0, 0, 0.24),
    inset 16px 14px 26px rgba(255, 255, 255, 0.45);
  touch-action: none;
}

.spin-ball:focus-visible {
  outline: 2px solid #e0b54e;
  outline-offset: 5px;
}

.spin-target {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 12px;
  height: 12px;
  border: 3px solid #c93a35;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
}

.home-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 14%, rgba(130, 255, 20, 0.20), transparent 25%),
    radial-gradient(circle at 78% 20%, rgba(224, 181, 78, 0.12), transparent 27%),
    linear-gradient(135deg, #020403 0%, #050807 48%, #101314 100%);
  color: #f6f8ef;
  font-family: "Barlow Condensed", "Arial Narrow", Inter, ui-sans-serif, system-ui, sans-serif;
  overflow-x: hidden;
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.home-shell {
  min-height: 100vh;
  padding: 10px;
}

.home-frame {
  position: relative;
  display: grid;
  grid-template-columns: 430px minmax(0, 1fr) 390px;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 22px 28px;
  min-height: calc(100vh - 20px);
  padding: 24px 28px 76px;
  overflow: hidden;
  border: 1px solid rgba(132, 255, 0, 0.58);
  border-radius: 8px;
  background:
    radial-gradient(circle at 16% 12%, rgba(164, 255, 25, 0.18), transparent 17%),
    radial-gradient(circle at 46% 37%, rgba(111, 255, 0, 0.12), transparent 29%),
    linear-gradient(90deg, rgba(7, 11, 10, 0.92), rgba(4, 7, 7, 0.74)),
    radial-gradient(circle at 48% 60%, rgba(105, 255, 0, 0.12), transparent 35%);
  box-shadow:
    inset 0 0 32px rgba(132, 255, 0, 0.10),
    0 24px 80px rgba(0, 0, 0, 0.52);
}

.home-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 38px 38px;
  mask-image: radial-gradient(circle at center, #000 0 48%, transparent 74%);
  pointer-events: none;
}

.home-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 28% 14%, rgba(198, 255, 83, 0.22), transparent 4%),
    radial-gradient(circle at 58% 22%, rgba(113, 255, 0, 0.18), transparent 5%),
    radial-gradient(circle at 88% 76%, rgba(255, 220, 88, 0.10), transparent 9%);
  filter: blur(10px);
  opacity: 0.65;
  pointer-events: none;
}

.home-frame > * {
  position: relative;
  z-index: 1;
}

.home-topbar {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 170px auto minmax(270px, 1fr) auto auto;
  gap: 20px;
  align-items: center;
}

.home-topbar h1,
.friends-panel h2,
.highlights-head h2 {
  margin: 0;
  color: #f8f8f2;
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
  text-shadow: 0 2px 9px rgba(0, 0, 0, 0.72);
}

.home-profile {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.profile-avatar {
  display: grid;
  place-items: center;
  width: 74px;
  aspect-ratio: 1;
  border: 3px solid #79ff00;
  border-radius: 50%;
  color: #121416;
  background:
    radial-gradient(circle at 45% 42%, #f7f2df 0 20%, transparent 21%),
    radial-gradient(circle at 34% 24%, rgba(255, 255, 255, 0.68), transparent 22%),
    #151515;
  box-shadow: 0 0 22px rgba(121, 255, 0, 0.36);
  font-weight: 950;
}

.home-profile span:last-child {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.home-profile strong {
  overflow: hidden;
  color: #fff;
  font-size: 1.12rem;
  font-weight: 800;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.home-profile small {
  color: #86ff00;
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.home-profile i {
  position: relative;
  width: 150px;
  max-width: 100%;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.17);
}

.home-profile i b {
  display: block;
  width: 70%;
  height: 100%;
  background: linear-gradient(90deg, #70ff00, #c8ff48);
}

.home-wallet,
.home-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.wallet-pill {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 42px;
  padding: 0 11px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: rgba(4, 6, 6, 0.70);
  box-shadow: inset 0 0 22px rgba(255, 255, 255, 0.04);
  color: #fff;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.98rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.wallet-pill b,
.wallet-pill i {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.wallet-pill b {
  width: 30px;
  aspect-ratio: 1;
  border-radius: 50%;
}

.wallet-pill--gem b {
  border-radius: 7px;
  background: linear-gradient(135deg, #eaffff, #03fa78 44%, #009c62);
  transform: rotate(45deg);
}

.wallet-pill--coin b {
  border: 3px solid #ffe276;
  background: radial-gradient(circle, #fff38c 0 26%, #ffa700 56%, #7f4a00 100%);
}

.wallet-pill i {
  width: 22px;
  height: 22px;
  border: 1px solid #76ff00;
  border-radius: 5px;
  color: #82ff00;
  font-style: normal;
  line-height: 1;
}

.home-actions button {
  position: relative;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.14);
  background: transparent;
  color: #efefef;
  cursor: pointer;
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.12));
}

.home-actions svg,
.home-bottom-nav svg,
.menu-mark svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
}

.home-actions button:hover {
  color: #9cff16;
}

.home-actions button[data-badge]::after {
  content: attr(data-badge);
  position: absolute;
  top: 1px;
  right: 2px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #42c600;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 900;
}

.home-sidebar {
  display: grid;
  gap: 12px;
  align-content: start;
  min-width: 0;
  padding-bottom: 56px;
}

.home-brand {
  position: relative;
  min-height: 178px;
  display: grid;
  align-items: end;
  isolation: isolate;
}

.home-brand::before {
  content: "";
  position: absolute;
  width: 330px;
  height: 92px;
  margin-left: 18px;
  align-self: center;
  background:
    linear-gradient(100deg, rgba(102, 255, 0, 0.00), rgba(102, 255, 0, 0.54), rgba(102, 255, 0, 0.00)),
    repeating-linear-gradient(164deg, transparent 0 12px, rgba(255, 255, 255, 0.14) 13px 15px);
  filter: blur(12px);
  transform: skewX(-18deg);
  opacity: 0.66;
  z-index: -1;
}

.brand-logo--lobby {
  width: 100%;
  max-width: 410px;
  filter: drop-shadow(0 0 18px rgba(119, 255, 0, 0.52));
}

.home-play-card {
  display: grid;
  gap: 10px;
}

.account-panel {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(7, 13, 18, 0.36);
}

.account-panel strong {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.account-panel input {
  width: 100%;
  min-height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  padding: 0 10px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font: 700 0.82rem/1 Inter, sans-serif;
  outline: none;
}

.account-panel div {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.account-panel button {
  min-height: 32px;
  border: 0;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font: 800 0.72rem/1 Inter, sans-serif;
  cursor: pointer;
}

.account-panel small {
  min-height: 16px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.72rem;
  line-height: 1.35;
}

.quick-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.quick-fields label {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: #a9b0aa;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.quick-fields input {
  width: 100%;
  min-height: 38px;
  border: 1px solid rgba(133, 255, 0, 0.30);
  border-radius: 8px;
  padding: 0 10px;
  background: rgba(0, 0, 0, 0.52);
  color: #fff;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-weight: 800;
  outline: none;
}

.quick-fields input:focus {
  border-color: #9cff16;
  box-shadow: 0 0 0 2px rgba(132, 255, 0, 0.16);
}

.home-primary-action,
.home-menu button,
.challenge-button {
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  text-transform: uppercase;
}

.home-primary-action {
  position: relative;
  display: grid;
  grid-template-columns: 72px 1fr;
  align-items: center;
  min-height: 88px;
  overflow: hidden;
  border: 1px solid #a8ff18;
  background:
    radial-gradient(circle at 6% 15%, rgba(242, 255, 123, 0.92), transparent 16%),
    radial-gradient(circle at 96% 12%, rgba(218, 255, 99, 0.66), transparent 11%),
    radial-gradient(circle at 30% 76%, rgba(116, 255, 0, 0.34), transparent 34%),
    linear-gradient(100deg, rgba(122, 255, 0, 0.90), rgba(61, 135, 0, 0.80) 48%, rgba(9, 32, 6, 0.96)),
    linear-gradient(135deg, transparent, rgba(255, 255, 255, 0.20));
  box-shadow:
    0 0 20px rgba(132, 255, 0, 0.58),
    0 0 44px rgba(132, 255, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.60),
    inset 0 -14px 28px rgba(0, 0, 0, 0.28),
    inset 0 0 24px rgba(255, 255, 255, 0.13);
  text-shadow: 0 3px 5px rgba(0, 0, 0, 0.54);
}

.home-primary-action::before,
.home-primary-action::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.home-primary-action::before {
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.34), transparent 18%),
    linear-gradient(105deg, transparent 0 68%, rgba(255, 255, 255, 0.10) 69% 70%, transparent 71%),
    linear-gradient(118deg, transparent 0 77%, rgba(255, 255, 255, 0.07) 78% 82%, transparent 83%),
    radial-gradient(ellipse at 92% 50%, rgba(196, 255, 65, 0.35), transparent 20%);
  mix-blend-mode: screen;
}

.home-primary-action::after {
  left: 8px;
  right: 8px;
  top: 7px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(243, 255, 184, 0.96), transparent);
  box-shadow:
    0 0 12px #d6ff47,
    0 68px 15px rgba(92, 255, 0, 0.34);
}

.home-primary-action > span {
  position: relative;
  z-index: 1;
}

.home-primary-action > span:last-child {
  display: grid;
  gap: 4px;
  align-content: center;
  justify-items: start;
  min-width: 0;
}

.home-primary-action:disabled {
  cursor: default;
  opacity: 0.55;
}

.play-triangle {
  position: relative;
  width: 0;
  height: 0;
  margin-left: 26px;
  border-top: 22px solid transparent;
  border-bottom: 22px solid transparent;
  border-left: 34px solid #dfff42;
  filter:
    drop-shadow(0 0 6px rgba(225, 255, 81, 0.78))
    drop-shadow(0 3px 4px rgba(0, 0, 0, 0.54));
}

.home-primary-action strong,
.home-primary-action small,
.home-menu strong,
.home-menu small {
  display: block;
  text-align: left;
}

.home-primary-action strong {
  font-size: 1.78rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.04em;
}

.home-primary-action small {
  margin-top: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.96rem;
  font-weight: 700;
}

.home-menu {
  display: grid;
  gap: 8px;
}

.home-menu button {
  position: relative;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  grid-template-rows: 1fr 1fr;
  gap: 0 0;
  align-items: center;
  min-height: 64px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background:
    radial-gradient(circle at 92% 50%, rgba(117, 255, 0, 0.12), transparent 26%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(0, 0, 0, 0.18)),
    rgba(0, 0, 0, 0.44);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.10),
    inset 0 -10px 22px rgba(0, 0, 0, 0.18);
}

.home-menu button::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(132, 255, 0, 0.06), transparent 28%),
    radial-gradient(circle at 95% 22%, rgba(129, 255, 0, 0.10), transparent 18%);
  opacity: 0.72;
  pointer-events: none;
}

.home-menu button:hover,
.challenge-button:hover {
  border-color: #95ff15;
  box-shadow: 0 0 18px rgba(132, 255, 0, 0.20);
}

.menu-mark {
  position: relative;
  display: grid;
  place-items: center;
  grid-row: 1 / 3;
  align-self: center;
  width: 40px;
  height: 40px;
  margin-left: 20px;
  border: 2px solid rgba(130, 255, 0, 0.92);
  border-radius: 12px;
  color: #92ff14;
  background:
    radial-gradient(circle at 50% 42%, rgba(133, 255, 0, 0.22), transparent 52%),
    rgba(8, 19, 7, 0.72);
  box-shadow:
    0 0 14px rgba(132, 255, 0, 0.26),
    inset 0 0 12px rgba(132, 255, 0, 0.10);
  font-weight: 950;
}

.menu-mark svg {
  width: 25px;
  height: 25px;
  stroke-width: 2.45;
}

.menu-mark--pass {
  border-color: rgba(255, 211, 54, 0.95);
  color: #ffda31;
  border-radius: 50%;
  font-size: 1.28rem;
  text-shadow: 0 0 8px rgba(255, 231, 84, 0.72);
}

.menu-mark--pass::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: #101310;
  z-index: -1;
}

.home-menu strong {
  grid-column: 2;
  align-self: end;
  font-size: 1.04rem;
  font-weight: 800;
  line-height: 1;
}

.home-menu small {
  grid-column: 2;
  align-self: start;
  margin-top: 2px;
  color: #b7beb7;
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.05;
}

.home-bottom-nav {
  position: absolute;
  left: 28px;
  bottom: 18px;
  display: grid;
  grid-template-columns: repeat(4, minmax(72px, 1fr));
  gap: 12px;
  width: 430px;
  padding: 13px 14px;
  border-top-right-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left: 0;
  border-bottom: 0;
  background: rgba(3, 5, 5, 0.90);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.09),
    0 -12px 36px rgba(0, 0, 0, 0.32);
}

.home-bottom-nav button,
.highlights-head button,
.friends-panel header button {
  border: 0;
  background: transparent;
  color: #c8cec8;
  cursor: pointer;
  font-weight: 800;
  text-transform: uppercase;
}

.home-bottom-nav button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 0;
  color: #d9ddda;
  font-size: 0.82rem;
}

.home-bottom-nav svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  stroke-width: 2.4;
}

.home-bottom-nav button:hover,
.highlights-head button:hover,
.friends-panel header button:hover {
  color: #91ff00;
}

.home-content {
  display: grid;
  gap: 20px;
  align-content: start;
  min-width: 0;
  overflow: visible;
}

.cup-panel {
  position: relative;
  display: grid;
  align-items: end;
  justify-items: start;
  min-height: 390px;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.cup-panel::before,
.cup-panel::after {
  content: "";
  position: absolute;
  inset: -20%;
  background:
    linear-gradient(112deg, transparent 0 45%, rgba(132, 255, 0, 0.30) 46% 47%, transparent 48%),
    linear-gradient(68deg, transparent 0 54%, rgba(255, 214, 57, 0.14) 55% 56%, transparent 57%),
    linear-gradient(142deg, transparent 0 62%, rgba(255, 255, 255, 0.09) 63% 65%, transparent 66%);
  transform: rotate(-10deg);
}

.cup-panel::after {
  filter: blur(12px);
  opacity: 0.38;
}

.cup-ball {
  position: absolute;
  left: 22px;
  top: 28px;
  display: none;
  place-items: center;
  width: 44px;
  aspect-ratio: 1;
  border: 4px solid #baff25;
  border-radius: 50%;
  color: #111;
  background:
    radial-gradient(circle at 50% 48%, #fff 0 22%, transparent 23%),
    radial-gradient(circle at 36% 26%, rgba(255, 255, 255, 0.70), transparent 22%),
    #111;
  box-shadow: 0 0 22px rgba(133, 255, 0, 0.7);
  font-size: 1.55rem;
  font-weight: 950;
  z-index: 2;
}

.cup-copy {
  position: relative;
  z-index: 2;
  display: grid;
  justify-items: start;
  gap: 12px;
  width: min(64%, calc(100% - 230px), 620px);
  min-height: 100%;
  margin-left: 0;
  padding: clamp(26px, 3vw, 38px);
  border: 1px solid rgba(140, 255, 0, 0.76);
  border-radius: 8px;
  background:
    radial-gradient(circle at 18% 16%, rgba(229, 255, 85, 0.22), transparent 8%),
    radial-gradient(circle at 84% 24%, rgba(160, 255, 20, 0.18), transparent 11%),
    linear-gradient(120deg, rgba(142, 255, 0, 0.12), transparent 28%),
    radial-gradient(circle at 52% 40%, rgba(164, 255, 29, 0.54), transparent 18%),
    radial-gradient(circle at 50% 60%, rgba(11, 14, 10, 0.72), transparent 44%),
    linear-gradient(135deg, #192712, #030605 72%);
  box-shadow: inset 0 0 44px rgba(117, 255, 0, 0.14);
  text-align: left;
  text-transform: uppercase;
}

.cup-copy strong {
  color: #9dff13;
  font-size: 3rem;
  font-weight: 900;
  line-height: 0.9;
  text-shadow:
    0 3px 0 #223400,
    0 0 18px rgba(132, 255, 0, 0.74),
    0 0 42px rgba(132, 255, 0, 0.36);
}

.cup-copy span {
  color: #dce2dc;
  font-size: 1.02rem;
  font-weight: 850;
}

.cup-copy b {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 2.5rem;
  line-height: 1;
}

.cup-copy b i {
  width: 42px;
  aspect-ratio: 1;
  border: 4px solid #ffe478;
  border-radius: 50%;
  background: radial-gradient(circle, #fff38c 0 25%, #ffa700 58%, #6d4100 100%);
}

.cup-copy small {
  color: #f4f4f0;
  font-size: 1.1rem;
  font-weight: 900;
}

.cup-copy button {
  min-width: 190px;
  min-height: 42px;
  border: 1px solid #ceff61;
  border-radius: 8px;
  background: rgba(7, 8, 8, 0.72);
  color: #fff;
  cursor: pointer;
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  font-size: 1.02rem;
  font-weight: 900;
  text-transform: uppercase;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    0 0 16px rgba(132, 255, 0, 0.20);
}

.cup-mascot {
  position: absolute;
  right: clamp(12px, 3vw, 32px);
  bottom: 0;
  z-index: 3;
  height: calc(100% - 4px);
  width: auto;
  margin: 0;
  pointer-events: none;
}

.cup-mascot img {
  display: block;
  width: auto;
  height: 100%;
  max-width: 100%;
  filter: drop-shadow(0 20px 22px rgba(0, 0, 0, 0.34));
}

.highlights-head,
.friends-panel header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.highlights-head button,
.friends-panel header button {
  color: #96ff00;
}

.highlight-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.highlight-grid article {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding-bottom: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), transparent 30%),
    rgba(4, 7, 7, 0.62);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.09),
    0 12px 26px rgba(0, 0, 0, 0.18);
}

.highlight-media {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1.55;
  border: 1px solid rgba(255, 198, 42, 0.72);
  border-radius: 7px;
  overflow: hidden;
  background:
    radial-gradient(circle at 82% 18%, rgba(220, 255, 98, 0.28), transparent 15%),
    radial-gradient(circle at 42% 62%, #f7f2dc 0 5%, transparent 6%),
    radial-gradient(circle at 62% 56%, #151515 0 8%, transparent 9%),
    linear-gradient(165deg, #0d4a26, #06100c 62%);
}

.highlight-media--two {
  background:
    radial-gradient(circle at 36% 58%, #ffde4f 0 8%, transparent 9%),
    radial-gradient(circle at 60% 62%, #e04b25 0 7%, transparent 8%),
    linear-gradient(165deg, #28520f, #091109 62%);
}

.highlight-media--three {
  background:
    radial-gradient(circle at 52% 54%, #d71920 0 6%, transparent 7%),
    linear-gradient(130deg, transparent 0 44%, rgba(255, 255, 255, 0.70) 45% 47%, transparent 48%),
    linear-gradient(165deg, #15202b, #050708 62%);
}

.highlight-media span {
  display: grid;
  place-items: center;
  width: 54px;
  aspect-ratio: 1;
  border: 2px solid rgba(255, 255, 255, 0.82);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.54);
}

.highlight-media span::before {
  content: "";
  width: 0;
  height: 0;
  margin-left: 4px;
  border-top: 12px solid transparent;
  border-bottom: 12px solid transparent;
  border-left: 18px solid #fff;
}

.highlight-grid strong,
.highlight-grid small,
.highlight-grid em {
  margin-inline: 12px;
}

.highlight-grid strong {
  overflow: hidden;
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.highlight-grid small {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #bcc3bc;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.78rem;
}

.highlight-grid small b {
  width: 24px;
  aspect-ratio: 1;
  border: 2px solid #84ff00;
  border-radius: 50%;
  background: #111;
}

.highlight-grid em {
  color: #c5ccc5;
  font-style: normal;
}

.friends-panel {
  display: grid;
  gap: 16px;
  align-content: start;
  padding: 24px;
  border: 1px solid rgba(224, 181, 78, 0.60);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 224, 128, 0.035), transparent 34%),
    rgba(3, 5, 5, 0.68);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 0 28px rgba(255, 214, 77, 0.05),
    0 18px 42px rgba(0, 0, 0, 0.26);
}

.friends-panel h2 {
  font-size: 1.06rem;
}

.friends-panel h2 span {
  color: #86ff00;
}

.friend-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.friend-list li {
  position: relative;
  display: grid;
  grid-template-columns: 18px 58px 1fr;
  gap: 10px 12px;
  align-items: center;
  min-height: 70px;
  border-top: 1px solid rgba(255, 255, 255, 0.11);
}

.friend-list li::before {
  content: "";
  grid-column: 2;
  grid-row: 1 / 3;
  width: 50px;
  aspect-ratio: 1;
  border: 2px solid #81ff00;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 25%, rgba(255, 255, 255, 0.45), transparent 19%),
    radial-gradient(circle at 50% 46%, #f2e0bd 0 20%, transparent 21%),
    linear-gradient(#23282c, #090a0b);
  box-shadow: 0 0 12px rgba(129, 255, 0, 0.20);
}

.status-dot {
  grid-column: 1;
  grid-row: 1 / 3;
  width: 14px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #82ff00;
  box-shadow: 0 0 12px rgba(130, 255, 0, 0.65);
}

.friend-list b {
  grid-column: 3;
  align-self: end;
  overflow: hidden;
  color: #fff;
  font-size: 1.04rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.friend-list small {
  grid-column: 3;
  align-self: start;
  color: #91ff00;
  font-size: 0.78rem;
  font-weight: 700;
}

.challenge-button {
  min-height: 58px;
  border: 1px solid #9cff16;
  background:
    radial-gradient(circle at 92% 0%, rgba(215, 255, 92, 0.30), transparent 20%),
    linear-gradient(180deg, rgba(89, 144, 18, 0.72), rgba(13, 31, 7, 0.78));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    0 0 18px rgba(132, 255, 0, 0.20);
  font-size: 1.12rem;
  font-weight: 850;
}

.friends-panel .entry-lobby {
  margin-bottom: 4px;
  border-color: rgba(132, 255, 0, 0.48);
  background: rgba(24, 46, 12, 0.42);
}

.friends-panel .lobby-seats {
  flex-wrap: wrap;
}

.layout-switcher {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.34);
}

.layout-switcher button {
  min-height: 32px;
  border: 0;
  border-radius: 6px;
  padding: 0 12px;
  background: transparent;
  color: #cfd6d0;
  cursor: pointer;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}

.layout-switcher button[aria-pressed="true"] {
  background: #f8f8f2;
  color: #101413;
}

.home-theme-light {
  background: #e9ebe8;
  color: #111716;
}

.home-theme-light .home-shell,
.home-theme-clean .home-shell {
  display: grid;
  align-items: center;
  padding: 24px;
}

.home-theme-light .home-frame {
  width: min(1500px, 100%);
  min-height: min(920px, calc(100vh - 48px));
  margin: 0 auto;
  grid-template-columns: 300px minmax(0, 1fr) 340px;
  gap: 18px;
  padding: 28px;
  border: 1px solid rgba(20, 24, 22, 0.08);
  background: #f7f8f6;
  box-shadow: 0 26px 70px rgba(22, 28, 25, 0.16);
}

.home-theme-light .home-frame::before,
.home-theme-light .home-frame::after {
  content: none;
}

.home-theme-light .home-topbar {
  grid-template-columns: 220px auto minmax(220px, 1fr) auto auto;
}

.home-theme-light .home-topbar h1,
.home-theme-light .friends-panel h2,
.home-theme-light .highlights-head h2 {
  color: #101413;
  text-shadow: none;
}

.home-theme-light .layout-switcher {
  border-color: rgba(16, 20, 19, 0.10);
  background: #eef0ed;
}

.home-theme-light .layout-switcher button {
  color: #5b625f;
}

.home-theme-light .layout-switcher button[aria-pressed="true"] {
  background: #101413;
  color: #fff;
}

.home-theme-light .home-profile strong,
.home-theme-light .wallet-pill,
.home-theme-light .home-menu strong,
.home-theme-light .highlight-grid strong,
.home-theme-light .friend-list b {
  color: #111716;
  text-shadow: none;
}

.home-theme-light .home-profile small,
.home-theme-light .friends-panel h2 span,
.home-theme-light .friend-list small,
.home-theme-light .highlights-head button,
.home-theme-light .friends-panel header button,
.home-theme-light .home-bottom-nav button:hover {
  color: #198f47;
}

.home-theme-light .profile-avatar,
.home-theme-light .friend-list li::before,
.home-theme-light .highlight-grid small b {
  border-color: #2fb765;
  box-shadow: none;
}

.home-theme-light .home-profile i {
  background: #dfe4df;
}

.home-theme-light .home-profile i b {
  background: linear-gradient(90deg, #25b65d, #7fdc8f);
}

.home-theme-light .wallet-pill,
.home-theme-light .home-menu button,
.home-theme-light .friends-panel,
.home-theme-light .highlight-grid article,
.home-theme-light .home-bottom-nav,
.home-theme-light .account-panel,
.home-theme-light .quick-fields input,
.home-theme-light .cup-copy button {
  border-color: rgba(18, 24, 22, 0.10);
  background: #fff;
  box-shadow: 0 10px 26px rgba(20, 28, 24, 0.07);
}

.home-theme-light .wallet-pill i {
  border-color: #28aa59;
  color: #168c46;
}

.home-theme-light .home-actions button {
  border-left-color: rgba(16, 20, 19, 0.10);
  color: #313936;
  filter: none;
}

.home-theme-light .home-brand {
  min-height: 132px;
}

.home-theme-light .home-brand::before {
  opacity: 0.18;
  filter: blur(18px);
}

.home-theme-light .brand-logo--lobby {
  max-width: 310px;
  filter: drop-shadow(0 10px 16px rgba(25, 35, 29, 0.10));
}

.home-theme-light .home-primary-action {
  min-height: 78px;
  border-color: #1d9c4f;
  background: linear-gradient(135deg, #1ab35c, #0f7f3e);
  box-shadow: 0 14px 28px rgba(24, 137, 73, 0.20);
}

.home-theme-light .home-primary-action::before,
.home-theme-light .home-primary-action::after,
.home-theme-light .home-menu button::after {
  content: none;
}

.home-theme-light .home-menu button {
  min-height: 58px;
  grid-template-columns: 58px minmax(0, 1fr);
}

.home-theme-light .menu-mark {
  width: 34px;
  height: 34px;
  margin-left: 14px;
  border-color: #dce5df;
  color: #178c47;
  background: #f5f8f5;
  box-shadow: none;
}

.home-theme-light .home-menu small,
.home-theme-light .highlight-grid small,
.home-theme-light .highlight-grid em,
.home-theme-light .quick-fields label,
.home-theme-light .home-bottom-nav button {
  color: #66706b;
}

.home-theme-light .quick-fields input {
  color: #101413;
}

.home-theme-light .account-panel strong,
.home-theme-light .account-panel small {
  color: rgba(15, 23, 42, 0.66);
}

.home-theme-light .account-panel input {
  border-color: rgba(15, 23, 42, 0.14);
  background: rgba(255, 255, 255, 0.88);
  color: #172033;
}

.home-theme-light .account-panel button {
  background: rgba(15, 23, 42, 0.1);
  color: #172033;
}

.home-theme-light .cup-panel {
  min-height: 320px;
}

.home-theme-light .cup-copy {
  border-color: rgba(34, 151, 78, 0.18);
  background:
    radial-gradient(circle at 80% 12%, rgba(33, 175, 91, 0.14), transparent 22%),
    linear-gradient(135deg, #ffffff, #edf5ef);
  box-shadow: 0 14px 32px rgba(20, 28, 24, 0.08);
}

.home-theme-light .cup-panel::before,
.home-theme-light .cup-panel::after {
  content: none;
}

.home-theme-light .cup-copy strong {
  color: #111716;
  text-shadow: none;
}

.home-theme-light .cup-copy span,
.home-theme-light .cup-copy small,
.home-theme-light .cup-copy b {
  color: #26302c;
}

.home-theme-light .highlight-media {
  border-color: rgba(22, 32, 27, 0.08);
  background:
    radial-gradient(circle at 38% 58%, #f8f2dc 0 5%, transparent 6%),
    radial-gradient(circle at 62% 56%, #171717 0 7%, transparent 8%),
    linear-gradient(165deg, #d9eee1, #fbfbf8);
}

.home-theme-light .highlight-media--two {
  background:
    radial-gradient(circle at 36% 58%, #ffcf40 0 8%, transparent 9%),
    radial-gradient(circle at 60% 62%, #e34b29 0 7%, transparent 8%),
    linear-gradient(165deg, #e9f4e9, #ffffff);
}

.home-theme-light .highlight-media--three {
  background:
    radial-gradient(circle at 52% 54%, #d71920 0 6%, transparent 7%),
    linear-gradient(130deg, transparent 0 44%, rgba(40, 48, 44, 0.18) 45% 47%, transparent 48%),
    linear-gradient(165deg, #eef2f0, #ffffff);
}

.home-theme-light .friends-panel {
  padding: 22px;
}

.home-theme-light .friend-list li {
  border-top-color: rgba(18, 24, 22, 0.08);
}

.home-theme-light .status-dot {
  background: #20b95c;
  box-shadow: none;
}

.home-theme-light .challenge-button {
  border-color: #1b9d4d;
  background: #101413;
  box-shadow: none;
}

.home-theme-clean {
  background:
    radial-gradient(circle at 18% 16%, rgba(32, 121, 88, 0.10), transparent 28%),
    #101514;
  color: #f5f5ef;
}

.home-theme-clean .home-frame {
  width: min(1440px, 100%);
  min-height: min(880px, calc(100vh - 48px));
  margin: 0 auto;
  grid-template-columns: 280px minmax(0, 1fr) 310px;
  gap: 16px;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.025), transparent 34%),
    #151b19;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.32);
}

.home-theme-clean .home-frame::before,
.home-theme-clean .home-frame::after,
.home-theme-clean .home-brand::before,
.home-theme-clean .home-primary-action::before,
.home-theme-clean .home-primary-action::after,
.home-theme-clean .home-menu button::after,
.home-theme-clean .cup-panel::before,
.home-theme-clean .cup-panel::after {
  content: none;
}

.home-theme-clean .home-topbar {
  grid-template-columns: 180px auto minmax(220px, 1fr) auto auto;
}

.home-theme-clean .home-topbar h1,
.home-theme-clean .friends-panel h2,
.home-theme-clean .highlights-head h2,
.home-theme-clean .home-profile strong,
.home-theme-clean .home-menu strong,
.home-theme-clean .highlight-grid strong,
.home-theme-clean .friend-list b {
  color: #f6f7f0;
  text-shadow: none;
}

.home-theme-clean .home-profile small,
.home-theme-clean .friends-panel h2 span,
.home-theme-clean .friend-list small,
.home-theme-clean .highlights-head button,
.home-theme-clean .friends-panel header button {
  color: #9adf9c;
}

.home-theme-clean .layout-switcher,
.home-theme-clean .wallet-pill,
.home-theme-clean .home-menu button,
.home-theme-clean .friends-panel,
.home-theme-clean .highlight-grid article,
.home-theme-clean .home-bottom-nav,
.home-theme-clean .quick-fields input,
.home-theme-clean .cup-copy button {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.045);
  box-shadow: none;
}

.home-theme-clean .layout-switcher button[aria-pressed="true"] {
  background: #eef5ef;
  color: #101514;
}

.home-theme-clean .brand-logo--lobby {
  max-width: 280px;
  filter: drop-shadow(0 12px 20px rgba(0, 0, 0, 0.22));
}

.home-theme-clean .home-brand {
  min-height: 118px;
}

.home-theme-clean .home-primary-action {
  min-height: 76px;
  border-color: rgba(154, 223, 156, 0.42);
  background: #f4f7ed;
  color: #111716;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.20);
  text-shadow: none;
}

.home-theme-clean .home-primary-action small {
  color: #4f5a53;
}

.home-theme-clean .play-triangle {
  border-left-color: #163d2b;
  filter: none;
}

.home-theme-clean .home-menu button {
  min-height: 56px;
  grid-template-columns: 54px minmax(0, 1fr);
}

.home-theme-clean .menu-mark {
  width: 32px;
  height: 32px;
  margin-left: 12px;
  border-color: rgba(154, 223, 156, 0.22);
  border-radius: 8px;
  color: #a8dfa7;
  background: rgba(154, 223, 156, 0.08);
  box-shadow: none;
}

.home-theme-clean .home-menu small,
.home-theme-clean .highlight-grid small,
.home-theme-clean .highlight-grid em,
.home-theme-clean .quick-fields label,
.home-theme-clean .home-bottom-nav button {
  color: #9ca7a0;
}

.home-theme-clean .quick-fields input {
  color: #f7f8f2;
}

.home-theme-clean .cup-panel {
  min-height: 305px;
}

.home-theme-clean .cup-copy {
  border-color: rgba(154, 223, 156, 0.16);
  background:
    radial-gradient(circle at 24% 22%, rgba(154, 223, 156, 0.16), transparent 24%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  box-shadow: none;
}

.home-theme-clean .cup-copy strong {
  color: #eef5ef;
  text-shadow: none;
}

.home-theme-clean .cup-copy b,
.home-theme-clean .cup-copy span,
.home-theme-clean .cup-copy small {
  color: #dce4dc;
}

.home-theme-clean .highlight-media {
  border-color: rgba(255, 255, 255, 0.08);
  opacity: 0.82;
}

.home-theme-clean .friends-panel {
  padding: 20px;
}

.home-theme-clean .friend-list li {
  min-height: 64px;
  border-top-color: rgba(255, 255, 255, 0.07);
}

.home-theme-clean .friend-list li::before,
.home-theme-clean .profile-avatar,
.home-theme-clean .highlight-grid small b {
  border-color: rgba(154, 223, 156, 0.34);
  box-shadow: none;
}

.home-theme-clean .status-dot {
  background: #9adf9c;
  box-shadow: none;
}

.home-theme-clean .challenge-button {
  border-color: rgba(154, 223, 156, 0.40);
  background: rgba(154, 223, 156, 0.10);
  box-shadow: none;
}

@media (max-width: 1280px) {
  .home-frame {
    grid-template-columns: 340px minmax(0, 1fr) 320px;
    gap: 18px;
    padding-inline: 20px;
  }

  .home-topbar {
    grid-template-columns: 150px auto minmax(210px, 1fr) auto auto;
  }

  .home-brand {
    min-height: 170px;
  }

  .home-primary-action {
    grid-template-columns: 58px 1fr;
  }

  .home-bottom-nav {
    left: 20px;
    width: 340px;
  }

  .cup-panel {
    min-height: 360px;
  }

  .cup-copy strong {
    font-size: 2.7rem;
  }

  .cup-copy b {
    font-size: 2.1rem;
  }
}

@media (max-width: 1020px) {
  .home-frame {
    grid-template-columns: 300px minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    padding-bottom: 24px;
  }

  .home-topbar {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .home-wallet,
  .home-actions {
    flex-wrap: wrap;
  }

  .friends-panel {
    grid-column: 1 / -1;
  }

  .home-bottom-nav {
    position: static;
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .home-shell {
    padding: 0;
  }

  .home-frame {
    grid-template-columns: 1fr;
    min-height: 100vh;
    border-radius: 0;
    padding: 16px;
  }

  .home-topbar h1,
  .friends-panel h2,
  .highlights-head h2 {
    font-size: 1.15rem;
  }

  .home-profile {
    align-items: center;
  }

  .profile-avatar {
    width: 58px;
  }

  .home-profile strong {
    font-size: 1rem;
  }

  .wallet-pill {
    flex: 1 1 136px;
  }

  .home-actions {
    justify-content: flex-start;
  }

  .home-brand {
    min-height: 120px;
  }

  .quick-fields,
  .highlight-grid {
    grid-template-columns: 1fr;
  }

  .home-primary-action {
    min-height: 78px;
  }

  .home-primary-action strong {
    font-size: 1.35rem;
  }

  .home-menu button {
    min-height: 64px;
  }

  .cup-panel {
    min-height: 330px;
  }

  .cup-copy {
    width: 62%;
    margin-left: 16px;
  }

  .cup-mascot {
    right: 0;
    bottom: 0;
    height: auto;
    width: 34%;
  }

  .cup-mascot img {
    width: 100%;
    height: auto;
  }

  .cup-ball {
    left: 9%;
    top: 12%;
    width: 50px;
  }

  .cup-copy strong {
    font-size: 2.3rem;
  }

  .cup-copy b {
    font-size: 1.8rem;
  }

  .friends-panel {
    padding: 16px;
  }

  .friend-list li {
    grid-template-columns: 16px 50px 1fr;
  }

  .friend-list b {
    font-size: 1rem;
  }

  .topbar {
    align-items: start;
    flex-direction: column;
  }

  .game-topbar {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .match-center {
    order: -1;
  }

  .score-side--right {
    justify-items: stretch;
  }

  .score {
    grid-template-columns: 1fr auto 1fr;
    width: 100%;
    justify-content: stretch;
  }

  .multiplayer-lobby {
    grid-template-columns: 1fr;
  }

  .lobby-seats,
  .lobby-actions {
    flex-wrap: wrap;
  }

  .player-score {
    min-width: 0;
  }

  .game-topbar .player-score {
    width: 100%;
    min-width: 0;
  }

  .ball-rack {
    flex-wrap: wrap;
  }

  .mini-ball {
    width: 18px;
  }

  .controls {
    grid-template-columns: 1fr 1fr 1fr;
  }

  .physics-lab__header {
    align-items: stretch;
    flex-direction: column;
  }

  .lab-tests,
  .lab-free-controls,
  .lab-position-controls,
  .lab-metrics,
  .profile-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .play-area {
    grid-template-columns: 1fr 72px;
    gap: 10px;
  }

  .table-lab-layout {
    grid-template-columns: 1fr;
  }

  .ball-lab-layout {
    grid-template-columns: 1fr;
  }

  .power-meter {
    min-height: 44px;
    grid-column: 1 / -1;
  }

  .power-meter__track {
    width: calc(100% - 28px);
    height: 16px;
    min-height: 0;
    max-height: none;
  }

  .power-meter__fill {
    top: 0;
    right: auto;
    width: var(--power);
    height: 100%;
    transition-property: width;
  }

  .power-meter__thumb {
    left: var(--power);
    bottom: 50%;
    width: 22px;
    height: 12px;
    transform: translate(-50%, 50%);
    transition-property: left;
  }

  .power-meter__track span {
    top: 0;
    bottom: 0;
    width: 1px;
    height: auto;
  }

  .power-meter__track span:nth-of-type(1) {
    left: 20%;
  }

  .power-meter__track span:nth-of-type(2) {
    left: 40%;
  }

  .power-meter__track span:nth-of-type(3) {
    left: 60%;
  }

  .power-meter__track span:nth-of-type(4) {
    left: 80%;
  }
}
